diff --git a/.chloggen/clickhouseexporter-use-standard-exporterhelper-queuesettings.yml b/.chloggen/clickhouseexporter-use-standard-exporterhelper-queuesettings.yml deleted file mode 100755 index 7c189b297415..000000000000 --- a/.chloggen/clickhouseexporter-use-standard-exporterhelper-queuesettings.yml +++ /dev/null @@ -1,27 +0,0 @@ -# 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: clickhouseexporter - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Replace `Config.QueueSettings` field with `exporterhelper.QueueSettings` and remove `QueueSettings` struct - -# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. -issues: [27653] - -# (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: [api] diff --git a/.github/ALLOWLIST b/.github/ALLOWLIST index 618b4d6106d3..af4e3b0874af 100644 --- a/.github/ALLOWLIST +++ b/.github/ALLOWLIST @@ -15,7 +15,7 @@ # ## -# NOTE: New components MUST have a codeowner. Add new components to the CODEOWNERS file instead of here. +# NOTE: New components MUST have one or more codeowners. Add codeowners to the component metadata.yaml and run make gengithub ## ## COMMON & SHARED components @@ -26,3 +26,4 @@ config/confighttp ## UNMAINTAINED components receiver/wavefrontreceiver/ +exporter/skywalkingexporter/ diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e2e28e874820..49b8a52a995d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,7 +1,7 @@ # Code generated by githubgen. DO NOT EDIT. ##################################################### # -# List of approvers for OpenTelemetry Collector Contrib +# List of codeowners for OpenTelemetry Collector Contrib # ##################################################### # @@ -12,81 +12,76 @@ # Learn about CODEOWNERS file format: # https://help.github.com/en/articles/about-code-owners # -# NOTE: Lines should be entered in the following format: -# /.. -# extension/oauth2clientauthextension/ @open-telemetry/collector-contrib-approvers @pavankrish123 @jpkrohling -# Path separator and minimum of 1 space between component path and owners is -# important for validation steps -# * @open-telemetry/collector-contrib-approvers -cmd/configschema/ @open-telemetry/collector-contrib-approvers @mx-psi @dmitryax @pmcollins -cmd/githubgen/ @open-telemetry/collector-contrib-approvers @atoulme -cmd/mdatagen/ @open-telemetry/collector-contrib-approvers @dmitryax -cmd/opampsupervisor/ @open-telemetry/collector-contrib-approvers @evan-bradley @atoulme @tigrannajaryan -cmd/otelcontribcol/ @open-telemetry/collector-contrib-approvers -cmd/oteltestbedcol/ @open-telemetry/collector-contrib-approvers -cmd/telemetrygen/ @open-telemetry/collector-contrib-approvers @mx-psi @codeboten +cmd/configschema/ @open-telemetry/collector-contrib-approvers @mx-psi @dmitryax +cmd/githubgen/ @open-telemetry/collector-contrib-approvers @atoulme +cmd/opampsupervisor/ @open-telemetry/collector-contrib-approvers @evan-bradley @atoulme @tigrannajaryan +cmd/otelcontribcol/ @open-telemetry/collector-contrib-approvers +cmd/oteltestbedcol/ @open-telemetry/collector-contrib-approvers +cmd/telemetrygen/ @open-telemetry/collector-contrib-approvers @mx-psi @codeboten -confmap/provider/s3provider/ @open-telemetry/collector-contrib-approvers @Aneurysm9 +confmap/provider/s3provider/ @open-telemetry/collector-contrib-approvers @Aneurysm9 +confmap/provider/secretsmanagerprovider/ @open-telemetry/collector-contrib-approvers @driverpt @atoulme -connector/countconnector/ @open-telemetry/collector-contrib-approvers @djaglowski @jpkrohling -connector/datadogconnector/ @open-telemetry/collector-contrib-approvers @mx-psi @gbbr @dineshg13 -connector/exceptionsconnector/ @open-telemetry/collector-contrib-approvers @jpkrohling -connector/routingconnector/ @open-telemetry/collector-contrib-approvers @jpkrohling @mwear -connector/servicegraphconnector/ @open-telemetry/collector-contrib-approvers @jpkrohling @mapno -connector/spanmetricsconnector/ @open-telemetry/collector-contrib-approvers @albertteoh +connector/countconnector/ @open-telemetry/collector-contrib-approvers @djaglowski @jpkrohling +connector/datadogconnector/ @open-telemetry/collector-contrib-approvers @mx-psi @dineshg13 +connector/exceptionsconnector/ @open-telemetry/collector-contrib-approvers @jpkrohling @marctc +connector/failoverconnector/ @open-telemetry/collector-contrib-approvers @akats7 @djaglowski @fatsheep9146 +connector/grafanacloudconnector/ @open-telemetry/collector-contrib-approvers @jpkrohling @rlankfo @jcreixell +connector/routingconnector/ @open-telemetry/collector-contrib-approvers @jpkrohling @mwear +connector/servicegraphconnector/ @open-telemetry/collector-contrib-approvers @jpkrohling @mapno +connector/spanmetricsconnector/ @open-telemetry/collector-contrib-approvers @portertech @Frapschen -examples/demo/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers +examples/demo/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers -exporter/alertmanagerexporter/ @open-telemetry/collector-contrib-approvers @jpkrohling @sokoide @mcube8 -exporter/alibabacloudlogserviceexporter/ @open-telemetry/collector-contrib-approvers @shabicheng @kongluoxing @qiansheng91 -exporter/awscloudwatchlogsexporter/ @open-telemetry/collector-contrib-approvers @boostchicken @bryan-aguilar @rapphil -exporter/awsemfexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @shaochengwang @mxiamxia @bryan-aguilar -exporter/awskinesisexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @MovieStoreGuy -exporter/awss3exporter/ @open-telemetry/collector-contrib-approvers @atoulme @pdelewski -exporter/awsxrayexporter/ @open-telemetry/collector-contrib-approvers @wangzlei @srprash -exporter/azuredataexplorerexporter/ @open-telemetry/collector-contrib-approvers @asaharn @ag-ramachandran -exporter/azuremonitorexporter/ @open-telemetry/collector-contrib-approvers @pcwiese -exporter/carbonexporter/ @open-telemetry/collector-contrib-approvers @aboguszewski-sumo -exporter/cassandraexporter/ @open-telemetry/collector-contrib-approvers @atoulme @emreyalvac -exporter/clickhouseexporter/ @open-telemetry/collector-contrib-approvers @hanjm @dmitryax @Frapschen -exporter/coralogixexporter/ @open-telemetry/collector-contrib-approvers @povilasv @matej-g -exporter/datadogexporter/ @open-telemetry/collector-contrib-approvers @mx-psi @gbbr @dineshg13 @liustanley @songy23 @mackjmr -exporter/datasetexporter/ @open-telemetry/collector-contrib-approvers @atoulme @martin-majlis-s1 @zdaratom @tomaz-s1 -exporter/dynatraceexporter/ @open-telemetry/collector-contrib-approvers @dyladan @arminru @evan-bradley -exporter/elasticsearchexporter/ @open-telemetry/collector-contrib-approvers @JaredTan95 -exporter/f5cloudexporter/ @open-telemetry/collector-contrib-approvers @gramidt -exporter/fileexporter/ @open-telemetry/collector-contrib-approvers @atingchen -exporter/googlecloudexporter/ @open-telemetry/collector-contrib-approvers @aabmass @dashpole @jsuereth @punya @damemi @psx95 -exporter/googlecloudpubsubexporter/ @open-telemetry/collector-contrib-approvers @alexvanboxel -exporter/googlemanagedprometheusexporter/ @open-telemetry/collector-contrib-approvers @aabmass @dashpole @jsuereth @punya @damemi @psx95 -exporter/honeycombmarkerexporter/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @fchikwekwe -exporter/influxdbexporter/ @open-telemetry/collector-contrib-approvers @jacobmarble -exporter/instanaexporter/ @open-telemetry/collector-contrib-approvers @jpkrohling @hickeyma -exporter/kafkaexporter/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy -exporter/kineticaexporter/ @open-telemetry/collector-contrib-approvers @am-kinetica @TylerHelmuth -exporter/loadbalancingexporter/ @open-telemetry/collector-contrib-approvers @jpkrohling -exporter/logicmonitorexporter/ @open-telemetry/collector-contrib-approvers @bogdandrutu @khyatigandhi6 @avadhut123pisal -exporter/logzioexporter/ @open-telemetry/collector-contrib-approvers @Doron-Bargo @yotamloe -exporter/lokiexporter/ @open-telemetry/collector-contrib-approvers @gramidt @gouthamve @jpkrohling @mar4uk -exporter/mezmoexporter/ @open-telemetry/collector-contrib-approvers @dashpole @billmeyer @gjanco -exporter/opencensusexporter/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers -exporter/opensearchexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @MitchellGale @MaxKsyunz @YANG-DB -exporter/prometheusexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 -exporter/prometheusremotewriteexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @rapphil -exporter/pulsarexporter/ @open-telemetry/collector-contrib-approvers @dmitryax @dao-jun -exporter/sapmexporter/ @open-telemetry/collector-contrib-approvers @dmitryax @atoulme -exporter/sentryexporter/ @open-telemetry/collector-contrib-approvers @AbhiPrasad -exporter/signalfxexporter/ @open-telemetry/collector-contrib-approvers @dmitryax @crobert-1 -exporter/skywalkingexporter/ @open-telemetry/collector-contrib-approvers @liqiangz -exporter/splunkhecexporter/ @open-telemetry/collector-contrib-approvers @atoulme @dmitryax -exporter/sumologicexporter/ @open-telemetry/collector-contrib-approvers @sumo-drosiek -exporter/syslogexporter/ @open-telemetry/collector-contrib-approvers @kkujawa-sumo @rnishtala-sumo @astencel-sumo -exporter/tanzuobservabilityexporter/ @open-telemetry/collector-contrib-approvers @oppegard @thepeterstone @keep94 -exporter/tencentcloudlogserviceexporter/ @open-telemetry/collector-contrib-approvers @wgliang @yiyang5055 -exporter/zipkinexporter/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @astencel-sumo @crobert-1 +exporter/alertmanagerexporter/ @open-telemetry/collector-contrib-approvers @jpkrohling @sokoide @mcube8 +exporter/alibabacloudlogserviceexporter/ @open-telemetry/collector-contrib-approvers @shabicheng @kongluoxing @qiansheng91 +exporter/awscloudwatchlogsexporter/ @open-telemetry/collector-contrib-approvers @boostchicken @bryan-aguilar @rapphil +exporter/awsemfexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @shaochengwang @mxiamxia @bryan-aguilar +exporter/awskinesisexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @MovieStoreGuy +exporter/awss3exporter/ @open-telemetry/collector-contrib-approvers @atoulme @pdelewski +exporter/awsxrayexporter/ @open-telemetry/collector-contrib-approvers @wangzlei @srprash +exporter/azuredataexplorerexporter/ @open-telemetry/collector-contrib-approvers @asaharn @ag-ramachandran +exporter/azuremonitorexporter/ @open-telemetry/collector-contrib-approvers @pcwiese +exporter/carbonexporter/ @open-telemetry/collector-contrib-approvers @aboguszewski-sumo +exporter/cassandraexporter/ @open-telemetry/collector-contrib-approvers @atoulme @emreyalvac +exporter/clickhouseexporter/ @open-telemetry/collector-contrib-approvers @hanjm @dmitryax @Frapschen @SpencerTorres +exporter/coralogixexporter/ @open-telemetry/collector-contrib-approvers @povilasv @matej-g +exporter/datadogexporter/ @open-telemetry/collector-contrib-approvers @mx-psi @dineshg13 @liustanley @songy23 @mackjmr +exporter/datasetexporter/ @open-telemetry/collector-contrib-approvers @atoulme @martin-majlis-s1 @zdaratom-s1 @tomaz-s1 +exporter/dynatraceexporter/ @open-telemetry/collector-contrib-approvers @dyladan @arminru @evan-bradley +exporter/elasticsearchexporter/ @open-telemetry/collector-contrib-approvers @JaredTan95 @ycombinator +exporter/fileexporter/ @open-telemetry/collector-contrib-approvers @atingchen +exporter/googlecloudexporter/ @open-telemetry/collector-contrib-approvers @aabmass @dashpole @jsuereth @punya @damemi @psx95 +exporter/googlecloudpubsubexporter/ @open-telemetry/collector-contrib-approvers @alexvanboxel +exporter/googlemanagedprometheusexporter/ @open-telemetry/collector-contrib-approvers @aabmass @dashpole @jsuereth @punya @damemi @psx95 +exporter/honeycombmarkerexporter/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @fchikwekwe +exporter/influxdbexporter/ @open-telemetry/collector-contrib-approvers @jacobmarble +exporter/instanaexporter/ @open-telemetry/collector-contrib-approvers @jpkrohling @hickeyma +exporter/kafkaexporter/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy +exporter/kineticaexporter/ @open-telemetry/collector-contrib-approvers @am-kinetica @TylerHelmuth +exporter/loadbalancingexporter/ @open-telemetry/collector-contrib-approvers @jpkrohling +exporter/logicmonitorexporter/ @open-telemetry/collector-contrib-approvers @bogdandrutu @khyatigandhi6 @avadhut123pisal +exporter/logzioexporter/ @open-telemetry/collector-contrib-approvers @yotamloe +exporter/lokiexporter/ @open-telemetry/collector-contrib-approvers @gramidt @gouthamve @jpkrohling @mar4uk +exporter/mezmoexporter/ @open-telemetry/collector-contrib-approvers @dashpole @billmeyer @gjanco +exporter/opencensusexporter/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers +exporter/opensearchexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @MitchellGale @MaxKsyunz @YANG-DB +exporter/otelarrowexporter/ @open-telemetry/collector-contrib-approvers @jmacd @moh-osman3 +exporter/prometheusexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 +exporter/prometheusremotewriteexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @rapphil +exporter/pulsarexporter/ @open-telemetry/collector-contrib-approvers @dmitryax @dao-jun +exporter/rabbitmqexporter/ @open-telemetry/collector-contrib-approvers @swar8080 +exporter/sapmexporter/ @open-telemetry/collector-contrib-approvers @dmitryax @atoulme +exporter/sentryexporter/ @open-telemetry/collector-contrib-approvers @AbhiPrasad +exporter/signalfxexporter/ @open-telemetry/collector-contrib-approvers @dmitryax @crobert-1 +exporter/splunkhecexporter/ @open-telemetry/collector-contrib-approvers @atoulme @dmitryax +exporter/sumologicexporter/ @open-telemetry/collector-contrib-approvers @sumo-drosiek +exporter/syslogexporter/ @open-telemetry/collector-contrib-approvers @kkujawa-sumo @rnishtala-sumo @astencel-sumo +exporter/tencentcloudlogserviceexporter/ @open-telemetry/collector-contrib-approvers @wgliang @yiyang5055 +exporter/zipkinexporter/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @astencel-sumo @crobert-1 extension/asapauthextension/ @open-telemetry/collector-contrib-approvers @jamesmoessis @MovieStoreGuy extension/awsmiddleware/ @open-telemetry/collector-contrib-approvers @jefchien @@ -101,9 +96,7 @@ extension/encoding/textencodingextension/ @open-te extension/encoding/zipkinencodingextension/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @dao-jun extension/headerssetterextension/ @open-telemetry/collector-contrib-approvers @jpkrohling extension/healthcheckextension/ @open-telemetry/collector-contrib-approvers @jpkrohling -extension/httpforwarder/ @open-telemetry/collector-contrib-approvers @atoulme @rmfitzpatrick extension/jaegerremotesampling/ @open-telemetry/collector-contrib-approvers @jpkrohling @frzifus -extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/ @open-telemetry/collector-contrib-approvers @jpkrohling @frzifus extension/oauth2clientauthextension/ @open-telemetry/collector-contrib-approvers @pavankrish123 @jpkrohling extension/observer/ @open-telemetry/collector-contrib-approvers @dmitryax @rmfitzpatrick extension/observer/dockerobserver/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @@ -119,21 +112,57 @@ extension/sigv4authextension/ @open-te 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/ackextension/ @open-telemetry/collector-contrib-approvers @zpzhuSplunk @splunkericl +extension/asapauthextension/ @open-telemetry/collector-contrib-approvers @jamesmoessis @MovieStoreGuy +extension/awsproxy/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @mxiamxia +extension/basicauthextension/ @open-telemetry/collector-contrib-approvers @jpkrohling @frzifus +extension/bearertokenauthextension/ @open-telemetry/collector-contrib-approvers @jpkrohling @frzifus +extension/encoding/ @open-telemetry/collector-contrib-approvers @atoulme @dao-jun @dmitryax @MovieStoreGuy @VihasMakwana +extension/encoding/avrologencodingextension/ @open-telemetry/collector-contrib-approvers @thmshmm +extension/encoding/jaegerencodingextension/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @atoulme +extension/encoding/jsonlogencodingextension/ @open-telemetry/collector-contrib-approvers @VihasMakwana @atoulme +extension/encoding/otlpencodingextension/ @open-telemetry/collector-contrib-approvers @dao-jun @VihasMakwana +extension/encoding/textencodingextension/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @atoulme +extension/encoding/zipkinencodingextension/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @dao-jun +extension/googleclientauthextension/ @open-telemetry/collector-contrib-approvers @dashpole @damemi @aabmass @jsuereth @punya @psx95 +extension/headerssetterextension/ @open-telemetry/collector-contrib-approvers @jpkrohling +extension/healthcheckextension/ @open-telemetry/collector-contrib-approvers @jpkrohling +extension/httpforwarderextension/ @open-telemetry/collector-contrib-approvers @atoulme @rmfitzpatrick +extension/jaegerremotesampling/ @open-telemetry/collector-contrib-approvers @yurishkuro @frzifus +extension/oauth2clientauthextension/ @open-telemetry/collector-contrib-approvers @pavankrish123 @jpkrohling +extension/observer/ @open-telemetry/collector-contrib-approvers @dmitryax @rmfitzpatrick +extension/observer/dockerobserver/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy +extension/observer/ecsobserver/ @open-telemetry/collector-contrib-approvers @dmitryax @rmfitzpatrick +extension/observer/ecstaskobserver/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick +extension/observer/hostobserver/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy +extension/observer/k8sobserver/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick @dmitryax +extension/oidcauthextension/ @open-telemetry/collector-contrib-approvers @jpkrohling +extension/opampextension/ @open-telemetry/collector-contrib-approvers @portertech @evan-bradley @tigrannajaryan +extension/pprofextension/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy +extension/remotetapextension/ @open-telemetry/collector-contrib-approvers @atoulme +extension/sigv4authextension/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @erichsueh3 +extension/solarwindsapmsettingsextension/ @open-telemetry/collector-contrib-approvers @jerrytfleung @cheempz +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 -internal/coreinternal/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers -internal/datadog/ @open-telemetry/collector-contrib-approvers @mx-psi @gbbr @dineshg13 -internal/docker/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick @jamesmoessis -internal/filter/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers -internal/k8sconfig/ @open-telemetry/collector-contrib-approvers @dmitryax -internal/k8stest/ @open-telemetry/collector-contrib-approvers @crobert-1 -internal/kafka/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy -internal/kubelet/ @open-telemetry/collector-contrib-approvers @dmitryax -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/tools/ @open-telemetry/collector-contrib-approvers +internal/aws/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @mxiamxia +internal/collectd/ @open-telemetry/collector-contrib-approvers @atoulme +internal/coreinternal/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers +internal/datadog/ @open-telemetry/collector-contrib-approvers @mx-psi @dineshg13 +internal/docker/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick @jamesmoessis +internal/exp/metrics/ @open-telemetry/collector-contrib-approvers @sh0rez @RichieSams +internal/filter/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers +internal/k8sconfig/ @open-telemetry/collector-contrib-approvers @dmitryax +internal/k8stest/ @open-telemetry/collector-contrib-approvers @crobert-1 +internal/kafka/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy +internal/kubelet/ @open-telemetry/collector-contrib-approvers @dmitryax +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 override/aws/ @open-telemetry/collector-contrib-approvers @sethAmazon @@ -156,132 +185,160 @@ pkg/translator/signalfx/ @open-te pkg/translator/skywalking/ @open-telemetry/collector-contrib-approvers @JaredTan95 pkg/translator/zipkin/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @astencel-sumo @crobert-1 pkg/winperfcounters/ @open-telemetry/collector-contrib-approvers @dashpole @Mrod1598 @BinaryFissionGames +pkg/batchperresourceattr/ @open-telemetry/collector-contrib-approvers @atoulme @dmitryax +pkg/batchpersignal/ @open-telemetry/collector-contrib-approvers @jpkrohling +pkg/experimentalmetricmetadata/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick +pkg/golden/ @open-telemetry/collector-contrib-approvers @djaglowski @atoulme +pkg/ottl/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley +pkg/pdatatest/ @open-telemetry/collector-contrib-approvers @djaglowski @fatsheep9146 +pkg/pdatautil/ @open-telemetry/collector-contrib-approvers @dmitryax +pkg/resourcetotelemetry/ @open-telemetry/collector-contrib-approvers @mx-psi +pkg/sampling/ @open-telemetry/collector-contrib-approvers @kentquirk @jmacd +pkg/stanza/ @open-telemetry/collector-contrib-approvers @djaglowski +pkg/translator/azure/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers @atoulme @cparkins +pkg/translator/jaeger/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers @frzifus +pkg/translator/loki/ @open-telemetry/collector-contrib-approvers @gouthamve @jpkrohling @mar4uk +pkg/translator/opencensus/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers +pkg/translator/prometheus/ @open-telemetry/collector-contrib-approvers @dashpole @bertysentry +pkg/translator/prometheusremotewrite/ @open-telemetry/collector-contrib-approvers @Aneurysm9 +pkg/translator/signalfx/ @open-telemetry/collector-contrib-approvers @dmitryax +pkg/translator/skywalking/ @open-telemetry/collector-contrib-approvers @JaredTan95 +pkg/translator/zipkin/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @astencel-sumo @crobert-1 +pkg/winperfcounters/ @open-telemetry/collector-contrib-approvers @dashpole @Mrod1598 @BinaryFissionGames + +processor/attributesprocessor/ @open-telemetry/collector-contrib-approvers @boostchicken +processor/cumulativetodeltaprocessor/ @open-telemetry/collector-contrib-approvers @TylerHelmuth +processor/deltatocumulativeprocessor/ @open-telemetry/collector-contrib-approvers @sh0rez @RichieSams +processor/deltatorateprocessor/ @open-telemetry/collector-contrib-approvers @Aneurysm9 +processor/filterprocessor/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @boostchicken +processor/groupbyattrsprocessor/ @open-telemetry/collector-contrib-approvers @rnishtala-sumo +processor/groupbytraceprocessor/ @open-telemetry/collector-contrib-approvers @jpkrohling +processor/intervalprocessor/ @open-telemetry/collector-contrib-approvers @RichieSams +processor/k8sattributesprocessor/ @open-telemetry/collector-contrib-approvers @dmitryax @rmfitzpatrick @fatsheep9146 @TylerHelmuth +processor/logstransformprocessor/ @open-telemetry/collector-contrib-approvers @djaglowski @dehaansa +processor/metricsgenerationprocessor/ @open-telemetry/collector-contrib-approvers @Aneurysm9 +processor/metricstransformprocessor/ @open-telemetry/collector-contrib-approvers @dmitryax +processor/probabilisticsamplerprocessor/ @open-telemetry/collector-contrib-approvers @jpkrohling +processor/redactionprocessor/ @open-telemetry/collector-contrib-approvers @dmitryax @mx-psi @TylerHelmuth +processor/remotetapprocessor/ @open-telemetry/collector-contrib-approvers @atoulme +processor/resourcedetectionprocessor/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @dashpole +processor/resourcedetectionprocessor/internal/azure/ @open-telemetry/collector-contrib-approvers @mx-psi +processor/resourcedetectionprocessor/internal/heroku/ @open-telemetry/collector-contrib-approvers @atoulme +processor/resourcedetectionprocessor/internal/openshift/ @open-telemetry/collector-contrib-approvers @frzifus +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/spanprocessor/ @open-telemetry/collector-contrib-approvers @boostchicken +processor/sumologicprocessor/ @open-telemetry/collector-contrib-approvers @aboguszewski-sumo @astencel-sumo @sumo-drosiek +processor/tailsamplingprocessor/ @open-telemetry/collector-contrib-approvers @jpkrohling +processor/transformprocessor/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley -processor/attributesprocessor/ @open-telemetry/collector-contrib-approvers @boostchicken -processor/cumulativetodeltaprocessor/ @open-telemetry/collector-contrib-approvers @TylerHelmuth -processor/datadogprocessor/ @open-telemetry/collector-contrib-approvers @mx-psi @gbbr @dineshg13 -processor/deltatorateprocessor/ @open-telemetry/collector-contrib-approvers @Aneurysm9 -processor/filterprocessor/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @boostchicken -processor/groupbyattrsprocessor/ @open-telemetry/collector-contrib-approvers @rnishtala-sumo -processor/groupbytraceprocessor/ @open-telemetry/collector-contrib-approvers @jpkrohling -processor/k8sattributesprocessor/ @open-telemetry/collector-contrib-approvers @dmitryax @rmfitzpatrick @fatsheep9146 @TylerHelmuth -processor/logstransformprocessor/ @open-telemetry/collector-contrib-approvers @djaglowski @dehaansa -processor/metricsgenerationprocessor/ @open-telemetry/collector-contrib-approvers @Aneurysm9 -processor/metricstransformprocessor/ @open-telemetry/collector-contrib-approvers @dmitryax -processor/probabilisticsamplerprocessor/ @open-telemetry/collector-contrib-approvers @jpkrohling -processor/redactionprocessor/ @open-telemetry/collector-contrib-approvers @leonsp-ai @dmitryax @mx-psi @TylerHelmuth -processor/remotetapprocessor/ @open-telemetry/collector-contrib-approvers @pmcollins -processor/resourcedetectionprocessor/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @dashpole -processor/resourcedetectionprocessor/internal/azure/ @open-telemetry/collector-contrib-approvers @mx-psi -processor/resourcedetectionprocessor/internal/heroku/ @open-telemetry/collector-contrib-approvers @atoulme -processor/resourcedetectionprocessor/internal/openshift/ @open-telemetry/collector-contrib-approvers @frzifus -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 @albertteoh -processor/spanprocessor/ @open-telemetry/collector-contrib-approvers @boostchicken -processor/sumologicprocessor/ @open-telemetry/collector-contrib-approvers @aboguszewski-sumo @astencel-sumo @sumo-drosiek -processor/tailsamplingprocessor/ @open-telemetry/collector-contrib-approvers @jpkrohling -processor/transformprocessor/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley +receiver/activedirectorydsreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @BinaryFissionGames +receiver/aerospikereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @antonblock +receiver/apachereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski +receiver/apachesparkreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @Caleb-Hurshman @mrsillydog +receiver/awscloudwatchmetricsreceiver/ @open-telemetry/collector-contrib-approvers @jpkrohling +receiver/awscloudwatchreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei +receiver/awscontainerinsightreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @pxaws +receiver/awsecscontainermetricsreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 +receiver/awsfirehosereceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 +receiver/awss3receiver/ @open-telemetry/collector-contrib-approvers @atoulme @adcharre +receiver/awsxrayreceiver/ @open-telemetry/collector-contrib-approvers @wangzlei @srprash +receiver/azureblobreceiver/ @open-telemetry/collector-contrib-approvers @eedorenko @mx-psi +receiver/azureeventhubreceiver/ @open-telemetry/collector-contrib-approvers @atoulme @djaglowski @cparkins +receiver/azuremonitorreceiver/ @open-telemetry/collector-contrib-approvers @nslaughter @codeboten +receiver/bigipreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @StefanKurek +receiver/carbonreceiver/ @open-telemetry/collector-contrib-approvers @aboguszewski-sumo +receiver/chronyreceiver/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @jamesmoessis +receiver/cloudflarereceiver/ @open-telemetry/collector-contrib-approvers @dehaansa @djaglowski +receiver/cloudfoundryreceiver/ @open-telemetry/collector-contrib-approvers @pellared @crobert-1 +receiver/collectdreceiver/ @open-telemetry/collector-contrib-approvers @atoulme +receiver/couchdbreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski +receiver/datadogreceiver/ @open-telemetry/collector-contrib-approvers @boostchicken @gouthamve @jpkrohling @MovieStoreGuy +receiver/dockerstatsreceiver/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick @jamesmoessis +receiver/elasticsearchreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @BinaryFissionGames +receiver/expvarreceiver/ @open-telemetry/collector-contrib-approvers @jamesmoessis @MovieStoreGuy +receiver/filelogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski +receiver/filestatsreceiver/ @open-telemetry/collector-contrib-approvers @atoulme +receiver/flinkmetricsreceiver/ @open-telemetry/collector-contrib-approvers @JonathanWamsley @djaglowski +receiver/fluentforwardreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax +receiver/gitproviderreceiver/ @open-telemetry/collector-contrib-approvers @adrielp @astencel-sumo +receiver/googlecloudpubsubreceiver/ @open-telemetry/collector-contrib-approvers @alexvanboxel +receiver/googlecloudspannerreceiver/ @open-telemetry/collector-contrib-approvers @varunraiko +receiver/haproxyreceiver/ @open-telemetry/collector-contrib-approvers @atoulme @MovieStoreGuy +receiver/hostmetricsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @braydonk +receiver/httpcheckreceiver/ @open-telemetry/collector-contrib-approvers @codeboten +receiver/iisreceiver/ @open-telemetry/collector-contrib-approvers @Mrod1598 @djaglowski +receiver/influxdbreceiver/ @open-telemetry/collector-contrib-approvers @jacobmarble +receiver/jaegerreceiver/ @open-telemetry/collector-contrib-approvers @yurishkuro +receiver/jmxreceiver/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick +receiver/journaldreceiver/ @open-telemetry/collector-contrib-approvers @sumo-drosiek @djaglowski +receiver/k8sclusterreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @TylerHelmuth @povilasv +receiver/k8seventsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @TylerHelmuth +receiver/k8sobjectsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @hvaghani221 @TylerHelmuth +receiver/kafkametricsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax +receiver/kafkareceiver/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy +receiver/kubeletstatsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @TylerHelmuth +receiver/lokireceiver/ @open-telemetry/collector-contrib-approvers @mar4uk @jpkrohling +receiver/memcachedreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski +receiver/mongodbatlasreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei +receiver/mongodbreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei +receiver/mysqlreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski +receiver/namedpipereceiver/ @open-telemetry/collector-contrib-approvers @sinkingpoint @djaglowski +receiver/nginxreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski +receiver/nsxtreceiver/ @open-telemetry/collector-contrib-approvers @dashpole @schmikei +receiver/opencensusreceiver/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers +receiver/oracledbreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @crobert-1 @atoulme +receiver/osqueryreceiver/ @open-telemetry/collector-contrib-approvers @codeboten @nslaughter @smithclay +receiver/otelarrowreceiver/ @open-telemetry/collector-contrib-approvers @jmacd @moh-osman3 +receiver/otlpjsonfilereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @atoulme +receiver/podmanreceiver/ @open-telemetry/collector-contrib-approvers @rogercoll +receiver/postgresqlreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski +receiver/prometheusreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @dashpole +receiver/pulsarreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @dao-jun +receiver/purefareceiver/ @open-telemetry/collector-contrib-approvers @jpkrohling @dgoscn @chrroberts-pure +receiver/purefbreceiver/ @open-telemetry/collector-contrib-approvers @jpkrohling @dgoscn @chrroberts-pure +receiver/rabbitmqreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @cpheps +receiver/receivercreator/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick +receiver/redisreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @hughesjj +receiver/riakreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @armstrmi +receiver/saphanareceiver/ @open-telemetry/collector-contrib-approvers @dehaansa +receiver/sapmreceiver/ @open-telemetry/collector-contrib-approvers @atoulme +receiver/signalfxreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax +receiver/simpleprometheusreceiver/ @open-telemetry/collector-contrib-approvers @fatsheep9146 +receiver/skywalkingreceiver/ @open-telemetry/collector-contrib-approvers @JaredTan95 +receiver/snmpreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @StefanKurek @tamir-michaeli +receiver/snowflakereceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @shalper2 +receiver/solacereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @mcardy +receiver/splunkenterprisereceiver/ @open-telemetry/collector-contrib-approvers @shalper2 @MovieStoreGuy @greatestusername +receiver/splunkhecreceiver/ @open-telemetry/collector-contrib-approvers @atoulme +receiver/sqlqueryreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @crobert-1 +receiver/sqlserverreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @StefanKurek +receiver/sshcheckreceiver/ @open-telemetry/collector-contrib-approvers @nslaughter @codeboten +receiver/statsdreceiver/ @open-telemetry/collector-contrib-approvers @jmacd @dmitryax +receiver/syslogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski +receiver/tcplogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski +receiver/udplogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski +receiver/vcenterreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei +receiver/wavefrontreceiver/ @open-telemetry/collector-contrib-approvers @samiura +receiver/webhookeventreceiver/ @open-telemetry/collector-contrib-approvers @atoulme @shalper2 +receiver/windowseventlogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @armstrmi @pjanotti +receiver/windowsperfcountersreceiver/ @open-telemetry/collector-contrib-approvers @dashpole +receiver/zipkinreceiver/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @astencel-sumo @crobert-1 +receiver/zookeeperreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/activedirectorydsreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @BinaryFissionGames -receiver/aerospikereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @antonblock -receiver/apachereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/apachesparkreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @Caleb-Hurshman @mrsillydog -receiver/awscloudwatchmetricsreceiver/ @open-telemetry/collector-contrib-approvers @jpkrohling -receiver/awscloudwatchreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei -receiver/awscontainerinsightreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @pxaws -receiver/awsecscontainermetricsreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 -receiver/awsfirehosereceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 -receiver/awsxrayreceiver/ @open-telemetry/collector-contrib-approvers @wangzlei @srprash -receiver/azureblobreceiver/ @open-telemetry/collector-contrib-approvers @eedorenko @mx-psi -receiver/azureeventhubreceiver/ @open-telemetry/collector-contrib-approvers @atoulme @djaglowski -receiver/azuremonitorreceiver/ @open-telemetry/collector-contrib-approvers @altuner @codeboten -receiver/bigipreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @StefanKurek -receiver/carbonreceiver/ @open-telemetry/collector-contrib-approvers @aboguszewski-sumo -receiver/chronyreceiver/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @jamesmoessis -receiver/cloudflarereceiver/ @open-telemetry/collector-contrib-approvers @dehaansa @djaglowski -receiver/cloudfoundryreceiver/ @open-telemetry/collector-contrib-approvers @agoallikmaa @pellared @crobert-1 -receiver/collectdreceiver/ @open-telemetry/collector-contrib-approvers @atoulme -receiver/couchdbreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/datadogreceiver/ @open-telemetry/collector-contrib-approvers @boostchicken @gouthamve @jpkrohling @MovieStoreGuy -receiver/dockerstatsreceiver/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick @jamesmoessis -receiver/elasticsearchreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @BinaryFissionGames -receiver/expvarreceiver/ @open-telemetry/collector-contrib-approvers @jamesmoessis @MovieStoreGuy -receiver/filelogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/filereceiver/ @open-telemetry/collector-contrib-approvers @pmcollins @djaglowski -receiver/filestatsreceiver/ @open-telemetry/collector-contrib-approvers @atoulme -receiver/flinkmetricsreceiver/ @open-telemetry/collector-contrib-approvers @JonathanWamsley @djaglowski -receiver/fluentforwardreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax -receiver/gitproviderreceiver/ @open-telemetry/collector-contrib-approvers @adrielp @astencel-sumo -receiver/googlecloudpubsubreceiver/ @open-telemetry/collector-contrib-approvers @alexvanboxel -receiver/googlecloudspannerreceiver/ @open-telemetry/collector-contrib-approvers @architjugran @varunraiko @kiranmayib -receiver/haproxyreceiver/ @open-telemetry/collector-contrib-approvers @atoulme @MovieStoreGuy -receiver/hostmetricsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @braydonk -receiver/httpcheckreceiver/ @open-telemetry/collector-contrib-approvers @codeboten -receiver/iisreceiver/ @open-telemetry/collector-contrib-approvers @Mrod1598 @djaglowski -receiver/influxdbreceiver/ @open-telemetry/collector-contrib-approvers @jacobmarble -receiver/jaegerreceiver/ @open-telemetry/collector-contrib-approvers @jpkrohling -receiver/jaegerreceiver/internal/jaegerreceiverdeprecated/ @open-telemetry/collector-contrib-approvers @jpkrohling -receiver/jmxreceiver/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick -receiver/journaldreceiver/ @open-telemetry/collector-contrib-approvers @sumo-drosiek @djaglowski -receiver/k8sclusterreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @TylerHelmuth @povilasv -receiver/k8seventsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @TylerHelmuth -receiver/k8sobjectsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @hvaghani221 @TylerHelmuth -receiver/kafkametricsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax -receiver/kafkareceiver/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy -receiver/kubeletstatsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @TylerHelmuth -receiver/lokireceiver/ @open-telemetry/collector-contrib-approvers @mar4uk @jpkrohling -receiver/memcachedreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/mongodbatlasreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei -receiver/mongodbreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei -receiver/mysqlreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/nginxreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/nsxtreceiver/ @open-telemetry/collector-contrib-approvers @dashpole @schmikei -receiver/opencensusreceiver/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers -receiver/oracledbreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @crobert-1 @atoulme -receiver/otlpjsonfilereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @atoulme -receiver/podmanreceiver/ @open-telemetry/collector-contrib-approvers @rogercoll -receiver/postgresqlreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/prometheusreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @dashpole -receiver/pulsarreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @dao-jun -receiver/purefareceiver/ @open-telemetry/collector-contrib-approvers @jpkrohling @dgoscn @chrroberts-pure -receiver/purefbreceiver/ @open-telemetry/collector-contrib-approvers @jpkrohling @dgoscn @chrroberts-pure -receiver/rabbitmqreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @cpheps -receiver/receivercreator/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick -receiver/redisreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @hughesjj -receiver/riakreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @armstrmi -receiver/saphanareceiver/ @open-telemetry/collector-contrib-approvers @dehaansa -receiver/sapmreceiver/ @open-telemetry/collector-contrib-approvers @atoulme -receiver/signalfxreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax -receiver/simpleprometheusreceiver/ @open-telemetry/collector-contrib-approvers @fatsheep9146 -receiver/skywalkingreceiver/ @open-telemetry/collector-contrib-approvers @JaredTan95 -receiver/snmpreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @StefanKurek @tamir-michaeli -receiver/snowflakereceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @shalper2 -receiver/solacereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @mcardy -receiver/splunkenterprisereceiver/ @open-telemetry/collector-contrib-approvers @shalper2 @MovieStoreGuy -receiver/splunkhecreceiver/ @open-telemetry/collector-contrib-approvers @atoulme -receiver/sqlqueryreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @pmcollins -receiver/sqlserverreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @StefanKurek -receiver/sshcheckreceiver/ @open-telemetry/collector-contrib-approvers @nslaughter @codeboten -receiver/statsdreceiver/ @open-telemetry/collector-contrib-approvers @jmacd @dmitryax -receiver/syslogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/tcplogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/udplogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski -receiver/vcenterreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei -receiver/wavefrontreceiver/ @open-telemetry/collector-contrib-approvers @samiura -receiver/webhookeventreceiver/ @open-telemetry/collector-contrib-approvers @atoulme @shalper2 -receiver/windowseventlogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @armstrmi @pjanotti -receiver/windowsperfcountersreceiver/ @open-telemetry/collector-contrib-approvers @dashpole -receiver/zipkinreceiver/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @astencel-sumo @crobert-1 -receiver/zookeeperreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski +testbed/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers +testbed/mockdatasenders/mockdatadogagentexporter/ @open-telemetry/collector-contrib-approvers @boostchicken -testbed/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers -testbed/mockdatareceivers/mockawsxrayreceiver/ @open-telemetry/collector-contrib-approvers @wangzlei @srprash -testbed/mockdatasenders/mockdatadogagentexporter/ @open-telemetry/collector-contrib-approvers @boostchicken +##################################################### +# +# List of distribution maintainers for OpenTelemetry Collector Contrib +# +##################################################### +reports/distributions/core.yaml @open-telemetry/collector-contrib-approvers +reports/distributions/contrib.yaml @open-telemetry/collector-contrib-approvers ## UNMAINTAINED components -## The Github issue template generation code needs this to generate the corresponding labels. +exporter/skywalkingexporter/ @open-telemetry/collector-contrib-approvers diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index c95e2905ed97..98e8e2f91f32 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -20,15 +20,17 @@ body: # Start Collector components list - cmd/configschema - cmd/githubgen - - cmd/mdatagen - cmd/opampsupervisor - cmd/otelcontribcol - cmd/oteltestbedcol - cmd/telemetrygen - confmap/provider/s3provider + - confmap/provider/secretsmanagerprovider - connector/count - connector/datadog - connector/exceptions + - connector/failover + - connector/grafanacloud - connector/routing - connector/servicegraph - connector/spanmetrics @@ -50,7 +52,6 @@ body: - exporter/dataset - exporter/dynatrace - exporter/elasticsearch - - exporter/f5cloud - exporter/file - exporter/googlecloud - exporter/googlecloudpubsub @@ -67,9 +68,11 @@ body: - exporter/mezmo - exporter/opencensus - exporter/opensearch + - exporter/otelarrow - exporter/prometheus - exporter/prometheusremotewrite - exporter/pulsar + - exporter/rabbitmq - exporter/sapm - exporter/sentry - exporter/signalfx @@ -77,25 +80,26 @@ body: - exporter/splunkhec - exporter/sumologic - exporter/syslog - - exporter/tanzuobservability - exporter/tencentcloudlogservice - exporter/zipkin + - extension/ack - extension/asapauth - extension/awsmiddleware - extension/awsproxy - extension/basicauth - extension/bearertokenauth - extension/encoding + - extension/encoding/avrologencoding - extension/encoding/jaegerencoding - extension/encoding/jsonlogencoding - extension/encoding/otlpencoding - extension/encoding/textencoding - extension/encoding/zipkinencoding + - extension/googleclientauth - extension/headerssetter - extension/healthcheck - extension/httpforwarder - extension/jaegerremotesampling - - extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated - extension/oauth2clientauth - extension/observer - extension/observer/dockerobserver @@ -108,14 +112,17 @@ body: - extension/pprof - extension/remotetap - extension/sigv4auth + - extension/solarwindsapmsettings - extension/storage - extension/storage/dbstorage - extension/storage/filestorage + - extension/sumologic - internal/aws - internal/collectd - internal/core - internal/datadog - internal/docker + - internal/exp/metrics - internal/filter - internal/k8sconfig - internal/k8stest @@ -124,6 +131,7 @@ body: - internal/metadataproviders - internal/sharedcomponent - internal/splunk + - internal/sqlquery - internal/tools - override/aws - pkg/batchperresourceattr @@ -134,6 +142,7 @@ body: - pkg/pdatatest - pkg/pdatautil - pkg/resourcetotelemetry + - pkg/sampling - pkg/stanza - pkg/translator/azure - pkg/translator/jaeger @@ -147,11 +156,12 @@ body: - pkg/winperfcounters - processor/attributes - processor/cumulativetodelta - - processor/datadog + - processor/deltatocumulative - processor/deltatorate - processor/filter - processor/groupbyattrs - processor/groupbytrace + - processor/interval - processor/k8sattributes - processor/logstransform - processor/metricsgeneration @@ -166,9 +176,7 @@ body: - processor/resourcedetection/internal/openshift - processor/routing - processor/schema - - processor/servicegraph - processor/span - - processor/spanmetrics - processor/sumologic - processor/tailsampling - processor/transform @@ -181,6 +189,7 @@ body: - receiver/awscontainerinsight - receiver/awsecscontainermetrics - receiver/awsfirehose + - receiver/awss3 - receiver/awsxray - receiver/azureblob - receiver/azureeventhub @@ -196,7 +205,6 @@ body: - receiver/dockerstats - receiver/elasticsearch - receiver/expvar - - receiver/file - receiver/filelog - receiver/filestats - receiver/flinkmetrics @@ -210,7 +218,6 @@ body: - receiver/iis - receiver/influxdb - receiver/jaeger - - receiver/jaeger/internal/jaegerreceiverdeprecated - receiver/jmx - receiver/journald - receiver/k8scluster @@ -224,10 +231,13 @@ body: - receiver/mongodb - receiver/mongodbatlas - receiver/mysql + - receiver/namedpipe - receiver/nginx - receiver/nsxt - receiver/opencensus - receiver/oracledb + - receiver/osquery + - receiver/otelarrow - receiver/otlpjsonfile - receiver/podman - receiver/postgresql @@ -264,7 +274,6 @@ body: - receiver/zipkin - receiver/zookeeper - testbed - - testbed/mockdatareceivers/mockawsxrayreceiver - testbed/mockdatasenders/mockdatadogagentexporter # End Collector components list - type: textarea diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 8b660b3286ad..b924bc13f16c 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -14,15 +14,17 @@ body: # Start Collector components list - cmd/configschema - cmd/githubgen - - cmd/mdatagen - cmd/opampsupervisor - cmd/otelcontribcol - cmd/oteltestbedcol - cmd/telemetrygen - confmap/provider/s3provider + - confmap/provider/secretsmanagerprovider - connector/count - connector/datadog - connector/exceptions + - connector/failover + - connector/grafanacloud - connector/routing - connector/servicegraph - connector/spanmetrics @@ -44,7 +46,6 @@ body: - exporter/dataset - exporter/dynatrace - exporter/elasticsearch - - exporter/f5cloud - exporter/file - exporter/googlecloud - exporter/googlecloudpubsub @@ -61,9 +62,11 @@ body: - exporter/mezmo - exporter/opencensus - exporter/opensearch + - exporter/otelarrow - exporter/prometheus - exporter/prometheusremotewrite - exporter/pulsar + - exporter/rabbitmq - exporter/sapm - exporter/sentry - exporter/signalfx @@ -71,25 +74,26 @@ body: - exporter/splunkhec - exporter/sumologic - exporter/syslog - - exporter/tanzuobservability - exporter/tencentcloudlogservice - exporter/zipkin + - extension/ack - extension/asapauth - extension/awsmiddleware - extension/awsproxy - extension/basicauth - extension/bearertokenauth - extension/encoding + - extension/encoding/avrologencoding - extension/encoding/jaegerencoding - extension/encoding/jsonlogencoding - extension/encoding/otlpencoding - extension/encoding/textencoding - extension/encoding/zipkinencoding + - extension/googleclientauth - extension/headerssetter - extension/healthcheck - extension/httpforwarder - extension/jaegerremotesampling - - extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated - extension/oauth2clientauth - extension/observer - extension/observer/dockerobserver @@ -102,14 +106,17 @@ body: - extension/pprof - extension/remotetap - extension/sigv4auth + - extension/solarwindsapmsettings - extension/storage - extension/storage/dbstorage - extension/storage/filestorage + - extension/sumologic - internal/aws - internal/collectd - internal/core - internal/datadog - internal/docker + - internal/exp/metrics - internal/filter - internal/k8sconfig - internal/k8stest @@ -118,6 +125,7 @@ body: - internal/metadataproviders - internal/sharedcomponent - internal/splunk + - internal/sqlquery - internal/tools - override/aws - pkg/batchperresourceattr @@ -128,6 +136,7 @@ body: - pkg/pdatatest - pkg/pdatautil - pkg/resourcetotelemetry + - pkg/sampling - pkg/stanza - pkg/translator/azure - pkg/translator/jaeger @@ -141,11 +150,12 @@ body: - pkg/winperfcounters - processor/attributes - processor/cumulativetodelta - - processor/datadog + - processor/deltatocumulative - processor/deltatorate - processor/filter - processor/groupbyattrs - processor/groupbytrace + - processor/interval - processor/k8sattributes - processor/logstransform - processor/metricsgeneration @@ -160,9 +170,7 @@ body: - processor/resourcedetection/internal/openshift - processor/routing - processor/schema - - processor/servicegraph - processor/span - - processor/spanmetrics - processor/sumologic - processor/tailsampling - processor/transform @@ -175,6 +183,7 @@ body: - receiver/awscontainerinsight - receiver/awsecscontainermetrics - receiver/awsfirehose + - receiver/awss3 - receiver/awsxray - receiver/azureblob - receiver/azureeventhub @@ -190,7 +199,6 @@ body: - receiver/dockerstats - receiver/elasticsearch - receiver/expvar - - receiver/file - receiver/filelog - receiver/filestats - receiver/flinkmetrics @@ -204,7 +212,6 @@ body: - receiver/iis - receiver/influxdb - receiver/jaeger - - receiver/jaeger/internal/jaegerreceiverdeprecated - receiver/jmx - receiver/journald - receiver/k8scluster @@ -218,10 +225,13 @@ body: - receiver/mongodb - receiver/mongodbatlas - receiver/mysql + - receiver/namedpipe - receiver/nginx - receiver/nsxt - receiver/opencensus - receiver/oracledb + - receiver/osquery + - receiver/otelarrow - receiver/otlpjsonfile - receiver/podman - receiver/postgresql @@ -258,7 +268,6 @@ body: - receiver/zipkin - receiver/zookeeper - testbed - - testbed/mockdatareceivers/mockawsxrayreceiver - testbed/mockdatasenders/mockdatadogagentexporter # End Collector components list - type: textarea diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml index 69182da36092..53b76dd2b6ff 100644 --- a/.github/ISSUE_TEMPLATE/other.yaml +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -14,15 +14,17 @@ body: # Start Collector components list - cmd/configschema - cmd/githubgen - - cmd/mdatagen - cmd/opampsupervisor - cmd/otelcontribcol - cmd/oteltestbedcol - cmd/telemetrygen - confmap/provider/s3provider + - confmap/provider/secretsmanagerprovider - connector/count - connector/datadog - connector/exceptions + - connector/failover + - connector/grafanacloud - connector/routing - connector/servicegraph - connector/spanmetrics @@ -44,7 +46,6 @@ body: - exporter/dataset - exporter/dynatrace - exporter/elasticsearch - - exporter/f5cloud - exporter/file - exporter/googlecloud - exporter/googlecloudpubsub @@ -61,9 +62,11 @@ body: - exporter/mezmo - exporter/opencensus - exporter/opensearch + - exporter/otelarrow - exporter/prometheus - exporter/prometheusremotewrite - exporter/pulsar + - exporter/rabbitmq - exporter/sapm - exporter/sentry - exporter/signalfx @@ -71,25 +74,26 @@ body: - exporter/splunkhec - exporter/sumologic - exporter/syslog - - exporter/tanzuobservability - exporter/tencentcloudlogservice - exporter/zipkin + - extension/ack - extension/asapauth - extension/awsmiddleware - extension/awsproxy - extension/basicauth - extension/bearertokenauth - extension/encoding + - extension/encoding/avrologencoding - extension/encoding/jaegerencoding - extension/encoding/jsonlogencoding - extension/encoding/otlpencoding - extension/encoding/textencoding - extension/encoding/zipkinencoding + - extension/googleclientauth - extension/headerssetter - extension/healthcheck - extension/httpforwarder - extension/jaegerremotesampling - - extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated - extension/oauth2clientauth - extension/observer - extension/observer/dockerobserver @@ -102,14 +106,17 @@ body: - extension/pprof - extension/remotetap - extension/sigv4auth + - extension/solarwindsapmsettings - extension/storage - extension/storage/dbstorage - extension/storage/filestorage + - extension/sumologic - internal/aws - internal/collectd - internal/core - internal/datadog - internal/docker + - internal/exp/metrics - internal/filter - internal/k8sconfig - internal/k8stest @@ -118,6 +125,7 @@ body: - internal/metadataproviders - internal/sharedcomponent - internal/splunk + - internal/sqlquery - internal/tools - override/aws - pkg/batchperresourceattr @@ -128,6 +136,7 @@ body: - pkg/pdatatest - pkg/pdatautil - pkg/resourcetotelemetry + - pkg/sampling - pkg/stanza - pkg/translator/azure - pkg/translator/jaeger @@ -141,11 +150,12 @@ body: - pkg/winperfcounters - processor/attributes - processor/cumulativetodelta - - processor/datadog + - processor/deltatocumulative - processor/deltatorate - processor/filter - processor/groupbyattrs - processor/groupbytrace + - processor/interval - processor/k8sattributes - processor/logstransform - processor/metricsgeneration @@ -160,9 +170,7 @@ body: - processor/resourcedetection/internal/openshift - processor/routing - processor/schema - - processor/servicegraph - processor/span - - processor/spanmetrics - processor/sumologic - processor/tailsampling - processor/transform @@ -175,6 +183,7 @@ body: - receiver/awscontainerinsight - receiver/awsecscontainermetrics - receiver/awsfirehose + - receiver/awss3 - receiver/awsxray - receiver/azureblob - receiver/azureeventhub @@ -190,7 +199,6 @@ body: - receiver/dockerstats - receiver/elasticsearch - receiver/expvar - - receiver/file - receiver/filelog - receiver/filestats - receiver/flinkmetrics @@ -204,7 +212,6 @@ body: - receiver/iis - receiver/influxdb - receiver/jaeger - - receiver/jaeger/internal/jaegerreceiverdeprecated - receiver/jmx - receiver/journald - receiver/k8scluster @@ -218,10 +225,13 @@ body: - receiver/mongodb - receiver/mongodbatlas - receiver/mysql + - receiver/namedpipe - receiver/nginx - receiver/nsxt - receiver/opencensus - receiver/oracledb + - receiver/osquery + - receiver/otelarrow - receiver/otlpjsonfile - receiver/podman - receiver/postgresql @@ -258,7 +268,6 @@ body: - receiver/zipkin - receiver/zookeeper - testbed - - testbed/mockdatareceivers/mockawsxrayreceiver - testbed/mockdatasenders/mockdatadogagentexporter # End Collector components list - type: textarea diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml index 39f640e8cf44..f9bf21b7ef18 100644 --- a/.github/auto_assign.yml +++ b/.github/auto_assign.yml @@ -12,12 +12,14 @@ assigneeGroups: approvers_maintainers: # Approvers - Aneurysm9 - - astencel-sumo - atoulme + - bryan-aguilar + - crobert-1 - dashpole - songy23 - fatsheep9146 # Maintainers + - astencel-sumo - bogdandrutu - codeboten - djaglowski diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index ef952e78e8be..000000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,1104 +0,0 @@ -# File generated by "make gendependabot"; DO NOT EDIT. - -version: 2 -updates: - - package-ecosystem: "gomod" - directory: "/" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/confmap/provider/s3provider" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/connector/countconnector" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/connector/datadogconnector" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/connector/exceptionsconnector" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/connector/routingconnector" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/connector/servicegraphconnector" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/connector/spanmetricsconnector" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/alertmanagerexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/alibabacloudlogserviceexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/awscloudwatchlogsexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/awsemfexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/awskinesisexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/awss3exporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/awsxrayexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/azuredataexplorerexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/azuremonitorexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/carbonexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/cassandraexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/clickhouseexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/coralogixexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/datadogexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/datasetexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/dynatraceexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/elasticsearchexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/f5cloudexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/fileexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/googlecloudexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/googlecloudpubsubexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/googlemanagedprometheusexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/influxdbexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/instanaexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/kafkaexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/kineticaexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/loadbalancingexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/logicmonitorexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/logzioexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/lokiexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/mezmoexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/opencensusexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/opensearchexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/prometheusexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/prometheusremotewriteexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/pulsarexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/sapmexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/sentryexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/signalfxexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/skywalkingexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/splunkhecexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/sumologicexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/tanzuobservabilityexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/tencentcloudlogserviceexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/zipkinexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/asapauthextension" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/awsproxy" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/basicauthextension" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/bearertokenauthextension" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/encoding" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/headerssetterextension" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/healthcheckextension" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/httpforwarder" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/jaegerremotesampling" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/oauth2clientauthextension" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/observer" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/observer/dockerobserver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/observer/ecsobserver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/observer/ecstaskobserver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/observer/hostobserver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/observer/k8sobserver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/oidcauthextension" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/pprofextension" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/sigv4authextension" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/storage" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/internal/collectd" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/internal/coreinternal" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/internal/datadog" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/internal/docker" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/internal/filter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/internal/k8sconfig" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/internal/k8stest" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/internal/kafka" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/internal/kubelet" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/internal/metadataproviders" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/internal/sharedcomponent" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/internal/splunk" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/internal/tools" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/batchperresourceattr" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/batchpersignal" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/experimentalmetricmetadata" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/golden" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/ottl" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/pdatatest" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/pdatautil" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/resourcetotelemetry" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/stanza" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/translator/azure" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/translator/jaeger" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/translator/loki" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/translator/opencensus" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/translator/prometheus" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/translator/prometheusremotewrite" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/translator/signalfx" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/translator/skywalking" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/translator/zipkin" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pkg/winperfcounters" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/attributesprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/cumulativetodeltaprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/datadogprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/deltatorateprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/filterprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/groupbyattrsprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/groupbytraceprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/k8sattributesprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/logstransformprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/metricsgenerationprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/metricstransformprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/probabilisticsamplerprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/redactionprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/remotetapprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/resourcedetectionprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/resourceprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/routingprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/schemaprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/servicegraphprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/spanmetricsprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/spanprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/sumologicprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/tailsamplingprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/transformprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/activedirectorydsreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/aerospikereceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/apachereceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/apachesparkreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/awscloudwatchmetricsreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/awscloudwatchreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/awscontainerinsightreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/awsecscontainermetricsreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/awsfirehosereceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/awsxrayreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/azureblobreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/azureeventhubreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/azuremonitorreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/bigipreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/carbonreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/chronyreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/cloudflarereceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/cloudfoundryreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/collectdreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/couchdbreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/datadogreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/dockerstatsreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/elasticsearchreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/expvarreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/filelogreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/filereceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/filestatsreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/flinkmetricsreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/fluentforwardreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/gitproviderreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/googlecloudpubsubreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/googlecloudspannerreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/haproxyreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/hostmetricsreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/httpcheckreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/iisreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/influxdbreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/jaegerreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/jmxreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/journaldreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/k8sclusterreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/k8seventsreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/k8sobjectsreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/kafkametricsreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/kafkareceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/kubeletstatsreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/lokireceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/memcachedreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/mongodbatlasreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/mongodbreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/mysqlreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/nginxreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/nsxtreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/opencensusreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/oracledbreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/otlpjsonfilereceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/podmanreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/postgresqlreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/prometheusreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/pulsarreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/purefareceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/purefbreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/rabbitmqreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/receivercreator" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/redisreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/riakreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/saphanareceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/sapmreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/signalfxreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/simpleprometheusreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/skywalkingreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/snmpreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/snowflakereceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/solacereceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/splunkhecreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/sqlqueryreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/sqlserverreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/sshcheckreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/statsdreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/syslogreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/tcplogreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/udplogreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/vcenterreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/wavefrontreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/windowseventlogreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/windowsperfcountersreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/zipkinreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/zookeeperreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/testbed" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/testbed/mockdatareceivers/mockawsxrayreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/testbed/mockdatasenders/mockdatadogagentexporter" - schedule: - interval: "weekly" - day: "wednesday" diff --git a/.github/workflows/auto-assign-owners.yml b/.github/workflows/auto-assign-owners.yml new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/.github/workflows/build-and-test-windows.yml b/.github/workflows/build-and-test-windows.yml index 2f7548ae0b6a..c049aa5159ab 100644 --- a/.github/workflows/build-and-test-windows.yml +++ b/.github/workflows/build-and-test-windows.yml @@ -6,6 +6,7 @@ on: - 'releases/**' tags: - 'v[0-9]+.[0-9]+.[0-9]+*' + merge_group: pull_request: types: [opened, synchronize, reopened, labeled, unlabeled] branches: @@ -36,29 +37,37 @@ jobs: - cmd - other runs-on: windows-latest - if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push') }} + if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push' || github.event_name == 'merge_group') }} + env: + # Limit memory usage via GC environment variables to avoid OOM on GH runners, especially for `cmd/otelcontribcol`, + # see https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/28682#issuecomment-1802296776 + GOGC: 50 + GOMEMLIMIT: 2GiB steps: - uses: actions/checkout@v4 - if: matrix.group == 'receiver-0' name: install IIS run: Install-WindowsFeature -name Web-Server -IncludeManagementTools - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-mod-cache timeout-minutes: 25 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~\go\pkg\mod ~\AppData\Local\go-build key: go-build-cache-${{ runner.os }}-${{ matrix.group }}-go-${{ hashFiles('**/go.sum') }} + - if: matrix.group == 'cmd' + name: Increasing GOTEST_TIMEOUT for group 'cmd' + run: echo "GOTEST_TIMEOUT=1200s" >> $Env:GITHUB_ENV - name: Run Unit tests run: make -j2 gotest GROUP=${{ matrix.group }} windows-unittest: - if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push') }} + if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push' || github.event_name == 'merge_group') }} runs-on: windows-latest needs: [windows-unittest-matrix] steps: diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 9c5b8164aa4f..5c94be8d7d5f 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1,9 +1,11 @@ name: build-and-test on: + workflow_dispatch: push: branches: [ main ] tags: - 'v[0-9]+.[0-9]+.[0-9]+*' + merge_group: pull_request: env: TEST_RESULTS: testbed/tests/results/junit/results.xml @@ -23,14 +25,14 @@ jobs: if: ${{ github.actor != 'dependabot[bot]' }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin @@ -62,30 +64,38 @@ jobs: run: ./.github/workflows/scripts/check-codeowners.sh check_entries_in_allowlist lint-matrix: strategy: + fail-fast: false matrix: + test: + - windows + - linux group: - receiver-0 - receiver-1 + - receiver-2 + - receiver-3 - processor - - exporter + - exporter-0 + - exporter-1 - extension - connector - internal - pkg - - cmd + - cmd-0 + - cmd-1 - other runs-on: ubuntu-latest needs: [setup-environment] steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: "~1.20.6" + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin @@ -98,12 +108,12 @@ jobs: if: steps.go-cache.outputs.cache-hit != 'true' run: make install-tools - name: Cache Lint Build - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/go-build key: go-lint-build-${{ matrix.group }}-${{ runner.os }}-${{ hashFiles('**/go.sum') }} - name: Lint - run: make -j2 golint GROUP=${{ matrix.group }} + run: GOOS=${{ matrix.os }} GOARCH=amd64 make -j2 golint GROUP=${{ matrix.group }} lint: if: ${{ github.actor != 'dependabot[bot]' && always() }} runs-on: ubuntu-latest @@ -127,26 +137,31 @@ jobs: group: - receiver-0 - receiver-1 + - receiver-2 + - receiver-3 - processor - - exporter + - exporter-0 + - exporter-1 - extension - connector - internal - pkg + - cmd-0 + - cmd-1 runs-on: ubuntu-latest timeout-minutes: 30 steps: - name: Checkout Repo uses: actions/checkout@v4 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin @@ -162,14 +177,14 @@ jobs: needs: [setup-environment] steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin @@ -207,14 +222,19 @@ jobs: run: | make genoteltestbedcol git diff -s --exit-code || (echo 'Generated code is out of date, please run "make genoteltestbedcol" and commit the changes in this PR.' && exit 1) + - name: Gen distributions + run: | + make gendistributions + git diff -s --exit-code || (echo 'Generated code is out of date, please run "make gendistributions" and commit the changes in this PR.' && exit 1) + - name: Gen CODEOWNERS + if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.repository == 'open-telemetry/opentelemetry-collector-contrib' + run: | + GITHUB_TOKEN=${{ secrets.READ_ORG_AND_USER_TOKEN }} make gengithub + git diff -s --exit-code || (echo 'Generated code is out of date, please apply this diff and commit the changes in this PR.' && git diff && exit 1) - name: CodeGen run: | make -j2 generate git diff --exit-code ':!*go.sum' || (echo 'Generated code is out of date, please run "make generate" and commit the changes in this PR.' && exit 1) - - name: Check gendependabot - run: | - make -j2 gendependabot - git diff --exit-code ':!*go.sum' || (echo 'dependabot.yml is out of date, please run "make gendependabot" and commit the changes in this PR.' && exit 1) - name: MultimodVerify run: make multimod-verify - name: Components dropdown in issue templates @@ -223,36 +243,49 @@ jobs: git diff --exit-code '.github/ISSUE_TEMPLATE' || (echo 'Dropdowns in issue templates are out of date, please run "make generate-gh-issue-templates" and commit the changes in this PR.' && exit 1) unittest-matrix: strategy: + fail-fast: false matrix: - go-version: ["~1.21.4", "~1.20.11"] # 1.20 is interpreted as 1.2 without quotes + go-version: ["1.22.2"] # 1.20 is interpreted as 1.2 without quotes + runner: [ubuntu-latest] group: - receiver-0 - receiver-1 + - receiver-2 + - receiver-3 - processor - - exporter + - exporter-0 + - exporter-1 - extension - connector - internal - pkg - - cmd + - cmd-0 + - cmd-1 - other - runs-on: ubuntu-latest + runs-on: ${{ matrix.runner }} needs: [setup-environment] steps: + - name: Set up arkade + uses: alexellis/setup-arkade@v3 + - name: Install vmmeter + run: | + sudo -E arkade oci install ghcr.io/openfaasltd/vmmeter:latest --path /usr/local/bin/ + - name: Run vmmeter + uses: self-actuated/vmmeter-action@v1 - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin ~/go/pkg/mod - key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} + key: go-cache-${{ runner.os }}-${{ matrix.runner }}-${{ hashFiles('**/go.sum') }} - name: Install dependencies if: steps.go-cache.outputs.cache-hit != 'true' run: make -j2 gomoddownload @@ -260,20 +293,20 @@ jobs: if: steps.go-cache.outputs.cache-hit != 'true' run: make install-tools - name: Cache Test Build - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/go-build - key: go-test-build-${{ runner.os }}-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + key: go-test-build-${{ runner.os }}-${{ matrix.go-version }}-${{ matrix.runner }}-${{ hashFiles('**/go.sum') }} - name: Run Unit Tests - if: startsWith( matrix.go-version, '1.19' ) + if: startsWith( matrix.go-version, '1.21' ) != true run: make gotest GROUP=${{ matrix.group }} - name: Run Unit Tests With Coverage - if: startsWith( matrix.go-version, '~1.20' ) # only run coverage on one version + if: startsWith( matrix.go-version, '1.21' ) # only run coverage on one version run: make gotest-with-cover GROUP=${{ matrix.group }} - - uses: actions/upload-artifact@v3 - if: startsWith( matrix.go-version, '~1.20' ) # only run coverage on one version + - uses: actions/upload-artifact@v4 + if: startsWith( matrix.go-version, '1.21' ) # only upload artifact for one version with: - name: coverage-artifacts + name: coverage-artifacts-${{ matrix.go-version }}-${{ matrix.runner }}-${{ matrix.group }} path: ${{ matrix.group }}-coverage.txt unittest: if: ${{ github.actor != 'dependabot[bot]' && always() }} @@ -296,53 +329,89 @@ jobs: needs: [unittest] steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: coverage-artifacts + merge-multiple: true + pattern: coverage-artifacts-* - name: Upload coverage report - uses: Wandalen/wretry.action@v1.3.0 + uses: Wandalen/wretry.action@v3.2.0 with: - action: codecov/codecov-action@v3 + action: codecov/codecov-action@v4 with: | fail_ci_if_error: true verbose: true + token: ${{ secrets.CODECOV_TOKEN }} attempt_limit: 10 attempt_delay: 15000 - integration-tests: + integration-tests-matrix: + strategy: + fail-fast: false + matrix: + group: + - receiver-0 + - receiver-1 + - receiver-2 + - receiver-3 + - processor + - exporter-0 + - exporter-1 + - extension + - connector + - internal + - pkg + - cmd-0 + - cmd-1 runs-on: ubuntu-latest needs: [setup-environment] steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin ~/go/pkg/mod key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} - name: Run Integration Tests - run: make integration-test + run: make gointegration-test GROUP=${{ matrix.group }} + + integration-tests: + if: ${{ github.actor != 'dependabot[bot]' && always() }} + runs-on: ubuntu-latest + needs: [ setup-environment, integration-tests-matrix ] + steps: + - name: Print result + run: echo ${{ needs.integration-tests-matrix.result }} + - name: Interpret result + run: | + if [[ success == ${{ needs.integration-tests-matrix.result }} ]] + then + echo "All matrix jobs passed!" + else + echo "One or more matrix jobs failed." + false + fi correctness-traces: runs-on: ubuntu-latest needs: [setup-environment] steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin @@ -361,14 +430,14 @@ jobs: needs: [setup-environment] steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin @@ -393,7 +462,7 @@ jobs: cross-compile: runs-on: ubuntu-latest - needs: [unittest, integration-tests, lint] + needs: [setup-environment] strategy: matrix: os: @@ -430,14 +499,14 @@ jobs: arch: s390x steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin @@ -452,14 +521,13 @@ jobs: - name: Build Collector ${{ matrix.binary }} run: make GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} GOARM=${{ matrix.arm }} otelcontribcol - name: Upload Collector Binaries - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: collector-binaries + name: collector-binaries-${{ matrix.os }}-${{ matrix.arch }} path: ./bin/* build-package: - # Use 20.04.5 until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16450 is resolved - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest needs: [cross-compile] strategy: fail-fast: false @@ -472,14 +540,15 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '2.6' + ruby-version: '3.3' - name: Install fpm - run: gem install --no-document fpm -v 1.11.0 + run: gem install --no-document fpm -v 1.15.1 - name: Download Collector Binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: collector-binaries + merge-multiple: true path: bin/ + pattern: collector-binaries-* - run: chmod +x bin/* - name: Set Release Tag id: github_tag @@ -500,9 +569,9 @@ jobs: ./internal/buildscripts/packaging/fpm/test.sh dist/otel-contrib-collector*x86_64.rpm examples/demo/otel-collector-config.yaml fi - name: Upload Packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: collector-packages + name: collector-packages-${{ matrix.package_type }} path: ./dist/* windows-msi: if: false # skip. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/10113 @@ -513,13 +582,14 @@ jobs: with: fetch-depth: 0 - name: Download Binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: collector-binaries + merge-multiple: true path: ./bin/ + pattern: collector-binaries-* - name: Cache Wix id: wix-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | "C:\Program Files (x86)\WiX Toolset v3.11" @@ -535,26 +605,28 @@ jobs: - name: Validate MSI run: .\internal\buildscripts\packaging\msi\make.ps1 Confirm-MSI - name: Upload MSI - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: collector-packages + name: collector-packages-msi path: ./dist/*.msi publish-check: runs-on: ubuntu-latest - needs: [build-package] + needs: [lint, unittest, integration-tests, build-package] steps: - uses: actions/checkout@v4 - name: Download Binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: collector-binaries + merge-multiple: true path: ./bin/ + pattern: collector-binaries-* - name: Download Packages - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: collector-packages + merge-multiple: true path: ./dist/ + pattern: collector-packages-* - name: Verify Distribution Files Exist id: check run: ./.github/workflows/scripts/verify-dist-files-exist.sh @@ -564,9 +636,9 @@ jobs: if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.repository == 'open-telemetry/opentelemetry-collector-contrib' steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Mkdir bin and dist run: | @@ -574,7 +646,7 @@ jobs: - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin @@ -587,16 +659,18 @@ jobs: if: steps.go-cache.outputs.cache-hit != 'true' run: make install-tools - name: Download Binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: collector-binaries + merge-multiple: true path: ./bin/ + pattern: collector-binaries-* - run: chmod +x bin/* - name: Download Packages - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: collector-packages + merge-multiple: true path: ./dist/ + pattern: collector-packages-* - name: Add Permissions to Tool Binaries run: chmod -R +x ./dist - name: Verify Distribution Files Exist diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 158b5f80d171..c8d8b08c296a 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -31,14 +31,14 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin diff --git a/.github/workflows/close-stale.yaml b/.github/workflows/close-stale.yaml index bc1df5ddc486..b78d73c099de 100644 --- a/.github/workflows/close-stale.yaml +++ b/.github/workflows/close-stale.yaml @@ -12,7 +12,7 @@ jobs: steps: - name: Check rate_limit before run: gh api /rate_limit - - uses: actions/stale@v8 + - uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-pr-message: 'This PR was marked stale due to lack of activity. It will be closed in 14 days.' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 73a1f2e38589..23d0869c5af1 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -7,6 +7,7 @@ on: jobs: CodeQL-Build: runs-on: macos-latest + if: ${{ github.actor != 'dependabot[bot]' }} env: # Force CodeQL to run the extraction on the files compiled by our custom # build command, as opposed to letting the autobuilder figure it out. @@ -15,14 +16,14 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: go @@ -31,6 +32,6 @@ jobs: make otelcontribcol - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 timeout-minutes: 60 diff --git a/.github/workflows/create-dependabot-pr.yml b/.github/workflows/create-dependabot-pr.yml deleted file mode 100644 index 8654e6fecc09..000000000000 --- a/.github/workflows/create-dependabot-pr.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Automation - Dependabot PR - -on: - workflow_dispatch: - -jobs: - create-pr: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install zsh - run: sudo apt-get update; sudo apt-get install zsh - - uses: actions/setup-go@v4 - with: - go-version: ~1.20.11 - cache: false - - name: Run dependabot-pr.sh - run: ./.github/workflows/scripts/dependabot-pr.sh - env: - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index f560983c592a..6126c9d2a445 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -7,24 +7,88 @@ on: tags: - 'v[0-9]+.[0-9]+.[0-9]+*' pull_request: + merge_group: + env: # Make sure to exit early if cache segment download times out after 2 minutes. # We limit cache download as a whole to 5 minutes. SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 jobs: + collector-build: + runs-on: ubuntu-latest + if: ${{ github.actor != 'dependabot[bot]' }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.21.9" + cache: false + - name: Cache Go + id: go-cache + timeout-minutes: 5 + uses: actions/cache@v4 + with: + path: | + ~/go/bin + ~/go/pkg/mod + key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} + - name: Install dependencies + if: steps.go-cache.outputs.cache-hit != 'true' + run: make -j2 gomoddownload + - name: Build Collector + run: make otelcontribcol + - name: Upload Collector Binary + uses: actions/upload-artifact@v4 + with: + name: collector-binary + path: ./bin/* + + supervisor-test: + runs-on: ubuntu-latest + needs: collector-build + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.21.9" + cache: false + - name: Cache Go + id: go-cache + timeout-minutes: 5 + uses: actions/cache@v4 + with: + path: | + ~/go/bin + ~/go/pkg/mod + key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} + - name: Install dependencies + if: steps.go-cache.outputs.cache-hit != 'true' + run: make -j2 gomoddownload + - name: Download Collector Binary + uses: actions/download-artifact@v4 + with: + name: collector-binary + path: bin/ + - run: chmod +x bin/* + - name: Run opampsupervisor e2e tests + run: | + cd cmd/opampsupervisor + go test -v --tags=e2e + docker-build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin @@ -40,38 +104,48 @@ jobs: run: | docker save otelcontribcol:latest > /tmp/otelcontribcol.tar - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: otelcontribcol path: /tmp/otelcontribcol.tar - kubernetes-test: + + kubernetes-test-matrix: env: KUBECONFIG: /tmp/kube-config-otelcol-e2e-testing strategy: matrix: - k8s-version: ["v1.26.0", "v1.25.3", "v1.24.7", "v1.23.13"] + k8s-version: + - "v1.26.0" + - "v1.25.3" + - "v1.24.7" + - "v1.23.13" + component: + - receiver/k8sclusterreceiver + - processor/k8sattributesprocessor + - receiver/kubeletstatsreceiver + - receiver/k8sobjectsreceiver runs-on: ubuntu-latest needs: docker-build steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin ~/go/pkg/mod - key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} + key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} - name: Install dependencies if: steps.go-cache.outputs.cache-hit != 'true' run: make -j2 gomoddownload - name: Create kind cluster - uses: helm/kind-action@v1.8.0 + uses: helm/kind-action@v1.9.0 with: node_image: kindest/node:${{ matrix.k8s-version }} kubectl_version: ${{ matrix.k8s-version }} @@ -81,7 +155,7 @@ jobs: run: | kubectl get csr -o=jsonpath='{range.items[?(@.spec.signerName=="kubernetes.io/kubelet-serving")]}{.metadata.name}{" "}{end}' | xargs kubectl certificate approve - name: Download artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: otelcontribcol path: /tmp @@ -91,19 +165,25 @@ jobs: - name: Kind load image run: | kind load docker-image otelcontribcol:latest --name kind - - name: run k8sclusterreceiver e2e tests - run: | - cd receiver/k8sclusterreceiver - go test -v --tags=e2e - - name: run k8sattributesprocessor e2e tests - run: | - cd processor/k8sattributesprocessor - go test -v --tags=e2e - - name: run receiver/kubeletstatsreceiver e2e tests + - name: Run e2e tests run: | - cd receiver/kubeletstatsreceiver + cd ${{ matrix.component }} go test -v --tags=e2e - - name: run receiver/k8sobjectsreceiver e2e tests + + kubernetes-test: + if: ${{ github.actor != 'dependabot[bot]' && always() }} + runs-on: ubuntu-latest + needs: [ kubernetes-test-matrix ] + steps: + - name: Print result + run: echo ${{ needs.kubernetes-test-matrix.result }} + - name: Interpret result run: | - cd receiver/k8sobjectsreceiver - go test -v --tags=e2e + if [[ success == ${{ needs.kubernetes-test-matrix.result }} ]] + then + echo "All matrix jobs passed!" + else + echo "One or more matrix jobs failed." + false + fi + diff --git a/.github/workflows/generate-weekly-report.yml b/.github/workflows/generate-weekly-report.yml index 41048d45e9e7..d58b25c651eb 100644 --- a/.github/workflows/generate-weekly-report.yml +++ b/.github/workflows/generate-weekly-report.yml @@ -11,6 +11,7 @@ on: jobs: get_issues: runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'open-telemetry' }} steps: - uses: actions/checkout@v4 - run: npm install js-yaml diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index c9f3fbdf7dee..78d17231b906 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -24,14 +24,14 @@ jobs: loadtest_matrix: ${{ steps.splitloadtest.outputs.loadtest_matrix }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin @@ -45,10 +45,10 @@ jobs: if: steps.go-cache.outputs.cache-hit != 'true' run: make install-tools - run: make oteltestbedcol - - name: Upload Collector Binaries - uses: actions/upload-artifact@v3 + - name: Upload Testbed Binaries + uses: actions/upload-artifact@v4 with: - name: collector-binaries + name: testbed-binaries path: ./bin/* - name: Split Loadtest Jobs id: splitloadtest @@ -62,14 +62,14 @@ jobs: matrix: ${{ fromJson(needs.setup-environment.outputs.loadtest_matrix) }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin @@ -83,10 +83,10 @@ jobs: if: steps.go-cache.outputs.cache-hit != 'true' run: make install-tools - run: mkdir -p results && touch results/TESTRESULTS.md - - name: Download Collector Binaries - uses: actions/download-artifact@v3 + - name: Download Testbed Binaries + uses: actions/download-artifact@v4 with: - name: collector-binaries + name: testbed-binaries path: bin/ - run: chmod +x bin/* - name: Loadtest @@ -103,19 +103,19 @@ jobs: - name: Upload Test Results if: ${{ failure() || success() }} continue-on-error: true - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: ./*.tar - run: cp testbed/tests/results/benchmarks.json testbed/tests/results/${{steps.filename.outputs.name}}.json - name: Upload benchmarks.json - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: benchmark-results path: testbed/tests/results/${{steps.filename.outputs.name}}.json - name: GitHub Issue Generator if: ${{ failure() && github.ref == 'refs/heads/main' }} - run: issuegenerator $TEST_RESULTS + run: ./.tools/issuegenerator $TEST_RESULTS update-benchmarks: runs-on: ubuntu-latest @@ -123,7 +123,7 @@ jobs: if: github.event_name != 'pull_request' steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: benchmark-results path: results diff --git a/.github/workflows/ping-codeowners-issues.yml b/.github/workflows/ping-codeowners-issues.yml index 6f4162b5a296..9a58d23f1f69 100644 --- a/.github/workflows/ping-codeowners-issues.yml +++ b/.github/workflows/ping-codeowners-issues.yml @@ -16,4 +16,3 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ISSUE: ${{ github.event.issue.number }} COMPONENT: ${{ github.event.label.name }} - SENDER: ${{ github.event.sender.login }} diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 6fcfd25eb8d3..52a23fe9f41c 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -24,9 +24,9 @@ jobs: - uses: actions/checkout@v4 with: path: opentelemetry-collector-contrib - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Prepare release for contrib working-directory: opentelemetry-collector-contrib diff --git a/.github/workflows/prometheus-compliance-tests.yml b/.github/workflows/prometheus-compliance-tests.yml index f0bdfabe3feb..b8caf05bb450 100644 --- a/.github/workflows/prometheus-compliance-tests.yml +++ b/.github/workflows/prometheus-compliance-tests.yml @@ -5,6 +5,7 @@ on: tags: - 'v[0-9]+.[0-9]+.[0-9]+*' pull_request: + merge_group: # Do not cancel this workflow on main. See https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/16616 concurrency: @@ -24,14 +25,14 @@ jobs: - uses: actions/checkout@v4 with: path: opentelemetry-collector-contrib - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin diff --git a/.github/workflows/scripts/add-component-options.sh b/.github/workflows/scripts/add-component-options.sh deleted file mode 100755 index 372d72024c5f..000000000000 --- a/.github/workflows/scripts/add-component-options.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env sh -# -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 -# -# Takes the list of components from the CODEOWNERS file and inserts them -# as a YAML list in a GitHub issue template, then prints out the resulting -# contents. -# -# Note that this is script is intended to be POSIX-compliant since it is -# intended to also be called from the Makefile on developer machines, -# which aren't guaranteed to have Bash or a GNU userland installed. - -if [ -z "${FILE}" ]; then - echo 'FILE is empty, please ensure it is set.' - exit 1 -fi - -CUR_DIRECTORY=$(dirname "$0") - -# Get the line number for text within a file -get_line_number() { - text=$1 - file=$2 - - grep -n "${text}" "${file}" | awk '{ print $1 }' | grep -oE '[0-9]+' -} - -LABELS="" - -START_LINE=$(get_line_number '# Start Collector components list' "${FILE}") -END_LINE=$(get_line_number '# End Collector components list' "${FILE}") -TOTAL_LINES=$(wc -l "${FILE}" | awk '{ print $1 }') - -head -n "${START_LINE}" "${FILE}" -for COMPONENT in $(sh "${CUR_DIRECTORY}/get-components.sh"); do - TYPE=$(echo "${COMPONENT}" | cut -f1 -d'/') - REST=$(echo "${COMPONENT}" | cut -f2- -d'/' | sed "s%${TYPE}/%/%" | sed "s%${TYPE}\$%%") - LABEL="" - - if [ -z "${TYPE}" ] | [ -z "${REST}" ]; then - LABEL="${COMPONENT}" - else - LABEL="${TYPE}/${REST}" - fi - - LABELS="${LABELS}${LABEL}\n" -done -printf "${LABELS}" | sort | awk '{ printf " - %s\n",$1 }' -tail -n $((TOTAL_LINES-END_LINE+1)) "${FILE}" - diff --git a/.github/workflows/scripts/check-codeowners.sh b/.github/workflows/scripts/check-codeowners.sh index ffd55d87ef9e..1aee6d5ecc7e 100755 --- a/.github/workflows/scripts/check-codeowners.sh +++ b/.github/workflows/scripts/check-codeowners.sh @@ -63,7 +63,7 @@ check_component_existence() { do if [[ $line =~ ^[^#\*] ]]; then COMPONENT_PATH=$(echo "$line" | cut -d" " -f1) - if [ ! -d "$COMPONENT_PATH" ]; then + if [ ! -e "$COMPONENT_PATH" ]; then echo "\"$COMPONENT_PATH\" does not exist as specified in CODEOWNERS" ((NOT_EXIST_COMPONENTS=NOT_EXIST_COMPONENTS+1)) fi diff --git a/.github/workflows/scripts/check-collector-module-version.sh b/.github/workflows/scripts/check-collector-module-version.sh index c5e37572f687..2237f016c230 100755 --- a/.github/workflows/scripts/check-collector-module-version.sh +++ b/.github/workflows/scripts/check-collector-module-version.sh @@ -57,20 +57,12 @@ for mod in ${beta_modules[@]}; do check_collector_versions_correct "$mod" "$BETA_MOD_VERSION" done -# Check RC modules -RC_MODULE="go.opentelemetry.io/collector/pdata" -RC_MOD_VERSION=$(get_collector_version "$RC_MODULE " "$MAIN_MOD_FILE") -check_collector_versions_correct "$RC_MODULE" "$RC_MOD_VERSION" -for mod in ${rc_modules[@]}; do - check_collector_versions_correct "$mod" "$RC_MOD_VERSION" -done - # Check stable modules, none currently exist, uncomment when pdata is 1.0.0 -# STABLE_MODULE="go.opentelemetry.io/collector/pdata " -# STABLE_MOD_VERSION=$(get_collector_version "$STABLE_MODULE" "$MAIN_MOD_FILE") -# check_collector_versions_correct "$STABLE_MODULE" "$STABLE_MOD_VERSION" -# for mod in ${stable_modules[@]}; do -# check_collector_versions_correct "$mod" "$STABLE_MOD_VERSION" -# done +STABLE_MODULE="go.opentelemetry.io/collector/pdata" +STABLE_MOD_VERSION=$(get_collector_version "$STABLE_MODULE" "$MAIN_MOD_FILE") +check_collector_versions_correct "$STABLE_MODULE" "$STABLE_MOD_VERSION" +for mod in ${stable_modules[@]}; do + check_collector_versions_correct "$mod" "$STABLE_MOD_VERSION" +done git diff --exit-code diff --git a/.github/workflows/scripts/dependabot-pr.sh b/.github/workflows/scripts/dependabot-pr.sh deleted file mode 100755 index eb771351fb53..000000000000 --- a/.github/workflows/scripts/dependabot-pr.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/zsh -ex - -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 - -git config user.name opentelemetrybot -git config user.email 107717825+opentelemetrybot@users.noreply.github.com - -PR_NAME=dependabot-prs/`date +'%Y-%m-%dT%H%M%S'` -git checkout -b $PR_NAME - -IFS=$'\n' -requests=($( gh pr list --search "author:app/dependabot" --limit 1000 --json title --jq '.[].title' | sort )) -message="" -dirs=(`find . -type f -name "go.mod" -exec dirname {} \; | sort | egrep '^./'`) - -declare -A mods - -for line in $requests; do - echo $line - if [[ $line != Bump* ]]; then - continue - fi - - module=$(echo $line | cut -f 2 -d " ") - version=$(echo $line | cut -f 6 -d " ") - - mods[$module]=$version - message+=$line - message+=$'\n' -done - -for module version in ${(kv)mods}; do - topdir=`pwd` - for dir in $dirs; do - echo "checking $dir" - cd $dir && if grep -q "$module " go.mod; then go get "$module"@v"$version"; fi - cd $topdir - done -done - -make gotidy genotelcontribcol genoteltestbedcol otelcontribcol - -git add go.sum go.mod -git add "**/go.sum" "**/go.mod" -git commit -m "dependabot updates `date` -$message" -git push origin $PR_NAME - -gh pr create --title "[chore] dependabot updates `date`" --body "$message" diff --git a/.github/workflows/scripts/get-codeowners.sh b/.github/workflows/scripts/get-codeowners.sh index e7bb4ec673cc..8d84b99e7787 100755 --- a/.github/workflows/scripts/get-codeowners.sh +++ b/.github/workflows/scripts/get-codeowners.sh @@ -9,24 +9,32 @@ set -euo pipefail +get_component_type() { + echo "${COMPONENT}" | cut -f 1 -d '/' +} + +get_codeowners() { + # grep arguments explained: + # -m 1: Match the first occurrence + # ^: Match from the beginning of the line + # ${1}: Insert first argument given to this function + # [\/]\?: Match 0 or 1 instances of a forward slash + # \s: Match any whitespace character + echo "$((grep -m 1 "^${1}[\/]\?\s" .github/CODEOWNERS || true) | \ + sed 's/ */ /g' | \ + cut -f3- -d ' ')" +} + if [[ -z "${COMPONENT:-}" ]]; then echo "COMPONENT has not been set, please ensure it is set." exit 1 fi -# grep exits with status code 1 if there are no matches, -# so we manually set RESULT to 0 if nothing is found. -RESULT=$(grep -c "${COMPONENT}" .github/CODEOWNERS || true) +OWNERS="$(get_codeowners "${COMPONENT}")" -# there may be more than 1 component matching a label -# if so, try to narrow things down by appending the component -# type to the label -if [[ ${RESULT} != 1 ]]; then - COMPONENT_TYPE=$(echo "${COMPONENT}" | cut -f 1 -d '/') - COMPONENT="${COMPONENT}${COMPONENT_TYPE}" +if [[ -z "${OWNERS:-}" ]]; then + COMPONENT_TYPE=$(get_component_type "${COMPONENT}") + OWNERS="$(get_codeowners "${COMPONENT}${COMPONENT_TYPE}")" fi -OWNERS=$( (grep -m 1 "${COMPONENT}" .github/CODEOWNERS || true) | sed 's/ */ /g' | cut -f3- -d ' ' ) - echo "${OWNERS}" - diff --git a/.github/workflows/scripts/ping-codeowners-issues.sh b/.github/workflows/scripts/ping-codeowners-issues.sh index cce1d37dbe18..a9ce7a875cbe 100755 --- a/.github/workflows/scripts/ping-codeowners-issues.sh +++ b/.github/workflows/scripts/ping-codeowners-issues.sh @@ -7,8 +7,8 @@ set -euo pipefail -if [[ -z "${COMPONENT:-}" || -z "${ISSUE:-}" || -z "${SENDER:-}" ]]; then - echo "At least one of COMPONENT, ISSUE, or SENDER has not been set, please ensure each is set." +if [[ -z "${COMPONENT:-}" || -z "${ISSUE:-}" ]]; then + echo "Either COMPONENT or ISSUE has not been set, please ensure both are set." exit 0 fi @@ -20,9 +20,4 @@ if [[ -z "${OWNERS}" ]]; then exit 0 fi -if [[ "${OWNERS}" =~ "${SENDER}" ]]; then - echo "Label applied by code owner ${SENDER}" - exit 0 -fi - gh issue comment "${ISSUE}" --body "Pinging code owners for ${COMPONENT}: ${OWNERS}. See [Adding Labels via Comments](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-labels-via-comments) if you do not have permissions to add labels yourself." diff --git a/.github/workflows/scripts/release-prepare-release.sh b/.github/workflows/scripts/release-prepare-release.sh index 5e4181807a56..23f349b28f1e 100755 --- a/.github/workflows/scripts/release-prepare-release.sh +++ b/.github/workflows/scripts/release-prepare-release.sh @@ -50,6 +50,11 @@ git add . git commit -m "make multimod-sync changes ${CANDIDATE_BETA}" || (echo "no multimod changes to commit") make gotidy + +pushd cmd/otelcontribcol +go mod tidy +popd + git add . git commit -m "make gotidy changes ${CANDIDATE_BETA}" || (echo "no gotidy changes to commit") make otelcontribcol diff --git a/.github/workflows/telemetrygen.yml b/.github/workflows/telemetrygen.yml index dcd828bb935d..1e1f40793d2a 100644 --- a/.github/workflows/telemetrygen.yml +++ b/.github/workflows/telemetrygen.yml @@ -6,7 +6,12 @@ on: - 'aws-cwa-*' tags: - 'v[0-9]+.[0-9]+.[0-9]+*' + merge_group: pull_request: +env: + # Make sure to exit early if cache segment download times out after 2 minutes. + # We limit cache download as a whole to 5 minutes. + SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 # Do not cancel this workflow on main. See https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/16616 concurrency: @@ -19,12 +24,37 @@ jobs: if: ${{ github.actor != 'dependabot[bot]' }} steps: - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.21.9" + cache: false + - name: Cache Go + id: go-cache + timeout-minutes: 5 + uses: actions/cache@v4 + with: + path: | + ~/go/bin + ~/go/pkg/mod + key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build binaries + run: | + GOOS=linux GOARCH=ppc64le make telemetrygen + GOOS=linux GOARCH=arm64 make telemetrygen + GOOS=linux GOARCH=amd64 make telemetrygen + GOOS=linux GOARCH=s390x make telemetrygen + cp bin/telemetrygen_* cmd/telemetrygen/ - name: Build telemetrygen uses: docker/build-push-action@v5 with: context: cmd/telemetrygen push: false tags: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:dev + platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le publish-latest: runs-on: ubuntu-latest @@ -33,18 +63,43 @@ jobs: packages: write steps: - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.21.9" + cache: false + - name: Cache Go + id: go-cache + timeout-minutes: 5 + uses: actions/cache@v4 + with: + path: | + ~/go/bin + ~/go/pkg/mod + key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Build binaries + run: | + GOOS=linux GOARCH=ppc64le make telemetrygen + GOOS=linux GOARCH=arm64 make telemetrygen + GOOS=linux GOARCH=amd64 make telemetrygen + GOOS=linux GOARCH=s390x make telemetrygen + cp bin/telemetrygen_* cmd/telemetrygen/ - name: Push telemetrygen to Github packages uses: docker/build-push-action@v5 with: context: cmd/telemetrygen push: true tags: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest + platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le publish-stable: runs-on: ubuntu-latest @@ -53,6 +108,23 @@ jobs: packages: write steps: - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.21.9" + cache: false + - name: Cache Go + id: go-cache + timeout-minutes: 5 + uses: actions/cache@v4 + with: + path: | + ~/go/bin + ~/go/pkg/mod + key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Set Release Tag id: github_tag run: ./.github/workflows/scripts/set_release_tag.sh @@ -62,9 +134,17 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Push telemetrygen to Github packages + - name: Build binaries run: | - docker build cmd/telemetrygen -t ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:$RELEASE_TAG - docker push ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:$RELEASE_TAG - env: - RELEASE_TAG: ${{ steps.github_tag.outputs.tag }} + GOOS=linux GOARCH=ppc64le make telemetrygen + GOOS=linux GOARCH=arm64 make telemetrygen + GOOS=linux GOARCH=amd64 make telemetrygen + GOOS=linux GOARCH=s390x make telemetrygen + cp bin/telemetrygen_* cmd/telemetrygen/ + - name: Push telemetrygen to Github packages + uses: docker/build-push-action@v5 + with: + context: cmd/telemetrygen + push: true + tags: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:${{ steps.github_tag.outputs.tag }} + platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le diff --git a/.github/workflows/tidy-dependencies.yml b/.github/workflows/tidy-dependencies.yml index 04c874d40fd8..328b4c598ba9 100644 --- a/.github/workflows/tidy-dependencies.yml +++ b/.github/workflows/tidy-dependencies.yml @@ -12,26 +12,21 @@ env: jobs: setup-environment: - # disabling until permission issues is resolved - # see: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/22953 - if: ${{ false }} timeout-minutes: 30 runs-on: ubuntu-latest - # if: ${{ contains(github.event.pull_request.labels.*.name, 'dependencies') }} + if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependency-major-update') && (github.actor == 'renovate[bot]' || contains(github.event.pull_request.labels.*.name, 'renovatebot')) }} steps: - uses: actions/checkout@v4 with: - repository: "renovate-bot/open-telemetry-_-opentelemetry-collector-contrib" ref: ${{ github.head_ref }} - token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.20.11 + go-version: "1.21.9" cache: false - name: Cache Go id: go-cache timeout-minutes: 5 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/go/bin @@ -43,12 +38,15 @@ jobs: - name: Install Tools if: steps.go-cache.outputs.cache-hit != 'true' run: make install-tools - - name: go mod tidy + - name: go mod tidy, make genotelcontribcol and make genoteltestbedcol run: | - make gotidy + make gotidy && make genotelcontribcol && make genoteltestbedcol git config user.name opentelemetrybot git config user.email 107717825+opentelemetrybot@users.noreply.github.com - echo "git diff --exit-code || (git add . && git commit -m \"go mod tidy\" && git push)" - git diff --exit-code || (git add . && git commit -m "go mod tidy" && git push) + echo "git diff --exit-code || (git add . && git commit -m \"go mod tidy, make genotelcontribcol and make genoteltestbedcol\" && git push)" + git diff --exit-code || (git add . && git commit -m "go mod tidy, make genotelcontribcol and make genoteltestbedcol" && git push) env: GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + - uses: actions-ecosystem/action-remove-labels@v1 + with: + labels: renovatebot diff --git a/.golangci.yml b/.golangci.yml index 8692ebe9e1ea..16fb19e4b5b3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -170,3 +170,6 @@ issues: - text: "G402:" linters: - gosec + - text: "SA1019: \"github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema" + linters: + - staticcheck diff --git a/CHANGELOG-API.md b/CHANGELOG-API.md index b861ff18d305..d01d4e28266e 100644 --- a/CHANGELOG-API.md +++ b/CHANGELOG-API.md @@ -7,6 +7,132 @@ If you are looking for user-facing changes, check out [CHANGELOG.md](./CHANGELOG +## v0.98.0 + +### 💡 Enhancements 💡 + +- `pkg/sampling`: Usability improvements in the sampling API. (#31918) + +## v0.97.0 + +### 🛑 Breaking changes 🛑 + +- `datadogexporter`: Remove config structs `LimitedClientConfig` and `LimitedTLSClientSettings` (#31733) + This should have no impact to end users as long as they do not import Datadog exporter config structs in their source code. +- `cmd/mdatagen`: Delete deprecated cmd/mdatagen from this project. Use go.opentelemetry.io/collector/cmd/mdatagen instead. (#30497) +- `azuremonitorreceiver`: Reduce the public API for this receiver. (#24850) + This unexports the following types ArmClient, MetricsDefinitionsClientInterface, MetricsValuesClient. +- `general`: Update any component using `scraperhelper.ScraperControllerSettings` to use `scraperhelper.ControllerConfig` (#31816) + This changes the config field name from `ScraperControllerSettings` to `ControllerConfig` +- `prometheusreceiver`: Remove enable_protobuf_negotiation option on the prometheus receiver. Use config.global.scrape_protocols = [ PrometheusProto, OpenMetricsText1.0.0, OpenMetricsText0.0.1, PrometheusText0.0.4 ] instead. (#30883) + See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration-file for details on setting scrape_protocols. + +### 🚩 Deprecations 🚩 + +- `pkg/stanza`: Deprecate fileconsumer.BuildWithSplitFunc in favor of Build with options pattern (#31596) + +### 💡 Enhancements 💡 + +- `clickhouseexporter`: Allow configuring `ON CLUSTER` and `ENGINE` when creating database and tables (#24649) + Increases table creation flexibility with the ability to add replication for fault tolerance +- `all`: Remove explicit checks in all receivers to check if the next consumer is nil (#31793) + The nil check is now done by the pipeline builder. + +## v0.96.0 + +### 🛑 Breaking changes 🛑 + +- `cmd/mdatagen`: Use enum for stability levels in the Metadata struct (#31530) +- `httpforwarder`: Remove extension named httpforwarder, use httpforwarderextension instead. (#24171) + +## v0.95.0 + +### 🛑 Breaking changes 🛑 + +- `pkg/stanza`: Remove deprecated pkg/stanza/attrs (#30449) +- `httpforwarderextension`: Rename the extension httpforwarder to httpforwarderextension (#24171) +- `extension/storage`: The `filestorage` and `dbstorage` extensions are now standalone modules. (#31040) + If using the OpenTelemetry Collector Builder, you will need to update your import paths to use the new module(s). + - `github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage` + - `github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage` + + +### 💡 Enhancements 💡 + +- `pkg/golden`: Added an option to skip the metric timestamp normalization for WriteMetrics. (#30919) +- `healthcheckextension`: Remove usage of deprecated `host.ReportFatalError` (#30582) + +## v0.94.0 + +### 🚩 Deprecations 🚩 + +- `testbed`: Deprecate testbed.GetAvailablePort in favor of testutil.GetAvailablePort (#30811) + Move healthcheckextension to use testutil.GetAvailablePort + +### 🚀 New components 🚀 + +- `pkg_sampling`: Package of code for parsing OpenTelemetry tracestate probability sampling fields. (#29738) + +## v0.93.0 + +### 🛑 Breaking changes 🛑 + +- `testbed`: Remove unused AWS XRay mock receiver (#30381) +- `docker`: Adopt api_version as strings to correct invalid float truncation (#24025) +- `prometheusreceiver`: Consolidate Config members and remove the need of placeholders. (#29901) +- `all`: Remove obsolete "// +build" directive (#30651) +- `testbed`: Expand TestCase capabilities with broken out LoadGenerator interface (#30303) + +### 🚩 Deprecations 🚩 + +- `pkg/stanza`: Deprecate pkg/stanza/attrs package in favor of pkg/stanza/fileconsumer/attrs (#30449) + +### 💡 Enhancements 💡 + +- `testbed`: Adds and adopts new WithEnvVar child process option, moving GOMAXPROCS=2 to initializations (#30491) + +## v0.92.0 + +### 🛑 Breaking changes 🛑 + +- `carbonexporter`: Change Config member names (#29862) +- `carbonreceiver`: Hide unnecessary public API (#29895) +- `pkg/ottl`: Unexport `ADD`, `SUB`, `MULT`, `DIV`, `EQ`, `NE`, `LT`, `LTE`, `GT`, and `GTE` (#29925) +- `pkg/ottl`: Change `Path` to be an Interface instead of the grammar struct. (#29897) + Affects creators of custom contexts. +- `golden`: Use testing.TB for golden.WriteMetrics, golden.WriteTraces and golden.WriteLogs over *testing.T (#30277) + +### 💡 Enhancements 💡 + +- `kafkaexporter`: add ability to publish kafka messages with message key of TraceID - it will allow partitioning of the kafka Topic. (#12318) +- `kafkaexporter`: Adds the ability to configure the Kafka client's Client ID. (#30144) + +## v0.91.0 + +### 🛑 Breaking changes 🛑 + +- `pkg/ottl`: Rename `Statements` to `StatementSequence`. Remove `Eval` function from `StatementSequence`, use `ConditionSequence` instead. (#29598) + +### 💡 Enhancements 💡 + +- `pkg/ottl`: Add `ConditionSequence` for evaluating lists of conditions (#29339) + +## v0.90.0 + +### 🛑 Breaking changes 🛑 + +- `clickhouseexporter`: Replace `Config.QueueSettings` field with `exporterhelper.QueueSettings` and remove `QueueSettings` struct (#27653) +- `kafkareceiver`: Do not export the function `WithTracesUnmarshalers`, `WithMetricsUnmarshalers`, `WithLogsUnmarshalers` (#26304) + +### 💡 Enhancements 💡 + +- `datadogreceiver`: The datadogreceiver supports the new datadog protocol that is sent by the datadog agent API/v0.2/traces. (#27045) +- `pkg/ottl`: Add ability to independently parse OTTL conditions. (#29315) + +### 🧰 Bug fixes 🧰 + +- `cassandraexporter`: Exist check for keyspace and dynamic timeout (#27633) + ## v0.89.0 ### 🛑 Breaking changes 🛑 diff --git a/CHANGELOG.md b/CHANGELOG.md index b0b31c3fe868..513843813afa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,724 @@ If you are looking for developer-facing changes, check out [CHANGELOG-API.md](./ +## v0.98.0 + +### 🛑 Breaking changes 🛑 + +- `podmanreceiver`: Adds metrics and resources metadata and sets seconds precision for cpu metrics (#28640) +- `clickhouseexporter`: Add ServiceName as `column` into Clickhouse metrics tables (#31670) + It's a breaking change. users who upgrade to the latest version need to alter the Clickhouse table: + ```sql + ALTER TABLE otel_metrics_exponential_histogram ADD COLUMN ServiceName LowCardinality(String) CODEC(ZSTD(1)); + ALTER TABLE otel_metrics_gauge ADD COLUMN ServiceName LowCardinality(String) CODEC(ZSTD(1)); + ALTER TABLE otel_metrics_histogram ADD COLUMN ServiceName LowCardinality(String) CODEC(ZSTD(1)); + ALTER TABLE otel_metrics_sum ADD COLUMN ServiceName LowCardinality(String) CODEC(ZSTD(1)); + ALTER TABLE otel_metrics_summary ADD COLUMN ServiceName LowCardinality(String) CODEC(ZSTD(1)); + ``` + +- `elasticsearchexporter`: Initial pass in implementing the `ecs` mapping mode (#31553) + Breaking change if mapping `mode` is set to `ecs`, use `none` to maintain existing format +- `pkg/stanza`: Revert recombine operator's 'overwrite_with' default value. (#30783) + Restores the previous the default value of `oldest`, meaning that the recombine operator will emit the + first entry from each batch (with the recombined field). This fixes the bug introduced by 30783 and restores + the default setting so as to effectively cancel out the bug for users who were not using this setting. + For users who were explicitly setting `overwrite_with`, this corrects the intended behavior. + +- `processor/attributes, processor/resource`: Remove stable coreinternal.attraction.hash.sha256 feature gate. (#31997) +- `receiver/dockerstats`: Remove stable receiver.dockerstats.useScraperV2 feature gate. (#31999) +- `awsxrayexporter`: change x-ray exporter's translator to make "." split annotation pass as-is (#31732) + In the past, X-Ray doesn’t support “.”. So we have a translator in x-ray export to translates it to “_” before sending traces to X-Ray Service. | To match otel naming style, x-ray service team decide to change their service to support both "." type and "" type of naming. In this case the translator that translate "." to "" is no-longer needed. This PR change the way this translator work | X-Ray PMs agree on rolling out this change by using feature-gate + +### 🚩 Deprecations 🚩 + +- `postgresqlreceiver`: Minimal supported PostgreSQL version will be updated from 9.6 to 12.0 in a future release. (#30923) + Aligning on the supported versions as can be seen [in the PostgreSQL releases section](https://www.postgresql.org/support/versioning) + + +### 🚀 New components 🚀 + +- `avrologencodingextension`: Add new encoding extension to support mapping of AVRO messages to logs. (#21067) + +### 💡 Enhancements 💡 + +- `ottl`: Add new Unix function to convert from epoch timestamp to time.Time (#27868) +- `filelogreceiver`: When reading a file on filelogreceiver not on windows, if include_file_owner_name is true, it will add the file owner name as the attribute `log.file.owner.name` and if include_file_owner_group_name is true, it will add the file owner group name as the attribute `log.file.owner.group.name`. (#30775) +- `awsproxyextension`: Make awsproxy extension more resilient by initiating the AWS client during Start. (#27849) +- `deltatocumulativeprocessor`: self-instrumentation to observe key metrics of the stream accumulation (#30705) +- `datadog/connector`: Enable connector to use any attribute from the resource as Container Tag (#32224) + This change allows the connector to use any attribute from the resource as a container tag. This is useful when you want to use a custom attribute from the resource as a container tag. For example, you can use the `namespace` attribute from the resource as a container tag. + +- `exceptionsconnector`: change stability of exceptionsconnector from development to alpha (#31820) +- `exceptionsconnector`: Copy span attributes to the generated log from exception. (#24410) +- `prometheusreceiver`: Allows receiving prometheus native histograms (#26555) + - Native histograms are compatible with OTEL exponential histograms. + - The feature can be enabled via the feature gate `receiver.prometheusreceiver.EnableNativeHistograms`. + Run the collector with the command line option `--feature-gates=receiver.prometheusreceiver.EnableNativeHistograms`. + - Currently the feature also requires that targets are scraped via the ProtoBuf format. + To start scraping native histograms, set + `config.global.scrape_protocols` to `[ PrometheusProto, OpenMetricsText1.0.0, OpenMetricsText0.0.1, PrometheusText0.0.4 ]` in the + receiver configuration. This requirement will be lifted once Prometheus can scrape native histograms over text formats. + - For more up to date information see the README.md file of the receiver at + https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md#prometheus-native-histograms. + +- `all`: Add support for ARM build (#12920) +- `failoverconnector`: Support ignoring `max_retries` setting in failover connector (#9868) +- `spanmetricsconnector`: Change default value of metrics_flush_interval from 15s to 60s (#31776) +- `pkg/ottl`: Adding a string converter into pkg/ottl (#27867) +- `cmd/opampsupervisor`: Handle OpAMP connection settings. (#21043) +- `loadbalancingexporter`: Support the timeout period of k8s resolver list watch can be configured. (#31757) +- `cmd/telemetrygen`: Add Support for specifying Log Severity (#26498) + +### 🧰 Bug fixes 🧰 + +- `datadog/connector`: Fix data race in datadog metrics client (#31964) + The PR ensures mutex protects gauges map in every code path. +- `exporter/awskinesisexporter`: Fixed issue with compression what was causing EOF exceptions when attempting to decompress the payload (#32081) +- `filelogreceiver`: Fix missing scope name and group logs based on scope (#23387) +- `jaegerremotesamplingextension`: Fix leaking goroutine on shutdown (#31157) +- `jmxreceiver`: Fix memory leak during component shutdown (#32289) +- `k8sobjectsreceiver`: Fix memory leak caused by the pull mode's interval ticker (#31919) +- `kafkareceiver`: fix kafka receiver panic on shutdown (#31926) +- `oracledbreceiver`: Fix incorrect values being set for oracledb.tablespace_size.limit and oracledb.tablespace_size.usage (#31451) +- `prometheusreceiver`: Fix a bug where a new prometheus receiver with the same name cannot be created after the previous receiver is Shutdown (#32123) +- `resourcedetectionprocessor`: Only attempt to detect Kubernetes node resource attributes when they're enabled. (#31941) +- `syslogreceiver`: Fix issue where static resource and attributes were ignored (#31849) + +## v0.97.0 + +### 🛑 Breaking changes 🛑 + +- `datadogconnector`: Remove feature gate `connector.datadogconnector.performance` (#31638) +- `cmd/mdatagen`: Delete deprecated cmd/mdatagen from this project. Use go.opentelemetry.io/collector/cmd/mdatagen instead. (#30497) +- `receiver/postgresql`: Bump postgresqlreceiver.preciselagmetrics gate to beta (#31220) +- `receiver/vcenter`: Bump receiver.vcenter.emitPerfMetricsWithObjects feature gate to stable (#31215) +- `prometheusreceiver`: Remove enable_protobuf_negotiation option on the prometheus receiver. Use config.global.scrape_protocols = [ PrometheusProto, OpenMetricsText1.0.0, OpenMetricsText0.0.1, PrometheusText0.0.4 ] instead. (#30883) + See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration-file for details on setting scrape_protocols. +- `vcenterreceiver`: Fixed the resource attribute model to more accurately support multi-cluster deployments (#30879) + For more information on impacts please refer https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31113. The main impacts are that + the `vcenter.resource_pool.name`, `vcenter.resource_pool.inventory_path`, and `vcenter.cluster.name` are reported with more accuracy on VM metrics. + + +### 🚩 Deprecations 🚩 + +- `instanaexporter`: Mark the Instana Exporter as deprecated. (#31765) + +### 🚀 New components 🚀 + +- `awss3receiver`: introduce the AWS S3 receiver (#30750) +- `sumologicextension`: promote to `alpha` stability (#29601) +- `googleclientauthextension`: Add boilerplate for Google Client Auth Extension (#31412) +- `grafanacloudconnector`: Adds a connector to generate metrics for Grafana Cloud. (#31647) +- `rabbitmqexporter`: Add new exporter for sending telemetry to RabbitMQ brokers using the AMQP 0.9.1 protocol (#28891) + +### 💡 Enhancements 💡 + +- `exporter/loadbalancingexporter`: Adding AWS Cloud Map for service discovery of Collectors backend. (#27241) +- `ottl`: Add new function to decode a base64 encoded string and output the original string (#31543) +- `ackextension`: adding the in-memory implementation of the ackextension (#26376) +- `awss3exporter`: add `compression` option to enable file compression on S3 (#27872) + Add `compression` option to compress files using `compress/gzip` library before uploading to S3. + +- `servicegraphprocessor`: Added a new configuration option `database_name_attribute` to allow users to specify a custom attribute name for identifying the database name in span attributes. (#30726) +- `awss3exporter`: Add support for encoding extension to awss3exporter (#30554) +- `processor/k8sattributes`: Add support for `k8s.node.uid` metadata (#31637) +- `awss3exporter`: Add support for specifying the file extension for files uploaded to S3 when using an encoding extension. (#31818) +- `datadogexporter`: Datadog exporter uses the same default HTTP settings as Datadog Agent HTTP transport (#31733) +- `datadogexporter`: Datadog exporter respects a subset of settings in confighttp client configs (#31733) + Currently the following configs are respected: `read_buffer_size`, `write_buffer_size`, `timeout`, `max_idle_conns`, `max_idle_conns_per_host`, `max_conns_per_host`, `idle_conn_timeout`, `disable_keep_alives` and `tls.insecure_skip_verify`. +- `deltatocumulativeprocessor`: introduce configurable stream limit (#31488) + Adds `max_streams` option that allows to set upper bound (default = unlimited) + to the number of tracked streams. Any additional streams exceeding the limit + are dropped. + +- `deltatocumulativeprocessor`: expire stale series (#30705, #31016) + Adds `max_stale` option that allows to set an interval (default = `5min`) + after which a series that no longer receives new samples is removed from + tracking. + +- `datadogconnector`: Add a new option to the Datadog connector to enable container tags on stats Payloads. (#31642) + This change adds a new option to the Datadog connector to enable container tags on stats Payloads. This is useful for users who want to use container tags as second primary tag for Datadog APM. + +- `dockerstatsreceiver`: add metrics for online CPU count and memory fails count (#31366) +- `fileexporter`: Adopt the encoding extension with the file exporter. (#31774) +- `pkg/ottl`: Add `ParseXML` function for parsing XML from a target string. (#31133) +- `fileexporter`: Added the option to write telemetry data into multiple files, where the file path is based on a resource attribute. (#24654) +- `fileexporter`: File write mode is configurable now (truncate or append) (#31364) +- `elasticsearchexporter`: When timestamp is not set, use observedTimestamp (#11752) +- `k8sclusterreceiver`: add optional status_last_terminated_reason resource attribute (#31282) +- `awsproxyextension`: Expose service_name as configurable option. Previously, it was hardcoded as xray. (#29550) +- `datadogexporter`: Add new telemetry metric, `otelcol_datadog_otlp_translator_resources_missing_source` that counts OTLP resources missing a hostname-identifying attribute. (#31805) + - Enable Collector metrics https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/troubleshooting.md#metrics to check for this metric. + +- `extension/opamp`: Promote the OpAMP extension to alpha stability (#31616) +- `prometheusremotewriteexporter`: Publish telemetry about translation of metrics from Otel to Prometheus. Don't drop all data points if some fail translation. (#29729) +- `prometheusreceiver`: Use confighttp for target allocator client (#31449) +- `spanmetricsconnector`: Add `metrics_expiration` option to enable expiration of metrics if spans are not received within a certain time frame. (#30559) + The feature can be configured by specifiying the desired duration in the `metrics_expiration` option. By default, the expiration is disabled (set to 0). +- `splunkentreceiver`: Updated the config.go and propogated these changes to other receiver components. Change was necessary to differentiate different configurable endpoints. (#30254) +- `exporter/datadogexporter`: Do not drop traces when payload channel is full. (#31893) +- `connector/datadogconnector`: Do not resolve container tags if payload already has tags associated with it. (#31893) + +### 🧰 Bug fixes 🧰 + +- `bigipreceiver`: Fix potential nil pointer usage in GetPoolMembers (#31899) +- `carbonreceiver`: Do not report fatal error when closed normally (#31913) +- `datadogexporter`: Fix data race in metrics exporter shutdown (#31663) +- `deltatocumulativeprocessor`: timer-based expiry (#31615) + converts expiry to 1m timer, eliminating a race condition and failing test + +- `telemetrygen`: Do not use WithBlock when forming grpc connections for metrics/traces in telemetrygen to avoid infinite retry after failure (#31401) +- `filestatsreceiver`: Fix file.path to return the proper absolute path of the file (#31738) +- `internal/docker`: Updated docker dependency and fixed zap.String incompatibility (#31087) +- `exporter/loadbalancing`: Fix panic when a sub-exporter is shut down while still handling requests. (#31410) +- `cmd/telemetrygen`: Fixed key mapping for logs telemetry attributes. (#31309) +- `exporter/awskinesisexporter`: Fix the capacity of records slices in the initialized batch (#20914) +- `hostmetricsreceiver`: Adds the receiver.hostmetrics.normalizeProcessCPUUtilization feature gate to optionally normalize process.cpu.utilization values. (#31368) + When enabled, the receiver.hostmetrics.normalizeProcessCPUUtilization feature gate will cause process.cpu.utilization values to be divided by the number of logical cores on the system. This is necessary to produce a value on the interval of [0-1], as the description of process.cpu.utilization the metric says. + +- `transformprocessor`: Change metric unit for metrics extracted with `extract_count_metric()` to be the default unit (`1`) (#31575) + The original metric `unit` does not apply to extracted `count` metrics the same way it does to `sum`, `min` or `max`. + Metrics extracted using `extract_count_metric()` now use the more appropriate default unit (`1`) instead. + +- `dockerstatsreceiver`: Add shutdown method to fix leaking goroutines (#30438) +- `loadbalancingexporter`: Fix memory leaks on shutdown (#31050) +- `signalfxexporter`: Fix memory leak in shutdown (#30864, #30438) +- `servicegraphprocessor`: Fix 'failed to find dimensions for key' error from race condition in metrics cleanup. (#31701) +- `processor/k8sattributes`: Allows k8sattributes processor to work with k8s role/rolebindings when filter::namespace is set. (#14742) +- `exporter/datadog`: Demote noisy gohai logs to debug level (#29741) + These logs would be present at the info level when using the official Docker images but were not useful to end-users. + +- `opencensusreceiver`: Refactor the opencensusreceiver to pass lifecycle tests and avoid leaking gRPC connections. (#31643) +- `sqlqueryreceiver`: Fix memory leak on shutdown for log telemetry (#31782) + +## v0.96.0 + +### 🛑 Breaking changes 🛑 + +- `f5cloudexporter`: Remove deprecated module (#31531) +- `datadogconnector`: Move feature gate `connector.datadogconnector.performance` to stable stage. (#31414) + `connector.datadogconnector.performance` will be removed in the next release +- `spanmetricsprocessor`: Remove spanmetrics processor (#29567) + - You can use the spanmetrics connector as a replacement + +- `httpforwarder`: Remove extension named httpforwarder, use httpforwarderextension instead. (#24171) +- `k8sclusterreceiver`: Remove deprecated k8s.kubeproxy.version resource attribute (#29748) + +### 🚀 New components 🚀 + +- `ackextension`: Adding an interface for Acknowledgement extension (#26376) +- `sumologicextension`: add implementation of Sumo Logic Extension (#29601) + +### 💡 Enhancements 💡 + +- `datadogexporter`: Attach the collector version to stats payloads to improve the debugging experience. (#31454) +- `awsxrayexporter`: support both deprecated and stable http attributes translation for backward compatibility. (#30935) +- `azuremonitorexporter`: Added support for configuring the Azure Monitor Exporter connection string via the `APPLICATIONINSIGHTS_CONNECTION_STRING` environment variable. (#31523) +- `datadogconnector`: datadogconnector no longer mutates the input traces in trace-to-trace pipelines. (#31414) +- `statsdreceiver`: Add support for the latest version of DogStatsD protocol (v1.3) (#31295) +- `fileexporter`: Scope the behavior of the fileexporter to its lifecycle, so it is safe to shut it down or restart it. (#27489) +- `processor/resourcedetection`: Add `processor.resourcedetection.hostCPUSteppingAsString` feature gate to change the type of `host.cpu.stepping` from `int` to `string`. (#31136) + This feature gate will graduate to beta in the next release. + +- `routingconnector`: a warning is logged if there are two or more routing items with the same routing statement (#30663) +- `pkg/ottl`: Add new IsInt function to facilitate type checking. (#27894) +- `cmd/mdatagen`: Make lifecycle tests generated by default (#31532) +- `opampextension`: enables creating and using an http client (#31389) +- `pkg/stanza`: Improve timestamp parsing documentation (#31490) +- `postgresqlreceiver`: Add `receiver.postgresql.connectionPool` feature gate to reuse database connections (#30831) + The default implementation recreates and closes connections on each scrape per database configured/discovered. + This change offers a feature gated alternative to keep connections open. Also, it exposes connection configuration to control the behavior of the pool. + +- `datadogconnector`: Add `source:datadogconnector` tag to trace agent telemetry metrics generated by the datadogconnector. (#31528) +- `datadogexporter`: Add `source:datadogexporter` tag to trace agent telemetry metrics generated by the datadogexporter. (#31528) +- `datadogexporter`: Automatically map `cloud.region`, `cloud.availability_zone` and `cloud.provider` to the `region`, `zone` and `cloud_provider` host tags. (#31372) + +### 🧰 Bug fixes 🧰 + +- `carbonreceiver`: Accept carbon metrics with float timestamps (#31312) +- `chronyreceiver`: move initialization of the chrony client to the start function (#27849) +- `deltatocumulativeprocessor`: permits advancing delta start timestamps, as required by spec. (#31365) +- `deltatocumulativeprocessor`: due to an oversight, only the first sample of each stream was processed. now all samples are. (#31350) +- `cmd/telemetrygen`: Inherit root CAs from the host environment if not supplied on the command line. (#31191) +- `syslogexporter`: fix setting network connection, do not load TLS configuration for UDP (#31130) +- `journaldreceiver`: Fix bug where failed startup could bury error message due to panic during shutdown (#31476) +- `loadbalancingexporter`: Fixes a bug where the endpoint become required, despite not being used by the load balancing exporter. (#31371) +- `oracledbreceiver`: Use metadata.Type for the scraper id to avoid invalid scraper IDs. (#31457) +- `filelogreceiver`: Fix bug where delete_after_read would cause panic (#31383) +- `receiver/filelog`: Fix issue where file fingerprint could be corrupted while reading. (#22936) +- `cmd/telemetrygen`: Fix incorrect error logged in traces batch span processor shutdown (#31362) + +## v0.95.0 + +### 🛑 Breaking changes 🛑 + +- `all`: Bump minimum version to go 1.21 (#31105) +- `receiver/elasticsearch`: Remove receiver.elasticsearch.emitNodeVersionAttr feature gate (#31221) +- `receiver/mongodb`: Bump receiver.mongodb.removeDatabaseAttr feature gate to beta (#31212) +- `splunkenterprisereceiver`: adds additional metrics specific to indexers (#30704) +- `exporter/datadogexporter`: Disable APM stats computation in Datadog Exporter by default, `exporter.datadogexporter.DisableAPMStats` is changed to beta (#31219) +- `extension/storage`: The `filestorage` and `dbstorage` extensions are now standalone modules. (#31040) + If using the OpenTelemetry Collector Builder, you will need to update your import paths to use the new module(s). + - `github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage` + - `github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage` + + +### 🚩 Deprecations 🚩 + +- `f5cloudexporter`: deprecating component that is no longer maintained (#31186) + +### 🚀 New components 🚀 + +- `confmap/secretsmanagerprovider`: Initial implementation of secrets manager provider. Allows fetch variables from AWS Secrets Manager (#19368) +- `deltatocumulative`: adds processor to convert sums (initially) from delta to cumulative temporality (#30705) + +### 💡 Enhancements 💡 + +- `hostmetricsreceiver`: Add a new optional resource attribute `process.cgroup` to the `process` scraper of the `hostmetrics` receiver. (#29282) +- `datadogexporter`: Adds support for stable JVM metrics introduced in opentelemetry-java-instrumentation v2.0.0 (#31194) + See https://github.com/DataDog/opentelemetry-mapping-go/pull/265 for details. +- `datasetexporter`: Release resources if they haven't been used for some time. (#31292) +- `datadogconnector`: Add a trace config `peer_tags` on supplementary peer tags on APM stats. (#31158) +- `datadogexporter`: Add a trace config `peer_tags` on supplementary peer tags on APM stats. (#31158) +- `awss3exporter`: Add a marshaler that stores the body of log records in s3. (#30318) +- `pkg/ottl`: Adds a new ParseCSV converter that can be used to parse CSV strings. (#30921) +- `loadbalancingexporter`: Add benchmarks for Metrics and Traces (#30915) +- `pkg/ottl`: Add support to specify the format for a replacement string (#27820) +- `pkg/ottl`: Add `ParseKeyValue` function for parsing key value pairs from a target string (#30998) +- `receivercreator`: Remove use of `ReportFatalError` (#30596) +- `processor/tail_sampling`: Add metrics that measure the number of sampled spans and the number of spans that are dropped due to sampling decisions. (#30482) +- `exporter/signalfx`: Send histograms in otlp format with new config `send_otlp_histograms` option (#26298) +- `receiver/signalfx`: Accept otlp protobuf requests when content-type is "application/x-protobuf;format=otlp" (#26298) +- `signalfxreceiver`: Remove deprecated use of `host.ReportFatalError` (#30598) +- `syslogexporter`: Adding support for sending rfc6587 octet counts in syslog messages (#31013) +- `connector/datadogconnector`: Internal telemetry metrics for the Datadog traces exporter are now reported through the Collector's self-telemetry (#31179) + - These internal metrics may be dropped or change name without prior notice + +- `exporter/datadogexporter`: Internal telemetry metrics for the Datadog traces exporter are now reported through the Collector's self-telemetry (#31179) + - These internal metrics may be dropped or change name without prior notice + + +### 🧰 Bug fixes 🧰 + +- `pkg/stanza`: Add 'allow_skip_pri_header' flag to syslog setting. (#30397) + Allow parsing syslog records without PRI header. Currently pri header is beng enforced although it's not mandatory by the RFC standard. Since influxdata/go-syslog is not maintained we had to switch to haimrubinstein/go-syslog. + +- `datadogexporter`: Fix bug where multiple resources would cause datadogexporter to send extraneous additional stats buckets. (#31173) +- `extension/storage`: Ensure fsync is turned on after compaction (#20266) +- `logstransformprocessor`: Fix potential panic on shutdown due to incorrect shutdown order (#31139) +- `logicmonitorexporter`: Fix memory leak on shutdown (#31150) +- `opencensusreceiver`: Fix memory leak on shutdown (#31152) +- `receiver/prometheusreceiver`: prometheusreceiver fix translation of metrics with _created suffix (#30309) +- `pkg/stanza`: Fixed a bug in the keyvalue_parser where quoted values could be split if they contained a delimited. (#31034) + +## v0.94.0 + +### 🛑 Breaking changes 🛑 + +- `servicegraphprocessor`: removed deprecated component, use the servicegraph connector instead. (#26091) +- `datadogconnector`: Enable feature gate `connector.datadogconnector.performance` by default. (#30829) + See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/datadogconnector#feature-gate-for-performance for caveats of this feature gate. +- `datadogprocessor`: Delete datadogprocessor which has been deprecated since v0.84.0 (#31026) + Use datadogconnector instead. +- `kafkareceiver`: standardizes the default topic name for metrics and logs receivers to the same topic name as the metrics and logs exporters of the kafkaexporter (#27292) + If you are using the Kafka receiver in a logs and/or a metrics pipeline + and you are not customizing the name of the topic to read from with the `topic` property, + the receiver will now read from `otlp_logs` or `otlp_metrics` topic instead of `otlp_spans` topic. + To maintain previous behavior, set the `topic` property to `otlp_spans`. + +- `pkg/stanza`: Entries are no longer logged during error conditions. (#26670) + This change is being made to ensure sensitive information contained in logs are never logged inadvertently. + This change is a breaking change because it may change user expectations. However, it should require + no action on the part of the user unless they are relying on logs from a few specific error cases. + +- `pkg/stanza`: Invert recombine operator's 'overwrite_with' default value. (#30783) + Previously, the default value was `oldest`, meaning that the recombine operator _should_ emit the + first entry from each batch (with the recombined field). However, the actual behavior was inverted. + This fixes the bug but also inverts the default setting so as to effectively cancel out the bug fix + for users who were not using this setting. For users who were explicitly setting `overwrite_with`, + this corrects the intended behavior. + + +### 🚩 Deprecations 🚩 + +- `skywalkingexporter`: Mark the component as unmaintained. If we don't find new maintainers, it will be deprecated and removed. (#23796) + +### 🚀 New components 🚀 + +- `sumologicextension`: add configuration and readme (#29601) +- `failoverconnector`: Refactor of connector to seperate concerns between managing indexes and core failover component (#20766) +- `otelarrow`: Skeleton of new OpenTelemetry Protocol with Apache Arrow Receiver (#26491) +- `processor/interval`: Adds the initial structure for a new processor that aggregates metrics and periodically forwards the latest values to the next component in the pipeline. (#29461) + As per the CONTRIBUTING.md recommendations, this PR only creates the basic structure of the processor. The concrete implementation will come as a separate followup PR + + +### 💡 Enhancements 💡 + +- `receiver/journald`: add a new config option "all" that turns on full output from journalctl, including lines that are too long. (#30920) +- `pkg/stanza`: Add support in a header configuration for json array parser. (#30321) +- `awss3exporter`: Add the ability to export trace/log/metrics in OTLP ProtoBuf format. (#30682) +- `dockerobserver`: Upgrading Docker API version default from 1.22 to 1.24 (#30900) +- `filterprocessor`: move metrics from OpenCensus to OpenTelemetry (#30736) +- `groupbyattrsprocessor`: move metrics from OpenCensus to OpenTelemetry (#30763) +- `datadogconnector`: Add trace configs that mirror datadog exporter (#30787) + ignore_resources: disable certain traces based on their resource name + span_name_remappings: map of datadog span names and preferred name to map to + span_name_as_resource_name: use OTLP span name as datadog operation name + compute_stats_by_span_kind: enables an additional stats computation check based on span kind + peer_tags_aggregation: enables aggregation of peer related tags + trace_buffer: specifies the buffer size for datadog trace payloads + +- `elasticsearchexporter`: Add `mapping.mode: raw` configuration option (#26647) + Setting `mapping.mode: raw` in the Elasticsearch exporter's configuration + will result logs and traces being indexed into Elasticsearch with their + attribute fields directly at the root level of the document instead inside an + `Attributes` object. Similarly, this setting will also result in traces being + indexed into Elasticsearch with their event fields directly at the root level + of the document instead of inside an `Events` object. + +- `loadbalancingexporter`: Optimize metrics and traces export (#30141) +- `gitproviderreceiver`: Add pull request metrics (#22028) + - git.repository.pull_request.open.count + - git.repository.pull_request.open.time + - git.repository.pull_request.merged.count + - git.repository.pull_request.merged.time + - git.repository.pull_request.approved.time + +- `all`: Add `component.UseLocalHostAsDefaultHost` feature gate that changes default endpoints from 0.0.0.0 to localhost (#30702) + This change affects the following components: + - extension/awsproxy + - extension/health_check + - extension/jaegerremotesampling + - internal/aws/proxy + - processor/remotetap + - receiver/awsfirehose + - receiver/awsxray + - receiver/influxdb + - receiver/jaeger + - receiver/loki + - receiver/opencensus + - receiver/sapm + - receiver/signalfx + - receiver/skywalking + - receiver/splunk_hec + - receiver/zipkin + - receiver/zookeeper + +- `googlepubsubreceiver`: Add support for GoogleCloud logging encoding (#29299) +- `processor/resourcedetectionprocessor`: Detect Azure cluster name from IMDS metadata (#26794) +- `processor/transform`: Add `copy_metric` function to allow duplicating a metric (#30846) + +### 🧰 Bug fixes 🧰 + +- `basicauthextension`: Accept empty usernames. (#30470) + Per https://datatracker.ietf.org/doc/html/rfc2617#section-2, username and password may be empty strings (""). + The validation used to enforce that usernames cannot be empty. + +- `servicegraphconnector`: update prefix to match the component type (#31023) +- `datadog/connector`: Create a separate connector in the Datadog connector for the trace-to-metrics and trace-to-trace pipelines. It should reduce the number of conversions we do and help with Datadog connector performance. (#30828) + Simplify datadog/connector with two separate connectors in trace-to-metrics pipeline and trace-to-trace pipeline. +- `datadogreceiver`: Set AppVersion to allow Datadog version property to transform properly to service.version resource attribute (#30225) +- `cmd/opampsupervisor`: Fix memory leak on shutdown (#30438) +- `exporter/datadog`: Fixes a bug where empty histograms were not being sent to the backend in the distributions mode. (#31019) +- `pkg/ottl`: Fix parsing of string escapes in OTTL (#23238) +- `pkg/stanza`: Recombine operator should always recombine partial logs (#30797) + Previously, certain circumstances could result in partial logs being emitted without any + recombiniation. This could occur when using `is_first_entry`, if the first partial log from + a source was emitted before a matching "start of log" indicator was found. This could also + occur when the collector was shutting down. + +- `pkg/stanza`: Fix bug where recombine operator's 'overwrite_with' condition was inverted. (#30783) +- `exporter/signalfx`: Use "unknown" value for the environment correlation calls as fallback. (#31052) + This fixed the APM/IM correlation in the Splunk Observability UI for the users that send traces with no "deployment.environment" resource attribute value set. +- `namedpipereceiver`: Fix SIGSEGV when named pipe creation fails (#31088) + +## v0.93.0 + +### 🛑 Breaking changes 🛑 + +- `azuremonitorexporter`: Fixed an issue where span attributes with double and int values were incorrectly added to the `measurements` field in the Application Insights schema. These attributes are now correctly placed in the `properties` field. (#29683) +- `vcenterreceiver`: Bump "receiver.vcenter.emitPerfMetricsWithObjects" feature gate (#30615) +- `docker`: Adopt api_version as strings to correct invalid float truncation (#24025) +- `extension/filestorage`: Replace path-unsafe characters in component names (#3148) + The feature gate `extension.filestorage.replaceUnsafeCharacters` is now enabled by default. + See the File Storage extension's README for details. + +- `postgresqlreceiver`: add schema attribute to postgresqlreceiver (#29559) + Adds a new resource attribute to the PSQL receiver to store the schema of the table or index + Existing table attributes are adjusted to not include the schema, which was inconsistently used + + +### 🚩 Deprecations 🚩 + +- `mdatagen`: Deprecate mdatagen in preparation for its move to opentelemetry-collector (#30497) + +### 🚀 New components 🚀 + +- `solarwindsapmsettingsextension`: added configuration and readme (#27668) +- `alertmanagerexporter`: Add Alertmanager exporter to builder config (#23569) +- `otelarrow`: Skeleton of new OpenTelemetry Protocol with Apache Arrow Exporter. (#26491) +- `osqueryreceiver`: Adds osquery receiver skeleton (#30375) + +### 💡 Enhancements 💡 + +- `pkg/stanza`: Add a json array parser operator and an assign keys transformer. (#30321) + Json array parser opreator can be used to parse a json array string input into a list of objects. | + Assign keys transformer can be used to assigns keys from the configuration to an input list + +- `splunkhecexporter`: Batch data according to access token and index, if present. (#30404) +- `awscloudwatchlogsexporter`: Add instrumentation scope in log records exported to CloudWatch logs (#30316, #29884) +- `cassandraexporter`: added authorization by username and password (#27827) +- `lokiexporter`: migrate metrics to use OpenTelemetry (#30170) +- `cmd/telemetrygen`: This updates telemetrygen to create multiple child spans per trace and enhances the tool's functionality for load testing the remote tracing backend. (#30687) +- `cmd/telemetrygen`: This updates telemetrygen with TLS/mTLS options to test the security of telemetry ingestion services and infrastructure for secure communication. To illustrate the usage, a new example, secure-tracing is added to examples collection. (#29681) +- `k8sattributesprocessor`: Apply lifecycle tests to k8sprocessor, change its behavior to report fatal error (#30387) +- `k8sclusterreceiver`: add new disabled os.description, k8s.container_runtime.version resource attributes (#30342) +- `k8sclusterreceiver`: add os.type resource attribute (#30342) +- `kubeletstatsreceiver`: Add new `*.cpu.usage` metrics. (#25901) +- `oidcauthextension`: Move validation logic outside of the extension creation, to the configuration validation (#30460) +- `datadogexporter`: Add support for setting host tags via host metadata. (#30680) + When the `datadog.host.use_as_metadata` resource attribute is set to `true`: + - Nonempty string-value resource attributes starting with `datadog.host.tag.` will be added as host tags for the host associated with the resource. + - deployment.environment and k8s.cluster.name as mapped to Datadog names and added as host tags for the host associated with the resource. + +- `opensearchexporter`: added opensearch exporter to the contrib distribution metadata (#30183) +- `pkg/ottl`: Add `flatten` function for flattening maps (#30455) +- `redisreciever`: adds metric for slave_repl_offset (#6942) + also adds a shell script to set up docker-compose integration test +- `exporter/datadogexporter`: Add kafka metrics mapping. This allows users of the JMX Receiver/JMX Metrics Gatherer and kafka metrics receiver to have access to the OOTB kafka Dashboard. (#30731) +- `receiver/sqlquery`: Add debug log when running SQL query (#29672) +- `cmd/opampsupervisor`: Use a bootstrapping flow to get the Collector's agent description. (#21071) + +### 🧰 Bug fixes 🧰 + +- `receiver/filelog`: fix panic after upgrading from v0.71.0 when using storage (#30235) +- `clickhouseexporter`: Fix clickhouse exporter insert metrics data bug (#30210) +- `prometheusremotewriteexporter`: Check if the context was canceled by a timeout in the component level to avoid unnecessary retries. (#30308) +- `elasticsearchreceifver`: Fix nil panic on non-linux systems (#30140) +- `kafkareceiver`: The Kafka receiver now exports some partition-specific metrics per-partition, with a `partition` tag (#30177) + The following metrics now render per partition: + - kafka_receiver_messages + - kafka_receiver_current_offset + - kafka_receiver_offset_lag + + +## v0.92.0 + +### 🛑 Breaking changes 🛑 + +- `httpforwarder`: Use confighttp.HTTPDefaultClientSettings when configuring the HTTPClientSettings for the httpforwarder extension. (#6641) + By default, the HTTP forwarder extension will now use the defaults set in the extension: + * The idle connection timeout is set to 90s. + * The max idle connection count is set to 100. + +- `pkg/ottl`: Now validates against extraneous path segments that a context does not know how to use. (#30042) +- `pkg/ottl`: Throw an error if keys are used on a path that does not allow them. (#30162) +- `tanzuexporter`: Remove tanzuexporter, user can still use versions 0.91. (#30184) +- `zipkinexporter`: Use default client HTTP settings in zipkinexporter, move validation to config validation (#29931) + +### 🚩 Deprecations 🚩 + +- `mdatagen`: Component is being moved to core to allow it to be used there as well. (#30173) +- `k8sclusterreceiver`: deprecate optional k8s.kubeproxy.version resource attribute (#29748) +- `configschema`: Deprecating configschema to prefer generating documentation as part of its metadata generation with mdatagen (#30187) + +### 🚀 New components 🚀 + +- `failoverconnector`: PR provides core logic for failover connector and implements failover for trace signals (#20766) +- `failoverconnector`: PR extends failover connector for metric and log pipelines (#20766) +- `namedpipereceiver`: Add "namedpipereceiver" that allows ingesting logs over a Named Pipe (#27234) + +### 💡 Enhancements 💡 + +- `encoding/jaegerencodingextension`: Add support for JSON protocol for jaeger codec (#6272) +- `githubgen`: Adds a set of distribution reports that can be used to notify distribution maintainers of any changes to distributions. (#28628) +- `vcenterreceiver`: Add explicit statement of support for version 8 of ESXi and vCenter (#30274) +- `carbonexporter`: Add support for resourcetotelemetry (#29879) +- `carbonexporter`: Add retry and queue, use standard configs (#29862) +- `carbonexporter`: Add ability to configure max_idle_conns (#30109) +- `mdatagen`: add Meter/Tracer methods to simplify instrumenting components (#29927) +- `servicegraphprocessor`: update own telemetry to use otel (#29917) +- `datadogexporter`: DataDog log timestamp (ie. '@timestamp') now includes milliseconds (#29785) +- `exporter/elasticsearch`: set the User-Agent header in the outgoing HTTP requests. (#29898) +- `elasticsearchexporter`: add missing trace status description in span (#27645) +- `routingconnector`: routingconnector supports matching the statement only once (#26353) +- `filestatsreceiver`: Add a file.count metric to filestatsreceiver that reports the number of files matched by the receiver (#24651) +- `filterprocessor`: Add telemetry for metrics, logs, and spans that were intentionally dropped via filterprocessor. (#13169) +- `googlecloudpubsubexporter`: Expose `Endpoint` and `Insecure` in configuration. (#29304) +- `exporter/honeycombmarker`: set the User-Agent header in the outgoing HTTP requests (#29894) +- `pkg/ottl`: Add Hour OTTL Converter (#29468) +- `kafkaexporter`: add ability to publish kafka messages with message key of TraceID - it will allow partitioning of the kafka Topic. (#12318) +- `kafkareceiver`: Add three new metrics to record unmarshal errors. (#29302) +- `kineticaexporter`: added metrics handling (#27239) +- `logzioexporter`: add scopename to exported logs (#20659) + when it exists, scope name will be added to exported logs under the scopeName field. +- `hostmetricsreceiver`: Add `system.memory.limit` metric reporting the total memory available. (#30306) + This metric is opt-in. To enable it, set `scrapers::memory::metrics::system.memory.limit::enabled` to `true` in the hostmetrics config. + +- `datadogexporter`: Add support for more semantic conventions related to host metadata (#30158) + The following semantic conventions are now detected for host metadata: + - `host.ip` + - `host.mac` + - `system.cpu.physical.count` + - `system.cpu.logical.count` + - `system.cpu.frequency` + - `system.memory.limit` + +- `prometheusexporter`: Accumulate histograms with delta temporality (#4968) +- `kafkaexporter`: Adds the ability to configure the Kafka client's Client ID. (#30144) +- `pkg/stanza`: Remove sampling policy from logger (#23801) +- `resourcedetectionprocessor`: Add "aws.ecs.task.id" attribute (#8274) + Resourcedetectionprocessor now exports "aws.ecs.task.id" attribute, in addition to "aws.ecs.task.arn". + This allows exporters like "awsemfexporter" to automatically pick up that attribute and make it available + in templating (e.g. to use in CloudWatch log stream name). + +- `spanmetricsconnector`: Fix OOM issue for spanmetrics by limiting the number of exemplars that can be added to a unique dimension set (#27451) +- `connector/spanmetrics`: Configurable resource metrics key attributes, filter the resource attributes used to create the resource metrics key. (#29711) + This enhancement can be used to fix broken spanmetrics counters after a span producing service restart, when resource attributes contain dynamic/ephemeral values (e.g. process id). +- `splunkhecreceiver`: Returns json response in raw endpoint when it is successful (#20766) +- `logicmonitorexporter`: add support for log resource mapping configurations (#29732) +- `sqlqueryreceiver`: Swap MS SQL Server driver from legacy 'denisenkom' to official Microsoft fork (#27200) + +### 🧰 Bug fixes 🧰 + +- `awsemfexporter`: AWS EMF Exporter will drop metrics that contain Inf values to avoid JSON marshal errors. (#29336) +- `azuretranslatorpkg`: When receiving data from Azure some data does not meet the Common Specifications when sending the timestamp. Allow the attribute timeStamp to be used as an alternative to the standard time. (#28806) +- `datadogconnector`: Add feature flag to address memory issue with Datadog Connector (#29755) +- `filterset`: Fix concurrency issue when enabling caching. (#11829) +- `pkg/ottl`: Fix issue with the hash value of a match subgroup in replace_pattern functions. (#29409) +- `opampsupervisor`: Fix panic on agent shutdown (#29955) +- `prometheusreceiver`: Fix configuration validation to allow specification of Target Allocator configuration without providing scrape configurations (#30135) +- `carbonexporter`: Fix metric with empty numberdatapoint serialization (#30182) +- `wavefrontreceiver`: Return error if partially quoted (#30315) +- `hosmetricsreceiver`: change cpu.load.average metrics from 1 to {thread} (#29914) +- `bearertokenauthextension`: Http receiver trying to get the authorization with the lower case from headers, But The headers from Http is received as Authorization capitalcase even-though we sent in lower case and Always return 401 Unauthorized (#24656) +- `pkg/ottl`: Fix bug where the Converter `IsBool` was not usable (#30151) +- `prometheusremotewriteexporter`: sanitize retry default settings (#30286) +- `snowflakereceiver`: Fixed bug where storage metrics for snowflake were not being reported (#29750) +- `apachesparkreceiver`: propagate application list errors to reveal underlying issue (#30278) +- `haproxyreceiver`: Support empty values in haproxy stats. (#30252) +- `time`: The `%z` strptime format now correctly parses `Z` as a valid timezone (#29929) + `strptime(3)` says that `%z` is "an RFC-822/ISO 8601 standard + timezone specification", but the previous code did not allow the + string "Z" to signify UTC time, as required by ISO 8601. Now, both + `+0000` and `Z` are recognized as UTC times in all components that + handle `strptime` format strings. + + +## v0.91.0 + +### 🚀 New components 🚀 + +- `alertmanagerexporter`: Add Alertmanager exporter implementation and tests (#23569) + +### 💡 Enhancements 💡 + +- `spanmetricsconnector`: Add exemplars to sum metric (#27451) +- `exporter/datadogexporter`: Add support for nested log attributes. (#29633) +- `jaegerreceiver,jaegerremotesamplingextension`: mark featuregates to replace Thrift-gen with Proto-gen types for sampling strategies as stable (#27636) + The following featuregates are stable: + - extension.jaegerremotesampling.replaceThriftWithProto + - receiver.jaegerreceiver.replaceThriftWithProto + +- `awsemfexporter/awscloudwatchlogsexporter`: Add component name to user agent header for outgoing put log even requests (#29595) +- `elasticsearchexporter`: Logstash format compatibility. Traces or Logs data can be written into an index in logstash format. (#29624) +- `extension/opampextension`: Implement `extension.NotifyConfig` to be notified of the Collector's effective config and report it to the OpAMP server. (#27293) +- `receiver/influxdbreceiver`: Endpoint `/ping` added to enhance compatibility with third party products (#29594) +- `kafkareceiver`: Add the ability to consume logs from Azure Diagnostic Settings streamed through Event Hubs using the Kafka API. (#18210) +- `resourcedetectionprocessor`: Add detection of host.ip to system detector. (#24450) +- `resourcedetectionprocessor`: Add detection of host.mac to system detector. (#29587) +- `pkg/ottl`: Add `silent` ErrorMode to allow disabling logging of errors that are ignored. (#29710) +- `postgresqlreceiver`: Add config property for excluding specific databases from scraping (#29605) +- `redisreceiver`: Upgrade the redis library dependency to resolve security vulns in v7 (#29600) +- `signalfxexporter`: Enable HTTP/2 health check by default (#29716) +- `splunkhecexporter`: Enable HTTP/2 health check by default (#29717) +- `statsdreceiver`: Add support for 'simple' tags that do not have a defined value, to accommodate DogStatsD metrics that may utilize these. (#29012) + This functionality is gated behind a new `enable_simple_tags` config boolean, as it is not part of the StatsD spec. + +### 🧰 Bug fixes 🧰 + +- `exporter/prometheusremotewrite`: prometheusremotewrite exporter fix created metrics missing timestamp (#24915) +- `connector/spanmetrics`: Fix memory leak when the cumulative temporality is used. (#27654) +- `awscontainerinsightreceiver`: Filter terminated pods from node request metrics (#27262) +- `clickhouseexporter`: Fix regression error introduced in #29095 (#29573) +- `prometheusexporter`: Fix panic when exporter mutates data (#29574) +- `splunkhecexporter`: Do not send null event field values in HEC events. Replace null values with an empty string. (#29551) +- `k8sobjectsreceiver`: fix k8sobjects receiver fails when some unrelated Kubernetes API is down (#29706) +- `resourcedetectionprocessor`: Change type of `host.cpu.model.id` and `host.cpu.model.family` from int to string. (#29025) + - Disable the `processor.resourcedetection.hostCPUModelAndFamilyAsString` feature gate to get the old behavior. + +- `Fix problem where checkpoints could be lost when collector is shutdown abruptly`: filelogreceiver (#29609, #29491) +- `googlecloudspannerreceiver`: Google Cloud Spanner Receiver currently generates an exception and exits if it attempts to read data from a database that doesn't exist. However it's normal for a single receiver to poll multiple databases, so this is not graceful failure. This PR makes a change to gracefully generate an error in case of an unreadable missing database and then continue reading other databases.. (#26732) +- `pkg/stanza`: Allow `key_value_parser` to parse values that contain the delimiter string. (#29629) + +## v0.90.1 + +### 🧰 Bug fixes 🧰 + +- `exporters`: Upgrade core dependency to remove noisy "Exporting finished" log message in exporters. (#29612) + +## v0.90.0 + +### 🛑 Breaking changes 🛑 + +- `dockerstatsreceiver`: Add [container.cpu.limit], [container.cpu.shares] and [container.restarts] metrics from docker container api (#21087) + It requires API version 1.25 or greater. + +### 🚀 New components 🚀 + +- `failoverconnector`: New component that will allow for pipeline failover triggered by the health of target downstream exporters (#20766) +- `gitproviderreceiver`: add repo, branch, and contributor count metrics (#22028) + +### 💡 Enhancements 💡 + +- `opensearchexporter`: Promote opensearchexporter to alpha. (#24668) +- `awsemfexporter`: Improve NaN value checking for Summary metric types. (#28894) +- `awsemfexporter`: Logs relating to the start and finish of processing metrics have been reduced to debug level (#29337) +- `azuremonitorreceiver`: Support Azure gov cloud (#27573) +- `clickhouseexporter`: Added support for more control over TTL configuration. Currently, it supports timelines only in days, now also in hours, minutes and seconds (propertyName ttl_days --> ttl). (#28675) +- `datasetexporter`: Collect usage metrics with Otel and send grouped attributes in session info. (#27650, #27652) +- `resourcedetectionprocessor`: Add k8s cluster name detection when running in EKS (#26794) +- `pkg/ottl`: Add new IsDouble function to facilitate type checking. (#27895) +- `configschema`: Generate metadata for connectors. (#26990) +- `telemetrygen`: Exposes the span duration as a command line argument `--span-duration` (#29116) +- `honeycombmarkerexporter`: Change honeycombmarkerexporter to alpha (#27666) +- `mysqlreceiver`: expose tls in mysqlreceiver (#29269) + If `tls` is not set, the default is to disable TLS connections. +- `processor/transform`: Convert between sum and gauge in metric context when alpha feature gate `processor.transform.ConvertBetweenSumAndGaugeMetricContext` enabled (#20773) +- `receiver/mongodbatlasreceiver`: adds project config to mongodbatlas metrics to filter by project name and clusters. (#28865) +- `pkg/stanza`: Add "namedpipe" operator. (#27234) +- `pkg/resourcetotelemetry`: Do not clone data in pkg/resourcetotelemetry by default (#29327) + - The resulting consumer will be marked as `MutatesData` instead + +- `pkg/stanza`: Improve performance by not calling decode when nop encoding is defined (#28899) +- `exporter/prometheusremotewrite`: prometheusremotewrite exporter add option to send metadata (#13849) +- `receivercreator`: Added support for discovery of endpoints based on K8s services (#29022) + By discovering endpoints based on K8s services, a dynamic probing of K8s service leveraging for example the httpcheckreceiver get enabled +- `signalfxexporter`: change default timeout to 10 seconds (#29436) +- `awss3exporter`: add support for `s3_force_path_style` and `disable_ssl` parameters (#29331) + In order to support alternative object-storage, these parameters are useful and help to leverage those systems not + compatible with domain style path, or just hosted without ssl (like just deployed in a k8s namespace). + +- `hostmetricsreceiver`: Add optional Linux-only metric `system.linux.memory.available` (#7417) + This is an alternative to `system.memory.usage` metric with `state=free`. + Linux starting from 3.14 exports "available" memory. It takes "free" memory as a baseline, and then factors in kernel-specific values. + This is supposed to be more accurate than just "free" memory. + For reference, see the calculations [here](https://superuser.com/a/980821). + See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). + +- `azuremonitorexporter`: Updated Azure Monitor Exporter service version from v2.0 to v2.1. (#29234) + +### 🧰 Bug fixes 🧰 + +- `cassandraexporter`: Exist check for keyspace and dynamic timeout (#27633) +- `datadogreceiver`: Fix set telemetry.sdk.language=dotnet instead of .NET (#29459) +- `filelogreceiver`: Fix issue where files were unnecessarily kept open on Windows (#29149) +- `receiver/activedirectoryds`: Fix shutdown of `activedirectorydsreceiver` when shutdown was called right after creation, without a corresponding start call. (#29505) +- `honeycombmarkerexporter`: Fix default api_url and dataset_slug (#29309) +- `influxdbexporter`: When InfluxDB v1 compatibility is enabled AND username&password are set, the exporter panics. Not any more! (#27084) +- `mongodbreceiver`: add `receiver.mongodb.removeDatabaseAttr` Alpha feature gate to remove duplicate database name attribute (#24972) +- `pkg/stanza`: Fix panic during stop for udp async mode only. (#29120) + ## v0.89.0 ### 🛑 Breaking changes 🛑 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 509b253c4879..cddc12daa12f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -119,7 +119,7 @@ Components refer to connectors, exporters, extensions, processors, and receivers * Implement the [component.Component](https://pkg.go.dev/go.opentelemetry.io/collector/component#Component) interface * Provide a configuration structure which defines the configuration of the component * Provide the implementation which performs the component operation -* Have a `metadata.yaml` file and its generated code (using [mdatadgen](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/README.md)). +* Have a `metadata.yaml` file and its generated code (using [mdatadgen](https://github.com/open-telemetry/opentelemetry-collector/blob/main/cmd/mdatagen/README.md)). Familiarize yourself with the interface of the component that you want to write, and use existing implementations as a reference. [Building a Trace Receiver](https://opentelemetry.io/docs/collector/trace-receiver/) tutorial provides a detailed example of building a component. @@ -152,7 +152,26 @@ and its contributors. and in the respective testing harnesses. To align with the test goal of the project, components must be testable within the framework defined within the folder. If a component can not be properly tested within the existing framework, it must increase the non testable components number with a comment within the PR explaining as to why it can not be tested. -- Create a `metadata.yaml` file with at minimum the required fields defined in [metadata-schema.yaml](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/metadata-schema.yaml). +- Enable [goleak checks](https://github.com/uber-go/goleak) to help ensure your component does not leak goroutines. This + requires adding a file named `package_test.go` to every sub-directory containing tests. This file should have the following contents by default: +``` +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package fooreceiver + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} +``` + +- Create a `metadata.yaml` file with at minimum the required fields defined in [metadata-schema.yaml](https://github.com/open-telemetry/opentelemetry-collector/blob/main/cmd/mdatagen/metadata-schema.yaml). Here is a minimal representation: ``` type: @@ -181,7 +200,7 @@ status: // Package fooreceiver bars. package fooreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fooreceiver" ``` -- Type `make update-codeowners`. This will trigger the regeneration of the `.github/CODEOWNERS` file and the [metadata generator](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/README.md#using-the-metadata-generator) to generate the associated code/documentation. +- Type `make update-codeowners`. This will trigger the regeneration of the `.github/CODEOWNERS` file and the [metadata generator](https://github.com/open-telemetry/opentelemetry-collector/blob/main/cmd/mdatagen/README.md#using-the-metadata-generator) to generate the associated code/documentation. When submitting a component to the community, consider breaking it down into separate PRs as follows: @@ -201,7 +220,6 @@ When submitting a component to the community, consider breaking it down into sep * `make genotelcontribcol` * `make genoteltestbedcol` * `make generate` - * `make gendependabot` * `make multimod-verify` * `make generate-gh-issue-templates` * **Second PR** should include the concrete implementation of the component. If the @@ -222,6 +240,7 @@ to be included in the distributed otelcol-contrib binaries and docker images. The following GitHub users are the currently available sponsors, either by being an approver or a maintainer of the contrib repository. The list is ordered based on a random sort of the list of sponsors done live at the Collector SIG meeting on 27-Apr-2022 and serves as the seed for the round-robin selection of sponsors, as described in the section above. +* [@crobert-1](https://github.com/crobert-1) * [@djaglowski](https://github.com/djaglowski) * [@codeboten](https://github.com/codeboten) * [@Aneurysm9](https://github.com/Aneurysm9) @@ -233,6 +252,11 @@ The following GitHub users are the currently available sponsors, either by being * [@jpkrohling](https://github.com/jpkrohling) * [@dashpole](https://github.com/dashpole) * [@TylerHelmuth](https://github.com/TylerHelmuth) +* [@fatsheep9146](https://github.com/fatsheep9146) +* [@astencel-sumo](https://github.com/astencel-sumo) +* [@songy23](https://github.com/songy23) +* [@Bryan Aguilar](https://github.com/bryan-aguilar) +* [@atoulme](https://github.com/atoulme) Whenever a sponsor is picked from the top of this list, please move them to the bottom. @@ -357,13 +381,18 @@ Example label comment: ## Becoming a Code Owner -A Code Owner is responsible for a component within Collector Contrib, as indicated by the [CODEOWNERS file](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/.github/CODEOWNERS). That responsibility includes maintaining the component, responding to issues, and reviewing pull requests. +A Code Owner is responsible for a component within Collector Contrib, as indicated by the [CODEOWNERS file](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/.github/CODEOWNERS). That responsibility includes maintaining the component, triaging and responding to issues, and reviewing pull requests. Sometimes a component may be in need of a new or additional Code Owner. A few reasons this situation may arise would be: -- The component was never assigned a Code Owner. + +- The existing Code Owners are actively looking for more help. - A previous Code Owner stepped down. - An existing Code Owner has become unresponsive. See [unmaintained stability status](https://github.com/open-telemetry/opentelemetry-collector#unmaintained). -- The existing Code Owners are actively looking for new Code Owners to help. +- The component was never assigned a Code Owner. + +Code Ownership does not have to be a full-time job. If you can find a couple hours to help out on a recurring basis, please consider pursuing Code Ownership. + +### Requirements If you would like to help and become a Code Owner you must meet the following requirements: @@ -372,9 +401,18 @@ If you would like to help and become a Code Owner you must meet the following re Code Ownership is ultimately up to the judgement of the existing Code Owners and Collector Contrib Maintainers. Meeting the above requirements is not a guarantee to be granted Code Ownership. -To become a Code Owner, open a PR with the CODEOWNERS file modified, adding your GitHub username to the component's row. Be sure to tag the existing Code Owners, if any, within the PR to ensure they receive a notification. +### How to become a Code Owner + +To become a Code Owner, open a PR with the following changes: + +1. Add your GitHub username to the active codeowners entry in the component's `metadata.yaml` file. +2. Run the command `make update-codeowners`. + * Note: A GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) must be configured for this command to work. + * If this command is unsuccessful, manually update the component's row in the [CODEOWNERS](.github/CODEOWNERS) file, and then run `make generate` to regenerate the component's README header. + +Be sure to tag the existing Code Owners, if any, within the PR to ensure they receive a notification. -### Makefile Guidelines +## Makefile Guidelines When adding or modifying the `Makefile`'s in this repository, consider the following design guidelines. @@ -383,7 +421,7 @@ The [Makefile](./Makefile) SHOULD contain "repo-level" targets. (i.e. targets th Likewise, `Makefile.Common` SHOULD contain "module-level" targets. (i.e. targets that apply to one module at a time.) Each module should have a `Makefile` at its root that includes `Makefile.Common`. -#### Module-level targets +### Module-level targets Module-level targets SHOULD NOT act on nested modules. For example, running `make lint` at the root of the repo will *only* evaluate code that is part of the `go.opentelemetry.io/collector` module. This excludes nested modules such as @@ -393,7 +431,7 @@ Each module-level target SHOULD have a corresponding repo-level target. For exam in each module. In this way, the entire repository is covered. The root `Makefile` contains some "for each module" targets that can wrap a module-level target into a repo-level target. -#### Repo-level targets +### Repo-level targets Whenever reasonable, targets SHOULD be implemented as module-level targets (and wrapped with a repo-level target). However, there are many valid justifications for implementing a standalone repo-level target. @@ -403,7 +441,7 @@ However, there are many valid justifications for implementing a standalone repo- 3. A necessary tool does not provide a mechanism for scoping its application. (e.g. `porto` cannot be limited to a specific module.) 4. The "for each module" pattern would result in incomplete coverage of the codebase. (e.g. A target that scans all file, not just `.go` files.) -#### Default targets +### Default targets The default module-level target (i.e. running `make` in the context of an individual module), should run a substantial set of module-level targets for an individual module. Ideally, this would include *all* module-level targets, but exceptions should be made if a particular diff --git a/Makefile b/Makefile index 486fe2a589e2..22749ab3c721 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ include ./Makefile.Common RUN_CONFIG?=local/config.yaml CMD?= OTEL_VERSION=main -OTEL_RC_VERSION=main OTEL_STABLE_VERSION=main VERSION=$(shell git describe --always --match "v[0-9]*" HEAD) @@ -21,28 +20,30 @@ EX_INTERNAL=-not -path "./internal/*" EX_PKG=-not -path "./pkg/*" EX_CMD=-not -path "./cmd/*" EX_OVERRIDE=-not -path "./override/*" -# Exclude patches from linting -EX_PATCH=-not -path "./config/*" # NONROOT_MODS includes ./* dirs (excludes . dir) NONROOT_MODS := $(shell find . $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) -RECEIVER_MODS_0 := $(shell find ./receiver/[a-k]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) -RECEIVER_MODS_1 := $(shell find ./receiver/[l-z]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) -RECEIVER_MODS := $(RECEIVER_MODS_0) $(RECEIVER_MODS_1) +RECEIVER_MODS_0 := $(shell find ./receiver/[a-f]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) +RECEIVER_MODS_1 := $(shell find ./receiver/[g-o]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) +RECEIVER_MODS_2 := $(shell find ./receiver/[p]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) # Prometheus is special and gets its own section. +RECEIVER_MODS_3 := $(shell find ./receiver/[q-z]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) +RECEIVER_MODS := $(RECEIVER_MODS_0) $(RECEIVER_MODS_1) $(RECEIVER_MODS_2) $(RECEIVER_MODS_3) PROCESSOR_MODS := $(shell find ./processor/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) -EXPORTER_MODS := $(shell find ./exporter/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) +EXPORTER_MODS_0 := $(shell find ./exporter/[a-m]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) +EXPORTER_MODS_1 := $(shell find ./exporter/[n-z]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) +EXPORTER_MODS := $(EXPORTER_MODS_0) $(EXPORTER_MODS_1) EXTENSION_MODS := $(shell find ./extension/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) CONNECTOR_MODS := $(shell find ./connector/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) INTERNAL_MODS := $(shell find ./internal/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) PKG_MODS := $(shell find ./pkg/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) -CMD_MODS := $(shell find ./cmd/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) +CMD_MODS_0 := $(shell find ./cmd/[a-m]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) +CMD_MODS_1 := $(shell find ./cmd/[n-z]* $(FIND_MOD_ARGS) -not -path "./cmd/otelcontribcol/*" -exec $(TO_MOD_DIR) ) +CMD_MODS := $(CMD_MODS_0) $(CMD_MODS_1) OVERRIDE_MODS := $(shell find ./override/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) -PATCH_MODS := $(shell find ./config/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) -OTHER_MODS := $(shell find . $(EX_COMPONENTS) $(EX_INTERNAL) $(EX_PKG) $(EX_CMD) $(EX_OVERRIDE) $(EX_PATCH) $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) $(PWD) -ALL_MODS := $(RECEIVER_MODS) $(PROCESSOR_MODS) $(EXPORTER_MODS) $(EXTENSION_MODS) $(CONNECTOR_MODS) $(INTERNAL_MODS) $(PKG_MODS) $(CMD_MODS) $(OVERRIDE_MODS) $(PATCH_MODS) $(OTHER_MODS) +OTHER_MODS := $(shell find . $(EX_COMPONENTS) $(EX_INTERNAL) $(EX_PKG) $(EX_CMD) $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) $(PWD) +ALL_MODS := $(RECEIVER_MODS) $(PROCESSOR_MODS) $(EXPORTER_MODS) $(EXTENSION_MODS) $(CONNECTOR_MODS) $(INTERNAL_MODS) $(PKG_MODS) $(CMD_MODS) $(OTHER_MODS) -# find -exec dirname cannot be used to process multiple matching patterns FIND_INTEGRATION_TEST_MODS={ find . -type f -name "*integration_test.go" & find . -type f -name "*e2e_test.go" -not -path "./testbed/*"; } INTEGRATION_MODS := $(shell $(FIND_INTEGRATION_TEST_MODS) | xargs $(TO_MOD_DIR) | uniq) @@ -58,13 +59,18 @@ all-modules: all-groups: @echo "receiver-0: $(RECEIVER_MODS_0)" @echo "\nreceiver-1: $(RECEIVER_MODS_1)" + @echo "\nreceiver-2: $(RECEIVER_MODS_2)" + @echo "\nreceiver-3: $(RECEIVER_MODS_3)" @echo "\nreceiver: $(RECEIVER_MODS)" @echo "\nprocessor: $(PROCESSOR_MODS)" - @echo "\nexporter: $(EXPORTER_MODS)" + @echo "\nexporter-0: $(EXPORTER_MODS_0)" + @echo "\nexporter-1: $(EXPORTER_MODS_1)" @echo "\nextension: $(EXTENSION_MODS)" @echo "\nconnector: $(CONNECTOR_MODS)" @echo "\ninternal: $(INTERNAL_MODS)" @echo "\npkg: $(PKG_MODS)" + @echo "\ncmd-0: $(CMD_MODS_0)" + @echo "\ncmd-1: $(CMD_MODS_1)" @echo "\ncmd: $(CMD_MODS)" @echo "\noverride: $(OVERRIDE_MODS)" @echo "\nother: $(OTHER_MODS)" @@ -78,7 +84,7 @@ all-common: .PHONY: e2e-test e2e-test: otelcontribcol oteltestbedcol - $(MAKE) -C testbed run-tests + $(MAKE) --no-print-directory -C testbed run-tests .PHONY: integration-test integration-test: @@ -94,6 +100,10 @@ stability-tests: otelcontribcol @echo Stability tests are disabled until we have a stable performance environment. @echo To enable the tests replace this echo by $(MAKE) -C testbed run-stability-tests +.PHONY: gogci +gogci: + $(MAKE) $(FOR_GROUP_TARGET) TARGET="gci" + .PHONY: gotidy gotidy: $(MAKE) $(FOR_GROUP_TARGET) TARGET="tidy" @@ -111,6 +121,10 @@ gotest-with-cover: @$(MAKE) $(FOR_GROUP_TARGET) TARGET="test-with-cover" $(GOCMD) tool covdata textfmt -i=./coverage/unit -o ./$(GROUP)-coverage.txt +.PHONY: gointegration-test +gointegration-test: + $(MAKE) $(FOR_GROUP_TARGET) TARGET="mod-integration-test" + .PHONY: gofmt gofmt: $(MAKE) $(FOR_GROUP_TARGET) TARGET="fmt" @@ -148,18 +162,11 @@ push-tags: $(MULTIMOD) git push ${REMOTE} $${tag}; \ done; -DEPENDABOT_PATH=".github/dependabot.yml" -.PHONY: gendependabot -gendependabot: - cd cmd/githubgen && $(GOCMD) install . - githubgen -dependabot - - # Define a delegation target for each module .PHONY: $(ALL_MODS) $(ALL_MODS): @echo "Running target '$(TARGET)' in module '$@' as part of group '$(GROUP)'" - $(MAKE) -C $@ $(TARGET) + $(MAKE) --no-print-directory -C $@ $(TARGET) # Trigger each module's delegation target .PHONY: for-all-target @@ -174,12 +181,24 @@ for-receiver-0-target: $(RECEIVER_MODS_0) .PHONY: for-receiver-1-target for-receiver-1-target: $(RECEIVER_MODS_1) +.PHONY: for-receiver-2-target +for-receiver-2-target: $(RECEIVER_MODS_2) + +.PHONY: for-receiver-3-target +for-receiver-3-target: $(RECEIVER_MODS_3) + .PHONY: for-processor-target for-processor-target: $(PROCESSOR_MODS) .PHONY: for-exporter-target for-exporter-target: $(EXPORTER_MODS) +.PHONY: for-exporter-0-target +for-exporter-0-target: $(EXPORTER_MODS_0) + +.PHONY: for-exporter-1-target +for-exporter-1-target: $(EXPORTER_MODS_1) + .PHONY: for-extension-target for-extension-target: $(EXTENSION_MODS) @@ -195,6 +214,12 @@ for-pkg-target: $(PKG_MODS) .PHONY: for-cmd-target for-cmd-target: $(CMD_MODS) +.PHONY: for-cmd-0-target +for-cmd-0-target: $(CMD_MODS_0) + +.PHONY: for-cmd-1-target +for-cmd-1-target: $(CMD_MODS_1) + .PHONY: for-override-target for-override-target: $(OVERRIDE_MODS) @@ -232,24 +257,28 @@ docker-otelcontribcol: .PHONY: docker-telemetrygen docker-telemetrygen: - COMPONENT=telemetrygen $(MAKE) docker-component + GOOS=linux GOARCH=$(GOARCH) $(MAKE) telemetrygen + cp bin/telemetrygen_* cmd/telemetrygen/ + cd cmd/telemetrygen && docker build --platform linux/$(GOARCH) -t telemetrygen:latest . + rm cmd/telemetrygen/telemetrygen_* .PHONY: generate -generate: - cd cmd/mdatagen && $(GOCMD) install . +generate: install-tools + cd ./internal/tools && go install go.opentelemetry.io/collector/cmd/mdatagen $(MAKE) for-all CMD="$(GOCMD) generate ./..." -.PHONY: mdatagen-test -mdatagen-test: - cd cmd/mdatagen && $(GOCMD) install . - cd cmd/mdatagen && $(GOCMD) generate ./... - cd cmd/mdatagen && $(GOCMD) test ./... +.PHONY: githubgen-install +githubgen-install: + cd cmd/githubgen && $(GOCMD) install . .PHONY: gengithub -gengithub: - cd cmd/githubgen && $(GOCMD) install . +gengithub: githubgen-install githubgen +.PHONY: gendistributions +gendistributions: githubgen-install + githubgen distributions + .PHONY: update-codeowners update-codeowners: gengithub generate @@ -289,7 +318,7 @@ chlog-update-aws: $(CHLOGGEN) .PHONY: genotelcontribcol genotelcontribcol: $(BUILDER) $(BUILDER) --skip-compilation --config cmd/otelcontribcol/builder-config.yaml --output-path cmd/otelcontribcol - $(MAKE) -C cmd/otelcontribcol fmt + $(MAKE) --no-print-directory -C cmd/otelcontribcol fmt # Build the Collector executable. .PHONY: otelcontribcol @@ -300,7 +329,7 @@ otelcontribcol: .PHONY: genoteltestbedcol genoteltestbedcol: $(BUILDER) $(BUILDER) --skip-compilation --config cmd/oteltestbedcol/builder-config.yaml --output-path cmd/oteltestbedcol - $(MAKE) -C cmd/oteltestbedcol fmt + $(MAKE) --no-print-directory -C cmd/oteltestbedcol fmt # Build the Collector executable, with only components used in testbed. .PHONY: oteltestbedcol @@ -314,14 +343,13 @@ telemetrygen: cd ./cmd/telemetrygen && GO111MODULE=on CGO_ENABLED=0 $(GOCMD) build -trimpath -o ../../bin/telemetrygen_$(GOOS)_$(GOARCH)$(EXTENSION) \ -tags $(GO_BUILD_TAGS) . -.PHONY: update-dep -update-dep: - $(MAKE) $(FOR_GROUP_TARGET) TARGET="updatedep" - $(MAKE) otelcontribcol - .PHONY: update-otel -update-otel: - $(MAKE) update-dep MODULE=go.opentelemetry.io/collector VERSION=$(OTEL_VERSION) RC_VERSION=$(OTEL_RC_VERSION) STABLE_VERSION=$(OTEL_STABLE_VERSION) +update-otel:$(MULTIMOD) + $(MULTIMOD) sync -s=true -o ../opentelemetry-collector -m stable --commit-hash $(OTEL_STABLE_VERSION) + git add . && git commit -s -m "[chore] multimod update stable modules" + $(MULTIMOD) sync -s=true -o ../opentelemetry-collector -m beta --commit-hash $(OTEL_VERSION) + git add . && git commit -s -m "[chore] multimod update beta modules" + $(MAKE) gotidy .PHONY: otel-from-tree otel-from-tree: @@ -333,7 +361,7 @@ otel-from-tree: # 2. Run `make otel-from-tree` (only need to run it once to remap go modules) # 3. You can now build contrib and it will use your local otel core changes. # 4. Before committing/pushing your contrib changes, undo by running `make otel-from-lib`. - $(MAKE) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector=$(SRC_ROOT)/../opentelemetry-collector" + $(MAKE) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector=$(SRC_PARENT_DIR)/opentelemetry-collector" .PHONY: otel-from-lib otel-from-lib: @@ -342,8 +370,9 @@ otel-from-lib: .PHONY: build-examples build-examples: - docker-compose -f examples/demo/docker-compose.yaml build - docker-compose -f exporter/splunkhecexporter/example/docker-compose.yml build + docker compose -f examples/demo/docker-compose.yaml build + cd examples/secure-tracing/certs && $(MAKE) clean && $(MAKE) all && docker compose -f ../docker-compose.yaml build + docker compose -f exporter/splunkhecexporter/example/docker-compose.yml build .PHONY: deb-rpm-package %-package: ARCH ?= amd64 @@ -426,10 +455,20 @@ genconfigdocs: .PHONY: generate-gh-issue-templates generate-gh-issue-templates: - for FILE in bug_report feature_request other; do \ - YAML_FILE=".github/ISSUE_TEMPLATE/$${FILE}.yaml"; \ - TMP_FILE=".github/ISSUE_TEMPLATE/$${FILE}.yaml.tmp"; \ - cat "$${YAML_FILE}" > "$${TMP_FILE}"; \ - FILE="$${TMP_FILE}" ./.github/workflows/scripts/add-component-options.sh > "$${YAML_FILE}"; \ - rm "$${TMP_FILE}"; \ - done + cd cmd/githubgen && $(GOCMD) install . + githubgen issue-templates + +.PHONY: checks +checks: + $(MAKE) checkdoc + $(MAKE) checkmetadata + $(MAKE) checkapi + $(MAKE) -j4 goporto + $(MAKE) crosslink + $(MAKE) -j4 gotidy + $(MAKE) genotelcontribcol + $(MAKE) genoteltestbedcol + $(MAKE) gendistributions + $(MAKE) -j4 generate + $(MAKE) multimod-verify + git diff --exit-code || (echo 'Some files need committing' && git status && exit 1) diff --git a/Makefile.Common b/Makefile.Common index 841e328c58cb..24acdf51aac5 100644 --- a/Makefile.Common +++ b/Makefile.Common @@ -20,16 +20,18 @@ endif # SRC_ROOT is the top of the source tree. SRC_ROOT := $(shell git rev-parse --show-toplevel) +# SRC_PARENT_DIR is the absolute path of source tree's parent directory +SRC_PARENT_DIR := $(shell dirname $(SRC_ROOT)) # build tags required by any component should be defined as an independent variables and later added to GO_BUILD_TAGS below GO_BUILD_TAGS="" -GOTEST_OPT?= -race -timeout 300s -parallel 4 --tags=$(GO_BUILD_TAGS) +GOTEST_TIMEOUT?= 300s +GOTEST_OPT?= -race -timeout $(GOTEST_TIMEOUT) -parallel 4 --tags=$(GO_BUILD_TAGS) GOTEST_INTEGRATION_OPT?= -race -timeout 360s -parallel 4 GOTEST_OPT_WITH_COVERAGE = $(GOTEST_OPT) -coverprofile=coverage.txt -covermode=atomic GOTEST_OPT_WITH_INTEGRATION=$(GOTEST_INTEGRATION_OPT) -tags=integration,$(GO_BUILD_TAGS) -run=Integration GOTEST_OPT_WITH_INTEGRATION_COVERAGE=$(GOTEST_OPT_WITH_INTEGRATION) -coverprofile=integration-coverage.txt -covermode=atomic GOCMD?= go -GOTEST=$(GOCMD) test GOOS=$(shell $(GOCMD) env GOOS) GOARCH=$(shell $(GOCMD) env GOARCH) @@ -68,6 +70,10 @@ CROSSLINK := $(TOOLS_BIN_DIR)/crosslink GOJUNIT := $(TOOLS_BIN_DIR)/go-junit-report BUILDER := $(TOOLS_BIN_DIR)/builder GOVULNCHECK := $(TOOLS_BIN_DIR)/govulncheck +GCI := $(TOOLS_BIN_DIR)/gci +GOTESTSUM := $(TOOLS_BIN_DIR)/gotestsum + +GOTESTSUM_OPT?= --rerun-fails=1 # BUILD_TYPE should be one of (dev, release). BUILD_TYPE?=release @@ -79,14 +85,25 @@ ALL_SRC := $(shell find $(ALL_PKG_DIRS) -name '*.go' \ -not -path '*/local/*' \ -type f | sort) +ALL_SRC_AND_SHELL := find . -type f \( -iname '*.go' -o -iname "*.sh" \) ! -path '**/third_party/*' | sort + # All source code and documents. Used in spell check. -ALL_SRC_AND_DOC := $(shell find $(ALL_PKG_DIRS) -name "*.md" -o -name "*.go" -o -name "*.yaml" \ - -not -path '*/third_party/*' \ - -type f | sort) +ALL_SRC_AND_DOC_CMD := find $(ALL_PKG_DIRS) -name "*.md" -o -name "*.go" -o -name "*.yaml" -not -path '*/third_party/*' -type f | sort +ifeq ($(UNIX_SHELL_ON_WINDOWS),true) + # Windows has a low limit, 8192 chars, to create a process. Workaround it by breaking it in smaller commands. + MISSPELL_CMD := $(ALL_SRC_AND_DOC_CMD) | xargs -n 20 $(MISSPELL) + MISSPELL_CORRECTION_CMD := $(ALL_SRC_AND_DOC_CMD) | xargs -n 20 $(MISSPELL_CORRECTION) +else + ALL_SRC_AND_DOC := $(shell $(ALL_SRC_AND_DOC_CMD)) + MISSPELL_CMD := $(MISSPELL) $(ALL_SRC_AND_DOC) + MISSPELL_CORRECTION_CMD := $(MISSPELL_CORRECTION) $(ALL_SRC_AND_DOC) +endif # ALL_PKGS is used with 'go cover' ALL_PKGS := $(shell $(GOCMD) list $(sort $(dir $(ALL_SRC)))) +ADDLICENSE_CMD := $(ADDLICENSE) -s=only -y "" -c "The OpenTelemetry Authors" + pwd: @pwd @@ -105,61 +122,66 @@ all-pkg-dirs: common: lint test .PHONY: test -test: - $(GOTEST) $(GOTEST_OPT) ./... +test: $(GOTESTSUM) + $(GOTESTSUM) $(GOTESTSUM_OPT) --packages="./..." -- $(GOTEST_OPT) .PHONY: test-with-cover -test-with-cover: +test-with-cover: $(GOTESTSUM) mkdir -p $(PWD)/coverage/unit - $(GOTEST) $(GOTEST_OPT) -cover ./... -covermode=atomic -args -test.gocoverdir="$(PWD)/coverage/unit" + $(GOTESTSUM) $(GOTESTSUM_OPT) --packages="./..." -- $(GOTEST_OPT) -cover -covermode=atomic -args -test.gocoverdir="$(PWD)/coverage/unit" .PHONY: do-unit-tests-with-cover -do-unit-tests-with-cover: +do-unit-tests-with-cover: $(GOTESTSUM) @echo "running $(GOCMD) unit test ./... + coverage in `pwd`" - $(GOTEST) $(GOTEST_OPT_WITH_COVERAGE) ./... + $(GOTESTSUM) $(GOTESTSUM_OPT) --packages="./..." -- $(GOTEST_OPT_WITH_COVERAGE) $(GOCMD) tool cover -html=coverage.txt -o coverage.html .PHONY: mod-integration-test -mod-integration-test: +mod-integration-test: $(GOTESTSUM) @echo "running $(GOCMD) integration test ./... in `pwd`" - $(GOTEST) $(GOTEST_OPT_WITH_INTEGRATION) ./... + $(GOTESTSUM) $(GOTESTSUM_OPT) --packages="./..." -- $(GOTEST_OPT_WITH_INTEGRATION) @if [ -e integration-coverage.txt ]; then \ $(GOCMD) tool cover -html=integration-coverage.txt -o integration-coverage.html; \ fi .PHONY: do-integration-tests-with-cover -do-integration-tests-with-cover: +do-integration-tests-with-cover: $(GOTESTSUM) @echo "running $(GOCMD) integration test ./... + coverage in `pwd`" - $(GOTEST) $(GOTEST_OPT_WITH_INTEGRATION_COVERAGE) ./... + $(GOTESTSUM) $(GOTESTSUM_OPT) --packages="./..." -- $(GOTEST_OPT_WITH_INTEGRATION_COVERAGE) @if [ -e integration-coverage.txt ]; then \ $(GOCMD) tool cover -html=integration-coverage.txt -o integration-coverage.html; \ fi .PHONY: benchmark -benchmark: - $(GOTEST) -bench=. -run=notests --tags=$(GO_BUILD_TAGS) $(ALL_PKGS) +benchmark: $(GOTESTSUM) + $(GOTESTSUM) $(GOTESTSUM_OPT) --packages="$(ALL_PKGS)" -- -bench=. -run=notests --tags=$(GO_BUILD_TAGS) .PHONY: addlicense addlicense: $(ADDLICENSE) - @ADDLICENSEOUT=`$(ADDLICENSE) -s=only -y "" -c 'The OpenTelemetry Authors' $(ALL_SRC) 2>&1`; \ - if [ "$$ADDLICENSEOUT" ]; then \ - echo "$(ADDLICENSE) FAILED => add License errors:\n"; \ - echo "$$ADDLICENSEOUT\n"; \ - exit 1; \ - else \ - echo "Add License finished successfully"; \ - fi + @ADDLICENSEOUT=$$(for f in $$($(ALL_SRC_AND_SHELL)); do \ + `$(ADDLICENSE_CMD) "$$f" 2>&1`; \ + done); \ + if [ "$$ADDLICENSEOUT" ]; then \ + echo "$(ADDLICENSE) FAILED => add License errors:\n"; \ + echo "$$ADDLICENSEOUT\n"; \ + exit 1; \ + else \ + echo "Add License finished successfully"; \ + fi .PHONY: checklicense checklicense: $(ADDLICENSE) - @licRes=$$(for f in $$(find . -type f \( -iname '*.go' -o -iname '*.sh' \) ! -path '**/third_party/*') ; do \ - awk '/Copyright The OpenTelemetry Authors|generated|GENERATED/ && NR<=3 { found=1; next } END { if (!found) print FILENAME }' $$f; \ - awk '/SPDX-License-Identifier: Apache-2.0|generated|GENERATED/ && NR<=4 { found=1; next } END { if (!found) print FILENAME }' $$f; \ - done); \ - if [ -n "$${licRes}" ]; then \ - echo "license header checking failed:"; echo "$${licRes}"; \ - exit 1; \ - fi + @licRes=$$(for f in $$($(ALL_SRC_AND_SHELL)); do \ + awk '/Copyright The OpenTelemetry Authors|generated|GENERATED/ && NR<=3 { found=1; next } END { if (!found) print FILENAME }' $$f; \ + awk '/SPDX-License-Identifier: Apache-2.0|generated|GENERATED/ && NR<=4 { found=1; next } END { if (!found) print FILENAME }' $$f; \ + $(ADDLICENSE_CMD) -check "$$f" 2>&1 || echo "$$f"; \ + done); \ + if [ -n "$${licRes}" ]; then \ + echo "license header checking failed:"; echo "$${licRes}"; \ + exit 1; \ + else \ + echo "Check License finished successfully"; \ + fi .PHONY: checklinks checklinks: @@ -183,22 +205,22 @@ govulncheck: $(GOVULNCHECK) .PHONY: tidy tidy: rm -fr go.sum - $(GOCMD) mod tidy -compat=1.20 + $(GOCMD) mod tidy -compat=1.21 .PHONY: misspell misspell: $(TOOLS_BIN_DIR)/misspell @echo "running $(MISSPELL)" - @$(MISSPELL) $(ALL_SRC_AND_DOC) + @$(MISSPELL_CMD) .PHONY: misspell-correction misspell-correction: $(TOOLS_BIN_DIR)/misspell - $(MISSPELL_CORRECTION) $(ALL_SRC_AND_DOC) + $(MISSPELL_CORRECTION_CMD) .PHONY: moddownload moddownload: $(GOCMD) mod download -.PHONY: updatedep -updatedep: - $(PWD)/internal/buildscripts/update-dep - @$(MAKE) tidy +.PHONY: gci +gci: $(TOOLS_BIN_DIR)/gci + @echo "running $(GCI)" + @$(GCI) write -s standard -s default -s "prefix(github.com/open-telemetry/opentelemetry-collector-contrib)" $(ALL_SRC_AND_DOC) diff --git a/NOTICE b/NOTICE new file mode 100644 index 000000000000..72a751368a46 --- /dev/null +++ b/NOTICE @@ -0,0 +1,27 @@ +receiver/hostmetricsreceiver/internal/scraper/processscraper/process.go contains code originating from gopsutil under internal/common/common.go. + +Copyright (c) 2014, WAKAYAMA Shirou +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the gopsutil authors nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/README.md b/README.md index 188169b53b40..13def08509dc 100644 --- a/README.md +++ b/README.md @@ -30,15 +30,10 @@ Vision   •   - Design -   •   Monitoring   •   - Performance -   •   Security   •   - Roadmap

@@ -75,10 +70,6 @@ See [CONTRIBUTING.md](CONTRIBUTING.md). Triagers ([@open-telemetry/collector-contrib-triagers](https://github.com/orgs/open-telemetry/teams/collector-contrib-triagers)) - [Benedikt Bongartz](https://github.com/frzifus), Red Hat -- [Bryan Aguilar](https://github.com/bryan-aguilar), AWS -- [Curtis Robert](https://github.com/crobert-1), Splunk -- [Gabriel Aszalos](https://github.com/gbbr), DataDog -- [Goutham Veeramachaneni](https://github.com/gouthamve), Grafana - [Jared Tan](https://github.com/JaredTan95), DaoCloud - [Matt Wear](https://github.com/mwear), Lightstep - [Murphy Chen](https://github.com/Frapschen), DaoCloud @@ -87,14 +78,17 @@ Triagers ([@open-telemetry/collector-contrib-triagers](https://github.com/orgs/o Emeritus Triagers: - [Alolita Sharma](https://github.com/alolita), AWS +- [Gabriel Aszalos](https://github.com/gbbr), DataDog +- [Goutham Veeramachaneni](https://github.com/gouthamve), Grafana - [Punya Biswal](https://github.com/punya), Google - [Steve Flanders](https://github.com/flands), Splunk Approvers ([@open-telemetry/collector-contrib-approvers](https://github.com/orgs/open-telemetry/teams/collector-contrib-approvers)): -- [Andrzej Stencel](https://github.com/astencel-sumo), Sumo Logic - [Anthony Mirabella](https://github.com/Aneurysm9), AWS - [Antoine Toulme](https://github.com/atoulme), Splunk +- [Bryan Aguilar](https://github.com/bryan-aguilar), AWS +- [Curtis Robert](https://github.com/crobert-1), Splunk - [David Ashpole](https://github.com/dashpole), Google - [Yang Song](https://github.com/songy23), DataDog - [Ziqi Zhao](https://github.com/fatsheep9146), Alibaba @@ -106,7 +100,8 @@ Emeritus Approvers: Maintainers ([@open-telemetry/collector-contrib-maintainer](https://github.com/orgs/open-telemetry/teams/collector-contrib-maintainer)): -- [Alex Boten](https://github.com/codeboten), ServiceNow +- [Alex Boten](https://github.com/codeboten), Honeycomb +- [Andrzej Stencel](https://github.com/astencel-sumo), Sumo Logic - [Bogdan Drutu](https://github.com/bogdandrutu), Snowflake - [Daniel Jaglowski](https://github.com/djaglowski), observIQ - [Dmitrii Anoshin](https://github.com/dmitryax), Splunk @@ -127,7 +122,7 @@ Learn more about roles in the [community repository](https://github.com/open-tel When creating a PR please follow the process [described here](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CONTRIBUTING.md#how-to-structure-prs-to-get-expedient-reviews). -News PRs will be automatically associated with the reviewers based on +New PRs will be automatically associated with the reviewers based on [CODEOWNERS](.github/CODEOWNERS). PRs will be also automatically assigned to one of the maintainers or approvers for facilitation. diff --git a/cmd/checkapi/main.go b/cmd/checkapi/main.go index 609d1fd55991..5e99e6237c36 100644 --- a/cmd/checkapi/main.go +++ b/cmd/checkapi/main.go @@ -47,10 +47,11 @@ func run(folder string, allowlistFilePath string) error { } allowlist := strings.Split(string(allowlistData), "\n") var errs []error - err = filepath.Walk(folder, func(path string, info fs.FileInfo, err error) error { + err = filepath.Walk(folder, func(path string, info fs.FileInfo, _ error) error { if info.Name() == "go.mod" { base := filepath.Dir(path) - relativeBase, err := filepath.Rel(folder, base) + var relativeBase string + relativeBase, err = filepath.Rel(folder, base) if err != nil { return err } @@ -67,7 +68,7 @@ func run(folder string, allowlistFilePath string) error { return nil } } - if err := walkFolder(base, componentType); err != nil { + if err = walkFolder(base, componentType); err != nil { errs = append(errs, err) } } @@ -172,12 +173,13 @@ func walkFolder(folder string, componentType string) error { return nil } + if len(result.Functions) == 0 { + return nil + } if len(result.Functions) > 1 { return fmt.Errorf("%s has more than one function: %q", folder, strings.Join(fnNames, ",")) } - if len(result.Functions) == 0 { - return fmt.Errorf("%s has no functions defined", folder) - } + newFactoryFn := result.Functions[0] if newFactoryFn.Name != "NewFactory" { return fmt.Errorf("%s does not define a NewFactory function", folder) diff --git a/cmd/configschema/README.md b/cmd/configschema/README.md index 6031b2d628fd..16b99d0f2a93 100644 --- a/cmd/configschema/README.md +++ b/cmd/configschema/README.md @@ -1,3 +1,6 @@ +> Deprecated: [v0.92.0] This tool is deprecated and will be removed in a future release. +> See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 + # ConfigSchema API This package contains an API that can be used to introspect the configuration diff --git a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/README.md b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/README.md index 5886f1b84193..c3bc43745f84 100644 --- a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/README.md +++ b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/README.md @@ -1,3 +1,6 @@ +> Deprecated: [v0.92.0] This tool is deprecated and will be removed in a future release. +> See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 + # Config Metadata YAML Generator (alpha) This CLI application creates a configuration metadata YAML file for each diff --git a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/cli.go b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/cli.go index 6fc9a20a09b1..bf4142954d83 100644 --- a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/cli.go +++ b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/cli.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 package cfgmetadatagen import ( @@ -15,6 +17,8 @@ import ( // GenerateFiles is the entry point for cfgmetadatagen. Component factories are // passed in so it can be used by other distros. +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 func GenerateFiles(factories otelcol.Factories, sourceDir string, outputDir string) error { dr := configschema.NewDirResolver(sourceDir, configschema.DefaultModule) writer := newMetadataFileWriter(outputDir) @@ -31,7 +35,7 @@ func GenerateFiles(factories otelcol.Factories, sourceDir string, outputDir stri func writeComponentYAML(yw metadataWriter, cfg configschema.CfgInfo, dr configschema.DirResolver) error { fields, err := configschema.ReadFields(reflect.ValueOf(cfg.CfgInstance), dr) if err != nil { - return fmt.Errorf("error reading fields for component: %w", err) + return fmt.Errorf("error reading fields for component %v/%v: %w", cfg.Group, cfg.Type, err) } yamlBytes, err := yaml.Marshal(fields) if err != nil { diff --git a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/metadata_writer_test.go b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/metadata_writer_test.go index 9350d1646459..cac82e295124 100644 --- a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/metadata_writer_test.go +++ b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/metadata_writer_test.go @@ -14,6 +14,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema" ) @@ -21,7 +22,7 @@ import ( func TestMetadataFileWriter(t *testing.T) { tempDir := t.TempDir() w := newMetadataFileWriter(tempDir) - err := w.write(configschema.CfgInfo{Group: "mygroup", Type: "mytype"}, []byte("hello")) + err := w.write(configschema.CfgInfo{Group: "mygroup", Type: component.MustNewType("mytype")}, []byte("hello")) require.NoError(t, err) file, err := os.Open(filepath.Join(tempDir, "mygroup", "mytype.yaml")) require.NoError(t, err) diff --git a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/package_test.go b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/package_test.go new file mode 100644 index 000000000000..98e6dc536115 --- /dev/null +++ b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package cfgmetadatagen + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/cmd/configschema/cfgmetadatagen/main.go b/cmd/configschema/cfgmetadatagen/main.go index 3efc76ed03d5..e461b4fe7b05 100644 --- a/cmd/configschema/cfgmetadatagen/main.go +++ b/cmd/configschema/cfgmetadatagen/main.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 package main import ( @@ -14,6 +16,7 @@ import ( ) func main() { + sourceDir, outputDir := getFlags() c, err := components.Components() if err != nil { diff --git a/cmd/configschema/comments.go b/cmd/configschema/comments.go index c42da8a3338b..90362a688f6d 100644 --- a/cmd/configschema/comments.go +++ b/cmd/configschema/comments.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 package configschema // import "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema" import ( @@ -28,7 +30,7 @@ func commentsForStruct(v reflect.Value, dr DirResolver) (map[string]string, erro func searchDirsForComments(packageDir, typeName string) (map[string]string, error) { out := map[string]string{} - err := filepath.WalkDir(packageDir, func(path string, d fs.DirEntry, err error) error { + err := filepath.WalkDir(packageDir, func(path string, d fs.DirEntry, _ error) error { if d.IsDir() { commentsForStructName(out, path, typeName) } diff --git a/cmd/configschema/comments_test.go b/cmd/configschema/comments_test.go index 798ad94d935e..2d906a3d3968 100644 --- a/cmd/configschema/comments_test.go +++ b/cmd/configschema/comments_test.go @@ -1,10 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - package configschema import ( @@ -39,7 +35,7 @@ func TestExternalType(t *testing.T) { } func TestSubPackage(t *testing.T) { - s := configtls.TLSClientSetting{} + s := configtls.ClientConfig{} v := reflect.ValueOf(s) _, err := commentsForStruct(v, testDR()) require.NoError(t, err) diff --git a/cmd/configschema/common_test.go b/cmd/configschema/common_test.go index d8a9c2c081ed..3287e534ea3c 100644 --- a/cmd/configschema/common_test.go +++ b/cmd/configschema/common_test.go @@ -1,10 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - package configschema import ( @@ -26,13 +22,13 @@ type testStruct struct { Four bool `mapstructure:"four"` // embedded, package qualified comment time.Duration `mapstructure:"duration"` - Squashed testPerson `mapstructure:",squash"` - PersonPtr *testPerson `mapstructure:"person_ptr"` - PersonStruct testPerson `mapstructure:"person_struct"` - Persons []testPerson `mapstructure:"persons"` - PersonPtrs []*testPerson `mapstructure:"person_ptrs"` - Ignored string `mapstructure:"-"` - TLS configtls.TLSClientSetting `mapstructure:"tls"` + Squashed testPerson `mapstructure:",squash"` + PersonPtr *testPerson `mapstructure:"person_ptr"` + PersonStruct testPerson `mapstructure:"person_struct"` + Persons []testPerson `mapstructure:"persons"` + PersonPtrs []*testPerson `mapstructure:"person_ptrs"` + Ignored string `mapstructure:"-"` + TLS configtls.ClientConfig `mapstructure:"tls"` } func testDR() DirResolver { diff --git a/cmd/configschema/configs.go b/cmd/configschema/configs.go index 62bd9f00a87a..cb5caad802e4 100644 --- a/cmd/configschema/configs.go +++ b/cmd/configschema/configs.go @@ -81,7 +81,10 @@ func GetAllCfgInfos(components otelcol.Factories) []CfgInfo { // config for the component specified by the passed-in componentType and // componentName. func GetCfgInfo(components otelcol.Factories, componentType, componentName string) (CfgInfo, error) { - t := component.Type(componentName) + t, err := component.NewType(componentName) + if err != nil { + return CfgInfo{}, fmt.Errorf("failed to build component.Type: %w", err) + } switch componentType { case receiver: f := components.Receivers[t] @@ -113,6 +116,16 @@ func GetCfgInfo(components otelcol.Factories, componentType, componentName strin Group: componentType, CfgInstance: f.CreateDefaultConfig(), }, nil + case connector: + f := components.Connectors[t] + if f == nil { + return CfgInfo{}, fmt.Errorf("unknown %s name %q", componentType, componentName) + } + return CfgInfo{ + Type: f.Type(), + Group: componentType, + CfgInstance: f.CreateDefaultConfig(), + }, nil case extension: f := components.Extensions[t] if f == nil { diff --git a/cmd/configschema/configs_test.go b/cmd/configschema/configs_test.go index 8c9c585b72ee..483cbde192c3 100644 --- a/cmd/configschema/configs_test.go +++ b/cmd/configschema/configs_test.go @@ -1,10 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - package configschema import ( diff --git a/cmd/configschema/docsgen/README.md b/cmd/configschema/docsgen/README.md index 61365fb696e4..7b342699d92c 100644 --- a/cmd/configschema/docsgen/README.md +++ b/cmd/configschema/docsgen/README.md @@ -1,3 +1,6 @@ +> Deprecated: [v0.92.0] This tool is deprecated and will be removed in a future release. +> See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 + # Docsgen CLI Tool This package contains a CLI tool that generates markdown files for collector diff --git a/cmd/configschema/docsgen/docsgen/cli.go b/cmd/configschema/docsgen/docsgen/cli.go index f50af0fe9d05..10b7a536e02f 100644 --- a/cmd/configschema/docsgen/docsgen/cli.go +++ b/cmd/configschema/docsgen/docsgen/cli.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 package docsgen // import "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema/docsgen/docsgen" import ( @@ -23,6 +25,8 @@ const mdFileName = "config.md" // CLI is the entrypoint for this package's functionality. It handles command- // line arguments for the docsgen executable and produces config documentation // for the specified components. +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 func CLI(factories otelcol.Factories, dr configschema.DirResolver) { tableTmpl, err := tableTemplate() if err != nil { @@ -101,7 +105,7 @@ func writeConfigDoc( panic(err) } - mdBytes := renderHeader(string(ci.Type), ci.Group, f.Doc) + mdBytes := renderHeader(ci.Type.String(), ci.Group, f.Doc) f.Name = typeToName(f.Type) diff --git a/cmd/configschema/docsgen/docsgen/cli_test.go b/cmd/configschema/docsgen/docsgen/cli_test.go index 72774087a9b3..b47c5e65fa08 100644 --- a/cmd/configschema/docsgen/docsgen/cli_test.go +++ b/cmd/configschema/docsgen/docsgen/cli_test.go @@ -1,10 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - package docsgen import ( @@ -16,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/otelcol" "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema" @@ -33,10 +30,10 @@ func TestWriteConfigDoc(t *testing.T) { dr, configschema.CfgInfo{ Group: "receiver", - Type: "redis", + Type: component.MustNewType("redis"), CfgInstance: cfg, }, - func(dir string, bytes []byte, perm os.FileMode) error { + func(dir string, _ []byte, _ os.FileMode) error { outputFilename = dir return nil }, @@ -51,7 +48,7 @@ func TestHandleCLI_NoArgs(t *testing.T) { defaultComponents(t), configschema.NewDefaultDirResolver(), testTemplate(t), - func(filename string, data []byte, perm os.FileMode) error { return nil }, + func(_ string, _ []byte, _ os.FileMode) error { return nil }, wr, ) assert.Equal(t, 3, len(wr.lines)) diff --git a/cmd/configschema/docsgen/docsgen/package_test.go b/cmd/configschema/docsgen/docsgen/package_test.go new file mode 100644 index 000000000000..b0e28474f911 --- /dev/null +++ b/cmd/configschema/docsgen/docsgen/package_test.go @@ -0,0 +1,31 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package docsgen + +import ( + "testing" + + "go.uber.org/goleak" +) + +// The Ignore function calls prevent catching leaks generated by indirect dependencies. +// All of these are leaks that we can't fix from within the collector code base. +// Regarding the OpenCensus ignore: see https://github.com/census-instrumentation/opencensus-go/issues/1191 +// Regarding the DataDog ignore: see https://github.com/DataDog/datadog-agent/issues/22030 +// Regarding the database/sql ignore: see https://github.com/SAP/go-hdb/issues/130 +// Regarding the SAP/go-hdb ignore: see https://github.com/SAP/go-hdb/issues/131 +// Regarding the cihub/seelog ignore: see https://github.com/cihub/seelog/issues/182 +// Regarding the godbus/dbus ignore: see https://github.com/99designs/keyring/issues/135 +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m, + goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreTopFunction("github.com/DataDog/datadog-agent/pkg/trace/metrics/timing.(*Set).Autoreport.func1"), + // Unfortunately this ignore can't be anymore specific, even though it's caused by the SAP/go-hdb/driver + // package. There's no reference to this package in the goleak output. This has the potential of + // hiding future leaks, so we should remove as soon as the referenced issue is resolved. + goleak.IgnoreTopFunction("database/sql.(*DB).connectionOpener"), + goleak.IgnoreTopFunction("github.com/SAP/go-hdb/driver.(*metrics).collect"), + goleak.IgnoreAnyFunction("github.com/cihub/seelog.(*asyncLoopLogger).processQueue"), + goleak.IgnoreAnyFunction("github.com/godbus/dbus.(*Conn).inWorker")) +} diff --git a/cmd/configschema/docsgen/docsgen/template.go b/cmd/configschema/docsgen/docsgen/template.go index 1c5d7a2a6359..4475c859161b 100644 --- a/cmd/configschema/docsgen/docsgen/template.go +++ b/cmd/configschema/docsgen/docsgen/template.go @@ -28,14 +28,14 @@ func join(s string) string { return strings.ReplaceAll(s, "\n", " ") } -// mkAnchor takes a name and a type (e.g. "configtls.TLSClientSetting") and +// mkAnchor takes a name and a type (e.g. "configtls.ClientConfig") and // returns a string suitable for use as a markdown anchor. func mkAnchor(name, typ string) string { if isDuration(typ) { return "time-Duration" } idx := strings.IndexRune(typ, '.') - // strip "configtls." from e.g. "configtls.TLSClientSetting" + // strip "configtls." from e.g. "configtls.ClientConfig" typeStripped := typ[idx+1:] concat := fmt.Sprintf("%s-%s", name, typeStripped) asterisksRemoved := strings.ReplaceAll(concat, "*", "") diff --git a/cmd/configschema/docsgen/docsgen/template_test.go b/cmd/configschema/docsgen/docsgen/template_test.go index 36ec2d75f74e..0f25a355eb21 100644 --- a/cmd/configschema/docsgen/docsgen/template_test.go +++ b/cmd/configschema/docsgen/docsgen/template_test.go @@ -1,10 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - package docsgen import ( diff --git a/cmd/configschema/docsgen/docsgen/testdata/otlp-receiver.json b/cmd/configschema/docsgen/docsgen/testdata/otlp-receiver.json index 42e67df1fb06..b7d9f54fe147 100644 --- a/cmd/configschema/docsgen/docsgen/testdata/otlp-receiver.json +++ b/cmd/configschema/docsgen/docsgen/testdata/otlp-receiver.json @@ -14,7 +14,7 @@ "Fields": [ { "Name": "grpc", - "Type": "*configgrpc.GRPCServerSettings", + "Type": "*configgrpc.ServerConfig", "Kind": "ptr", "Default": null, "Doc": "", @@ -37,7 +37,7 @@ }, { "Name": "tls_settings", - "Type": "*configtls.TLSServerSetting", + "Type": "*configtls.ServerConfig", "Kind": "ptr", "Default": null, "Doc": "Configures the protocol to use TLS.\nThe default value is nil, which will cause the protocol to not use TLS.\n", @@ -261,7 +261,7 @@ }, { "Name": "http", - "Type": "*confighttp.HTTPServerSettings", + "Type": "*confighttp.ServerConfig", "Kind": "ptr", "Default": null, "Doc": "", @@ -276,7 +276,7 @@ }, { "Name": "tls_settings", - "Type": "*configtls.TLSServerSetting", + "Type": "*configtls.ServerConfig", "Kind": "ptr", "Default": null, "Doc": "TLSSetting struct exposes TLS client configuration.\n", diff --git a/cmd/configschema/docsgen/main.go b/cmd/configschema/docsgen/main.go index 03eb1705523c..2d1495cccc84 100644 --- a/cmd/configschema/docsgen/main.go +++ b/cmd/configschema/docsgen/main.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 package main import ( diff --git a/cmd/configschema/fields_test.go b/cmd/configschema/fields_test.go index 0964edb759d2..22d1a661a59e 100644 --- a/cmd/configschema/fields_test.go +++ b/cmd/configschema/fields_test.go @@ -1,10 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - package configschema import ( diff --git a/cmd/configschema/go.mod b/cmd/configschema/go.mod index 022b733d53af..b54a1bee54b9 100644 --- a/cmd/configschema/go.mod +++ b/cmd/configschema/go.mod @@ -1,210 +1,213 @@ +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema -go 1.20 +go 1.22.0 + +toolchain go1.22.2 require ( github.com/fatih/structtag v1.2.0 - github.com/google/uuid v1.4.0 - github.com/open-telemetry/opentelemetry-collector-contrib v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/otelcol v0.89.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 - golang.org/x/mod v0.14.0 + github.com/google/uuid v1.6.0 + github.com/open-telemetry/opentelemetry-collector-contrib v0.0.0-00010101000000-000000000000 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/otelcol v0.98.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 + go.uber.org/goleak v1.3.0 + golang.org/x/mod v0.17.0 golang.org/x/text v0.14.0 gopkg.in/yaml.v2 v2.4.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.8.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 // indirect - github.com/gocql/gocql v1.3.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 // indirect + 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.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4 // 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.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecstaskobserver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/oidcauthextension v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/loki v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/skywalking v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachesparkreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azuremonitorreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/chronyreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/oracledbreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/pulsarreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.89.0 // indirect - github.com/samber/lo v1.37.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecstaskobserver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/oidcauthextension v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/loki v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/skywalking v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachesparkreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azuremonitorreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/chronyreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/oracledbreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/pulsarreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.98.0 // indirect + github.com/samber/lo v1.38.1 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect - go.opentelemetry.io/collector/exporter v0.89.0 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect + go.opentelemetry.io/collector/exporter v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect ) require ( - bitbucket.org/atlassian/go-asap/v2 v2.6.0 // indirect - cloud.google.com/go v0.110.10 // indirect - cloud.google.com/go/compute v1.23.2 // indirect + bitbucket.org/atlassian/go-asap/v2 v2.8.0 // indirect + cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect - cloud.google.com/go/iam v1.1.4 // indirect - cloud.google.com/go/logging v1.8.1 // indirect - cloud.google.com/go/longrunning v0.5.3 // indirect - cloud.google.com/go/monitoring v1.16.2 // indirect - cloud.google.com/go/pubsub v1.33.0 // indirect - cloud.google.com/go/spanner v1.51.0 // indirect - cloud.google.com/go/trace v1.10.3 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/logging v1.9.0 // indirect + cloud.google.com/go/longrunning v0.5.5 // indirect + cloud.google.com/go/monitoring v1.18.0 // indirect + cloud.google.com/go/pubsub v1.37.0 // indirect + cloud.google.com/go/spanner v1.60.0 // indirect + cloud.google.com/go/trace v1.10.5 // indirect code.cloudfoundry.org/clock v1.0.0 // indirect code.cloudfoundry.org/go-diodes v0.0.0-20211115184647-b584dd5df32c // indirect code.cloudfoundry.org/go-loggregator v7.4.0+incompatible // indirect code.cloudfoundry.org/rfc5424 v0.0.0-20201103192249-000122071b78 // indirect - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect + filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect github.com/AthenZ/athenz v1.10.39 // indirect github.com/Azure/azure-amqp-common-go/v4 v4.2.0 // indirect - github.com/Azure/azure-event-hubs-go/v3 v3.6.1 // indirect - github.com/Azure/azure-kusto-go v0.13.1 // indirect + github.com/Azure/azure-event-hubs-go/v3 v3.6.2 // indirect + github.com/Azure/azure-kusto-go v0.15.2 // indirect github.com/Azure/azure-pipeline-go v0.2.3 // indirect github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 // indirect - github.com/Azure/azure-storage-queue-go v0.0.0-20191125232315-636801874cdd // indirect - github.com/Azure/go-amqp v1.0.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 // indirect + github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe // indirect + github.com/Azure/go-amqp v1.0.5 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.29 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect @@ -213,183 +216,183 @@ require ( github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/ClickHouse/ch-go v0.58.2 // indirect - github.com/ClickHouse/clickhouse-go/v2 v2.15.0 // indirect - github.com/DataDog/agent-payload/v5 v5.0.89 // indirect - github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-api-client-go/v2 v2.18.0 // indirect - github.com/DataDog/datadog-go/v5 v5.1.1 // indirect - github.com/DataDog/go-sqllexer v0.0.8 // indirect + github.com/ClickHouse/ch-go v0.61.5 // indirect + github.com/ClickHouse/clickhouse-go/v2 v2.23.0 // indirect + github.com/Code-Hex/go-generics-cache v1.3.1 // indirect + github.com/DataDog/agent-payload/v5 v5.0.111 // indirect + github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-api-client-go/v2 v2.24.0 // indirect + github.com/DataDog/datadog-go/v5 v5.5.0 // indirect + github.com/DataDog/go-sqllexer v0.0.9 // indirect github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect - github.com/DataDog/gohai v0.0.0-20220718130825-1776f9beb9cc // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 // indirect - github.com/DataDog/sketches-go v1.4.3 // indirect + github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.4 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4 // 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 - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.45.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.45.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.21.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.45.0 // indirect - github.com/IBM/sarama v1.42.1 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.46.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0 // indirect + github.com/IBM/sarama v1.43.1 // indirect github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/Microsoft/hcsshim v0.11.4 // indirect + github.com/Microsoft/hcsshim v0.12.0-rc.3 // indirect github.com/ReneKroon/ttlcache/v2 v2.11.0 // indirect - github.com/SAP/go-hdb v1.6.2 // indirect - github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 // indirect + github.com/SAP/go-hdb v1.8.12 // indirect + github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/aerospike/aerospike-client-go/v6 v6.13.0 // indirect - github.com/alecthomas/participle/v2 v2.1.0 // indirect - github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect - github.com/aliyun/aliyun-log-go-sdk v0.1.63 // indirect - github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-00010101000000-000000000000 // indirect - github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-00010101000000-000000000000 // indirect - github.com/andybalholm/brotli v1.0.6 // indirect - github.com/antonmedv/expr v1.15.3 // indirect - github.com/apache/arrow/go/v12 v12.0.1 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect + github.com/aliyun/aliyun-log-go-sdk v0.1.72 // indirect + github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-20240419190856-2f880467f335 // indirect + github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20240415183253-230331014d2c // indirect + github.com/andybalholm/brotli v1.1.0 // indirect + github.com/apache/arrow/go/v15 v15.0.0 // indirect github.com/apache/pulsar-client-go v0.8.1 // indirect github.com/apache/pulsar-client-go/oauth2 v0.0.0-20220120090717-25e59572242e // indirect - github.com/apache/thrift v0.19.0 // indirect + github.com/apache/thrift v0.20.0 // indirect github.com/ardielle/ardielle-go v1.5.2 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.47.10 // indirect - github.com/aws/aws-sdk-go-v2 v1.22.2 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 // indirect - github.com/aws/aws-sdk-go-v2/config v1.24.0 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.15.2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3 // indirect + github.com/aws/aws-sdk-go v1.51.17 // indirect + github.com/aws/aws-sdk-go-v2 v1.26.1 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect + github.com/aws/aws-sdk-go-v2/config v1.27.11 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.11 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // 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.2.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 // indirect - github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.1 // indirect + github.com/aws/aws-sdk-go-v2/service/kinesis v1.27.4 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 // indirect - github.com/aws/smithy-go v1.16.0 // indirect + github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.29.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect + github.com/aws/smithy-go v1.20.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect github.com/buger/jsonparser v1.1.1 // indirect - github.com/caio/go-tdigest/v4 v4.0.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/checkpoint-restore/go-criu/v5 v5.3.0 // indirect github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect - github.com/cilium/ebpf v0.9.1 // indirect + github.com/cilium/ebpf v0.11.0 // indirect github.com/cloudfoundry-incubator/uaago v0.0.0-20190307164349-8136b7bbe76e // indirect - github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect - github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect - github.com/containerd/cgroups v1.1.0 // indirect - github.com/containerd/cgroups/v3 v3.0.2 // indirect + github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa // indirect + github.com/containerd/cgroups/v3 v3.0.3 // indirect github.com/containerd/console v1.0.3 // indirect - github.com/containerd/containerd v1.7.7 // indirect + github.com/containerd/errdefs v0.1.0 // indirect github.com/containerd/ttrpc v1.2.2 // indirect - github.com/coreos/go-oidc v2.2.1+incompatible // indirect + github.com/coreos/go-oidc/v3 v3.10.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cskr/pubsub v1.0.2 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/denisenkom/go-mssqldb v0.12.2 // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/devigned/tab v0.1.1 // indirect - github.com/digitalocean/godo v1.104.1 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.7+incompatible // indirect - github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 // indirect + github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect + github.com/digitalocean/godo v1.109.0 // indirect + github.com/distribution/reference v0.5.0 // indirect + github.com/docker/docker v25.0.5+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/dynatrace-oss/dynatrace-metric-utils-go v0.5.0 // indirect - github.com/eapache/go-resiliency v1.4.0 // indirect + github.com/eapache/go-resiliency v1.6.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect github.com/eapache/queue v1.1.0 // indirect github.com/elastic/go-elasticsearch/v7 v7.17.10 // indirect github.com/elastic/go-structform v0.0.10 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/envoyproxy/go-control-plane v0.11.1 // indirect - github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect + github.com/envoyproxy/go-control-plane v0.12.0 // indirect + github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect github.com/euank/go-kmsg-parser v2.0.0+incompatible // indirect - github.com/facebook/time v0.0.0-20220713225404-f7a0d7702d50 // indirect + github.com/expr-lang/expr v1.16.3 // indirect + github.com/facebook/time v0.0.0-20240109160331-d1456d1a6bac // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect - github.com/getsentry/sentry-go v0.25.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-faster/city v1.0.1 // indirect - github.com/go-faster/errors v0.6.1 // indirect - github.com/go-kit/kit v0.12.0 // indirect + github.com/go-faster/errors v0.7.1 // indirect + github.com/go-jose/go-jose/v4 v4.0.1 // indirect + github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.3.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/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.4 // indirect - github.com/go-redis/redis/v7 v7.4.1 // indirect - github.com/go-resty/resty/v2 v2.7.0 // indirect - github.com/go-sql-driver/mysql v1.7.1 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.20.4 // indirect + github.com/go-openapi/swag v0.22.9 // indirect + github.com/go-resty/resty/v2 v2.11.0 // indirect + github.com/go-sql-driver/mysql v1.8.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect - github.com/gofrs/uuid v4.3.1+incompatible // indirect + github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/golang-jwt/jwt/v5 v5.0.0 // indirect - github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect + github.com/golang-jwt/jwt/v5 v5.2.1 // indirect + github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/cadvisor v0.48.1 // indirect - github.com/google/flatbuffers v23.1.21+incompatible // indirect + github.com/google/cadvisor v0.49.0 // indirect + github.com/google/flatbuffers v23.5.26+incompatible // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gophercloud/gophercloud v1.7.0 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect + github.com/gophercloud/gophercloud v1.8.0 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/gosnmp/gosnmp v1.35.0 // indirect - github.com/grafana/loki/pkg/push v0.0.0-20230321110627-5c3d204ebf5d // indirect + github.com/gosnmp/gosnmp v1.37.0 // indirect + github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect - github.com/grobie/gomemcache v0.0.0-20180201122607-1f779c573665 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect + github.com/grobie/gomemcache v0.0.0-20230213081705-239240bbc445 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/hashicorp/consul/api v1.25.1 // indirect + github.com/hashicorp/consul/api v1.28.2 // indirect github.com/hashicorp/cronexpr v1.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.4 // indirect @@ -397,201 +400,209 @@ require ( github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c // indirect + github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702 // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/hetznercloud/hcloud-go/v2 v2.4.0 // indirect + github.com/hetznercloud/hcloud-go/v2 v2.6.0 // indirect github.com/iancoleman/strcase v0.3.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 // indirect + github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 // indirect github.com/influxdata/influxdb-observability/common v0.5.8 // indirect github.com/influxdata/influxdb-observability/influx2otel v0.5.8 // indirect github.com/influxdata/influxdb-observability/otel2influx v0.5.8 // indirect github.com/influxdata/line-protocol/v2 v2.2.1 // indirect - github.com/ionos-cloud/sdk-go/v6 v6.1.9 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.11 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.14.0 // indirect + github.com/jackc/pgconn v1.14.3 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgproto3/v2 v2.3.2 // indirect + github.com/jackc/pgproto3/v2 v2.3.3 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/jackc/pgtype v1.14.0 // indirect - github.com/jackc/pgx/v4 v4.18.1 // indirect - github.com/jaegertracing/jaeger v1.48.0 // indirect + github.com/jackc/pgx/v4 v4.18.3 // indirect + github.com/jaegertracing/jaeger v1.55.0 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect github.com/jcmturner/gofork v1.7.6 // indirect + github.com/jcmturner/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/jellydator/ttlcache/v3 v3.1.0 // indirect + github.com/jellydator/ttlcache/v3 v3.2.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/julienschmidt/httprouter v1.3.0 // indirect github.com/karrick/godirwalk v1.17.0 // indirect - github.com/klauspost/asmfmt v1.3.2 // indirect - github.com/klauspost/compress v1.17.2 // indirect - github.com/klauspost/cpuid/v2 v2.2.3 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect github.com/kr/fs v0.1.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b // indirect github.com/leoluk/perflib_exporter v0.2.1 // indirect + github.com/lestrrat-go/strftime v1.0.6 // indirect github.com/lib/pq v1.10.9 // indirect github.com/lightstep/go-expohisto v1.0.0 // indirect github.com/linkedin/goavro/v2 v2.9.8 // indirect - github.com/linode/linodego v1.23.0 // indirect - github.com/logicmonitor/lm-data-sdk-go v1.0.0 // indirect + github.com/linode/linodego v1.30.0 // indirect + github.com/logicmonitor/lm-data-sdk-go v1.3.0 // indirect github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-ieproxy v0.0.9 // indirect + github.com/mattn/go-ieproxy v0.0.11 // indirect github.com/mattn/go-isatty v0.0.19 // indirect - github.com/mattn/go-sqlite3 v1.14.18 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/mattn/go-sqlite3 v1.14.22 // indirect github.com/microsoft/ApplicationInsights-Go v0.4.4 // indirect - github.com/miekg/dns v1.1.56 // indirect - github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect - github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect + github.com/microsoft/go-mssqldb v1.7.0 // indirect + github.com/miekg/dns v1.1.58 // indirect github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/hashstructure v1.1.0 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect + github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/sys/mountinfo v0.6.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mongodb-forks/digest v1.0.5 // indirect + github.com/mongodb-forks/digest v1.1.0 // indirect github.com/montanaflynn/stats v0.7.0 // indirect github.com/mostynb/go-grpc-compression v1.2.2 // indirect github.com/mrunalp/fileutils v0.5.1 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect - github.com/nginxinc/nginx-prometheus-exporter v0.8.1-0.20201110005315-f5a5f8086c19 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/collectd v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureblobreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureeventhubreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/lokireceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefareceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/wavefrontreceiver v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/webhookeventreceiver v0.89.0 // indirect + github.com/nginxinc/nginx-prometheus-exporter v0.11.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/collectd v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureblobreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureeventhubreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/lokireceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefareceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/wavefrontreceiver v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/webhookeventreceiver v0.98.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/runc v1.1.12 // indirect - github.com/opencontainers/runtime-spec v1.1.0-rc.3 // indirect + github.com/opencontainers/runtime-spec v1.1.0 // indirect github.com/opencontainers/selinux v1.11.0 // indirect + github.com/opensearch-project/opensearch-go/v2 v2.3.0 // indirect github.com/openshift/api v3.9.0+incompatible // indirect github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/openzipkin/zipkin-go v0.4.2 // indirect github.com/outcaste-io/ristretto v0.2.1 // indirect github.com/ovh/go-ovh v1.4.3 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect - github.com/paulmach/orb v0.10.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/paulmach/orb v0.11.1 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/philhofer/fwd v1.1.2 // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect - github.com/pierrec/lz4/v4 v4.1.18 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect + github.com/pierrec/lz4/v4 v4.1.21 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pkg/sftp v1.13.5 // indirect + github.com/pkg/sftp v1.13.6 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect github.com/pquerna/cachecontrol v0.1.0 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.52.2 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/prometheus v0.48.0 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect + github.com/prometheus/procfs v0.13.0 // indirect + github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/relvacode/iso8601 v1.3.0 // indirect + github.com/redis/go-redis/v9 v9.5.1 // indirect + github.com/relvacode/iso8601 v1.4.0 // indirect github.com/rs/cors v1.10.1 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 // indirect - github.com/scalyr/dataset-go v0.14.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 // indirect + github.com/scalyr/dataset-go v0.18.0 // indirect github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 // indirect github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect github.com/segmentio/asm v1.2.0 // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 // indirect - github.com/signalfx/sapm-proto v0.13.0 // indirect - github.com/sijms/go-ora/v2 v2.7.20 // indirect + github.com/signalfx/sapm-proto v0.14.0 // indirect + github.com/sijms/go-ora/v2 v2.8.11 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/snowflakedb/gosnowflake v1.6.25 // indirect + github.com/snowflakedb/gosnowflake v1.9.0 // indirect github.com/soheilhy/cmux v0.1.5 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cobra v1.8.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/spf13/viper v1.18.2 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.792 // indirect - github.com/tg123/go-htpasswd v1.2.1 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.896 // indirect + github.com/tg123/go-htpasswd v1.2.2 // indirect github.com/tidwall/gjson v1.14.3 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect @@ -601,112 +612,117 @@ require ( github.com/tinylib/msgp v1.1.9 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect + github.com/valyala/fastjson v1.6.4 // indirect github.com/vincent-petithory/dataurl v1.0.0 // indirect github.com/vishvananda/netlink v1.2.1-beta.2 // indirect - github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect - github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f // indirect - github.com/vmware/govmomi v0.33.1 // indirect + github.com/vishvananda/netns v0.0.4 // indirect + github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e // indirect + github.com/vmware/govmomi v0.36.3 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect - github.com/wavefronthq/wavefront-sdk-go v0.15.0 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect - go.etcd.io/bbolt v1.3.8 // indirect - go.mongodb.org/atlas v0.35.0 // indirect - go.mongodb.org/mongo-driver v1.13.0 // indirect + go.etcd.io/bbolt v1.3.9 // indirect + go.mongodb.org/atlas v0.36.0 // indirect + go.mongodb.org/mongo-driver v1.14.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.89.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.89.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/connector v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/exporter/debugexporter v0.89.0 // indirect - go.opentelemetry.io/collector/exporter/loggingexporter v0.89.0 // indirect - go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0 // indirect - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/extension/ballastextension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/processor v0.89.0 // indirect - go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 // indirect - go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.89.0 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/collector/service v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect - go.opentelemetry.io/contrib/zpages v0.45.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk v1.20.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.98.0 // indirect + go.opentelemetry.io/collector/config/confighttp v0.98.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.98.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 // indirect + go.opentelemetry.io/collector/connector v0.98.0 // indirect + go.opentelemetry.io/collector/connector/forwardconnector v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 // indirect + go.opentelemetry.io/collector/exporter/loggingexporter v0.98.0 // indirect + go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0 // indirect + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/extension/ballastextension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/collector/processor v0.98.0 // indirect + go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 // indirect + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/collector/service v0.98.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.25.0 // indirect + go.opentelemetry.io/contrib/zpages v0.50.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.16.0 // indirect - golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect - golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.16.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/api v0.150.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.19.0 // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/api v0.172.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect - gopkg.in/square/go-jose.v2 v2.5.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 // indirect - k8s.io/api v0.28.4 // indirect - k8s.io/apimachinery v0.28.4 // indirect - k8s.io/client-go v0.28.4 // indirect - k8s.io/klog v1.0.0 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/kubelet v0.28.4 // indirect - k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect - sigs.k8s.io/controller-runtime v0.16.3 // indirect + k8s.io/api v0.30.0 // indirect + k8s.io/apimachinery v0.30.0 // indirect + k8s.io/client-go v0.30.0 // indirect + k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect + k8s.io/kubelet v0.30.0 // indirect + k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect + sigs.k8s.io/controller-runtime v0.17.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect - skywalking.apache.org/repo/goapi v0.0.0-20231026090926-09378dd56587 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect + skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4 // indirect ) // Replace references to modules that are in this repository with their relateive paths @@ -776,8 +792,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynat replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter => ../../exporter/elasticsearchexporter -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter => ../../exporter/f5cloudexporter - replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter => ../../exporter/fileexporter replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter => ../../exporter/googlecloudexporter @@ -804,6 +818,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmo replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter => ../../exporter/opencensusexporter +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter => ../../exporter/opensearchexporter + replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter => ../../exporter/prometheusexporter replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter => ../../exporter/prometheusremotewriteexporter @@ -822,8 +838,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splun replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter => ../../exporter/sumologicexporter -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter => ../../exporter/tanzuobservabilityexporter - replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter => ../../exporter/tencentcloudlogserviceexporter replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter => ../../exporter/zipkinexporter @@ -840,8 +854,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/head replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension => ../../extension/healthcheckextension -replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder => ../../extension/httpforwarder - replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension => ../../extension/oauth2clientauthextension replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer => ../../extension/observer @@ -858,8 +870,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/ppro replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension => ../../extension/sigv4authextension -replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage => ../../extension/storage - replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr => ../../pkg/batchperresourceattr replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters => ../../pkg/winperfcounters @@ -900,8 +910,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/attr replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor => ../../processor/cumulativetodeltaprocessor/ -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor => ../../processor/datadogprocessor/ - replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor => ../../processor/deltatorateprocessor/ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor => ../../processor/filterprocessor @@ -924,10 +932,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/ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor => ../../processor/tailsamplingprocessor @@ -1139,6 +1143,29 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/collectd => ../../internal/collectd +replace ( + github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector => ../../connector/countconnector + github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector => ../../connector/datadogconnector + github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector => ../../connector/exceptionsconnector + github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector => ../../connector/routingconnector + 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 + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage => ../../extension/storage/filestorage + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage => ../../extension/storage/dbstorage + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage => ../../extension/storage + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension => ../../extension/encoding/otlpencodingextension + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding => ../../extension/encoding + +replace github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector => ../../connector/grafanacloudconnector + replace github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware => ../../extension/awsmiddleware replace github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws => ../../override/aws diff --git a/cmd/configschema/go.sum b/cmd/configschema/go.sum index adaa38f0c89a..b3b72924df0c 100644 --- a/cmd/configschema/go.sum +++ b/cmd/configschema/go.sum @@ -1,11 +1,10 @@ -bitbucket.org/atlassian/go-asap/v2 v2.6.0 h1:KiLw3IgbzFLqNxCrVZoKUDJKMxUGoOd+NEOYXGEBhJ0= -bitbucket.org/atlassian/go-asap/v2 v2.6.0/go.mod h1:cuRgWb7eeGtsocKmqY2kPlMMlwpkeNh+QOIkjAMlUBc= +bitbucket.org/atlassian/go-asap/v2 v2.8.0 h1:JL4jktrZT3H8GHkkeJ1RCdhJ5YcOyVccA/2TJ4ae3I0= +bitbucket.org/atlassian/go-asap/v2 v2.8.0/go.mod h1:cuRgWb7eeGtsocKmqY2kPlMMlwpkeNh+QOIkjAMlUBc= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -18,49 +17,47 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= -cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.2 h1:nWEMDhgbBkBJjfpVySqU4jgWdc22PLR0o4vEexZHers= -cloud.google.com/go/compute v1.23.2/go.mod h1:JJ0atRC0J/oWYiiVBmsSsrRnh92DhZPG4hFDcR04Rns= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= 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= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v1.1.4 h1:K6n/GZHFTtEoKT5aUG3l9diPi0VduZNQ1PfdnpkkIFk= -cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= -cloud.google.com/go/logging v1.8.1 h1:26skQWPeYhvIasWKm48+Eq7oUqdcdbwsCVwz5Ys0FvU= -cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= -cloud.google.com/go/longrunning v0.5.3 h1:maKa7O9YTzmVzwdlRKr981U1Ys2auup6rpeMt8y3+RU= -cloud.google.com/go/longrunning v0.5.3/go.mod h1:y/0ga59EYu58J6SHmmQOvekvND2qODbu8ywBBW7EK7Y= -cloud.google.com/go/monitoring v1.16.2 h1:gx7BDZcoRqX5DfuJzw9LdhVjEkqCLmDXScdnrmIy9ik= -cloud.google.com/go/monitoring v1.16.2/go.mod h1:B44KGwi4ZCF8Rk/5n+FWeispDXoKSk9oss2QNlXJBgc= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= +cloud.google.com/go/logging v1.9.0 h1:iEIOXFO9EmSiTjDmfpbRjOxECO7R8C7b8IXUGOj7xZw= +cloud.google.com/go/logging v1.9.0/go.mod h1:1Io0vnZv4onoUnsVUQY3HZ3Igb1nBchky0A0y7BBBhE= +cloud.google.com/go/longrunning v0.5.5 h1:GOE6pZFdSrTb4KAiKnXsJBtlE6mEyaW44oKyMILWnOg= +cloud.google.com/go/longrunning v0.5.5/go.mod h1:WV2LAxD8/rg5Z1cNW6FJ/ZpX4E4VnDnoTk0yawPBB7s= +cloud.google.com/go/monitoring v1.18.0 h1:NfkDLQDG2UR3WYZVQE8kwSbUIEyIqJUPl+aOQdFH1T4= +cloud.google.com/go/monitoring v1.18.0/go.mod h1:c92vVBCeq/OB4Ioyo+NbN2U7tlg5ZH41PZcdvfc+Lcg= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.33.0 h1:6SPCPvWav64tj0sVX/+npCBKhUi/UjJehy9op/V3p2g= -cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= -cloud.google.com/go/spanner v1.51.0 h1:l3exhhsVMKsx1E7Xd1QajYSvHmI1KZoWPW5tRxIIdvQ= -cloud.google.com/go/spanner v1.51.0/go.mod h1:c5KNo5LQ1X5tJwma9rSQZsXNBDNvj4/n8BVc3LNahq0= +cloud.google.com/go/pubsub v1.37.0 h1:0uEEfaB1VIJzabPpwpZf44zWAKAme3zwKKxHk7vJQxQ= +cloud.google.com/go/pubsub v1.37.0/go.mod h1:YQOQr1uiUM092EXwKs56OPT650nwnawc+8/IjoUeGzQ= +cloud.google.com/go/spanner v1.60.0 h1:O9kf49dfaDRzPpKJNChHUJ+Bao02WPedZb8ZPyi02lI= +cloud.google.com/go/spanner v1.60.0/go.mod h1:D2bOAeT/dC6zsZhXRIxbdYa5nQEYU3wYM/1KN3eg7Fs= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/trace v1.10.3 h1:yiQ2EdegdiZDPwNPoUqGYAMd0wNValT/NRsC1XGyBJ0= -cloud.google.com/go/trace v1.10.3/go.mod h1:Ke1bgfc73RV3wUFml+uQp7EsDw4dGaETLxB7Iq/r4CY= +cloud.google.com/go/trace v1.10.5 h1:0pr4lIKJ5XZFYD9GtxXEWr0KkVeigc3wlGpZco0X1oA= +cloud.google.com/go/trace v1.10.5/go.mod h1:9hjCV1nGBCtXbAE4YK7OqJ8pmPYSxPA0I67JwRd5s3M= code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= code.cloudfoundry.org/clock v1.0.0 h1:kFXWQM4bxYvdBw2X8BbBeXwQNgfoWv1vqAk2ZZyBN2o= code.cloudfoundry.org/clock v1.0.0/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= @@ -70,10 +67,11 @@ code.cloudfoundry.org/go-loggregator v7.4.0+incompatible h1:KqZYloMQWM5Zg/BQKunO code.cloudfoundry.org/go-loggregator v7.4.0+incompatible/go.mod h1:KPBTRqj+y738Nhf1+g4JHFaBU8j7dedirR5ETNHvMXU= code.cloudfoundry.org/rfc5424 v0.0.0-20201103192249-000122071b78 h1:mrZQaZmuDIPhSp6b96b+CRKC2uH44ifa5cjDV2epKis= code.cloudfoundry.org/rfc5424 v0.0.0-20201103192249-000122071b78/go.mod h1:tkZo8GtzBjySJ7USvxm4E36lNQw1D3xM6oKHGqdaAJ4= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= 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.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= @@ -83,42 +81,47 @@ github.com/AthenZ/athenz v1.10.39 h1:mtwHTF/v62ewY2Z5KWhuZgVXftBej1/Tn80zx4DcawY github.com/AthenZ/athenz v1.10.39/go.mod h1:3Tg8HLsiQZp81BJY58JBeU2BR6B/H4/0MQGfCwhHNEA= github.com/Azure/azure-amqp-common-go/v4 v4.2.0 h1:q/jLx1KJ8xeI8XGfkOWMN9XrXzAfVTkyvCxPvHCjd2I= github.com/Azure/azure-amqp-common-go/v4 v4.2.0/go.mod h1:GD3m/WPPma+621UaU6KNjKEo5Hl09z86viKwQjTpV0Q= -github.com/Azure/azure-event-hubs-go/v3 v3.6.1 h1:vSiMmn3tOwgiLyfnmhT5K6Of/3QWRLaaNZPI0hFvZyU= -github.com/Azure/azure-event-hubs-go/v3 v3.6.1/go.mod h1:i2NByb9Pr2na7y8wi/XefEVKkuA2CDUjCNoWQJtTsGo= -github.com/Azure/azure-kusto-go v0.13.1 h1:0w4CmUTROT8qbLbKq921PhCb7mIfRFWeDu4iJxrNEOM= -github.com/Azure/azure-kusto-go v0.13.1/go.mod h1:AyWTO0r50y7rAkxkTveLtn80njNyXpJP5WADvoSZ/P4= +github.com/Azure/azure-event-hubs-go/v3 v3.6.2 h1:7rNj1/iqS/i3mUKokA2n2eMYO72TB7lO7OmpbKoakKY= +github.com/Azure/azure-event-hubs-go/v3 v3.6.2/go.mod h1:n+ocYr9j2JCLYqUqz9eI+lx/TEAtL/g6rZzyTFSuIpc= +github.com/Azure/azure-kusto-go v0.15.2 h1:OlABJilic9TythSgWW6i8Fd0SgNTg0t9jBu6WVsaixM= +github.com/Azure/azure-kusto-go v0.15.2/go.mod h1:9F2zvXH8B6eWzgI1S4k1ZXAIufnBZ1bv1cW1kB1n3D0= github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U= github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 h1:9kDVnTz3vbfweTqAUmk/a/pH5pWFCHtvRpHYC0G/dcA= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0/go.mod h1:3Ug6Qzto9anB6mGlEdgYMDF5zHQ+wwhEaYR4s17PHMw= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= -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/resourcemanager/compute/armcompute/v4 v4.2.1 h1:UPeCRD+XY7QlaGQte2EVI2iOcWvUYA2XY8w5T/8v0NQ= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1/go.mod h1:oGV6NlB0cvi1ZbYRR2UN44QHxWFyGk+iylgD0qaMXjA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.8.0 h1:dKxKBzh+XIEoYNmx/c8HeiwghuRExXf61WmVotWESeA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.8.0/go.mod h1:kzRLpzzlw6eBUXE7eBw3oqfmKR/kxaHOk4+h9sAe6Yo= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 h1:QM6sE5k2ZT/vI5BEe0r7mqjsUSnhVBFbOsVkEuaEfiA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 h1:bWh0Z2rOEDfB/ywv/l0iHN1JgyazE6kW/aIA89+CEK0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1/go.mod h1:Bzf34hhAE9NSxailk8xVeLEZbUjOXcC+GnU1mMKdhLw= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0/go.mod h1:s1tW/At+xHqjNFvWU4G0c0Qv33KOhvbGNj0RCTQDV8s= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0 h1:Ma67P/GGprNwsslzEH6+Kb8nybI8jpDTm4Wmzu2ReK8= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 h1:gggzg0SUMs6SQbEw+3LoSsYf9YMjkupeAnHMX8O9mmY= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0/go.mod h1:+6KLcKIVgxoBDMqMO/Nvy7bZ9a0nbU3I1DtFQK3YvB4= -github.com/Azure/azure-storage-queue-go v0.0.0-20191125232315-636801874cdd h1:b3wyxBl3vvr15tUAziPBPK354y+LSdfPCpex5oBttHo= -github.com/Azure/azure-storage-queue-go v0.0.0-20191125232315-636801874cdd/go.mod h1:K6am8mT+5iFXgingS9LUc7TmbsW6XBw3nxaRyaMyWc8= -github.com/Azure/go-amqp v1.0.2 h1:zHCHId+kKC7fO8IkwyZJnWMvtRXhYC0VJtD0GYkHc6M= -github.com/Azure/go-amqp v1.0.2/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 h1:FDif4R1+UUR+00q6wquyX90K7A8dN+R5E8GEadoP7sU= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2/go.mod h1:aiYBYui4BJ/BJCAIKs92XiPyQfTaBWqvHujDwKb6CBU= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 h1:MxA59PGoCFb+vCwRQi3PhQEwHj4+r2dhuv9HG+vM7iM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0/go.mod h1:uYt4CfhkJA9o0FN7jfE5minm/i4nUE4MjGUJkzB6Zs8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 h1:PTFGRSlMKCQelWwxUyYVEUqseBJVemLyqWJjvMyt0do= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0/go.mod h1:LRr2FzBTQlONPPa5HREE5+RjSCTXl7BwOvYOaWTqCaI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.0.0 h1:pPvTJ1dY0sA35JOeFq6TsY2xj6Z85Yo23Pj4wCCvu4o= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.0.0/go.mod h1:mLfWfj8v3jfWKsL9G4eoBoXVcsqcIUTapmdKy7uGOp0= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0 h1:Ds0KRF8ggpEGg4Vo42oX1cIt/IfOhHWJBikksZbVxeg= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0/go.mod h1:jj6P8ybImR+5topJ+eH6fgcemSFBmU6/6bFF8KkwuDI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 h1:bXwSugBiSbgtz7rOtbfGf+woewp4f06orW9OP5BjHLA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0/go.mod h1:Y/HgrePTmGy9HjdSGTqZNa+apUpTVIEVKXJyARP2lrk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 h1:Dd+RhdJn0OTtVGaeDLZpcumkIVCtA/3/Fo42+eoYvVM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0/go.mod h1:5kakwfW5CjC9KK+Q4wjXAg+ShuIm2mBMua0ZFj2C8PE= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0/go.mod h1:T5RfihdXtBDxt1Ch2wobif3TvzTdumDy29kahv6AV9A= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1 h1:MyVTgWR8qd/Jw1Le0NZebGBUCLbtak3bJ3z1OlqZBpw= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1/go.mod h1:GpPjLhVR9dnUoJMyHWSPy71xY9/lcmpzIPZXmF0FCVY= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 h1:D3occbWoio4EBLkbkevetNMAVX197GkzbUMtqjGWn80= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0/go.mod h1:bTSOgj05NGRuHHhQwAdPnYr9TOdNmKlZTgGLL6nyAdI= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 h1:YUUxeiOWgdAQE3pXt2H7QXzZs0q8UBjgRbl56qo8GYM= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2/go.mod h1:dmXQgZuiSubAecswZE+Sm8jkvEa7kQgTPVRvwL/nd0E= +github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe h1:HGuouUM1533rBXmMtR7qh5pYNSSjUZG90b/MgJAnb/A= +github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe/go.mod h1:K6am8mT+5iFXgingS9LUc7TmbsW6XBw3nxaRyaMyWc8= +github.com/Azure/go-amqp v1.0.5 h1:po5+ljlcNSU8xtapHTe8gIc8yHxCzC03E8afH2g1ftU= +github.com/Azure/go-amqp v1.0.5/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= @@ -129,7 +132,9 @@ github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= github.com/Azure/go-autorest/autorest/azure/auth v0.5.12 h1:wkAZRgT/pn8HhFyzfe9UnqOjJYqlembgCTi72Bm/xKk= +github.com/Azure/go-autorest/autorest/azure/auth v0.5.12/go.mod h1:84w/uV8E37feW2NCJ08uT9VBfjfUHpgLVnG2InYD6cg= github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 h1:LXl088ZQlP0SBppGFsRZonW6hSvwgL5gRByMbvUbx8U= +github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= @@ -144,89 +149,94 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= -github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ClickHouse/ch-go v0.58.2 h1:jSm2szHbT9MCAB1rJ3WuCJqmGLi5UTjlNu+f530UTS0= -github.com/ClickHouse/ch-go v0.58.2/go.mod h1:Ap/0bEmiLa14gYjCiRkYGbXvbe8vwdrfTYWhsuQ99aw= -github.com/ClickHouse/clickhouse-go/v2 v2.15.0 h1:G0hTKyO8fXXR1bGnZ0DY3vTG01xYfOGW76zgjg5tmC4= -github.com/ClickHouse/clickhouse-go/v2 v2.15.0/go.mod h1:kXt1SRq0PIRa6aKZD7TnFnY9PQKmc2b13sHtOYcK6cQ= -github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= -github.com/DataDog/agent-payload/v5 v5.0.89 h1:uuLWf/exyNYBnheG9OH2dOWZpCJvaEHX3W9CAd8KarU= -github.com/DataDog/agent-payload/v5 v5.0.89/go.mod h1:oQZi1VZp1e3QvlSUX4iphZCpJaFepUxWq0hNXxihKBM= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1 h1:W6IVI3zWwoJGcFagJ/kwltFL1IIErBZzcBy994PQsQE= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1/go.mod h1:A4nLJvxlg6BO/8/zg81til9yT0uRPuXDFMAzDMpmgn4= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1 h1:zDhs0MnT72cZOxxbPjkGI00NMYgsydOanBX3GZHuS1I= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1/go.mod h1:HvK26YCxg6MfYvPJgpHC7nSjw6DTpNhd75Wlb0GAvis= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1 h1:EywptZStgHbDWLScnHfaCj6QNb698DY68pCnPEQrsts= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1/go.mod h1:Vc+snp0Bey4MrrJyiV2tVxxJb6BmLomPvN1RgAvjGaQ= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1 h1:A1uj4IMFs4rWp5LRalsqqnoC1f7QuYuN/b6/L7k4KCc= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1/go.mod h1:Q84EzSKpY/HtasusZM4ZPuYqbPQEbmIcAGzd7tXUX1I= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1 h1:iJSVz+YsndcMA/yYNih/qmuvwD1AR7IYX0cXXePpeys= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1/go.mod h1:JUOECuM5XcoxjEPs30C568vGBWtqScjnsC2KXY1OQ7Y= -github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1 h1:NK2kcRdv/r0WycAlGD2JFSmOcNvazzilPvZzk3l105g= -github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1/go.mod h1:RMBDVajNx78CpFHnbat0aIGcwVQZp8s+smRlcJkvZGg= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1 h1:SgaCKuX9e3O5eLRIr+zqW1dlIw/TP3RDKQZUa2FfF8c= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1/go.mod h1:eTXti9mx7qhkoi+Qg3mMmvVY5McghUUgsf4Hrk9zY8k= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1 h1:aCDYC/AkDS/EOm4GV1bFmiev6pTt+Qjj1yGBJv8U7+k= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1/go.mod h1:EOGgNrSPskIxY3+KgCl+yEggMjrGqrA2oL5va+/p2jM= -github.com/DataDog/datadog-api-client-go/v2 v2.18.0 h1:QkX1vY1JtvDeF6N6EarPrJMHlerVGdTvGQOUWqfeVDs= -github.com/DataDog/datadog-api-client-go/v2 v2.18.0/go.mod h1:lHlfhsNQ2qZclvpVQTfrGowUDIdIzAao38A05f9EQpc= +github.com/ClickHouse/ch-go v0.61.5 h1:zwR8QbYI0tsMiEcze/uIMK+Tz1D3XZXLdNrlaOpeEI4= +github.com/ClickHouse/ch-go v0.61.5/go.mod h1:s1LJW/F/LcFs5HJnuogFMta50kKDO0lf9zzfrbl0RQg= +github.com/ClickHouse/clickhouse-go/v2 v2.23.0 h1:srmRrkS0BR8gEut87u8jpcZ7geOob6nGj9ifrb+aKmg= +github.com/ClickHouse/clickhouse-go/v2 v2.23.0/go.mod h1:tBhdF3f3RdP7sS59+oBAtTyhWpy0024ZxDMhgxra0QE= +github.com/Code-Hex/go-generics-cache v1.3.1 h1:i8rLwyhoyhaerr7JpjtYjJZUcCbWOdiYO3fZXLiEC4g= +github.com/Code-Hex/go-generics-cache v1.3.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= +github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= +github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= +github.com/DataDog/agent-payload/v5 v5.0.111 h1:mM+4OBkXF9tjKV0VjwnNO5As9aKcNAEsagvKDSBaTyc= +github.com/DataDog/agent-payload/v5 v5.0.111/go.mod h1:COngtbYYCncpIPiE5D93QlXDH/3VAKk10jDNwGHcMRE= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae h1:aVo1Uh2WQ8TvgbjqlbDvfP5AcUtnqXUUrc9pVP8MvKc= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:AVPQWekk3h9AOC7+plBlNB68Sy6UIGFoMMVUDeSoNoI= +github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae h1:b6lU79trCyadhkxhb51jXiqmZaHs1Z0fwWlWKFVCqJ4= +github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:s6zD4ZvPBta68SBCsCnnbn3VJzoQk5wNd0VJOpB84Ug= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae h1:/vfuF60+5qeGM62IDG1F6Asfa1VGAohiQVivRo9TWoo= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:JhAilx32dkIgoDkFXquCTfaWDsAOfe+vfBaxbiZoPI0= +github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae h1:B1E9jVLpw+Hrcv9ggzCridX3YMeUmZBE3zHghdwfTSc= +github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:1FTu8gSg8Pd8DVgRfxlcPN4F+d8K7A3lbMCT84FX44Y= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae h1:GL9JPEUyKDH2brURt09llrqWBmExCuqbHeWucezZ6sY= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:OnkC+HYj+NU9dmowWVtFpmnA4wVVibejbzID7TNm7jA= +github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae h1:sUEteYos3JjJJB1+A9inYJ3uzM18t9cygjSs0cik8x4= +github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:z4lpju3fhDa8JcbXxU0Bc6A6ci8xoQMuxDXbBdf4gHw= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae h1:qveAzof7ZZXvm93FL7h5mRM8B4q9w14g2fx6wcZt88k= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:HgJEYNmnFTKIuBhWxYe1coqmzoJXMxQTfK+4wIG5G1Q= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae h1:YZz6I8ym9P4MLytAdAJlafF3tgItgAGZrDqe4otbVUk= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:EVETfdJCkqy0YEvSpQd9LZdcYQ7vrUomCm+bQ6h3lc4= +github.com/DataDog/datadog-api-client-go/v2 v2.24.0 h1:7G+eyezFM8gHq5dOHcrQcGVxrXnwPqX2yYHxsLiq3iM= +github.com/DataDog/datadog-api-client-go/v2 v2.24.0/go.mod h1:QKOu6vscsh87fMY1lHfLEmNSunyXImj8BUaUWJXOehc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/datadog-go/v5 v5.1.1 h1:JLZ6s2K1pG2h9GkvEvMdEGqMDyVLEAccdX5TltWcLMU= -github.com/DataDog/datadog-go/v5 v5.1.1/go.mod h1:KhiYb2Badlv9/rofz+OznKoEF5XKTonWyhx5K83AP8E= -github.com/DataDog/go-sqllexer v0.0.8 h1:vfC8R9PhmJfeOKcFYAX9UOd890A3wu3KrjU9Kr7nM0E= -github.com/DataDog/go-sqllexer v0.0.8/go.mod h1:nB4Ea2YNsqMwtbWMc4Fm/oP98IIrSPapqwOwPioMspY= +github.com/DataDog/datadog-go/v5 v5.5.0 h1:G5KHeB8pWBNXT4Jtw0zAkhdxEAWSpWH00geHI6LDrKU= +github.com/DataDog/datadog-go/v5 v5.5.0/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= +github.com/DataDog/go-sqllexer v0.0.9 h1:Cx2Cu1S0hfj4coCCA8hzjM9+UNFRkcu1avIV//RU5Qw= +github.com/DataDog/go-sqllexer v0.0.9/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/gohai v0.0.0-20220718130825-1776f9beb9cc h1:gtlKB6B50/UEuFm1LeMn0R5a+tubx69OecPqxfXJDmU= -github.com/DataDog/gohai v0.0.0-20220718130825-1776f9beb9cc/go.mod h1:oyPC4jWHHjVVNjslDAKp8EqfQBaSmODjHt4HCX+C+9Q= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1 h1:16YkGLmeJH830m3dG0owtdSMXDkmTZdRd1EWZ1XIO6M= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1/go.mod h1:re1FCVuKWovntr4bODIUe+iYT2Al0gbS0WK726XLz7w= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.8.1 h1:0GyngySyxePf1RozAdm8p51uxT/kDsxqhzWPZGNrqVg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 h1:ly/egks++IqejMVPcp0OWV1fcL+Nsq4EHF48AAQPKu4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1/go.mod h1:8jOAAH5PrNN6zICpu65M7mNPAeOQsW5Wk/sq80txutA= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1 h1:UizDxaGWPDNzR2orQTE9poYyP09B2OhlaeiY5vdr+EU= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1/go.mod h1:2043mFAA2cD68ilZ93/5zZfL9BxWwj8z9sleaw3rtiY= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 h1:TbZDzUrW8iahevDY5Xw+j1EfrX8XZdeg/M6UYBl9mxg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1/go.mod h1:nVIKiAwP/Zd8IFxeHhEAiirJRH1kOOoZ315HQeSEkng= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 h1:4cyzwoXrnjElTIlsFbpyXQkAJs3+6ly9HExOu9lrup4= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1/go.mod h1:3AEt8/uCtbpzjPOPPxIBDcR1qcUq2hBbrkrdE/qNfb0= -github.com/DataDog/sketches-go v1.4.3 h1:ZB9nijteJRFUQixkQfatCqASartGNfiolIlMiEv3u/w= -github.com/DataDog/sketches-go v1.4.3/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= +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.4 h1:PTIZJAsfnr2XLB3V3duL+mSbZvYV8G3XQ9e57KyOuOA= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.4/go.mod h1:5yS6i90MEZS3NG+o7PrQQ8i7OaEMzwQvn4bCZ9h9Rao= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.4 h1:B2R7Wh791uphpltmorbvvdKk0rJOhoExwM4NnE7hXTg= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.4/go.mod h1:Tk2wwdBgWeSvDPtrGGyym8CdVWSuphiToGc/tRvFoNQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0 h1:10TPqpTlIkmDPFWVIEZ4ZX3rWrCrx3rEoeoAooZr6LM= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0/go.mod h1:dvIWN9pA2zWNTw5rhDWZgzZnhcfpH++d+8d1SWW6xkY= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4 h1:dU9oPMbAr/wYMNdzhu0pxIhAJOn1Btj1T3ZSyY6RvY0= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4/go.mod h1:ud/Xr5TWUopcaGHdkh9RN8lhnCAFa95X16Rb5mrkE18= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4 h1:ZuYc5Ql/GSyAEMgpKkbQiHOtIHkEpYujITW1wIVFgLE= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4/go.mod h1:YSntkplFoUM1mepnPeJFsoblqD0Wdi+Avg1/d1upgZQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4 h1:t/Zh8ztLDBOMRMiuVNFthWMMG5F4POgc5M6+Y3DTX9g= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4/go.mod h1:JfdBBDreQfbIN5FYrAtZV3VmQMXnf9o4tMbaMxWqe40= +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= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 h1:KeNholpO2xKjgaaSyd+DyQRrsQjhbSeS7qe4nEw8aQw= github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962/go.mod h1:kC29dT1vFpj7py2OvG1khBdQpo3kInWP+6QipLbdngo= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0 h1:tk85AYGwOf6VNtoOQi8w/kVDi2vmPxp3/OU2FsUpdcA= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0/go.mod h1:Xx0VKh7GJ4si3rmElbh19Mejxz68ibWg/J30ZOMrqzU= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.45.0 h1:jYuZ3VSmHtR/OE4ZNlhgaWefopMKh8kxHMITQ7hXB0s= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.45.0/go.mod h1:b8EPYWl+yGWfPDP2P1slOiJkimNOQMD34szyZt1G0+s= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.45.0 h1:Kim3EFONcbm78LF3B/EPFegmsKtFYBNcoJ89ubBPblw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.45.0/go.mod h1:wyhLy43DJk49NlzxNhoqF0ueRjS3oBMJc1bjTmyYxiQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.21.0 h1:OEgjQy1rH4Fbn5IpuI9d0uhLl+j6DkDvh9Q2Ucd6GK8= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.21.0/go.mod h1:EUfJ8lb3pjD8VasPPwqIvG2XVCE6DOT8tY5tcwbWA+A= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.45.0 h1:/BF7rO6PYcmFoyJrq6HA3LqQpFSQei9aNuO1fvV3OqU= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.45.0 h1:o/Nf55GfyLwGDaHkVAkRGgBXeExce73L6N9w2PZTB3k= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.45.0/go.mod h1:qkFPtMouQjW5ugdHIOthiTbweVHUTqbS0Qsu55KqXks= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0 h1:PWcDbDjrcT/ZHLn4Bc/FuglaZZVPP8bWO/YRmJBbe38= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0/go.mod h1:XEK/YHYsi+Wk2Bk1+zi/he+gjRfDWtoIZEZwuwcYjhk= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0 h1:7jymiL7lvmjgG8hMfvZ6qqA39VuiGEmCmFLd0N0tMKY= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0/go.mod h1:w3gKj9vyvd9n8jh2jpOMVLGy87QqB/AxDek2CoRwpt0= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.46.0 h1:kitScZTE4xINfkp7W3duwPe18Jp8OPjm14Ybxgjrp3E= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.46.0/go.mod h1:r+z/vuDdIelQGGJHiVMvNPCW3NiRNpFaeA9OT4L/K/c= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0 h1:xl4IRfBXPZxwu7dIza8n6wdX5zEJpi0boF5dX22MbYE= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0/go.mod h1:P69hhmQh4zwnU5iEdGVowFWg1DiP9x2KsCYBOIaP4us= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.46.0 h1:vaXjFX09ygxNxAiHwByzPBVKltYFVZR8HN4U3TR4vn8= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.46.0/go.mod h1:V28hx+cUCZC9e3qcqszMb+Sbt8cQZtHTiXOmyDzoDOg= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0 h1:xlfPHZ5QFvHad9KmrVDoaPpJUT/XluwNDMNHn+k7z/s= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0/go.mod h1:mzI44HpPp75Z8/a1sJP1asdHdu7Wui7t10SZ9EEPPnM= github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/IBM/sarama v1.42.1 h1:wugyWa15TDEHh2kvq2gAy1IHLjEjuYOYgXz/ruC/OSQ= -github.com/IBM/sarama v1.42.1/go.mod h1:Xxho9HkHd4K/MDUo/T/sOqwtX/17D33++E9Wib6hUdQ= +github.com/IBM/sarama v1.43.1 h1:Z5uz65Px7f4DhI/jQqEm/tV9t8aU+JUdTyW/K/fCXpA= +github.com/IBM/sarama v1.43.1/go.mod h1:GG5q1RURtDNPz8xxJs3mgX6Ytak8Z9eLhAkJPObe2xE= 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/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= -github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= +github.com/Microsoft/hcsshim v0.12.0-rc.3 h1:5GNGrobGs/sN/0nFO21W9k4lFn+iXXZAE8fCZbmdRak= +github.com/Microsoft/hcsshim v0.12.0-rc.3/go.mod h1:WuNfcaYNaw+KpCEsZCIM6HCEmu0c5HfXpi+dDSmveP0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/Netflix/go-env v0.0.0-20220526054621-78278af1949d h1:wvStE9wLpws31NiWUx+38wny1msZ/tm+eL5xmm4Y7So= github.com/Netflix/go-env v0.0.0-20220526054621-78278af1949d/go.mod h1:9XMFaCeRyW7fC9XJOWQ+NdAv8VLG7ys7l3x4ozEGLUQ= @@ -235,10 +245,11 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/ReneKroon/ttlcache/v2 v2.11.0 h1:OvlcYFYi941SBN3v9dsDcC2N8vRxyHcCmJb3Vl4QMoM= github.com/ReneKroon/ttlcache/v2 v2.11.0/go.mod h1:mBxvsNY+BT8qLLd6CuAJubbKo6r0jh3nb5et22bbfGY= -github.com/SAP/go-hdb v1.6.2 h1:sC0OjTEfPnycIktkCDvS7GelaGOiRrhWE0GWUt05QP8= -github.com/SAP/go-hdb v1.6.2/go.mod h1:xXsEywFErhpCuRVQ3HfjI7H7fPLYPMnMTWa9D5Enx0Q= -github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 h1:koK7z0nSsRiRiBWwa+E714Puh+DO+ZRdIyAXiXzL+lg= +github.com/SAP/go-hdb v1.8.12 h1:F/bpSlPZG0CvVWlTxxiEHGnynA8uILCPoIRoG+iMmkE= +github.com/SAP/go-hdb v1.8.12/go.mod h1:SNF6129HdtfK0ve8LQIeHEYwNu5CCJr7vXmhA4UbkNw= github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= +github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc h1:MhBvG7RLaLqlyjxMR6of35vt6MVQ+eXMcgn9X/sy0FE= +github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/Showmax/go-fqdn v1.0.0 h1:0rG5IbmVliNT5O19Mfuvna9LL7zlHyRfsSvBPZmF9tM= @@ -250,16 +261,18 @@ github.com/aerospike/aerospike-client-go/v6 v6.13.0/go.mod h1:2Syy0n4FKdgJxn0ZCf github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= -github.com/alecthomas/participle/v2 v2.1.0 h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4= -github.com/alecthomas/participle/v2 v2.1.0/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4 h1:iC9YFYKDGEy3n/FtqJnOkZsene9olVspKmkX5A2YBEo= github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4/go.mod h1:sCavSAvdzOjul4cEqeVtvlSaSScfNsTQ+46HwlTL1hc= github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.2/go.mod h1:5JHVmnHvGzR2wNdgaW1zDLQG8kOC4Uec8ubkMogW7OQ= @@ -287,24 +300,23 @@ github.com/alibabacloud-go/tea-utils/v2 v2.0.1 h1:K6kwgo+UiYx+/kr6CO0PN5ACZDzE3n github.com/alibabacloud-go/tea-utils/v2 v2.0.1/go.mod h1:U5MTY10WwlquGPS34DOeomUGBB0gXbLueiq5Trwu0C4= github.com/alibabacloud-go/tea-xml v1.1.2 h1:oLxa7JUXm2EDFzMg+7oRsYc+kutgCVwm+bZlhhmvW5M= github.com/alibabacloud-go/tea-xml v1.1.2/go.mod h1:Rq08vgCcCAjHyRi/M7xlHKUykZCEtyBy9+DPF6GgEu8= -github.com/aliyun/aliyun-log-go-sdk v0.1.63 h1:XeKeHgQS0Aoo6BtzF7vB/PlhzqK1/xuPdLr7mLMOp9Y= -github.com/aliyun/aliyun-log-go-sdk v0.1.63/go.mod h1:FSKcIjukUy+LeUKhRk13PCO+9gPMTfGsYhFBHQbDqmM= +github.com/aliyun/aliyun-log-go-sdk v0.1.72 h1:8Gvg3ydMG4bbF7DkTb4m3odd5BRFXo0LmhNBv/xg7Mo= +github.com/aliyun/aliyun-log-go-sdk v0.1.72/go.mod h1:FSKcIjukUy+LeUKhRk13PCO+9gPMTfGsYhFBHQbDqmM= github.com/aliyun/credentials-go v1.1.2 h1:qU1vwGIBb3UJ8BwunHDRFtAhS6jnQLnde/yk0+Ih2GY= github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw= -github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= -github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= -github.com/apache/arrow/go/v12 v12.0.1 h1:JsR2+hzYYjgSUkBSaahpqCetqZMr76djX80fF/DiJbg= -github.com/apache/arrow/go/v12 v12.0.1/go.mod h1:weuTY7JvTG/HDPtMQxEUp7pU73vkLWMLpY67QwZ/WWw= +github.com/apache/arrow/go/v15 v15.0.0 h1:1zZACWf85oEZY5/kd9dsQS7i+2G5zVQcbKTHgslqHNA= +github.com/apache/arrow/go/v15 v15.0.0/go.mod h1:DGXsR3ajT524njufqf95822i+KTh+yea1jass9YXgjA= github.com/apache/pulsar-client-go v0.8.1 h1:UZINLbH3I5YtNzqkju7g9vrl4CKrEgYSx2rbpvGufrE= github.com/apache/pulsar-client-go v0.8.1/go.mod h1:yJNcvn/IurarFDxwmoZvb2Ieylg630ifxeO/iXpk27I= github.com/apache/pulsar-client-go/oauth2 v0.0.0-20220120090717-25e59572242e h1:EqiJ0Xil8NmcXyupNqXV9oYDBeWntEIegxLahrTr8DY= github.com/apache/pulsar-client-go/oauth2 v0.0.0-20220120090717-25e59572242e/go.mod h1:Xee4tgYLFpYcPMcTfBYWE1uKRzeciodGTSEDMzsR6i8= -github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= -github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= +github.com/apache/thrift v0.20.0 h1:631+KvYbsBZxmuJjYwhezVsrfc/TbqtZV4QcxOX1fOI= +github.com/apache/thrift v0.20.0/go.mod h1:hOk1BQqcp2OLzGsyVXdfMk7YFlMxK3aoEVhjD06QhB8= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= +github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= github.com/ardielle/ardielle-go v1.5.2 h1:TilHTpHIQJ27R1Tl/iITBzMwiUGSlVfiVhwDNGM3Zj4= github.com/ardielle/ardielle-go v1.5.2/go.mod h1:I4hy1n795cUhaVt/ojz83SNVCYIGsAFAONtv2Dr7HUI= github.com/ardielle/ardielle-tools v1.5.4/go.mod h1:oZN+JRMnqGiIhrzkRN9l26Cej9dEx4jeNG6A+AdkShk= @@ -319,76 +331,94 @@ github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:l github.com/aws/aws-sdk-go v1.32.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2 v1.17.7/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= +github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2 v1.22.2 h1:lV0U8fnhAnPz8YcdmZVV60+tr6CakHzqA6P8T46ExJI= -github.com/aws/aws-sdk-go-v2 v1.22.2/go.mod h1:Kd0OJtkW3Q0M0lUWGszapWjEvrXDzRW+D21JNsroB+c= +github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA= +github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= 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/aws/protocol/eventstream v1.4.13/go.mod h1:gpAbvyDGQFozTEmlTFO8XcQKHzubdq0LzRyJpG6MiXM= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 h1:hHgLiIrTRtddC0AKcJr5s7i/hLgcpTt+q/FKxf1Zayk= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0/go.mod h1:w4I/v3NOWgD+qvs1NPEwhd++1h3XPHFaVxasfY6HlYQ= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= github.com/aws/aws-sdk-go-v2/config v1.18.19/go.mod h1:XvTmGMY8d52ougvakOv1RpiTLPz9dlG/OQHsKU/cMmY= -github.com/aws/aws-sdk-go-v2/config v1.24.0 h1:4LEk29JO3w+y9dEo/5Tq5QTP7uIEw+KQrKiHOs4xlu4= -github.com/aws/aws-sdk-go-v2/config v1.24.0/go.mod h1:11nNDAuK86kOUHeuEQo8f3CkcV5xuUxvPwFjTZE/PnQ= +github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= +github.com/aws/aws-sdk-go-v2/config v1.27.11 h1:f47rANd2LQEYHda2ddSCKYId18/8BhSRM4BULGmfgNA= +github.com/aws/aws-sdk-go-v2/config v1.27.11/go.mod h1:SMsV78RIOYdve1vf36z8LmnszlRWkwMQtomCAI0/mIE= github.com/aws/aws-sdk-go-v2/credentials v1.13.18/go.mod h1:vnwlwjIe+3XJPBYKu1et30ZPABG3VaXJYr8ryohpIyM= -github.com/aws/aws-sdk-go-v2/credentials v1.15.2 h1:rKH7khRMxPdD0u3dHecd0Q7NOVw3EUe7AqdkUOkiOGI= -github.com/aws/aws-sdk-go-v2/credentials v1.15.2/go.mod h1:tXM8wmaeAhfC7nZoCxb0FzM/aRaB1m1WQ7x0qlBLq80= +github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11 h1:YuIB1dJNf1Re822rriUOTxopaHHvIq0l/pX3fwO+Tzs= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6EKL+NcD7LG3dpKGMV4SShgo= 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/ec2/imds v1.14.3 h1:G5KawTAkyHH6WyKQCdHiW4h3PmAXNJpOgwKg3H7sDRE= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3/go.mod h1:hugKmSFnZB+HgNI1sYGT14BUPZkO6alC/e0AWu+0IAQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= 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/go.mod h1:QT0BqUvX1Bh2ABdTGnjqEjvjzrCfIniM9Sc8zn9Yndo= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2 h1:AaQsr5vvGR7rmeSWBtTCcw16tT9r51mWijuCQhzLnq8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2/go.mod h1:o1IiRn7CWocIFTXJjGKJDOwxv1ibL53NpcvcqGWyRBA= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= 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/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 h1:UZx8SXZ0YtzRiALzYAWcjb9Y9hZUR7MBKaBQ5ouOjPs= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2/go.mod h1:ipuRpcSaklmxR6C39G187TpBAO132gUfleTGccUPs8c= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc= 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/ini v1.7.0 h1:usgqiJtamuGIBj+OvYmMq89+Z1hIKkMJToz1WpoeNUY= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= 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/internal/v4a v1.1.4 h1:6lJvvkQ9HmbHZ4h/IEwclwv2mrTW8Uq1SOB/kXy0mfw= github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4/go.mod h1:1PrKYwxTM+zjpw9Y41KFtoJCQrJ34Z47Y4VgVbfndjo= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 h1:m0QTSI6pZYJTk5WSKx3fm5cNW/DCicVzULBgU/6IyD0= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14/go.mod h1:dDilntgHy9WnHXsh7dDtUPgHKEfTJIBUTHM8OWm0f/0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= 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/checksum v1.1.36 h1:eev2yZX7esGRjqRbnVk1UxMLw4CyVZDpZXRCcy75oQk= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36/go.mod h1:lGnOkH9NJATw0XEPcAknFBj3zzNTEGRHtSw+CwC1YTg= 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/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 h1:h7j73yuAVVjic8pqswh+L/7r2IHP43QwRyOu6zcCDDE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2/go.mod h1:H07AHdK5LSy8F7EJUQhoxyiCNkePoHj2D8P2yGTWafo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= 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/internal/s3shared v1.15.4 h1:v0jkRigbSD6uOdwcaUQmgEwG1BkPfAPDqaeNt/29ghg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4/go.mod h1:LhTyt8J04LL+9cIt7pYJ5lbS/U98ZmXovLOR/4LUsk8= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.1 h1:wLRIuz/llNgtN1OvZDmSotR+hjIXSxbxX/3Nw9ViaRg= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.1/go.mod h1:tMRFyoPjrh0oGqCKQHOf1EkxVzLynY/uQk2pejYVrzk= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.27.4 h1:Oe8awBiS/iitcsRJB5+DHa3iCxoA0KwJJf0JNrYMINY= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.27.4/go.mod h1:RCZCSFbieSgNG1RKegO26opXV4EXyef/vNBVJsUyHuw= 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/s3 v1.40.0 h1:wl5dxN1NONhTDQD9uaEvNsDRX29cBmGED/nl0jkWlt4= github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0/go.mod h1:rDGMZA7f4pbmTtPOk5v5UM2lmX6UAbRnMDJeDvnH7AM= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.29.5 h1:a3nFS1TFNTH9TVizItnHz3BgPCk5/7ygrZQZAoUV3GA= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.29.5/go.mod h1:3pzLFJnbjkymz6RdZ963DuvMR9rzrKMXrlbteSk4Sxc= 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/sso v1.17.1 h1:km+ZNjtLtpXYf42RdaDZnNHm9s7SYAuDGTafy6nd89A= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.1/go.mod h1:aHBr3pvBSD5MbzOvQtYutyPLLRPbl/y9x86XyJJnUXQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= 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/ssooidc v1.19.1 h1:iRFNqZH4a67IqPvK8xxtyQYnyrlsvwmpHOe9r55ggBA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1/go.mod h1:pTy5WM+6sNv2tB24JNKFtn6EvciQ5k40ZJ0pq/Iaxj0= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= github.com/aws/aws-sdk-go-v2/service/sts v1.18.7/go.mod h1:JuTnSoeePXmMVe9G8NcjjwgOKEfZ4cOjMuT2IBT/2eI= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 h1:txgVXIXWPXyqdiVn92BV6a/rgtpX31HYdsOYj0sVQQQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.1/go.mod h1:VAiJiNaoP1L89STFlEMgmHX1bKixY+FaP+TpRFrmyZ4= +github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/aws/smithy-go v1.16.0 h1:gJZEH/Fqh+RsvlJ1Zt4tVAtV6bKkp3cC+R6FCZMNzik= -github.com/aws/smithy-go v1.16.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= +github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/basgys/goxml2json v1.1.0 h1:4ln5i4rseYfXNd86lGEB+Vi652IsIXIvggKM/BhUKVw= +github.com/basgys/goxml2json v1.1.0/go.mod h1:wH7a5Np/Q4QoECFIU8zTQlZwZkrilY0itPfecMw41Dw= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/beefsack/go-rate v0.0.0-20220214233405-116f4ca011a0/go.mod h1:6YNgTHLutezwnBvyneBbwvB8C82y3dcoOj5EQJIdGXA= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -406,24 +436,26 @@ github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTS github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q= +github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= +github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/caio/go-tdigest/v4 v4.0.1 h1:sx4ZxjmIEcLROUPs2j1BGe2WhOtHD6VSe6NNbBdKYh4= -github.com/caio/go-tdigest/v4 v4.0.1/go.mod h1:Wsa+f0EZnV2gShdj1adgl0tQSoXRxtM0QioTgukFw8U= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/go-criu/v5 v5.3.0 h1:wpFFOoomK3389ue2lAb0Boag6XPht5QYpipxmSNL4d8= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -432,8 +464,8 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/cihub/seelog v0.0.0-20151216151435-d2c6e5aa9fbf/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1c8PVE1PubbNx3mjUr09OqWGCs= github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= -github.com/cilium/ebpf v0.9.1 h1:64sn2K3UKw8NbP/blsixRpF3nXuyhz/VjRlRzvlBRu4= -github.com/cilium/ebpf v0.9.1/go.mod h1:+OhNOIXx/Fnu1IE8bJz2dzOA+VSfyTfdNUVdlQnxUFY= +github.com/cilium/ebpf v0.11.0 h1:V8gS/bTCCjX9uUnkUFUpPsksM8n1lXBAvHcpiFk1X2Y= +github.com/cilium/ebpf v0.11.0/go.mod h1:WE7CZAnqOL2RouJ4f1uyNhqr2P4CCvXFIqdRDUgWsVs= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I= @@ -448,28 +480,27 @@ github.com/cloudfoundry-incubator/uaago v0.0.0-20190307164349-8136b7bbe76e/go.mo github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= -github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= -github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0= -github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE= +github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= +github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.7.7 h1:QOC2K4A42RQpcrZyptP6z9EJZnlHfHJUfZrAAHe15q4= -github.com/containerd/containerd v1.7.7/go.mod h1:3c4XZv6VeT9qgf9GMTxNTMFxGJrGpI2vz1yk4ye+YY8= +github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= +github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= +github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= +github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/ttrpc v1.2.2 h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtOs= github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak= github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= -github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk= -github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= +github.com/coreos/go-oidc/v3 v3.10.0 h1:tDnXHnLyiTVyT/2zLDGj09pFPkhND8Gl8lnTRhoEaJU= +github.com/coreos/go-oidc/v3 v3.10.0/go.mod h1:5j11xcw0D3+SGxn6Z/WFADsgcWVMyNAlSQupk0KK3ac= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -477,6 +508,7 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= +github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -492,28 +524,29 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/deepmap/oapi-codegen v1.12.4 h1:pPmn6qI9MuOtCz82WY2Xaw46EQjgvxednXXrP7g5Q2s= -github.com/denisenkom/go-mssqldb v0.12.2 h1:1OcPn5GBIobjWNd+8yjfHNIaFX14B1pWI3F9HZy5KXw= -github.com/denisenkom/go-mssqldb v0.12.2/go.mod h1:lnIw1mZukFRZDJYQ0Pb833QS2IaC3l5HkEfra2LJ+sk= github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= github.com/devigned/tab v0.1.1 h1:3mD6Kb1mUOYeLpJvTVSDwSg5ZsfSxfvxGRTxRsJsITA= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= -github.com/digitalocean/godo v1.104.1 h1:SZNxjAsskM/su0YW9P8Wx3gU0W1Z13b6tZlYNpl5BnA= -github.com/digitalocean/godo v1.104.1/go.mod h1:VAI/L5YDzMuPRU01lEEUSQ/sp5Z//1HnnFv/RBTEdbg= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/digitalocean/godo v1.109.0 h1:4W97RJLJSUQ3veRZDNbp1Ol3Rbn6Lmt9bKGvfqYI5SU= +github.com/digitalocean/godo v1.109.0/go.mod h1:R6EmmWI8CT1+fCtjWY9UCB+L5uufuZH13wk3YhxycCs= github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= +github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 h1:IPrmumsT9t5BS7XcPhgsCTlkWbYg80SEXUzDpReaU6Y= -github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11/go.mod h1:a6bNUGTbQBsY6VRHTr4h/rkOXjl244DyRD0tx3fgq4Q= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= @@ -521,13 +554,13 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +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/dynatrace-oss/dynatrace-metric-utils-go v0.5.0 h1:wHGPJSXvwKQVf/XfhjUPyrhpcPKWNy8F3ikH+eiwoBg= github.com/dynatrace-oss/dynatrace-metric-utils-go v0.5.0/go.mod h1:PseHFo8Leko7J4A/TfZ6kkHdkzKBLUta6hRZR/OEbbc= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-resiliency v1.4.0 h1:3OK9bWpPk5q6pbFAaYSEwD9CLUSHG8bnZuqX2yMt3B0= -github.com/eapache/go-resiliency v1.4.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= +github.com/eapache/go-resiliency v1.6.0 h1:CqGDTLtpwuWKn6Nj3uNUdflaq+/kIPsg0gfNzHton30= +github.com/eapache/go-resiliency v1.6.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4ALJ04o5Qqpdz8XLIpNA3WM/iSIXqxtqo7UGVws= github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0= @@ -550,18 +583,22 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= +github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI= +github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= 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/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/euank/go-kmsg-parser v2.0.0+incompatible h1:cHD53+PLQuuQyLZeriD1V/esuG4MuU0Pjs5y6iknohY= github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/facebook/time v0.0.0-20220713225404-f7a0d7702d50 h1:3fALCgsB+zI8Bxlv4ph4lCgt1CEQHIdU5sWxbkaMkuc= -github.com/facebook/time v0.0.0-20220713225404-f7a0d7702d50/go.mod h1:IQmM+Ezbn5X7gpDO0IjKU5RmW9xT1a19dLp+NbivoXE= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= +github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/expr-lang/expr v1.16.3 h1:NLldf786GffptcXNxxJx5dQ+FzeWDKChBDqOOwyK8to= +github.com/expr-lang/expr v1.16.3/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= +github.com/facebook/time v0.0.0-20240109160331-d1456d1a6bac h1:Xn5xG7RTh7HqtXKCCnxDG4+ee96umlRTBQM3kNSXDoU= +github.com/facebook/time v0.0.0-20240109160331-d1456d1a6bac/go.mod h1:1u7ple9CA8fMqfqqNsKIsxFL9i2yLfo8Hsv4ejTD1FM= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= @@ -577,30 +614,35 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD 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/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.11.0/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.11.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= 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/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI= -github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw= github.com/go-faster/city v1.0.1/go.mod h1:jKcUJId49qdW3L1qKHH/3wPeUstCVpVSXTM6vO3VcTw= -github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI= -github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY= +github.com/go-faster/errors v0.7.1 h1:MkJTnDoEdi9pDabt1dpWf7AA8/BaSYZqibYyhZ20AYg= +github.com/go-faster/errors v0.7.1/go.mod h1:5ySTjWFiphBs07IKuiL69nxdfd5+fzh1u7FPGZP2quo= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-jose/go-jose/v4 v4.0.1 h1:QVEPDE3OluqXBQZDcnNvQrInro2h0e4eqNbnZSWqS6U= +github.com/go-jose/go-jose/v4 v4.0.1/go.mod h1:WVf9LFMHh/QVrmqrOfqun0C45tMe3RoiKJMPvgWwLfY= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -616,42 +658,42 @@ github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= +github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-redis/redis/v7 v7.4.1 h1:PASvf36gyUpr2zdOUS/9Zqc80GbM+9BDyiJSJDDOrTI= -github.com/go-redis/redis/v7 v7.4.1/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= -github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= -github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= +github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= +github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= +github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= +github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -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/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= +github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= @@ -659,8 +701,8 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= 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/gocql/gocql v1.3.2 h1:ox3T+R7VFibHSIGxRkuUi1uIvAv8jBHCWxc+9aFQ/LA= -github.com/gocql/gocql v1.3.2/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= +github.com/gocql/gocql v1.6.0 h1:IdFdOTbnpbd0pDhl4REKQDM+Q0SzKXQ1Yh+YZZ8T/qU= +github.com/gocql/gocql v1.6.0/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= 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/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -668,8 +710,8 @@ github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v4.3.1+incompatible h1:0/KbAdpx3UXAx1kEOWHJeOkpbgRFGHVgv+CFIY7dBJI= -github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= +github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -681,10 +723,10 @@ github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzq github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= -github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= +github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +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/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= @@ -721,8 +763,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -731,10 +773,11 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= -github.com/google/cadvisor v0.48.1 h1:eyYTxKBd+KxI1kh6rst4JSTLUhfHQM34qGpp+0AMlSg= -github.com/google/cadvisor v0.48.1/go.mod h1:ZkYbiiVdyoqBmI2ahZI8GlmirT78OAOER0z4EQugkxQ= -github.com/google/flatbuffers v23.1.21+incompatible h1:bUqzx/MXCDxuS0hRJL2EfjyZL3uQrPbMocUa8zGqsTA= -github.com/google/flatbuffers v23.1.21+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/cadvisor v0.49.0 h1:1PYeiORXmcFYi609M4Qvq5IzcvcVaWgYxDt78uH8jYA= +github.com/google/cadvisor v0.49.0/go.mod h1:s6Fqwb2KiWG6leCegVhw4KW40tf9f7m+SF1aXiE8Wsk= +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/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -749,7 +792,6 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -772,66 +814,70 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 h1:pUa4ghanp6q4IJHwE9RwLgmVFfReJN+KbQ8ExNEUUoQ= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ZWj6lSlDF3F74SfKwfTCer72Q= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gophercloud/gophercloud v1.7.0 h1:fyJGKh0LBvIZKLvBWvQdIgkaV5yTM3Jh9EYUh+UNCAs= -github.com/gophercloud/gophercloud v1.7.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= +github.com/gophercloud/gophercloud v1.8.0 h1:TM3Jawprb2NrdOnvcHhWJalmKmAmOGgfZElM/3oBYCk= +github.com/gophercloud/gophercloud v1.8.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +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/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gosnmp/gosnmp v1.35.0 h1:EuWWNPxTCdAUx2/NbQcSa3WdNxjzpy4Phv57b4MWpJM= -github.com/gosnmp/gosnmp v1.35.0/go.mod h1:2AvKZ3n9aEl5TJEo/fFmf/FGO4Nj4cVeEc5yuk88CYc= -github.com/grafana/loki/pkg/push v0.0.0-20230321110627-5c3d204ebf5d h1:InEQBUAKYIHRlOVvxWxvpW5pziK53RdlhsuRJzBWUmE= -github.com/grafana/loki/pkg/push v0.0.0-20230321110627-5c3d204ebf5d/go.mod h1:BjNgF1EfQglDCrCbF0qiQLqAoBKva0/es63lSKT2TXw= +github.com/gosnmp/gosnmp v1.37.0 h1:/Tf8D3b9wrnNuf/SfbvO+44mPrjVphBhRtcGg22V07Y= +github.com/gosnmp/gosnmp v1.37.0/go.mod h1:GDH9vNqpsD7f2HvZhKs5dlqSEcAS6s6Qp099oZRCR+M= +github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37 h1:w59bmBeLOk4enGtyX4kTBNY3FCw/nwDTYUqcjC4vKhg= +github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37/go.mod h1:f3JSoxBTPXX5ec4FxxeC19nTBSxoTz+cBgS3cYLMcr0= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grobie/gomemcache v0.0.0-20180201122607-1f779c573665 h1:LONJvPBBd9wBmzSUmNHI7XpLE2qQ5tzUimeBadiVDuA= -github.com/grobie/gomemcache v0.0.0-20180201122607-1f779c573665/go.mod h1:L69/dBlPQlWkcnU76WgcppK5e4rrxzQdi6LhLnK/ytA= +github.com/grobie/gomemcache v0.0.0-20230213081705-239240bbc445 h1:FlKQKUYPZ5yDCN248M3R7x8yu2E3yEZ0H7aLomE4EoE= +github.com/grobie/gomemcache v0.0.0-20230213081705-239240bbc445/go.mod h1:L69/dBlPQlWkcnU76WgcppK5e4rrxzQdi6LhLnK/ytA= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= 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/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= -github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= +github.com/hashicorp/consul/api v1.28.2 h1:mXfkRHrpHN4YY3RqL09nXU1eHKLNiuAN4kHvDQ16k/8= +github.com/hashicorp/consul/api v1.28.2/go.mod h1:KyzqzgMEya+IZPcD65YFoOVAgPpbfERu4I/tzG6/ueE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= +github.com/hashicorp/consul/sdk v0.16.0 h1:SE9m0W6DEfgIVCJX7xU+iv/hUl4m/nxqMTnCdMxDpJ8= +github.com/hashicorp/consul/sdk v0.16.0/go.mod h1:7pxqqhqoaPqnBnzXD1StKed62LqJeClzVsUEy85Zr0A= github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -844,13 +890,14 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -863,6 +910,7 @@ github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5O github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -877,6 +925,8 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -887,15 +937,16 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c h1:Nc3Mt2BAnq0/VoLEntF/nipX+K1S7pG+RgwiitSv6v0= -github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c/go.mod h1:O23qLAZuCx4htdY9zBaO4cJPXgleSFEdq6D/sezGgYE= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702 h1:fI1LXuBaS1d9z1kmb++Og6YD8uMRwadXorCwE+xgOFA= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702/go.mod h1:z71gkJdrkAt/Rl6C7Q79VE7AwJ5lUF+M+fzFTyIHYB0= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hetznercloud/hcloud-go/v2 v2.4.0 h1:MqlAE+w125PLvJRCpAJmEwrIxoVdUdOyuFUhE/Ukbok= -github.com/hetznercloud/hcloud-go/v2 v2.4.0/go.mod h1:l7fA5xsncFBzQTyw29/dw5Yr88yEGKKdc6BHf24ONS0= +github.com/hetznercloud/hcloud-go/v2 v2.6.0 h1:RJOA2hHZ7rD1pScA4O1NF6qhkHyUdbbxjHgFNot8928= +github.com/hetznercloud/hcloud-go/v2 v2.6.0/go.mod h1:4J1cSE57+g0WS93IiHLV7ubTHItcp+awzeBp5bM9mfA= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= @@ -908,9 +959,10 @@ github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+h github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 h1:s9ZL6ZhFF8y6ebnm1FLvobkzoIu5xwDQUcRPk/IEhpM= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6/go.mod h1:aXdIdfn2OcGnMhOTojXmwZqXKgC3MU5riiNvzwwG9OY= -github.com/influxdata/influxdb-client-go/v2 v2.12.4 h1:9qJLqetEmhIlqaF/N9KUtdmRKSbNy6IohggyS3bxWlE= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 h1:2r2WiFeAwiJ/uyx1qIKnV1L4C9w/2V8ehlbJY4gjFaM= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4/go.mod h1:1yEQhaLb/cETXCqQmdh7lDjupNAReO7c83AHyK2dJ48= +github.com/influxdata/influxdb-client-go/v2 v2.13.0 h1:ioBbLmR5NMbAjP4UVA5r9b5xGjpABD7j65pI8kFphDM= +github.com/influxdata/influxdb-client-go/v2 v2.13.0/go.mod h1:k+spCbt9hcvqvUiz0sr5D8LolXHqAAOfPw9v/RIRHl4= github.com/influxdata/influxdb-observability/common v0.5.8 h1:nyk4dqnKbPGIyr1vAs6oEsFQEHWi5jkSQ7PtP4v//lc= github.com/influxdata/influxdb-observability/common v0.5.8/go.mod h1:aG8A2gbtXbl/P2FePd6QNsCUSOkcvz1n+NL5dJLUO1s= github.com/influxdata/influxdb-observability/influx2otel v0.5.8 h1:pHkeImZksXNNQbbH/w1qPuC/u6e7cK3kTG12otQHDuE= @@ -919,7 +971,9 @@ github.com/influxdata/influxdb-observability/otel2influx v0.5.8 h1:vZQ/WwiqIYPcZ github.com/influxdata/influxdb-observability/otel2influx v0.5.8/go.mod h1:tcg//mjCGBsN0hAPQhUBNWuGF2miPPEMJEBl0ZIAfCk= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSHzRbhzK8RdXOsAdfDgO49TtqC1oZ+acxPrkfTxcCs= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/influxdata/line-protocol-corpus v0.0.0-20210519164801-ca6fa5da0184/go.mod h1:03nmhxzZ7Xk2pdG+lmMd7mHDfeVOYFyhOgwO61qWU98= github.com/influxdata/line-protocol-corpus v0.0.0-20210922080147-aa28ccfb8937 h1:MHJNQ+p99hFATQm6ORoLmpUCF7ovjwEFshs/NHzAbig= github.com/influxdata/line-protocol-corpus v0.0.0-20210922080147-aa28ccfb8937/go.mod h1:BKR9c0uHSmRgM/se9JhFHtTT7JTO67X23MtKMHtZcpo= @@ -927,8 +981,8 @@ github.com/influxdata/line-protocol/v2 v2.0.0-20210312151457-c52fdecb625a/go.mod github.com/influxdata/line-protocol/v2 v2.1.0/go.mod h1:QKw43hdUBg3GTk2iC3iyCxksNj7PX9aUSeYOYE/ceHY= github.com/influxdata/line-protocol/v2 v2.2.1 h1:EAPkqJ9Km4uAxtMRgUubJyqAr6zgWM0dznKMLRauQRE= github.com/influxdata/line-protocol/v2 v2.2.1/go.mod h1:DmB3Cnh+3oxmG6LOBIxce4oaL4CPj3OmMPgvauXh+tM= -github.com/ionos-cloud/sdk-go/v6 v6.1.9 h1:Iq3VIXzeEbc8EbButuACgfLMiY5TPVWUPNrF+Vsddo4= -github.com/ionos-cloud/sdk-go/v6 v6.1.9/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +github.com/ionos-cloud/sdk-go/v6 v6.1.11 h1:J/uRN4UWO3wCyGOeDdMKv8LWRzKu6UIkLEaes38Kzh8= +github.com/ionos-cloud/sdk-go/v6 v6.1.11/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= @@ -939,8 +993,8 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= -github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= +github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w= +github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -956,8 +1010,8 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.2 h1:7eY55bdBeCz1F2fTzSz69QC+pG46jYq9/jtSPiJ5nn0= -github.com/jackc/pgproto3/v2 v2.3.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag= +github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= @@ -971,15 +1025,15 @@ github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08 github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.18.1 h1:YP7G1KABtKpB5IHrO9vYwSrCOhs7p3uqhvhhQBptya0= -github.com/jackc/pgx/v4 v4.18.1/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE= +github.com/jackc/pgx/v4 v4.18.3 h1:dE2/TrEsGX3RBprb3qryqSV9Y60iZN1C6i8IrmW9/BA= +github.com/jackc/pgx/v4 v4.18.3/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jaegertracing/jaeger v1.48.0 h1:YuKooQ7qJsjgxws9xuf8C/BLNTPx8qTAJz4wv7IHhSc= -github.com/jaegertracing/jaeger v1.48.0/go.mod h1:BoAPkdCAIEuLsVz/EDhjXd+GSVpHtJhiGqWoFEvBCKg= -github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= +github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= +github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/jawher/mow.cli v1.0.4/go.mod h1:5hQj2V8g+qYmLUVWqu4Wuja1pI57M83EChYLVZ0sMKk= github.com/jawher/mow.cli v1.2.0/go.mod h1:y+pcA3jBAdo/GIZx/0rFjw/K2bVEODP9rfZOfaiq8Ko= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= @@ -994,14 +1048,17 @@ github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh6 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/jellydator/ttlcache/v3 v3.1.0 h1:0gPFG0IHHP6xyUyXq+JaD8fwkDCqgqwohXNJBcYE71g= -github.com/jellydator/ttlcache/v3 v3.1.0/go.mod h1:hi7MGFdMAwZna5n2tuvh63DvFLzVKySzCVW6+0gA2n4= +github.com/jellydator/ttlcache/v3 v3.2.0 h1:6lqVJ8X3ZaUwvzENqPAobDsXNExfUJd61u++uW8a3LE= +github.com/jellydator/ttlcache/v3 v3.2.0/go.mod h1:hi7MGFdMAwZna5n2tuvh63DvFLzVKySzCVW6+0gA2n4= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= 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/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= +github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= @@ -1024,21 +1081,19 @@ github.com/karrick/godirwalk v1.17.0/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1q github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= 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/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4= -github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.10.8/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid/v2 v2.2.3 h1:sxCkb+qR91z4vsqw4vGGZlDgPz3G7gjaLyK3V8y70BU= -github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -1051,6 +1106,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= @@ -1059,12 +1115,15 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leesper/go_rng v0.0.0-20190531154944-a612b043e353 h1:X/79QL0b4YJVO5+OsPH9rF2u428CIrGL/jLmPsoOQQ4= github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b h1:11UHH39z1RhZ5dc4y4r/4koJo6IYFgTRMe/LlwRTEw0= github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= github.com/leoluk/perflib_exporter v0.2.1 h1:/3/ut1k/jFt5p4ypjLZKDHDqlXAK6ERZPVWtwdI389I= github.com/leoluk/perflib_exporter v0.2.1/go.mod h1:MinSWm88jguXFFrGsP56PtleUb4Qtm4tNRH/wXNXRTI= +github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= +github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= +github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ= +github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -1075,10 +1134,10 @@ github.com/lightstep/go-expohisto v1.0.0 h1:UPtTS1rGdtehbbAF7o/dhkWLTDI73UifG8Lb github.com/lightstep/go-expohisto v1.0.0/go.mod h1:xDXD0++Mu2FOaItXtdDfksfgxfV0z1TMPa+e/EUd0cs= github.com/linkedin/goavro/v2 v2.9.8 h1:jN50elxBsGBDGVDEKqUlDuU1cFwJ11K/yrJCBMe/7Wg= github.com/linkedin/goavro/v2 v2.9.8/go.mod h1:UgQUb2N/pmueQYH9bfqFioWxzYCZXSfF8Jw03O5sjqA= -github.com/linode/linodego v1.23.0 h1:s0ReCZtuN9Z1IoUN9w1RLeYO1dMZUGPwOQ/IBFsBHtU= -github.com/linode/linodego v1.23.0/go.mod h1:0U7wj/UQOqBNbKv1FYTXiBUXueR8DY4HvIotwE0ENgg= -github.com/logicmonitor/lm-data-sdk-go v1.0.0 h1:2eiz7kq3G0rLc/hqVpsk1c2B0PMjp6nLhHzc5SmTn80= -github.com/logicmonitor/lm-data-sdk-go v1.0.0/go.mod h1:XvYS9xp/0WrPpc6ge2O3ZPn2dgbKO46PnfCfbKaeUu8= +github.com/linode/linodego v1.30.0 h1:6HJli+LX7NGu+Sne2G+ux790EkVOWOV/SR4mK3jcs6k= +github.com/linode/linodego v1.30.0/go.mod h1:/46h/XpmWi//oSA92GX2p3FIxb8HbX7grslPPQalR2o= +github.com/logicmonitor/lm-data-sdk-go v1.3.0 h1:Obrexk35IKupFQezngkesR/kMfHQdAEUR1zYbJrOrzg= +github.com/logicmonitor/lm-data-sdk-go v1.3.0/go.mod h1:nIHr4uOPfg6AM7mG1rewg3L4O3rfge34o7UYB7joBM4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c h1:VtwQ41oftZwlMnOEbMWQtSEUgU64U4s+GHk7hZK+jtY= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE= @@ -1112,24 +1171,21 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI= -github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= +github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= github.com/microsoft/ApplicationInsights-Go v0.4.4 h1:G4+H9WNs6ygSCe6sUyxRc2U81TI5Es90b2t/MwX5KqY= github.com/microsoft/ApplicationInsights-Go v0.4.4/go.mod h1:fKRUseBqkw6bDiXTs3ESTiU/4YTIHsQS4W3fP2ieF4U= +github.com/microsoft/go-mssqldb v1.7.0 h1:sgMPW0HA6Ihd37Yx0MzHyKD726C2kY/8KJsQtXHNaAs= +github.com/microsoft/go-mssqldb v1.7.0/go.mod h1:kOvZKUdrhhFQmxLZqbwUV0rHkNkZpthMITIb2Ko1IoA= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE= -github.com/miekg/dns v1.1.56/go.mod h1:cRm6Oo2C8TY9ZS/TqsSrseAcncm74lfK5G+ikN2SWWY= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= +github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4= +github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk= @@ -1143,6 +1199,7 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0= github.com/mitchellh/hashstructure v1.1.0/go.mod h1:xUDAozZz0Wmdiufv0uyhnHkUTN6/6d8ulp4AwfLKrmA= @@ -1153,16 +1210,21 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +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/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= 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= @@ -1170,13 +1232,13 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= -github.com/mongodb-forks/digest v1.0.5 h1:EJu3wtLZcA0HCvsZpX5yuD193/sW9tHiNvrEM5apXMk= -github.com/mongodb-forks/digest v1.0.5/go.mod h1:rb+EX8zotClD5Dj4NdgxnJXG9nwrlx3NWKJ8xttz1Dg= +github.com/mongodb-forks/digest v1.1.0 h1:7eUdsR1BtqLv0mdNm4OXs6ddWvR4X2/OsLwdKksrOoc= +github.com/mongodb-forks/digest v1.1.0/go.mod h1:rb+EX8zotClD5Dj4NdgxnJXG9nwrlx3NWKJ8xttz1Dg= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/montanaflynn/stats v0.7.0 h1:r3y12KyNxj/Sb/iOE46ws+3mS1+MZca1wlHQFPsY/JU= github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= 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/mrunalp/fileutils v0.5.1 h1:F+S7ZlNKnrwHfSwdlgNSkKo67ReVf8o9fel6C3dkm/Q= @@ -1197,27 +1259,29 @@ github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/ github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nginxinc/nginx-plus-go-client v0.6.0/go.mod h1:DBAmdDP71tOhgFPdCMVusegzdKmLVpVL0nVcMX17pbY= -github.com/nginxinc/nginx-prometheus-exporter v0.8.1-0.20201110005315-f5a5f8086c19 h1:jR4KbeVA+KYmPq+amRe6AdB4mIfEaSOZGY2zCpqt/p8= -github.com/nginxinc/nginx-prometheus-exporter v0.8.1-0.20201110005315-f5a5f8086c19/go.mod h1:L58Se1nwn3cEyHWlcfdlXgiGbHe/efvDbkbi+psz3lA= +github.com/nginxinc/nginx-prometheus-exporter v0.11.0 h1:21xjnqNgxtni2jDgAQ90bl15uDnrTreO9sIlu1YsX/U= +github.com/nginxinc/nginx-prometheus-exporter v0.11.0/go.mod h1:GdyHnWAb8q8OW1Pssrrqbcqra0SH0Vn6UXICMmyWkw8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/observiq/nanojack v0.0.0-20201106172433-343928847ebc h1:49ewVBwLcy+eYqI4R0ICilCI4dPjddpFXWv3liXzUxM= +github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7oOxrWo= +github.com/oapi-codegen/runtime v1.0.0/go.mod h1:LmCUMQuPB4M/nLXilQXhHw+BLZdDb18B34OO356yJ/A= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -1225,25 +1289,27 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.31.0 h1:54UJxxj6cPInHS3a35wm6BK/F9nHYueZ1NVujHDrnXE= +github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKiT6zk= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= -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/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= +github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= +github.com/opensearch-project/opensearch-go/v2 v2.3.0 h1:nQIEMr+A92CkhHrZgUhcfsrZjibvB3APXf2a1VwCmMQ= +github.com/opensearch-project/opensearch-go/v2 v2.3.0/go.mod h1:8LDr9FCgUTVoT+5ESjc2+iaZuldqE+23Iq0r1XeNue8= github.com/openshift/api v0.0.0-20180801171038-322a19404e37 h1:05irGU4HK4IauGGDbsk+ZHrm1wOzMLYjMlfaiqMrBYc= github.com/openshift/api v0.0.0-20180801171038-322a19404e37/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/api v0.0.0-20210521075222-e273a339932a/go.mod h1:izBmoXbUu3z5kUa4FjZhvekTsyzIWiOoaIgJiZBBMQs= github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 h1:ZHRIMCFIJN1p9LsJt4HQ+akDrys4PrYnXzOWI5LK03I= github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142/go.mod h1:fjS8r9mqDVsPb5td3NehsNOAWa4uiFkYEfVZioQ2gH0= -github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDOCg/jA= @@ -1257,12 +1323,12 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/paulmach/orb v0.10.0 h1:guVYVqzxHE/CQ1KpfGO077TR0ATHSNjp4s6XGLn3W9s= -github.com/paulmach/orb v0.10.0/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= +github.com/paulmach/orb v0.11.1 h1:3koVegMC4X/WeiXYz9iswopaTwMem53NzTJuTF20JzU= +github.com/paulmach/orb v0.11.1/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= @@ -1272,21 +1338,20 @@ github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi github.com/pierrec/lz4 v2.6.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -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/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= +github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= -github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= -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/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pkg/sftp v1.13.5 h1:a3RLUqkyjYRtBTZJZ1VRrKbN3zhuPLlUc3sphVz81go= -github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg= +github.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo= +github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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= @@ -1300,21 +1365,17 @@ github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= @@ -1322,35 +1383,31 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9 github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.31.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/prometheus v0.48.0 h1:yrBloImGQ7je4h8M10ujGh4R6oxYQJQKlMuETwNskGk= -github.com/prometheus/prometheus v0.48.0/go.mod h1:SRw624aMAxTfryAcP8rOjg4S/sHHaetx2lyJJ2nM83g= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= +github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= +github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e h1:UmqAuY2OyDoog8+l5FybViJE5B2r+UxVGCUwFTsY5AA= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e/go.mod h1:+0ld+ozir7zWFcHA2vVpWAKxXakIioEjPPNOqH+J3ZA= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/relvacode/iso8601 v1.3.0 h1:HguUjsGpIMh/zsTczGN3DVJFxTU/GX+MMmzcKoMO7ko= -github.com/relvacode/iso8601 v1.3.0/go.mod h1:FlNp+jz+TXpyRqgmM7tnzHHzBnz776kmAH2h3sZCn0I= +github.com/redis/go-redis/v9 v9.5.1 h1:H1X4D3yHPaYrkL5X06Wh6xNVM/pX0Ft4RV0vMGvLBh8= +github.com/redis/go-redis/v9 v9.5.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= +github.com/relvacode/iso8601 v1.4.0 h1:GsInVSEJfkYuirYFxa80nMLbH2aydgZpIf52gYZXUJs= +github.com/relvacode/iso8601 v1.4.0/go.mod h1:FlNp+jz+TXpyRqgmM7tnzHHzBnz776kmAH2h3sZCn0I= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= @@ -1359,13 +1416,17 @@ github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThC github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= +github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 h1:yWfiTPwYxB0l5fGMhl/G+liULugVIHD9AU77iNLrURQ= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= -github.com/scalyr/dataset-go v0.14.0 h1:uRkoUt6LcMcH3VUTjOakQ4aq+1ooJB2t47oqYRUkV/k= -github.com/scalyr/dataset-go v0.14.0/go.mod h1:+a4BvVyS7mKquK7ySuWh4vygyDBREQrdikdcnABYKFw= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 h1:/8rfZAdFfafRXOgz+ZpMZZWZ5pYggCY9t7e/BvjaBHM= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scalyr/dataset-go v0.18.0 h1:CTv7kk/FGdiicTWo3h1brFusHD1yjhVGINFamP8uukw= +github.com/scalyr/dataset-go v0.18.0/go.mod h1:4x0JK5X0UdhZ2TEO3kHu9pTELDRc3WsrBBwQfkOPZKc= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 h1:RpforrEYXWkmGwJHIGnLZ3tTWStkjVVstwzNGqxX2Ds= @@ -1374,13 +1435,14 @@ github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAj github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= -github.com/shirou/gopsutil/v3 v3.22.2/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/shirou/gopsutil/v3 v3.22.12/go.mod h1:Xd7P1kwZcp5VW52+9XsirIKd/BROzbb2wdX3Kqlz9uI= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= +github.com/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= +github.com/shoenig/test v1.7.1/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= @@ -1388,10 +1450,10 @@ github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFR github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 h1:32k2QLgsKhcEs55q4REPKyIadvid5FPy2+VMgvbmKJ0= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfiC7+VheQaz+ypdCt5SmZNL+BRxUe7y4= -github.com/signalfx/sapm-proto v0.13.0 h1:yEkp1+MAU4vZvnJMp56uhVlRjlvCK7KQjBg0g2Apw8k= -github.com/signalfx/sapm-proto v0.13.0/go.mod h1:C72HjeCW5v0Llk6pIVJ/ZH8A5GbiZpCCSkE1dSlpWxY= -github.com/sijms/go-ora/v2 v2.7.20 h1:Q+/zNx3DMgytXMAvIbt/pUJcYj2jMRv/2Zg1DDlWhTY= -github.com/sijms/go-ora/v2 v2.7.20/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= +github.com/signalfx/sapm-proto v0.14.0 h1:KWh3I5E4EkelB19aP1/54Ik8khSioC/RVRW/riOfRGg= +github.com/signalfx/sapm-proto v0.14.0/go.mod h1:Km6PskZh966cqNoUn3AmRyGRix5VfwnxVBvn2vjRC9U= +github.com/sijms/go-ora/v2 v2.8.11 h1:oQtSX145kCYSjnrmWdtqp2LON9wOQW09wPJ5pIEn5Tg= +github.com/sijms/go-ora/v2 v2.8.11/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -1403,32 +1465,33 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/snowflakedb/gosnowflake v1.6.25 h1:o5zUmxTOo0Eo9AdkEj8blCeiMuILrQJ+rjUMAeZhcRE= -github.com/snowflakedb/gosnowflake v1.6.25/go.mod h1:KfO4F7bk+aXPUIvBqYxvPhxLlu2/w4TtSC8Rw/yr5Mg= +github.com/snowflakedb/gosnowflake v1.9.0 h1:s2ZdwFxFfpqwa5CqlhnzRESnLmwU3fED6zyNOJHFBQA= +github.com/snowflakedb/gosnowflake v1.9.0/go.mod h1:4ZgHxVf2OKwecx07WjfyAMr0gn8Qj4yvwAo68Og8wsU= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -1436,8 +1499,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1449,21 +1513,21 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F 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.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -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/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.792 h1:MwUEEkppjl0GIiz/rovNF54PG+RBwdfk1/+Rys8NUko= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.792/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= -github.com/testcontainers/testcontainers-go v0.26.0 h1:uqcYdoOHBy1ca7gKODfBd9uTHVK3a7UL848z09MVZ0c= -github.com/tg123/go-htpasswd v1.2.1 h1:i4wfsX1KvvkyoMiHZzjS0VzbAPWfxzI8INcZAKtutoU= -github.com/tg123/go-htpasswd v1.2.1/go.mod h1:erHp1B86KXdwQf1X5ZrLb7erXZnWueEQezb2dql4q58= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.896 h1:24LJSJctlcXa6KzV5quttY8R8NmmF4hTbeWgqKm6clw= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.896/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/testcontainers/testcontainers-go v0.29.1 h1:z8kxdFlovA2y97RWx98v/TQ+tR+SXZm6p35M+xB92zk= +github.com/testcontainers/testcontainers-go v0.29.1/go.mod h1:SnKnKQav8UcgtKqjp/AD8bE1MqZm+3TDb/B8crE3XnI= +github.com/tg123/go-htpasswd v1.2.2 h1:tmNccDsQ+wYsoRfiONzIhDm5OkVHQzN3w4FOBAlN6BY= +github.com/tg123/go-htpasswd v1.2.2/go.mod h1:FcIrK0J+6zptgVwK1JDlqyajW/1B4PtuJ/FLWl7nx8A= github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.14.3 h1:9jvXn7olKEHU1S9vwoMGliaT8jq1vJ7IH/n9zD9Dnlw= github.com/tidwall/gjson v1.14.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -1480,36 +1544,35 @@ github.com/tilinna/clock v1.1.0/go.mod h1:ZsP7BcY7sEEz7ktc0IVy8Us6boDrK8VradlKRU github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU= github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= +github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= github.com/tjfoc/gmsm v1.3.2 h1:7JVkAn5bvUJ7HtU08iW6UiD+UTmJTIToHCfeFzkcCxM= github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= -github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= +github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= 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.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= +github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= +github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/vincent-petithory/dataurl v1.0.0 h1:cXw+kPto8NLuJtlMsI152irrVw9fRDX8AbShPRpg2CI= github.com/vincent-petithory/dataurl v1.0.0/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U= github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs= github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f h1:p4VB7kIXpOQvVn1ZaTIVp+3vuYAXFe3OJEvjbUYJLaA= -github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= +github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8= +github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= +github.com/vmihailenco/msgpack/v4 v4.3.13 h1:A2wsiTbvp63ilDaWmsk2wjx6xZdxQOvpiNlKBGKKXKI= +github.com/vmihailenco/msgpack/v4 v4.3.13/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= -github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f h1:NbC9yOr5At92seXK+kOr2TzU3mIWzcJOVzZasGSuwoU= -github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f/go.mod h1:VEqcmf4Sp7gPB7z05QGyKVmn6xWppr7Nz8cVNvyC80o= -github.com/vmware/govmomi v0.33.1 h1:qS2VpEBd/WLbzLO5McI6h5o5zaKsrezUxRY5r9jkW8A= -github.com/vmware/govmomi v0.33.1/go.mod h1:QuzWGiEMA/FYlu5JXKjytiORQoxv2hTHdS2lWnIqKMM= +github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e h1:Vu41Q0Pv3yMdd+tcDW6QeEUIK2L+9ZrPrq8NAMrKSLc= +github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e/go.mod h1:aRq5pxwgdJpAuP97SCjX1+Db32z/b0dggQ07FDF+fqE= +github.com/vmware/govmomi v0.36.3 h1:1Ng3CBNQVbFjCQbKtfsewy5o3dFa+EoTjqeThVISUBc= +github.com/vmware/govmomi v0.36.3/go.mod h1:mtGWtM+YhTADHlCgJBiskSRPOZRsN9MSjPzaZLte/oQ= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= -github.com/wavefronthq/wavefront-sdk-go v0.15.0 h1:po9E3vh/0y7kOx8D9EtFp7kbSLLLKbmu/w/s1xGJAQU= -github.com/wavefronthq/wavefront-sdk-go v0.15.0/go.mod h1:V72c8e+bXuLK8HpA6ioW0ll5mK9IPD+4IHNNDY75ksA= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= @@ -1528,21 +1591,25 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 h1:5mLPGnFdSsevFRFc9q3yYbBkB6tsm4aCwwQV/j1JQAQ= github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/zorkian/go-datadog-api v2.30.0+incompatible h1:R4ryGocppDqZZbnNc5EDR8xGWF/z/MxzWnqTUijDQes= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +github.com/zorkian/go-datadog-api v2.30.0+incompatible/go.mod h1:PkXwHX9CUQa/FpB9ZwAD45N1uhCW4MT/Wj7m36PbKss= +go.einride.tech/aip v0.66.0 h1:XfV+NQX6L7EOYK11yoHHFtndeaWh3KbD9/cN/6iWEt8= +go.einride.tech/aip v0.66.0/go.mod h1:qAhMsfT7plxBX+Oy7Huol6YUvZ0ZzdUz26yZsQwfl1M= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.mongodb.org/atlas v0.35.0 h1:fLSPEyv+QcrG5djPWMekaM+BEVfEVBKQO4yEUQl4CQ4= -go.mongodb.org/atlas v0.35.0/go.mod h1:nfPldE9dSama6G2IbIzmEza02Ly7yFZjMMVscaM0uEc= +go.mongodb.org/atlas v0.36.0 h1:m05S3AO7zkl+bcG1qaNsEKBnAqnKx2FDwLooHpIG3j4= +go.mongodb.org/atlas v0.36.0/go.mod h1:nfPldE9dSama6G2IbIzmEza02Ly7yFZjMMVscaM0uEc= go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1554,111 +1621,131 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/configgrpc v0.89.0/go.mod h1:2GuAxpU34a1X19kCZ8Kw3FUsxOIiFcWHiYorRCyhnCc= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/exporter/debugexporter v0.89.0 h1:MQUEX4OWszJQqQMqtYERiiw02Ta9QMWPe/hHWoD4YBU= -go.opentelemetry.io/collector/exporter/debugexporter v0.89.0/go.mod h1:eLoVrKOjgPvAmg0XJuellJ03zEpEol26l8i48Rhv53Q= -go.opentelemetry.io/collector/exporter/loggingexporter v0.89.0 h1:AdMGaH1p9D1Kvjkd/sXMg/Hkc5M1lqBdhXY5WfmiGSE= -go.opentelemetry.io/collector/exporter/loggingexporter v0.89.0/go.mod h1:N4zI/Zkjz5hx774uM3RdQTIeiw59FMmOdHrpbOK5UvE= -go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0 h1:0oYIeiRTURjIIYXs1OsaMAyNgg6Vc/CNa882YCYS/04= -go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0/go.mod h1:kA+ycED/f5rUj2030XE45q0aXUe5haZhW62zdPgice0= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0 h1:HzEVN0r94lkymm9D+NlB/UUlLqZqC5rnHUBN0Kj/ZYs= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0/go.mod h1:2AhkhO9YDcbfZ5X5gwN+k51FYFW8qfOWIrCEASp13qI= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/extension/ballastextension v0.89.0 h1:9Nhxmaj2XtAMik3SSTswW+MiOHPzC6LE0ZJOsnmqkPY= -go.opentelemetry.io/collector/extension/ballastextension v0.89.0/go.mod h1:kVGHc9tbBPaQgDsFEDhtwbQkWJmyHne2XrVhK0zyYZk= -go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 h1:opvHcGANx+dS4HJwGTPtRMd6dZdOmmGn6c3PfW/bihQ= -go.opentelemetry.io/collector/extension/zpagesextension v0.89.0/go.mod h1:RlhcZHBMg86y1hgBf+j1lNvnZ8ihWiYTYXFiy5InwyY= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/otelcol v0.89.0 h1:b3kC0zM9T6GxjhTcNEHIzXDd4zTIc7cBpexCPZ9nPzg= -go.opentelemetry.io/collector/otelcol v0.89.0/go.mod h1:BILxDcJe32wK+paX7ssnt4jyjOmTkIHvXe9JNjlHUk8= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 h1:oTEOHs2t00f9LfRwZGzKSXJPR3FHjPDDhjt05iWXYZM= -go.opentelemetry.io/collector/processor/batchprocessor v0.89.0/go.mod h1:xaTfwrIbnsUpvaUCIecvlH8wTH500U7LtczdaEPXmmk= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.89.0 h1:Rw7SMMMGD9YIJjqwNA1nZTEFAMJumMv2hb58iTtCrH0= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.89.0/go.mod h1:3gmY8wAiqcmThKH7e8t+J/p0BGvXymHrwum7tcm2rbs= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 h1:ayqzWyj56xyc0tcBpaYjWtxvj5pfZNhYC8LrwvlLAeE= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0/go.mod h1:7p2oZ09hP+h6WpTv67PgEJx+azViVqLBE4IfrnDOWOc= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/collector/service v0.89.0/go.mod h1:6IAr9Asn6t6YxSw6Qv5LwA+ilVUtP0nQsu1xzc9+mZA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0 h1:Yty9Vs4F3D6/liF1o6FNt0PvN85h/BJJ6DQKJ3nrcM0= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0/go.mod h1:On4VgbkqYL18kbJlWsa18+cMNe6rYpBnPi1ARI/BrsU= -go.opentelemetry.io/contrib/zpages v0.45.0 h1:jIwHHGoWzJoZdbIUtWdErjL85Gni6BignnAFqDtMRL4= -go.opentelemetry.io/contrib/zpages v0.45.0/go.mod h1:4mIdA5hqH6hEx9sZgV50qKfQO8aIYolUZboHmz+G7vw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0 h1:E/sf+2slCUb7wqh5FHwhdwKWTA+VXyMMAcFNlKVf4yw= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0/go.mod h1:2xuXI78Xp9cttLsJMF/Y08cJUqckLt0kLasn+vcHR5w= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0/go.mod h1:hbzqqcIxyywu6UQ5J1wb4ntla8nCwCfNBZnMo2Dgh48= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0/go.mod h1:qmFtGlXhoa9qPt5RrZgMp4f5RfRagucrdriI+hb3yWQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0/go.mod h1:CMJYNAfooOwSZSAmAeMUV1M+TXld3BiK++z9fqIm2xk= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0/go.mod h1:nZStMoc1H/YJpRjSx9IEX4abBMekORTLQcTUT1CgLkg= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 h1:vcSjcjn/BTeM6abI5CDymZdtd1m24quD1Mx4VE3N3fM= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0/go.mod h1:HblEnlZQNsVuuDpszdKTWcrHBI09OjBn2pWSzBx1goM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 h1:4s9HxB4azeeQkhY0GE5wZlMj4/pz8tE5gx2OQpGUw58= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0/go.mod h1:djVA3TUJ2fSdMX0JE5XxFBOaZzprElJoP7fD4vnV2SU= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 h1:lRhfcLr3gK5S/zn92h3clyOPnCvvNKs1WTMbtH4UvO0= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0/go.mod h1:vNMFTWe4dF05LsodUOc84OfxdlYVp1kCMuZzb41WfAk= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 h1:x/VsGlBj+DtJCXIucwzwcxiwnwAU8a6ALK6UN8fPdKQ= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0/go.mod h1:BapTGXu7CYrQGNohbapPwTSt2Ty/k/c6Oemx9mSSiK4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 h1:SxDS+Yr8qE+ID58ELR5n0D+SUlqHKOZ72pK3YPFAelA= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0/go.mod h1:DEoB0d0k1iGt4KEABntL8AW9xYQ6E7fmgkM2/s8aXvM= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 h1:C02SPbRPvrtmZ9TvsHWpz2TvHzqY5mNyEAlDdhax/a4= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0/go.mod h1:dzZKtykJio3Rm+G+Cmr15VV3xKp0PmFuh9Q9b3c1K7A= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 h1:04zGXVQZ8D6nvoPX8AaqxWxGHNNVsGR78E+tY+2VQr8= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0/go.mod h1:+UrRiugWaQPssz4mgEgQQo640f2bDUCFlo2Xr0/5ulc= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 h1:JYpDN0OnMsu0awk0rjaYEIko9hFzzBJ6+2U5W2iVvUE= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0/go.mod h1:xrXL804nBum1PgbvmJQ4I+hyW+DU4xBGO3MKMiYFX6E= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/connector/forwardconnector v0.98.0 h1:zIn0GaqUKq+3GcvfdVEIB/GSv7Zdtda8q0XChXG6Qj0= +go.opentelemetry.io/collector/connector/forwardconnector v0.98.0/go.mod h1:eC6PfRbK0Mx7QpqfnEI0uPAjq27MR//sRb5Vxzuf6eE= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 h1:zAFCXYzpxDh64BIVujqntlN5RE4jDahbPfJBy/Wq7D0= +go.opentelemetry.io/collector/exporter/debugexporter v0.98.0/go.mod h1:S15ELDQFoP5da3NHzXJR2I8FGUnM2C1Hp6e/OhaCtw0= +go.opentelemetry.io/collector/exporter/loggingexporter v0.98.0 h1:2DNfziYl0w8Sq9bPdYlPpn5MLLQGB73LB7O1BIYQxA4= +go.opentelemetry.io/collector/exporter/loggingexporter v0.98.0/go.mod h1:SBuTQ0sA3fEd/jAJFAxjTX8Ndwkc4Mtkc6gsz115S+8= +go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0 h1:uhiR/luaJCwMnvvkIS/gIxBbSAp+/vbqeC3AXmuc/kg= +go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0/go.mod h1:1ySnK/6Cl+67FTP6ty04PX9nrXPYFPuBqZ+Xn9Jzz6Y= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.98.0 h1:+6mRqTgoJxXxuPwI8s5fMKm0mLfwVwJgD2EB7gUNNlE= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.98.0/go.mod h1:uGocxqpbUrZDwZz6JBKsvNCyDLrS/pnVpn4BUuPauFw= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/extension/ballastextension v0.98.0 h1:EPzsYpiSY4vAfzJMqhVK6bIh+qZRmXVskaNlRFKjA0w= +go.opentelemetry.io/collector/extension/ballastextension v0.98.0/go.mod h1:IY/JNP0g+tUUe/w5YHgBYwv5XlH4eqo5d4th+RGROFU= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 h1:JfvsDpTwAhA9au8/4vmONRh0OBVU6n36seb41JD/mTQ= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0/go.mod h1:t1zDwy6kYp4w1JgcGHMvdGbKYHqWpK00bB1AEQ0Oqlc= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/otelcol v0.98.0 h1:sUk49Wqw+VBYeDynEA+GSeVEusFvzFW3KuF2vfDbyo0= +go.opentelemetry.io/collector/otelcol v0.98.0/go.mod h1:dW3UzuaiaNTddjKajk3Tp2Y7muDvYJdQz2yGUOE53gs= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 h1:iM4fMLGig3GKmz5XNtOPKDsnCnvbi0+UHYaWsx/aSRc= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0/go.mod h1:ROnuUkZJgpKEIDf3AIVjgRGNI7KPqCKPXsw8whL6Hzs= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0 h1:1jjiC3POfIluGLVM+6y8nolKEI95/vlHAvDmIOatags= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0/go.mod h1:VQDDrhQbIoelGF+fKzy6vCQM3hWDCH2YFaZKqgTDmGk= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 h1:j7lfLwc5o1dtXIPXU8LjmxadejmJVRHN57ZYGH33Wq4= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0/go.mod h1:uWDBDxaWuzF1U5S2UIhstO0+Q8aUiwiUu8uO1IYN2XQ= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/collector/service v0.98.0 h1:lLJ7VXPXcV62fSISh4GuNd5ti6WvKje76NSgezc3ydo= +go.opentelemetry.io/collector/service v0.98.0/go.mod h1:wB7ozvZTHtMefb5KTYy5nyrVYWpGk8teq8jWFs4blIU= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0 h1:QU8UEKyPqgr/8vCC9LlDmkPnfFmiWAUF9GtJdcLz+BU= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0/go.mod h1:qonC7wyvtX1E6cEpAR+bJmhcGr6IVRGc/f6ZTpvi7jA= +go.opentelemetry.io/contrib/zpages v0.50.0 h1:hKC5asr83xDN4ErwSHVdk3gv053pZiF8SZKmS86IPEw= +go.opentelemetry.io/contrib/zpages v0.50.0/go.mod h1:8WovRn95fZdaX/dr3e4h7D8IqiVsnZ+WxY0Yn4LyU3k= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0 h1:0o/9KwAgxjK+3pMV0pwIF5toYHqDsPmQhfrBvKaG6mU= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0/go.mod h1:rZyTdpmRqoV+PpUn6QlruxJp/kE4765rPy0pP6mRDk8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 h1:hDKnobznDpcdTlNzO0S/owRB8tyVr1OoeZZhDoqY+Cs= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0/go.mod h1:kUDQaUs1h8iTIHbQTk+iJRiUvSfJYMMKTtMCaiVu7B0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 h1:Wc4hZuYXhVqq+TfRXLXlmNIL/awOanGx8ssq3ciDQxc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0/go.mod h1:BydOvapRqVEc0DVz27qWBX2jq45Ca5TI9mhZBDIdweY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 h1:vOL89uRfOCCNIjkisd0r7SEdJF3ZJFyCNY34fdZs8eU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0/go.mod h1:8GlBGcDk8KKi7n+2S4BT/CPZQYH3erLu0/k64r1MYgo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 h1:d7nHbdzU84STOiszaOxQ3kw5IwkSmHsU5Muol5/vL4I= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0/go.mod h1:yiPA1iZbb/EHYnODXOxvtKuB0I2hV8ehfLTEWpl7BJU= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 h1:0vZZdECYzhTt9MKQZ5qQ0V+J3MFu4MQaQ3COfugF+FQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0/go.mod h1:e7iXx3HjaSSBXfy9ykVUlupS2Vp7LBIBuT21ousM2Hk= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -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.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1670,6 +1757,7 @@ go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0 go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= 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.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= @@ -1683,8 +1771,8 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -1701,22 +1789,21 @@ golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1730,8 +1817,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= -golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1760,8 +1847,9 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.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/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1803,7 +1891,6 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -1812,19 +1899,18 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= 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.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1838,9 +1924,8 @@ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1852,10 +1937,10 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/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.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.1.0/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-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1884,7 +1969,6 @@ golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1902,7 +1986,6 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200509044756-6aff5f38e54f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1931,43 +2014,41 @@ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/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-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/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-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/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.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1978,7 +2059,10 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1987,8 +2071,9 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2051,7 +2136,6 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210112230658-8b4aab62c064/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -2059,20 +2143,21 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= -golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= -gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -2097,16 +2182,17 @@ google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjR google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= -google.golang.org/api v0.150.0 h1:Z9k22qD289SZ8gCJrk4DrWXkNjtfvKAUo/l1ma8eBYE= -google.golang.org/api v0.150.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= +google.golang.org/api v0.172.0 h1:/1OcMZGPmW1rX2LCu2CmGUD1KXK1+pfzxotxyRUCCdk= +google.golang.org/api v0.172.0/go.mod h1:+fJZq6QXWfa9pXhnIzsjx4yI22d4aI9ZpLb58gvXjis= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -2142,9 +2228,7 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2152,12 +2236,12 @@ google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaE google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -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-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -2179,8 +2263,8 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -2195,9 +2279,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2221,8 +2305,6 @@ gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24 gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -2242,7 +2324,10 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 h1:umQdVO0Ytx+kYadhuJNjFtDgIsIEBnKrOTvNuu8ClKI= gopkg.in/zorkian/go-datadog-api.v2 v2.30.0/go.mod h1:kx0CSMRpzEZfx/nFH62GLU4stZjparh/BRpM89t4XCQ= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2251,46 +2336,44 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= -k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/api v0.30.0 h1:siWhRq7cNjy2iHssOB9SCGNCl2spiF1dO3dABqZ8niA= +k8s.io/api v0.30.0/go.mod h1:OPlaYhoHs8EQ1ql0R/TsUgaRPhpKNxIMrKQfWUp8QSE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= -k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/apimachinery v0.30.0 h1:qxVPsyDM5XS96NIh9Oj6LavoVFYff/Pon9cZeDIkHHA= +k8s.io/apimachinery v0.30.0/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= -k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= +k8s.io/client-go v0.30.0 h1:sB1AGGlhY/o7KCyCEQ0bPWzYDL0pwOZO4vAtTSh/gJQ= +k8s.io/client-go v0.30.0/go.mod h1:g7li5O5256qe6TYdAMyX/otJqMhIiGgTapdLchhmOaY= k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/kubelet v0.28.4 h1:Ypxy1jaFlSXFXbg/yVtFOU2ZxErBVRJfLu8+t4s7Dtw= -k8s.io/kubelet v0.28.4/go.mod h1:w1wPI12liY/aeC70nqKYcNNkr6/nbyvdMB7P7wmww2o= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/kubelet v0.30.0 h1:/pqHVR2Rn8ExCpn211wL3pMtqRFpcBcJPl4+1INbIMk= +k8s.io/kubelet v0.30.0/go.mod h1:WukdKqbQxnj+csn3K8XOKeX7Sh60J/da25IILjvvB5s= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= -sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= +sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk= +sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= -skywalking.apache.org/repo/goapi v0.0.0-20231026090926-09378dd56587 h1:TY79I5Y7xRB8q5LQ+MJn7NYsYi0VL5nj1QDrUHwK7cQ= -skywalking.apache.org/repo/goapi v0.0.0-20231026090926-09378dd56587/go.mod h1:onFubXaIoY/2FTRVrLMqCTlaNq4SilAEwF/2G0IcaBw= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4 h1:3YIFmsshgsU6FzHgnkG9Z24CkXkgoexBN5O0aSzK79g= +skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4/go.mod h1:oD2dxcDAHVIt95Ee7kJHgZ5f64QNhrqTjQYARwfafc4= diff --git a/cmd/configschema/metadata.yaml b/cmd/configschema/metadata.yaml index 6f3149878357..4b61cd6491c5 100644 --- a/cmd/configschema/metadata.yaml +++ b/cmd/configschema/metadata.yaml @@ -3,4 +3,5 @@ type: configschema status: class: cmd codeowners: - active: [mx-psi, dmitryax, pmcollins] \ No newline at end of file + active: [mx-psi, dmitryax] + emeritus: [pmcollins] \ No newline at end of file diff --git a/cmd/configschema/package_test.go b/cmd/configschema/package_test.go new file mode 100644 index 000000000000..d326dc6613ab --- /dev/null +++ b/cmd/configschema/package_test.go @@ -0,0 +1,31 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package configschema + +import ( + "testing" + + "go.uber.org/goleak" +) + +// The Ignore function calls prevent catching leaks generated by indirect dependencies. +// All of these are leaks that we can't fix from within the collector code base. +// Regarding the OpenCensus ignore: see https://github.com/census-instrumentation/opencensus-go/issues/1191 +// Regarding the DataDog ignore: see https://github.com/DataDog/datadog-agent/issues/22030 +// Regarding the database/sql ignore: see https://github.com/SAP/go-hdb/issues/130 +// Regarding the SAP/go-hdb ignore: see https://github.com/SAP/go-hdb/issues/131 +// Regarding the cihub/seelog ignore: see https://github.com/cihub/seelog/issues/182 +// Regarding the godbus/dbus ignore: see https://github.com/99designs/keyring/issues/135 +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m, + goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreTopFunction("github.com/DataDog/datadog-agent/pkg/trace/metrics/timing.(*Set).Autoreport.func1"), + // Unfortunately this ignore can't be anymore specific, even though it's caused by the SAP/go-hdb/driver + // package. There's no reference to this package in the goleak output. This has the potential of + // hiding future leaks, so we should remove as soon as the referenced issue is resolved. + goleak.IgnoreTopFunction("database/sql.(*DB).connectionOpener"), + goleak.IgnoreTopFunction("github.com/SAP/go-hdb/driver.(*metrics).collect"), + goleak.IgnoreAnyFunction("github.com/cihub/seelog.(*asyncLoopLogger).processQueue"), + goleak.IgnoreAnyFunction("github.com/godbus/dbus.(*Conn).inWorker")) +} diff --git a/cmd/configschema/resolver_test.go b/cmd/configschema/resolver_test.go index f74fe4759741..f19f76d1cc9b 100644 --- a/cmd/configschema/resolver_test.go +++ b/cmd/configschema/resolver_test.go @@ -1,10 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - package configschema import ( @@ -48,7 +44,7 @@ func TestTypeToPackagePath_Local(t *testing.T) { func TestTypeToPackagePath_External(t *testing.T) { packageDir := testTypeToPackagePath(t, otlpreceiver.Config{}) - assert.Contains(t, packageDir, "pkg/mod/go.opentelemetry.io/collector/receiver@") + assert.Contains(t, packageDir, filepath.Join("pkg", "mod", "go.opentelemetry.io", "collector", "receiver@")) } func TestTypeToPackagePath_Error(t *testing.T) { @@ -59,7 +55,7 @@ func TestTypeToPackagePath_Error(t *testing.T) { func TestTypeToProjectPath(t *testing.T) { dir := testDR().ReflectValueToProjectPath(reflect.ValueOf(&redisreceiver.Config{})) - assert.Equal(t, "../../receiver/redisreceiver", dir) + assert.Equal(t, filepath.Join("..", "..", "receiver", "redisreceiver"), dir) } func TestTypetoProjectPath_External(t *testing.T) { diff --git a/cmd/githubgen/allowlist.txt b/cmd/githubgen/allowlist.txt index 1459e9308ad1..15b721e0324d 100644 --- a/cmd/githubgen/allowlist.txt +++ b/cmd/githubgen/allowlist.txt @@ -1,24 +1,18 @@ Caleb-Hurshman -Doron-Bargo MaxKsyunz MitchellGale YANG-DB -agoallikmaa -architjugran asaharn -billmeyer -eedorenko emreyalvac -keep94 -kiranmayib -kkujawa-sumo -leonsp-ai -liqiangz -oded-dd shaochengwang -svrakitin -thepeterstone yiyang5055 am-kinetica -mcube8 -sokoide +cheempz +jerrytfleung +driverpt +adcharre +jcreixell +rlankfo +swar8080 +zpzhuSplunk +thmshmm diff --git a/cmd/githubgen/codeowners.go b/cmd/githubgen/codeowners.go new file mode 100644 index 000000000000..48cd9430a261 --- /dev/null +++ b/cmd/githubgen/codeowners.go @@ -0,0 +1,226 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package main + +import ( + "context" + "fmt" + "os" + "path/filepath" + "sort" + "strings" + + "github.com/google/go-github/v61/github" +) + +const allowlistHeader = `# Code generated by githubgen. DO NOT EDIT. +##################################################### +# +# List of components in OpenTelemetry Collector Contrib +# waiting on owners to be assigned +# +##################################################### +# +# Learn about membership in OpenTelemetry community: +# https://github.com/open-telemetry/community/blob/main/community-membership.md +# +# +# Learn about CODEOWNERS file format: +# https://help.github.com/en/articles/about-code-owners +# + +## +# NOTE: New components MUST have one or more codeowners. Add codeowners to the component metadata.yaml and run make gengithub +## + +## COMMON & SHARED components +internal/common + +` + +const unmaintainedHeader = ` + +## UNMAINTAINED components + +` + +const codeownersHeader = `# Code generated by githubgen. DO NOT EDIT. +##################################################### +# +# List of codeowners for OpenTelemetry Collector Contrib +# +##################################################### +# +# Learn about membership in OpenTelemetry community: +# https://github.com/open-telemetry/community/blob/main/community-membership.md +# +# +# Learn about CODEOWNERS file format: +# https://help.github.com/en/articles/about-code-owners +# + +* @open-telemetry/collector-contrib-approvers +` + +const distributionCodeownersHeader = ` +##################################################### +# +# List of distribution maintainers for OpenTelemetry Collector Contrib +# +##################################################### +` + +type codeownersGenerator struct { +} + +func (cg codeownersGenerator) generate(data *githubData) error { + allowlistData, err := os.ReadFile(data.allowlistFilePath) + if err != nil { + return err + } + allowlistLines := strings.Split(string(allowlistData), "\n") + + allowlist := make(map[string]struct{}, len(allowlistLines)) + unusedAllowlist := make(map[string]struct{}, len(allowlistLines)) + for _, line := range allowlistLines { + if line == "" { + continue + } + allowlist[line] = struct{}{} + unusedAllowlist[line] = struct{}{} + } + var missingCodeowners []string + var duplicateCodeowners []string + members, err := getGithubMembers() + if err != nil { + return err + } + for _, codeowner := range data.codeowners { + _, present := members[codeowner] + + if !present { + _, allowed := allowlist[codeowner] + delete(unusedAllowlist, codeowner) + allowed = allowed || strings.HasPrefix(codeowner, "open-telemetry/") + if !allowed { + missingCodeowners = append(missingCodeowners, codeowner) + } + } else if _, ok := allowlist[codeowner]; ok { + duplicateCodeowners = append(duplicateCodeowners, codeowner) + } + } + if len(missingCodeowners) > 0 { + sort.Strings(missingCodeowners) + return fmt.Errorf("codeowners are not members: %s", strings.Join(missingCodeowners, ", ")) + } + if len(duplicateCodeowners) > 0 { + sort.Strings(duplicateCodeowners) + return fmt.Errorf("codeowners members duplicate in allowlist: %s", strings.Join(duplicateCodeowners, ", ")) + } + if len(unusedAllowlist) > 0 { + var unused []string + for k := range unusedAllowlist { + unused = append(unused, k) + } + sort.Strings(unused) + return fmt.Errorf("unused members in allowlist: %s", strings.Join(unused, ", ")) + } + + codeowners := codeownersHeader + deprecatedList := "## DEPRECATED components\n" + unmaintainedList := "\n## UNMAINTAINED components\n" + + unmaintainedCodeowners := unmaintainedHeader + currentFirstSegment := "" +LOOP: + for _, key := range data.folders { + m := data.components[key] + for stability := range m.Status.Stability { + if stability == unmaintainedStatus { + unmaintainedList += key + "/\n" + unmaintainedCodeowners += fmt.Sprintf("%s/%s @open-telemetry/collector-contrib-approvers \n", key, strings.Repeat(" ", data.maxLength-len(key))) + continue LOOP + } + if stability == "deprecated" && (m.Status.Codeowners == nil || len(m.Status.Codeowners.Active) == 0) { + deprecatedList += key + "/\n" + } + } + + if m.Status.Codeowners != nil { + parts := strings.Split(key, string(os.PathSeparator)) + firstSegment := parts[0] + if firstSegment != currentFirstSegment { + currentFirstSegment = firstSegment + codeowners += "\n" + } + owners := "" + for _, owner := range m.Status.Codeowners.Active { + owners += " " + owners += "@" + owner + } + codeowners += fmt.Sprintf("%s/%s @open-telemetry/collector-contrib-approvers%s\n", key, strings.Repeat(" ", data.maxLength-len(key)), owners) + } + } + + codeowners += distributionCodeownersHeader + longestName := 0 + for _, dist := range data.distributions { + if longestName < len(dist.Name) { + longestName = len(dist.Name) + } + } + + for _, dist := range data.distributions { + var maintainers []string + for _, m := range dist.Maintainers { + maintainers = append(maintainers, fmt.Sprintf("@%s", m)) + } + codeowners += fmt.Sprintf("reports/distributions/%s.yaml%s @open-telemetry/collector-contrib-approvers %s\n", dist.Name, strings.Repeat(" ", longestName-len(dist.Name)), strings.Join(maintainers, " ")) + } + + err = os.WriteFile(filepath.Join(".github", "CODEOWNERS"), []byte(codeowners+unmaintainedCodeowners), 0600) + if err != nil { + return err + } + err = os.WriteFile(filepath.Join(".github", "ALLOWLIST"), []byte(allowlistHeader+deprecatedList+unmaintainedList), 0600) + if err != nil { + return err + } + return nil +} + +func getGithubMembers() (map[string]struct{}, error) { + githubToken := os.Getenv("GITHUB_TOKEN") + if githubToken == "" { + return nil, fmt.Errorf("Set the environment variable `GITHUB_TOKEN` to a PAT token to authenticate") + } + client := github.NewTokenClient(context.Background(), githubToken) + var allUsers []*github.User + pageIndex := 0 + for { + users, resp, err := client.Organizations.ListMembers(context.Background(), "open-telemetry", + &github.ListMembersOptions{ + PublicOnly: false, + ListOptions: github.ListOptions{ + PerPage: 50, + Page: pageIndex, + }, + }, + ) + if err != nil { + return nil, err + } + defer resp.Body.Close() + if len(users) == 0 { + break + } + allUsers = append(allUsers, users...) + pageIndex++ + } + + usernames := make(map[string]struct{}, len(allUsers)) + for _, u := range allUsers { + usernames[*u.Login] = struct{}{} + } + return usernames, nil +} diff --git a/cmd/githubgen/distributions.go b/cmd/githubgen/distributions.go new file mode 100644 index 000000000000..c5629430b731 --- /dev/null +++ b/cmd/githubgen/distributions.go @@ -0,0 +1,63 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "fmt" + "os" + "path/filepath" + "sort" + + "gopkg.in/yaml.v3" +) + +type distributionsGenerator struct { +} + +type distOutput struct { + Name string `yaml:"name"` + URL string `yaml:"url"` + Maintainers []string `yaml:"maintainers"` + Components map[string][]string `yaml:"components"` +} + +func (cg distributionsGenerator) generate(data *githubData) error { + for _, dist := range data.distributions { + components := map[string][]string{} + for _, c := range data.components { + inDistro := false + for _, componentDistro := range c.Status.Distributions { + if dist.Name == componentDistro { + inDistro = true + break + } + } + if inDistro { + array, ok := components[c.Status.Class] + if !ok { + array = []string{} + } + components[c.Status.Class] = append(array, c.Type) + } + } + for _, comps := range components { + sort.Strings(comps) + } + output := distOutput{ + Name: dist.Name, + URL: dist.URL, + Maintainers: dist.Maintainers, + Components: components, + } + b, err := yaml.Marshal(output) + if err != nil { + return nil + } + err = os.WriteFile(filepath.Join("reports", "distributions", fmt.Sprintf("%s.yaml", dist.Name)), b, 0600) + if err != nil { + return nil + } + } + return nil +} diff --git a/cmd/githubgen/go.mod b/cmd/githubgen/go.mod index 2705784918fa..4d90a143f967 100644 --- a/cmd/githubgen/go.mod +++ b/cmd/githubgen/go.mod @@ -1,31 +1,22 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/githubgen -go 1.20 +go 1.21 require ( - github.com/google/go-github/v53 v53.2.0 - go.opentelemetry.io/collector/confmap v0.89.0 + github.com/google/go-github/v61 v61.0.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect - github.com/cloudflare/circl v1.3.3 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/hashicorp/go-version v1.6.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.31.0 // indirect + go.uber.org/zap v1.27.0 // indirect ) diff --git a/cmd/githubgen/go.sum b/cmd/githubgen/go.sum index 16293dd248fb..d4c032860890 100644 --- a/cmd/githubgen/go.sum +++ b/cmd/githubgen/go.sum @@ -1,75 +1,40 @@ -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= -github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= -github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= -github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -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/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/google/go-cmp v0.5.2/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.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-github/v53 v53.2.0 h1:wvz3FyF53v4BK+AsnvCmeNhf8AkTaeh2SoYu/XUvTtI= -github.com/google/go-github/v53 v53.2.0/go.mod h1:XhFRObz+m/l+UCm9b7KSIC3lT3NWSXGt7mOsAWEloao= +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/go-github/v61 v61.0.0 h1:VwQCBwhyE9JclCI+22/7mLB1PuU9eowCXKY5pNlu1go= +github.com/google/go-github/v61 v61.0.0/go.mod h1:0WR+KmsWX75G2EbpyGsGmradjo3IiciuI4BmdVCobQY= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 h1:SxDS+Yr8qE+ID58ELR5n0D+SUlqHKOZ72pK3YPFAelA= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0/go.mod h1:DEoB0d0k1iGt4KEABntL8AW9xYQ6E7fmgkM2/s8aXvM= +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= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -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-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= 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/cmd/githubgen/issuetemplates.go b/cmd/githubgen/issuetemplates.go new file mode 100644 index 000000000000..05fa22c38477 --- /dev/null +++ b/cmd/githubgen/issuetemplates.go @@ -0,0 +1,70 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package main + +import ( + "bytes" + "os" + "path/filepath" + "regexp" + "sort" + "strings" +) + +const ( + startComponentList = `# Start Collector components list` + endComponentList = `# End Collector components list` +) + +func folderToShortName(folder string) string { + if folder == "internal/coreinternal" { + return "internal/core" + } + path := strings.Split(folder, "/") + switch path[0] { + case "receiver", "exporter", "extension", "processor", "connector": + path[1] = strings.TrimSuffix(strings.TrimSuffix(strings.TrimSuffix(strings.TrimSuffix(strings.TrimSuffix(strings.TrimSuffix(path[1], "internal"), "extension"), "exporter"), "connector"), "processor"), "receiver") + path[len(path)-1] = strings.TrimSuffix(strings.TrimSuffix(strings.TrimSuffix(strings.TrimSuffix(strings.TrimSuffix(strings.TrimSuffix(path[len(path)-1], "internal"), "extension"), "exporter"), "connector"), "processor"), "receiver") + default: + } + + return strings.Join(path, "/") +} + +type issueTemplatesGenerator struct { +} + +func (itg issueTemplatesGenerator) generate(data *githubData) error { + keys := map[string]struct{}{} + for _, f := range data.folders { + keys[folderToShortName(f)] = struct{}{} + } + shortNames := make([]string, 0, len(keys)) + for k := range keys { + shortNames = append(shortNames, k) + } + sort.Strings(shortNames) + replacement := []byte(startComponentList + "\n - " + strings.Join(shortNames, "\n - ") + "\n " + endComponentList) + issuesFolder := filepath.Join(".github", "ISSUE_TEMPLATE") + entries, err := os.ReadDir(issuesFolder) + if err != nil { + return err + } + for _, e := range entries { + templateContents, err := os.ReadFile(filepath.Join(issuesFolder, e.Name())) + if err != nil { + return err + } + matchOldContent := regexp.MustCompile("(?s)" + startComponentList + ".*" + endComponentList) + oldContent := matchOldContent.FindSubmatch(templateContents) + if len(oldContent) > 0 { + templateContents = bytes.ReplaceAll(templateContents, oldContent[0], replacement) + err = os.WriteFile(filepath.Join(issuesFolder, e.Name()), templateContents, 0600) + if err != nil { + return err + } + } + + } + return nil +} diff --git a/cmd/githubgen/main.go b/cmd/githubgen/main.go index 7de47722cd4a..f71d3719a988 100644 --- a/cmd/githubgen/main.go +++ b/cmd/githubgen/main.go @@ -4,7 +4,6 @@ package main import ( - "bytes" "context" "flag" "fmt" @@ -13,163 +12,61 @@ import ( "os" "path/filepath" "sort" - "strings" - "gopkg.in/yaml.v3" - - "github.com/google/go-github/v53/github" + "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/provider/fileprovider" + "gopkg.in/yaml.v3" ) -const maxDependabotUpdates = 220 - -const codeownersHeader = `# Code generated by githubgen. DO NOT EDIT. -##################################################### -# -# List of approvers for OpenTelemetry Collector Contrib -# -##################################################### -# -# Learn about membership in OpenTelemetry community: -# https://github.com/open-telemetry/community/blob/main/community-membership.md -# -# -# Learn about CODEOWNERS file format: -# https://help.github.com/en/articles/about-code-owners -# -# NOTE: Lines should be entered in the following format: -# /.. -# extension/oauth2clientauthextension/ @open-telemetry/collector-contrib-approvers @pavankrish123 @jpkrohling -# Path separator and minimum of 1 space between component path and owners is -# important for validation steps -# - -* @open-telemetry/collector-contrib-approvers -` - -const unmaintainedHeader = ` - -## UNMAINTAINED components -## The Github issue template generation code needs this to generate the corresponding labels. - -` - -const allowlistHeader = `# Code generated by githubgen. DO NOT EDIT. -##################################################### -# -# List of components in OpenTelemetry Collector Contrib -# waiting on owners to be assigned -# -##################################################### -# -# Learn about membership in OpenTelemetry community: -# https://github.com/open-telemetry/community/blob/main/community-membership.md -# -# -# Learn about CODEOWNERS file format: -# https://help.github.com/en/articles/about-code-owners -# - -## -# NOTE: New components MUST have a codeowner. Add new components to the CODEOWNERS file instead of here. -## - -## COMMON & SHARED components -internal/common - -` - -const dependabotHeader = `# File generated by "make gendependabot"; DO NOT EDIT. - -` - const unmaintainedStatus = "unmaintained" -// Generates files specific to Github or Dependabot according to status metadata: +type generator interface { + generate(data *githubData) error +} + +// Generates files specific to Github according to status metadata: // .github/CODEOWNERS // .github/ALLOWLIST -// .github/dependabot.yml +// .github/ISSUE_TEMPLATES/*.yaml (list of components) +// reports/distributions/* func main() { folder := flag.String("folder", ".", "folder investigated for codeowners") allowlistFilePath := flag.String("allowlist", "cmd/githubgen/allowlist.txt", "path to a file containing an allowlist of members outside the OpenTelemetry organization") - dependabotOnly := flag.Bool("dependabot", false, "only generate dependabot entries") flag.Parse() - if err := run(*folder, *allowlistFilePath, *dependabotOnly); err != nil { - log.Fatal(err) - } -} - -type DependabotSchedule struct { - Interval yaml.Node `yaml:"interval"` - Day yaml.Node `yaml:"day"` -} - -type DependabotUpdate struct { - PackageEcosystem yaml.Node `yaml:"package-ecosystem"` - Directory yaml.Node `yaml:"directory"` - Schedule DependabotSchedule `yaml:"schedule"` - Priority int `yaml:"-"` -} - -type DependabotData struct { - Version int `yaml:"version"` - Updates []DependabotUpdate `yaml:"updates"` -} - -func makePriority(status *Status) int { - // not an internal component such as pkg/**, and no distributions: - if (status.Class == "receiver" || status.Class == "processor" || status.Class == "exporter" || status.Class == "connector" || status.Class == "extension" || status.Class == "cmd") && - len(status.Distributions) == 0 && status.Class != "" { - return 1 - } - // start with a score of 2 - maxScore := 2 - for stability := range status.Stability { - switch stability { - case "deprecated": // stay with 2 - case "unmaintained": - return 1 - case "alpha": - if maxScore < 3 { - maxScore = 3 - } - case "beta": - if maxScore < 4 { - maxScore = 4 - } - case "stable": - if maxScore < 5 { - maxScore = 5 - } + var generators []generator + for _, arg := range flag.Args() { + switch arg { + case "issue-templates": + generators = append(generators, issueTemplatesGenerator{}) + case "codeowners": + generators = append(generators, codeownersGenerator{}) + case "distributions": + generators = append(generators, distributionsGenerator{}) + default: + panic(fmt.Sprintf("Unknown generator: %s", arg)) } } - return maxScore -} - -func newDependabotUpdate(directory string, priority int) DependabotUpdate { - return DependabotUpdate{ - PackageEcosystem: yaml.Node{Value: "gomod", Style: yaml.DoubleQuotedStyle, Kind: yaml.ScalarNode}, - Directory: yaml.Node{Value: "/" + directory, Style: yaml.DoubleQuotedStyle, Kind: yaml.ScalarNode}, - Schedule: DependabotSchedule{ - Interval: yaml.Node{Value: "weekly", Style: yaml.DoubleQuotedStyle, Kind: yaml.ScalarNode}, - Day: yaml.Node{Value: "wednesday", Style: yaml.DoubleQuotedStyle, Kind: yaml.ScalarNode}, - }, - Priority: priority, + if len(generators) == 0 { + generators = []generator{issueTemplatesGenerator{}, codeownersGenerator{}} + } + if err := run(*folder, *allowlistFilePath, generators); err != nil { + log.Fatal(err) } } -type Codeowners struct { +type codeowners struct { // Active codeowners Active []string `mapstructure:"active"` // Emeritus codeowners Emeritus []string `mapstructure:"emeritus"` } + type Status struct { Stability map[string][]string `mapstructure:"stability"` Distributions []string `mapstructure:"distributions"` Class string `mapstructure:"class"` Warnings []string `mapstructure:"warnings"` - Codeowners *Codeowners `mapstructure:"codeowners"` + Codeowners *codeowners `mapstructure:"codeowners"` } type metadata struct { // Type of the component. @@ -180,8 +77,23 @@ type metadata struct { Status *Status `mapstructure:"status"` } +type distributionData struct { + Name string `yaml:"name"` + URL string `yaml:"url"` + Maintainers []string `yaml:"maintainers,omitempty"` +} + +type githubData struct { + folders []string + codeowners []string + allowlistFilePath string + maxLength int + components map[string]metadata + distributions []distributionData +} + func loadMetadata(filePath string) (metadata, error) { - cp, err := fileprovider.New().Retrieve(context.Background(), "file:"+filePath, nil) + cp, err := fileprovider.NewWithSettings(confmap.ProviderSettings{}).Retrieve(context.Background(), "file:"+filePath, nil) if err != nil { return metadata{}, err } @@ -192,26 +104,20 @@ func loadMetadata(filePath string) (metadata, error) { } md := metadata{} - if err := conf.Unmarshal(&md); err != nil { + if err := conf.Unmarshal(&md, confmap.WithIgnoreUnused()); err != nil { return md, err } return md, nil } -func run(folder string, allowlistFilePath string, dependabotOnly bool) error { +func run(folder string, allowlistFilePath string, generators []generator) error { components := map[string]metadata{} var foldersList []string - dependabotData := &DependabotData{ - Version: 2, - Updates: []DependabotUpdate{ - newDependabotUpdate("", 5), - }, - } maxLength := 0 allCodeowners := map[string]struct{}{} - err := filepath.Walk(folder, func(path string, info fs.FileInfo, err error) error { + err := filepath.Walk(folder, func(path string, info fs.FileInfo, _ error) error { if info.Name() == "metadata.yaml" { m, err := loadMetadata(path) if err != nil { @@ -221,13 +127,10 @@ func run(folder string, allowlistFilePath string, dependabotOnly bool) error { return nil } currentFolder := filepath.Dir(path) - key := currentFolder + "/" + key := currentFolder components[key] = m foldersList = append(foldersList, key) - _, err = os.Stat(filepath.Join(currentFolder, "go.mod")) - if err == nil { // go.mod file exists. - dependabotData.Updates = append(dependabotData.Updates, newDependabotUpdate(currentFolder, makePriority(m.Status))) - } + for stability := range m.Status.Stability { if stability == unmaintainedStatus { // do not account for unmaintained status to change the max length of the component line. @@ -249,165 +152,37 @@ func run(folder string, allowlistFilePath string, dependabotOnly bool) error { if err != nil { return err } - if !dependabotOnly { - if err = generateCodeownersFiles(foldersList, allCodeowners, allowlistFilePath, components, maxLength); err != nil { - return err - } - } - sort.Slice(dependabotData.Updates, func(i, j int) bool { - return dependabotData.Updates[i].Priority > dependabotData.Updates[j].Priority - }) - removed := dependabotData.Updates[maxDependabotUpdates:] - dependabotData.Updates = dependabotData.Updates[:maxDependabotUpdates] - if len(removed) > 0 { - sort.Slice(removed, func(i, j int) bool { - return strings.Compare(removed[i].Directory.Value, removed[j].Directory.Value) < 0 - }) - fmt.Printf("The following modules were not added to Dependabot to keep within limits of %d\n", maxDependabotUpdates) - for _, update := range removed { - fmt.Printf(" - %q\n", update.Directory.Value) - } + sort.Strings(foldersList) + codeownersList := make([]string, 0, len(allCodeowners)) + for c := range allCodeowners { + codeownersList = append(codeownersList, c) } + sort.Strings(codeownersList) - sort.Slice(dependabotData.Updates, func(i, j int) bool { - return strings.Compare(dependabotData.Updates[i].Directory.Value, dependabotData.Updates[j].Directory.Value) < 0 - }) - - var yamlContents bytes.Buffer - encoder := yaml.NewEncoder(&yamlContents) - encoder.SetIndent(2) - err = encoder.Encode(dependabotData) - if err != nil { - return err - } - err = os.WriteFile(filepath.Join(".github", "dependabot.yml"), append([]byte(dependabotHeader), yamlContents.Bytes()...), 0600) + var distributions []distributionData + dd, err := os.ReadFile(filepath.Join(folder, "distributions.yaml")) if err != nil { return err } - - return nil -} - -func generateCodeownersFiles(foldersList []string, allCodeowners map[string]struct{}, allowlistFilePath string, components map[string]metadata, maxLength int) error { - allowlistData, err := os.ReadFile(allowlistFilePath) + err = yaml.Unmarshal(dd, &distributions) if err != nil { return err } - allowlistLines := strings.Split(string(allowlistData), "\n") - allowlist := make(map[string]struct{}, len(allowlistLines)) - for _, line := range allowlistLines { - allowlist[line] = struct{}{} + data := &githubData{ + folders: foldersList, + codeowners: codeownersList, + allowlistFilePath: allowlistFilePath, + maxLength: maxLength, + components: components, + distributions: distributions, } - sort.Strings(foldersList) - var missingCodeowners []string - var duplicateCodeowners []string - members, err := getGithubMembers() - if err != nil { - return err - } - for codeowner := range allCodeowners { - _, present := members[codeowner] - - if !present { - _, allowed := allowlist[codeowner] - allowed = allowed || strings.HasPrefix(codeowner, "open-telemetry/") - if !allowed { - missingCodeowners = append(missingCodeowners, codeowner) - } - } else if _, ok := allowlist[codeowner]; ok { - duplicateCodeowners = append(duplicateCodeowners, codeowner) - } - } - if len(missingCodeowners) > 0 { - sort.Strings(missingCodeowners) - return fmt.Errorf("codeowners are not members: %s", strings.Join(missingCodeowners, ", ")) - } - if len(duplicateCodeowners) > 0 { - sort.Strings(duplicateCodeowners) - return fmt.Errorf("codeowners members duplicate in allowlist: %s", strings.Join(duplicateCodeowners, ", ")) - } - - codeowners := codeownersHeader - deprecatedList := "## DEPRECATED components\n" - unmaintainedList := "\n## UNMAINTAINED components\n" - unmaintainedCodeowners := unmaintainedHeader - currentFirstSegment := "" -LOOP: - for _, key := range foldersList { - m := components[key] - for stability := range m.Status.Stability { - if stability == unmaintainedStatus { - unmaintainedList += key + "\n" - unmaintainedCodeowners += fmt.Sprintf("%s%s @open-telemetry/collector-contrib-approvers \n", key, strings.Repeat(" ", maxLength-len(key))) - continue LOOP - } - if stability == "deprecated" && (m.Status.Codeowners == nil || len(m.Status.Codeowners.Active) == 0) { - deprecatedList += key + "\n" - } - } - - if m.Status.Codeowners != nil { - parts := strings.Split(key, string(os.PathSeparator)) - firstSegment := parts[0] - if firstSegment != currentFirstSegment { - currentFirstSegment = firstSegment - codeowners += "\n" - } - owners := "" - for _, owner := range m.Status.Codeowners.Active { - owners += " " - owners += "@" + owner - } - codeowners += fmt.Sprintf("%s%s @open-telemetry/collector-contrib-approvers%s\n", key, strings.Repeat(" ", maxLength-len(key)), owners) + for _, g := range generators { + if err = g.generate(data); err != nil { + return err } } - - err = os.WriteFile(filepath.Join(".github", "CODEOWNERS"), []byte(codeowners+unmaintainedCodeowners), 0600) - if err != nil { - return err - } - err = os.WriteFile(filepath.Join(".github", "ALLOWLIST"), []byte(allowlistHeader+deprecatedList+unmaintainedList), 0600) - if err != nil { - return err - } return nil } - -func getGithubMembers() (map[string]struct{}, error) { - githubToken := os.Getenv("GITHUB_TOKEN") - if githubToken == "" { - return nil, fmt.Errorf("Set the environment variable `GITHUB_TOKEN` to a PAT token to authenticate") - } - client := github.NewTokenClient(context.Background(), githubToken) - var allUsers []*github.User - pageIndex := 0 - for { - users, resp, err := client.Organizations.ListMembers(context.Background(), "open-telemetry", - &github.ListMembersOptions{ - PublicOnly: false, - ListOptions: github.ListOptions{ - PerPage: 50, - Page: pageIndex, - }, - }, - ) - if err != nil { - return nil, err - } - defer resp.Body.Close() - if len(users) == 0 { - break - } - allUsers = append(allUsers, users...) - pageIndex++ - } - - usernames := make(map[string]struct{}, len(allUsers)) - for _, u := range allUsers { - usernames[*u.Login] = struct{}{} - } - return usernames, nil -} diff --git a/cmd/mdatagen/README.md b/cmd/mdatagen/README.md deleted file mode 100644 index 0ca79053de8d..000000000000 --- a/cmd/mdatagen/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# Metadata Generator - -Every component's documentation should include a brief description of the component and guidance on how to use it. -There is also some information about the component (or metadata) that should be included to help end-users understand the current state of the component and whether it is right for their use case. -Examples of this metadata about a component are: - -* its stability level -* the distributions containing it -* the types of pipelines it supports -* metrics emitted in the case of a scraping receiver - -The metadata generator defines a schema for specifying this information to ensure it is complete and well-formed. -The metadata generator is then able to ingest the metadata, validate it against the schema and produce documentation in a standardized format. -An example of how this generated documentation looks can be found in [documentation.md](./documentation.md). - -## Using the Metadata Generator - -In order for a component to benefit from the metadata generator (`mdatagen`) these requirements need to be met: -1. A `metadata.yaml` file containing the metadata needs to be included in the component -2. The component should declare a `go:generate mdatagen` directive which tells `mdatagen` what to generate - -As an example, here is a minimal `metadata.yaml` for the [OTLP receiver](https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver): -```yaml -type: otlp -status: - class: receiver - stability: - beta: [logs] - stable: [metrics, traces] -``` - -Detailed information about the schema of `metadata.yaml` can be found in [metadata-schema.yaml](./metadata-schema.yaml). - -The `go:generate mdatagen` directive is usually defined in a `doc.go` file in the same package as the component, for example: -```go -//go:generate mdatagen metadata.yaml - -package main -``` - -Below are some more examples that can be used for reference: - -* The ElasticSearch receiver has an extensive [metadata.yaml](../../receiver/elasticsearchreceiver/metadata.yaml) -* The host metrics receiver has internal subcomponents, each with their own `metadata.yaml` and `doc.go`. See [cpuscraper](../../receiver/hostmetricsreceiver/internal/scraper/cpuscraper) for example. - -You can run `cd cmd/mdatagen && $(GOCMD) install .` to install the `mdatagen` tool in `GOBIN` and then run `mdatagen metadata.yaml` to generate documentation for a specific component or you can run `make generate` to generate documentation for all components. - -## Contributing to the Metadata Generator - -The code for generating the documentation can be found in [loader.go](./loader.go) and the templates for rendering the documentation can be found in [templates](./templates). -When making updates to the metadata generator or introducing support for new functionality: - -1. Ensure the [metadata-schema.yaml](./metadata-schema.yaml) and [./metadata.yaml](metadata.yaml) files reflect the changes. -2. Run `make mdatagen-test`. -3. Make sure all tests are passing including [generated tests](./internal/metadata/generated_metrics_test.go). -4. Run `make generate`. diff --git a/cmd/mdatagen/doc.go b/cmd/mdatagen/doc.go deleted file mode 100644 index 8f1fc6a71768..000000000000 --- a/cmd/mdatagen/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Generate a test metrics builder from a sample metrics set covering all configuration options. -//go:generate mdatagen metadata-sample.yaml - -package main diff --git a/cmd/mdatagen/documentation.md b/cmd/mdatagen/documentation.md deleted file mode 100644 index 1955e0815351..000000000000 --- a/cmd/mdatagen/documentation.md +++ /dev/null @@ -1,96 +0,0 @@ -[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) - -# file - -## Default Metrics - -The following metrics are emitted by default. Each of them can be disabled by applying the following configuration: - -```yaml -metrics: - : - enabled: false -``` - -### default.metric - -Monotonic cumulative sum int metric enabled by default. - -The metric will be become optional soon. - -| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | -| ---- | ----------- | ---------- | ----------------------- | --------- | -| s | Sum | Int | Cumulative | true | - -#### Attributes - -| Name | Description | Values | -| ---- | ----------- | ------ | -| string_attr | Attribute with any string value. | Any Str | -| state | Integer attribute with overridden name. | Any Int | -| enum_attr | Attribute with a known set of string values. | Str: ``red``, ``green``, ``blue`` | -| slice_attr | Attribute with a slice value. | Any Slice | -| map_attr | Attribute with a map value. | Any Map | - -### default.metric.to_be_removed - -[DEPRECATED] Non-monotonic delta sum double metric enabled by default. - -The metric will be will be removed soon. - -| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | -| ---- | ----------- | ---------- | ----------------------- | --------- | -| s | Sum | Double | Delta | false | - -## Optional Metrics - -The following metrics are not emitted by default. Each of them can be enabled by applying the following configuration: - -```yaml -metrics: - : - enabled: true -``` - -### optional.metric - -[DEPRECATED] Gauge double metric disabled by default. - -| Unit | Metric Type | Value Type | -| ---- | ----------- | ---------- | -| 1 | Gauge | Double | - -#### Attributes - -| Name | Description | Values | -| ---- | ----------- | ------ | -| string_attr | Attribute with any string value. | Any Str | -| boolean_attr | Attribute with a boolean value. | Any Bool | - -### optional.metric.empty_unit - -[DEPRECATED] Gauge double metric disabled by default. - -| Unit | Metric Type | Value Type | -| ---- | ----------- | ---------- | -| | Gauge | Double | - -#### Attributes - -| Name | Description | Values | -| ---- | ----------- | ------ | -| string_attr | Attribute with any string value. | Any Str | -| boolean_attr | Attribute with a boolean value. | Any Bool | - -## Resource Attributes - -| Name | Description | Values | Enabled | -| ---- | ----------- | ------ | ------- | -| map.resource.attr | Resource attribute with a map value. | Any Map | true | -| optional.resource.attr | Explicitly disabled ResourceAttribute. | Any Str | false | -| slice.resource.attr | Resource attribute with a slice value. | Any Slice | true | -| string.enum.resource.attr | Resource attribute with a known set of string values. | Str: ``one``, ``two`` | true | -| string.resource.attr | Resource attribute with any string value. | Any Str | true | -| string.resource.attr_disable_warning | Resource attribute with any string value. | Any Str | true | -| string.resource.attr_remove_warning | Resource attribute with any string value. | Any Str | false | -| string.resource.attr_to_be_removed | Resource attribute with any string value. | Any Str | true | diff --git a/cmd/mdatagen/embeded_templates.go b/cmd/mdatagen/embeded_templates.go deleted file mode 100644 index dace6c43f320..000000000000 --- a/cmd/mdatagen/embeded_templates.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import "embed" - -// templateFS ensures that the files needed -// to generate metadata as an embedded filesystem since -// `go get` doesn't require these files to be downloaded. -// -//go:embed templates/*.tmpl templates/testdata/*.tmpl -var templateFS embed.FS diff --git a/cmd/mdatagen/embeded_templates_test.go b/cmd/mdatagen/embeded_templates_test.go deleted file mode 100644 index 0ffd6a1b5cba..000000000000 --- a/cmd/mdatagen/embeded_templates_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "io/fs" - "path" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestEnsureTemplatesLoaded(t *testing.T) { - t.Parallel() - - const ( - rootDir = "templates" - ) - - var ( - templateFiles = map[string]struct{}{ - path.Join(rootDir, "documentation.md.tmpl"): {}, - path.Join(rootDir, "metrics.go.tmpl"): {}, - path.Join(rootDir, "metrics_test.go.tmpl"): {}, - path.Join(rootDir, "resource.go.tmpl"): {}, - path.Join(rootDir, "resource_test.go.tmpl"): {}, - path.Join(rootDir, "config.go.tmpl"): {}, - path.Join(rootDir, "config_test.go.tmpl"): {}, - path.Join(rootDir, "readme.md.tmpl"): {}, - path.Join(rootDir, "status.go.tmpl"): {}, - path.Join(rootDir, "testdata", "config.yaml.tmpl"): {}, - } - count = 0 - ) - assert.NoError(t, fs.WalkDir(templateFS, ".", func(path string, d fs.DirEntry, err error) error { - if d != nil && d.IsDir() { - return nil - } - count++ - assert.Contains(t, templateFiles, path) - return nil - })) - assert.Equal(t, len(templateFiles), count, "Must match the expected number of calls") - -} diff --git a/cmd/mdatagen/go.mod b/cmd/mdatagen/go.mod deleted file mode 100644 index 01ea78b2ced8..000000000000 --- a/cmd/mdatagen/go.mod +++ /dev/null @@ -1,51 +0,0 @@ -module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/mdatagen - -go 1.20 - -require ( - github.com/google/go-cmp v0.6.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/receiver v0.89.0 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 - golang.org/x/text v0.14.0 -) - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.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/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) - -retract ( - v0.76.2 - v0.76.1 - v0.65.0 -) diff --git a/cmd/mdatagen/go.sum b/cmd/mdatagen/go.sum deleted file mode 100644 index 7db43febbad8..000000000000 --- a/cmd/mdatagen/go.sum +++ /dev/null @@ -1,119 +0,0 @@ -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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -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/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/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/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/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/knadh/koanf/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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.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-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -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/cmd/mdatagen/internal/metadata/generated_config.go b/cmd/mdatagen/internal/metadata/generated_config.go deleted file mode 100644 index ac4e46cd1785..000000000000 --- a/cmd/mdatagen/internal/metadata/generated_config.go +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import "go.opentelemetry.io/collector/confmap" - -// MetricConfig provides common config for a particular metric. -type MetricConfig struct { - Enabled bool `mapstructure:"enabled"` - - enabledSetByUser bool -} - -func (ms *MetricConfig) Unmarshal(parser *confmap.Conf) error { - if parser == nil { - return nil - } - err := parser.Unmarshal(ms, confmap.WithErrorUnused()) - if err != nil { - return err - } - ms.enabledSetByUser = parser.IsSet("enabled") - return nil -} - -// MetricsConfig provides config for file metrics. -type MetricsConfig struct { - DefaultMetric MetricConfig `mapstructure:"default.metric"` - DefaultMetricToBeRemoved MetricConfig `mapstructure:"default.metric.to_be_removed"` - OptionalMetric MetricConfig `mapstructure:"optional.metric"` - OptionalMetricEmptyUnit MetricConfig `mapstructure:"optional.metric.empty_unit"` -} - -func DefaultMetricsConfig() MetricsConfig { - return MetricsConfig{ - DefaultMetric: MetricConfig{ - Enabled: true, - }, - DefaultMetricToBeRemoved: MetricConfig{ - Enabled: true, - }, - OptionalMetric: MetricConfig{ - Enabled: false, - }, - OptionalMetricEmptyUnit: MetricConfig{ - Enabled: false, - }, - } -} - -// ResourceAttributeConfig provides common config for a particular resource attribute. -type ResourceAttributeConfig struct { - Enabled bool `mapstructure:"enabled"` - - enabledSetByUser bool -} - -func (rac *ResourceAttributeConfig) Unmarshal(parser *confmap.Conf) error { - if parser == nil { - return nil - } - err := parser.Unmarshal(rac, confmap.WithErrorUnused()) - if err != nil { - return err - } - rac.enabledSetByUser = parser.IsSet("enabled") - return nil -} - -// ResourceAttributesConfig provides config for file resource attributes. -type ResourceAttributesConfig struct { - MapResourceAttr ResourceAttributeConfig `mapstructure:"map.resource.attr"` - OptionalResourceAttr ResourceAttributeConfig `mapstructure:"optional.resource.attr"` - SliceResourceAttr ResourceAttributeConfig `mapstructure:"slice.resource.attr"` - StringEnumResourceAttr ResourceAttributeConfig `mapstructure:"string.enum.resource.attr"` - StringResourceAttr ResourceAttributeConfig `mapstructure:"string.resource.attr"` - StringResourceAttrDisableWarning ResourceAttributeConfig `mapstructure:"string.resource.attr_disable_warning"` - StringResourceAttrRemoveWarning ResourceAttributeConfig `mapstructure:"string.resource.attr_remove_warning"` - StringResourceAttrToBeRemoved ResourceAttributeConfig `mapstructure:"string.resource.attr_to_be_removed"` -} - -func DefaultResourceAttributesConfig() ResourceAttributesConfig { - return ResourceAttributesConfig{ - MapResourceAttr: ResourceAttributeConfig{ - Enabled: true, - }, - OptionalResourceAttr: ResourceAttributeConfig{ - Enabled: false, - }, - SliceResourceAttr: ResourceAttributeConfig{ - Enabled: true, - }, - StringEnumResourceAttr: ResourceAttributeConfig{ - Enabled: true, - }, - StringResourceAttr: ResourceAttributeConfig{ - Enabled: true, - }, - StringResourceAttrDisableWarning: ResourceAttributeConfig{ - Enabled: true, - }, - StringResourceAttrRemoveWarning: ResourceAttributeConfig{ - Enabled: false, - }, - StringResourceAttrToBeRemoved: ResourceAttributeConfig{ - Enabled: true, - }, - } -} - -// MetricsBuilderConfig is a configuration for file metrics builder. -type MetricsBuilderConfig struct { - Metrics MetricsConfig `mapstructure:"metrics"` - ResourceAttributes ResourceAttributesConfig `mapstructure:"resource_attributes"` -} - -func DefaultMetricsBuilderConfig() MetricsBuilderConfig { - return MetricsBuilderConfig{ - Metrics: DefaultMetricsConfig(), - ResourceAttributes: DefaultResourceAttributesConfig(), - } -} diff --git a/cmd/mdatagen/internal/metadata/generated_config_test.go b/cmd/mdatagen/internal/metadata/generated_config_test.go deleted file mode 100644 index fd755c25eab3..000000000000 --- a/cmd/mdatagen/internal/metadata/generated_config_test.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "path/filepath" - "testing" - - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/confmap/confmaptest" -) - -func TestMetricsBuilderConfig(t *testing.T) { - tests := []struct { - name string - want MetricsBuilderConfig - }{ - { - name: "default", - want: DefaultMetricsBuilderConfig(), - }, - { - name: "all_set", - want: MetricsBuilderConfig{ - Metrics: MetricsConfig{ - DefaultMetric: MetricConfig{Enabled: true}, - DefaultMetricToBeRemoved: MetricConfig{Enabled: true}, - OptionalMetric: MetricConfig{Enabled: true}, - OptionalMetricEmptyUnit: MetricConfig{Enabled: true}, - }, - ResourceAttributes: ResourceAttributesConfig{ - MapResourceAttr: ResourceAttributeConfig{Enabled: true}, - OptionalResourceAttr: ResourceAttributeConfig{Enabled: true}, - SliceResourceAttr: ResourceAttributeConfig{Enabled: true}, - StringEnumResourceAttr: ResourceAttributeConfig{Enabled: true}, - StringResourceAttr: ResourceAttributeConfig{Enabled: true}, - StringResourceAttrDisableWarning: ResourceAttributeConfig{Enabled: true}, - StringResourceAttrRemoveWarning: ResourceAttributeConfig{Enabled: true}, - StringResourceAttrToBeRemoved: ResourceAttributeConfig{Enabled: true}, - }, - }, - }, - { - name: "none_set", - want: MetricsBuilderConfig{ - Metrics: MetricsConfig{ - DefaultMetric: MetricConfig{Enabled: false}, - DefaultMetricToBeRemoved: MetricConfig{Enabled: false}, - OptionalMetric: MetricConfig{Enabled: false}, - OptionalMetricEmptyUnit: MetricConfig{Enabled: false}, - }, - ResourceAttributes: ResourceAttributesConfig{ - MapResourceAttr: ResourceAttributeConfig{Enabled: false}, - OptionalResourceAttr: ResourceAttributeConfig{Enabled: false}, - SliceResourceAttr: ResourceAttributeConfig{Enabled: false}, - StringEnumResourceAttr: ResourceAttributeConfig{Enabled: false}, - StringResourceAttr: ResourceAttributeConfig{Enabled: false}, - StringResourceAttrDisableWarning: ResourceAttributeConfig{Enabled: false}, - StringResourceAttrRemoveWarning: ResourceAttributeConfig{Enabled: false}, - StringResourceAttrToBeRemoved: ResourceAttributeConfig{Enabled: false}, - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - cfg := loadMetricsBuilderConfig(t, tt.name) - if diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(MetricConfig{}, ResourceAttributeConfig{})); diff != "" { - t.Errorf("Config mismatch (-expected +actual):\n%s", diff) - } - }) - } -} - -func loadMetricsBuilderConfig(t *testing.T, name string) MetricsBuilderConfig { - cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) - require.NoError(t, err) - sub, err := cm.Sub(name) - require.NoError(t, err) - cfg := DefaultMetricsBuilderConfig() - require.NoError(t, component.UnmarshalConfig(sub, &cfg)) - return cfg -} - -func TestResourceAttributesConfig(t *testing.T) { - tests := []struct { - name string - want ResourceAttributesConfig - }{ - { - name: "default", - want: DefaultResourceAttributesConfig(), - }, - { - name: "all_set", - want: ResourceAttributesConfig{ - MapResourceAttr: ResourceAttributeConfig{Enabled: true}, - OptionalResourceAttr: ResourceAttributeConfig{Enabled: true}, - SliceResourceAttr: ResourceAttributeConfig{Enabled: true}, - StringEnumResourceAttr: ResourceAttributeConfig{Enabled: true}, - StringResourceAttr: ResourceAttributeConfig{Enabled: true}, - StringResourceAttrDisableWarning: ResourceAttributeConfig{Enabled: true}, - StringResourceAttrRemoveWarning: ResourceAttributeConfig{Enabled: true}, - StringResourceAttrToBeRemoved: ResourceAttributeConfig{Enabled: true}, - }, - }, - { - name: "none_set", - want: ResourceAttributesConfig{ - MapResourceAttr: ResourceAttributeConfig{Enabled: false}, - OptionalResourceAttr: ResourceAttributeConfig{Enabled: false}, - SliceResourceAttr: ResourceAttributeConfig{Enabled: false}, - StringEnumResourceAttr: ResourceAttributeConfig{Enabled: false}, - StringResourceAttr: ResourceAttributeConfig{Enabled: false}, - StringResourceAttrDisableWarning: ResourceAttributeConfig{Enabled: false}, - StringResourceAttrRemoveWarning: ResourceAttributeConfig{Enabled: false}, - StringResourceAttrToBeRemoved: ResourceAttributeConfig{Enabled: false}, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - cfg := loadResourceAttributesConfig(t, tt.name) - if diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(ResourceAttributeConfig{})); diff != "" { - t.Errorf("Config mismatch (-expected +actual):\n%s", diff) - } - }) - } -} - -func loadResourceAttributesConfig(t *testing.T, name string) ResourceAttributesConfig { - cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) - require.NoError(t, err) - sub, err := cm.Sub(name) - require.NoError(t, err) - sub, err = sub.Sub("resource_attributes") - require.NoError(t, err) - cfg := DefaultResourceAttributesConfig() - require.NoError(t, component.UnmarshalConfig(sub, &cfg)) - return cfg -} diff --git a/cmd/mdatagen/internal/metadata/generated_metrics.go b/cmd/mdatagen/internal/metadata/generated_metrics.go deleted file mode 100644 index a52195c69df9..000000000000 --- a/cmd/mdatagen/internal/metadata/generated_metrics.go +++ /dev/null @@ -1,425 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "time" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/pmetric" - "go.opentelemetry.io/collector/receiver" - conventions "go.opentelemetry.io/collector/semconv/v1.9.0" -) - -// AttributeEnumAttr specifies the a value enum_attr attribute. -type AttributeEnumAttr int - -const ( - _ AttributeEnumAttr = iota - AttributeEnumAttrRed - AttributeEnumAttrGreen - AttributeEnumAttrBlue -) - -// String returns the string representation of the AttributeEnumAttr. -func (av AttributeEnumAttr) String() string { - switch av { - case AttributeEnumAttrRed: - return "red" - case AttributeEnumAttrGreen: - return "green" - case AttributeEnumAttrBlue: - return "blue" - } - return "" -} - -// MapAttributeEnumAttr is a helper map of string to AttributeEnumAttr attribute value. -var MapAttributeEnumAttr = map[string]AttributeEnumAttr{ - "red": AttributeEnumAttrRed, - "green": AttributeEnumAttrGreen, - "blue": AttributeEnumAttrBlue, -} - -type metricDefaultMetric struct { - data pmetric.Metric // data buffer for generated metric. - config MetricConfig // metric config provided by user. - capacity int // max observed number of data points added to the metric. -} - -// init fills default.metric metric with initial data. -func (m *metricDefaultMetric) init() { - m.data.SetName("default.metric") - m.data.SetDescription("Monotonic cumulative sum int metric enabled by default.") - m.data.SetUnit("s") - m.data.SetEmptySum() - m.data.Sum().SetIsMonotonic(true) - m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) - m.data.Sum().DataPoints().EnsureCapacity(m.capacity) -} - -func (m *metricDefaultMetric) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, stringAttrAttributeValue string, overriddenIntAttrAttributeValue int64, enumAttrAttributeValue string, sliceAttrAttributeValue []any, mapAttrAttributeValue map[string]any) { - if !m.config.Enabled { - return - } - dp := m.data.Sum().DataPoints().AppendEmpty() - dp.SetStartTimestamp(start) - dp.SetTimestamp(ts) - dp.SetIntValue(val) - dp.Attributes().PutStr("string_attr", stringAttrAttributeValue) - dp.Attributes().PutInt("state", overriddenIntAttrAttributeValue) - dp.Attributes().PutStr("enum_attr", enumAttrAttributeValue) - dp.Attributes().PutEmptySlice("slice_attr").FromRaw(sliceAttrAttributeValue) - dp.Attributes().PutEmptyMap("map_attr").FromRaw(mapAttrAttributeValue) -} - -// updateCapacity saves max length of data point slices that will be used for the slice capacity. -func (m *metricDefaultMetric) updateCapacity() { - if m.data.Sum().DataPoints().Len() > m.capacity { - m.capacity = m.data.Sum().DataPoints().Len() - } -} - -// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. -func (m *metricDefaultMetric) emit(metrics pmetric.MetricSlice) { - if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { - m.updateCapacity() - m.data.MoveTo(metrics.AppendEmpty()) - m.init() - } -} - -func newMetricDefaultMetric(cfg MetricConfig) metricDefaultMetric { - m := metricDefaultMetric{config: cfg} - if cfg.Enabled { - m.data = pmetric.NewMetric() - m.init() - } - return m -} - -type metricDefaultMetricToBeRemoved struct { - data pmetric.Metric // data buffer for generated metric. - config MetricConfig // metric config provided by user. - capacity int // max observed number of data points added to the metric. -} - -// init fills default.metric.to_be_removed metric with initial data. -func (m *metricDefaultMetricToBeRemoved) init() { - m.data.SetName("default.metric.to_be_removed") - m.data.SetDescription("[DEPRECATED] Non-monotonic delta sum double metric enabled by default.") - m.data.SetUnit("s") - m.data.SetEmptySum() - m.data.Sum().SetIsMonotonic(false) - m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityDelta) -} - -func (m *metricDefaultMetricToBeRemoved) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { - if !m.config.Enabled { - return - } - dp := m.data.Sum().DataPoints().AppendEmpty() - dp.SetStartTimestamp(start) - dp.SetTimestamp(ts) - dp.SetDoubleValue(val) -} - -// updateCapacity saves max length of data point slices that will be used for the slice capacity. -func (m *metricDefaultMetricToBeRemoved) updateCapacity() { - if m.data.Sum().DataPoints().Len() > m.capacity { - m.capacity = m.data.Sum().DataPoints().Len() - } -} - -// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. -func (m *metricDefaultMetricToBeRemoved) emit(metrics pmetric.MetricSlice) { - if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { - m.updateCapacity() - m.data.MoveTo(metrics.AppendEmpty()) - m.init() - } -} - -func newMetricDefaultMetricToBeRemoved(cfg MetricConfig) metricDefaultMetricToBeRemoved { - m := metricDefaultMetricToBeRemoved{config: cfg} - if cfg.Enabled { - m.data = pmetric.NewMetric() - m.init() - } - return m -} - -type metricOptionalMetric struct { - data pmetric.Metric // data buffer for generated metric. - config MetricConfig // metric config provided by user. - capacity int // max observed number of data points added to the metric. -} - -// init fills optional.metric metric with initial data. -func (m *metricOptionalMetric) init() { - m.data.SetName("optional.metric") - m.data.SetDescription("[DEPRECATED] Gauge double metric disabled by default.") - m.data.SetUnit("1") - m.data.SetEmptyGauge() - m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) -} - -func (m *metricOptionalMetric) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, stringAttrAttributeValue string, booleanAttrAttributeValue bool) { - if !m.config.Enabled { - return - } - dp := m.data.Gauge().DataPoints().AppendEmpty() - dp.SetStartTimestamp(start) - dp.SetTimestamp(ts) - dp.SetDoubleValue(val) - dp.Attributes().PutStr("string_attr", stringAttrAttributeValue) - dp.Attributes().PutBool("boolean_attr", booleanAttrAttributeValue) -} - -// updateCapacity saves max length of data point slices that will be used for the slice capacity. -func (m *metricOptionalMetric) updateCapacity() { - if m.data.Gauge().DataPoints().Len() > m.capacity { - m.capacity = m.data.Gauge().DataPoints().Len() - } -} - -// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. -func (m *metricOptionalMetric) emit(metrics pmetric.MetricSlice) { - if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { - m.updateCapacity() - m.data.MoveTo(metrics.AppendEmpty()) - m.init() - } -} - -func newMetricOptionalMetric(cfg MetricConfig) metricOptionalMetric { - m := metricOptionalMetric{config: cfg} - if cfg.Enabled { - m.data = pmetric.NewMetric() - m.init() - } - return m -} - -type metricOptionalMetricEmptyUnit struct { - data pmetric.Metric // data buffer for generated metric. - config MetricConfig // metric config provided by user. - capacity int // max observed number of data points added to the metric. -} - -// init fills optional.metric.empty_unit metric with initial data. -func (m *metricOptionalMetricEmptyUnit) init() { - m.data.SetName("optional.metric.empty_unit") - m.data.SetDescription("[DEPRECATED] Gauge double metric disabled by default.") - m.data.SetUnit("") - m.data.SetEmptyGauge() - m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) -} - -func (m *metricOptionalMetricEmptyUnit) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, stringAttrAttributeValue string, booleanAttrAttributeValue bool) { - if !m.config.Enabled { - return - } - dp := m.data.Gauge().DataPoints().AppendEmpty() - dp.SetStartTimestamp(start) - dp.SetTimestamp(ts) - dp.SetDoubleValue(val) - dp.Attributes().PutStr("string_attr", stringAttrAttributeValue) - dp.Attributes().PutBool("boolean_attr", booleanAttrAttributeValue) -} - -// updateCapacity saves max length of data point slices that will be used for the slice capacity. -func (m *metricOptionalMetricEmptyUnit) updateCapacity() { - if m.data.Gauge().DataPoints().Len() > m.capacity { - m.capacity = m.data.Gauge().DataPoints().Len() - } -} - -// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. -func (m *metricOptionalMetricEmptyUnit) emit(metrics pmetric.MetricSlice) { - if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { - m.updateCapacity() - m.data.MoveTo(metrics.AppendEmpty()) - m.init() - } -} - -func newMetricOptionalMetricEmptyUnit(cfg MetricConfig) metricOptionalMetricEmptyUnit { - m := metricOptionalMetricEmptyUnit{config: cfg} - if cfg.Enabled { - m.data = pmetric.NewMetric() - m.init() - } - return m -} - -// MetricsBuilder provides an interface for scrapers to report metrics while taking care of all the transformations -// required to produce metric representation defined in metadata and user config. -type MetricsBuilder struct { - config MetricsBuilderConfig // config of the metrics builder. - startTime pcommon.Timestamp // start time that will be applied to all recorded data points. - metricsCapacity int // maximum observed number of metrics per resource. - metricsBuffer pmetric.Metrics // accumulates metrics data before emitting. - buildInfo component.BuildInfo // contains version information. - metricDefaultMetric metricDefaultMetric - metricDefaultMetricToBeRemoved metricDefaultMetricToBeRemoved - metricOptionalMetric metricOptionalMetric - metricOptionalMetricEmptyUnit metricOptionalMetricEmptyUnit -} - -// metricBuilderOption applies changes to default metrics builder. -type metricBuilderOption func(*MetricsBuilder) - -// WithStartTime sets startTime on the metrics builder. -func WithStartTime(startTime pcommon.Timestamp) metricBuilderOption { - return func(mb *MetricsBuilder) { - mb.startTime = startTime - } -} - -func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSettings, options ...metricBuilderOption) *MetricsBuilder { - if !mbc.Metrics.DefaultMetric.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `default.metric`: This metric will be disabled by default soon.") - } - if mbc.Metrics.DefaultMetricToBeRemoved.Enabled { - settings.Logger.Warn("[WARNING] `default.metric.to_be_removed` should not be enabled: This metric is deprecated and will be removed soon.") - } - if mbc.Metrics.OptionalMetric.enabledSetByUser { - settings.Logger.Warn("[WARNING] `optional.metric` should not be configured: This metric is deprecated and will be removed soon.") - } - if mbc.Metrics.OptionalMetricEmptyUnit.enabledSetByUser { - settings.Logger.Warn("[WARNING] `optional.metric.empty_unit` should not be configured: This metric is deprecated and will be removed soon.") - } - if !mbc.ResourceAttributes.StringResourceAttrDisableWarning.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `string.resource.attr_disable_warning`: This resource_attribute will be disabled by default soon.") - } - if mbc.ResourceAttributes.StringResourceAttrRemoveWarning.enabledSetByUser { - settings.Logger.Warn("[WARNING] `string.resource.attr_remove_warning` should not be configured: This resource_attribute is deprecated and will be removed soon.") - } - if mbc.ResourceAttributes.StringResourceAttrToBeRemoved.Enabled { - settings.Logger.Warn("[WARNING] `string.resource.attr_to_be_removed` should not be enabled: This resource_attribute is deprecated and will be removed soon.") - } - mb := &MetricsBuilder{ - config: mbc, - startTime: pcommon.NewTimestampFromTime(time.Now()), - metricsBuffer: pmetric.NewMetrics(), - buildInfo: settings.BuildInfo, - metricDefaultMetric: newMetricDefaultMetric(mbc.Metrics.DefaultMetric), - metricDefaultMetricToBeRemoved: newMetricDefaultMetricToBeRemoved(mbc.Metrics.DefaultMetricToBeRemoved), - metricOptionalMetric: newMetricOptionalMetric(mbc.Metrics.OptionalMetric), - metricOptionalMetricEmptyUnit: newMetricOptionalMetricEmptyUnit(mbc.Metrics.OptionalMetricEmptyUnit), - } - for _, op := range options { - op(mb) - } - return mb -} - -// NewResourceBuilder returns a new resource builder that should be used to build a resource associated with for the emitted metrics. -func (mb *MetricsBuilder) NewResourceBuilder() *ResourceBuilder { - return NewResourceBuilder(mb.config.ResourceAttributes) -} - -// updateCapacity updates max length of metrics and resource attributes that will be used for the slice capacity. -func (mb *MetricsBuilder) updateCapacity(rm pmetric.ResourceMetrics) { - if mb.metricsCapacity < rm.ScopeMetrics().At(0).Metrics().Len() { - mb.metricsCapacity = rm.ScopeMetrics().At(0).Metrics().Len() - } -} - -// ResourceMetricsOption applies changes to provided resource metrics. -type ResourceMetricsOption func(pmetric.ResourceMetrics) - -// WithResource sets the provided resource on the emitted ResourceMetrics. -// It's recommended to use ResourceBuilder to create the resource. -func WithResource(res pcommon.Resource) ResourceMetricsOption { - return func(rm pmetric.ResourceMetrics) { - res.CopyTo(rm.Resource()) - } -} - -// WithStartTimeOverride overrides start time for all the resource metrics data points. -// This option should be only used if different start time has to be set on metrics coming from different resources. -func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption { - return func(rm pmetric.ResourceMetrics) { - var dps pmetric.NumberDataPointSlice - metrics := rm.ScopeMetrics().At(0).Metrics() - for i := 0; i < metrics.Len(); i++ { - switch metrics.At(i).Type() { - case pmetric.MetricTypeGauge: - dps = metrics.At(i).Gauge().DataPoints() - case pmetric.MetricTypeSum: - dps = metrics.At(i).Sum().DataPoints() - } - for j := 0; j < dps.Len(); j++ { - dps.At(j).SetStartTimestamp(start) - } - } - } -} - -// EmitForResource saves all the generated metrics under a new resource and updates the internal state to be ready for -// recording another set of data points as part of another resource. This function can be helpful when one scraper -// needs to emit metrics from several resources. Otherwise calling this function is not required, -// just `Emit` function can be called instead. -// Resource attributes should be provided as ResourceMetricsOption arguments. -func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { - rm := pmetric.NewResourceMetrics() - rm.SetSchemaUrl(conventions.SchemaURL) - ils := rm.ScopeMetrics().AppendEmpty() - ils.Scope().SetName("otelcol") - ils.Scope().SetVersion(mb.buildInfo.Version) - ils.Metrics().EnsureCapacity(mb.metricsCapacity) - mb.metricDefaultMetric.emit(ils.Metrics()) - mb.metricDefaultMetricToBeRemoved.emit(ils.Metrics()) - mb.metricOptionalMetric.emit(ils.Metrics()) - mb.metricOptionalMetricEmptyUnit.emit(ils.Metrics()) - - for _, op := range rmo { - op(rm) - } - if ils.Metrics().Len() > 0 { - mb.updateCapacity(rm) - rm.MoveTo(mb.metricsBuffer.ResourceMetrics().AppendEmpty()) - } -} - -// Emit returns all the metrics accumulated by the metrics builder and updates the internal state to be ready for -// recording another set of metrics. This function will be responsible for applying all the transformations required to -// produce metric representation defined in metadata and user config, e.g. delta or cumulative. -func (mb *MetricsBuilder) Emit(rmo ...ResourceMetricsOption) pmetric.Metrics { - mb.EmitForResource(rmo...) - metrics := mb.metricsBuffer - mb.metricsBuffer = pmetric.NewMetrics() - return metrics -} - -// RecordDefaultMetricDataPoint adds a data point to default.metric metric. -func (mb *MetricsBuilder) RecordDefaultMetricDataPoint(ts pcommon.Timestamp, val int64, stringAttrAttributeValue string, overriddenIntAttrAttributeValue int64, enumAttrAttributeValue AttributeEnumAttr, sliceAttrAttributeValue []any, mapAttrAttributeValue map[string]any) { - mb.metricDefaultMetric.recordDataPoint(mb.startTime, ts, val, stringAttrAttributeValue, overriddenIntAttrAttributeValue, enumAttrAttributeValue.String(), sliceAttrAttributeValue, mapAttrAttributeValue) -} - -// RecordDefaultMetricToBeRemovedDataPoint adds a data point to default.metric.to_be_removed metric. -func (mb *MetricsBuilder) RecordDefaultMetricToBeRemovedDataPoint(ts pcommon.Timestamp, val float64) { - mb.metricDefaultMetricToBeRemoved.recordDataPoint(mb.startTime, ts, val) -} - -// RecordOptionalMetricDataPoint adds a data point to optional.metric metric. -func (mb *MetricsBuilder) RecordOptionalMetricDataPoint(ts pcommon.Timestamp, val float64, stringAttrAttributeValue string, booleanAttrAttributeValue bool) { - mb.metricOptionalMetric.recordDataPoint(mb.startTime, ts, val, stringAttrAttributeValue, booleanAttrAttributeValue) -} - -// RecordOptionalMetricEmptyUnitDataPoint adds a data point to optional.metric.empty_unit metric. -func (mb *MetricsBuilder) RecordOptionalMetricEmptyUnitDataPoint(ts pcommon.Timestamp, val float64, stringAttrAttributeValue string, booleanAttrAttributeValue bool) { - mb.metricOptionalMetricEmptyUnit.recordDataPoint(mb.startTime, ts, val, stringAttrAttributeValue, booleanAttrAttributeValue) -} - -// Reset resets metrics builder to its initial state. It should be used when external metrics source is restarted, -// and metrics builder should update its startTime and reset it's internal state accordingly. -func (mb *MetricsBuilder) Reset(options ...metricBuilderOption) { - mb.startTime = pcommon.NewTimestampFromTime(time.Now()) - for _, op := range options { - op(mb) - } -} diff --git a/cmd/mdatagen/internal/metadata/generated_metrics_test.go b/cmd/mdatagen/internal/metadata/generated_metrics_test.go deleted file mode 100644 index dc265beca6d5..000000000000 --- a/cmd/mdatagen/internal/metadata/generated_metrics_test.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/pmetric" - "go.opentelemetry.io/collector/receiver/receivertest" - "go.uber.org/zap" - "go.uber.org/zap/zaptest/observer" -) - -type testConfigCollection int - -const ( - testSetDefault testConfigCollection = iota - testSetAll - testSetNone -) - -func TestMetricsBuilder(t *testing.T) { - tests := []struct { - name string - configSet testConfigCollection - }{ - { - name: "default", - configSet: testSetDefault, - }, - { - name: "all_set", - configSet: testSetAll, - }, - { - name: "none_set", - configSet: testSetNone, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - start := pcommon.Timestamp(1_000_000_000) - ts := pcommon.Timestamp(1_000_001_000) - observedZapCore, observedLogs := observer.New(zap.WarnLevel) - settings := receivertest.NewNopCreateSettings() - settings.Logger = zap.New(observedZapCore) - mb := NewMetricsBuilder(loadMetricsBuilderConfig(t, test.name), settings, WithStartTime(start)) - - expectedWarnings := 0 - if test.configSet == testSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `default.metric`: This metric will be disabled by default soon.", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.configSet == testSetDefault || test.configSet == testSetAll { - assert.Equal(t, "[WARNING] `default.metric.to_be_removed` should not be enabled: This metric is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.configSet == testSetAll || test.configSet == testSetNone { - assert.Equal(t, "[WARNING] `optional.metric` should not be configured: This metric is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.configSet == testSetAll || test.configSet == testSetNone { - assert.Equal(t, "[WARNING] `optional.metric.empty_unit` should not be configured: This metric is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.configSet == testSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `string.resource.attr_disable_warning`: This resource_attribute will be disabled by default soon.", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.configSet == testSetAll || test.configSet == testSetNone { - assert.Equal(t, "[WARNING] `string.resource.attr_remove_warning` should not be configured: This resource_attribute is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.configSet == testSetDefault || test.configSet == testSetAll { - assert.Equal(t, "[WARNING] `string.resource.attr_to_be_removed` should not be enabled: This resource_attribute is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - - assert.Equal(t, expectedWarnings, observedLogs.Len()) - - defaultMetricsCount := 0 - allMetricsCount := 0 - - defaultMetricsCount++ - allMetricsCount++ - mb.RecordDefaultMetricDataPoint(ts, 1, "string_attr-val", 19, AttributeEnumAttrRed, []any{"slice_attr-item1", "slice_attr-item2"}, map[string]any{"key1": "map_attr-val1", "key2": "map_attr-val2"}) - - defaultMetricsCount++ - allMetricsCount++ - mb.RecordDefaultMetricToBeRemovedDataPoint(ts, 1) - - allMetricsCount++ - mb.RecordOptionalMetricDataPoint(ts, 1, "string_attr-val", true) - - allMetricsCount++ - mb.RecordOptionalMetricEmptyUnitDataPoint(ts, 1, "string_attr-val", true) - - rb := mb.NewResourceBuilder() - rb.SetMapResourceAttr(map[string]any{"key1": "map.resource.attr-val1", "key2": "map.resource.attr-val2"}) - rb.SetOptionalResourceAttr("optional.resource.attr-val") - rb.SetSliceResourceAttr([]any{"slice.resource.attr-item1", "slice.resource.attr-item2"}) - rb.SetStringEnumResourceAttrOne() - rb.SetStringResourceAttr("string.resource.attr-val") - rb.SetStringResourceAttrDisableWarning("string.resource.attr_disable_warning-val") - rb.SetStringResourceAttrRemoveWarning("string.resource.attr_remove_warning-val") - rb.SetStringResourceAttrToBeRemoved("string.resource.attr_to_be_removed-val") - res := rb.Emit() - metrics := mb.Emit(WithResource(res)) - - if test.configSet == testSetNone { - assert.Equal(t, 0, metrics.ResourceMetrics().Len()) - return - } - - assert.Equal(t, 1, metrics.ResourceMetrics().Len()) - rm := metrics.ResourceMetrics().At(0) - assert.Equal(t, res, rm.Resource()) - assert.Equal(t, 1, rm.ScopeMetrics().Len()) - ms := rm.ScopeMetrics().At(0).Metrics() - if test.configSet == testSetDefault { - assert.Equal(t, defaultMetricsCount, ms.Len()) - } - if test.configSet == testSetAll { - assert.Equal(t, allMetricsCount, ms.Len()) - } - validatedMetrics := make(map[string]bool) - for i := 0; i < ms.Len(); i++ { - switch ms.At(i).Name() { - case "default.metric": - assert.False(t, validatedMetrics["default.metric"], "Found a duplicate in the metrics slice: default.metric") - validatedMetrics["default.metric"] = true - assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) - assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Monotonic cumulative sum int metric enabled by default.", ms.At(i).Description()) - assert.Equal(t, "s", ms.At(i).Unit()) - assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) - assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) - dp := ms.At(i).Sum().DataPoints().At(0) - assert.Equal(t, start, dp.StartTimestamp()) - assert.Equal(t, ts, dp.Timestamp()) - assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType()) - assert.Equal(t, int64(1), dp.IntValue()) - attrVal, ok := dp.Attributes().Get("string_attr") - assert.True(t, ok) - assert.EqualValues(t, "string_attr-val", attrVal.Str()) - attrVal, ok = dp.Attributes().Get("state") - assert.True(t, ok) - assert.EqualValues(t, 19, attrVal.Int()) - attrVal, ok = dp.Attributes().Get("enum_attr") - assert.True(t, ok) - assert.EqualValues(t, "red", attrVal.Str()) - attrVal, ok = dp.Attributes().Get("slice_attr") - assert.True(t, ok) - assert.EqualValues(t, []any{"slice_attr-item1", "slice_attr-item2"}, attrVal.Slice().AsRaw()) - attrVal, ok = dp.Attributes().Get("map_attr") - assert.True(t, ok) - assert.EqualValues(t, map[string]any{"key1": "map_attr-val1", "key2": "map_attr-val2"}, attrVal.Map().AsRaw()) - case "default.metric.to_be_removed": - assert.False(t, validatedMetrics["default.metric.to_be_removed"], "Found a duplicate in the metrics slice: default.metric.to_be_removed") - validatedMetrics["default.metric.to_be_removed"] = true - assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) - assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "[DEPRECATED] Non-monotonic delta sum double metric enabled by default.", ms.At(i).Description()) - assert.Equal(t, "s", ms.At(i).Unit()) - assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) - assert.Equal(t, pmetric.AggregationTemporalityDelta, ms.At(i).Sum().AggregationTemporality()) - dp := ms.At(i).Sum().DataPoints().At(0) - assert.Equal(t, start, dp.StartTimestamp()) - assert.Equal(t, ts, dp.Timestamp()) - assert.Equal(t, pmetric.NumberDataPointValueTypeDouble, dp.ValueType()) - assert.Equal(t, float64(1), dp.DoubleValue()) - case "optional.metric": - assert.False(t, validatedMetrics["optional.metric"], "Found a duplicate in the metrics slice: optional.metric") - validatedMetrics["optional.metric"] = true - assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) - assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) - assert.Equal(t, "[DEPRECATED] Gauge double metric disabled by default.", ms.At(i).Description()) - assert.Equal(t, "1", ms.At(i).Unit()) - dp := ms.At(i).Gauge().DataPoints().At(0) - assert.Equal(t, start, dp.StartTimestamp()) - assert.Equal(t, ts, dp.Timestamp()) - assert.Equal(t, pmetric.NumberDataPointValueTypeDouble, dp.ValueType()) - assert.Equal(t, float64(1), dp.DoubleValue()) - attrVal, ok := dp.Attributes().Get("string_attr") - assert.True(t, ok) - assert.EqualValues(t, "string_attr-val", attrVal.Str()) - attrVal, ok = dp.Attributes().Get("boolean_attr") - assert.True(t, ok) - assert.EqualValues(t, true, attrVal.Bool()) - case "optional.metric.empty_unit": - assert.False(t, validatedMetrics["optional.metric.empty_unit"], "Found a duplicate in the metrics slice: optional.metric.empty_unit") - validatedMetrics["optional.metric.empty_unit"] = true - assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) - assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) - assert.Equal(t, "[DEPRECATED] Gauge double metric disabled by default.", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) - dp := ms.At(i).Gauge().DataPoints().At(0) - assert.Equal(t, start, dp.StartTimestamp()) - assert.Equal(t, ts, dp.Timestamp()) - assert.Equal(t, pmetric.NumberDataPointValueTypeDouble, dp.ValueType()) - assert.Equal(t, float64(1), dp.DoubleValue()) - attrVal, ok := dp.Attributes().Get("string_attr") - assert.True(t, ok) - assert.EqualValues(t, "string_attr-val", attrVal.Str()) - attrVal, ok = dp.Attributes().Get("boolean_attr") - assert.True(t, ok) - assert.EqualValues(t, true, attrVal.Bool()) - } - } - }) - } -} diff --git a/cmd/mdatagen/internal/metadata/generated_resource.go b/cmd/mdatagen/internal/metadata/generated_resource.go deleted file mode 100644 index da69b3c08411..000000000000 --- a/cmd/mdatagen/internal/metadata/generated_resource.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/collector/pdata/pcommon" -) - -// ResourceBuilder is a helper struct to build resources predefined in metadata.yaml. -// The ResourceBuilder is not thread-safe and must not to be used in multiple goroutines. -type ResourceBuilder struct { - config ResourceAttributesConfig - res pcommon.Resource -} - -// NewResourceBuilder creates a new ResourceBuilder. This method should be called on the start of the application. -func NewResourceBuilder(rac ResourceAttributesConfig) *ResourceBuilder { - return &ResourceBuilder{ - config: rac, - res: pcommon.NewResource(), - } -} - -// SetMapResourceAttr sets provided value as "map.resource.attr" attribute. -func (rb *ResourceBuilder) SetMapResourceAttr(val map[string]any) { - if rb.config.MapResourceAttr.Enabled { - rb.res.Attributes().PutEmptyMap("map.resource.attr").FromRaw(val) - } -} - -// SetOptionalResourceAttr sets provided value as "optional.resource.attr" attribute. -func (rb *ResourceBuilder) SetOptionalResourceAttr(val string) { - if rb.config.OptionalResourceAttr.Enabled { - rb.res.Attributes().PutStr("optional.resource.attr", val) - } -} - -// SetSliceResourceAttr sets provided value as "slice.resource.attr" attribute. -func (rb *ResourceBuilder) SetSliceResourceAttr(val []any) { - if rb.config.SliceResourceAttr.Enabled { - rb.res.Attributes().PutEmptySlice("slice.resource.attr").FromRaw(val) - } -} - -// SetStringEnumResourceAttrOne sets "string.enum.resource.attr=one" attribute. -func (rb *ResourceBuilder) SetStringEnumResourceAttrOne() { - if rb.config.StringEnumResourceAttr.Enabled { - rb.res.Attributes().PutStr("string.enum.resource.attr", "one") - } -} - -// SetStringEnumResourceAttrTwo sets "string.enum.resource.attr=two" attribute. -func (rb *ResourceBuilder) SetStringEnumResourceAttrTwo() { - if rb.config.StringEnumResourceAttr.Enabled { - rb.res.Attributes().PutStr("string.enum.resource.attr", "two") - } -} - -// SetStringResourceAttr sets provided value as "string.resource.attr" attribute. -func (rb *ResourceBuilder) SetStringResourceAttr(val string) { - if rb.config.StringResourceAttr.Enabled { - rb.res.Attributes().PutStr("string.resource.attr", val) - } -} - -// SetStringResourceAttrDisableWarning sets provided value as "string.resource.attr_disable_warning" attribute. -func (rb *ResourceBuilder) SetStringResourceAttrDisableWarning(val string) { - if rb.config.StringResourceAttrDisableWarning.Enabled { - rb.res.Attributes().PutStr("string.resource.attr_disable_warning", val) - } -} - -// SetStringResourceAttrRemoveWarning sets provided value as "string.resource.attr_remove_warning" attribute. -func (rb *ResourceBuilder) SetStringResourceAttrRemoveWarning(val string) { - if rb.config.StringResourceAttrRemoveWarning.Enabled { - rb.res.Attributes().PutStr("string.resource.attr_remove_warning", val) - } -} - -// SetStringResourceAttrToBeRemoved sets provided value as "string.resource.attr_to_be_removed" attribute. -func (rb *ResourceBuilder) SetStringResourceAttrToBeRemoved(val string) { - if rb.config.StringResourceAttrToBeRemoved.Enabled { - rb.res.Attributes().PutStr("string.resource.attr_to_be_removed", val) - } -} - -// Emit returns the built resource and resets the internal builder state. -func (rb *ResourceBuilder) Emit() pcommon.Resource { - r := rb.res - rb.res = pcommon.NewResource() - return r -} diff --git a/cmd/mdatagen/internal/metadata/generated_resource_test.go b/cmd/mdatagen/internal/metadata/generated_resource_test.go deleted file mode 100644 index c0bde40a0870..000000000000 --- a/cmd/mdatagen/internal/metadata/generated_resource_test.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestResourceBuilder(t *testing.T) { - for _, test := range []string{"default", "all_set", "none_set"} { - t.Run(test, func(t *testing.T) { - cfg := loadResourceAttributesConfig(t, test) - rb := NewResourceBuilder(cfg) - rb.SetMapResourceAttr(map[string]any{"key1": "map.resource.attr-val1", "key2": "map.resource.attr-val2"}) - rb.SetOptionalResourceAttr("optional.resource.attr-val") - rb.SetSliceResourceAttr([]any{"slice.resource.attr-item1", "slice.resource.attr-item2"}) - rb.SetStringEnumResourceAttrOne() - rb.SetStringResourceAttr("string.resource.attr-val") - rb.SetStringResourceAttrDisableWarning("string.resource.attr_disable_warning-val") - rb.SetStringResourceAttrRemoveWarning("string.resource.attr_remove_warning-val") - rb.SetStringResourceAttrToBeRemoved("string.resource.attr_to_be_removed-val") - - res := rb.Emit() - assert.Equal(t, 0, rb.Emit().Attributes().Len()) // Second call should return empty Resource - - switch test { - case "default": - assert.Equal(t, 6, res.Attributes().Len()) - case "all_set": - assert.Equal(t, 8, res.Attributes().Len()) - case "none_set": - assert.Equal(t, 0, res.Attributes().Len()) - return - default: - assert.Failf(t, "unexpected test case: %s", test) - } - - val, ok := res.Attributes().Get("map.resource.attr") - assert.True(t, ok) - if ok { - assert.EqualValues(t, map[string]any{"key1": "map.resource.attr-val1", "key2": "map.resource.attr-val2"}, val.Map().AsRaw()) - } - val, ok = res.Attributes().Get("optional.resource.attr") - assert.Equal(t, test == "all_set", ok) - if ok { - assert.EqualValues(t, "optional.resource.attr-val", val.Str()) - } - val, ok = res.Attributes().Get("slice.resource.attr") - assert.True(t, ok) - if ok { - assert.EqualValues(t, []any{"slice.resource.attr-item1", "slice.resource.attr-item2"}, val.Slice().AsRaw()) - } - val, ok = res.Attributes().Get("string.enum.resource.attr") - assert.True(t, ok) - if ok { - assert.EqualValues(t, "one", val.Str()) - } - val, ok = res.Attributes().Get("string.resource.attr") - assert.True(t, ok) - if ok { - assert.EqualValues(t, "string.resource.attr-val", val.Str()) - } - val, ok = res.Attributes().Get("string.resource.attr_disable_warning") - assert.True(t, ok) - if ok { - assert.EqualValues(t, "string.resource.attr_disable_warning-val", val.Str()) - } - val, ok = res.Attributes().Get("string.resource.attr_remove_warning") - assert.Equal(t, test == "all_set", ok) - if ok { - assert.EqualValues(t, "string.resource.attr_remove_warning-val", val.Str()) - } - val, ok = res.Attributes().Get("string.resource.attr_to_be_removed") - assert.True(t, ok) - if ok { - assert.EqualValues(t, "string.resource.attr_to_be_removed-val", val.Str()) - } - }) - } -} diff --git a/cmd/mdatagen/internal/metadata/generated_status.go b/cmd/mdatagen/internal/metadata/generated_status.go deleted file mode 100644 index e9ab937c5055..000000000000 --- a/cmd/mdatagen/internal/metadata/generated_status.go +++ /dev/null @@ -1,14 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/collector/component" -) - -const ( - Type = "file" - TracesStability = component.StabilityLevelBeta - LogsStability = component.StabilityLevelDevelopment - MetricsStability = component.StabilityLevelStable -) diff --git a/cmd/mdatagen/internal/metadata/testdata/config.yaml b/cmd/mdatagen/internal/metadata/testdata/config.yaml deleted file mode 100644 index 8283dc2dd70b..000000000000 --- a/cmd/mdatagen/internal/metadata/testdata/config.yaml +++ /dev/null @@ -1,55 +0,0 @@ -default: -all_set: - metrics: - default.metric: - enabled: true - default.metric.to_be_removed: - enabled: true - optional.metric: - enabled: true - optional.metric.empty_unit: - enabled: true - resource_attributes: - map.resource.attr: - enabled: true - optional.resource.attr: - enabled: true - slice.resource.attr: - enabled: true - string.enum.resource.attr: - enabled: true - string.resource.attr: - enabled: true - string.resource.attr_disable_warning: - enabled: true - string.resource.attr_remove_warning: - enabled: true - string.resource.attr_to_be_removed: - enabled: true -none_set: - metrics: - default.metric: - enabled: false - default.metric.to_be_removed: - enabled: false - optional.metric: - enabled: false - optional.metric.empty_unit: - enabled: false - resource_attributes: - map.resource.attr: - enabled: false - optional.resource.attr: - enabled: false - slice.resource.attr: - enabled: false - string.enum.resource.attr: - enabled: false - string.resource.attr: - enabled: false - string.resource.attr_disable_warning: - enabled: false - string.resource.attr_remove_warning: - enabled: false - string.resource.attr_to_be_removed: - enabled: false diff --git a/cmd/mdatagen/lint.go b/cmd/mdatagen/lint.go deleted file mode 100644 index 3fb41d70c1f2..000000000000 --- a/cmd/mdatagen/lint.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "errors" - "strings" - "unicode" - - "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/mdatagen/third_party/golint" -) - -// formatIdentifier variable in a go-safe way -func formatIdentifier(s string, exported bool) (string, error) { - if s == "" { - return "", errors.New("string cannot be empty") - } - // Convert various characters to . for strings.Title to operate on. - replace := strings.NewReplacer("_", ".", "-", ".", "<", ".", ">", ".", "/", ".", ":", ".") - str := replace.Replace(s) - str = strings.Title(str) // nolint SA1019 - str = strings.ReplaceAll(str, ".", "") - - var word string - var output string - - // Fixup acronyms to make lint happy. - for idx, r := range str { - if idx == 0 { - if exported { - r = unicode.ToUpper(r) - } else { - r = unicode.ToLower(r) - } - } - - if unicode.IsUpper(r) || unicode.IsNumber(r) { - // If the current word is an acronym and it's either exported or it's not the - // beginning of an unexported variable then upper case it. - if golint.Acronyms[strings.ToUpper(word)] && (exported || output != "") { - output += strings.ToUpper(word) - word = string(r) - } else { - output += word - word = string(r) - } - } else { - word += string(r) - } - } - - if golint.Acronyms[strings.ToUpper(word)] && output != "" { - output += strings.ToUpper(word) - } else { - output += word - } - - // Remove white spaces - output = strings.Join(strings.Fields(output), "") - - return output, nil -} diff --git a/cmd/mdatagen/lint_test.go b/cmd/mdatagen/lint_test.go deleted file mode 100644 index 5c470f302d7c..000000000000 --- a/cmd/mdatagen/lint_test.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func Test_formatIdentifier(t *testing.T) { - var tests = []struct { - input string - want string - exported bool - wantErr string - }{ - // Unexported. - {input: "max.cpu", want: "maxCPU"}, - {input: "max.foo", want: "maxFoo"}, - {input: "cpu.utilization", want: "cpuUtilization"}, - {input: "cpu", want: "cpu"}, - {input: "max.ip.addr", want: "maxIPAddr"}, - {input: "some_metric", want: "someMetric"}, - {input: "some-metric", want: "someMetric"}, - {input: "Upper.Case", want: "upperCase"}, - {input: "max.ip6", want: "maxIP6"}, - {input: "max.ip6.idle", want: "maxIP6Idle"}, - {input: "node_netstat_IpExt_OutOctets", want: "nodeNetstatIPExtOutOctets"}, - - // Exported. - {input: "cpu.state", want: "CPUState", exported: true}, - - // Errors - {input: "", want: "", wantErr: "string cannot be empty"}, - } - for _, tt := range tests { - t.Run(tt.input, func(t *testing.T) { - got, err := formatIdentifier(tt.input, tt.exported) - - if tt.wantErr != "" { - require.EqualError(t, err, tt.wantErr) - } else { - require.NoError(t, err) - require.Equal(t, tt.want, got) - } - }) - } -} diff --git a/cmd/mdatagen/loader.go b/cmd/mdatagen/loader.go deleted file mode 100644 index 19add14defb5..000000000000 --- a/cmd/mdatagen/loader.go +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "context" - "errors" - "fmt" - "os" - "path/filepath" - "strings" - - "go.opentelemetry.io/collector/confmap" - "go.opentelemetry.io/collector/confmap/provider/fileprovider" - "go.opentelemetry.io/collector/pdata/pcommon" -) - -type metricName string - -func (mn metricName) Render() (string, error) { - return formatIdentifier(string(mn), true) -} - -func (mn metricName) RenderUnexported() (string, error) { - return formatIdentifier(string(mn), false) -} - -type attributeName string - -func (mn attributeName) Render() (string, error) { - return formatIdentifier(string(mn), true) -} - -func (mn attributeName) RenderUnexported() (string, error) { - return formatIdentifier(string(mn), false) -} - -// ValueType defines an attribute value type. -type ValueType struct { - // ValueType is type of the attribute value. - ValueType pcommon.ValueType -} - -// UnmarshalText implements the encoding.TextUnmarshaler interface. -func (mvt *ValueType) UnmarshalText(text []byte) error { - switch vtStr := string(text); vtStr { - case "string": - mvt.ValueType = pcommon.ValueTypeStr - case "int": - mvt.ValueType = pcommon.ValueTypeInt - case "double": - mvt.ValueType = pcommon.ValueTypeDouble - case "bool": - mvt.ValueType = pcommon.ValueTypeBool - case "bytes": - mvt.ValueType = pcommon.ValueTypeBytes - case "slice": - mvt.ValueType = pcommon.ValueTypeSlice - case "map": - mvt.ValueType = pcommon.ValueTypeMap - default: - return fmt.Errorf("invalid type: %q", vtStr) - } - return nil -} - -// String returns capitalized name of the ValueType. -func (mvt ValueType) String() string { - return strings.Title(strings.ToLower(mvt.ValueType.String())) // nolint SA1019 -} - -// Primitive returns name of primitive type for the ValueType. -func (mvt ValueType) Primitive() string { - switch mvt.ValueType { - case pcommon.ValueTypeStr: - return "string" - case pcommon.ValueTypeInt: - return "int64" - case pcommon.ValueTypeDouble: - return "float64" - case pcommon.ValueTypeBool: - return "bool" - case pcommon.ValueTypeBytes: - return "[]byte" - case pcommon.ValueTypeSlice: - return "[]any" - case pcommon.ValueTypeMap: - return "map[string]any" - case pcommon.ValueTypeEmpty: - return "" - default: - return "" - } -} - -type metric struct { - // Enabled defines whether the metric is enabled by default. - Enabled bool `mapstructure:"enabled"` - - // Warnings that will be shown to user under specified conditions. - Warnings warnings `mapstructure:"warnings"` - - // Description of the metric. - Description string `mapstructure:"description"` - - // ExtendedDocumentation of the metric. If specified, this will - // be appended to the description used in generated documentation. - ExtendedDocumentation string `mapstructure:"extended_documentation"` - - // Unit of the metric. - Unit *string `mapstructure:"unit"` - - // Sum stores metadata for sum metric type - Sum *sum `mapstructure:"sum,omitempty"` - // Gauge stores metadata for gauge metric type - Gauge *gauge `mapstructure:"gauge,omitempty"` - - // Attributes is the list of attributes that the metric emits. - Attributes []attributeName `mapstructure:"attributes"` -} - -func (m *metric) Unmarshal(parser *confmap.Conf) error { - if !parser.IsSet("enabled") { - return errors.New("missing required field: `enabled`") - } - err := parser.Unmarshal(m, confmap.WithErrorUnused()) - if err != nil { - return err - } - return nil -} -func (m metric) Data() MetricData { - if m.Sum != nil { - return m.Sum - } - if m.Gauge != nil { - return m.Gauge - } - return nil -} - -type warnings struct { - // A warning that will be displayed if the field is enabled in user config. - IfEnabled string `mapstructure:"if_enabled"` - // A warning that will be displayed if `enabled` field is not set explicitly in user config. - IfEnabledNotSet string `mapstructure:"if_enabled_not_set"` - // A warning that will be displayed if the field is configured by user in any way. - IfConfigured string `mapstructure:"if_configured"` -} - -type attribute struct { - // Description describes the purpose of the attribute. - Description string `mapstructure:"description"` - // NameOverride can be used to override the attribute name. - NameOverride string `mapstructure:"name_override"` - // Enabled defines whether the attribute is enabled by default. - Enabled bool `mapstructure:"enabled"` - // Enum can optionally describe the set of values to which the attribute can belong. - Enum []string `mapstructure:"enum"` - // Type is an attribute type. - Type ValueType `mapstructure:"type"` - // FullName is the attribute name populated from the map key. - FullName attributeName `mapstructure:"-"` - // Warnings that will be shown to user under specified conditions. - Warnings warnings `mapstructure:"warnings"` -} - -// Name returns actual name of the attribute that is set on the metric after applying NameOverride. -func (a attribute) Name() attributeName { - if a.NameOverride != "" { - return attributeName(a.NameOverride) - } - return a.FullName -} - -func (a attribute) TestValue() string { - if a.Enum != nil { - return fmt.Sprintf(`"%s"`, a.Enum[0]) - } - switch a.Type.ValueType { - case pcommon.ValueTypeEmpty: - return "" - case pcommon.ValueTypeStr: - return fmt.Sprintf(`"%s-val"`, a.FullName) - case pcommon.ValueTypeInt: - return fmt.Sprintf("%d", len(a.FullName)) - case pcommon.ValueTypeDouble: - return fmt.Sprintf("%f", 0.1+float64(len(a.FullName))) - case pcommon.ValueTypeBool: - return fmt.Sprintf("%t", len(a.FullName)%2 == 0) - case pcommon.ValueTypeMap: - return fmt.Sprintf(`map[string]any{"key1": "%s-val1", "key2": "%s-val2"}`, a.FullName, a.FullName) - case pcommon.ValueTypeSlice: - return fmt.Sprintf(`[]any{"%s-item1", "%s-item2"}`, a.FullName, a.FullName) - case pcommon.ValueTypeBytes: - return fmt.Sprintf(`bytes("%s-val")`, a.FullName) - } - return "" -} - -type metadata struct { - // Type of the component. - Type string `mapstructure:"type"` - // Type of the parent component (applicable to subcomponents). - Parent string `mapstructure:"parent"` - // Status information for the component. - Status *Status `mapstructure:"status"` - // SemConvVersion is a version number of OpenTelemetry semantic conventions applied to the scraped metrics. - SemConvVersion string `mapstructure:"sem_conv_version"` - // ResourceAttributes that can be emitted by the component. - ResourceAttributes map[attributeName]attribute `mapstructure:"resource_attributes"` - // Attributes emitted by one or more metrics. - Attributes map[attributeName]attribute `mapstructure:"attributes"` - // Metrics that can be emitted by the component. - Metrics map[metricName]metric `mapstructure:"metrics"` - // ScopeName of the metrics emitted by the component. - ScopeName string `mapstructure:"-"` - // ShortFolderName is the shortened folder name of the component, removing class if present - ShortFolderName string `mapstructure:"-"` -} - -func setAttributesFullName(attrs map[attributeName]attribute) { - for k, v := range attrs { - v.FullName = k - attrs[k] = v - } -} - -type templateContext struct { - metadata - // Package name for generated code. - Package string -} - -func loadMetadata(filePath string) (metadata, error) { - cp, err := fileprovider.New().Retrieve(context.Background(), "file:"+filePath, nil) - if err != nil { - return metadata{}, err - } - - conf, err := cp.AsConf() - if err != nil { - return metadata{}, err - } - - md := metadata{ScopeName: scopeName(filePath), ShortFolderName: shortFolderName(filePath)} - if err := conf.Unmarshal(&md, confmap.WithErrorUnused()); err != nil { - return md, err - } - - if err := md.Validate(); err != nil { - return md, err - } - - setAttributesFullName(md.Attributes) - setAttributesFullName(md.ResourceAttributes) - - return md, nil -} - -func shortFolderName(filePath string) string { - parentFolder := filepath.Base(filepath.Dir(filePath)) - if strings.HasSuffix(parentFolder, "connector") { - return strings.TrimSuffix(parentFolder, "connector") - } - if strings.HasSuffix(parentFolder, "exporter") { - return strings.TrimSuffix(parentFolder, "exporter") - } - if strings.HasSuffix(parentFolder, "extension") { - return strings.TrimSuffix(parentFolder, "extension") - } - if strings.HasSuffix(parentFolder, "processor") { - return strings.TrimSuffix(parentFolder, "processor") - } - if strings.HasSuffix(parentFolder, "receiver") { - return strings.TrimSuffix(parentFolder, "receiver") - } - return parentFolder -} - -func scopeName(filePath string) string { - sn := "otelcol" - dirs := strings.Split(filepath.Dir(filePath), string(os.PathSeparator)) - for _, dir := range dirs { - if dir != "receiver" && strings.HasSuffix(dir, "receiver") { - sn += "/" + dir - } - if dir != "scraper" && strings.HasSuffix(dir, "scraper") { - sn += "/" + strings.TrimSuffix(dir, "scraper") - } - } - return sn -} diff --git a/cmd/mdatagen/loader_test.go b/cmd/mdatagen/loader_test.go deleted file mode 100644 index 4af1bad52339..000000000000 --- a/cmd/mdatagen/loader_test.go +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "testing" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/pmetric" -) - -func Test_loadMetadata(t *testing.T) { - tests := []struct { - name string - want metadata - wantErr string - }{ - { - name: "metadata-sample.yaml", - want: metadata{ - Type: "file", - SemConvVersion: "1.9.0", - Status: &Status{ - Class: "receiver", - Stability: map[string][]string{ - "development": {"logs"}, - "beta": {"traces"}, - "stable": {"metrics"}, - }, - Distributions: []string{"contrib"}, - Warnings: []string{"Any additional information that should be brought to the consumer's attention"}, - }, - ResourceAttributes: map[attributeName]attribute{ - "string.resource.attr": { - Description: "Resource attribute with any string value.", - Enabled: true, - Type: ValueType{ - ValueType: pcommon.ValueTypeStr, - }, - FullName: "string.resource.attr", - }, - "string.enum.resource.attr": { - Description: "Resource attribute with a known set of string values.", - Enabled: true, - Enum: []string{"one", "two"}, - Type: ValueType{ - ValueType: pcommon.ValueTypeStr, - }, - FullName: "string.enum.resource.attr", - }, - "optional.resource.attr": { - Description: "Explicitly disabled ResourceAttribute.", - Enabled: false, - Type: ValueType{ - ValueType: pcommon.ValueTypeStr, - }, - FullName: "optional.resource.attr", - }, - "slice.resource.attr": { - Description: "Resource attribute with a slice value.", - Enabled: true, - Type: ValueType{ - ValueType: pcommon.ValueTypeSlice, - }, - FullName: "slice.resource.attr", - }, - "map.resource.attr": { - Description: "Resource attribute with a map value.", - Enabled: true, - Type: ValueType{ - ValueType: pcommon.ValueTypeMap, - }, - FullName: "map.resource.attr", - }, - "string.resource.attr_disable_warning": { - Description: "Resource attribute with any string value.", - Warnings: warnings{ - IfEnabledNotSet: "This resource_attribute will be disabled by default soon.", - }, - Enabled: true, - Type: ValueType{ - ValueType: pcommon.ValueTypeStr, - }, - FullName: "string.resource.attr_disable_warning", - }, - "string.resource.attr_remove_warning": { - Description: "Resource attribute with any string value.", - Warnings: warnings{ - IfConfigured: "This resource_attribute is deprecated and will be removed soon.", - }, - Enabled: false, - Type: ValueType{ - ValueType: pcommon.ValueTypeStr, - }, - FullName: "string.resource.attr_remove_warning", - }, - "string.resource.attr_to_be_removed": { - Description: "Resource attribute with any string value.", - Warnings: warnings{ - IfEnabled: "This resource_attribute is deprecated and will be removed soon.", - }, - Enabled: true, - Type: ValueType{ - ValueType: pcommon.ValueTypeStr, - }, - FullName: "string.resource.attr_to_be_removed", - }, - }, - - Attributes: map[attributeName]attribute{ - "enum_attr": { - Description: "Attribute with a known set of string values.", - NameOverride: "", - Enum: []string{"red", "green", "blue"}, - Type: ValueType{ - ValueType: pcommon.ValueTypeStr, - }, - FullName: "enum_attr", - }, - "string_attr": { - Description: "Attribute with any string value.", - NameOverride: "", - Type: ValueType{ - ValueType: pcommon.ValueTypeStr, - }, - FullName: "string_attr", - }, - "overridden_int_attr": { - Description: "Integer attribute with overridden name.", - NameOverride: "state", - Type: ValueType{ - ValueType: pcommon.ValueTypeInt, - }, - FullName: "overridden_int_attr", - }, - "boolean_attr": { - Description: "Attribute with a boolean value.", - Type: ValueType{ - ValueType: pcommon.ValueTypeBool, - }, - FullName: "boolean_attr", - }, - "slice_attr": { - Description: "Attribute with a slice value.", - Type: ValueType{ - ValueType: pcommon.ValueTypeSlice, - }, - FullName: "slice_attr", - }, - "map_attr": { - Description: "Attribute with a map value.", - Type: ValueType{ - ValueType: pcommon.ValueTypeMap, - }, - FullName: "map_attr", - }, - }, - Metrics: map[metricName]metric{ - "default.metric": { - Enabled: true, - Description: "Monotonic cumulative sum int metric enabled by default.", - ExtendedDocumentation: "The metric will be become optional soon.", - Warnings: warnings{ - IfEnabledNotSet: "This metric will be disabled by default soon.", - }, - Unit: strPtr("s"), - Sum: &sum{ - MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeInt}, - AggregationTemporality: AggregationTemporality{Aggregation: pmetric.AggregationTemporalityCumulative}, - Mono: Mono{Monotonic: true}, - }, - Attributes: []attributeName{"string_attr", "overridden_int_attr", "enum_attr", "slice_attr", "map_attr"}, - }, - "optional.metric": { - Enabled: false, - Description: "[DEPRECATED] Gauge double metric disabled by default.", - Warnings: warnings{ - IfConfigured: "This metric is deprecated and will be removed soon.", - }, - Unit: strPtr("1"), - Gauge: &gauge{ - MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeDouble}, - }, - Attributes: []attributeName{"string_attr", "boolean_attr"}, - }, - "optional.metric.empty_unit": { - Enabled: false, - Description: "[DEPRECATED] Gauge double metric disabled by default.", - Warnings: warnings{ - IfConfigured: "This metric is deprecated and will be removed soon.", - }, - Unit: strPtr(""), - Gauge: &gauge{ - MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeDouble}, - }, - Attributes: []attributeName{"string_attr", "boolean_attr"}, - }, - - "default.metric.to_be_removed": { - Enabled: true, - Description: "[DEPRECATED] Non-monotonic delta sum double metric enabled by default.", - ExtendedDocumentation: "The metric will be will be removed soon.", - Warnings: warnings{ - IfEnabled: "This metric is deprecated and will be removed soon.", - }, - Unit: strPtr("s"), - Sum: &sum{ - MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeDouble}, - AggregationTemporality: AggregationTemporality{Aggregation: pmetric.AggregationTemporalityDelta}, - Mono: Mono{Monotonic: false}, - }, - }, - }, - ScopeName: "otelcol", - ShortFolderName: ".", - }, - }, - { - name: "testdata/parent.yaml", - want: metadata{ - Type: "subcomponent", - Parent: "parentComponent", - ScopeName: "otelcol", - ShortFolderName: "testdata", - }, - }, - { - name: "testdata/invalid_type_rattr.yaml", - want: metadata{}, - wantErr: "1 error(s) decoding:\n\n* error decoding 'resource_attributes[string.resource.attr].type': invalid type: \"invalidtype\"", - }, - { - name: "testdata/no_enabled.yaml", - want: metadata{}, - wantErr: "1 error(s) decoding:\n\n* error decoding 'metrics[system.cpu.time]': missing required field: `enabled`", - }, - { - name: "testdata/no_value_type.yaml", - want: metadata{}, - wantErr: "1 error(s) decoding:\n\n* error decoding 'metrics[system.cpu.time]': 1 error(s) decoding:\n\n" + - "* error decoding 'sum': missing required field: `value_type`", - }, - { - name: "testdata/unknown_value_type.yaml", - wantErr: "1 error(s) decoding:\n\n* error decoding 'metrics[system.cpu.time]': 1 error(s) decoding:\n\n* error decoding 'sum': 1 error(s) decoding:\n\n* error decoding 'value_type': invalid value_type: \"unknown\"", - }, - { - name: "testdata/no_aggregation.yaml", - want: metadata{}, - wantErr: "1 error(s) decoding:\n\n* error decoding 'metrics[default.metric]': 1 error(s) decoding:\n\n* error decoding 'sum': missing required field: `aggregation_temporality`", - }, - { - name: "testdata/invalid_aggregation.yaml", - want: metadata{}, - wantErr: "1 error(s) decoding:\n\n* error decoding 'metrics[default.metric]': 1 error(s) decoding:\n\n* error decoding 'sum': 1 error(s) decoding:\n\n* error decoding 'aggregation_temporality': invalid aggregation: \"invalidaggregation\"", - }, - { - name: "testdata/invalid_type_attr.yaml", - want: metadata{}, - wantErr: "1 error(s) decoding:\n\n* error decoding 'attributes[used_attr].type': invalid type: \"invalidtype\"", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := loadMetadata(tt.name) - if tt.wantErr != "" { - require.Error(t, err) - require.EqualError(t, err, tt.wantErr) - } else { - require.NoError(t, err) - require.Equal(t, tt.want, got) - } - }) - } -} - -func strPtr(s string) *string { - return &s -} diff --git a/cmd/mdatagen/main.go b/cmd/mdatagen/main.go deleted file mode 100644 index 2d35ff129362..000000000000 --- a/cmd/mdatagen/main.go +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "bytes" - "errors" - "flag" - "fmt" - "go/format" - "log" - "os" - "path/filepath" - "regexp" - "strings" - "text/template" - - "golang.org/x/text/cases" - "golang.org/x/text/language" -) - -const ( - statusStart = "" - statusEnd = "" -) - -func main() { - flag.Parse() - yml := flag.Arg(0) - if err := run(yml); err != nil { - log.Fatal(err) - } -} - -func run(ymlPath string) error { - if ymlPath == "" { - return errors.New("argument must be metadata.yaml file") - } - ymlPath, err := filepath.Abs(ymlPath) - if err != nil { - return fmt.Errorf("failed to get absolute path for %v: %w", ymlPath, err) - } - - ymlDir := filepath.Dir(ymlPath) - - md, err := loadMetadata(ymlPath) - if err != nil { - return fmt.Errorf("failed loading %v: %w", ymlPath, err) - } - - tmplDir := "templates" - - codeDir := filepath.Join(ymlDir, "internal", "metadata") - if err = os.MkdirAll(codeDir, 0700); err != nil { - return fmt.Errorf("unable to create output directory %q: %w", codeDir, err) - } - if md.Status != nil { - if md.Status.Class != "cmd" && md.Status.Class != "pkg" { - if err = generateFile(filepath.Join(tmplDir, "status.go.tmpl"), - filepath.Join(codeDir, "generated_status.go"), md); err != nil { - return err - } - } - - if _, err = os.Stat(filepath.Join(ymlDir, "README.md")); err == nil { - if err = inlineReplace( - filepath.Join(tmplDir, "readme.md.tmpl"), - filepath.Join(ymlDir, "README.md"), - md, statusStart, statusEnd); err != nil { - return err - } - } - } - if len(md.Metrics) == 0 && len(md.ResourceAttributes) == 0 { - return nil - } - - if err = os.MkdirAll(filepath.Join(codeDir, "testdata"), 0700); err != nil { - return fmt.Errorf("unable to create output directory %q: %w", filepath.Join(codeDir, "testdata"), err) - } - if err = generateFile(filepath.Join(tmplDir, "testdata", "config.yaml.tmpl"), - filepath.Join(codeDir, "testdata", "config.yaml"), md); err != nil { - return err - } - - if err = generateFile(filepath.Join(tmplDir, "config.go.tmpl"), - filepath.Join(codeDir, "generated_config.go"), md); err != nil { - return err - } - if err = generateFile(filepath.Join(tmplDir, "config_test.go.tmpl"), - filepath.Join(codeDir, "generated_config_test.go"), md); err != nil { - return err - } - - if len(md.ResourceAttributes) > 0 { - if err = generateFile(filepath.Join(tmplDir, "resource.go.tmpl"), - filepath.Join(codeDir, "generated_resource.go"), md); err != nil { - return err - } - if err = generateFile(filepath.Join(tmplDir, "resource_test.go.tmpl"), - filepath.Join(codeDir, "generated_resource_test.go"), md); err != nil { - return err - } - } - - if len(md.Metrics) == 0 { - return nil - } - - if err = generateFile(filepath.Join(tmplDir, "metrics.go.tmpl"), - filepath.Join(codeDir, "generated_metrics.go"), md); err != nil { - return err - } - if err = generateFile(filepath.Join(tmplDir, "metrics_test.go.tmpl"), - filepath.Join(codeDir, "generated_metrics_test.go"), md); err != nil { - return err - } - - return generateFile(filepath.Join(tmplDir, "documentation.md.tmpl"), filepath.Join(ymlDir, "documentation.md"), md) -} - -func templatize(tmplFile string, md metadata) *template.Template { - return template.Must( - template. - New(filepath.Base(tmplFile)). - Option("missingkey=error"). - Funcs(map[string]any{ - "publicVar": func(s string) (string, error) { - return formatIdentifier(s, true) - }, - "attributeInfo": func(an attributeName) attribute { - return md.Attributes[an] - }, - "metricInfo": func(mn metricName) metric { - return md.Metrics[mn] - }, - "parseImportsRequired": func(metrics map[metricName]metric) bool { - for _, m := range metrics { - if m.Data().HasMetricInputType() { - return true - } - } - return false - }, - "stringsJoin": strings.Join, - "stringsSplit": strings.Split, - "userLinks": func(elems []string) []string { - result := make([]string, len(elems)) - for i, elem := range elems { - if elem == "open-telemetry/collector-approvers" { - result[i] = "[@open-telemetry/collector-approvers](https://github.com/orgs/open-telemetry/teams/collector-approvers)" - } else { - result[i] = fmt.Sprintf("[@%s](https://www.github.com/%s)", elem, elem) - } - } - return result - }, - "casesTitle": cases.Title(language.English).String, - "toCamelCase": func(s string) string { - caser := cases.Title(language.English).String - parts := strings.Split(s, "_") - result := "" - for _, part := range parts { - result += caser(part) - } - return result - }, - "inc": func(i int) int { return i + 1 }, - "distroURL": func(name string) string { - return distros[name] - }, - // ParseFS delegates the parsing of the files to `Glob` - // which uses the `\` as a special character. - // Meaning on windows based machines, the `\` needs to be replaced - // with a `/` for it to find the file. - }).ParseFS(templateFS, strings.ReplaceAll(tmplFile, "\\", "/"))) -} - -func inlineReplace(tmplFile string, outputFile string, md metadata, start string, end string) error { - var readmeContents []byte - var err error - if readmeContents, err = os.ReadFile(outputFile); err != nil { - return err - } - - var re = regexp.MustCompile(fmt.Sprintf("%s[\\s\\S]*%s", start, end)) - if !re.Match(readmeContents) { - return nil - } - - tmpl := templatize(tmplFile, md) - buf := bytes.Buffer{} - - if err := tmpl.Execute(&buf, templateContext{metadata: md, Package: "metadata"}); err != nil { - return fmt.Errorf("failed executing template: %w", err) - } - - result := buf.String() - - s := re.ReplaceAllString(string(readmeContents), result) - if err := os.WriteFile(outputFile, []byte(s), 0600); err != nil { - return fmt.Errorf("failed writing %q: %w", outputFile, err) - } - - return nil -} - -func generateFile(tmplFile string, outputFile string, md metadata) error { - tmpl := templatize(tmplFile, md) - buf := bytes.Buffer{} - - if err := tmpl.Execute(&buf, templateContext{metadata: md, Package: "metadata"}); err != nil { - return fmt.Errorf("failed executing template: %w", err) - } - - if err := os.Remove(outputFile); err != nil && !errors.Is(err, os.ErrNotExist) { - return fmt.Errorf("unable to remove genererated file %q: %w", outputFile, err) - } - - result := buf.Bytes() - var formatErr error - if strings.HasSuffix(outputFile, ".go") { - if formatted, err := format.Source(buf.Bytes()); err == nil { - result = formatted - } else { - formatErr = fmt.Errorf("failed formatting %s:%w", outputFile, err) - } - } - - if err := os.WriteFile(outputFile, result, 0600); err != nil { - return fmt.Errorf("failed writing %q: %w", outputFile, err) - } - - return formatErr -} diff --git a/cmd/mdatagen/main_test.go b/cmd/mdatagen/main_test.go deleted file mode 100644 index e23dcb6d129c..000000000000 --- a/cmd/mdatagen/main_test.go +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "bytes" - "fmt" - "os" - "path/filepath" - "testing" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/receiver/receivertest" - - md "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/mdatagen/internal/metadata" -) - -func Test_runContents(t *testing.T) { - tests := []struct { - yml string - wantMetricsGenerated bool - wantConfigGenerated bool - wantStatusGenerated bool - wantErr bool - }{ - { - yml: "invalid.yaml", - wantErr: true, - }, - { - yml: "metrics_and_type.yaml", - wantMetricsGenerated: true, - wantConfigGenerated: true, - wantStatusGenerated: true, - }, - { - yml: "resource_attributes_only.yaml", - wantConfigGenerated: true, - wantStatusGenerated: true, - }, - { - yml: "status_only.yaml", - wantStatusGenerated: true, - }, - } - for _, tt := range tests { - t.Run(tt.yml, func(t *testing.T) { - tmpdir := t.TempDir() - ymlContent, err := os.ReadFile(filepath.Join("testdata", tt.yml)) - require.NoError(t, err) - metadataFile := filepath.Join(tmpdir, "metadata.yaml") - require.NoError(t, os.WriteFile(metadataFile, ymlContent, 0600)) - require.NoError(t, os.WriteFile(filepath.Join(tmpdir, "README.md"), []byte(` - -foo -`), 0600)) - - err = run(metadataFile) - if tt.wantErr { - require.Error(t, err) - return - } - require.NoError(t, err) - - if tt.wantMetricsGenerated { - require.FileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_metrics.go")) - require.FileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_metrics_test.go")) - require.FileExists(t, filepath.Join(tmpdir, "documentation.md")) - } else { - require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_metrics.go")) - require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_metrics_test.go")) - require.NoFileExists(t, filepath.Join(tmpdir, "documentation.md")) - } - - if tt.wantConfigGenerated { - require.FileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_config.go")) - require.FileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_config_test.go")) - } else { - require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_config.go")) - require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_config_test.go")) - } - - if tt.wantStatusGenerated { - require.FileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_status.go")) - contents, err := os.ReadFile(filepath.Join(tmpdir, "README.md")) - require.NoError(t, err) - require.NotContains(t, string(contents), "foo") - } else { - require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_status.go")) - contents, err := os.ReadFile(filepath.Join(tmpdir, "README.md")) - require.NoError(t, err) - require.Contains(t, string(contents), "foo") - } - }) - } -} - -func Test_run(t *testing.T) { - type args struct { - ymlPath string - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: "no argument", - args: args{""}, - wantErr: true, - }, - { - name: "no such file", - args: args{"/no/such/file"}, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if err := run(tt.args.ymlPath); (err != nil) != tt.wantErr { - t.Errorf("run() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} - -func Test_inlineReplace(t *testing.T) { - tests := []struct { - name string - markdown string - outputFile string - componentClass string - warnings []string - stability map[string][]string - distros []string - codeowners *Codeowners - }{ - { - name: "readme with empty status", - markdown: `# Some component - - - - -Some info about a component -`, - outputFile: "readme_with_status.md", - componentClass: "receiver", - distros: []string{"contrib"}, - }, - { - name: "readme with status for extension", - markdown: `# Some component - - - - -Some info about a component -`, - outputFile: "readme_with_status_extension.md", - componentClass: "extension", - distros: []string{"contrib"}, - }, - { - name: "readme with status with codeowners and emeritus", - markdown: `# Some component - - - - -Some info about a component -`, - outputFile: "readme_with_status_codeowners_and_emeritus.md", - componentClass: "receiver", - distros: []string{"contrib"}, - codeowners: &Codeowners{ - Active: []string{"foo"}, - Emeritus: []string{"bar"}, - }, - }, - { - name: "readme with status with codeowners", - markdown: `# Some component - - - - -Some info about a component -`, - outputFile: "readme_with_status_codeowners.md", - componentClass: "receiver", - distros: []string{"contrib"}, - codeowners: &Codeowners{ - Active: []string{"foo"}, - }, - }, - { - name: "readme with status table", - markdown: `# Some component - - -| Status | | -| ------------------------ |-----------| - - -Some info about a component -`, - outputFile: "readme_with_status.md", - componentClass: "receiver", - distros: []string{"contrib"}, - }, - { - name: "readme with no status", - markdown: `# Some component - -Some info about a component -`, - outputFile: "readme_without_status.md", - distros: []string{"contrib"}, - }, - { - name: "component with warnings", - markdown: `# Some component - - - - -Some info about a component -### warnings -Some warning there. -`, - outputFile: "readme_with_warnings.md", - warnings: []string{"warning1"}, - distros: []string{"contrib"}, - }, - { - name: "readme with multiple signals", - markdown: `# Some component - - - - -Some info about a component -`, - outputFile: "readme_with_multiple_signals.md", - stability: map[string][]string{"beta": {"metrics"}, "alpha": {"logs"}}, - distros: []string{"contrib"}, - }, - { - name: "readme with cmd class", - markdown: `# Some component - - - - -Some info about a component -`, - outputFile: "readme_with_cmd_class.md", - stability: map[string][]string{"beta": {"metrics"}, "alpha": {"logs"}}, - componentClass: "cmd", - distros: []string{}, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - stability := map[string][]string{"beta": {"metrics"}} - if len(tt.stability) > 0 { - stability = tt.stability - } - md := metadata{ - Type: "foo", - ShortFolderName: "foo", - Status: &Status{ - Stability: stability, - Distributions: tt.distros, - Class: tt.componentClass, - Warnings: tt.warnings, - Codeowners: tt.codeowners, - }, - } - tmpdir := t.TempDir() - - readmeFile := filepath.Join(tmpdir, "README.md") - require.NoError(t, os.WriteFile(readmeFile, []byte(tt.markdown), 0600)) - - err := inlineReplace("templates/readme.md.tmpl", readmeFile, md, statusStart, statusEnd) - require.NoError(t, err) - - require.FileExists(t, filepath.Join(tmpdir, "README.md")) - got, err := os.ReadFile(filepath.Join(tmpdir, "README.md")) - require.NoError(t, err) - got = bytes.ReplaceAll(got, []byte("\r\n"), []byte("\n")) - expected, err := os.ReadFile(filepath.Join("testdata", tt.outputFile)) - require.NoError(t, err) - expected = bytes.ReplaceAll(expected, []byte("\r\n"), []byte("\n")) - fmt.Println(string(got)) - fmt.Println(string(expected)) - require.Equal(t, string(expected), string(got)) - }) - } -} - -func TestGenerateStatusMetadata(t *testing.T) { - tests := []struct { - name string - output string - md metadata - expected string - }{ - { - name: "foo component with beta status", - md: metadata{ - Type: "foo", - Status: &Status{ - Stability: map[string][]string{"beta": {"metrics"}}, - Distributions: []string{"contrib"}, - Class: "receiver", - }, - }, - expected: `// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/collector/component" -) - -const ( - Type = "foo" - MetricsStability = component.StabilityLevelBeta -) -`, - }, - { - name: "foo component with alpha status", - md: metadata{ - Type: "foo", - Status: &Status{ - Stability: map[string][]string{"alpha": {"metrics"}}, - Distributions: []string{"contrib"}, - Class: "receiver", - }, - }, - expected: `// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/collector/component" -) - -const ( - Type = "foo" - MetricsStability = component.StabilityLevelAlpha -) -`, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - tmpdir := t.TempDir() - err := generateFile("templates/status.go.tmpl", - filepath.Join(tmpdir, "generated_status.go"), tt.md) - require.NoError(t, err) - actual, err := os.ReadFile(filepath.Join(tmpdir, "generated_status.go")) - require.NoError(t, err) - require.Equal(t, tt.expected, string(actual)) - }) - } -} - -// TestGenerated verifies that the internal/metadata API is generated correctly. -func TestGenerated(t *testing.T) { - mb := md.NewMetricsBuilder(md.DefaultMetricsBuilderConfig(), receivertest.NewNopCreateSettings()) - m := mb.Emit() - require.Equal(t, 0, m.ResourceMetrics().Len()) -} diff --git a/cmd/mdatagen/metadata-sample.yaml b/cmd/mdatagen/metadata-sample.yaml deleted file mode 100644 index b9a5f8f6c908..000000000000 --- a/cmd/mdatagen/metadata-sample.yaml +++ /dev/null @@ -1,136 +0,0 @@ -# Sample metric metadata file with all available configurations. - -type: file - -sem_conv_version: 1.9.0 - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - distributions: [contrib] - warnings: - - Any additional information that should be brought to the consumer's attention - -resource_attributes: - string.resource.attr: - description: Resource attribute with any string value. - type: string - enabled: true - - string.enum.resource.attr: - description: Resource attribute with a known set of string values. - type: string - enum: [one, two] - enabled: true - - optional.resource.attr: - description: Explicitly disabled ResourceAttribute. - type: string - enabled: false - - slice.resource.attr: - description: Resource attribute with a slice value. - type: slice - enabled: true - - map.resource.attr: - description: Resource attribute with a map value. - type: map - enabled: true - - string.resource.attr_disable_warning: - description: Resource attribute with any string value. - type: string - enabled: true - warnings: - if_enabled_not_set: This resource_attribute will be disabled by default soon. - - string.resource.attr_remove_warning: - description: Resource attribute with any string value. - type: string - enabled: false - warnings: - if_configured: This resource_attribute is deprecated and will be removed soon. - - string.resource.attr_to_be_removed: - description: Resource attribute with any string value. - type: string - enabled: true - warnings: - if_enabled: This resource_attribute is deprecated and will be removed soon. - -attributes: - string_attr: - description: Attribute with any string value. - type: string - - overridden_int_attr: - name_override: state - description: Integer attribute with overridden name. - type: int - - enum_attr: - description: Attribute with a known set of string values. - type: string - enum: [red, green, blue] - - boolean_attr: - description: Attribute with a boolean value. - type: bool - - slice_attr: - description: Attribute with a slice value. - type: slice - - map_attr: - description: Attribute with a map value. - type: map - -metrics: - default.metric: - enabled: true - description: Monotonic cumulative sum int metric enabled by default. - extended_documentation: The metric will be become optional soon. - unit: s - sum: - value_type: int - monotonic: true - aggregation_temporality: cumulative - attributes: [string_attr, overridden_int_attr, enum_attr, slice_attr, map_attr] - warnings: - if_enabled_not_set: This metric will be disabled by default soon. - - optional.metric: - enabled: false - description: "[DEPRECATED] Gauge double metric disabled by default." - unit: 1 - gauge: - value_type: double - attributes: [string_attr, boolean_attr] - warnings: - if_configured: This metric is deprecated and will be removed soon. - - optional.metric.empty_unit: - enabled: false - description: "[DEPRECATED] Gauge double metric disabled by default." - unit: "" - gauge: - value_type: double - attributes: [string_attr, boolean_attr] - warnings: - if_configured: This metric is deprecated and will be removed soon. - - default.metric.to_be_removed: - enabled: true - description: "[DEPRECATED] Non-monotonic delta sum double metric enabled by default." - extended_documentation: The metric will be will be removed soon. - unit: s - sum: - value_type: double - monotonic: false - aggregation_temporality: delta - warnings: - if_enabled: This metric is deprecated and will be removed soon. diff --git a/cmd/mdatagen/metadata-schema.yaml b/cmd/mdatagen/metadata-schema.yaml deleted file mode 100644 index 91ab3404bcbd..000000000000 --- a/cmd/mdatagen/metadata-schema.yaml +++ /dev/null @@ -1,106 +0,0 @@ -# Required: The type of the component - Usually the name. The type and class combined uniquely identify the component (eg. receiver/otlp) or subcomponent (eg. receiver/hostmetricsreceiver/cpu) -type: - -# Required for subcomponents: The type of the parent component. -parent: string - -# Required for components (Optional for subcomponents): A high-level view of the development status and use of this component -status: - # Required: The class of the component (For example receiver) - class: - # Required: The stability of the component - See https://github.com/open-telemetry/opentelemetry-collector#stability-levels - stability: - development: [] - alpha: [] - beta: [] - stable: [] - deprecated: [] - unmaintained: [] - # Optional: The distributions that this component is bundled with (For example core or contrib). See statusdata.go for a list of common distros. - distributions: [string] - # Optional: A list of warnings that should be brought to the attention of users looking to use this component - warnings: [string] - # Optional: Metadata related to codeowners of the component - codeowners: - active: [string] - emeritus: [string] - -# Optional: OTel Semantic Conventions version that will be associated with the scraped metrics. -# This attribute should be set for metrics compliant with OTel Semantic Conventions. -sem_conv_version: 1.9.0 - -# Optional: map of resource attribute definitions with the key being the attribute name. -resource_attributes: - : - # Required: whether the resource attribute is added the emitted metrics by default. - enabled: bool - # Required: description of the attribute. - description: - # Optional: array of attribute values if they are static values (currently, only string type is supported). - enum: [string] - # Required: attribute value type. - type: - # Optional: warnings that will be shown to user under specified conditions. - warnings: - # A warning that will be displayed if the resource_attribute is enabled in user config. - # Should be used for deprecated default resource_attributes that will be removed soon. - if_enabled: - # A warning that will be displayed if `enabled` field is not set explicitly in user config. - # Should be used for resource_attributes that will be turned from default to optional or vice versa. - if_enabled_not_set: - # A warning that will be displayed if the resource_attribute is configured by user in any way. - # Should be used for deprecated optional resource_attributes that will be removed soon. - if_configured: - - -# Optional: map of attribute definitions with the key being the attribute name and value -# being described below. -attributes: - : - # Optional: this field can be used to override the actual attribute name defined by the key. - # It should be used if multiple metrics have different attributes with the same name. - name_override: - # Required: description of the attribute. - description: - # Optional: array of attribute values if they are static values (currently, only string type is supported). - enum: [string] - # Required: attribute value type. - type: - -# Optional: map of metric names with the key being the metric name and value -# being described below. -metrics: - : - # Required: whether the metric is collected by default. - enabled: bool - # Required: metric description. - description: - # Optional: extended documentation of the metric. - extended_documentation: - # Optional: warnings that will be shown to user under specified conditions. - warnings: - # A warning that will be displayed if the metric is enabled in user config. - # Should be used for deprecated default metrics that will be removed soon. - if_enabled: - # A warning that will be displayed if `enabled` field is not set explicitly in user config. - # Should be used for metrics that will be turned from default to optional or vice versa. - if_enabled_not_set: - # A warning that will be displayed if the metrics is configured by user in any way. - # Should be used for deprecated optional metrics that will be removed soon. - if_configured: - # Required: metric unit as defined by https://ucum.org/ucum.html. - unit: - # Required: metric type with its settings. - : - # Required for sum and gauge metrics: type of number data point values. - value_type: - # Required for sum metric: whether the metric is monotonic (no negative delta values). - monotonic: bool - # Required for sum metric: whether reported values incorporate previous measurements - # (cumulative) or not (delta). - aggregation_temporality: - # Optional: Indicates the type the metric needs to be parsed from. If set, the generated - # functions will parse the value from string to value_type. - input_type: string - # Optional: array of attributes that were defined in the attributes section that are emitted by this metric. - attributes: [string] diff --git a/cmd/mdatagen/metadata.yaml b/cmd/mdatagen/metadata.yaml deleted file mode 100644 index 65bb097a9624..000000000000 --- a/cmd/mdatagen/metadata.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: mdatagen - -status: - class: cmd - codeowners: - active: [dmitryax] \ No newline at end of file diff --git a/cmd/mdatagen/metricdata.go b/cmd/mdatagen/metricdata.go deleted file mode 100644 index c3448f1722c6..000000000000 --- a/cmd/mdatagen/metricdata.go +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "errors" - "fmt" - - "go.opentelemetry.io/collector/confmap" - "go.opentelemetry.io/collector/pdata/pmetric" -) - -var ( - _ MetricData = &gauge{} - _ MetricData = &sum{} -) - -// MetricData is generic interface for all metric datatypes. -type MetricData interface { - Type() string - HasMonotonic() bool - HasAggregated() bool - HasMetricInputType() bool -} - -// AggregationTemporality defines a metric aggregation type. -type AggregationTemporality struct { - // Aggregation describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - Aggregation pmetric.AggregationTemporality -} - -// UnmarshalText implements the encoding.TextUnmarshaler interface. -func (agg *AggregationTemporality) UnmarshalText(text []byte) error { - switch vtStr := string(text); vtStr { - case "cumulative": - agg.Aggregation = pmetric.AggregationTemporalityCumulative - case "delta": - agg.Aggregation = pmetric.AggregationTemporalityDelta - default: - return fmt.Errorf("invalid aggregation: %q", vtStr) - } - return nil -} - -// String returns string representation of the aggregation temporality. -func (agg *AggregationTemporality) String() string { - return agg.Aggregation.String() -} - -// Mono defines the metric monotonicity. -type Mono struct { - // Monotonic is true if the sum is monotonic. - Monotonic bool `mapstructure:"monotonic"` -} - -// MetricInputType defines the metric input value type -type MetricInputType struct { - // InputType is the type the metric needs to be parsed from, options are "string" - InputType string `mapstructure:"input_type"` -} - -func (mit MetricInputType) HasMetricInputType() bool { - return mit.InputType != "" -} - -// Type returns name of the datapoint type. -func (mit MetricInputType) String() string { - return mit.InputType -} - -// MetricValueType defines the metric number type. -type MetricValueType struct { - // ValueType is type of the metric number, options are "double", "int". - ValueType pmetric.NumberDataPointValueType -} - -func (mvt *MetricValueType) Unmarshal(parser *confmap.Conf) error { - if !parser.IsSet("value_type") { - return errors.New("missing required field: `value_type`") - } - return nil -} - -// UnmarshalText implements the encoding.TextUnmarshaler interface. -func (mvt *MetricValueType) UnmarshalText(text []byte) error { - switch vtStr := string(text); vtStr { - case "int": - mvt.ValueType = pmetric.NumberDataPointValueTypeInt - case "double": - mvt.ValueType = pmetric.NumberDataPointValueTypeDouble - default: - return fmt.Errorf("invalid value_type: %q", vtStr) - } - return nil -} - -// Type returns name of the datapoint type. -func (mvt MetricValueType) String() string { - return mvt.ValueType.String() -} - -// BasicType returns name of a golang basic type for the datapoint type. -func (mvt MetricValueType) BasicType() string { - switch mvt.ValueType { - case pmetric.NumberDataPointValueTypeInt: - return "int64" - case pmetric.NumberDataPointValueTypeDouble: - return "float64" - case pmetric.NumberDataPointValueTypeEmpty: - return "" - default: - return "" - } -} - -type gauge struct { - MetricValueType `mapstructure:"value_type"` - MetricInputType `mapstructure:",squash"` -} - -// Unmarshal is a custom unmarshaler for gauge. Needed mostly to avoid MetricValueType.Unmarshal inheritance. -func (d *gauge) Unmarshal(parser *confmap.Conf) error { - if err := d.MetricValueType.Unmarshal(parser); err != nil { - return err - } - return parser.Unmarshal(d, confmap.WithErrorUnused()) -} - -func (d gauge) Type() string { - return "Gauge" -} - -func (d gauge) HasMonotonic() bool { - return false -} - -func (d gauge) HasAggregated() bool { - return false -} - -type sum struct { - AggregationTemporality `mapstructure:"aggregation_temporality"` - Mono `mapstructure:",squash"` - MetricValueType `mapstructure:"value_type"` - MetricInputType `mapstructure:",squash"` -} - -// Unmarshal is a custom unmarshaler for sum. Needed mostly to avoid MetricValueType.Unmarshal inheritance. -func (d *sum) Unmarshal(parser *confmap.Conf) error { - if !parser.IsSet("aggregation_temporality") { - return errors.New("missing required field: `aggregation_temporality`") - } - if err := d.MetricValueType.Unmarshal(parser); err != nil { - return err - } - return parser.Unmarshal(d, confmap.WithErrorUnused()) -} - -// TODO: Currently, this func will not be called because of https://github.com/open-telemetry/opentelemetry-collector/issues/6671. Uncomment function and -// add a test case to Test_loadMetadata for file no_monotonic.yaml once the issue is solved. -// -// Unmarshal is a custom unmarshaler for Mono. -// func (m *Mono) Unmarshal(parser *confmap.Conf) error { -// if !parser.IsSet("monotonic") { -// return errors.New("missing required field: `monotonic`") -// } -// return parser.Unmarshal(m, confmap.WithErrorUnused()) -// } - -func (d sum) Type() string { - return "Sum" -} - -func (d sum) HasMonotonic() bool { - return true -} - -func (d sum) HasAggregated() bool { - return true -} diff --git a/cmd/mdatagen/metricdata_test.go b/cmd/mdatagen/metricdata_test.go deleted file mode 100644 index 10b7f46613ed..000000000000 --- a/cmd/mdatagen/metricdata_test.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestMetricData(t *testing.T) { - for _, arg := range []struct { - metricData MetricData - typ string - hasAggregated bool - hasMonotonic bool - }{ - {&gauge{}, "Gauge", false, false}, - {&sum{}, "Sum", true, true}, - } { - assert.Equal(t, arg.typ, arg.metricData.Type()) - assert.Equal(t, arg.hasAggregated, arg.metricData.HasAggregated()) - assert.Equal(t, arg.hasMonotonic, arg.metricData.HasMonotonic()) - } -} diff --git a/cmd/mdatagen/statusdata.go b/cmd/mdatagen/statusdata.go deleted file mode 100644 index 9ecf63d4257d..000000000000 --- a/cmd/mdatagen/statusdata.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "sort" -) - -// distros is a collection of distributions that can be referenced in the metadata.yaml files. -// The rules below apply to every distribution added to this list: -// - The distribution must be open source. -// - The link must point to a publicly accessible repository. -var distros = map[string]string{ - "core": "https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol", - "contrib": "https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib", - "aws": "https://github.com/aws-observability/aws-otel-collector", - "grafana": "https://github.com/grafana/agent", - "observiq": "https://github.com/observIQ/observiq-otel-collector", - "redhat": "https://github.com/os-observability/redhat-opentelemetry-collector", - "splunk": "https://github.com/signalfx/splunk-otel-collector", - "sumo": "https://github.com/SumoLogic/sumologic-otel-collector", - "liatrio": "https://github.com/liatrio/liatrio-otel-collector", -} - -type Codeowners struct { - // Active codeowners - Active []string `mapstructure:"active"` - // Emeritus codeowners - Emeritus []string `mapstructure:"emeritus"` -} - -type Status struct { - Stability map[string][]string `mapstructure:"stability"` - Distributions []string `mapstructure:"distributions"` - Class string `mapstructure:"class"` - Warnings []string `mapstructure:"warnings"` - Codeowners *Codeowners `mapstructure:"codeowners"` -} - -func (s *Status) SortedDistributions() []string { - sorted := s.Distributions - sort.Slice(sorted, func(i, j int) bool { - if s.Distributions[i] == "core" { - return true - } - if s.Distributions[i] == "contrib" { - return s.Distributions[j] != "core" - } - if s.Distributions[j] == "core" { - return false - } - if s.Distributions[j] == "contrib" { - return s.Distributions[i] == "core" - } - return s.Distributions[i] < s.Distributions[j] - }) - return sorted -} diff --git a/cmd/mdatagen/statusdata_test.go b/cmd/mdatagen/statusdata_test.go deleted file mode 100644 index 947065b1d6f4..000000000000 --- a/cmd/mdatagen/statusdata_test.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestSortedDistributions(t *testing.T) { - tests := []struct { - name string - s Status - result []string - }{ - { - "all combined", - Status{Distributions: []string{"arm", "contrib", "core", "foo", "bar"}}, - []string{"core", "contrib", "arm", "bar", "foo"}, - }, - { - "core only", - Status{Distributions: []string{"core"}}, - []string{"core"}, - }, - { - "core and contrib only", - Status{Distributions: []string{"core", "contrib"}}, - []string{"core", "contrib"}, - }, - { - "core and contrib reversed", - Status{Distributions: []string{"contrib", "core"}}, - []string{"core", "contrib"}, - }, - { - "neither core nor contrib", - Status{Distributions: []string{"foo", "bar"}}, - []string{"bar", "foo"}, - }, - { - "no core, contrib, something else", - Status{Distributions: []string{"foo", "contrib", "bar"}}, - []string{"contrib", "bar", "foo"}, - }, - { - "core, no contrib, something else", - Status{Distributions: []string{"foo", "core", "bar"}}, - []string{"core", "bar", "foo"}, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - assert.Equal(t, test.result, test.s.SortedDistributions()) - }) - } -} diff --git a/cmd/mdatagen/templates/config.go.tmpl b/cmd/mdatagen/templates/config.go.tmpl deleted file mode 100644 index 02f697883345..000000000000 --- a/cmd/mdatagen/templates/config.go.tmpl +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package {{ .Package }} - -{{ if or .Metrics .ResourceAttributes -}} -import "go.opentelemetry.io/collector/confmap" -{{- end }} - -{{ if .Metrics -}} - -// MetricConfig provides common config for a particular metric. -type MetricConfig struct { - Enabled bool `mapstructure:"enabled"` - - enabledSetByUser bool -} - -func (ms *MetricConfig) Unmarshal(parser *confmap.Conf) error { - if parser == nil { - return nil - } - err := parser.Unmarshal(ms, confmap.WithErrorUnused()) - if err != nil { - return err - } - ms.enabledSetByUser = parser.IsSet("enabled") - return nil -} - -// MetricsConfig provides config for {{ .Type }} metrics. -type MetricsConfig struct { - {{- range $name, $metric := .Metrics }} - {{ $name.Render }} MetricConfig `mapstructure:"{{ $name }}"` - {{- end }} -} - -func DefaultMetricsConfig() MetricsConfig { - return MetricsConfig{ - {{- range $name, $metric := .Metrics }} - {{ $name.Render }}: MetricConfig{ - Enabled: {{ $metric.Enabled }}, - }, - {{- end }} - } -} -{{- end }} - -{{ if .ResourceAttributes -}} -// ResourceAttributeConfig provides common config for a particular resource attribute. -type ResourceAttributeConfig struct { - Enabled bool `mapstructure:"enabled"` - - enabledSetByUser bool -} - -func (rac *ResourceAttributeConfig) Unmarshal(parser *confmap.Conf) error { - if parser == nil { - return nil - } - err := parser.Unmarshal(rac, confmap.WithErrorUnused()) - if err != nil { - return err - } - rac.enabledSetByUser = parser.IsSet("enabled") - return nil -} - -// ResourceAttributesConfig provides config for {{ .Type }} resource attributes. -type ResourceAttributesConfig struct { - {{- range $name, $attr := .ResourceAttributes }} - {{ $name.Render }} ResourceAttributeConfig `mapstructure:"{{ $name }}"` - {{- end }} -} - -func DefaultResourceAttributesConfig() ResourceAttributesConfig { - return ResourceAttributesConfig{ - {{- range $name, $attr := .ResourceAttributes }} - {{ $name.Render }}: ResourceAttributeConfig { - Enabled: {{ $attr.Enabled }}, - }, - {{- end }} - } -} -{{- end }} - -{{ if .Metrics -}} -// MetricsBuilderConfig is a configuration for {{ .Type }} metrics builder. -type MetricsBuilderConfig struct { - Metrics MetricsConfig `mapstructure:"metrics"` - {{- if .ResourceAttributes }} - ResourceAttributes ResourceAttributesConfig `mapstructure:"resource_attributes"` - {{- end }} -} - -func DefaultMetricsBuilderConfig() MetricsBuilderConfig { - return MetricsBuilderConfig { - Metrics: DefaultMetricsConfig(), - {{- if .ResourceAttributes }} - ResourceAttributes: DefaultResourceAttributesConfig(), - {{- end }} - } -} -{{- end }} diff --git a/cmd/mdatagen/templates/config_test.go.tmpl b/cmd/mdatagen/templates/config_test.go.tmpl deleted file mode 100644 index 3f6a636bc6ec..000000000000 --- a/cmd/mdatagen/templates/config_test.go.tmpl +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package {{ .Package }} - -import ( - "path/filepath" - "testing" - - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/confmap/confmaptest" -) - -{{ if .Metrics }} -func TestMetricsBuilderConfig(t *testing.T) { - tests := []struct { - name string - want MetricsBuilderConfig - }{ - { - name: "default", - want: DefaultMetricsBuilderConfig(), - }, - { - name: "all_set", - want: MetricsBuilderConfig{ - Metrics: MetricsConfig{ - {{- range $name, $_ := .Metrics }} - {{ $name.Render }}: MetricConfig{Enabled: true}, - {{- end }} - }, - {{- if .ResourceAttributes }} - ResourceAttributes: ResourceAttributesConfig{ - {{- range $name, $_ := .ResourceAttributes }} - {{ $name.Render }}: ResourceAttributeConfig{Enabled: true}, - {{- end }} - }, - {{- end }} - }, - }, - { - name: "none_set", - want: MetricsBuilderConfig{ - Metrics: MetricsConfig{ - {{- range $name, $_ := .Metrics }} - {{ $name.Render }}: MetricConfig{Enabled: false}, - {{- end }} - }, - {{- if .ResourceAttributes }} - ResourceAttributes: ResourceAttributesConfig{ - {{- range $name, $_ := .ResourceAttributes }} - {{ $name.Render }}: ResourceAttributeConfig{Enabled: false}, - {{- end }} - }, - {{- end }} - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - cfg := loadMetricsBuilderConfig(t, tt.name) - if diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(MetricConfig{} - {{- if .ResourceAttributes }}, ResourceAttributeConfig{}{{ end }})); diff != "" { - t.Errorf("Config mismatch (-expected +actual):\n%s", diff) - } - }) - } -} - -func loadMetricsBuilderConfig(t *testing.T, name string) MetricsBuilderConfig { - cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) - require.NoError(t, err) - sub, err := cm.Sub(name) - require.NoError(t, err) - cfg := DefaultMetricsBuilderConfig() - require.NoError(t, component.UnmarshalConfig(sub, &cfg)) - return cfg -} -{{- end }} - -{{ if .ResourceAttributes -}} -func TestResourceAttributesConfig(t *testing.T) { - tests := []struct { - name string - want ResourceAttributesConfig - }{ - { - name: "default", - want: DefaultResourceAttributesConfig(), - }, - { - name: "all_set", - want: ResourceAttributesConfig{ - {{- range $name, $_ := .ResourceAttributes }} - {{ $name.Render }}: ResourceAttributeConfig{Enabled: true}, - {{- end }} - }, - }, - { - name: "none_set", - want: ResourceAttributesConfig{ - {{- range $name, $_ := .ResourceAttributes }} - {{ $name.Render }}: ResourceAttributeConfig{Enabled: false}, - {{- end }} - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - cfg := loadResourceAttributesConfig(t, tt.name) - if diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(ResourceAttributeConfig{})); diff != "" { - t.Errorf("Config mismatch (-expected +actual):\n%s", diff) - } - }) - } -} - -func loadResourceAttributesConfig(t *testing.T, name string) ResourceAttributesConfig { - cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) - require.NoError(t, err) - sub, err := cm.Sub(name) - require.NoError(t, err) - sub, err = sub.Sub("resource_attributes") - require.NoError(t, err) - cfg := DefaultResourceAttributesConfig() - require.NoError(t, component.UnmarshalConfig(sub, &cfg)) - return cfg -} -{{- end }} diff --git a/cmd/mdatagen/templates/documentation.md.tmpl b/cmd/mdatagen/templates/documentation.md.tmpl deleted file mode 100644 index eda8dc9fffe2..000000000000 --- a/cmd/mdatagen/templates/documentation.md.tmpl +++ /dev/null @@ -1,98 +0,0 @@ -{{- define "metric-documenation" -}} -{{- $metricName := . }} -{{- $metric := $metricName | metricInfo -}} - -### {{ $metricName }} - -{{ $metric.Description }} - -{{- if $metric.ExtendedDocumentation }} - -{{ $metric.ExtendedDocumentation }} - -{{- end }} - -| Unit | Metric Type | Value Type |{{ if $metric.Data.HasAggregated }} Aggregation Temporality |{{ end }}{{ if $metric.Data.HasMonotonic }} Monotonic |{{ end }} -| ---- | ----------- | ---------- |{{ if $metric.Data.HasAggregated }} ----------------------- |{{ end }}{{ if $metric.Data.HasMonotonic }} --------- |{{ end }} -| {{ $metric.Unit }} | {{ $metric.Data.Type }} | {{ $metric.Data.MetricValueType }} | -{{- if $metric.Data.HasAggregated }} {{ $metric.Data.AggregationTemporality }} |{{ end }} -{{- if $metric.Data.HasMonotonic }} {{ $metric.Data.Monotonic }} |{{ end }} - -{{- if $metric.Attributes }} - -#### Attributes - -| Name | Description | Values | -| ---- | ----------- | ------ | -{{- range $metric.Attributes }} -{{- $attribute := . | attributeInfo }} -| {{ $attribute.Name }} | {{ $attribute.Description }} | -{{- if $attribute.Enum }} {{ $attribute.Type }}: ``{{ stringsJoin $attribute.Enum "``, ``" }}``{{ else }} Any {{ $attribute.Type }}{{ end }} | -{{- end }} - -{{- end }} - -{{- end -}} - -[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) - -# {{ .Type }} - -{{- if .Parent }} - -**Parent Component:** {{ .Parent }} -{{- end }} - -## Default Metrics - -The following metrics are emitted by default. Each of them can be disabled by applying the following configuration: - -```yaml -metrics: - : - enabled: false -``` - -{{- range $metricName, $metric := .Metrics }} -{{- if $metric.Enabled }} - -{{ template "metric-documenation" $metricName }} - -{{- end }} -{{- end }} - -{{- $optionalMetricSeen := false }} -{{- range $metricName, $metric := .Metrics }} -{{- if not $metric.Enabled }} -{{- if not $optionalMetricSeen }} - -## Optional Metrics - -The following metrics are not emitted by default. Each of them can be enabled by applying the following configuration: - -```yaml -metrics: - : - enabled: true -``` - -{{- end }} -{{- $optionalMetricSeen = true }} - -{{ template "metric-documenation" $metricName }} - -{{- end }} -{{- end }} - -{{- if .ResourceAttributes }} - -## Resource Attributes - -| Name | Description | Values | Enabled | -| ---- | ----------- | ------ | ------- | -{{- range $attributeName, $attribute := .ResourceAttributes }} -| {{ $attributeName }} | {{ $attribute.Description }} | -{{- if $attribute.Enum }} {{ $attribute.Type }}: ``{{ stringsJoin $attribute.Enum "``, ``" }}``{{ else }} Any {{ $attribute.Type }}{{ end }} | {{ $attribute.Enabled }} | -{{- end }} - -{{- end }} diff --git a/cmd/mdatagen/templates/metrics.go.tmpl b/cmd/mdatagen/templates/metrics.go.tmpl deleted file mode 100644 index c76623c40fcc..000000000000 --- a/cmd/mdatagen/templates/metrics.go.tmpl +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package {{ .Package }} - -import ( - {{- if .Metrics | parseImportsRequired }} - "strconv" - "fmt" - {{- end }} - "time" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/pmetric" - "go.opentelemetry.io/collector/receiver" - {{- if .SemConvVersion }} - conventions "go.opentelemetry.io/collector/semconv/v{{ .SemConvVersion }}" - {{- end }} -) - -{{ range $name, $info := .Attributes }} -{{- if $info.Enum -}} -// Attribute{{ $name.Render }} specifies the a value {{ $name }} attribute. -type Attribute{{ $name.Render }} int - -const ( - _ Attribute{{ $name.Render }} = iota - {{- range $info.Enum }} - Attribute{{ $name.Render }}{{ . | publicVar }} - {{- end }} -) - -// String returns the string representation of the Attribute{{ $name.Render }}. -func (av Attribute{{ $name.Render }}) String() string { - switch av { - {{- range $info.Enum }} - case Attribute{{ $name.Render }}{{ . | publicVar }}: - return "{{ . }}" - {{- end }} - } - return "" -} - -// MapAttribute{{ $name.Render }} is a helper map of string to Attribute{{ $name.Render }} attribute value. -var MapAttribute{{ $name.Render }} = map[string]Attribute{{ $name.Render }}{ - {{- range $info.Enum }} - "{{ . }}": Attribute{{ $name.Render }}{{ . | publicVar }}, - {{- end }} -} - -{{ end }} -{{- end }} - -{{ range $name, $metric := .Metrics -}} -type metric{{ $name.Render }} struct { - data pmetric.Metric // data buffer for generated metric. - config MetricConfig // metric config provided by user. - capacity int // max observed number of data points added to the metric. -} - -// init fills {{ $name }} metric with initial data. -func (m *metric{{ $name.Render }}) init() { - m.data.SetName("{{ $name }}") - m.data.SetDescription("{{ $metric.Description }}") - m.data.SetUnit("{{ $metric.Unit }}") - m.data.SetEmpty{{ $metric.Data.Type }}() - {{- if $metric.Data.HasMonotonic }} - m.data.{{ $metric.Data.Type }}().SetIsMonotonic({{ $metric.Data.Monotonic }}) - {{- end }} - {{- if $metric.Data.HasAggregated }} - m.data.{{ $metric.Data.Type }}().SetAggregationTemporality(pmetric.AggregationTemporality{{ $metric.Data.AggregationTemporality }}) - {{- end }} - {{- if $metric.Attributes }} - m.data.{{ $metric.Data.Type }}().DataPoints().EnsureCapacity(m.capacity) - {{- end }} -} - -func (m *metric{{ $name.Render }}) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val {{ $metric.Data.MetricValueType.BasicType }} -{{- range $metric.Attributes -}}, {{ .RenderUnexported }}AttributeValue {{ (attributeInfo .).Type.Primitive }}{{ end }}) { - if !m.config.Enabled { - return - } - dp := m.data.{{ $metric.Data.Type }}().DataPoints().AppendEmpty() - dp.SetStartTimestamp(start) - dp.SetTimestamp(ts) - dp.Set{{ $metric.Data.MetricValueType }}Value(val) - {{- range $metric.Attributes }} - {{- if eq (attributeInfo .).Type.Primitive "[]byte" }} - dp.Attributes().PutEmptyBytes("{{ (attributeInfo .).Name }}").FromRaw({{ .RenderUnexported }}AttributeValue) - {{- else if eq (attributeInfo .).Type.Primitive "[]any" }} - dp.Attributes().PutEmptySlice("{{ (attributeInfo .).Name }}").FromRaw({{ .RenderUnexported }}AttributeValue) - {{- else if eq (attributeInfo .).Type.Primitive "map[string]any" }} - dp.Attributes().PutEmptyMap("{{ (attributeInfo .).Name }}").FromRaw({{ .RenderUnexported }}AttributeValue) - {{- else }} - dp.Attributes().Put{{ (attributeInfo .).Type }}("{{ (attributeInfo .).Name }}", {{ .RenderUnexported }}AttributeValue) - {{- end }} - {{- end }} -} - -// updateCapacity saves max length of data point slices that will be used for the slice capacity. -func (m *metric{{ $name.Render }}) updateCapacity() { - if m.data.{{ $metric.Data.Type }}().DataPoints().Len() > m.capacity { - m.capacity = m.data.{{ $metric.Data.Type }}().DataPoints().Len() - } -} - -// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. -func (m *metric{{ $name.Render }}) emit(metrics pmetric.MetricSlice) { - if m.config.Enabled && m.data.{{ $metric.Data.Type }}().DataPoints().Len() > 0 { - m.updateCapacity() - m.data.MoveTo(metrics.AppendEmpty()) - m.init() - } -} - -func newMetric{{ $name.Render }}(cfg MetricConfig) metric{{ $name.Render }} { - m := metric{{ $name.Render }}{config: cfg} - if cfg.Enabled { - m.data = pmetric.NewMetric() - m.init() - } - return m -} - -{{ end -}} - -// MetricsBuilder provides an interface for scrapers to report metrics while taking care of all the transformations -// required to produce metric representation defined in metadata and user config. -type MetricsBuilder struct { - config MetricsBuilderConfig // config of the metrics builder. - startTime pcommon.Timestamp // start time that will be applied to all recorded data points. - metricsCapacity int // maximum observed number of metrics per resource. - metricsBuffer pmetric.Metrics // accumulates metrics data before emitting. - buildInfo component.BuildInfo // contains version information. - {{- range $name, $metric := .Metrics }} - metric{{ $name.Render }} metric{{ $name.Render }} - {{- end }} -} - -// metricBuilderOption applies changes to default metrics builder. -type metricBuilderOption func(*MetricsBuilder) - -// WithStartTime sets startTime on the metrics builder. -func WithStartTime(startTime pcommon.Timestamp) metricBuilderOption { - return func(mb *MetricsBuilder) { - mb.startTime = startTime - } -} - -func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSettings, options ...metricBuilderOption) *MetricsBuilder { - {{- range $name, $metric := .Metrics }} - {{- if $metric.Warnings.IfEnabled }} - if mbc.Metrics.{{ $name.Render }}.Enabled { - settings.Logger.Warn("[WARNING] `{{ $name }}` should not be enabled: {{ $metric.Warnings.IfEnabled }}") - } - {{- end }} - {{- if $metric.Warnings.IfEnabledNotSet }} - if !mbc.Metrics.{{ $name.Render }}.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `{{ $name }}`: {{ $metric.Warnings.IfEnabledNotSet }}") - } - {{- end }} - {{- if $metric.Warnings.IfConfigured }} - if mbc.Metrics.{{ $name.Render }}.enabledSetByUser { - settings.Logger.Warn("[WARNING] `{{ $name }}` should not be configured: {{ $metric.Warnings.IfConfigured }}") - } - {{- end }} - {{- end }} - {{- range $name, $attr := .ResourceAttributes }} - {{- if $attr.Warnings.IfEnabled }} - if mbc.ResourceAttributes.{{ $name.Render }}.Enabled { - settings.Logger.Warn("[WARNING] `{{ $name }}` should not be enabled: {{ $attr.Warnings.IfEnabled }}") - } - {{- end }} - {{- if $attr.Warnings.IfEnabledNotSet }} - if !mbc.ResourceAttributes.{{ $name.Render }}.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `{{ $name }}`: {{ $attr.Warnings.IfEnabledNotSet }}") - } - {{- end }} - {{- if $attr.Warnings.IfConfigured }} - if mbc.ResourceAttributes.{{ $name.Render }}.enabledSetByUser { - settings.Logger.Warn("[WARNING] `{{ $name }}` should not be configured: {{ $attr.Warnings.IfConfigured }}") - } - {{- end }} - {{- end }} - mb := &MetricsBuilder{ - config: mbc, - startTime: pcommon.NewTimestampFromTime(time.Now()), - metricsBuffer: pmetric.NewMetrics(), - buildInfo: settings.BuildInfo, - {{- range $name, $metric := .Metrics }} - metric{{ $name.Render }}: newMetric{{ $name.Render }}(mbc.Metrics.{{ $name.Render }}), - {{- end }} - } - for _, op := range options { - op(mb) - } - return mb -} - -{{- if .ResourceAttributes }} -// NewResourceBuilder returns a new resource builder that should be used to build a resource associated with for the emitted metrics. -func (mb *MetricsBuilder) NewResourceBuilder() *ResourceBuilder { - return NewResourceBuilder(mb.config.ResourceAttributes) -} -{{- end }} - -// updateCapacity updates max length of metrics and resource attributes that will be used for the slice capacity. -func (mb *MetricsBuilder) updateCapacity(rm pmetric.ResourceMetrics) { - if mb.metricsCapacity < rm.ScopeMetrics().At(0).Metrics().Len() { - mb.metricsCapacity = rm.ScopeMetrics().At(0).Metrics().Len() - } -} - -// ResourceMetricsOption applies changes to provided resource metrics. -type ResourceMetricsOption func(pmetric.ResourceMetrics) - -// WithResource sets the provided resource on the emitted ResourceMetrics. -// It's recommended to use ResourceBuilder to create the resource. -func WithResource(res pcommon.Resource) ResourceMetricsOption { - return func(rm pmetric.ResourceMetrics) { - res.CopyTo(rm.Resource()) - } -} - -// WithStartTimeOverride overrides start time for all the resource metrics data points. -// This option should be only used if different start time has to be set on metrics coming from different resources. -func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption { - return func(rm pmetric.ResourceMetrics) { - var dps pmetric.NumberDataPointSlice - metrics := rm.ScopeMetrics().At(0).Metrics() - for i := 0; i < metrics.Len(); i++ { - switch metrics.At(i).Type() { - case pmetric.MetricTypeGauge: - dps = metrics.At(i).Gauge().DataPoints() - case pmetric.MetricTypeSum: - dps = metrics.At(i).Sum().DataPoints() - } - for j := 0; j < dps.Len(); j++ { - dps.At(j).SetStartTimestamp(start) - } - } - } -} - -// EmitForResource saves all the generated metrics under a new resource and updates the internal state to be ready for -// recording another set of data points as part of another resource. This function can be helpful when one scraper -// needs to emit metrics from several resources. Otherwise calling this function is not required, -// just `Emit` function can be called instead. -// Resource attributes should be provided as ResourceMetricsOption arguments. -func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { - rm := pmetric.NewResourceMetrics() - {{- if .SemConvVersion }} - rm.SetSchemaUrl(conventions.SchemaURL) - {{- end }} - ils := rm.ScopeMetrics().AppendEmpty() - ils.Scope().SetName("{{ .ScopeName }}") - ils.Scope().SetVersion(mb.buildInfo.Version) - ils.Metrics().EnsureCapacity(mb.metricsCapacity) - {{- range $name, $metric := .Metrics }} - mb.metric{{- $name.Render }}.emit(ils.Metrics()) - {{- end }} - - for _, op := range rmo { - op(rm) - } - if ils.Metrics().Len() > 0 { - mb.updateCapacity(rm) - rm.MoveTo(mb.metricsBuffer.ResourceMetrics().AppendEmpty()) - } -} - -// Emit returns all the metrics accumulated by the metrics builder and updates the internal state to be ready for -// recording another set of metrics. This function will be responsible for applying all the transformations required to -// produce metric representation defined in metadata and user config, e.g. delta or cumulative. -func (mb *MetricsBuilder) Emit(rmo ...ResourceMetricsOption) pmetric.Metrics { - mb.EmitForResource(rmo...) - metrics := mb.metricsBuffer - mb.metricsBuffer = pmetric.NewMetrics() - return metrics -} - -{{ range $name, $metric := .Metrics -}} -// Record{{ $name.Render }}DataPoint adds a data point to {{ $name }} metric. -func (mb *MetricsBuilder) Record{{ $name.Render }}DataPoint(ts pcommon.Timestamp - {{- if $metric.Data.HasMetricInputType }}, inputVal {{ $metric.Data.MetricInputType.String }} - {{- else }}, val {{ $metric.Data.MetricValueType.BasicType }} - {{- end }} - {{- range $metric.Attributes -}} - , {{ .RenderUnexported }}AttributeValue {{ if (attributeInfo .).Enum }}Attribute{{ .Render }}{{ else }}{{ (attributeInfo .).Type.Primitive }}{{ end }} - {{- end }}) - {{- if $metric.Data.HasMetricInputType }} error{{ end }} { - {{- if $metric.Data.HasMetricInputType }} - {{- if eq $metric.Data.MetricValueType.BasicType "float64" }} - val, err := strconv.ParseFloat(inputVal, 64) - {{- else if eq $metric.Data.MetricValueType.BasicType "int64" }} - val, err := strconv.ParseInt(inputVal, 10, 64) - {{- end }} - if err != nil { - return fmt.Errorf("failed to parse {{ $metric.Data.MetricValueType.BasicType }} for {{ $name.Render }}, value was %s: %w", inputVal, err) - } - {{- end }} - mb.metric{{ $name.Render }}.recordDataPoint(mb.startTime, ts, val - {{- range $metric.Attributes -}} - , {{ .RenderUnexported }}AttributeValue{{ if (attributeInfo .).Enum }}.String(){{ end }} - {{- end }}) - {{- if $metric.Data.HasMetricInputType }} - return nil - {{- end }} -} -{{ end }} - -// Reset resets metrics builder to its initial state. It should be used when external metrics source is restarted, -// and metrics builder should update its startTime and reset it's internal state accordingly. -func (mb *MetricsBuilder) Reset(options ...metricBuilderOption) { - mb.startTime = pcommon.NewTimestampFromTime(time.Now()) - for _, op := range options { - op(mb) - } -} diff --git a/cmd/mdatagen/templates/metrics_test.go.tmpl b/cmd/mdatagen/templates/metrics_test.go.tmpl deleted file mode 100644 index bf7b09d05a99..000000000000 --- a/cmd/mdatagen/templates/metrics_test.go.tmpl +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package {{ .Package }} - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/pmetric" - "go.opentelemetry.io/collector/receiver/receivertest" - "go.uber.org/zap" - "go.uber.org/zap/zaptest/observer" -) - - -type testConfigCollection int - -const ( - testSetDefault testConfigCollection = iota - testSetAll - testSetNone -) - -func TestMetricsBuilder(t *testing.T) { - tests := []struct { - name string - configSet testConfigCollection - }{ - { - name: "default", - configSet: testSetDefault, - }, - { - name: "all_set", - configSet: testSetAll, - }, - { - name: "none_set", - configSet: testSetNone, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - start := pcommon.Timestamp(1_000_000_000) - ts := pcommon.Timestamp(1_000_001_000) - observedZapCore, observedLogs := observer.New(zap.WarnLevel) - settings := receivertest.NewNopCreateSettings() - settings.Logger = zap.New(observedZapCore) - mb := NewMetricsBuilder(loadMetricsBuilderConfig(t, test.name), settings, WithStartTime(start)) - - expectedWarnings := 0 - {{- range $name, $metric := .Metrics }} - {{- if and $metric.Enabled $metric.Warnings.IfEnabled }} - if test.configSet == testSetDefault || test.configSet == testSetAll { - assert.Equal(t, "[WARNING] `{{ $name }}` should not be enabled: {{ $metric.Warnings.IfEnabled }}", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - {{- end }} - {{- if $metric.Warnings.IfEnabledNotSet }} - if test.configSet == testSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `{{ $name }}`: {{ $metric.Warnings.IfEnabledNotSet }}", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - {{- end }} - {{- if $metric.Warnings.IfConfigured }} - if test.configSet == testSetAll || test.configSet == testSetNone { - assert.Equal(t, "[WARNING] `{{ $name }}` should not be configured: {{ $metric.Warnings.IfConfigured }}", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - {{- end }} - {{- end }} - {{- range $name, $attr := .ResourceAttributes }} - {{- if and $attr.Enabled $attr.Warnings.IfEnabled }} - if test.configSet == testSetDefault || test.configSet == testSetAll { - assert.Equal(t, "[WARNING] `{{ $name }}` should not be enabled: {{ $attr.Warnings.IfEnabled }}", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - {{- end }} - {{- if $attr.Warnings.IfEnabledNotSet }} - if test.configSet == testSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `{{ $name }}`: {{ $attr.Warnings.IfEnabledNotSet }}", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - {{- end }} - {{- if $attr.Warnings.IfConfigured }} - if test.configSet == testSetAll || test.configSet == testSetNone { - assert.Equal(t, "[WARNING] `{{ $name }}` should not be configured: {{ $attr.Warnings.IfConfigured }}", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - {{- end }} - {{- end }} - - - assert.Equal(t, expectedWarnings, observedLogs.Len()) - - defaultMetricsCount := 0 - allMetricsCount := 0 - {{- range $name, $metric := .Metrics }} - - {{ if $metric.Enabled }}defaultMetricsCount++{{ end }} - allMetricsCount++ - mb.Record{{ $name.Render }}DataPoint(ts, {{ if $metric.Data.HasMetricInputType }}"1"{{ else }}1{{ end }} - {{- range $metric.Attributes -}} - , {{ if (attributeInfo .).Enum }}Attribute{{ .Render }}{{ (index (attributeInfo .).Enum 0) | publicVar }}{{ else }}{{ (attributeInfo .).TestValue }}{{ end }} - {{- end }}) - {{- end }} - - {{ if .ResourceAttributes }} - rb := mb.NewResourceBuilder() - {{- range $name, $attr := .ResourceAttributes }} - {{- if $attr.Enum }} - rb.Set{{ $attr.Name.Render }}{{ index $attr.Enum 0 | publicVar }}() - {{- else }} - rb.Set{{ $attr.Name.Render }}({{ $attr.TestValue }}) - {{- end }} - {{- end }} - res := rb.Emit() - {{- else }} - res := pcommon.NewResource() - {{- end }} - metrics := mb.Emit(WithResource(res)) - - if test.configSet == testSetNone { - assert.Equal(t, 0, metrics.ResourceMetrics().Len()) - return - } - - assert.Equal(t, 1, metrics.ResourceMetrics().Len()) - rm := metrics.ResourceMetrics().At(0) - assert.Equal(t, res, rm.Resource()) - assert.Equal(t, 1, rm.ScopeMetrics().Len()) - ms := rm.ScopeMetrics().At(0).Metrics() - if test.configSet == testSetDefault { - assert.Equal(t, defaultMetricsCount, ms.Len()) - } - if test.configSet == testSetAll { - assert.Equal(t, allMetricsCount, ms.Len()) - } - validatedMetrics := make(map[string]bool) - for i := 0; i < ms.Len(); i++ { - switch ms.At(i).Name() { - {{- range $name, $metric := .Metrics }} - case "{{ $name }}": - assert.False(t, validatedMetrics["{{ $name }}"], "Found a duplicate in the metrics slice: {{ $name }}") - validatedMetrics["{{ $name }}"] = true - assert.Equal(t, pmetric.MetricType{{ $metric.Data.Type }}, ms.At(i).Type()) - assert.Equal(t, 1, ms.At(i).{{ $metric.Data.Type }}().DataPoints().Len()) - assert.Equal(t, "{{ $metric.Description }}", ms.At(i).Description()) - assert.Equal(t, "{{ $metric.Unit }}", ms.At(i).Unit()) - {{- if $metric.Data.HasMonotonic }} - assert.Equal(t, {{ $metric.Data.Monotonic }}, ms.At(i).{{ $metric.Data.Type }}().IsMonotonic()) - {{- end }} - {{- if $metric.Data.HasAggregated }} - assert.Equal(t, pmetric.AggregationTemporality{{ $metric.Data.AggregationTemporality }}, ms.At(i).{{ $metric.Data.Type }}().AggregationTemporality()) - {{- end }} - dp := ms.At(i).{{ $metric.Data.Type }}().DataPoints().At(0) - assert.Equal(t, start, dp.StartTimestamp()) - assert.Equal(t, ts, dp.Timestamp()) - assert.Equal(t, pmetric.NumberDataPointValueType{{ $metric.Data.MetricValueType }}, dp.ValueType()) - assert.Equal(t, {{ $metric.Data.MetricValueType.BasicType }}(1), dp.{{ $metric.Data.MetricValueType }}Value()) - - {{- range $i, $attr := $metric.Attributes }} - attrVal, ok {{ if eq $i 0 }}:{{ end }}= dp.Attributes().Get("{{ (attributeInfo $attr).Name }}") - assert.True(t, ok) - assert.EqualValues(t, {{ (attributeInfo $attr).TestValue }}, attrVal.{{ (attributeInfo $attr).Type }}() - {{- if or (eq (attributeInfo $attr).Type.String "Slice") (eq (attributeInfo $attr).Type.String "Map")}}.AsRaw(){{ end }}) - {{- end }} - {{- end }} - } - } - }) - } -} diff --git a/cmd/mdatagen/templates/readme.md.tmpl b/cmd/mdatagen/templates/readme.md.tmpl deleted file mode 100644 index 364d3ad484d4..000000000000 --- a/cmd/mdatagen/templates/readme.md.tmpl +++ /dev/null @@ -1,55 +0,0 @@ - -{{- if len .Status.Stability }} -| Status | | -| ------------- |-----------| -{{- $class := .Status.Class }} -{{- $shortName := .ShortFolderName }} -{{- if ne $class "connector" }} -{{- $idx := 0 }} -{{- range $stability, $value := .Status.Stability }} -| {{ if not $idx }}Stability{{ else }} {{ end }} | [{{ $stability }}]{{ if ne $class "extension" }}: {{ stringsJoin $value ", " }} {{ end }} | -{{- $idx = inc $idx }} -{{- end }} -{{- end}} -{{- if and (ne $class "cmd") (ne $class "pkg") }} -| Distributions | [{{ stringsJoin .Status.SortedDistributions "], [" }}] | -{{- end }} -{{- if .Status.Warnings }} -| Warnings | [{{ stringsJoin .Status.Warnings ", " }}](#warnings) | -{{- end }} -{{- if ne $class "" }} -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3A{{ $class }}%2F{{ $shortName }}%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3A{{ $class }}%2F{{ $shortName }}) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3A{{ $class }}%2F{{ $shortName }}%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3A{{ $class }}%2F{{ $shortName }}) | -{{- end }} -{{- if .Status.Codeowners }} -{{- $codeowners := userLinks .Status.Codeowners.Active }} -{{- $emeritus := userLinks .Status.Codeowners.Emeritus }} -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | {{ stringsJoin $codeowners ", " }} | -{{- if $emeritus }} -| Emeritus | {{ stringsJoin $emeritus ", " }} | -{{- end }} -{{- end }} -{{range $stability, $val := .Status.Stability}} -[{{ $stability }}]: https://github.com/open-telemetry/opentelemetry-collector#{{ $stability }} -{{- end }} -{{- range .Status.SortedDistributions }} -[{{.}}]: {{ distroURL . }} -{{- end }} -{{- if eq $class "connector"}} - -## Supported Pipeline Types - -| [Exporter Pipeline Type] | [Receiver Pipeline Type] | [Stability Level] | -| ------------------------ | ------------------------ | ----------------- | -{{- range $stability, $pipelines := .Status.Stability }} -{{- range $pipeline := $pipelines }} -{{- $parts := stringsSplit $pipeline "_to_" }} -| {{index $parts 0}} | {{index $parts 1}} | [{{$stability}}] | -{{- end }} -{{- end }} - -[Exporter Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#exporter-pipeline-type -[Receiver Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#receiver-pipeline-type -[Stability Level]: https://github.com/open-telemetry/opentelemetry-collector#stability-levels -{{- end }} -{{- end }} - \ No newline at end of file diff --git a/cmd/mdatagen/templates/resource.go.tmpl b/cmd/mdatagen/templates/resource.go.tmpl deleted file mode 100644 index aa6b8e8b685b..000000000000 --- a/cmd/mdatagen/templates/resource.go.tmpl +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package {{ .Package }} - -import ( - "go.opentelemetry.io/collector/pdata/pcommon" -) - -// ResourceBuilder is a helper struct to build resources predefined in metadata.yaml. -// The ResourceBuilder is not thread-safe and must not to be used in multiple goroutines. -type ResourceBuilder struct { - config ResourceAttributesConfig - res pcommon.Resource -} - -// NewResourceBuilder creates a new ResourceBuilder. This method should be called on the start of the application. -func NewResourceBuilder(rac ResourceAttributesConfig) *ResourceBuilder { - return &ResourceBuilder{ - config: rac, - res: pcommon.NewResource(), - } -} - -{{- range $name, $attr := .ResourceAttributes }} -{{- range $attr.Enum }} -// Set{{ $name.Render }}{{ . | publicVar }} sets "{{ $name }}={{ . }}" attribute. -func (rb *ResourceBuilder) Set{{ $name.Render }}{{ . | publicVar }}() { - if rb.config.{{ $name.Render }}.Enabled { - rb.res.Attributes().PutStr("{{ $name }}", "{{ . }}") - } -} -{{- else }} -// Set{{ $name.Render }} sets provided value as "{{ $name }}" attribute. -func (rb *ResourceBuilder) Set{{ $name.Render }}(val {{ $attr.Type.Primitive }}) { - if rb.config.{{ $name.Render }}.Enabled { - {{- if or (eq $attr.Type.String "Bytes") (eq $attr.Type.String "Slice") (eq $attr.Type.String "Map") }} - rb.res.Attributes().PutEmpty{{ $attr.Type }}("{{ $name }}").FromRaw(val) - {{- else }} - rb.res.Attributes().Put{{ $attr.Type }}("{{ $name }}", val) - {{- end }} - } -} -{{- end }} -{{ end }} - -// Emit returns the built resource and resets the internal builder state. -func (rb *ResourceBuilder) Emit() pcommon.Resource { - r := rb.res - rb.res = pcommon.NewResource() - return r -} diff --git a/cmd/mdatagen/templates/resource_test.go.tmpl b/cmd/mdatagen/templates/resource_test.go.tmpl deleted file mode 100644 index 7c1422e3d3bf..000000000000 --- a/cmd/mdatagen/templates/resource_test.go.tmpl +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package {{ .Package }} - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -{{- $enabledAttrCount := 0 }} -{{- range $_, $attr := .ResourceAttributes }} -{{- if $attr.Enabled }} -{{- $enabledAttrCount = inc $enabledAttrCount }} -{{- end }} -{{- end }} - -func TestResourceBuilder(t *testing.T) { - for _, test := range []string{"default", "all_set", "none_set"} { - t.Run(test, func(t *testing.T) { - cfg := loadResourceAttributesConfig(t, test) - rb := NewResourceBuilder(cfg) - {{- range $name, $attr := .ResourceAttributes }} - {{- if $attr.Enum }} - rb.Set{{ $name.Render }}{{ index $attr.Enum 0 | publicVar }}() - {{- else }} - rb.Set{{ $name.Render }}({{ $attr.TestValue }}) - {{- end }} - {{- end }} - - res := rb.Emit() - assert.Equal(t, 0, rb.Emit().Attributes().Len()) // Second call should return empty Resource - - switch test { - case "default": - assert.Equal(t, {{ $enabledAttrCount }}, res.Attributes().Len()) - case "all_set": - assert.Equal(t, {{ len .ResourceAttributes }}, res.Attributes().Len()) - case "none_set": - assert.Equal(t, 0, res.Attributes().Len()) - return - default: - assert.Failf(t, "unexpected test case: %s", test) - } - - {{ $assignSign := ":=" }} - {{- range $name, $attr := .ResourceAttributes }} - val, ok {{ $assignSign }} res.Attributes().Get("{{ $name }}") - {{- if $attr.Enabled }} - assert.True(t, ok) - {{- else }} - assert.Equal(t, test == "all_set", ok) - {{- end }} - if ok { - assert.EqualValues(t, {{ $attr.TestValue }}, val.{{ $attr.Type }}() - {{- if or (eq $attr.Type.String "Bytes") (eq $attr.Type.String "Slice") (eq $attr.Type.String "Map") -}} - .AsRaw() - {{- end -}} - ) - } - {{- $assignSign = "=" }} - {{- end }} - }) - } -} diff --git a/cmd/mdatagen/templates/status.go.tmpl b/cmd/mdatagen/templates/status.go.tmpl deleted file mode 100644 index b9384570b8e6..000000000000 --- a/cmd/mdatagen/templates/status.go.tmpl +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package {{ .Package }} - -{{- if .Status.Stability }} -import ( - "go.opentelemetry.io/collector/component" -) -{{- end }} - -const ( - Type = "{{ .Type }}" - {{- range $stability, $signals := .Status.Stability }} - {{- range $signal := $signals }} - {{ toCamelCase $signal }}Stability = component.StabilityLevel{{ casesTitle $stability }} - {{- end }} - {{- end }} -) \ No newline at end of file diff --git a/cmd/mdatagen/templates/testdata/config.yaml.tmpl b/cmd/mdatagen/templates/testdata/config.yaml.tmpl deleted file mode 100644 index 8b32773ec45e..000000000000 --- a/cmd/mdatagen/templates/testdata/config.yaml.tmpl +++ /dev/null @@ -1,31 +0,0 @@ -default: -all_set: - {{- if .Metrics }} - metrics: - {{- range $name, $_ := .Metrics }} - {{ $name }}: - enabled: true - {{- end }} - {{- end }} - {{- if .ResourceAttributes }} - resource_attributes: - {{- range $name, $_ := .ResourceAttributes }} - {{ $name }}: - enabled: true - {{- end }} - {{- end }} -none_set: - {{- if .Metrics }} - metrics: - {{- range $name, $_ := .Metrics }} - {{ $name }}: - enabled: false - {{- end }} - {{- end }} - {{- if .ResourceAttributes }} - resource_attributes: - {{- range $name, $_ := .ResourceAttributes }} - {{ $name }}: - enabled: false - {{- end }} - {{- end }} diff --git a/cmd/mdatagen/testdata/invalid.yaml b/cmd/mdatagen/testdata/invalid.yaml deleted file mode 100644 index e466dcbd8e8f..000000000000 --- a/cmd/mdatagen/testdata/invalid.yaml +++ /dev/null @@ -1 +0,0 @@ -invalid \ No newline at end of file diff --git a/cmd/mdatagen/testdata/invalid_aggregation.yaml b/cmd/mdatagen/testdata/invalid_aggregation.yaml deleted file mode 100644 index 3165d1a71012..000000000000 --- a/cmd/mdatagen/testdata/invalid_aggregation.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: metricreceiver - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - distributions: [contrib] - warnings: - - Any additional information that should be brought to the consumer's attention - -metrics: - default.metric: - enabled: true - description: Monotonic cumulative sum int metric enabled by default. - extended_documentation: The metric will be become optional soon. - unit: s - sum: - value_type: int - monotonic: true - aggregation_temporality: invalidaggregation diff --git a/cmd/mdatagen/testdata/invalid_class.yaml b/cmd/mdatagen/testdata/invalid_class.yaml deleted file mode 100644 index 6fcd9b9d7e76..000000000000 --- a/cmd/mdatagen/testdata/invalid_class.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: test - -status: - class: incorrectclass - stability: - development: [logs] - beta: [traces] - stable: [metrics] \ No newline at end of file diff --git a/cmd/mdatagen/testdata/invalid_input_type.yaml b/cmd/mdatagen/testdata/invalid_input_type.yaml deleted file mode 100644 index 9e28b42120d0..000000000000 --- a/cmd/mdatagen/testdata/invalid_input_type.yaml +++ /dev/null @@ -1,20 +0,0 @@ -type: metricreceiver - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - -metrics: - system.cpu.time: - enabled: true - description: Total CPU seconds broken down by different states. - unit: s - sum: - value_type: double - monotonic: true - aggregation_temporality: cumulative - input_type: double - attributes: diff --git a/cmd/mdatagen/testdata/invalid_stability.yaml b/cmd/mdatagen/testdata/invalid_stability.yaml deleted file mode 100644 index 259aade2445a..000000000000 --- a/cmd/mdatagen/testdata/invalid_stability.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: file -status: - class: receiver - stability: - incorrectstability: [logs] - beta: [traces] - stable: [metrics] \ No newline at end of file diff --git a/cmd/mdatagen/testdata/invalid_stability_component.yaml b/cmd/mdatagen/testdata/invalid_stability_component.yaml deleted file mode 100644 index 5aa538865fa4..000000000000 --- a/cmd/mdatagen/testdata/invalid_stability_component.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: file -status: - class: receiver - stability: - development: [incorrectcomponent] - beta: [traces] - stable: [metrics] \ No newline at end of file diff --git a/cmd/mdatagen/testdata/invalid_type_attr.yaml b/cmd/mdatagen/testdata/invalid_type_attr.yaml deleted file mode 100644 index ed951be6d6db..000000000000 --- a/cmd/mdatagen/testdata/invalid_type_attr.yaml +++ /dev/null @@ -1,24 +0,0 @@ -type: metricreceiver - -sem_conv_version: 1.9.0 - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - -attributes: - used_attr: - description: Used attribute. - type: invalidtype - -metrics: - metric: - enabled: true - description: Metric. - unit: 1 - gauge: - value_type: double - attributes: [used_attr] diff --git a/cmd/mdatagen/testdata/invalid_type_rattr.yaml b/cmd/mdatagen/testdata/invalid_type_rattr.yaml deleted file mode 100644 index 90e9c33dae3e..000000000000 --- a/cmd/mdatagen/testdata/invalid_type_rattr.yaml +++ /dev/null @@ -1,19 +0,0 @@ -type: file - -sem_conv_version: 1.9.0 - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - distributions: [contrib] - warnings: - - Any additional information that should be brought to the consumer's attention - -resource_attributes: - string.resource.attr: - description: Resource attribute with any string value. - type: invalidtype - enabled: true diff --git a/cmd/mdatagen/testdata/metrics_and_type.yaml b/cmd/mdatagen/testdata/metrics_and_type.yaml deleted file mode 100644 index 81d66bde9c13..000000000000 --- a/cmd/mdatagen/testdata/metrics_and_type.yaml +++ /dev/null @@ -1,19 +0,0 @@ -type: metricreceiver - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - distributions: [contrib] - warnings: - - Any additional information that should be brought to the consumer's attention - -metrics: - metric: - enabled: true - description: Description. - unit: s - gauge: - value_type: double diff --git a/cmd/mdatagen/testdata/no_aggregation.yaml b/cmd/mdatagen/testdata/no_aggregation.yaml deleted file mode 100644 index 02c14b6b1e70..000000000000 --- a/cmd/mdatagen/testdata/no_aggregation.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: file - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - distributions: [contrib] - warnings: - - Any additional information that should be brought to the consumer's attention - - -metrics: - default.metric: - enabled: true - description: Monotonic cumulative sum int metric enabled by default. - extended_documentation: The metric will be become optional soon. - unit: s - sum: - value_type: int - monotonic: false \ No newline at end of file diff --git a/cmd/mdatagen/testdata/no_class.yaml b/cmd/mdatagen/testdata/no_class.yaml deleted file mode 100644 index 8d33f9c019a1..000000000000 --- a/cmd/mdatagen/testdata/no_class.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: test - -status: - stability: - development: [logs] - beta: [traces] - stable: [metrics] \ No newline at end of file diff --git a/cmd/mdatagen/testdata/no_description_attr.yaml b/cmd/mdatagen/testdata/no_description_attr.yaml deleted file mode 100644 index 1942f74e1110..000000000000 --- a/cmd/mdatagen/testdata/no_description_attr.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Sample metric metadata file with all available configurations. - -type: file - -sem_conv_version: 1.9.0 - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - distributions: [contrib] - warnings: - - Any additional information that should be brought to the consumer's attention - -attributes: - string_attr: - type: string - -metrics: - default.metric: - enabled: true - description: Monotonic cumulative sum int metric enabled by default. - extended_documentation: The metric will be become optional soon. - unit: s - sum: - value_type: int - monotonic: true - aggregation_temporality: cumulative - attributes: [string_attr] - warnings: - if_enabled_not_set: This metric will be disabled by default soon. diff --git a/cmd/mdatagen/testdata/no_description_rattr.yaml b/cmd/mdatagen/testdata/no_description_rattr.yaml deleted file mode 100644 index d489eaa7cb68..000000000000 --- a/cmd/mdatagen/testdata/no_description_rattr.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: file -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - -resource_attributes: - string.resource.attr: - type: string - enabled: true diff --git a/cmd/mdatagen/testdata/no_enabled.yaml b/cmd/mdatagen/testdata/no_enabled.yaml deleted file mode 100644 index ab1dfafed32e..000000000000 --- a/cmd/mdatagen/testdata/no_enabled.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: metricreceiver - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - -metrics: - system.cpu.time: - description: Total CPU seconds broken down by different states. - unit: s - sum: - value_type: double - monotonic: true - aggregation_temporality: cumulative - attributes: diff --git a/cmd/mdatagen/testdata/no_metric_description.yaml b/cmd/mdatagen/testdata/no_metric_description.yaml deleted file mode 100644 index de9cbd420872..000000000000 --- a/cmd/mdatagen/testdata/no_metric_description.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: file - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - distributions: [contrib] - warnings: - - Any additional information that should be brought to the consumer's attention - - -metrics: - default.metric: - enabled: true - extended_documentation: The metric will be become optional soon. - unit: s - sum: - value_type: int - monotonic: true - aggregation_temporality: cumulative diff --git a/cmd/mdatagen/testdata/no_metric_type.yaml b/cmd/mdatagen/testdata/no_metric_type.yaml deleted file mode 100644 index 1f0e0283f2a1..000000000000 --- a/cmd/mdatagen/testdata/no_metric_type.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: metricreceiver -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] -metrics: - system.cpu.time: - enabled: true - description: Total CPU seconds broken down by different states. - unit: s - attributes: diff --git a/cmd/mdatagen/testdata/no_metric_unit.yaml b/cmd/mdatagen/testdata/no_metric_unit.yaml deleted file mode 100644 index cc5c49a7c9a2..000000000000 --- a/cmd/mdatagen/testdata/no_metric_unit.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: file - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - distributions: [contrib] - warnings: - - Any additional information that should be brought to the consumer's attention - - -metrics: - default.metric: - enabled: true - description: Monotonic cumulative sum int metric enabled by default. - extended_documentation: The metric will be become optional soon. - sum: - value_type: int - monotonic: true - aggregation_temporality: cumulative diff --git a/cmd/mdatagen/testdata/no_monotonic.yaml b/cmd/mdatagen/testdata/no_monotonic.yaml deleted file mode 100644 index 2f99cecab58a..000000000000 --- a/cmd/mdatagen/testdata/no_monotonic.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: file - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - distributions: [contrib] - warnings: - - Any additional information that should be brought to the consumer's attention - - -metrics: - default.metric: - enabled: true - description: Monotonic cumulative sum int metric enabled by default. - extended_documentation: The metric will be become optional soon. - unit: s - sum: - value_type: int - aggregation_temporality: cumulative diff --git a/cmd/mdatagen/testdata/no_stability.yaml b/cmd/mdatagen/testdata/no_stability.yaml deleted file mode 100644 index 29b00be6ffa6..000000000000 --- a/cmd/mdatagen/testdata/no_stability.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: test - -status: - class: receiver \ No newline at end of file diff --git a/cmd/mdatagen/testdata/no_stability_component.yaml b/cmd/mdatagen/testdata/no_stability_component.yaml deleted file mode 100644 index 9c0631e8bec4..000000000000 --- a/cmd/mdatagen/testdata/no_stability_component.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: file -status: - class: receiver - stability: - beta: - stable: [metrics] \ No newline at end of file diff --git a/cmd/mdatagen/testdata/no_status.yaml b/cmd/mdatagen/testdata/no_status.yaml deleted file mode 100644 index 75db25c3b05d..000000000000 --- a/cmd/mdatagen/testdata/no_status.yaml +++ /dev/null @@ -1 +0,0 @@ -type: test \ No newline at end of file diff --git a/cmd/mdatagen/testdata/no_type.yaml b/cmd/mdatagen/testdata/no_type.yaml deleted file mode 100644 index 72d92e5dee84..000000000000 --- a/cmd/mdatagen/testdata/no_type.yaml +++ /dev/null @@ -1,6 +0,0 @@ -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] \ No newline at end of file diff --git a/cmd/mdatagen/testdata/no_type_attr.yaml b/cmd/mdatagen/testdata/no_type_attr.yaml deleted file mode 100644 index 914a9820bdaa..000000000000 --- a/cmd/mdatagen/testdata/no_type_attr.yaml +++ /dev/null @@ -1,23 +0,0 @@ -type: metricreceiver - -sem_conv_version: 1.9.0 - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - -attributes: - used_attr: - description: Used attribute. - -metrics: - metric: - enabled: true - description: Metric. - unit: 1 - gauge: - value_type: double - attributes: [used_attr] diff --git a/cmd/mdatagen/testdata/no_type_rattr.yaml b/cmd/mdatagen/testdata/no_type_rattr.yaml deleted file mode 100644 index e6961b1801e7..000000000000 --- a/cmd/mdatagen/testdata/no_type_rattr.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: file - -sem_conv_version: 1.9.0 - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - distributions: [contrib] - warnings: - - Any additional information that should be brought to the consumer's attention - -resource_attributes: - string.resource.attr: - description: Resource attribute with any string value. - enabled: true \ No newline at end of file diff --git a/cmd/mdatagen/testdata/no_value_type.yaml b/cmd/mdatagen/testdata/no_value_type.yaml deleted file mode 100644 index 046f457b510b..000000000000 --- a/cmd/mdatagen/testdata/no_value_type.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: metricreceiver - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - distributions: [contrib] - warnings: - - Any additional information that should be brought to the consumer's attention - - -metrics: - system.cpu.time: - enabled: true - description: Total CPU seconds broken down by different states. - unit: s - sum: - monotonic: true - aggregation_temporality: cumulative - attributes: diff --git a/cmd/mdatagen/testdata/parent.yaml b/cmd/mdatagen/testdata/parent.yaml deleted file mode 100644 index 1f8fc15ba176..000000000000 --- a/cmd/mdatagen/testdata/parent.yaml +++ /dev/null @@ -1,3 +0,0 @@ -type: subcomponent - -parent: parentComponent \ No newline at end of file diff --git a/cmd/mdatagen/testdata/readme_with_cmd_class.md b/cmd/mdatagen/testdata/readme_with_cmd_class.md deleted file mode 100644 index 71a8ad7598c6..000000000000 --- a/cmd/mdatagen/testdata/readme_with_cmd_class.md +++ /dev/null @@ -1,14 +0,0 @@ -# Some component - - -| Status | | -| ------------- |-----------| -| Stability | [alpha]: logs | -| | [beta]: metrics | -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Acmd%2Ffoo%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Acmd%2Ffoo) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Acmd%2Ffoo%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Acmd%2Ffoo) | - -[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta - - -Some info about a component diff --git a/cmd/mdatagen/testdata/readme_with_multiple_signals.md b/cmd/mdatagen/testdata/readme_with_multiple_signals.md deleted file mode 100644 index 8de1ed6221af..000000000000 --- a/cmd/mdatagen/testdata/readme_with_multiple_signals.md +++ /dev/null @@ -1,15 +0,0 @@ -# Some component - - -| Status | | -| ------------- |-----------| -| Stability | [alpha]: logs | -| | [beta]: metrics | -| Distributions | [contrib] | - -[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib - - -Some info about a component diff --git a/cmd/mdatagen/testdata/readme_with_status.md b/cmd/mdatagen/testdata/readme_with_status.md deleted file mode 100644 index 92e0b1f42580..000000000000 --- a/cmd/mdatagen/testdata/readme_with_status.md +++ /dev/null @@ -1,14 +0,0 @@ -# Some component - - -| Status | | -| ------------- |-----------| -| Stability | [beta]: metrics | -| Distributions | [contrib] | -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Ffoo%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Ffoo) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Ffoo%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Ffoo) | - -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib - - -Some info about a component diff --git a/cmd/mdatagen/testdata/readme_with_status_codeowners.md b/cmd/mdatagen/testdata/readme_with_status_codeowners.md deleted file mode 100644 index f350b5933603..000000000000 --- a/cmd/mdatagen/testdata/readme_with_status_codeowners.md +++ /dev/null @@ -1,15 +0,0 @@ -# Some component - - -| Status | | -| ------------- |-----------| -| Stability | [beta]: metrics | -| Distributions | [contrib] | -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Ffoo%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Ffoo) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Ffoo%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Ffoo) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@foo](https://www.github.com/foo) | - -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib - - -Some info about a component diff --git a/cmd/mdatagen/testdata/readme_with_status_codeowners_and_emeritus.md b/cmd/mdatagen/testdata/readme_with_status_codeowners_and_emeritus.md deleted file mode 100644 index 203de2f3dd0c..000000000000 --- a/cmd/mdatagen/testdata/readme_with_status_codeowners_and_emeritus.md +++ /dev/null @@ -1,16 +0,0 @@ -# Some component - - -| Status | | -| ------------- |-----------| -| Stability | [beta]: metrics | -| Distributions | [contrib] | -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Ffoo%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Ffoo) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Ffoo%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Ffoo) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@foo](https://www.github.com/foo) | -| Emeritus | [@bar](https://www.github.com/bar) | - -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib - - -Some info about a component diff --git a/cmd/mdatagen/testdata/readme_with_status_extension.md b/cmd/mdatagen/testdata/readme_with_status_extension.md deleted file mode 100644 index 1c454afe9a93..000000000000 --- a/cmd/mdatagen/testdata/readme_with_status_extension.md +++ /dev/null @@ -1,14 +0,0 @@ -# Some component - - -| Status | | -| ------------- |-----------| -| Stability | [beta] | -| Distributions | [contrib] | -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Ffoo%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Ffoo) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Ffoo%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Ffoo) | - -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib - - -Some info about a component diff --git a/cmd/mdatagen/testdata/readme_with_warnings.md b/cmd/mdatagen/testdata/readme_with_warnings.md deleted file mode 100644 index 6cf1afa3866c..000000000000 --- a/cmd/mdatagen/testdata/readme_with_warnings.md +++ /dev/null @@ -1,16 +0,0 @@ -# Some component - - -| Status | | -| ------------- |-----------| -| Stability | [beta]: metrics | -| Distributions | [contrib] | -| Warnings | [warning1](#warnings) | - -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib - - -Some info about a component -### warnings -Some warning there. diff --git a/cmd/mdatagen/testdata/readme_without_status.md b/cmd/mdatagen/testdata/readme_without_status.md deleted file mode 100644 index be610f8c087f..000000000000 --- a/cmd/mdatagen/testdata/readme_without_status.md +++ /dev/null @@ -1,3 +0,0 @@ -# Some component - -Some info about a component diff --git a/cmd/mdatagen/testdata/resource_attributes_only.yaml b/cmd/mdatagen/testdata/resource_attributes_only.yaml deleted file mode 100644 index 05e031bcf455..000000000000 --- a/cmd/mdatagen/testdata/resource_attributes_only.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: test - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - distributions: [contrib] - warnings: - - Any additional information that should be brought to the consumer's attention - -resource_attributes: - res.attr1: - description: Resource attribute 1. - type: string - enabled: true diff --git a/cmd/mdatagen/testdata/status_only.yaml b/cmd/mdatagen/testdata/status_only.yaml deleted file mode 100644 index 2365b43f1d95..000000000000 --- a/cmd/mdatagen/testdata/status_only.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: metricreceiver -status: - class: exporter - stability: - beta: [traces, metrics, logs] - distributions: [contrib] diff --git a/cmd/mdatagen/testdata/two_metric_types.yaml b/cmd/mdatagen/testdata/two_metric_types.yaml deleted file mode 100644 index 572eab2f3bcb..000000000000 --- a/cmd/mdatagen/testdata/two_metric_types.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: metricreceiver - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - -metrics: - system.cpu.time: - enabled: true - description: Total CPU seconds broken down by different states. - unit: s - gauge: - value_type: double - sum: - value_type: double - monotonic: true - aggregation_temporality: cumulative - attributes: diff --git a/cmd/mdatagen/testdata/unknown_metric_attribute.yaml b/cmd/mdatagen/testdata/unknown_metric_attribute.yaml deleted file mode 100644 index d86b5afe4011..000000000000 --- a/cmd/mdatagen/testdata/unknown_metric_attribute.yaml +++ /dev/null @@ -1,19 +0,0 @@ -type: metricreceiver - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - -metrics: - system.cpu.time: - enabled: true - description: Total CPU seconds broken down by different states. - unit: s - sum: - value_type: double - monotonic: true - aggregation_temporality: cumulative - attributes: [missing] diff --git a/cmd/mdatagen/testdata/unknown_value_type.yaml b/cmd/mdatagen/testdata/unknown_value_type.yaml deleted file mode 100644 index 1a4890045d8e..000000000000 --- a/cmd/mdatagen/testdata/unknown_value_type.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: metricreceiver - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - -metrics: - system.cpu.time: - enabled: true - description: Total CPU seconds broken down by different states. - unit: s - sum: - value_type: unknown - monotonic: true - aggregation_temporality: cumulative diff --git a/cmd/mdatagen/testdata/unused_attribute.yaml b/cmd/mdatagen/testdata/unused_attribute.yaml deleted file mode 100644 index cc0eb08f7671..000000000000 --- a/cmd/mdatagen/testdata/unused_attribute.yaml +++ /dev/null @@ -1,29 +0,0 @@ -type: metricreceiver - -sem_conv_version: 1.9.0 - -status: - class: receiver - stability: - development: [logs] - beta: [traces] - stable: [metrics] - -attributes: - used_attr: - description: Used attribute. - type: string - - unused_attr: - name_override: state - description: Unused attribute. - type: string - -metrics: - metric: - enabled: true - description: Metric. - unit: 1 - gauge: - value_type: double - attributes: [used_attr] diff --git a/cmd/mdatagen/third_party/golint/LICENSE b/cmd/mdatagen/third_party/golint/LICENSE deleted file mode 100644 index 65d761bc9f28..000000000000 --- a/cmd/mdatagen/third_party/golint/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/cmd/mdatagen/third_party/golint/golint.go b/cmd/mdatagen/third_party/golint/golint.go deleted file mode 100644 index f4898aaebd5b..000000000000 --- a/cmd/mdatagen/third_party/golint/golint.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2013 The Go Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd. - -package golint - -// See https://github.com/golang/lint/blob/d0100b6bd8b389f0385611eb39152c4d7c3a7905/lint.go#L771 - -// Acronyms is a list of known acronyms that should not be formatted when linting. -var Acronyms = map[string]bool{ - "ACL": true, - "API": true, - "ASCII": true, - "CPU": true, - "CSS": true, - "DNS": true, - "EOF": true, - "GUID": true, - "HTML": true, - "HTTP": true, - "HTTPS": true, - "ID": true, - "IP": true, - "JSON": true, - "LHS": true, - "QPS": true, - "RAM": true, - "RHS": true, - "RPC": true, - "SLA": true, - "SMTP": true, - "SQL": true, - "SSH": true, - "TCP": true, - "TLS": true, - "TTL": true, - "UDP": true, - "UI": true, - "UID": true, - "UUID": true, - "URI": true, - "URL": true, - "UTF8": true, - "VM": true, - "XML": true, - "XMPP": true, - "XSRF": true, - "XSS": true, -} diff --git a/cmd/mdatagen/validate.go b/cmd/mdatagen/validate.go deleted file mode 100644 index 75c61f730406..000000000000 --- a/cmd/mdatagen/validate.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "errors" - "fmt" - - "go.opentelemetry.io/collector/pdata/pcommon" - "go.uber.org/multierr" -) - -func (md *metadata) Validate() error { - var errs error - if err := md.validateType(); err != nil { - errs = multierr.Append(errs, err) - } - if err := md.validateStatus(); err != nil { - errs = multierr.Append(errs, err) - } - if err := md.validateResourceAttributes(); err != nil { - errs = multierr.Append(errs, err) - } - if err := md.validateMetrics(); err != nil { - errs = multierr.Append(errs, err) - } - return errs -} - -func (md *metadata) validateType() error { - if md.Type == "" { - return errors.New("missing type") - } - return nil -} - -func (md *metadata) validateStatus() error { - if md.Parent != "" && md.Status == nil { - // status is not required for subcomponents. - return nil - } - - var errs error - if md.Status == nil { - return errors.New("missing status") - } - if err := md.Status.validateClass(); err != nil { - errs = multierr.Append(errs, err) - } - if md.Parent == "" { - if err := md.Status.validateStability(); err != nil { - errs = multierr.Append(errs, err) - } - } - return errs -} - -func (s *Status) validateClass() error { - if s.Class == "" { - return errors.New("missing class") - } - if s.Class != "receiver" && s.Class != "processor" && s.Class != "exporter" && s.Class != "connector" && s.Class != "extension" && s.Class != "cmd" && s.Class != "pkg" { - return fmt.Errorf("invalid class: %v", s.Class) - } - return nil -} - -func (s *Status) validateStability() error { - var errs error - if len(s.Stability) == 0 { - return errors.New("missing stability") - } - for stability, component := range s.Stability { - if stability != "development" && stability != "alpha" && stability != "beta" && stability != "stable" && stability != "deprecated" && stability != "unmaintained" { - errs = multierr.Append(errs, fmt.Errorf("invalid stability: %v", stability)) - } - if component == nil { - errs = multierr.Append(errs, fmt.Errorf("missing component for stability: %v", stability)) - } - for _, c := range component { - if c != "metrics" && - c != "traces" && - c != "logs" && - c != "traces_to_traces" && - c != "traces_to_metrics" && - c != "traces_to_logs" && - c != "metrics_to_traces" && - c != "metrics_to_metrics" && - c != "metrics_to_logs" && - c != "logs_to_traces" && - c != "logs_to_metrics" && - c != "logs_to_logs" && - c != "extension" { - errs = multierr.Append(errs, fmt.Errorf("invalid component: %v", c)) - } - } - } - return errs -} - -func (md *metadata) validateResourceAttributes() error { - var errs error - for name, attr := range md.ResourceAttributes { - if attr.Description == "" { - errs = multierr.Append(errs, fmt.Errorf("empty description for resource attribute: %v", name)) - } - empty := ValueType{ValueType: pcommon.ValueTypeEmpty} - if attr.Type == empty { - errs = multierr.Append(errs, fmt.Errorf("empty type for resource attribute: %v", name)) - } - } - return errs -} - -func (md *metadata) validateMetrics() error { - var errs error - usedAttrs := map[attributeName]bool{} - for mn, m := range md.Metrics { - if m.Sum == nil && m.Gauge == nil { - errs = multierr.Append(errs, fmt.Errorf("metric %v doesn't have a metric type key, "+ - "one of the following has to be specified: sum, gauge", mn)) - continue - } - if m.Sum != nil && m.Gauge != nil { - errs = multierr.Append(errs, fmt.Errorf("metric %v has more than one metric type keys, "+ - "only one of the following has to be specified: sum, gauge", mn)) - continue - } - if err := m.validate(); err != nil { - errs = multierr.Append(errs, fmt.Errorf(`metric "%v": %w`, mn, err)) - continue - } - unknownAttrs := make([]attributeName, 0, len(m.Attributes)) - for _, attr := range m.Attributes { - if _, ok := md.Attributes[attr]; ok { - usedAttrs[attr] = true - } else { - unknownAttrs = append(unknownAttrs, attr) - } - } - if len(unknownAttrs) > 0 { - errs = multierr.Append(errs, fmt.Errorf(`metric "%v" refers to undefined attributes: %v`, mn, unknownAttrs)) - } - } - errs = multierr.Append(errs, md.validateAttributes(usedAttrs)) - return errs -} - -func (m *metric) validate() error { - var errs error - if m.Description == "" { - errs = multierr.Append(errs, errors.New(`missing metric description`)) - } - if m.Unit == nil { - errs = multierr.Append(errs, errors.New(`missing metric unit`)) - } - if m.Sum != nil { - errs = multierr.Append(errs, m.Sum.Validate()) - } - if m.Gauge != nil { - errs = multierr.Append(errs, m.Gauge.Validate()) - } - return errs -} - -func (mit MetricInputType) Validate() error { - if mit.InputType != "" && mit.InputType != "string" { - return fmt.Errorf("invalid `input_type` value \"%v\", must be \"\" or \"string\"", mit.InputType) - } - return nil -} - -func (md *metadata) validateAttributes(usedAttrs map[attributeName]bool) error { - var errs error - unusedAttrs := make([]attributeName, 0, len(md.Attributes)) - for attrName, attr := range md.Attributes { - if attr.Description == "" { - errs = multierr.Append(errs, fmt.Errorf(`missing attribute description for: %v`, attrName)) - } - empty := ValueType{ValueType: pcommon.ValueTypeEmpty} - if attr.Type == empty { - errs = multierr.Append(errs, fmt.Errorf("empty type for attribute: %v", attrName)) - } - if !usedAttrs[attrName] { - unusedAttrs = append(unusedAttrs, attrName) - } - } - if len(unusedAttrs) > 0 { - errs = multierr.Append(errs, fmt.Errorf("unused attributes: %v", unusedAttrs)) - } - return errs -} diff --git a/cmd/mdatagen/validate_test.go b/cmd/mdatagen/validate_test.go deleted file mode 100644 index 12871a4ab8c5..000000000000 --- a/cmd/mdatagen/validate_test.go +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "fmt" - "io/fs" - "path/filepath" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestValidate(t *testing.T) { - tests := []struct { - name string - wantErr string - }{ - { - name: "testdata/no_type.yaml", - wantErr: "missing type", - }, - { - name: "testdata/no_status.yaml", - wantErr: "missing status", - }, - { - name: "testdata/no_class.yaml", - wantErr: "missing class", - }, - { - name: "testdata/invalid_class.yaml", - wantErr: "invalid class: incorrectclass", - }, - { - name: "testdata/no_stability.yaml", - wantErr: "missing stability", - }, - { - name: "testdata/invalid_stability.yaml", - wantErr: "invalid stability: incorrectstability", - }, - { - name: "testdata/no_stability_component.yaml", - wantErr: "missing component for stability: beta", - }, - { - name: "testdata/invalid_stability_component.yaml", - wantErr: "invalid component: incorrectcomponent", - }, - { - name: "testdata/no_description_rattr.yaml", - wantErr: "empty description for resource attribute: string.resource.attr", - }, - { - name: "testdata/no_type_rattr.yaml", - wantErr: "empty type for resource attribute: string.resource.attr", - }, - { - name: "testdata/no_metric_description.yaml", - wantErr: "metric \"default.metric\": missing metric description", - }, - { - name: "testdata/no_metric_unit.yaml", - wantErr: "metric \"default.metric\": missing metric unit", - }, - { - name: "testdata/no_metric_type.yaml", - wantErr: "metric system.cpu.time doesn't have a metric type key, " + - "one of the following has to be specified: sum, gauge", - }, - { - name: "testdata/two_metric_types.yaml", - wantErr: "metric system.cpu.time has more than one metric type keys, " + - "only one of the following has to be specified: sum, gauge", - }, - { - name: "testdata/invalid_input_type.yaml", - wantErr: "metric \"system.cpu.time\": invalid `input_type` value \"double\", must be \"\" or \"string\"", - }, - { - name: "testdata/unknown_metric_attribute.yaml", - wantErr: "metric \"system.cpu.time\" refers to undefined attributes: [missing]", - }, - { - name: "testdata/unused_attribute.yaml", - wantErr: "unused attributes: [unused_attr]", - }, - { - name: "testdata/no_description_attr.yaml", - wantErr: "missing attribute description for: string_attr", - }, - { - name: "testdata/no_type_attr.yaml", - wantErr: "empty type for attribute: used_attr", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - _, err := loadMetadata(tt.name) - require.Error(t, err) - require.EqualError(t, err, tt.wantErr) - }) - } -} - -func TestValidateMetricDuplicates(t *testing.T) { - allowedMetrics := map[string][]string{ - "container.cpu.utilization": {"docker_stats", "kubeletstats"}, - "container.memory.rss": {"docker_stats", "kubeletstats"}, - "container.uptime": {"docker_stats", "kubeletstats"}, - } - allMetrics := map[string][]string{} - err := filepath.Walk("../../receiver", func(path string, info fs.FileInfo, err error) error { - if info.Name() == "metadata.yaml" { - md, err := loadMetadata(path) - require.NoError(t, err) - if len(md.Metrics) > 0 { - for metricName := range md.Metrics { - allMetrics[md.Type] = append(allMetrics[md.Type], string(metricName)) - } - } - } - return nil - }) - require.NoError(t, err) - - seen := make(map[string]string) - for receiver, metrics := range allMetrics { - for _, metricName := range metrics { - if val, exists := seen[metricName]; exists { - receivers, allowed := allowedMetrics[metricName] - assert.True( - t, - allowed && contains(receiver, receivers) && contains(val, receivers), - fmt.Sprintf("Duplicate metric %v in receivers %v and %v. Please validate that this is intentional by adding the metric name and receiver types in the allowedMetrics map in this test\n", metricName, receiver, val), - ) - } - seen[metricName] = receiver - } - } -} - -func contains(r string, rs []string) bool { - for _, s := range rs { - if s == r { - return true - } - } - return false -} diff --git a/cmd/opampsupervisor/Makefile b/cmd/opampsupervisor/Makefile index ded7a36092dc..fea4c327e6cc 100644 --- a/cmd/opampsupervisor/Makefile +++ b/cmd/opampsupervisor/Makefile @@ -1 +1,5 @@ include ../../Makefile.Common + +e2e-test: + make -C ../../ otelcontribcol + go test -v --tags=e2e . diff --git a/cmd/opampsupervisor/README.md b/cmd/opampsupervisor/README.md index fcdeb091672f..136e36153971 100644 --- a/cmd/opampsupervisor/README.md +++ b/cmd/opampsupervisor/README.md @@ -18,7 +18,7 @@ The supervisor is currently undergoing heavy development and is not ready for an 3. Run the supervisor, substituting `` for your platform: ```shell - go run . --config testdata/supervisor_.yaml + go run . --config examples/supervisor_.yaml ``` 4. The supervisor should connect to the OpAMP server and start a Collector instance. diff --git a/cmd/opampsupervisor/e2e_test.go b/cmd/opampsupervisor/e2e_test.go new file mode 100644 index 000000000000..6119ed1c5490 --- /dev/null +++ b/cmd/opampsupervisor/e2e_test.go @@ -0,0 +1,520 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build e2e + +package main + +import ( + "bytes" + "context" + "crypto/sha256" + "io" + "log" + "net/http" + "net/http/httptest" + "os" + "os/exec" + "path" + "runtime" + "strings" + "sync/atomic" + "testing" + "text/template" + "time" + + "github.com/knadh/koanf/parsers/yaml" + "github.com/knadh/koanf/providers/file" + "github.com/knadh/koanf/providers/rawbytes" + "github.com/knadh/koanf/v2" + clientTypes "github.com/open-telemetry/opamp-go/client/types" + "github.com/open-telemetry/opamp-go/protobufs" + "github.com/open-telemetry/opamp-go/server" + "github.com/open-telemetry/opamp-go/server/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + semconv "go.opentelemetry.io/collector/semconv/v1.21.0" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor" + "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor/config" +) + +var _ clientTypes.Logger = testLogger{} + +type testLogger struct { + t *testing.T +} + +func (tl testLogger) Debugf(_ context.Context, format string, args ...any) { + tl.t.Logf(format, args...) +} + +func (tl testLogger) Errorf(_ context.Context, format string, args ...any) { + tl.t.Logf(format, args...) +} + +func defaultConnectingHandler(connectionCallbacks server.ConnectionCallbacksStruct) func(request *http.Request) types.ConnectionResponse { + return func(request *http.Request) types.ConnectionResponse { + return types.ConnectionResponse{ + Accept: true, + ConnectionCallbacks: connectionCallbacks, + } + } +} + +// onConnectingFuncFactory is a function that will be given to server.CallbacksStruct as +// OnConnectingFunc. This allows changing the ConnectionCallbacks both from the newOpAMPServer +// caller and inside of newOpAMP Server, and for custom implementations of the value for `Accept` +// in types.ConnectionResponse. +type onConnectingFuncFactory func(connectionCallbacks server.ConnectionCallbacksStruct) func(request *http.Request) types.ConnectionResponse + +type testingOpAMPServer struct { + addr string + supervisorConnected chan bool + sendToSupervisor func(*protobufs.ServerToAgent) +} + +func newOpAMPServer(t *testing.T, connectingCallback onConnectingFuncFactory, callbacks server.ConnectionCallbacksStruct) *testingOpAMPServer { + var agentConn atomic.Value + var isAgentConnected atomic.Bool + connectedChan := make(chan bool) + s := server.New(testLogger{t: t}) + onConnectedFunc := callbacks.OnConnectedFunc + callbacks.OnConnectedFunc = func(ctx context.Context, conn types.Connection) { + if onConnectedFunc != nil { + onConnectedFunc(ctx, conn) + } + agentConn.Store(conn) + isAgentConnected.Store(true) + connectedChan <- true + } + onConnectionCloseFunc := callbacks.OnConnectionCloseFunc + callbacks.OnConnectionCloseFunc = func(conn types.Connection) { + isAgentConnected.Store(false) + connectedChan <- false + if onConnectionCloseFunc != nil { + onConnectionCloseFunc(conn) + } + } + handler, _, err := s.Attach(server.Settings{ + Callbacks: server.CallbacksStruct{ + OnConnectingFunc: connectingCallback(callbacks), + }, + }) + require.NoError(t, err) + mux := http.NewServeMux() + mux.HandleFunc("/v1/opamp", handler) + httpSrv := httptest.NewServer(mux) + + shutdown := func() { + t.Log("Shutting down") + err := s.Stop(context.Background()) + assert.NoError(t, err) + httpSrv.Close() + } + send := func(msg *protobufs.ServerToAgent) { + if !isAgentConnected.Load() { + require.Fail(t, "Agent connection has not been established") + } + + agentConn.Load().(types.Connection).Send(context.Background(), msg) + } + t.Cleanup(func() { + waitForSupervisorConnection(connectedChan, false) + shutdown() + }) + return &testingOpAMPServer{ + addr: httpSrv.Listener.Addr().String(), + supervisorConnected: connectedChan, + sendToSupervisor: send, + } +} + +func newSupervisor(t *testing.T, configType string, extraConfigData map[string]string) *supervisor.Supervisor { + cfgFile := getSupervisorConfig(t, configType, extraConfigData) + s, err := supervisor.NewSupervisor(zap.NewNop(), cfgFile.Name()) + require.NoError(t, err) + + return s +} + +func getSupervisorConfig(t *testing.T, configType string, extraConfigData map[string]string) *os.File { + tpl, err := os.ReadFile(path.Join("testdata", "supervisor", "supervisor_"+configType+".yaml")) + require.NoError(t, err) + + templ, err := template.New("").Parse(string(tpl)) + require.NoError(t, err) + + var buf bytes.Buffer + var extension string + if runtime.GOOS == "windows" { + extension = ".exe" + } + configData := map[string]string{ + "goos": runtime.GOOS, + "goarch": runtime.GOARCH, + "extension": extension, + } + + for key, val := range extraConfigData { + configData[key] = val + } + err = templ.Execute(&buf, configData) + require.NoError(t, err) + cfgFile, _ := os.CreateTemp(t.TempDir(), "config_*.yaml") + _, err = cfgFile.Write(buf.Bytes()) + require.NoError(t, err) + + return cfgFile +} + +func TestSupervisorStartsCollectorWithRemoteConfig(t *testing.T) { + var agentConfig atomic.Value + server := newOpAMPServer( + t, + defaultConnectingHandler, + server.ConnectionCallbacksStruct{ + OnMessageFunc: func(_ context.Context, _ types.Connection, message *protobufs.AgentToServer) *protobufs.ServerToAgent { + if message.EffectiveConfig != nil { + config := message.EffectiveConfig.ConfigMap.ConfigMap[""] + if config != nil { + agentConfig.Store(string(config.Body)) + } + } + + return &protobufs.ServerToAgent{} + }, + }) + + s := newSupervisor(t, "basic", map[string]string{"url": server.addr}) + defer s.Shutdown() + + waitForSupervisorConnection(server.supervisorConnected, true) + + cfg, hash, inputFile, outputFile := createSimplePipelineCollectorConf(t) + + server.sendToSupervisor(&protobufs.ServerToAgent{ + RemoteConfig: &protobufs.AgentRemoteConfig{ + Config: &protobufs.AgentConfigMap{ + ConfigMap: map[string]*protobufs.AgentConfigFile{ + "": {Body: cfg.Bytes()}, + }, + }, + ConfigHash: hash, + }, + }) + + require.Eventually(t, func() bool { + cfg, ok := agentConfig.Load().(string) + if ok { + // The effective config may be structurally different compared to what was sent, + // so just check that it includes some strings we know to be unique to the remote config. + return strings.Contains(cfg, inputFile.Name()) && strings.Contains(cfg, outputFile.Name()) + } + + return false + }, 5*time.Second, 500*time.Millisecond, "Collector was not started with remote config") + + n, err := inputFile.WriteString("{\"body\":\"hello, world\"}\n") + require.NotZero(t, n, "Could not write to input file") + require.NoError(t, err) + + require.Eventually(t, func() bool { + logRecord := make([]byte, 1024) + n, _ := outputFile.Read(logRecord) + + return n != 0 + }, 10*time.Second, 500*time.Millisecond, "Log never appeared in output") +} + +func TestSupervisorRestartsCollectorAfterBadConfig(t *testing.T) { + var healthReport atomic.Value + var agentConfig atomic.Value + server := newOpAMPServer( + t, + defaultConnectingHandler, + server.ConnectionCallbacksStruct{ + OnMessageFunc: func(_ context.Context, _ types.Connection, message *protobufs.AgentToServer) *protobufs.ServerToAgent { + if message.Health != nil { + healthReport.Store(message.Health) + } + if message.EffectiveConfig != nil { + config := message.EffectiveConfig.ConfigMap.ConfigMap[""] + if config != nil { + agentConfig.Store(string(config.Body)) + } + } + + return &protobufs.ServerToAgent{} + }, + }) + + s := newSupervisor(t, "basic", map[string]string{"url": server.addr}) + defer s.Shutdown() + + waitForSupervisorConnection(server.supervisorConnected, true) + + cfg, hash := createBadCollectorConf(t) + + server.sendToSupervisor(&protobufs.ServerToAgent{ + RemoteConfig: &protobufs.AgentRemoteConfig{ + Config: &protobufs.AgentConfigMap{ + ConfigMap: map[string]*protobufs.AgentConfigFile{ + "": {Body: cfg.Bytes()}, + }, + }, + ConfigHash: hash, + }, + }) + + require.Eventually(t, func() bool { + cfg, ok := agentConfig.Load().(string) + if ok { + // The effective config may be structurally different compared to what was sent, + // so just check that it includes some strings we know to be unique to the remote config. + return strings.Contains(cfg, "doesntexist") + } + + return false + }, 5*time.Second, 500*time.Millisecond, "Collector was not started with remote config") + + require.Eventually(t, func() bool { + health := healthReport.Load().(*protobufs.ComponentHealth) + + if health != nil { + return !health.Healthy && health.LastError != "" + } + + return false + }, 5*time.Second, 250*time.Millisecond, "Supervisor never reported that the Collector was unhealthy") + + cfg, hash, _, _ = createSimplePipelineCollectorConf(t) + + server.sendToSupervisor(&protobufs.ServerToAgent{ + RemoteConfig: &protobufs.AgentRemoteConfig{ + Config: &protobufs.AgentConfigMap{ + ConfigMap: map[string]*protobufs.AgentConfigFile{ + "": {Body: cfg.Bytes()}, + }, + }, + ConfigHash: hash, + }, + }) + + require.Eventually(t, func() bool { + health := healthReport.Load().(*protobufs.ComponentHealth) + + if health != nil { + return health.Healthy && health.LastError == "" + } + + return false + }, 5*time.Second, 250*time.Millisecond, "Supervisor never reported that the Collector became healthy") +} + +func TestSupervisorConfiguresCapabilities(t *testing.T) { + var capabilities atomic.Uint64 + server := newOpAMPServer( + t, + defaultConnectingHandler, + server.ConnectionCallbacksStruct{ + OnMessageFunc: func(_ context.Context, _ types.Connection, message *protobufs.AgentToServer) *protobufs.ServerToAgent { + capabilities.Store(message.Capabilities) + + return &protobufs.ServerToAgent{} + }, + }) + + s := newSupervisor(t, "nocap", map[string]string{"url": server.addr}) + defer s.Shutdown() + + waitForSupervisorConnection(server.supervisorConnected, true) + + require.Eventually(t, func() bool { + cap := capabilities.Load() + + return cap == uint64(protobufs.AgentCapabilities_AgentCapabilities_ReportsStatus) + }, 5*time.Second, 250*time.Millisecond) +} + +func TestSupervisorBootstrapsCollector(t *testing.T) { + agentDescription := atomic.Value{} + + // Load the Supervisor config so we can get the location of + // the Collector that will be run. + var cfg config.Supervisor + cfgFile := getSupervisorConfig(t, "nocap", map[string]string{}) + k := koanf.New("::") + err := k.Load(file.Provider(cfgFile.Name()), yaml.Parser()) + require.NoError(t, err) + err = k.UnmarshalWithConf("", &cfg, koanf.UnmarshalConf{ + Tag: "mapstructure", + }) + require.NoError(t, err) + + // Get the binary name and version from the Collector binary + // using the `components` command that prints a YAML-encoded + // map of information about the Collector build. Some of this + // information will be used as defaults for the telemetry + // attributes. + agentPath := cfg.Agent.Executable + componentsInfo, err := exec.Command(agentPath, "components").Output() + require.NoError(t, err) + k = koanf.New("::") + err = k.Load(rawbytes.Provider(componentsInfo), yaml.Parser()) + require.NoError(t, err) + buildinfo := k.StringMap("buildinfo") + command := buildinfo["command"] + version := buildinfo["version"] + + server := newOpAMPServer( + t, + defaultConnectingHandler, + server.ConnectionCallbacksStruct{ + OnMessageFunc: func(_ context.Context, _ types.Connection, message *protobufs.AgentToServer) *protobufs.ServerToAgent { + if message.AgentDescription != nil { + agentDescription.Store(message.AgentDescription) + } + + return &protobufs.ServerToAgent{} + }, + }) + + s := newSupervisor(t, "nocap", map[string]string{"url": server.addr}) + defer s.Shutdown() + + waitForSupervisorConnection(server.supervisorConnected, true) + + require.Eventually(t, func() bool { + ad, ok := agentDescription.Load().(*protobufs.AgentDescription) + if !ok { + return false + } + + var agentName, agentVersion string + identAttr := ad.IdentifyingAttributes + for _, attr := range identAttr { + switch attr.Key { + case semconv.AttributeServiceName: + agentName = attr.Value.GetStringValue() + case semconv.AttributeServiceVersion: + agentVersion = attr.Value.GetStringValue() + } + } + + // By default the Collector should report its name and version + // from the component.BuildInfo struct built into the Collector + // binary. + return agentName == command && agentVersion == version + }, 5*time.Second, 250*time.Millisecond) +} + +// Creates a Collector config that reads and writes logs to files and provides +// file descriptors for I/O operations to those files. The files are placed +// in a unique temp directory that is cleaned up after the test's completion. +func createSimplePipelineCollectorConf(t *testing.T) (*bytes.Buffer, []byte, *os.File, *os.File) { + wd, err := os.Getwd() + require.NoError(t, err) + + // Create input and output files so we can "communicate" with a Collector binary. + // The testing package will automatically clean these up after each test. + tempDir := t.TempDir() + inputFile, err := os.CreateTemp(tempDir, "input_*.yaml") + require.NoError(t, err) + + outputFile, err := os.CreateTemp(tempDir, "output_*.yaml") + require.NoError(t, err) + + colCfgTpl, err := os.ReadFile(path.Join(wd, "testdata", "collector", "simple_pipeline.yaml")) + require.NoError(t, err) + + templ, err := template.New("").Parse(string(colCfgTpl)) + require.NoError(t, err) + + var confmapBuf bytes.Buffer + err = templ.Execute( + &confmapBuf, + map[string]string{ + "inputLogFile": inputFile.Name(), + "outputLogFile": outputFile.Name(), + }, + ) + require.NoError(t, err) + + h := sha256.New() + if _, err := io.Copy(h, bytes.NewBuffer(confmapBuf.Bytes())); err != nil { + log.Fatal(err) + } + + return &confmapBuf, h.Sum(nil), inputFile, outputFile +} + +func createBadCollectorConf(t *testing.T) (*bytes.Buffer, []byte) { + colCfg, err := os.ReadFile(path.Join("testdata", "collector", "bad_config.yaml")) + require.NoError(t, err) + + h := sha256.New() + if _, err := io.Copy(h, bytes.NewBuffer(colCfg)); err != nil { + log.Fatal(err) + } + + return bytes.NewBuffer(colCfg), h.Sum(nil) +} + +// Wait for the Supervisor to connect to or disconnect from the OpAMP server +func waitForSupervisorConnection(connection chan bool, connected bool) { + select { + case <-time.After(5 * time.Second): + break + case state := <-connection: + if state == connected { + break + } + } +} + +func TestSupervisorOpAMPConnectionSettings(t *testing.T) { + var connectedToNewServer atomic.Bool + initialServer := newOpAMPServer( + t, + defaultConnectingHandler, + server.ConnectionCallbacksStruct{}) + + s := newSupervisor(t, "accepts_conn", map[string]string{"url": initialServer.addr}) + defer s.Shutdown() + + waitForSupervisorConnection(initialServer.supervisorConnected, true) + + newServer := newOpAMPServer( + t, + defaultConnectingHandler, + server.ConnectionCallbacksStruct{ + OnConnectedFunc: func(_ context.Context, _ types.Connection) { + connectedToNewServer.Store(true) + }, + OnMessageFunc: func(_ context.Context, _ types.Connection, message *protobufs.AgentToServer) *protobufs.ServerToAgent { + return &protobufs.ServerToAgent{} + }, + }) + + initialServer.sendToSupervisor(&protobufs.ServerToAgent{ + ConnectionSettings: &protobufs.ConnectionSettingsOffers{ + Opamp: &protobufs.OpAMPConnectionSettings{ + DestinationEndpoint: "ws://" + newServer.addr + "/v1/opamp", + Headers: &protobufs.Headers{ + Headers: []*protobufs.Header{ + { + Key: "x-foo", + Value: "bar", + }, + }, + }, + }, + }, + }) + + require.Eventually(t, func() bool { + return connectedToNewServer.Load() == true + }, 10*time.Second, 500*time.Millisecond, "Collector did not connect to new OpAMP server") +} diff --git a/cmd/opampsupervisor/testdata/supervisor_darwin.yaml b/cmd/opampsupervisor/examples/supervisor_darwin.yaml similarity index 85% rename from cmd/opampsupervisor/testdata/supervisor_darwin.yaml rename to cmd/opampsupervisor/examples/supervisor_darwin.yaml index 379792377882..80d5b8bb5755 100644 --- a/cmd/opampsupervisor/testdata/supervisor_darwin.yaml +++ b/cmd/opampsupervisor/examples/supervisor_darwin.yaml @@ -4,7 +4,7 @@ server: # Disable verification to test locally. # Don't do this in production. insecure_skip_verify: true - # For more TLS settings see config/configtls.TLSClientSetting + # For more TLS settings see config/configtls.ClientConfig capabilities: reports_effective_config: true diff --git a/cmd/opampsupervisor/testdata/supervisor_linux.yaml b/cmd/opampsupervisor/examples/supervisor_linux.yaml similarity index 85% rename from cmd/opampsupervisor/testdata/supervisor_linux.yaml rename to cmd/opampsupervisor/examples/supervisor_linux.yaml index 0c2cf5ce8430..00021ece6b40 100644 --- a/cmd/opampsupervisor/testdata/supervisor_linux.yaml +++ b/cmd/opampsupervisor/examples/supervisor_linux.yaml @@ -4,7 +4,7 @@ server: # Disable verification to test locally. # Don't do this in production. insecure_skip_verify: true - # For more TLS settings see config/configtls.TLSClientSetting + # For more TLS settings see config/configtls.ClientConfig capabilities: reports_effective_config: true diff --git a/cmd/opampsupervisor/testdata/supervisor_windows.yaml b/cmd/opampsupervisor/examples/supervisor_windows.yaml similarity index 85% rename from cmd/opampsupervisor/testdata/supervisor_windows.yaml rename to cmd/opampsupervisor/examples/supervisor_windows.yaml index 35c20b62ca21..13d0a911d78d 100644 --- a/cmd/opampsupervisor/testdata/supervisor_windows.yaml +++ b/cmd/opampsupervisor/examples/supervisor_windows.yaml @@ -4,7 +4,7 @@ server: # Disable verification to test locally. # Don't do this in production. insecure_skip_verify: true - # For more TLS settings see config/configtls.TLSClientSetting + # For more TLS settings see config/configtls.ClientConfig capabilities: reports_effective_config: true diff --git a/cmd/opampsupervisor/go.mod b/cmd/opampsupervisor/go.mod index b2124e6fab6f..064126743785 100644 --- a/cmd/opampsupervisor/go.mod +++ b/cmd/opampsupervisor/go.mod @@ -1,32 +1,36 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor -go 1.20 +go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.0 + github.com/cenkalti/backoff/v4 v4.3.0 github.com/knadh/koanf/parsers/yaml v0.1.0 github.com/knadh/koanf/providers/file v0.1.0 github.com/knadh/koanf/providers/rawbytes v0.1.0 - github.com/knadh/koanf/v2 v2.0.1 + github.com/knadh/koanf/v2 v2.1.1 github.com/oklog/ulid/v2 v2.1.0 - github.com/open-telemetry/opamp-go v0.8.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opamp-go v0.14.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/gorilla/websocket v1.5.1 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.8.4 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.uber.org/multierr v1.10.0 // indirect - golang.org/x/sys v0.14.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/cmd/opampsupervisor/go.sum b/cmd/opampsupervisor/go.sum index 6e739d2c16a8..7db6846856f3 100644 --- a/cmd/opampsupervisor/go.sum +++ b/cmd/opampsupervisor/go.sum @@ -1,59 +1,68 @@ -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= -github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +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/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= 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/parsers/yaml v0.1.0 h1:ZZ8/iGfRLvKSaMEECEBPM1HQslrZADk8fP1XFUxVI5w= github.com/knadh/koanf/parsers/yaml v0.1.0/go.mod h1:cvbUDC7AL23pImuQP0oRw/hPuccrNBS2bps8asS0CwY= +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/providers/file v0.1.0 h1:fs6U7nrV58d3CFAFh8VTde8TM262ObYf3ODrc//Lp+c= github.com/knadh/koanf/providers/file v0.1.0/go.mod h1:rjJ/nHQl64iYCtAW2QQnF0eSmDEX/YZ/eNFj5yR6BvA= github.com/knadh/koanf/providers/rawbytes v0.1.0 h1:dpzgu2KO6uf6oCb4aP05KDmKmAmI51k5pe8RYKQ0qME= github.com/knadh/koanf/providers/rawbytes v0.1.0/go.mod h1:mMTB1/IcJ/yE++A2iEZbY1MLygX7vttU+C+S/YmPu9c= -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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/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/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= -github.com/open-telemetry/opamp-go v0.8.0 h1:ub2j96T3GzxCD5R+VDtN6iPUv4k2jgdyISi1d1BZ89I= -github.com/open-telemetry/opamp-go v0.8.0/go.mod h1:IMdeuHGVc5CjKSu5/oNV0o+UmiXuahoHvoZ4GOmAI9M= +github.com/open-telemetry/opamp-go v0.14.0 h1:KoziIK+wsFojhUXNTkCSTnCPf0eCMqFAaccOs0HrWIY= +github.com/open-telemetry/opamp-go v0.14.0/go.mod h1:XOGCigljsLSTZ8FfLwvat0M1QDj3conIIgRa77BWrKs= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= -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/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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= -go.uber.org/multierr v1.10.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/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/cmd/opampsupervisor/specification/README.md b/cmd/opampsupervisor/specification/README.md index 5ca8f9f62889..0fef754e446a 100644 --- a/cmd/opampsupervisor/specification/README.md +++ b/cmd/opampsupervisor/specification/README.md @@ -84,33 +84,33 @@ server: # If enabled the Supervisor will also report RemoteConfig status # to the Server. capabilities: - AcceptsRemoteConfig: # false if unspecified + accepts_remote_config: # false if unspecified # The Supervisor will report EffectiveConfig to the Server. - ReportsEffectiveConfig: # true if unspecified + reports_effective_config: # true if unspecified # The Supervisor can accept Collector executable package updates. # If enabled the Supervisor will also report package status to the # Server. - AcceptsPackages: # false if unspecified + accepts_packages: # false if unspecified # The Collector will report own metrics to the destination specified by # the Server. - ReportsOwnMetrics: # true if unspecified + reports_own_metrics: # true if unspecified # The Collector will report own logs to the destination specified by # the Server. - ReportsOwnLogs: # true if unspecified + reports_own_logs: # true if unspecified # The Collector will accept connections settings for exporters # from the Server. - AcceptsOtherConnectionSettings: # false if unspecified + accepts_other_connection_settings: # false if unspecified # The Supervisor will accept restart requests. - AcceptsRestartCommand: # true if unspecified + accepts_restart_command: # true if unspecified # The Collector will report Health. - ReportsHealth: # true if unspecified + reports_health: # true if unspecified storage: # A writable directory where the Supervisor can store data @@ -220,8 +220,8 @@ configuration. To overcome this problem the Supervisor starts the Collector with an "noop" configuration that collects nothing but allows the opamp extension to be started. The "noop" configuration is a single pipeline -with a filelog receiver that points to a non-existing file and a logging -exporter and the opamp extension. The purpose of the "noop" +with an OTLP receiver that listens on a random port and a debug +exporter, and the opamp extension. The purpose of the "noop" configuration is to make sure the Collector starts and the opamp extension communicates with the Supervisor. @@ -411,7 +411,7 @@ extensions: opamp: # OpAMP server URL. Supports WS or plain http transport, # based on the scheme of the URL (ws,wss,http,https). - # Any other settings defined in HTTPClientSettings, squashed. This + # Any other settings defined in ClientConfig, squashed. This # includes ability to specify an "auth" setting that refers # to an extension that implements the Authentication interface. endpoint: diff --git a/cmd/opampsupervisor/supervisor/commander/commander.go b/cmd/opampsupervisor/supervisor/commander/commander.go index 23ef147343b6..90901e0e7103 100644 --- a/cmd/opampsupervisor/supervisor/commander/commander.go +++ b/cmd/opampsupervisor/supervisor/commander/commander.go @@ -138,7 +138,8 @@ func (c *Commander) Stop(ctx context.Context) error { return nil } - c.logger.Debug("Stopping agent process", zap.Int("pid", c.cmd.Process.Pid)) + pid := c.cmd.Process.Pid + c.logger.Debug("Stopping agent process", zap.Int("pid", pid)) // Gracefully signal process to stop. if err := c.cmd.Process.Signal(syscall.SIGTERM); err != nil { @@ -154,14 +155,14 @@ func (c *Commander) Stop(ctx context.Context) error { <-waitCtx.Done() if !errors.Is(waitCtx.Err(), context.DeadlineExceeded) { - c.logger.Debug("Agent process successfully stopped.", zap.Int("pid", c.cmd.Process.Pid)) + c.logger.Debug("Agent process successfully stopped.", zap.Int("pid", pid)) return } // Time is out. Kill the process. c.logger.Debug( - "Agent process is not responding to SIGTERM. Sending SIGKILL to kill forcedly.", - zap.Int("pid", c.cmd.Process.Pid)) + "Agent process is not responding to SIGTERM. Sending SIGKILL to kill forcibly.", + zap.Int("pid", pid)) if innerErr = c.cmd.Process.Signal(syscall.SIGKILL); innerErr != nil { return } diff --git a/cmd/opampsupervisor/supervisor/config/config.go b/cmd/opampsupervisor/supervisor/config/config.go index ccbd523d4e6f..1948b42a0701 100644 --- a/cmd/opampsupervisor/supervisor/config/config.go +++ b/cmd/opampsupervisor/supervisor/config/config.go @@ -4,6 +4,8 @@ package config import ( + "net/http" + "go.opentelemetry.io/collector/config/configtls" ) @@ -16,16 +18,18 @@ type Supervisor struct { // Capabilities is the set of capabilities that the Supervisor supports. type Capabilities struct { - AcceptsRemoteConfig *bool `mapstructure:"accepts_remote_config"` - ReportsEffectiveConfig *bool `mapstructure:"reports_effective_config"` - ReportsOwnMetrics *bool `mapstructure:"reports_own_metrics"` - ReportsHealth *bool `mapstructure:"reports_health"` - ReportsRemoteConfig *bool `mapstructure:"reports_remote_config"` + AcceptsRemoteConfig *bool `mapstructure:"accepts_remote_config"` + AcceptsOpAMPConnectionSettings *bool `mapstructure:"accepts_opamp_connection_settings"` + ReportsEffectiveConfig *bool `mapstructure:"reports_effective_config"` + ReportsOwnMetrics *bool `mapstructure:"reports_own_metrics"` + ReportsHealth *bool `mapstructure:"reports_health"` + ReportsRemoteConfig *bool `mapstructure:"reports_remote_config"` } type OpAMPServer struct { Endpoint string - TLSSetting configtls.TLSClientSetting `mapstructure:"tls,omitempty"` + Headers http.Header + TLSSetting configtls.ClientConfig `mapstructure:"tls,omitempty"` } type Agent struct { diff --git a/cmd/opampsupervisor/supervisor/logger.go b/cmd/opampsupervisor/supervisor/logger.go new file mode 100644 index 000000000000..11811d539372 --- /dev/null +++ b/cmd/opampsupervisor/supervisor/logger.go @@ -0,0 +1,33 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package supervisor + +import ( + "context" + + "github.com/open-telemetry/opamp-go/client/types" + "go.uber.org/zap" +) + +var _ types.Logger = &opAMPLogger{} + +type opAMPLogger struct { + l *zap.SugaredLogger +} + +// Debugf implements types.Logger. +func (o *opAMPLogger) Debugf(_ context.Context, format string, v ...any) { + o.l.Debugf(format, v...) +} + +// Errorf implements types.Logger. +func (o *opAMPLogger) Errorf(_ context.Context, format string, v ...any) { + o.l.Errorf(format, v...) +} + +func newLoggerFromZap(l *zap.Logger) types.Logger { + return &opAMPLogger{ + l: l.Sugar(), + } +} diff --git a/cmd/opampsupervisor/supervisor/package_test.go b/cmd/opampsupervisor/supervisor/package_test.go new file mode 100644 index 000000000000..c2046befd419 --- /dev/null +++ b/cmd/opampsupervisor/supervisor/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package supervisor + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/cmd/opampsupervisor/supervisor/server.go b/cmd/opampsupervisor/supervisor/server.go new file mode 100644 index 000000000000..6e4c00697097 --- /dev/null +++ b/cmd/opampsupervisor/supervisor/server.go @@ -0,0 +1,46 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package supervisor + +import ( + "context" + "net/http" + + "github.com/open-telemetry/opamp-go/protobufs" + "github.com/open-telemetry/opamp-go/server" + serverTypes "github.com/open-telemetry/opamp-go/server/types" +) + +type flattenedSettings struct { + onMessageFunc func(conn serverTypes.Connection, message *protobufs.AgentToServer) + onConnectingFunc func(request *http.Request) + endpoint string +} + +func newServerSettings(fs flattenedSettings) server.StartSettings { + return server.StartSettings{ + Settings: server.Settings{ + Callbacks: server.CallbacksStruct{ + OnConnectingFunc: func(request *http.Request) serverTypes.ConnectionResponse { + if fs.onConnectingFunc != nil { + fs.onConnectingFunc(request) + } + return serverTypes.ConnectionResponse{ + Accept: true, + ConnectionCallbacks: server.ConnectionCallbacksStruct{ + OnMessageFunc: func(_ context.Context, conn serverTypes.Connection, message *protobufs.AgentToServer) *protobufs.ServerToAgent { + if fs.onMessageFunc != nil { + fs.onMessageFunc(conn, message) + } + + return &protobufs.ServerToAgent{} + }, + }, + } + }, + }, + }, + ListenEndpoint: fs.endpoint, + } +} diff --git a/cmd/opampsupervisor/supervisor/supervisor.go b/cmd/opampsupervisor/supervisor/supervisor.go index 626f61ac3de1..2c4d132fc88f 100644 --- a/cmd/opampsupervisor/supervisor/supervisor.go +++ b/cmd/opampsupervisor/supervisor/supervisor.go @@ -4,15 +4,19 @@ package supervisor import ( + "bytes" "context" + _ "embed" "errors" "fmt" "math/rand" "net" + "net/http" "os" - "runtime" "sort" + "sync" "sync/atomic" + "text/template" "time" "github.com/cenkalti/backoff/v4" @@ -24,6 +28,11 @@ import ( "github.com/open-telemetry/opamp-go/client" "github.com/open-telemetry/opamp-go/client/types" "github.com/open-telemetry/opamp-go/protobufs" + "github.com/open-telemetry/opamp-go/server" + serverTypes "github.com/open-telemetry/opamp-go/server/types" + "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configtls" + semconv "go.opentelemetry.io/collector/semconv/v1.21.0" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor/commander" @@ -31,8 +40,16 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor/healthchecker" ) -// This Supervisor is developed specifically for the OpenTelemetry Collector. -const agentType = "io.opentelemetry.collector" +var ( + //go:embed templates/bootstrap.yaml + bootstrapConfTpl string + + //go:embed templates/extraconfig.yaml + extraConfigTpl string + + //go:embed templates/owntelemetry.yaml + ownTelemetryTpl string +) // Supervisor implements supervising of OpenTelemetry Collector and uses OpAMPClient // to work with an OpAMP Server. @@ -51,11 +68,14 @@ type Supervisor struct { // Supervisor's own config. config config.Supervisor + agentDescription *protobufs.AgentDescription + // Agent's instance id. instanceID ulid.ULID - // The version of the agent. - agentVersion string + bootstrapTemplate *template.Template + extraConfigTemplate *template.Template + ownTelemetryTemplate *template.Template // A config section to be added to the Collector's config to fetch its own metrics. // TODO: store this persistently so that when starting we can compose the effective @@ -83,9 +103,12 @@ type Supervisor struct { opampClient client.OpAMPClient shuttingDown bool + supervisorWG sync.WaitGroup agentHasStarted bool agentStartHealthCheckAttempts int + + connectedToOpAMPServer chan struct{} } func NewSupervisor(logger *zap.Logger, configFile string) (*Supervisor, error) { @@ -95,34 +118,38 @@ func NewSupervisor(logger *zap.Logger, configFile string) (*Supervisor, error) { effectiveConfigFilePath: "effective.yaml", agentConfigOwnMetricsSection: &atomic.Value{}, effectiveConfig: &atomic.Value{}, + connectedToOpAMPServer: make(chan struct{}), + } + + if err := s.createTemplates(); err != nil { + return nil, err } if err := s.loadConfig(configFile); err != nil { return nil, fmt.Errorf("error loading config: %w", err) } - if err := s.getBootstrapInfo(); err != nil { - s.logger.Error("Couldn't get agent version", zap.Error(err)) + id, err := s.createInstanceID() + if err != nil { + return nil, err } - port, err := s.findRandomPort() + s.instanceID = id - if err != nil { - return nil, fmt.Errorf("could not find port for health check: %w", err) + if err = s.getBootstrapInfo(); err != nil { + return nil, fmt.Errorf("could not get bootstrap info from the Collector: %w", err) } - s.agentHealthCheckEndpoint = fmt.Sprintf("localhost:%d", port) - - id, err := s.createInstanceID() + port, err := s.findRandomPort() if err != nil { - return nil, err + return nil, fmt.Errorf("could not find port for health check: %w", err) } - s.instanceID = id + s.agentHealthCheckEndpoint = fmt.Sprintf("localhost:%d", port) logger.Debug("Supervisor starting", - zap.String("id", s.instanceID.String()), zap.String("type", agentType), zap.String("version", s.agentVersion)) + zap.String("id", s.instanceID.String())) s.loadAgentEffectiveConfig() @@ -130,6 +157,10 @@ func NewSupervisor(logger *zap.Logger, configFile string) (*Supervisor, error) { return nil, fmt.Errorf("cannot start OpAMP client: %w", err) } + if connErr := s.waitForOpAMPConnection(); connErr != nil { + return nil, fmt.Errorf("failed to connect to the OpAMP server: %w", err) + } + s.commander, err = commander.NewCommander( s.logger, s.config.Agent, @@ -140,11 +171,32 @@ func NewSupervisor(logger *zap.Logger, configFile string) (*Supervisor, error) { } s.startHealthCheckTicker() - go s.runAgentProcess() + + s.supervisorWG.Add(1) + go func() { + defer s.supervisorWG.Done() + s.runAgentProcess() + }() return s, nil } +func (s *Supervisor) createTemplates() error { + var err error + + if s.bootstrapTemplate, err = template.New("bootstrap").Parse(bootstrapConfTpl); err != nil { + return err + } + if s.extraConfigTemplate, err = template.New("extraconfig").Parse(extraConfigTpl); err != nil { + return err + } + if s.ownTelemetryTemplate, err = template.New("owntelemetry").Parse(ownTelemetryTpl); err != nil { + return err + } + + return nil +} + func (s *Supervisor) loadConfig(configFile string) error { if configFile == "" { return errors.New("path to config file cannot be empty") @@ -166,10 +218,109 @@ func (s *Supervisor) loadConfig(configFile string) error { return nil } -// TODO: Implement bootstrapping https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21071 -// nolint: unparam func (s *Supervisor) getBootstrapInfo() (err error) { - s.agentVersion = "1.0.0" + port, err := s.findRandomPort() + if err != nil { + return err + } + + supervisorPort, err := s.findRandomPort() + if err != nil { + return err + } + + var cfg bytes.Buffer + + err = s.bootstrapTemplate.Execute(&cfg, map[string]any{ + "EndpointPort": port, + "InstanceUid": s.instanceID.String(), + "SupervisorPort": supervisorPort, + }) + if err != nil { + return err + } + + s.writeEffectiveConfigToFile(cfg.String(), s.effectiveConfigFilePath) + + srv := server.New(newLoggerFromZap(s.logger)) + + done := make(chan error, 1) + var connected atomic.Bool + + err = srv.Start(newServerSettings(flattenedSettings{ + endpoint: fmt.Sprintf("localhost:%d", supervisorPort), + onConnectingFunc: func(_ *http.Request) { + connected.Store(true) + + }, + onMessageFunc: func(_ serverTypes.Connection, message *protobufs.AgentToServer) { + if message.AgentDescription != nil { + instanceIDSeen := false + s.agentDescription = message.AgentDescription + identAttr := s.agentDescription.IdentifyingAttributes + + for _, attr := range identAttr { + if attr.Key == semconv.AttributeServiceInstanceID { + // TODO: Consider whether to attempt restarting the Collector. + // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/29864 + if attr.Value.GetStringValue() != s.instanceID.String() { + done <- fmt.Errorf( + "the Collector's instance ID (%s) does not match with the instance ID set by the Supervisor (%s)", + attr.Value.GetStringValue(), + s.instanceID.String()) + return + } + instanceIDSeen = true + } + } + + if !instanceIDSeen { + done <- errors.New("the Collector did not specify an instance ID in its AgentDescription message") + return + } + + done <- nil + } + }, + })) + if err != nil { + return err + } + + cmd, err := commander.NewCommander( + s.logger, + s.config.Agent, + "--config", s.effectiveConfigFilePath, + ) + if err != nil { + return err + } + + if err = cmd.Start(context.Background()); err != nil { + return err + } + + select { + // TODO make timeout configurable + case <-time.After(3 * time.Second): + if connected.Load() { + return errors.New("collector connected but never responded with an AgentDescription message") + } else { + return errors.New("collector's OpAMP client never connected to the Supervisor") + } + case err = <-done: + if err != nil { + return err + } + } + + if err = cmd.Stop(context.Background()); err != nil { + return err + } + + if err = srv.Stop(context.Background()); err != nil { + return err + } return nil } @@ -199,43 +350,46 @@ func (s *Supervisor) Capabilities() protobufs.AgentCapabilities { if c.ReportsRemoteConfig != nil && *c.ReportsRemoteConfig { supportedCapabilities |= protobufs.AgentCapabilities_AgentCapabilities_ReportsRemoteConfig } + + if c.AcceptsOpAMPConnectionSettings != nil && *c.AcceptsOpAMPConnectionSettings { + supportedCapabilities |= protobufs.AgentCapabilities_AgentCapabilities_AcceptsOpAMPConnectionSettings + } } return supportedCapabilities } func (s *Supervisor) startOpAMP() error { - s.opampClient = client.NewWebSocket(s.logger.Sugar()) + s.opampClient = client.NewWebSocket(newLoggerFromZap(s.logger)) tlsConfig, err := s.config.Server.TLSSetting.LoadTLSConfig() if err != nil { return err } + s.logger.Debug("Connecting to OpAMP server...", zap.String("endpoint", s.config.Server.Endpoint), zap.Any("headers", s.config.Server.Headers)) settings := types.StartSettings{ OpAMPServerURL: s.config.Server.Endpoint, + Header: s.config.Server.Headers, TLSConfig: tlsConfig, InstanceUid: s.instanceID.String(), Callbacks: types.CallbacksStruct{ - OnConnectFunc: func() { + OnConnectFunc: func(_ context.Context) { + s.connectedToOpAMPServer <- struct{}{} s.logger.Debug("Connected to the server.") }, - OnConnectFailedFunc: func(err error) { + OnConnectFailedFunc: func(_ context.Context, err error) { s.logger.Error("Failed to connect to the server", zap.Error(err)) }, - OnErrorFunc: func(err *protobufs.ServerErrorResponse) { + OnErrorFunc: func(_ context.Context, err *protobufs.ServerErrorResponse) { s.logger.Error("Server returned an error response", zap.String("message", err.ErrorMessage)) }, OnMessageFunc: s.onMessage, OnOpampConnectionSettingsFunc: func(ctx context.Context, settings *protobufs.OpAMPConnectionSettings) error { - // TODO: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21043 - s.logger.Debug("Received ConnectionSettings request") + //nolint:errcheck + go s.onOpampConnectionSettings(ctx, settings) return nil }, - OnOpampConnectionSettingsAcceptedFunc: func(settings *protobufs.OpAMPConnectionSettings) { - // TODO: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21043 - s.logger.Debug("ConnectionSettings accepted") - }, - OnCommandFunc: func(command *protobufs.ServerToAgentCommand) error { + OnCommandFunc: func(_ context.Context, command *protobufs.ServerToAgentCommand) error { cmdType := command.GetType() if *cmdType.Enum() == protobufs.CommandType_CommandType_Restart { // TODO: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21077 @@ -243,21 +397,21 @@ func (s *Supervisor) startOpAMP() error { } return nil }, - SaveRemoteConfigStatusFunc: func(ctx context.Context, status *protobufs.RemoteConfigStatus) { + SaveRemoteConfigStatusFunc: func(_ context.Context, _ *protobufs.RemoteConfigStatus) { // TODO: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21079 }, - GetEffectiveConfigFunc: func(ctx context.Context) (*protobufs.EffectiveConfig, error) { + GetEffectiveConfigFunc: func(_ context.Context) (*protobufs.EffectiveConfig, error) { return s.createEffectiveConfigMsg(), nil }, }, Capabilities: s.Capabilities(), } - err = s.opampClient.SetAgentDescription(s.createAgentDescription()) + err = s.opampClient.SetAgentDescription(s.agentDescription) if err != nil { return err } - err = s.opampClient.SetHealth(&protobufs.AgentHealth{Healthy: false}) + err = s.opampClient.SetHealth(&protobufs.ComponentHealth{Healthy: false}) if err != nil { return err } @@ -274,6 +428,88 @@ func (s *Supervisor) startOpAMP() error { return nil } +func (s *Supervisor) stopOpAMP() error { + s.logger.Debug("Stopping OpAMP client...") + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + err := s.opampClient.Stop(ctx) + // TODO(srikanthccv): remove context.DeadlineExceeded after https://github.com/open-telemetry/opamp-go/pull/213 + if err != nil && !errors.Is(err, context.DeadlineExceeded) { + return err + } + s.logger.Debug("OpAMP client stopped.") + return nil +} + +func (s *Supervisor) getHeadersFromSettings(protoHeaders *protobufs.Headers) http.Header { + headers := make(http.Header) + for _, header := range protoHeaders.Headers { + headers.Add(header.Key, header.Value) + } + return headers +} + +func (s *Supervisor) onOpampConnectionSettings(_ context.Context, settings *protobufs.OpAMPConnectionSettings) error { + if settings == nil { + s.logger.Debug("Received ConnectionSettings request with nil settings") + return nil + } + + newServerConfig := &config.OpAMPServer{} + + if settings.DestinationEndpoint != "" { + newServerConfig.Endpoint = settings.DestinationEndpoint + } + if settings.Headers != nil { + newServerConfig.Headers = s.getHeadersFromSettings(settings.Headers) + } + if settings.Certificate != nil { + if len(settings.Certificate.CaPublicKey) != 0 { + newServerConfig.TLSSetting.CAPem = configopaque.String(settings.Certificate.CaPublicKey) + } + if len(settings.Certificate.PublicKey) != 0 { + newServerConfig.TLSSetting.CertPem = configopaque.String(settings.Certificate.PublicKey) + } + if len(settings.Certificate.PrivateKey) != 0 { + newServerConfig.TLSSetting.KeyPem = configopaque.String(settings.Certificate.PrivateKey) + } + } else { + newServerConfig.TLSSetting = configtls.ClientConfig{Insecure: true} + } + + if err := s.stopOpAMP(); err != nil { + s.logger.Error("Cannot stop the OpAMP client", zap.Error(err)) + return err + } + + // take a copy of the current OpAMP server config + oldServerConfig := s.config.Server + // update the OpAMP server config + s.config.Server = newServerConfig + + if err := s.startOpAMP(); err != nil { + s.logger.Error("Cannot connect to the OpAMP server using the new settings", zap.Error(err)) + // revert the OpAMP server config + s.config.Server = oldServerConfig + // start the OpAMP client with the old settings + if err := s.startOpAMP(); err != nil { + s.logger.Error("Cannot reconnect to the OpAMP server after restoring old settings", zap.Error(err)) + return err + } + } + return s.waitForOpAMPConnection() +} + +func (s *Supervisor) waitForOpAMPConnection() error { + // wait for the OpAMP client to connect to the server or timeout + select { + case <-s.connectedToOpAMPServer: + return nil + case <-time.After(10 * time.Second): + return errors.New("timed out waiting for the server to connect") + } +} + // TODO: Persist instance ID. https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21073 func (s *Supervisor) createInstanceID() (ulid.ULID, error) { entropy := ulid.Monotonic(rand.New(rand.NewSource(0)), 0) @@ -287,57 +523,29 @@ func (s *Supervisor) createInstanceID() (ulid.ULID, error) { } -func keyVal(key, val string) *protobufs.KeyValue { - return &protobufs.KeyValue{ - Key: key, - Value: &protobufs.AnyValue{ - Value: &protobufs.AnyValue_StringValue{StringValue: val}, - }, +func (s *Supervisor) composeExtraLocalConfig() []byte { + var cfg bytes.Buffer + resourceAttrs := map[string]string{} + for _, attr := range s.agentDescription.IdentifyingAttributes { + resourceAttrs[attr.Key] = attr.Value.GetStringValue() } -} - -func (s *Supervisor) createAgentDescription() *protobufs.AgentDescription { - hostname, _ := os.Hostname() - - return &protobufs.AgentDescription{ - IdentifyingAttributes: []*protobufs.KeyValue{ - keyVal("service.name", agentType), - keyVal("service.version", s.agentVersion), - keyVal("service.instance.id", s.instanceID.String()), - }, - NonIdentifyingAttributes: []*protobufs.KeyValue{ - keyVal("os.family", runtime.GOOS), - keyVal("host.name", hostname), - }, + for _, attr := range s.agentDescription.NonIdentifyingAttributes { + resourceAttrs[attr.Key] = attr.Value.GetStringValue() } -} - -func (s *Supervisor) composeExtraLocalConfig() string { - return fmt.Sprintf(` -service: - telemetry: - logs: - # Enables JSON log output for the Agent. - encoding: json - resource: - # Set resource attributes required by OpAMP spec. - # See https://github.com/open-telemetry/opamp-spec/blob/main/specification.md#agentdescriptionidentifying_attributes - service.name: %s - service.version: %s - service.instance.id: %s - - # Enable extension to allow the Supervisor to check health. - extensions: [health_check] - -extensions: - health_check: - endpoint: %s -`, - agentType, - s.agentVersion, - s.instanceID.String(), - s.agentHealthCheckEndpoint, + tplVars := map[string]any{ + "Healthcheck": s.agentHealthCheckEndpoint, + "ResourceAttributes": resourceAttrs, + } + err := s.extraConfigTemplate.Execute( + &cfg, + tplVars, ) + if err != nil { + s.logger.Error("Could not compose local config", zap.Error(err)) + return nil + } + + return cfg.Bytes() } func (s *Supervisor) loadAgentEffectiveConfig() { @@ -349,7 +557,7 @@ func (s *Supervisor) loadAgentEffectiveConfig() { effectiveConfigBytes = effFromFile } else { // No effective config file, just use the initial config. - effectiveConfigBytes = []byte(s.composeExtraLocalConfig()) + effectiveConfigBytes = s.composeExtraLocalConfig() } s.effectiveConfig.Store(string(effectiveConfigBytes)) @@ -375,11 +583,10 @@ func (s *Supervisor) createEffectiveConfigMsg() *protobufs.EffectiveConfig { } func (s *Supervisor) setupOwnMetrics(_ context.Context, settings *protobufs.TelemetryConnectionSettings) (configChanged bool) { - var cfg string + var cfg bytes.Buffer if settings.DestinationEndpoint == "" { // No destination. Disable metric collection. s.logger.Debug("Disabling own metrics pipeline in the config") - cfg = "" } else { s.logger.Debug("Enabling own metrics pipeline in the config") @@ -390,37 +597,20 @@ func (s *Supervisor) setupOwnMetrics(_ context.Context, settings *protobufs.Tele return } - cfg = fmt.Sprintf( - ` -receivers: - # Collect own metrics - prometheus/own_metrics: - config: - scrape_configs: - - job_name: 'otel-collector' - scrape_interval: 10s - static_configs: - - targets: ['0.0.0.0:%d'] -exporters: - otlphttp/own_metrics: - metrics_endpoint: %s - -service: - telemetry: - metrics: - address: :%d - pipelines: - metrics/own_metrics: - receivers: [prometheus/own_metrics] - exporters: [otlphttp/own_metrics] -`, - port, - settings.DestinationEndpoint, - port, + err = s.ownTelemetryTemplate.Execute( + &cfg, + map[string]any{ + "PrometheusPort": port, + "MetricsEndpoint": settings.DestinationEndpoint, + }, ) - } + if err != nil { + s.logger.Error("Could not setup own metrics", zap.Error(err)) + return + } - s.agentConfigOwnMetricsSection.Store(cfg) + } + s.agentConfigOwnMetricsSection.Store(cfg.String()) // Need to recalculate the Agent config so that the metric config is included in it. configChanged, err := s.recalcEffectiveConfig() @@ -481,7 +671,7 @@ func (s *Supervisor) composeEffectiveConfig(config *protobufs.AgentRemoteConfig) } // Merge local config last since it has the highest precedence. - if err = k.Load(rawbytes.Provider([]byte(s.composeExtraLocalConfig())), yaml.Parser()); err != nil { + if err = k.Load(rawbytes.Provider(s.composeExtraLocalConfig()), yaml.Parser()); err != nil { return false, err } @@ -519,7 +709,7 @@ func (s *Supervisor) startAgent() { err := s.commander.Start(context.Background()) if err != nil { s.logger.Error("Cannot start the agent", zap.Error(err)) - err = s.opampClient.SetHealth(&protobufs.AgentHealth{Healthy: false, LastError: fmt.Sprintf("Cannot start the agent: %v", err)}) + err = s.opampClient.SetHealth(&protobufs.ComponentHealth{Healthy: false, LastError: fmt.Sprintf("Cannot start the agent: %v", err)}) if err != nil { s.logger.Error("Failed to report OpAMP client health", zap.Error(err)) @@ -563,7 +753,7 @@ func (s *Supervisor) healthCheck() { } // Prepare OpAMP health report. - health := &protobufs.AgentHealth{ + health := &protobufs.ComponentHealth{ StartTimeUnixNano: uint64(s.startedAt.UnixNano()), } @@ -609,7 +799,7 @@ func (s *Supervisor) runAgentProcess() { case <-s.commander.Done(): if s.shuttingDown { - break + return } s.logger.Debug("Agent process exited unexpectedly. Will restart in a bit...", zap.Int("pid", s.commander.Pid()), zap.Int("exit_code", s.commander.ExitCode())) @@ -617,7 +807,7 @@ func (s *Supervisor) runAgentProcess() { "Agent process PID=%d exited unexpectedly, exit code=%d. Will restart in a bit...", s.commander.Pid(), s.commander.ExitCode(), ) - err := s.opampClient.SetHealth(&protobufs.AgentHealth{Healthy: false, LastError: errMsg}) + err := s.opampClient.SetHealth(&protobufs.ComponentHealth{Healthy: false, LastError: errMsg}) if err != nil { s.logger.Error("Could not report health to OpAMP server", zap.Error(err)) @@ -678,7 +868,7 @@ func (s *Supervisor) Shutdown() { if s.opampClient != nil { err := s.opampClient.SetHealth( - &protobufs.AgentHealth{ + &protobufs.ComponentHealth{ Healthy: false, LastError: "Supervisor is shutdown", }, ) @@ -687,12 +877,18 @@ func (s *Supervisor) Shutdown() { s.logger.Error("Could not report health to OpAMP server", zap.Error(err)) } - err = s.opampClient.Stop(context.Background()) + err = s.stopOpAMP() if err != nil { s.logger.Error("Could not stop the OpAMP client", zap.Error(err)) } } + + if s.healthCheckTicker != nil { + s.healthCheckTicker.Stop() + } + + s.supervisorWG.Wait() } func (s *Supervisor) onMessage(ctx context.Context, msg *types.MessageData) { @@ -737,7 +933,7 @@ func (s *Supervisor) onMessage(ctx context.Context, msg *types.MessageData) { zap.String("old_id", s.instanceID.String()), zap.String("new_id", newInstanceID.String())) s.instanceID = newInstanceID - err = s.opampClient.SetAgentDescription(s.createAgentDescription()) + err = s.opampClient.SetAgentDescription(s.agentDescription) if err != nil { s.logger.Error("Failed to send agent description to OpAMP server") } diff --git a/cmd/opampsupervisor/supervisor/supervisor_test.go b/cmd/opampsupervisor/supervisor/supervisor_test.go new file mode 100644 index 000000000000..f247b169907a --- /dev/null +++ b/cmd/opampsupervisor/supervisor/supervisor_test.go @@ -0,0 +1,60 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package supervisor + +import ( + "bytes" + "os" + "sync/atomic" + "testing" + + "github.com/open-telemetry/opamp-go/protobufs" + "github.com/stretchr/testify/require" + "go.uber.org/zap" +) + +func Test_composeEffectiveConfig(t *testing.T) { + s := Supervisor{ + logger: zap.NewNop(), + hasNewConfig: make(chan struct{}, 1), + effectiveConfigFilePath: "effective.yaml", + agentConfigOwnMetricsSection: &atomic.Value{}, + effectiveConfig: &atomic.Value{}, + agentHealthCheckEndpoint: "localhost:8000", + } + + s.agentDescription = &protobufs.AgentDescription{ + IdentifyingAttributes: []*protobufs.KeyValue{ + { + Key: "service.name", + Value: &protobufs.AnyValue{ + Value: &protobufs.AnyValue_StringValue{ + StringValue: "otelcol", + }, + }, + }, + }, + } + + require.NoError(t, s.createTemplates()) + s.loadAgentEffectiveConfig() + + configChanged, err := s.composeEffectiveConfig(&protobufs.AgentRemoteConfig{ + Config: &protobufs.AgentConfigMap{ + ConfigMap: map[string]*protobufs.AgentConfigFile{ + "": { + Body: []byte(""), + }, + }, + }, + }) + require.NoError(t, err) + + expectedConfig, err := os.ReadFile("../testdata/collector/effective_config.yaml") + require.NoError(t, err) + expectedConfig = bytes.ReplaceAll(expectedConfig, []byte("\r\n"), []byte("\n")) + + require.True(t, configChanged) + require.Equal(t, string(expectedConfig), s.effectiveConfig.Load().(string)) +} diff --git a/cmd/opampsupervisor/supervisor/templates/bootstrap.yaml b/cmd/opampsupervisor/supervisor/templates/bootstrap.yaml new file mode 100644 index 000000000000..983b62c4af59 --- /dev/null +++ b/cmd/opampsupervisor/supervisor/templates/bootstrap.yaml @@ -0,0 +1,24 @@ +receivers: + otlp: + protocols: + http: + endpoint: "localhost:{{.EndpointPort}}" +exporters: + debug: + verbosity: basic + +extensions: + opamp: + instance_uid: "{{.InstanceUid}}" + server: + ws: + endpoint: "ws://localhost:{{.SupervisorPort}}/v1/opamp" + tls: + insecure: true + +service: + pipelines: + traces: + receivers: [otlp] + exporters: [debug] + extensions: [opamp] diff --git a/cmd/opampsupervisor/supervisor/templates/extraconfig.yaml b/cmd/opampsupervisor/supervisor/templates/extraconfig.yaml new file mode 100644 index 000000000000..910403f3ba44 --- /dev/null +++ b/cmd/opampsupervisor/supervisor/templates/extraconfig.yaml @@ -0,0 +1,16 @@ +service: + telemetry: + logs: + # Enables JSON log output for the Agent. + encoding: json + resource: + # Set resource attributes suggested by the OpAMP spec. + # See https://github.com/open-telemetry/opamp-spec/blob/main/specification.md#agentdescription-message + {{range $k, $v := .ResourceAttributes}}{{$k}}: "{{$v}}" + {{end}} + # Enable extension to allow the Supervisor to check health. + extensions: [health_check] + +extensions: + health_check: + endpoint: "{{.Healthcheck}}" diff --git a/cmd/opampsupervisor/supervisor/templates/owntelemetry.yaml b/cmd/opampsupervisor/supervisor/templates/owntelemetry.yaml new file mode 100644 index 000000000000..f46851298780 --- /dev/null +++ b/cmd/opampsupervisor/supervisor/templates/owntelemetry.yaml @@ -0,0 +1,21 @@ +receivers: + # Collect own metrics + prometheus/own_metrics: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: ['0.0.0.0:{{.PrometheusPort}}'] +exporters: + otlphttp/own_metrics: + metrics_endpoint: "{{.MetricsEndpoint}}" + +service: + telemetry: + metrics: + address: ":{{.PrometheusPort}}" + pipelines: + metrics/own_metrics: + receivers: [prometheus/own_metrics] + exporters: [otlphttp/own_metrics] diff --git a/cmd/opampsupervisor/testdata/collector/bad_config.yaml b/cmd/opampsupervisor/testdata/collector/bad_config.yaml new file mode 100644 index 000000000000..f9a17d198368 --- /dev/null +++ b/cmd/opampsupervisor/testdata/collector/bad_config.yaml @@ -0,0 +1,11 @@ +receivers: + doesntexist: + +exporters: + doesntexist: + +service: + pipelines: + traces: + receivers: [doesntexist] + exporters: [doesntexist] diff --git a/cmd/opampsupervisor/testdata/collector/effective_config.yaml b/cmd/opampsupervisor/testdata/collector/effective_config.yaml new file mode 100644 index 000000000000..58d6940011b6 --- /dev/null +++ b/cmd/opampsupervisor/testdata/collector/effective_config.yaml @@ -0,0 +1,11 @@ +extensions: + health_check: + endpoint: localhost:8000 +service: + extensions: + - health_check + telemetry: + logs: + encoding: json + resource: + service.name: otelcol diff --git a/cmd/opampsupervisor/testdata/collector/simple_pipeline.yaml b/cmd/opampsupervisor/testdata/collector/simple_pipeline.yaml new file mode 100644 index 000000000000..e78c379f7ba6 --- /dev/null +++ b/cmd/opampsupervisor/testdata/collector/simple_pipeline.yaml @@ -0,0 +1,14 @@ +receivers: + filelog: + include: [{{.inputLogFile}}] + start_at: "beginning" + +exporters: + file: + path: {{.outputLogFile}} + +service: + pipelines: + logs: + receivers: [filelog] + exporters: [file] diff --git a/cmd/opampsupervisor/testdata/supervisor/supervisor_accepts_conn.yaml b/cmd/opampsupervisor/testdata/supervisor/supervisor_accepts_conn.yaml new file mode 100644 index 000000000000..0282577b252a --- /dev/null +++ b/cmd/opampsupervisor/testdata/supervisor/supervisor_accepts_conn.yaml @@ -0,0 +1,15 @@ +server: + endpoint: ws://{{.url}}/v1/opamp + tls: + insecure: true + +capabilities: + reports_effective_config: true + reports_own_metrics: true + reports_health: true + accepts_remote_config: true + reports_remote_config: true + accepts_opamp_connection_settings: true + +agent: + executable: ../../bin/otelcontribcol_{{.goos}}_{{.goarch}}{{.extension}} diff --git a/cmd/opampsupervisor/testdata/supervisor/supervisor_basic.yaml b/cmd/opampsupervisor/testdata/supervisor/supervisor_basic.yaml new file mode 100644 index 000000000000..b5ef4c5db720 --- /dev/null +++ b/cmd/opampsupervisor/testdata/supervisor/supervisor_basic.yaml @@ -0,0 +1,14 @@ +server: + endpoint: ws://{{.url}}/v1/opamp + tls: + insecure: true + +capabilities: + reports_effective_config: true + reports_own_metrics: true + reports_health: true + accepts_remote_config: true + reports_remote_config: true + +agent: + executable: ../../bin/otelcontribcol_{{.goos}}_{{.goarch}}{{.extension}} diff --git a/cmd/opampsupervisor/testdata/supervisor/supervisor_nocap.yaml b/cmd/opampsupervisor/testdata/supervisor/supervisor_nocap.yaml new file mode 100644 index 000000000000..5b61ad4b1b68 --- /dev/null +++ b/cmd/opampsupervisor/testdata/supervisor/supervisor_nocap.yaml @@ -0,0 +1,14 @@ +server: + endpoint: ws://{{.url}}/v1/opamp + tls: + insecure: true + +capabilities: + reports_effective_config: false + reports_own_metrics: false + reports_health: false + accepts_remote_config: false + reports_remote_config: false + +agent: + executable: ../../bin/otelcontribcol_{{.goos}}_{{.goarch}}{{.extension}} diff --git a/cmd/opampsupervisor/testdata/supervisor/supervisor_test.yaml b/cmd/opampsupervisor/testdata/supervisor/supervisor_test.yaml new file mode 100644 index 000000000000..bdcdc2e72c93 --- /dev/null +++ b/cmd/opampsupervisor/testdata/supervisor/supervisor_test.yaml @@ -0,0 +1,14 @@ +server: + endpoint: wss://127.0.0.1:4320/v1/opamp + tls: + insecure_skip_verify: true + +capabilities: + reports_effective_config: true + reports_own_metrics: true + reports_health: true + accepts_remote_config: true + reports_remote_config: true + +agent: + executable: ../../bin/otelcontribcol_darwin_arm64 diff --git a/cmd/otelcontribcol/Makefile b/cmd/otelcontribcol/Makefile index ded7a36092dc..1994cf483835 100644 --- a/cmd/otelcontribcol/Makefile +++ b/cmd/otelcontribcol/Makefile @@ -1 +1,4 @@ include ../../Makefile.Common + +lint: checklicense misspell + @echo "skipping lint: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/29449" diff --git a/cmd/otelcontribcol/builder-config.yaml b/cmd/otelcontribcol/builder-config.yaml index 4edb91745c62..f85d4e11d8f2 100644 --- a/cmd/otelcontribcol/builder-config.yaml +++ b/cmd/otelcontribcol/builder-config.yaml @@ -2,212 +2,226 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-contrib/cmd/otelcontribcol name: otelcontribcol description: Local OpenTelemetry Collector Contrib binary, testing only. - version: 0.89.0-dev - otelcol_version: 0.89.0 + version: 0.98.0-dev + otelcol_version: 0.97.0 extensions: - - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 - - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecstaskobserver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/oidcauthextension v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.89.0 - import: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.89.0 - import: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage + - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 + - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecstaskobserver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/oidcauthextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/remotetapextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/solarwindsapmsettingsextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.98.0 + import: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jaegerencodingextension v0.98.0 + import: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jaegerencodingextension + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jsonlogencodingextension v0.98.0 + import: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jsonlogencodingextension + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/textencodingextension v0.98.0 + import: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/textencodingextension + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/zipkinencodingextension v0.98.0 + import: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/zipkinencodingextension exporters: - - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.89.0 - - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.89.0 - - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0 - - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.89.0 + - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 + - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.98.0 + - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0 + - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alertmanagerexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.98.0 processors: - - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 - - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/redactionprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/sumologicprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/remotetapprocessor v0.89.0 + - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 + - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/redactionprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/sumologicprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/remotetapprocessor v0.98.0 receivers: - - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachesparkreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureblobreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureeventhubreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azuremonitorreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/chronyreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudflarereceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filestatsreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filereceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/lokireceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/oracledbreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/pulsarreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefareceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/wavefrontreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/webhookeventreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.89.0 + - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.98.0 + - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachesparkreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureblobreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureeventhubreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azuremonitorreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/chronyreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudflarereceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filestatsreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/lokireceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/namedpipereceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/oracledbreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/pulsarreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefareceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/wavefrontreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/webhookeventreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.98.0 connectors: - - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.89.0 + - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.98.0 replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage => ../../extension/storage + - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage => ../../extension/storage/dbstorage + - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage => ../../extension/storage/filestorage - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal => ../../pkg/batchpersignal - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs => ../../internal/aws/cwlogs - - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter => ../../exporter/f5cloudexporter - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => ../../internal/common - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver => ../../receiver/awsxrayreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureblobreceiver => ../../receiver/azureblobreceiver @@ -234,7 +248,6 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy => ../../extension/awsproxy - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin => ../../pkg/translator/zipkin - github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor => ../../processor/groupbyattrsprocessor - - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter => ../../exporter/tanzuobservabilityexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter => ../../exporter/skywalkingexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter => ../../exporter/mezmoexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter => ../../exporter/clickhouseexporter @@ -256,6 +269,7 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter => ../../exporter/googlemanagedprometheusexporter - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver => ../../receiver/aerospikereceiver - github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor => ../../processor/cumulativetodeltaprocessor + - github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor => ../../processor/intervalprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver => ../../receiver/sapmreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver => ../../receiver/zipkinreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver => ../../receiver/jaegerreceiver @@ -267,7 +281,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 @@ -300,6 +313,7 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver => ../../receiver/redisreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension => ../../extension/basicauthextension - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter => ../../exporter/influxdbexporter + - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alertmanagerexporter => ../../exporter/alertmanagerexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter => ../../exporter/alibabacloudlogserviceexporter - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger => ../../pkg/translator/jaeger - github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker => ../../internal/docker @@ -336,7 +350,6 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver => ../../receiver/cloudfoundryreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter => ../../internal/filter - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver => ../../receiver/activedirectorydsreceiver - - github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor => ../../processor/spanmetricsprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor => ../../processor/routingprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor => ../../processor/deltatorateprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter => ../../exporter/datadogexporter @@ -348,7 +361,6 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbreceiver => ../../receiver/mongodbreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite => ../../pkg/translator/prometheusremotewrite - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver => ../../receiver/filelogreceiver - - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filereceiver => ../../receiver/filereceiver - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter => ../../exporter/signalfxexporter - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver => ../../receiver/solacereceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver => ../../receiver/iisreceiver @@ -358,6 +370,7 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry => ../../pkg/resourcetotelemetry - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => ../../pkg/golden - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter => ../../exporter/opencensusexporter + - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter => ../../exporter/opensearchexporter - github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders => ../../internal/metadataproviders - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy => ../../internal/aws/proxy - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver => ../../receiver/snmpreceiver @@ -368,7 +381,7 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver => ../../receiver/expvarreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver => ../../receiver/apachereceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachesparkreceiver => ../../receiver/apachesparkreceiver - - github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder => ../../extension/httpforwarder + - github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension => ../../extension/httpforwarderextension - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter => ../../exporter/elasticsearchexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter => ../../exporter/awscloudwatchlogsexporter - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver => ../../receiver/googlecloudspannerreceiver @@ -389,10 +402,10 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver => ../../receiver/googlecloudpubsubreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter => ../../exporter/sumologicexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter => ../../exporter/instanaexporter + - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter => ../../exporter/honeycombmarkerexporter - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver => ../../receiver/otlpjsonfilereceiver - github.com/open-telemetry/opentelemetry-collector-contrib/processor/redactionprocessor => ../../processor/redactionprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling => ../../extension/jaegerremotesampling - - github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor => ../../processor/datadogprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver => ../../receiver/sshcheckreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver => ../../receiver/datadogreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/chronyreceiver => ../../receiver/chronyreceiver @@ -416,6 +429,7 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector => ../../connector/countconnector - github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector => ../../connector/datadogconnector - github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector => ../../connector/exceptionsconnector + - github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector => ../../connector/grafanacloudconnector - github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector => ../../connector/routingconnector - github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector => ../../connector/servicegraphconnector - github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector => ../../connector/spanmetricsconnector @@ -430,3 +444,15 @@ replaces: - github.com/go-kit/kit => github.com/go-kit/kit v0.12.0 # see https://github.com/mongodb/mongo-go-driver/pull/1485 (v1.13.0 was retracted) - go.mongodb.org/mongo-driver => go.mongodb.org/mongo-driver v1.12.1 + - github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding => ../../extension/encoding + - github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension => ../../extension/encoding/otlpencodingextension + - github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/zipkinencodingextension => ../../extension/encoding/zipkinencodingextension + - github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jsonlogencodingextension => ../../extension/encoding/jsonlogencodingextension + - github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/textencodingextension => ../../extension/encoding/textencodingextension + - github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jaegerencodingextension => ../../extension/encoding/jaegerencodingextension + - github.com/open-telemetry/opentelemetry-collector-contrib/extension/remotetapextension => ../../extension/remotetapextension + - 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/extension/sumologicextension => ../../extension/sumologicextension + - 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 449cd50ad7e3..62cb58b6d5a4 100644 --- a/cmd/otelcontribcol/components.go +++ b/cmd/otelcontribcol/components.go @@ -7,7 +7,7 @@ import ( forwardconnector "go.opentelemetry.io/collector/connector/forwardconnector" "go.opentelemetry.io/collector/exporter" debugexporter "go.opentelemetry.io/collector/exporter/debugexporter" - loggingexporter "go.opentelemetry.io/collector/exporter/loggingexporter" + nopexporter "go.opentelemetry.io/collector/exporter/nopexporter" otlpexporter "go.opentelemetry.io/collector/exporter/otlpexporter" otlphttpexporter "go.opentelemetry.io/collector/exporter/otlphttpexporter" "go.opentelemetry.io/collector/extension" @@ -18,14 +18,17 @@ import ( batchprocessor "go.opentelemetry.io/collector/processor/batchprocessor" memorylimiterprocessor "go.opentelemetry.io/collector/processor/memorylimiterprocessor" "go.opentelemetry.io/collector/receiver" + nopreceiver "go.opentelemetry.io/collector/receiver/nopreceiver" otlpreceiver "go.opentelemetry.io/collector/receiver/otlpreceiver" countconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector" datadogconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector" exceptionsconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector" + grafanacloudconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector" routingconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector" servicegraphconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector" spanmetricsconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector" + alertmanagerexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alertmanagerexporter" alibabacloudlogserviceexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter" awscloudwatchlogsexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter" awsemfexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter" @@ -42,11 +45,11 @@ import ( datasetexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter" dynatraceexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter" elasticsearchexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter" - f5cloudexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter" fileexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter" googlecloudexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter" googlecloudpubsubexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter" googlemanagedprometheusexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter" + honeycombmarkerexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter" influxdbexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter" instanaexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter" kafkaexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter" @@ -56,6 +59,7 @@ import ( lokiexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter" mezmoexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter" opencensusexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter" + opensearchexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter" prometheusexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter" prometheusremotewriteexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter" pulsarexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter" @@ -66,16 +70,20 @@ import ( splunkhecexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter" sumologicexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter" syslogexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter" - tanzuobservabilityexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter" tencentcloudlogserviceexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter" zipkinexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter" asapauthextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension" awsproxy "github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy" basicauthextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension" bearertokenauthextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension" + jaegerencodingextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jaegerencodingextension" + jsonlogencodingextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jsonlogencodingextension" + otlpencodingextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension" + textencodingextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/textencodingextension" + zipkinencodingextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/zipkinencodingextension" headerssetterextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension" healthcheckextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension" - httpforwarder "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder" + httpforwarderextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension" jaegerremotesampling "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling" oauth2clientauthextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension" dockerobserver "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver" @@ -84,17 +92,21 @@ import ( hostobserver "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver" k8sobserver "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver" oidcauthextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/oidcauthextension" + opampextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension" pprofextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension" + remotetapextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/remotetapextension" sigv4authextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension" + solarwindsapmsettingsextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/solarwindsapmsettingsextension" dbstorage "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage" filestorage "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage" + sumologicextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension" attributesprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor" cumulativetodeltaprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor" - datadogprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor" deltatorateprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor" filterprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor" groupbyattrsprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor" groupbytraceprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor" + intervalprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor" k8sattributesprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor" metricsgenerationprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor" metricstransformprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor" @@ -104,8 +116,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" tailsamplingprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor" @@ -134,7 +144,6 @@ import ( elasticsearchreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver" expvarreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver" filelogreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver" - filereceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filereceiver" filestatsreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filestatsreceiver" flinkmetricsreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver" fluentforwardreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver" @@ -159,6 +168,7 @@ import ( mongodbatlasreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver" mongodbreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbreceiver" mysqlreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver" + namedpipereceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/namedpipereceiver" nginxreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver" nsxtreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver" opencensusreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver" @@ -211,7 +221,7 @@ func components() (otelcol.Factories, error) { bearertokenauthextension.NewFactory(), headerssetterextension.NewFactory(), healthcheckextension.NewFactory(), - httpforwarder.NewFactory(), + httpforwarderextension.NewFactory(), jaegerremotesampling.NewFactory(), oauth2clientauthextension.NewFactory(), ecsobserver.NewFactory(), @@ -220,16 +230,26 @@ func components() (otelcol.Factories, error) { k8sobserver.NewFactory(), dockerobserver.NewFactory(), oidcauthextension.NewFactory(), + opampextension.NewFactory(), pprofextension.NewFactory(), + remotetapextension.NewFactory(), sigv4authextension.NewFactory(), - filestorage.NewFactory(), + solarwindsapmsettingsextension.NewFactory(), dbstorage.NewFactory(), + filestorage.NewFactory(), + sumologicextension.NewFactory(), + otlpencodingextension.NewFactory(), + jaegerencodingextension.NewFactory(), + jsonlogencodingextension.NewFactory(), + textencodingextension.NewFactory(), + zipkinencodingextension.NewFactory(), ) if err != nil { return otelcol.Factories{}, err } factories.Receivers, err = receiver.MakeFactoryMap( + nopreceiver.NewFactory(), otlpreceiver.NewFactory(), activedirectorydsreceiver.NewFactory(), aerospikereceiver.NewFactory(), @@ -256,7 +276,6 @@ func components() (otelcol.Factories, error) { expvarreceiver.NewFactory(), filelogreceiver.NewFactory(), filestatsreceiver.NewFactory(), - filereceiver.NewFactory(), flinkmetricsreceiver.NewFactory(), fluentforwardreceiver.NewFactory(), googlecloudpubsubreceiver.NewFactory(), @@ -280,6 +299,7 @@ func components() (otelcol.Factories, error) { mongodbatlasreceiver.NewFactory(), mongodbreceiver.NewFactory(), mysqlreceiver.NewFactory(), + namedpipereceiver.NewFactory(), nginxreceiver.NewFactory(), nsxtreceiver.NewFactory(), opencensusreceiver.NewFactory(), @@ -324,9 +344,10 @@ func components() (otelcol.Factories, error) { factories.Exporters, err = exporter.MakeFactoryMap( debugexporter.NewFactory(), - loggingexporter.NewFactory(), + nopexporter.NewFactory(), otlpexporter.NewFactory(), otlphttpexporter.NewFactory(), + alertmanagerexporter.NewFactory(), alibabacloudlogserviceexporter.NewFactory(), awscloudwatchlogsexporter.NewFactory(), awsemfexporter.NewFactory(), @@ -343,11 +364,11 @@ func components() (otelcol.Factories, error) { datasetexporter.NewFactory(), dynatraceexporter.NewFactory(), elasticsearchexporter.NewFactory(), - f5cloudexporter.NewFactory(), fileexporter.NewFactory(), googlecloudexporter.NewFactory(), googlecloudpubsubexporter.NewFactory(), googlemanagedprometheusexporter.NewFactory(), + honeycombmarkerexporter.NewFactory(), influxdbexporter.NewFactory(), instanaexporter.NewFactory(), kafkaexporter.NewFactory(), @@ -357,6 +378,7 @@ func components() (otelcol.Factories, error) { lokiexporter.NewFactory(), mezmoexporter.NewFactory(), opencensusexporter.NewFactory(), + opensearchexporter.NewFactory(), prometheusexporter.NewFactory(), prometheusremotewriteexporter.NewFactory(), pulsarexporter.NewFactory(), @@ -367,7 +389,6 @@ func components() (otelcol.Factories, error) { splunkhecexporter.NewFactory(), sumologicexporter.NewFactory(), syslogexporter.NewFactory(), - tanzuobservabilityexporter.NewFactory(), tencentcloudlogserviceexporter.NewFactory(), zipkinexporter.NewFactory(), ) @@ -380,11 +401,11 @@ func components() (otelcol.Factories, error) { memorylimiterprocessor.NewFactory(), attributesprocessor.NewFactory(), cumulativetodeltaprocessor.NewFactory(), - datadogprocessor.NewFactory(), deltatorateprocessor.NewFactory(), filterprocessor.NewFactory(), groupbyattrsprocessor.NewFactory(), groupbytraceprocessor.NewFactory(), + intervalprocessor.NewFactory(), k8sattributesprocessor.NewFactory(), metricsgenerationprocessor.NewFactory(), metricstransformprocessor.NewFactory(), @@ -393,8 +414,6 @@ func components() (otelcol.Factories, error) { resourcedetectionprocessor.NewFactory(), resourceprocessor.NewFactory(), routingprocessor.NewFactory(), - servicegraphprocessor.NewFactory(), - spanmetricsprocessor.NewFactory(), sumologicprocessor.NewFactory(), spanprocessor.NewFactory(), tailsamplingprocessor.NewFactory(), @@ -410,6 +429,7 @@ func components() (otelcol.Factories, error) { countconnector.NewFactory(), datadogconnector.NewFactory(), exceptionsconnector.NewFactory(), + grafanacloudconnector.NewFactory(), routingconnector.NewFactory(), servicegraphconnector.NewFactory(), spanmetricsconnector.NewFactory(), diff --git a/cmd/otelcontribcol/distribution_metadata_test.go b/cmd/otelcontribcol/distribution_metadata_test.go index fd0a4751bafa..6fcd865ec441 100644 --- a/cmd/otelcontribcol/distribution_metadata_test.go +++ b/cmd/otelcontribcol/distribution_metadata_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/provider/fileprovider" ) @@ -35,46 +36,53 @@ func TestComponentsArePresent(t *testing.T) { tt.Skip("no status present, skipping", metadataComponent) return } - inDevelopment := true - deprecated := true + inDevelopment := len(m.Status.Stability) == 0 + deprecated := false + inUse := false for stability, pipelines := range m.Status.Stability { - if stability != "development" && len(pipelines) > 0 { - inDevelopment = false - break - } - if stability != "deprecated" && len(pipelines) > 0 { - deprecated = false - break + if len(pipelines) > 0 { + switch stability { + case "development": + inDevelopment = true + case "deprecated": + deprecated = true + case "unmaintained": + // consider not in use. + default: // alpha, beta, stable + inUse = true + } } } - if inDevelopment { + if inDevelopment && !inUse { tt.Skip("component in development, skipping", metadataComponent) return } - if deprecated { + if deprecated && !inUse { tt.Skip("component deprecated, skipping", metadataComponent) return } + + cType := component.MustNewType(m.Type) switch m.Status.Class { case "connector": - assert.NotNil(tt, components.Connectors[component.Type(m.Type)], "missing connector: %s", m.Type) + assert.NotNil(tt, components.Connectors[cType], "missing connector: %s", m.Type) case "exporter": - assert.NotNil(tt, components.Exporters[component.Type(m.Type)], "missing exporter: %s", m.Type) + assert.NotNil(tt, components.Exporters[cType], "missing exporter: %s", m.Type) case "extension": - assert.NotNil(tt, components.Extensions[component.Type(m.Type)], "missing extension: %s", m.Type) + assert.NotNil(tt, components.Extensions[cType], "missing extension: %s", m.Type) case "processor": - assert.NotNil(tt, components.Processors[component.Type(m.Type)], "missing processor: %s", m.Type) + assert.NotNil(tt, components.Processors[cType], "missing processor: %s", m.Type) case "receiver": - assert.NotNil(tt, components.Receivers[component.Type(m.Type)], "missing receiver: %s", m.Type) + assert.NotNil(tt, components.Receivers[cType], "missing receiver: %s", m.Type) } }) } } func loadMetadata(filePath string) (metadata, error) { - cp, err := fileprovider.New().Retrieve(context.Background(), "file:"+filePath, nil) + cp, err := fileprovider.NewWithSettings(confmap.ProviderSettings{}).Retrieve(context.Background(), "file:"+filePath, nil) if err != nil { return metadata{}, err } @@ -85,7 +93,7 @@ func loadMetadata(filePath string) (metadata, error) { } md := metadata{} - if err := conf.Unmarshal(&md); err != nil { + if err := conf.Unmarshal(&md, confmap.WithIgnoreUnused()); err != nil { return md, err } diff --git a/cmd/otelcontribcol/exporters_test.go b/cmd/otelcontribcol/exporters_test.go index ea2443a4456f..6355a1e4d328 100644 --- a/cmd/otelcontribcol/exporters_test.go +++ b/cmd/otelcontribcol/exporters_test.go @@ -1,28 +1,32 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - package main import ( "context" "errors" "path/filepath" + "runtime" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configgrpc" + "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/exporter/otlpexporter" "go.opentelemetry.io/collector/exporter/otlphttpexporter" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alertmanagerexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter" @@ -38,8 +42,8 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter" dtconf "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter/config" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter" - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter" @@ -49,6 +53,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter" @@ -59,11 +64,9 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter" - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" ) func TestDefaultExporters(t *testing.T) { @@ -88,7 +91,7 @@ func TestDefaultExporters(t *testing.T) { // disable queue/retry to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -101,9 +104,10 @@ func TestDefaultExporters(t *testing.T) { exporter: "file", getConfigFn: func() component.Config { cfg := expFactories["file"].CreateDefaultConfig().(*fileexporter.Config) - cfg.Path = filepath.Join(t.TempDir(), "random.file") + cfg.Path = filepath.Join(t.TempDir(), "file.exporter.random.file") return cfg }, + skipLifecycle: runtime.GOOS == "windows", // On Windows not all handles are closed when the exporter is shutdown. }, { exporter: "kafka", @@ -114,7 +118,7 @@ func TestDefaultExporters(t *testing.T) { cfg.Metadata.Full = false // disable queue/retry to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -122,19 +126,27 @@ func TestDefaultExporters(t *testing.T) { { exporter: "debug", }, - { - exporter: "logging", - }, { exporter: "opencensus", getConfigFn: func() component.Config { cfg := expFactories["opencensus"].CreateDefaultConfig().(*opencensusexporter.Config) - cfg.GRPCClientSettings = configgrpc.GRPCClientSettings{ + cfg.ClientConfig = configgrpc.ClientConfig{ Endpoint: endpoint, } // disable queue/retry to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false + return cfg + }, + expectConsumeErr: true, + }, + { + exporter: "opensearch", + getConfigFn: func() component.Config { + cfg := expFactories["opensearch"].CreateDefaultConfig().(*opensearchexporter.Config) + cfg.ClientConfig = confighttp.ClientConfig{ + Endpoint: "http://" + endpoint, + } return cfg }, expectConsumeErr: true, @@ -143,12 +155,12 @@ func TestDefaultExporters(t *testing.T) { exporter: "otlp", getConfigFn: func() component.Config { cfg := expFactories["otlp"].CreateDefaultConfig().(*otlpexporter.Config) - cfg.GRPCClientSettings = configgrpc.GRPCClientSettings{ + cfg.ClientConfig = configgrpc.ClientConfig{ Endpoint: endpoint, } // disable queue/retry to validate passing the test data synchronously - cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.QueueConfig.Enabled = false + cfg.RetryConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -159,8 +171,8 @@ func TestDefaultExporters(t *testing.T) { cfg := expFactories["otlphttp"].CreateDefaultConfig().(*otlphttpexporter.Config) cfg.Endpoint = "http://" + endpoint // disable queue/retry to validate passing the test data synchronously - cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.QueueConfig.Enabled = false + cfg.RetryConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -179,7 +191,7 @@ func TestDefaultExporters(t *testing.T) { cfg := expFactories["prometheusremotewrite"].CreateDefaultConfig().(*prometheusremotewriteexporter.Config) // disable queue/retry to validate passing the test data synchronously cfg.RemoteWriteQueue.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -200,7 +212,7 @@ func TestDefaultExporters(t *testing.T) { cfg.Endpoint = "http://" + endpoint // disable queue/retry to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -214,7 +226,7 @@ func TestDefaultExporters(t *testing.T) { cfg.APIURL = "http://" + endpoint // disable queue/retry to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -227,7 +239,7 @@ func TestDefaultExporters(t *testing.T) { cfg.Endpoint = "http://" + endpoint // disable queue/retry to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -239,7 +251,7 @@ func TestDefaultExporters(t *testing.T) { cfg.Endpoint = endpoint // disable queue/retry to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -253,6 +265,22 @@ func TestDefaultExporters(t *testing.T) { }, skipLifecycle: true, }, + { + exporter: "alertmanager", + getConfigFn: func() component.Config { + cfg := expFactories["alertmanager"].CreateDefaultConfig().(*alertmanagerexporter.Config) + cfg.ClientConfig = confighttp.ClientConfig{ + Endpoint: "http://" + endpoint, + } + cfg.GeneratorURL = "opentelemetry-collector" + cfg.DefaultSeverity = "info" + // disable queue/retry to validate passing the test data synchronously + cfg.QueueSettings.Enabled = false + cfg.BackoffConfig.Enabled = false + return cfg + }, + expectConsumeErr: true, + }, { exporter: "alibabacloud_logservice", getConfigFn: func() component.Config { @@ -341,7 +369,7 @@ func TestDefaultExporters(t *testing.T) { cfg.Metrics.Endpoint = endpoint // disable queue/retry to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -353,7 +381,7 @@ func TestDefaultExporters(t *testing.T) { cfg.API.Key = "cutedogsgotoheaven" // disable queue/retry to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -366,7 +394,7 @@ func TestDefaultExporters(t *testing.T) { cfg.APIKey = "secret-key" // disable queue/retry to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -380,7 +408,7 @@ func TestDefaultExporters(t *testing.T) { cfg.APIToken = "dynamictracing" // disable queue/retry to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -395,20 +423,6 @@ func TestDefaultExporters(t *testing.T) { return cfg }, }, - { - exporter: "f5cloud", - getConfigFn: func() component.Config { - cfg := expFactories["f5cloud"].CreateDefaultConfig().(*f5cloudexporter.Config) - cfg.Endpoint = "http://" + endpoint - cfg.Source = "magic-source" - cfg.AuthConfig.CredentialFile = filepath.Join(t.TempDir(), "random.file") - // disable queue/retry to validate passing the test data synchronously - cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false - return cfg - }, - skipLifecycle: true, - }, { exporter: "googlecloud", skipLifecycle: true, // Requires credentials to be able to successfully load the exporter @@ -421,6 +435,18 @@ func TestDefaultExporters(t *testing.T) { exporter: "googlecloudpubsub", skipLifecycle: true, }, + { + exporter: "honeycombmarker", + getConfigFn: func() component.Config { + cfg := expFactories["honeycombmarker"].CreateDefaultConfig().(*honeycombmarkerexporter.Config) + cfg.Endpoint = "http://" + endpoint + // disable queue to validate passing the test data synchronously + cfg.QueueSettings.Enabled = false + cfg.BackOffConfig.Enabled = false + return cfg + }, + expectConsumeErr: true, + }, { exporter: "influxdb", getConfigFn: func() component.Config { @@ -428,7 +454,7 @@ func TestDefaultExporters(t *testing.T) { cfg.Endpoint = "http://" + endpoint // disable queue to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, skipLifecycle: true, @@ -458,7 +484,7 @@ func TestDefaultExporters(t *testing.T) { cfg := expFactories["logicmonitor"].CreateDefaultConfig().(*logicmonitorexporter.Config) // disable queue to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, skipLifecycle: true, @@ -470,7 +496,7 @@ func TestDefaultExporters(t *testing.T) { cfg.Endpoint = "http://" + endpoint // disable queue to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -482,7 +508,7 @@ func TestDefaultExporters(t *testing.T) { cfg.Endpoint = "http://" + endpoint // disable queue to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -494,7 +520,7 @@ func TestDefaultExporters(t *testing.T) { cfg.Endpoint = "http://" + endpoint // disable queue to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, }, @@ -512,7 +538,7 @@ func TestDefaultExporters(t *testing.T) { cfg := expFactories["skywalking"].CreateDefaultConfig().(*skywalkingexporter.Config) // disable queue to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, skipLifecycle: true, @@ -524,7 +550,7 @@ func TestDefaultExporters(t *testing.T) { cfg.Endpoint = "http://" + endpoint // disable queue to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -536,20 +562,7 @@ func TestDefaultExporters(t *testing.T) { cfg.Endpoint = "http://" + endpoint // disable queue to validate passing the test data synchronously cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false - return cfg - }, - expectConsumeErr: true, - }, - { - exporter: "tanzuobservability", - getConfigFn: func() component.Config { - cfg := expFactories["tanzuobservability"].CreateDefaultConfig().(*tanzuobservabilityexporter.Config) - cfg.Traces.Endpoint = "http://" + endpoint - cfg.Metrics.Endpoint = "http://" + endpoint - // disable queue to validate passing the test data synchronously - cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false return cfg }, expectConsumeErr: true, @@ -622,19 +635,19 @@ func verifyExporterLifecycle(t *testing.T, factory exporter.Factory, getConfigFn assert.NotPanics(t, func() { switch e := exp.(type) { case exporter.Logs: - logs := testdata.GenerateLogsManyLogRecordsSameResource(2) + logs := generateTestLogs() if !e.Capabilities().MutatesData { logs.MarkReadOnly() } err = e.ConsumeLogs(ctx, logs) case exporter.Metrics: - metrics := testdata.GenerateMetricsTwoMetrics() + metrics := generateTestMetrics() if !e.Capabilities().MutatesData { metrics.MarkReadOnly() } err = e.ConsumeMetrics(ctx, metrics) case exporter.Traces: - traces := testdata.GenerateTracesTwoSpansSameResource() + traces := generateTestTraces() if !e.Capabilities().MutatesData { traces.MarkReadOnly() } @@ -649,6 +662,41 @@ func verifyExporterLifecycle(t *testing.T, factory exporter.Factory, getConfigFn } } +func generateTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.Gauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} + // verifyExporterShutdown is used to test if an exporter type can be shutdown without being started first. func verifyExporterShutdown(tb testing.TB, factory exporter.Factory, getConfigFn getExporterConfigFn) { ctx := context.Background() diff --git a/cmd/otelcontribcol/extensions_test.go b/cmd/otelcontribcol/extensions_test.go index b7b076be4db3..fc943100b82f 100644 --- a/cmd/otelcontribcol/extensions_test.go +++ b/cmd/otelcontribcol/extensions_test.go @@ -1,10 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - package main import ( @@ -29,12 +25,14 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension" - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder" + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecstaskobserver" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver" + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension" + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/remotetapextension" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage" @@ -151,7 +149,7 @@ func TestDefaultExtensions(t *testing.T) { { extension: "http_forwarder", getConfigFn: func() component.Config { - cfg := extFactories["http_forwarder"].CreateDefaultConfig().(*httpforwarder.Config) + cfg := extFactories["http_forwarder"].CreateDefaultConfig().(*httpforwarderextension.Config) cfg.Egress.Endpoint = "http://" + endpoint cfg.Ingress.Endpoint = testutil.GetAvailableLocalAddress(t) return cfg @@ -217,6 +215,39 @@ func TestDefaultExtensions(t *testing.T) { return extFactories["jaegerremotesampling"].CreateDefaultConfig().(*jaegerremotesampling.Config) }, }, + { + extension: "otlp_encoding", + }, + { + extension: "text_encoding", + }, + { + extension: "jaeger_encoding", + }, + { + extension: "json_log_encoding", + }, + { + extension: "zipkin_encoding", + }, + { + extension: "remotetap", + getConfigFn: func() component.Config { + return extFactories["remotetap"].CreateDefaultConfig().(*remotetapextension.Config) + }, + }, + { + extension: "opamp", + getConfigFn: func() component.Config { + cfg := extFactories["opamp"].CreateDefaultConfig().(*opampextension.Config) + cfg.Server.WS.Endpoint = "wss://" + endpoint + return cfg + }, + }, + { + extension: "solarwindsapmsettings", + skipLifecycle: true, // Requires Solarwinds APM endpoint and token + }, } extensionCount := 0 @@ -261,8 +292,11 @@ type getExtensionConfigFn func() component.Config // the test can't be done with the default configuration for the component. func verifyExtensionLifecycle(t *testing.T, factory extension.Factory, getConfigFn getExtensionConfigFn) { ctx := context.Background() - host := newAssertNoErrorHost(t) + host := componenttest.NewNopHost() extCreateSet := extensiontest.NewNopCreateSettings() + extCreateSet.ReportStatus = func(event *component.StatusEvent) { + require.NoError(t, event.Err()) + } if getConfigFn == nil { getConfigFn = factory.CreateDefaultConfig @@ -300,23 +334,3 @@ func verifyExtensionShutdown(tb testing.TB, factory extension.Factory, getConfig assert.NoError(tb, e.Shutdown(ctx)) }) } - -// assertNoErrorHost implements a component.Host that asserts that there were no errors. -type assertNoErrorHost struct { - component.Host - *testing.T -} - -var _ component.Host = (*assertNoErrorHost)(nil) - -// newAssertNoErrorHost returns a new instance of assertNoErrorHost. -func newAssertNoErrorHost(t *testing.T) component.Host { - return &assertNoErrorHost{ - componenttest.NewNopHost(), - t, - } -} - -func (aneh *assertNoErrorHost) ReportFatalError(err error) { - assert.NoError(aneh, err) -} diff --git a/cmd/otelcontribcol/go.mod b/cmd/otelcontribcol/go.mod index 4e73936b1e97..f9fd461b8a32 100644 --- a/cmd/otelcontribcol/go.mod +++ b/cmd/otelcontribcol/go.mod @@ -2,248 +2,263 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/otelcontribcol -go 1.20 +go 1.22.0 + +toolchain go1.22.2 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecstaskobserver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/oidcauthextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/redactionprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/remotetapprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/sumologicprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachesparkreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureblobreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureeventhubreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azuremonitorreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/chronyreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudflarereceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filereceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filestatsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/lokireceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/oracledbreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/pulsarreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefareceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/wavefrontreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/webhookeventreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.89.0 - github.com/prometheus/prometheus v0.48.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configgrpc v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/connector v0.89.0 - go.opentelemetry.io/collector/connector/forwardconnector v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/exporter/debugexporter v0.89.0 - go.opentelemetry.io/collector/exporter/loggingexporter v0.89.0 - go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0 - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/extension/ballastextension v0.89.0 - go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 - go.opentelemetry.io/collector/otelcol v0.89.0 - go.opentelemetry.io/collector/processor v0.89.0 - go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 - go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.89.0 - go.opentelemetry.io/collector/receiver v0.89.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 - golang.org/x/sys v0.15.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alertmanagerexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jaegerencodingextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jsonlogencodingextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/textencodingextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/zipkinencodingextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecstaskobserver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/oidcauthextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/remotetapextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/solarwindsapmsettingsextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/redactionprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/remotetapprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/sumologicprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachesparkreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureblobreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureeventhubreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azuremonitorreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/chronyreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudflarereceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filestatsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/lokireceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/namedpipereceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/oracledbreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/pulsarreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefareceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/wavefrontreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/webhookeventreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.98.0 + github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configgrpc v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 + go.opentelemetry.io/collector/connector v0.98.0 + go.opentelemetry.io/collector/connector/forwardconnector v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 + go.opentelemetry.io/collector/exporter/nopexporter v0.98.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/extension/ballastextension v0.98.0 + go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 + go.opentelemetry.io/collector/otelcol v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0 + go.opentelemetry.io/collector/receiver v0.98.0 + go.opentelemetry.io/collector/receiver/nopreceiver v0.98.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 + golang.org/x/sys v0.19.0 ) require ( - bitbucket.org/atlassian/go-asap/v2 v2.6.0 // indirect - cloud.google.com/go v0.111.0 // indirect - cloud.google.com/go/compute v1.23.2 // indirect + bitbucket.org/atlassian/go-asap/v2 v2.8.0 // indirect + cloud.google.com/go v0.112.2 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect - cloud.google.com/go/iam v1.1.4 // indirect - cloud.google.com/go/logging v1.8.1 // indirect - cloud.google.com/go/longrunning v0.5.3 // indirect - cloud.google.com/go/monitoring v1.16.2 // indirect - cloud.google.com/go/pubsub v1.33.0 // indirect - cloud.google.com/go/spanner v1.51.0 // indirect - cloud.google.com/go/trace v1.10.3 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/logging v1.9.0 // indirect + cloud.google.com/go/longrunning v0.5.5 // indirect + cloud.google.com/go/monitoring v1.18.0 // indirect + cloud.google.com/go/pubsub v1.37.0 // indirect + cloud.google.com/go/spanner v1.60.0 // indirect + cloud.google.com/go/trace v1.10.5 // indirect code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c // indirect code.cloudfoundry.org/go-diodes v0.0.0-20211115184647-b584dd5df32c // indirect code.cloudfoundry.org/go-loggregator v7.4.0+incompatible // indirect code.cloudfoundry.org/rfc5424 v0.0.0-20201103192249-000122071b78 // indirect - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect + filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect github.com/AthenZ/athenz v1.10.39 // indirect github.com/Azure/azure-amqp-common-go/v4 v4.2.0 // indirect - github.com/Azure/azure-event-hubs-go/v3 v3.6.1 // indirect - github.com/Azure/azure-kusto-go v0.13.1 // indirect + github.com/Azure/azure-event-hubs-go/v3 v3.6.2 // indirect + github.com/Azure/azure-kusto-go v0.15.2 // indirect github.com/Azure/azure-pipeline-go v0.2.3 // indirect github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.8.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 // indirect - github.com/Azure/azure-storage-queue-go v0.0.0-20191125232315-636801874cdd // indirect - github.com/Azure/go-amqp v1.0.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 // indirect + github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe // indirect + github.com/Azure/go-amqp v1.0.5 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.29 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect @@ -252,189 +267,189 @@ require ( github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect - github.com/ClickHouse/ch-go v0.58.2 // indirect - github.com/ClickHouse/clickhouse-go/v2 v2.15.0 // indirect - github.com/DataDog/agent-payload/v5 v5.0.89 // indirect - github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-api-client-go/v2 v2.18.0 // indirect - github.com/DataDog/datadog-go/v5 v5.1.1 // indirect - github.com/DataDog/go-sqllexer v0.0.8 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect + github.com/ClickHouse/ch-go v0.61.5 // indirect + github.com/ClickHouse/clickhouse-go/v2 v2.23.0 // indirect + github.com/Code-Hex/go-generics-cache v1.3.1 // indirect + github.com/DataDog/agent-payload/v5 v5.0.111 // indirect + github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-api-client-go/v2 v2.24.0 // indirect + github.com/DataDog/datadog-go/v5 v5.5.0 // indirect + github.com/DataDog/go-sqllexer v0.0.9 // indirect github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect - github.com/DataDog/gohai v0.0.0-20220718130825-1776f9beb9cc // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 // indirect - github.com/DataDog/sketches-go v1.4.3 // indirect + github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.4 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4 // 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 - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.45.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.45.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.21.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.45.0 // indirect - github.com/IBM/sarama v1.42.1 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.46.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0 // indirect + github.com/IBM/sarama v1.43.1 // indirect github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/Microsoft/hcsshim v0.11.4 // indirect + github.com/Microsoft/hcsshim v0.12.0-rc.3 // indirect github.com/ReneKroon/ttlcache/v2 v2.11.0 // indirect - github.com/SAP/go-hdb v1.6.2 // indirect - github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 // indirect + github.com/SAP/go-hdb v1.8.12 // indirect + github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/aerospike/aerospike-client-go/v6 v6.13.0 // indirect - github.com/alecthomas/participle/v2 v2.1.0 // indirect - github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect - github.com/aliyun/aliyun-log-go-sdk v0.1.63 // indirect - github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-00010101000000-000000000000 // indirect - github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-00010101000000-000000000000 // indirect - github.com/andybalholm/brotli v1.0.6 // indirect - github.com/antonmedv/expr v1.15.3 // indirect - github.com/apache/arrow/go/v12 v12.0.1 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect + github.com/aliyun/aliyun-log-go-sdk v0.1.72 // indirect + github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-20240419190856-2f880467f335 // indirect + github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20240415183253-230331014d2c // indirect + github.com/andybalholm/brotli v1.1.0 // indirect + github.com/apache/arrow/go/v15 v15.0.0 // indirect github.com/apache/pulsar-client-go v0.8.1 // indirect github.com/apache/pulsar-client-go/oauth2 v0.0.0-20220120090717-25e59572242e // indirect - github.com/apache/thrift v0.19.0 // indirect + github.com/apache/thrift v0.20.0 // indirect github.com/ardielle/ardielle-go v1.5.2 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.47.10 // indirect - github.com/aws/aws-sdk-go-v2 v1.22.2 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 // indirect - github.com/aws/aws-sdk-go-v2/config v1.24.0 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.15.2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3 // indirect + github.com/aws/aws-sdk-go v1.51.17 // indirect + github.com/aws/aws-sdk-go-v2 v1.26.1 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect + github.com/aws/aws-sdk-go-v2/config v1.27.11 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.11 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // 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.2.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 // indirect - github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.1 // indirect + github.com/aws/aws-sdk-go-v2/service/kinesis v1.27.4 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 // indirect - github.com/aws/smithy-go v1.16.0 // indirect + github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.29.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect + github.com/aws/smithy-go v1.20.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect github.com/buger/jsonparser v1.1.1 // indirect - github.com/caio/go-tdigest/v4 v4.0.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/checkpoint-restore/go-criu/v5 v5.3.0 // indirect github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect - github.com/cilium/ebpf v0.9.1 // indirect + github.com/cilium/ebpf v0.11.0 // indirect github.com/cloudfoundry-incubator/uaago v0.0.0-20190307164349-8136b7bbe76e // indirect - github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect - github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect - github.com/containerd/cgroups v1.1.0 // indirect - github.com/containerd/cgroups/v3 v3.0.2 // indirect + github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa // indirect + github.com/containerd/cgroups/v3 v3.0.3 // indirect github.com/containerd/console v1.0.3 // indirect - github.com/containerd/containerd v1.7.7 // indirect + github.com/containerd/errdefs v0.1.0 // indirect github.com/containerd/ttrpc v1.2.2 // indirect - github.com/coreos/go-oidc v2.2.1+incompatible // indirect + github.com/coreos/go-oidc/v3 v3.10.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cskr/pubsub v1.0.2 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/denisenkom/go-mssqldb v0.12.2 // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/devigned/tab v0.1.1 // indirect - github.com/digitalocean/godo v1.104.1 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.7+incompatible // indirect - github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 // indirect + github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect + github.com/digitalocean/godo v1.109.0 // indirect + github.com/distribution/reference v0.5.0 // indirect + github.com/docker/docker v25.0.5+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/dynatrace-oss/dynatrace-metric-utils-go v0.5.0 // indirect - github.com/eapache/go-resiliency v1.4.0 // indirect + github.com/eapache/go-resiliency v1.6.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect github.com/eapache/queue v1.1.0 // indirect github.com/elastic/go-elasticsearch/v7 v7.17.10 // indirect github.com/elastic/go-structform v0.0.10 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/envoyproxy/go-control-plane v0.11.1 // indirect - github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect + github.com/envoyproxy/go-control-plane v0.12.0 // indirect + github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect github.com/euank/go-kmsg-parser v2.0.0+incompatible // indirect - github.com/facebook/time v0.0.0-20220713225404-f7a0d7702d50 // indirect + github.com/expr-lang/expr v1.16.3 // indirect + github.com/facebook/time v0.0.0-20240109160331-d1456d1a6bac // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect - github.com/getsentry/sentry-go v0.25.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-faster/city v1.0.1 // indirect - github.com/go-faster/errors v0.6.1 // indirect - github.com/go-kit/kit v0.12.0 // indirect + github.com/go-faster/errors v0.7.1 // indirect + github.com/go-jose/go-jose/v4 v4.0.1 // indirect + github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.3.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/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.4 // indirect - github.com/go-redis/redis/v7 v7.4.1 // indirect - github.com/go-resty/resty/v2 v2.7.0 // indirect - github.com/go-sql-driver/mysql v1.7.1 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.20.4 // indirect + github.com/go-openapi/swag v0.22.9 // indirect + github.com/go-resty/resty/v2 v2.11.0 // indirect + github.com/go-sql-driver/mysql v1.8.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.2 // indirect - github.com/gocql/gocql v1.3.2 // indirect + github.com/gocql/gocql v1.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect - github.com/gofrs/uuid v4.2.0+incompatible // indirect + github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/golang-jwt/jwt/v5 v5.0.0 // indirect - github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect + github.com/golang-jwt/jwt/v5 v5.2.1 // indirect + github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/cadvisor v0.48.1 // indirect - github.com/google/flatbuffers v23.1.21+incompatible // indirect + github.com/google/cadvisor v0.49.0 // indirect + github.com/google/flatbuffers v23.5.26+incompatible // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gophercloud/gophercloud v1.7.0 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect + github.com/gophercloud/gophercloud v1.8.0 // indirect github.com/gorilla/mux v1.8.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect - github.com/gosnmp/gosnmp v1.35.0 // indirect - github.com/grafana/loki/pkg/push v0.0.0-20230321110627-5c3d204ebf5d // indirect + github.com/gorilla/websocket v1.5.1 // indirect + github.com/gosnmp/gosnmp v1.37.0 // indirect + github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect - github.com/grobie/gomemcache v0.0.0-20180201122607-1f779c573665 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect + github.com/grobie/gomemcache v0.0.0-20230213081705-239240bbc445 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect - github.com/hashicorp/consul/api v1.25.1 // indirect + github.com/hashicorp/consul/api v1.28.2 // indirect github.com/hashicorp/cronexpr v1.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.4 // indirect @@ -442,181 +457,189 @@ require ( github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c // indirect + github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702 // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/hetznercloud/hcloud-go/v2 v2.4.0 // indirect + github.com/hetznercloud/hcloud-go/v2 v2.6.0 // indirect github.com/iancoleman/strcase v0.3.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 // indirect + github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 // indirect github.com/influxdata/influxdb-observability/common v0.5.8 // indirect github.com/influxdata/influxdb-observability/influx2otel v0.5.8 // indirect github.com/influxdata/influxdb-observability/otel2influx v0.5.8 // indirect github.com/influxdata/line-protocol/v2 v2.2.1 // indirect - github.com/ionos-cloud/sdk-go/v6 v6.1.9 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.11 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.14.0 // indirect + github.com/jackc/pgconn v1.14.3 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgproto3/v2 v2.3.2 // indirect + github.com/jackc/pgproto3/v2 v2.3.3 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/jackc/pgtype v1.14.0 // indirect - github.com/jackc/pgx/v4 v4.18.1 // indirect - github.com/jaegertracing/jaeger v1.48.0 // indirect + github.com/jackc/pgx/v4 v4.18.3 // indirect + github.com/jaegertracing/jaeger v1.55.0 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect github.com/jcmturner/gofork v1.7.6 // indirect + github.com/jcmturner/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/jellydator/ttlcache/v3 v3.1.0 // indirect + github.com/jellydator/ttlcache/v3 v3.2.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/julienschmidt/httprouter v1.3.0 // indirect github.com/karrick/godirwalk v1.17.0 // indirect - github.com/klauspost/asmfmt v1.3.2 // indirect - github.com/klauspost/compress v1.17.2 // indirect - github.com/klauspost/cpuid/v2 v2.2.3 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect github.com/kr/fs v0.1.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 // indirect github.com/leoluk/perflib_exporter v0.2.1 // indirect + github.com/lestrrat-go/strftime v1.0.6 // indirect github.com/lib/pq v1.10.9 // indirect github.com/lightstep/go-expohisto v1.0.0 // indirect github.com/linkedin/goavro/v2 v2.9.8 // indirect - github.com/linode/linodego v1.23.0 // indirect - github.com/logicmonitor/lm-data-sdk-go v1.0.0 // indirect + github.com/linode/linodego v1.30.0 // indirect + github.com/logicmonitor/lm-data-sdk-go v1.3.0 // indirect github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-ieproxy v0.0.1 // indirect + github.com/mattn/go-ieproxy v0.0.11 // indirect github.com/mattn/go-isatty v0.0.19 // indirect - github.com/mattn/go-sqlite3 v1.14.18 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/mattn/go-sqlite3 v1.14.22 // indirect github.com/microsoft/ApplicationInsights-Go v0.4.4 // indirect - github.com/miekg/dns v1.1.56 // indirect - github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect - github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect + github.com/microsoft/go-mssqldb v1.7.0 // indirect + github.com/miekg/dns v1.1.58 // indirect github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/go-ps v1.0.0 // indirect github.com/mitchellh/hashstructure v1.1.0 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect + github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/sys/mountinfo v0.6.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mongodb-forks/digest v1.0.5 // indirect + github.com/mongodb-forks/digest v1.1.0 // indirect github.com/montanaflynn/stats v0.7.0 // indirect github.com/mostynb/go-grpc-compression v1.2.2 // indirect github.com/mrunalp/fileutils v0.5.1 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect - github.com/nginxinc/nginx-prometheus-exporter v0.8.1-0.20201110005315-f5a5f8086c19 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/collectd v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/loki v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/skywalking v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.89.0 // indirect + github.com/nginxinc/nginx-prometheus-exporter v0.11.0 // indirect + github.com/oklog/ulid/v2 v2.1.0 // indirect + github.com/open-telemetry/opamp-go v0.14.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/collectd v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/loki v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/skywalking v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.98.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/runc v1.1.12 // indirect - github.com/opencontainers/runtime-spec v1.1.0-rc.3 // indirect - github.com/opencontainers/selinux v1.11.0 // indirect + github.com/opencontainers/runtime-spec v1.1.0 // indirect + github.com/opencontainers/selinux v1.10.1 // indirect + github.com/opensearch-project/opensearch-go/v2 v2.3.0 // indirect github.com/openshift/api v3.9.0+incompatible // indirect github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/openzipkin/zipkin-go v0.4.2 // indirect github.com/outcaste-io/ristretto v0.2.1 // indirect github.com/ovh/go-ovh v1.4.3 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect - github.com/paulmach/orb v0.10.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/paulmach/orb v0.11.1 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/philhofer/fwd v1.1.2 // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect - github.com/pierrec/lz4/v4 v4.1.18 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect + github.com/pierrec/lz4/v4 v4.1.21 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pkg/sftp v1.13.5 // indirect + github.com/pkg/sftp v1.13.6 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect github.com/pquerna/cachecontrol v0.1.0 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.52.2 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect + github.com/prometheus/procfs v0.13.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/relvacode/iso8601 v1.3.0 // indirect + github.com/redis/go-redis/v9 v9.5.1 // indirect + github.com/relvacode/iso8601 v1.4.0 // indirect github.com/rs/cors v1.10.1 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 // indirect - github.com/scalyr/dataset-go v0.14.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/samber/lo v1.38.1 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 // indirect + github.com/scalyr/dataset-go v0.18.0 // indirect github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 // indirect github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect github.com/segmentio/asm v1.2.0 // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 // indirect - github.com/signalfx/sapm-proto v0.13.0 // indirect - github.com/sijms/go-ora/v2 v2.7.20 // indirect + github.com/signalfx/sapm-proto v0.14.0 // indirect + github.com/sijms/go-ora/v2 v2.8.11 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/snowflakedb/gosnowflake v1.6.25 // indirect + github.com/snowflakedb/gosnowflake v1.9.0 // indirect github.com/soheilhy/cmux v0.1.5 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cobra v1.8.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/spf13/viper v1.18.2 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.792 // indirect - github.com/tg123/go-htpasswd v1.2.1 // indirect - github.com/tidwall/gjson v1.10.2 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.896 // indirect + github.com/tg123/go-htpasswd v1.2.2 // indirect + github.com/tidwall/gjson v1.14.2 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/tinylru v1.1.0 // indirect @@ -625,110 +648,113 @@ require ( github.com/tinylib/msgp v1.1.9 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect + github.com/valyala/fastjson v1.6.4 // indirect github.com/vincent-petithory/dataurl v1.0.0 // indirect github.com/vishvananda/netlink v1.2.1-beta.2 // indirect - github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect - github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f // indirect - github.com/vmware/govmomi v0.33.1 // indirect + github.com/vishvananda/netns v0.0.4 // indirect + github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e // indirect + github.com/vmware/govmomi v0.36.3 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect - github.com/wavefronthq/wavefront-sdk-go v0.15.0 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect - go.etcd.io/bbolt v1.3.8 // indirect - go.mongodb.org/atlas v0.35.0 // indirect - go.mongodb.org/mongo-driver v1.13.0 // indirect + go.etcd.io/bbolt v1.3.9 // indirect + go.mongodb.org/atlas v0.36.0 // indirect + go.mongodb.org/mongo-driver v1.14.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.89.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/collector/service v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect - go.opentelemetry.io/contrib/zpages v0.45.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk v1.20.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/collector/service v0.98.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.25.0 // indirect + go.opentelemetry.io/contrib/zpages v0.50.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.16.0 // indirect - golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/term v0.15.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.16.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/api v0.150.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.19.0 // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/api v0.172.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect - gopkg.in/square/go-jose.v2 v2.5.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 // indirect - k8s.io/api v0.28.4 // indirect - k8s.io/apimachinery v0.28.4 // indirect - k8s.io/client-go v0.28.4 // indirect - k8s.io/klog v1.0.0 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/kubelet v0.28.3 // indirect - k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect - sigs.k8s.io/controller-runtime v0.16.3 // indirect + k8s.io/api v0.30.0 // indirect + k8s.io/apimachinery v0.30.0 // indirect + k8s.io/client-go v0.30.0 // indirect + k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect + k8s.io/kubelet v0.30.0 // indirect + k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect + sigs.k8s.io/controller-runtime v0.17.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect - skywalking.apache.org/repo/goapi v0.0.0-20231026090926-09378dd56587 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect + skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4 // indirect ) replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage => ../../extension/storage +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage => ../../extension/storage/dbstorage + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage => ../../extension/storage/filestorage + replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal => ../../pkg/batchpersignal replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs => ../../internal/aws/cwlogs -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter => ../../exporter/f5cloudexporter - replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => ../../internal/common replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver => ../../receiver/awsxrayreceiver @@ -781,8 +807,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor => ../../processor/groupbyattrsprocessor -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter => ../../exporter/tanzuobservabilityexporter - replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter => ../../exporter/skywalkingexporter replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter => ../../exporter/mezmoexporter @@ -825,6 +849,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aeros replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor => ../../processor/cumulativetodeltaprocessor +replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor => ../../processor/intervalprocessor + replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver => ../../receiver/sapmreceiver replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver => ../../receiver/zipkinreceiver @@ -847,8 +873,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 @@ -913,6 +937,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/basi replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter => ../../exporter/influxdbexporter +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alertmanagerexporter => ../../exporter/alertmanagerexporter + replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter => ../../exporter/alibabacloudlogserviceexporter replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger => ../../pkg/translator/jaeger @@ -985,8 +1011,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/filte replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver => ../../receiver/activedirectorydsreceiver -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor => ../../processor/spanmetricsprocessor - replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor => ../../processor/routingprocessor replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor => ../../processor/deltatorateprocessor @@ -1009,8 +1033,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver => ../../receiver/filelogreceiver -replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filereceiver => ../../receiver/filereceiver - replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter => ../../exporter/signalfxexporter replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver => ../../receiver/solacereceiver @@ -1029,6 +1051,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter => ../../exporter/opencensusexporter +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter => ../../exporter/opensearchexporter + replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders => ../../internal/metadataproviders replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy => ../../internal/aws/proxy @@ -1049,7 +1073,7 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apach replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachesparkreceiver => ../../receiver/apachesparkreceiver -replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder => ../../extension/httpforwarder +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension => ../../extension/httpforwarderextension replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter => ../../exporter/elasticsearchexporter @@ -1091,14 +1115,14 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumol replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter => ../../exporter/instanaexporter +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter => ../../exporter/honeycombmarkerexporter + replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver => ../../receiver/otlpjsonfilereceiver replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/redactionprocessor => ../../processor/redactionprocessor replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling => ../../extension/jaegerremotesampling -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor => ../../processor/datadogprocessor - replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver => ../../receiver/sshcheckreceiver replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver => ../../receiver/datadogreceiver @@ -1143,6 +1167,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/connector/data replace github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector => ../../connector/exceptionsconnector +replace github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector => ../../connector/grafanacloudconnector + replace github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector => ../../connector/routingconnector replace github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector => ../../connector/servicegraphconnector @@ -1166,3 +1192,27 @@ replace github.com/amazon-contributing/opentelemetry-collector-contrib/override/ replace github.com/go-kit/kit => github.com/go-kit/kit v0.12.0 replace go.mongodb.org/mongo-driver => go.mongodb.org/mongo-driver v1.12.1 + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding => ../../extension/encoding + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension => ../../extension/encoding/otlpencodingextension + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/zipkinencodingextension => ../../extension/encoding/zipkinencodingextension + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jsonlogencodingextension => ../../extension/encoding/jsonlogencodingextension + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/textencodingextension => ../../extension/encoding/textencodingextension + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jaegerencodingextension => ../../extension/encoding/jaegerencodingextension + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/remotetapextension => ../../extension/remotetapextension + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension => ../../extension/opampextension + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/solarwindsapmsettingsextension => ../../extension/solarwindsapmsettingsextension + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension => ../../extension/sumologicextension + +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 8446157298af..49c7d9aed063 100644 --- a/cmd/otelcontribcol/go.sum +++ b/cmd/otelcontribcol/go.sum @@ -1,11 +1,10 @@ -bitbucket.org/atlassian/go-asap/v2 v2.6.0 h1:KiLw3IgbzFLqNxCrVZoKUDJKMxUGoOd+NEOYXGEBhJ0= -bitbucket.org/atlassian/go-asap/v2 v2.6.0/go.mod h1:cuRgWb7eeGtsocKmqY2kPlMMlwpkeNh+QOIkjAMlUBc= +bitbucket.org/atlassian/go-asap/v2 v2.8.0 h1:JL4jktrZT3H8GHkkeJ1RCdhJ5YcOyVccA/2TJ4ae3I0= +bitbucket.org/atlassian/go-asap/v2 v2.8.0/go.mod h1:cuRgWb7eeGtsocKmqY2kPlMMlwpkeNh+QOIkjAMlUBc= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -18,49 +17,47 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.111.0 h1:YHLKNupSD1KqjDbQ3+LVdQ81h/UJbJyZG203cEfnQgM= -cloud.google.com/go v0.111.0/go.mod h1:0mibmpKP1TyOOFYQY5izo0LnT+ecvOQ0Sg3OdmMiNRU= +cloud.google.com/go v0.112.2 h1:ZaGT6LiG7dBzi6zNOvVZwacaXlmf3lRqnC4DQzqyRQw= +cloud.google.com/go v0.112.2/go.mod h1:iEqjp//KquGIJV/m+Pk3xecgKNhV+ry+vVTsy4TbDms= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.2 h1:nWEMDhgbBkBJjfpVySqU4jgWdc22PLR0o4vEexZHers= -cloud.google.com/go/compute v1.23.2/go.mod h1:JJ0atRC0J/oWYiiVBmsSsrRnh92DhZPG4hFDcR04Rns= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= 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= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v1.1.4 h1:K6n/GZHFTtEoKT5aUG3l9diPi0VduZNQ1PfdnpkkIFk= -cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= -cloud.google.com/go/logging v1.8.1 h1:26skQWPeYhvIasWKm48+Eq7oUqdcdbwsCVwz5Ys0FvU= -cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= -cloud.google.com/go/longrunning v0.5.3 h1:maKa7O9YTzmVzwdlRKr981U1Ys2auup6rpeMt8y3+RU= -cloud.google.com/go/longrunning v0.5.3/go.mod h1:y/0ga59EYu58J6SHmmQOvekvND2qODbu8ywBBW7EK7Y= -cloud.google.com/go/monitoring v1.16.2 h1:gx7BDZcoRqX5DfuJzw9LdhVjEkqCLmDXScdnrmIy9ik= -cloud.google.com/go/monitoring v1.16.2/go.mod h1:B44KGwi4ZCF8Rk/5n+FWeispDXoKSk9oss2QNlXJBgc= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= +cloud.google.com/go/logging v1.9.0 h1:iEIOXFO9EmSiTjDmfpbRjOxECO7R8C7b8IXUGOj7xZw= +cloud.google.com/go/logging v1.9.0/go.mod h1:1Io0vnZv4onoUnsVUQY3HZ3Igb1nBchky0A0y7BBBhE= +cloud.google.com/go/longrunning v0.5.5 h1:GOE6pZFdSrTb4KAiKnXsJBtlE6mEyaW44oKyMILWnOg= +cloud.google.com/go/longrunning v0.5.5/go.mod h1:WV2LAxD8/rg5Z1cNW6FJ/ZpX4E4VnDnoTk0yawPBB7s= +cloud.google.com/go/monitoring v1.18.0 h1:NfkDLQDG2UR3WYZVQE8kwSbUIEyIqJUPl+aOQdFH1T4= +cloud.google.com/go/monitoring v1.18.0/go.mod h1:c92vVBCeq/OB4Ioyo+NbN2U7tlg5ZH41PZcdvfc+Lcg= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.33.0 h1:6SPCPvWav64tj0sVX/+npCBKhUi/UjJehy9op/V3p2g= -cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= -cloud.google.com/go/spanner v1.51.0 h1:l3exhhsVMKsx1E7Xd1QajYSvHmI1KZoWPW5tRxIIdvQ= -cloud.google.com/go/spanner v1.51.0/go.mod h1:c5KNo5LQ1X5tJwma9rSQZsXNBDNvj4/n8BVc3LNahq0= +cloud.google.com/go/pubsub v1.37.0 h1:0uEEfaB1VIJzabPpwpZf44zWAKAme3zwKKxHk7vJQxQ= +cloud.google.com/go/pubsub v1.37.0/go.mod h1:YQOQr1uiUM092EXwKs56OPT650nwnawc+8/IjoUeGzQ= +cloud.google.com/go/spanner v1.60.0 h1:O9kf49dfaDRzPpKJNChHUJ+Bao02WPedZb8ZPyi02lI= +cloud.google.com/go/spanner v1.60.0/go.mod h1:D2bOAeT/dC6zsZhXRIxbdYa5nQEYU3wYM/1KN3eg7Fs= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/trace v1.10.3 h1:yiQ2EdegdiZDPwNPoUqGYAMd0wNValT/NRsC1XGyBJ0= -cloud.google.com/go/trace v1.10.3/go.mod h1:Ke1bgfc73RV3wUFml+uQp7EsDw4dGaETLxB7Iq/r4CY= +cloud.google.com/go/trace v1.10.5 h1:0pr4lIKJ5XZFYD9GtxXEWr0KkVeigc3wlGpZco0X1oA= +cloud.google.com/go/trace v1.10.5/go.mod h1:9hjCV1nGBCtXbAE4YK7OqJ8pmPYSxPA0I67JwRd5s3M= code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c h1:5eeuG0BHx1+DHeT3AP+ISKZ2ht1UjGhm581ljqYpVeQ= code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= code.cloudfoundry.org/go-diodes v0.0.0-20211115184647-b584dd5df32c h1:N2GMlHc/SJQk7BkaME/kDHaciVTy4NuRmxVJLhnqKK8= @@ -69,10 +66,11 @@ code.cloudfoundry.org/go-loggregator v7.4.0+incompatible h1:KqZYloMQWM5Zg/BQKunO code.cloudfoundry.org/go-loggregator v7.4.0+incompatible/go.mod h1:KPBTRqj+y738Nhf1+g4JHFaBU8j7dedirR5ETNHvMXU= code.cloudfoundry.org/rfc5424 v0.0.0-20201103192249-000122071b78 h1:mrZQaZmuDIPhSp6b96b+CRKC2uH44ifa5cjDV2epKis= code.cloudfoundry.org/rfc5424 v0.0.0-20201103192249-000122071b78/go.mod h1:tkZo8GtzBjySJ7USvxm4E36lNQw1D3xM6oKHGqdaAJ4= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= 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.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= @@ -82,42 +80,47 @@ github.com/AthenZ/athenz v1.10.39 h1:mtwHTF/v62ewY2Z5KWhuZgVXftBej1/Tn80zx4DcawY github.com/AthenZ/athenz v1.10.39/go.mod h1:3Tg8HLsiQZp81BJY58JBeU2BR6B/H4/0MQGfCwhHNEA= github.com/Azure/azure-amqp-common-go/v4 v4.2.0 h1:q/jLx1KJ8xeI8XGfkOWMN9XrXzAfVTkyvCxPvHCjd2I= github.com/Azure/azure-amqp-common-go/v4 v4.2.0/go.mod h1:GD3m/WPPma+621UaU6KNjKEo5Hl09z86viKwQjTpV0Q= -github.com/Azure/azure-event-hubs-go/v3 v3.6.1 h1:vSiMmn3tOwgiLyfnmhT5K6Of/3QWRLaaNZPI0hFvZyU= -github.com/Azure/azure-event-hubs-go/v3 v3.6.1/go.mod h1:i2NByb9Pr2na7y8wi/XefEVKkuA2CDUjCNoWQJtTsGo= -github.com/Azure/azure-kusto-go v0.13.1 h1:0w4CmUTROT8qbLbKq921PhCb7mIfRFWeDu4iJxrNEOM= -github.com/Azure/azure-kusto-go v0.13.1/go.mod h1:AyWTO0r50y7rAkxkTveLtn80njNyXpJP5WADvoSZ/P4= +github.com/Azure/azure-event-hubs-go/v3 v3.6.2 h1:7rNj1/iqS/i3mUKokA2n2eMYO72TB7lO7OmpbKoakKY= +github.com/Azure/azure-event-hubs-go/v3 v3.6.2/go.mod h1:n+ocYr9j2JCLYqUqz9eI+lx/TEAtL/g6rZzyTFSuIpc= +github.com/Azure/azure-kusto-go v0.15.2 h1:OlABJilic9TythSgWW6i8Fd0SgNTg0t9jBu6WVsaixM= +github.com/Azure/azure-kusto-go v0.15.2/go.mod h1:9F2zvXH8B6eWzgI1S4k1ZXAIufnBZ1bv1cW1kB1n3D0= github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U= github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 h1:9kDVnTz3vbfweTqAUmk/a/pH5pWFCHtvRpHYC0G/dcA= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0/go.mod h1:3Ug6Qzto9anB6mGlEdgYMDF5zHQ+wwhEaYR4s17PHMw= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= -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/resourcemanager/compute/armcompute/v4 v4.2.1 h1:UPeCRD+XY7QlaGQte2EVI2iOcWvUYA2XY8w5T/8v0NQ= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1/go.mod h1:oGV6NlB0cvi1ZbYRR2UN44QHxWFyGk+iylgD0qaMXjA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.8.0 h1:dKxKBzh+XIEoYNmx/c8HeiwghuRExXf61WmVotWESeA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.8.0/go.mod h1:kzRLpzzlw6eBUXE7eBw3oqfmKR/kxaHOk4+h9sAe6Yo= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 h1:QM6sE5k2ZT/vI5BEe0r7mqjsUSnhVBFbOsVkEuaEfiA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 h1:bWh0Z2rOEDfB/ywv/l0iHN1JgyazE6kW/aIA89+CEK0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1/go.mod h1:Bzf34hhAE9NSxailk8xVeLEZbUjOXcC+GnU1mMKdhLw= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0/go.mod h1:s1tW/At+xHqjNFvWU4G0c0Qv33KOhvbGNj0RCTQDV8s= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0 h1:Ma67P/GGprNwsslzEH6+Kb8nybI8jpDTm4Wmzu2ReK8= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 h1:gggzg0SUMs6SQbEw+3LoSsYf9YMjkupeAnHMX8O9mmY= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0/go.mod h1:+6KLcKIVgxoBDMqMO/Nvy7bZ9a0nbU3I1DtFQK3YvB4= -github.com/Azure/azure-storage-queue-go v0.0.0-20191125232315-636801874cdd h1:b3wyxBl3vvr15tUAziPBPK354y+LSdfPCpex5oBttHo= -github.com/Azure/azure-storage-queue-go v0.0.0-20191125232315-636801874cdd/go.mod h1:K6am8mT+5iFXgingS9LUc7TmbsW6XBw3nxaRyaMyWc8= -github.com/Azure/go-amqp v1.0.2 h1:zHCHId+kKC7fO8IkwyZJnWMvtRXhYC0VJtD0GYkHc6M= -github.com/Azure/go-amqp v1.0.2/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 h1:FDif4R1+UUR+00q6wquyX90K7A8dN+R5E8GEadoP7sU= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2/go.mod h1:aiYBYui4BJ/BJCAIKs92XiPyQfTaBWqvHujDwKb6CBU= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 h1:MxA59PGoCFb+vCwRQi3PhQEwHj4+r2dhuv9HG+vM7iM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0/go.mod h1:uYt4CfhkJA9o0FN7jfE5minm/i4nUE4MjGUJkzB6Zs8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 h1:PTFGRSlMKCQelWwxUyYVEUqseBJVemLyqWJjvMyt0do= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0/go.mod h1:LRr2FzBTQlONPPa5HREE5+RjSCTXl7BwOvYOaWTqCaI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.0.0 h1:pPvTJ1dY0sA35JOeFq6TsY2xj6Z85Yo23Pj4wCCvu4o= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.0.0/go.mod h1:mLfWfj8v3jfWKsL9G4eoBoXVcsqcIUTapmdKy7uGOp0= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0 h1:Ds0KRF8ggpEGg4Vo42oX1cIt/IfOhHWJBikksZbVxeg= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0/go.mod h1:jj6P8ybImR+5topJ+eH6fgcemSFBmU6/6bFF8KkwuDI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 h1:bXwSugBiSbgtz7rOtbfGf+woewp4f06orW9OP5BjHLA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0/go.mod h1:Y/HgrePTmGy9HjdSGTqZNa+apUpTVIEVKXJyARP2lrk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 h1:Dd+RhdJn0OTtVGaeDLZpcumkIVCtA/3/Fo42+eoYvVM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0/go.mod h1:5kakwfW5CjC9KK+Q4wjXAg+ShuIm2mBMua0ZFj2C8PE= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0/go.mod h1:T5RfihdXtBDxt1Ch2wobif3TvzTdumDy29kahv6AV9A= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1 h1:MyVTgWR8qd/Jw1Le0NZebGBUCLbtak3bJ3z1OlqZBpw= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1/go.mod h1:GpPjLhVR9dnUoJMyHWSPy71xY9/lcmpzIPZXmF0FCVY= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 h1:D3occbWoio4EBLkbkevetNMAVX197GkzbUMtqjGWn80= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0/go.mod h1:bTSOgj05NGRuHHhQwAdPnYr9TOdNmKlZTgGLL6nyAdI= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 h1:YUUxeiOWgdAQE3pXt2H7QXzZs0q8UBjgRbl56qo8GYM= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2/go.mod h1:dmXQgZuiSubAecswZE+Sm8jkvEa7kQgTPVRvwL/nd0E= +github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe h1:HGuouUM1533rBXmMtR7qh5pYNSSjUZG90b/MgJAnb/A= +github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe/go.mod h1:K6am8mT+5iFXgingS9LUc7TmbsW6XBw3nxaRyaMyWc8= +github.com/Azure/go-amqp v1.0.5 h1:po5+ljlcNSU8xtapHTe8gIc8yHxCzC03E8afH2g1ftU= +github.com/Azure/go-amqp v1.0.5/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= @@ -128,7 +131,9 @@ github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 h1:iM6UAvjR97ZIeR93qTcwpKNMpV+/FTWjwEbuPD495Tk= +github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 h1:LXl088ZQlP0SBppGFsRZonW6hSvwgL5gRByMbvUbx8U= +github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= @@ -143,89 +148,93 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= -github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ClickHouse/ch-go v0.58.2 h1:jSm2szHbT9MCAB1rJ3WuCJqmGLi5UTjlNu+f530UTS0= -github.com/ClickHouse/ch-go v0.58.2/go.mod h1:Ap/0bEmiLa14gYjCiRkYGbXvbe8vwdrfTYWhsuQ99aw= -github.com/ClickHouse/clickhouse-go/v2 v2.15.0 h1:G0hTKyO8fXXR1bGnZ0DY3vTG01xYfOGW76zgjg5tmC4= -github.com/ClickHouse/clickhouse-go/v2 v2.15.0/go.mod h1:kXt1SRq0PIRa6aKZD7TnFnY9PQKmc2b13sHtOYcK6cQ= -github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= -github.com/DataDog/agent-payload/v5 v5.0.89 h1:uuLWf/exyNYBnheG9OH2dOWZpCJvaEHX3W9CAd8KarU= -github.com/DataDog/agent-payload/v5 v5.0.89/go.mod h1:oQZi1VZp1e3QvlSUX4iphZCpJaFepUxWq0hNXxihKBM= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1 h1:W6IVI3zWwoJGcFagJ/kwltFL1IIErBZzcBy994PQsQE= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1/go.mod h1:A4nLJvxlg6BO/8/zg81til9yT0uRPuXDFMAzDMpmgn4= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1 h1:zDhs0MnT72cZOxxbPjkGI00NMYgsydOanBX3GZHuS1I= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1/go.mod h1:HvK26YCxg6MfYvPJgpHC7nSjw6DTpNhd75Wlb0GAvis= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1 h1:EywptZStgHbDWLScnHfaCj6QNb698DY68pCnPEQrsts= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1/go.mod h1:Vc+snp0Bey4MrrJyiV2tVxxJb6BmLomPvN1RgAvjGaQ= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1 h1:A1uj4IMFs4rWp5LRalsqqnoC1f7QuYuN/b6/L7k4KCc= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1/go.mod h1:Q84EzSKpY/HtasusZM4ZPuYqbPQEbmIcAGzd7tXUX1I= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1 h1:iJSVz+YsndcMA/yYNih/qmuvwD1AR7IYX0cXXePpeys= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1/go.mod h1:JUOECuM5XcoxjEPs30C568vGBWtqScjnsC2KXY1OQ7Y= -github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1 h1:NK2kcRdv/r0WycAlGD2JFSmOcNvazzilPvZzk3l105g= -github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1/go.mod h1:RMBDVajNx78CpFHnbat0aIGcwVQZp8s+smRlcJkvZGg= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1 h1:SgaCKuX9e3O5eLRIr+zqW1dlIw/TP3RDKQZUa2FfF8c= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1/go.mod h1:eTXti9mx7qhkoi+Qg3mMmvVY5McghUUgsf4Hrk9zY8k= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1 h1:aCDYC/AkDS/EOm4GV1bFmiev6pTt+Qjj1yGBJv8U7+k= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1/go.mod h1:EOGgNrSPskIxY3+KgCl+yEggMjrGqrA2oL5va+/p2jM= -github.com/DataDog/datadog-api-client-go/v2 v2.18.0 h1:QkX1vY1JtvDeF6N6EarPrJMHlerVGdTvGQOUWqfeVDs= -github.com/DataDog/datadog-api-client-go/v2 v2.18.0/go.mod h1:lHlfhsNQ2qZclvpVQTfrGowUDIdIzAao38A05f9EQpc= +github.com/ClickHouse/ch-go v0.61.5 h1:zwR8QbYI0tsMiEcze/uIMK+Tz1D3XZXLdNrlaOpeEI4= +github.com/ClickHouse/ch-go v0.61.5/go.mod h1:s1LJW/F/LcFs5HJnuogFMta50kKDO0lf9zzfrbl0RQg= +github.com/ClickHouse/clickhouse-go/v2 v2.23.0 h1:srmRrkS0BR8gEut87u8jpcZ7geOob6nGj9ifrb+aKmg= +github.com/ClickHouse/clickhouse-go/v2 v2.23.0/go.mod h1:tBhdF3f3RdP7sS59+oBAtTyhWpy0024ZxDMhgxra0QE= +github.com/Code-Hex/go-generics-cache v1.3.1 h1:i8rLwyhoyhaerr7JpjtYjJZUcCbWOdiYO3fZXLiEC4g= +github.com/Code-Hex/go-generics-cache v1.3.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= +github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= +github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= +github.com/DataDog/agent-payload/v5 v5.0.111 h1:mM+4OBkXF9tjKV0VjwnNO5As9aKcNAEsagvKDSBaTyc= +github.com/DataDog/agent-payload/v5 v5.0.111/go.mod h1:COngtbYYCncpIPiE5D93QlXDH/3VAKk10jDNwGHcMRE= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae h1:aVo1Uh2WQ8TvgbjqlbDvfP5AcUtnqXUUrc9pVP8MvKc= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:AVPQWekk3h9AOC7+plBlNB68Sy6UIGFoMMVUDeSoNoI= +github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae h1:b6lU79trCyadhkxhb51jXiqmZaHs1Z0fwWlWKFVCqJ4= +github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:s6zD4ZvPBta68SBCsCnnbn3VJzoQk5wNd0VJOpB84Ug= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae h1:/vfuF60+5qeGM62IDG1F6Asfa1VGAohiQVivRo9TWoo= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:JhAilx32dkIgoDkFXquCTfaWDsAOfe+vfBaxbiZoPI0= +github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae h1:B1E9jVLpw+Hrcv9ggzCridX3YMeUmZBE3zHghdwfTSc= +github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:1FTu8gSg8Pd8DVgRfxlcPN4F+d8K7A3lbMCT84FX44Y= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae h1:GL9JPEUyKDH2brURt09llrqWBmExCuqbHeWucezZ6sY= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:OnkC+HYj+NU9dmowWVtFpmnA4wVVibejbzID7TNm7jA= +github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae h1:sUEteYos3JjJJB1+A9inYJ3uzM18t9cygjSs0cik8x4= +github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:z4lpju3fhDa8JcbXxU0Bc6A6ci8xoQMuxDXbBdf4gHw= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae h1:qveAzof7ZZXvm93FL7h5mRM8B4q9w14g2fx6wcZt88k= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:HgJEYNmnFTKIuBhWxYe1coqmzoJXMxQTfK+4wIG5G1Q= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae h1:YZz6I8ym9P4MLytAdAJlafF3tgItgAGZrDqe4otbVUk= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:EVETfdJCkqy0YEvSpQd9LZdcYQ7vrUomCm+bQ6h3lc4= +github.com/DataDog/datadog-api-client-go/v2 v2.24.0 h1:7G+eyezFM8gHq5dOHcrQcGVxrXnwPqX2yYHxsLiq3iM= +github.com/DataDog/datadog-api-client-go/v2 v2.24.0/go.mod h1:QKOu6vscsh87fMY1lHfLEmNSunyXImj8BUaUWJXOehc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/datadog-go/v5 v5.1.1 h1:JLZ6s2K1pG2h9GkvEvMdEGqMDyVLEAccdX5TltWcLMU= -github.com/DataDog/datadog-go/v5 v5.1.1/go.mod h1:KhiYb2Badlv9/rofz+OznKoEF5XKTonWyhx5K83AP8E= -github.com/DataDog/go-sqllexer v0.0.8 h1:vfC8R9PhmJfeOKcFYAX9UOd890A3wu3KrjU9Kr7nM0E= -github.com/DataDog/go-sqllexer v0.0.8/go.mod h1:nB4Ea2YNsqMwtbWMc4Fm/oP98IIrSPapqwOwPioMspY= +github.com/DataDog/datadog-go/v5 v5.5.0 h1:G5KHeB8pWBNXT4Jtw0zAkhdxEAWSpWH00geHI6LDrKU= +github.com/DataDog/datadog-go/v5 v5.5.0/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= +github.com/DataDog/go-sqllexer v0.0.9 h1:Cx2Cu1S0hfj4coCCA8hzjM9+UNFRkcu1avIV//RU5Qw= +github.com/DataDog/go-sqllexer v0.0.9/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/gohai v0.0.0-20220718130825-1776f9beb9cc h1:gtlKB6B50/UEuFm1LeMn0R5a+tubx69OecPqxfXJDmU= -github.com/DataDog/gohai v0.0.0-20220718130825-1776f9beb9cc/go.mod h1:oyPC4jWHHjVVNjslDAKp8EqfQBaSmODjHt4HCX+C+9Q= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1 h1:16YkGLmeJH830m3dG0owtdSMXDkmTZdRd1EWZ1XIO6M= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1/go.mod h1:re1FCVuKWovntr4bODIUe+iYT2Al0gbS0WK726XLz7w= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.8.1 h1:0GyngySyxePf1RozAdm8p51uxT/kDsxqhzWPZGNrqVg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 h1:ly/egks++IqejMVPcp0OWV1fcL+Nsq4EHF48AAQPKu4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1/go.mod h1:8jOAAH5PrNN6zICpu65M7mNPAeOQsW5Wk/sq80txutA= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1 h1:UizDxaGWPDNzR2orQTE9poYyP09B2OhlaeiY5vdr+EU= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1/go.mod h1:2043mFAA2cD68ilZ93/5zZfL9BxWwj8z9sleaw3rtiY= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 h1:TbZDzUrW8iahevDY5Xw+j1EfrX8XZdeg/M6UYBl9mxg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1/go.mod h1:nVIKiAwP/Zd8IFxeHhEAiirJRH1kOOoZ315HQeSEkng= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 h1:4cyzwoXrnjElTIlsFbpyXQkAJs3+6ly9HExOu9lrup4= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1/go.mod h1:3AEt8/uCtbpzjPOPPxIBDcR1qcUq2hBbrkrdE/qNfb0= -github.com/DataDog/sketches-go v1.4.3 h1:ZB9nijteJRFUQixkQfatCqASartGNfiolIlMiEv3u/w= -github.com/DataDog/sketches-go v1.4.3/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= +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.4 h1:PTIZJAsfnr2XLB3V3duL+mSbZvYV8G3XQ9e57KyOuOA= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.4/go.mod h1:5yS6i90MEZS3NG+o7PrQQ8i7OaEMzwQvn4bCZ9h9Rao= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.4 h1:B2R7Wh791uphpltmorbvvdKk0rJOhoExwM4NnE7hXTg= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.4/go.mod h1:Tk2wwdBgWeSvDPtrGGyym8CdVWSuphiToGc/tRvFoNQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0 h1:10TPqpTlIkmDPFWVIEZ4ZX3rWrCrx3rEoeoAooZr6LM= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0/go.mod h1:dvIWN9pA2zWNTw5rhDWZgzZnhcfpH++d+8d1SWW6xkY= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4 h1:dU9oPMbAr/wYMNdzhu0pxIhAJOn1Btj1T3ZSyY6RvY0= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4/go.mod h1:ud/Xr5TWUopcaGHdkh9RN8lhnCAFa95X16Rb5mrkE18= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4 h1:ZuYc5Ql/GSyAEMgpKkbQiHOtIHkEpYujITW1wIVFgLE= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4/go.mod h1:YSntkplFoUM1mepnPeJFsoblqD0Wdi+Avg1/d1upgZQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4 h1:t/Zh8ztLDBOMRMiuVNFthWMMG5F4POgc5M6+Y3DTX9g= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4/go.mod h1:JfdBBDreQfbIN5FYrAtZV3VmQMXnf9o4tMbaMxWqe40= +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= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 h1:KeNholpO2xKjgaaSyd+DyQRrsQjhbSeS7qe4nEw8aQw= github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962/go.mod h1:kC29dT1vFpj7py2OvG1khBdQpo3kInWP+6QipLbdngo= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0 h1:tk85AYGwOf6VNtoOQi8w/kVDi2vmPxp3/OU2FsUpdcA= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0/go.mod h1:Xx0VKh7GJ4si3rmElbh19Mejxz68ibWg/J30ZOMrqzU= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.45.0 h1:jYuZ3VSmHtR/OE4ZNlhgaWefopMKh8kxHMITQ7hXB0s= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.45.0/go.mod h1:b8EPYWl+yGWfPDP2P1slOiJkimNOQMD34szyZt1G0+s= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.45.0 h1:Kim3EFONcbm78LF3B/EPFegmsKtFYBNcoJ89ubBPblw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.45.0/go.mod h1:wyhLy43DJk49NlzxNhoqF0ueRjS3oBMJc1bjTmyYxiQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.21.0 h1:OEgjQy1rH4Fbn5IpuI9d0uhLl+j6DkDvh9Q2Ucd6GK8= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.21.0/go.mod h1:EUfJ8lb3pjD8VasPPwqIvG2XVCE6DOT8tY5tcwbWA+A= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.45.0 h1:/BF7rO6PYcmFoyJrq6HA3LqQpFSQei9aNuO1fvV3OqU= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.45.0 h1:o/Nf55GfyLwGDaHkVAkRGgBXeExce73L6N9w2PZTB3k= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.45.0/go.mod h1:qkFPtMouQjW5ugdHIOthiTbweVHUTqbS0Qsu55KqXks= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0 h1:PWcDbDjrcT/ZHLn4Bc/FuglaZZVPP8bWO/YRmJBbe38= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0/go.mod h1:XEK/YHYsi+Wk2Bk1+zi/he+gjRfDWtoIZEZwuwcYjhk= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0 h1:7jymiL7lvmjgG8hMfvZ6qqA39VuiGEmCmFLd0N0tMKY= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0/go.mod h1:w3gKj9vyvd9n8jh2jpOMVLGy87QqB/AxDek2CoRwpt0= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.46.0 h1:kitScZTE4xINfkp7W3duwPe18Jp8OPjm14Ybxgjrp3E= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.46.0/go.mod h1:r+z/vuDdIelQGGJHiVMvNPCW3NiRNpFaeA9OT4L/K/c= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0 h1:xl4IRfBXPZxwu7dIza8n6wdX5zEJpi0boF5dX22MbYE= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0/go.mod h1:P69hhmQh4zwnU5iEdGVowFWg1DiP9x2KsCYBOIaP4us= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.46.0 h1:vaXjFX09ygxNxAiHwByzPBVKltYFVZR8HN4U3TR4vn8= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.46.0/go.mod h1:V28hx+cUCZC9e3qcqszMb+Sbt8cQZtHTiXOmyDzoDOg= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0 h1:xlfPHZ5QFvHad9KmrVDoaPpJUT/XluwNDMNHn+k7z/s= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0/go.mod h1:mzI44HpPp75Z8/a1sJP1asdHdu7Wui7t10SZ9EEPPnM= github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/IBM/sarama v1.42.1 h1:wugyWa15TDEHh2kvq2gAy1IHLjEjuYOYgXz/ruC/OSQ= -github.com/IBM/sarama v1.42.1/go.mod h1:Xxho9HkHd4K/MDUo/T/sOqwtX/17D33++E9Wib6hUdQ= +github.com/IBM/sarama v1.43.1 h1:Z5uz65Px7f4DhI/jQqEm/tV9t8aU+JUdTyW/K/fCXpA= +github.com/IBM/sarama v1.43.1/go.mod h1:GG5q1RURtDNPz8xxJs3mgX6Ytak8Z9eLhAkJPObe2xE= 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/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= -github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= +github.com/Microsoft/hcsshim v0.12.0-rc.3 h1:5GNGrobGs/sN/0nFO21W9k4lFn+iXXZAE8fCZbmdRak= +github.com/Microsoft/hcsshim v0.12.0-rc.3/go.mod h1:WuNfcaYNaw+KpCEsZCIM6HCEmu0c5HfXpi+dDSmveP0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/Netflix/go-env v0.0.0-20220526054621-78278af1949d h1:wvStE9wLpws31NiWUx+38wny1msZ/tm+eL5xmm4Y7So= github.com/Netflix/go-env v0.0.0-20220526054621-78278af1949d/go.mod h1:9XMFaCeRyW7fC9XJOWQ+NdAv8VLG7ys7l3x4ozEGLUQ= @@ -234,10 +243,11 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/ReneKroon/ttlcache/v2 v2.11.0 h1:OvlcYFYi941SBN3v9dsDcC2N8vRxyHcCmJb3Vl4QMoM= github.com/ReneKroon/ttlcache/v2 v2.11.0/go.mod h1:mBxvsNY+BT8qLLd6CuAJubbKo6r0jh3nb5et22bbfGY= -github.com/SAP/go-hdb v1.6.2 h1:sC0OjTEfPnycIktkCDvS7GelaGOiRrhWE0GWUt05QP8= -github.com/SAP/go-hdb v1.6.2/go.mod h1:xXsEywFErhpCuRVQ3HfjI7H7fPLYPMnMTWa9D5Enx0Q= -github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 h1:koK7z0nSsRiRiBWwa+E714Puh+DO+ZRdIyAXiXzL+lg= +github.com/SAP/go-hdb v1.8.12 h1:F/bpSlPZG0CvVWlTxxiEHGnynA8uILCPoIRoG+iMmkE= +github.com/SAP/go-hdb v1.8.12/go.mod h1:SNF6129HdtfK0ve8LQIeHEYwNu5CCJr7vXmhA4UbkNw= github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= +github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc h1:MhBvG7RLaLqlyjxMR6of35vt6MVQ+eXMcgn9X/sy0FE= +github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/Showmax/go-fqdn v1.0.0 h1:0rG5IbmVliNT5O19Mfuvna9LL7zlHyRfsSvBPZmF9tM= @@ -249,16 +259,18 @@ github.com/aerospike/aerospike-client-go/v6 v6.13.0/go.mod h1:2Syy0n4FKdgJxn0ZCf github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= -github.com/alecthomas/participle/v2 v2.1.0 h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4= -github.com/alecthomas/participle/v2 v2.1.0/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4 h1:iC9YFYKDGEy3n/FtqJnOkZsene9olVspKmkX5A2YBEo= github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4/go.mod h1:sCavSAvdzOjul4cEqeVtvlSaSScfNsTQ+46HwlTL1hc= github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.2/go.mod h1:5JHVmnHvGzR2wNdgaW1zDLQG8kOC4Uec8ubkMogW7OQ= @@ -286,24 +298,23 @@ github.com/alibabacloud-go/tea-utils/v2 v2.0.1 h1:K6kwgo+UiYx+/kr6CO0PN5ACZDzE3n github.com/alibabacloud-go/tea-utils/v2 v2.0.1/go.mod h1:U5MTY10WwlquGPS34DOeomUGBB0gXbLueiq5Trwu0C4= github.com/alibabacloud-go/tea-xml v1.1.2 h1:oLxa7JUXm2EDFzMg+7oRsYc+kutgCVwm+bZlhhmvW5M= github.com/alibabacloud-go/tea-xml v1.1.2/go.mod h1:Rq08vgCcCAjHyRi/M7xlHKUykZCEtyBy9+DPF6GgEu8= -github.com/aliyun/aliyun-log-go-sdk v0.1.63 h1:XeKeHgQS0Aoo6BtzF7vB/PlhzqK1/xuPdLr7mLMOp9Y= -github.com/aliyun/aliyun-log-go-sdk v0.1.63/go.mod h1:FSKcIjukUy+LeUKhRk13PCO+9gPMTfGsYhFBHQbDqmM= +github.com/aliyun/aliyun-log-go-sdk v0.1.72 h1:8Gvg3ydMG4bbF7DkTb4m3odd5BRFXo0LmhNBv/xg7Mo= +github.com/aliyun/aliyun-log-go-sdk v0.1.72/go.mod h1:FSKcIjukUy+LeUKhRk13PCO+9gPMTfGsYhFBHQbDqmM= github.com/aliyun/credentials-go v1.1.2 h1:qU1vwGIBb3UJ8BwunHDRFtAhS6jnQLnde/yk0+Ih2GY= github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw= -github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= -github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= -github.com/apache/arrow/go/v12 v12.0.1 h1:JsR2+hzYYjgSUkBSaahpqCetqZMr76djX80fF/DiJbg= -github.com/apache/arrow/go/v12 v12.0.1/go.mod h1:weuTY7JvTG/HDPtMQxEUp7pU73vkLWMLpY67QwZ/WWw= +github.com/apache/arrow/go/v15 v15.0.0 h1:1zZACWf85oEZY5/kd9dsQS7i+2G5zVQcbKTHgslqHNA= +github.com/apache/arrow/go/v15 v15.0.0/go.mod h1:DGXsR3ajT524njufqf95822i+KTh+yea1jass9YXgjA= github.com/apache/pulsar-client-go v0.8.1 h1:UZINLbH3I5YtNzqkju7g9vrl4CKrEgYSx2rbpvGufrE= github.com/apache/pulsar-client-go v0.8.1/go.mod h1:yJNcvn/IurarFDxwmoZvb2Ieylg630ifxeO/iXpk27I= github.com/apache/pulsar-client-go/oauth2 v0.0.0-20220120090717-25e59572242e h1:EqiJ0Xil8NmcXyupNqXV9oYDBeWntEIegxLahrTr8DY= github.com/apache/pulsar-client-go/oauth2 v0.0.0-20220120090717-25e59572242e/go.mod h1:Xee4tgYLFpYcPMcTfBYWE1uKRzeciodGTSEDMzsR6i8= -github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= -github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= +github.com/apache/thrift v0.20.0 h1:631+KvYbsBZxmuJjYwhezVsrfc/TbqtZV4QcxOX1fOI= +github.com/apache/thrift v0.20.0/go.mod h1:hOk1BQqcp2OLzGsyVXdfMk7YFlMxK3aoEVhjD06QhB8= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= +github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= github.com/ardielle/ardielle-go v1.5.2 h1:TilHTpHIQJ27R1Tl/iITBzMwiUGSlVfiVhwDNGM3Zj4= github.com/ardielle/ardielle-go v1.5.2/go.mod h1:I4hy1n795cUhaVt/ojz83SNVCYIGsAFAONtv2Dr7HUI= github.com/ardielle/ardielle-tools v1.5.4/go.mod h1:oZN+JRMnqGiIhrzkRN9l26Cej9dEx4jeNG6A+AdkShk= @@ -318,76 +329,94 @@ github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:l github.com/aws/aws-sdk-go v1.32.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2 v1.17.7/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= +github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2 v1.22.2 h1:lV0U8fnhAnPz8YcdmZVV60+tr6CakHzqA6P8T46ExJI= -github.com/aws/aws-sdk-go-v2 v1.22.2/go.mod h1:Kd0OJtkW3Q0M0lUWGszapWjEvrXDzRW+D21JNsroB+c= +github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA= +github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= 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/aws/protocol/eventstream v1.4.13/go.mod h1:gpAbvyDGQFozTEmlTFO8XcQKHzubdq0LzRyJpG6MiXM= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 h1:hHgLiIrTRtddC0AKcJr5s7i/hLgcpTt+q/FKxf1Zayk= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0/go.mod h1:w4I/v3NOWgD+qvs1NPEwhd++1h3XPHFaVxasfY6HlYQ= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= github.com/aws/aws-sdk-go-v2/config v1.18.19/go.mod h1:XvTmGMY8d52ougvakOv1RpiTLPz9dlG/OQHsKU/cMmY= -github.com/aws/aws-sdk-go-v2/config v1.24.0 h1:4LEk29JO3w+y9dEo/5Tq5QTP7uIEw+KQrKiHOs4xlu4= -github.com/aws/aws-sdk-go-v2/config v1.24.0/go.mod h1:11nNDAuK86kOUHeuEQo8f3CkcV5xuUxvPwFjTZE/PnQ= +github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= +github.com/aws/aws-sdk-go-v2/config v1.27.11 h1:f47rANd2LQEYHda2ddSCKYId18/8BhSRM4BULGmfgNA= +github.com/aws/aws-sdk-go-v2/config v1.27.11/go.mod h1:SMsV78RIOYdve1vf36z8LmnszlRWkwMQtomCAI0/mIE= github.com/aws/aws-sdk-go-v2/credentials v1.13.18/go.mod h1:vnwlwjIe+3XJPBYKu1et30ZPABG3VaXJYr8ryohpIyM= -github.com/aws/aws-sdk-go-v2/credentials v1.15.2 h1:rKH7khRMxPdD0u3dHecd0Q7NOVw3EUe7AqdkUOkiOGI= -github.com/aws/aws-sdk-go-v2/credentials v1.15.2/go.mod h1:tXM8wmaeAhfC7nZoCxb0FzM/aRaB1m1WQ7x0qlBLq80= +github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11 h1:YuIB1dJNf1Re822rriUOTxopaHHvIq0l/pX3fwO+Tzs= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6EKL+NcD7LG3dpKGMV4SShgo= 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/ec2/imds v1.14.3 h1:G5KawTAkyHH6WyKQCdHiW4h3PmAXNJpOgwKg3H7sDRE= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3/go.mod h1:hugKmSFnZB+HgNI1sYGT14BUPZkO6alC/e0AWu+0IAQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= 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/go.mod h1:QT0BqUvX1Bh2ABdTGnjqEjvjzrCfIniM9Sc8zn9Yndo= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2 h1:AaQsr5vvGR7rmeSWBtTCcw16tT9r51mWijuCQhzLnq8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2/go.mod h1:o1IiRn7CWocIFTXJjGKJDOwxv1ibL53NpcvcqGWyRBA= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= 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/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 h1:UZx8SXZ0YtzRiALzYAWcjb9Y9hZUR7MBKaBQ5ouOjPs= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2/go.mod h1:ipuRpcSaklmxR6C39G187TpBAO132gUfleTGccUPs8c= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc= 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/ini v1.7.0 h1:usgqiJtamuGIBj+OvYmMq89+Z1hIKkMJToz1WpoeNUY= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= 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/internal/v4a v1.1.4 h1:6lJvvkQ9HmbHZ4h/IEwclwv2mrTW8Uq1SOB/kXy0mfw= github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4/go.mod h1:1PrKYwxTM+zjpw9Y41KFtoJCQrJ34Z47Y4VgVbfndjo= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 h1:m0QTSI6pZYJTk5WSKx3fm5cNW/DCicVzULBgU/6IyD0= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14/go.mod h1:dDilntgHy9WnHXsh7dDtUPgHKEfTJIBUTHM8OWm0f/0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= 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/checksum v1.1.36 h1:eev2yZX7esGRjqRbnVk1UxMLw4CyVZDpZXRCcy75oQk= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36/go.mod h1:lGnOkH9NJATw0XEPcAknFBj3zzNTEGRHtSw+CwC1YTg= 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/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 h1:h7j73yuAVVjic8pqswh+L/7r2IHP43QwRyOu6zcCDDE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2/go.mod h1:H07AHdK5LSy8F7EJUQhoxyiCNkePoHj2D8P2yGTWafo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= 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/internal/s3shared v1.15.4 h1:v0jkRigbSD6uOdwcaUQmgEwG1BkPfAPDqaeNt/29ghg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4/go.mod h1:LhTyt8J04LL+9cIt7pYJ5lbS/U98ZmXovLOR/4LUsk8= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.1 h1:wLRIuz/llNgtN1OvZDmSotR+hjIXSxbxX/3Nw9ViaRg= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.1/go.mod h1:tMRFyoPjrh0oGqCKQHOf1EkxVzLynY/uQk2pejYVrzk= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.27.4 h1:Oe8awBiS/iitcsRJB5+DHa3iCxoA0KwJJf0JNrYMINY= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.27.4/go.mod h1:RCZCSFbieSgNG1RKegO26opXV4EXyef/vNBVJsUyHuw= 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/s3 v1.40.0 h1:wl5dxN1NONhTDQD9uaEvNsDRX29cBmGED/nl0jkWlt4= github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0/go.mod h1:rDGMZA7f4pbmTtPOk5v5UM2lmX6UAbRnMDJeDvnH7AM= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.29.5 h1:a3nFS1TFNTH9TVizItnHz3BgPCk5/7ygrZQZAoUV3GA= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.29.5/go.mod h1:3pzLFJnbjkymz6RdZ963DuvMR9rzrKMXrlbteSk4Sxc= 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/sso v1.17.1 h1:km+ZNjtLtpXYf42RdaDZnNHm9s7SYAuDGTafy6nd89A= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.1/go.mod h1:aHBr3pvBSD5MbzOvQtYutyPLLRPbl/y9x86XyJJnUXQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= 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/ssooidc v1.19.1 h1:iRFNqZH4a67IqPvK8xxtyQYnyrlsvwmpHOe9r55ggBA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1/go.mod h1:pTy5WM+6sNv2tB24JNKFtn6EvciQ5k40ZJ0pq/Iaxj0= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= github.com/aws/aws-sdk-go-v2/service/sts v1.18.7/go.mod h1:JuTnSoeePXmMVe9G8NcjjwgOKEfZ4cOjMuT2IBT/2eI= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 h1:txgVXIXWPXyqdiVn92BV6a/rgtpX31HYdsOYj0sVQQQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.1/go.mod h1:VAiJiNaoP1L89STFlEMgmHX1bKixY+FaP+TpRFrmyZ4= +github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/aws/smithy-go v1.16.0 h1:gJZEH/Fqh+RsvlJ1Zt4tVAtV6bKkp3cC+R6FCZMNzik= -github.com/aws/smithy-go v1.16.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= +github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/basgys/goxml2json v1.1.0 h1:4ln5i4rseYfXNd86lGEB+Vi652IsIXIvggKM/BhUKVw= +github.com/basgys/goxml2json v1.1.0/go.mod h1:wH7a5Np/Q4QoECFIU8zTQlZwZkrilY0itPfecMw41Dw= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/beefsack/go-rate v0.0.0-20220214233405-116f4ca011a0/go.mod h1:6YNgTHLutezwnBvyneBbwvB8C82y3dcoOj5EQJIdGXA= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -405,24 +434,26 @@ github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTS github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q= +github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= +github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/caio/go-tdigest/v4 v4.0.1 h1:sx4ZxjmIEcLROUPs2j1BGe2WhOtHD6VSe6NNbBdKYh4= -github.com/caio/go-tdigest/v4 v4.0.1/go.mod h1:Wsa+f0EZnV2gShdj1adgl0tQSoXRxtM0QioTgukFw8U= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/go-criu/v5 v5.3.0 h1:wpFFOoomK3389ue2lAb0Boag6XPht5QYpipxmSNL4d8= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -431,8 +462,8 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/cihub/seelog v0.0.0-20151216151435-d2c6e5aa9fbf/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1c8PVE1PubbNx3mjUr09OqWGCs= github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= -github.com/cilium/ebpf v0.9.1 h1:64sn2K3UKw8NbP/blsixRpF3nXuyhz/VjRlRzvlBRu4= -github.com/cilium/ebpf v0.9.1/go.mod h1:+OhNOIXx/Fnu1IE8bJz2dzOA+VSfyTfdNUVdlQnxUFY= +github.com/cilium/ebpf v0.11.0 h1:V8gS/bTCCjX9uUnkUFUpPsksM8n1lXBAvHcpiFk1X2Y= +github.com/cilium/ebpf v0.11.0/go.mod h1:WE7CZAnqOL2RouJ4f1uyNhqr2P4CCvXFIqdRDUgWsVs= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I= @@ -447,28 +478,27 @@ github.com/cloudfoundry-incubator/uaago v0.0.0-20190307164349-8136b7bbe76e/go.mo github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= -github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= -github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0= -github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE= +github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= +github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.7.7 h1:QOC2K4A42RQpcrZyptP6z9EJZnlHfHJUfZrAAHe15q4= -github.com/containerd/containerd v1.7.7/go.mod h1:3c4XZv6VeT9qgf9GMTxNTMFxGJrGpI2vz1yk4ye+YY8= +github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= +github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= +github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= +github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/ttrpc v1.2.2 h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtOs= github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak= github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= -github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk= -github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= +github.com/coreos/go-oidc/v3 v3.10.0 h1:tDnXHnLyiTVyT/2zLDGj09pFPkhND8Gl8lnTRhoEaJU= +github.com/coreos/go-oidc/v3 v3.10.0/go.mod h1:5j11xcw0D3+SGxn6Z/WFADsgcWVMyNAlSQupk0KK3ac= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -476,6 +506,7 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= +github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -491,28 +522,29 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/deepmap/oapi-codegen v1.12.4 h1:pPmn6qI9MuOtCz82WY2Xaw46EQjgvxednXXrP7g5Q2s= -github.com/denisenkom/go-mssqldb v0.12.2 h1:1OcPn5GBIobjWNd+8yjfHNIaFX14B1pWI3F9HZy5KXw= -github.com/denisenkom/go-mssqldb v0.12.2/go.mod h1:lnIw1mZukFRZDJYQ0Pb833QS2IaC3l5HkEfra2LJ+sk= github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= github.com/devigned/tab v0.1.1 h1:3mD6Kb1mUOYeLpJvTVSDwSg5ZsfSxfvxGRTxRsJsITA= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= -github.com/digitalocean/godo v1.104.1 h1:SZNxjAsskM/su0YW9P8Wx3gU0W1Z13b6tZlYNpl5BnA= -github.com/digitalocean/godo v1.104.1/go.mod h1:VAI/L5YDzMuPRU01lEEUSQ/sp5Z//1HnnFv/RBTEdbg= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/digitalocean/godo v1.109.0 h1:4W97RJLJSUQ3veRZDNbp1Ol3Rbn6Lmt9bKGvfqYI5SU= +github.com/digitalocean/godo v1.109.0/go.mod h1:R6EmmWI8CT1+fCtjWY9UCB+L5uufuZH13wk3YhxycCs= github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= +github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 h1:IPrmumsT9t5BS7XcPhgsCTlkWbYg80SEXUzDpReaU6Y= -github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11/go.mod h1:a6bNUGTbQBsY6VRHTr4h/rkOXjl244DyRD0tx3fgq4Q= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= @@ -520,13 +552,13 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +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/dynatrace-oss/dynatrace-metric-utils-go v0.5.0 h1:wHGPJSXvwKQVf/XfhjUPyrhpcPKWNy8F3ikH+eiwoBg= github.com/dynatrace-oss/dynatrace-metric-utils-go v0.5.0/go.mod h1:PseHFo8Leko7J4A/TfZ6kkHdkzKBLUta6hRZR/OEbbc= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-resiliency v1.4.0 h1:3OK9bWpPk5q6pbFAaYSEwD9CLUSHG8bnZuqX2yMt3B0= -github.com/eapache/go-resiliency v1.4.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= +github.com/eapache/go-resiliency v1.6.0 h1:CqGDTLtpwuWKn6Nj3uNUdflaq+/kIPsg0gfNzHton30= +github.com/eapache/go-resiliency v1.6.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4ALJ04o5Qqpdz8XLIpNA3WM/iSIXqxtqo7UGVws= github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0= @@ -549,18 +581,22 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= +github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI= +github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= 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/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/euank/go-kmsg-parser v2.0.0+incompatible h1:cHD53+PLQuuQyLZeriD1V/esuG4MuU0Pjs5y6iknohY= github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/facebook/time v0.0.0-20220713225404-f7a0d7702d50 h1:3fALCgsB+zI8Bxlv4ph4lCgt1CEQHIdU5sWxbkaMkuc= -github.com/facebook/time v0.0.0-20220713225404-f7a0d7702d50/go.mod h1:IQmM+Ezbn5X7gpDO0IjKU5RmW9xT1a19dLp+NbivoXE= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= +github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/expr-lang/expr v1.16.3 h1:NLldf786GffptcXNxxJx5dQ+FzeWDKChBDqOOwyK8to= +github.com/expr-lang/expr v1.16.3/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= +github.com/facebook/time v0.0.0-20240109160331-d1456d1a6bac h1:Xn5xG7RTh7HqtXKCCnxDG4+ee96umlRTBQM3kNSXDoU= +github.com/facebook/time v0.0.0-20240109160331-d1456d1a6bac/go.mod h1:1u7ple9CA8fMqfqqNsKIsxFL9i2yLfo8Hsv4ejTD1FM= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= @@ -574,30 +610,35 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD 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/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.11.0/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.11.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= 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/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI= -github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw= github.com/go-faster/city v1.0.1/go.mod h1:jKcUJId49qdW3L1qKHH/3wPeUstCVpVSXTM6vO3VcTw= -github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI= -github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY= +github.com/go-faster/errors v0.7.1 h1:MkJTnDoEdi9pDabt1dpWf7AA8/BaSYZqibYyhZ20AYg= +github.com/go-faster/errors v0.7.1/go.mod h1:5ySTjWFiphBs07IKuiL69nxdfd5+fzh1u7FPGZP2quo= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-jose/go-jose/v4 v4.0.1 h1:QVEPDE3OluqXBQZDcnNvQrInro2h0e4eqNbnZSWqS6U= +github.com/go-jose/go-jose/v4 v4.0.1/go.mod h1:WVf9LFMHh/QVrmqrOfqun0C45tMe3RoiKJMPvgWwLfY= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -613,42 +654,42 @@ github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= +github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-redis/redis/v7 v7.4.1 h1:PASvf36gyUpr2zdOUS/9Zqc80GbM+9BDyiJSJDDOrTI= -github.com/go-redis/redis/v7 v7.4.1/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= -github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= -github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= +github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= +github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= +github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= +github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -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/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= +github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= @@ -656,8 +697,8 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= 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/gocql/gocql v1.3.2 h1:ox3T+R7VFibHSIGxRkuUi1uIvAv8jBHCWxc+9aFQ/LA= -github.com/gocql/gocql v1.3.2/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= +github.com/gocql/gocql v1.6.0 h1:IdFdOTbnpbd0pDhl4REKQDM+Q0SzKXQ1Yh+YZZ8T/qU= +github.com/gocql/gocql v1.6.0/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= 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/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -665,8 +706,8 @@ github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= -github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= +github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -678,10 +719,10 @@ github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzq github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= -github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= +github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +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/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= @@ -718,8 +759,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -728,10 +769,11 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/cadvisor v0.48.1 h1:eyYTxKBd+KxI1kh6rst4JSTLUhfHQM34qGpp+0AMlSg= -github.com/google/cadvisor v0.48.1/go.mod h1:ZkYbiiVdyoqBmI2ahZI8GlmirT78OAOER0z4EQugkxQ= -github.com/google/flatbuffers v23.1.21+incompatible h1:bUqzx/MXCDxuS0hRJL2EfjyZL3uQrPbMocUa8zGqsTA= -github.com/google/flatbuffers v23.1.21+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/cadvisor v0.49.0 h1:1PYeiORXmcFYi609M4Qvq5IzcvcVaWgYxDt78uH8jYA= +github.com/google/cadvisor v0.49.0/go.mod h1:s6Fqwb2KiWG6leCegVhw4KW40tf9f7m+SF1aXiE8Wsk= +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/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -746,7 +788,6 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -769,66 +810,70 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 h1:pUa4ghanp6q4IJHwE9RwLgmVFfReJN+KbQ8ExNEUUoQ= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ZWj6lSlDF3F74SfKwfTCer72Q= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gophercloud/gophercloud v1.7.0 h1:fyJGKh0LBvIZKLvBWvQdIgkaV5yTM3Jh9EYUh+UNCAs= -github.com/gophercloud/gophercloud v1.7.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= +github.com/gophercloud/gophercloud v1.8.0 h1:TM3Jawprb2NrdOnvcHhWJalmKmAmOGgfZElM/3oBYCk= +github.com/gophercloud/gophercloud v1.8.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +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/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gosnmp/gosnmp v1.35.0 h1:EuWWNPxTCdAUx2/NbQcSa3WdNxjzpy4Phv57b4MWpJM= -github.com/gosnmp/gosnmp v1.35.0/go.mod h1:2AvKZ3n9aEl5TJEo/fFmf/FGO4Nj4cVeEc5yuk88CYc= -github.com/grafana/loki/pkg/push v0.0.0-20230321110627-5c3d204ebf5d h1:InEQBUAKYIHRlOVvxWxvpW5pziK53RdlhsuRJzBWUmE= -github.com/grafana/loki/pkg/push v0.0.0-20230321110627-5c3d204ebf5d/go.mod h1:BjNgF1EfQglDCrCbF0qiQLqAoBKva0/es63lSKT2TXw= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gosnmp/gosnmp v1.37.0 h1:/Tf8D3b9wrnNuf/SfbvO+44mPrjVphBhRtcGg22V07Y= +github.com/gosnmp/gosnmp v1.37.0/go.mod h1:GDH9vNqpsD7f2HvZhKs5dlqSEcAS6s6Qp099oZRCR+M= +github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37 h1:w59bmBeLOk4enGtyX4kTBNY3FCw/nwDTYUqcjC4vKhg= +github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37/go.mod h1:f3JSoxBTPXX5ec4FxxeC19nTBSxoTz+cBgS3cYLMcr0= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grobie/gomemcache v0.0.0-20180201122607-1f779c573665 h1:LONJvPBBd9wBmzSUmNHI7XpLE2qQ5tzUimeBadiVDuA= -github.com/grobie/gomemcache v0.0.0-20180201122607-1f779c573665/go.mod h1:L69/dBlPQlWkcnU76WgcppK5e4rrxzQdi6LhLnK/ytA= +github.com/grobie/gomemcache v0.0.0-20230213081705-239240bbc445 h1:FlKQKUYPZ5yDCN248M3R7x8yu2E3yEZ0H7aLomE4EoE= +github.com/grobie/gomemcache v0.0.0-20230213081705-239240bbc445/go.mod h1:L69/dBlPQlWkcnU76WgcppK5e4rrxzQdi6LhLnK/ytA= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= 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/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= -github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= +github.com/hashicorp/consul/api v1.28.2 h1:mXfkRHrpHN4YY3RqL09nXU1eHKLNiuAN4kHvDQ16k/8= +github.com/hashicorp/consul/api v1.28.2/go.mod h1:KyzqzgMEya+IZPcD65YFoOVAgPpbfERu4I/tzG6/ueE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= +github.com/hashicorp/consul/sdk v0.16.0 h1:SE9m0W6DEfgIVCJX7xU+iv/hUl4m/nxqMTnCdMxDpJ8= +github.com/hashicorp/consul/sdk v0.16.0/go.mod h1:7pxqqhqoaPqnBnzXD1StKed62LqJeClzVsUEy85Zr0A= github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -841,13 +886,14 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -860,6 +906,7 @@ github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5O github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -874,6 +921,8 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -884,15 +933,16 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c h1:Nc3Mt2BAnq0/VoLEntF/nipX+K1S7pG+RgwiitSv6v0= -github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c/go.mod h1:O23qLAZuCx4htdY9zBaO4cJPXgleSFEdq6D/sezGgYE= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702 h1:fI1LXuBaS1d9z1kmb++Og6YD8uMRwadXorCwE+xgOFA= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702/go.mod h1:z71gkJdrkAt/Rl6C7Q79VE7AwJ5lUF+M+fzFTyIHYB0= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hetznercloud/hcloud-go/v2 v2.4.0 h1:MqlAE+w125PLvJRCpAJmEwrIxoVdUdOyuFUhE/Ukbok= -github.com/hetznercloud/hcloud-go/v2 v2.4.0/go.mod h1:l7fA5xsncFBzQTyw29/dw5Yr88yEGKKdc6BHf24ONS0= +github.com/hetznercloud/hcloud-go/v2 v2.6.0 h1:RJOA2hHZ7rD1pScA4O1NF6qhkHyUdbbxjHgFNot8928= +github.com/hetznercloud/hcloud-go/v2 v2.6.0/go.mod h1:4J1cSE57+g0WS93IiHLV7ubTHItcp+awzeBp5bM9mfA= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= @@ -905,9 +955,10 @@ github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+h github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 h1:s9ZL6ZhFF8y6ebnm1FLvobkzoIu5xwDQUcRPk/IEhpM= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6/go.mod h1:aXdIdfn2OcGnMhOTojXmwZqXKgC3MU5riiNvzwwG9OY= -github.com/influxdata/influxdb-client-go/v2 v2.12.4 h1:9qJLqetEmhIlqaF/N9KUtdmRKSbNy6IohggyS3bxWlE= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 h1:2r2WiFeAwiJ/uyx1qIKnV1L4C9w/2V8ehlbJY4gjFaM= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4/go.mod h1:1yEQhaLb/cETXCqQmdh7lDjupNAReO7c83AHyK2dJ48= +github.com/influxdata/influxdb-client-go/v2 v2.13.0 h1:ioBbLmR5NMbAjP4UVA5r9b5xGjpABD7j65pI8kFphDM= +github.com/influxdata/influxdb-client-go/v2 v2.13.0/go.mod h1:k+spCbt9hcvqvUiz0sr5D8LolXHqAAOfPw9v/RIRHl4= github.com/influxdata/influxdb-observability/common v0.5.8 h1:nyk4dqnKbPGIyr1vAs6oEsFQEHWi5jkSQ7PtP4v//lc= github.com/influxdata/influxdb-observability/common v0.5.8/go.mod h1:aG8A2gbtXbl/P2FePd6QNsCUSOkcvz1n+NL5dJLUO1s= github.com/influxdata/influxdb-observability/influx2otel v0.5.8 h1:pHkeImZksXNNQbbH/w1qPuC/u6e7cK3kTG12otQHDuE= @@ -916,7 +967,9 @@ github.com/influxdata/influxdb-observability/otel2influx v0.5.8 h1:vZQ/WwiqIYPcZ github.com/influxdata/influxdb-observability/otel2influx v0.5.8/go.mod h1:tcg//mjCGBsN0hAPQhUBNWuGF2miPPEMJEBl0ZIAfCk= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSHzRbhzK8RdXOsAdfDgO49TtqC1oZ+acxPrkfTxcCs= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/influxdata/line-protocol-corpus v0.0.0-20210519164801-ca6fa5da0184/go.mod h1:03nmhxzZ7Xk2pdG+lmMd7mHDfeVOYFyhOgwO61qWU98= github.com/influxdata/line-protocol-corpus v0.0.0-20210922080147-aa28ccfb8937 h1:MHJNQ+p99hFATQm6ORoLmpUCF7ovjwEFshs/NHzAbig= github.com/influxdata/line-protocol-corpus v0.0.0-20210922080147-aa28ccfb8937/go.mod h1:BKR9c0uHSmRgM/se9JhFHtTT7JTO67X23MtKMHtZcpo= @@ -924,8 +977,8 @@ github.com/influxdata/line-protocol/v2 v2.0.0-20210312151457-c52fdecb625a/go.mod github.com/influxdata/line-protocol/v2 v2.1.0/go.mod h1:QKw43hdUBg3GTk2iC3iyCxksNj7PX9aUSeYOYE/ceHY= github.com/influxdata/line-protocol/v2 v2.2.1 h1:EAPkqJ9Km4uAxtMRgUubJyqAr6zgWM0dznKMLRauQRE= github.com/influxdata/line-protocol/v2 v2.2.1/go.mod h1:DmB3Cnh+3oxmG6LOBIxce4oaL4CPj3OmMPgvauXh+tM= -github.com/ionos-cloud/sdk-go/v6 v6.1.9 h1:Iq3VIXzeEbc8EbButuACgfLMiY5TPVWUPNrF+Vsddo4= -github.com/ionos-cloud/sdk-go/v6 v6.1.9/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +github.com/ionos-cloud/sdk-go/v6 v6.1.11 h1:J/uRN4UWO3wCyGOeDdMKv8LWRzKu6UIkLEaes38Kzh8= +github.com/ionos-cloud/sdk-go/v6 v6.1.11/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= @@ -936,8 +989,8 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= -github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= +github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w= +github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -953,8 +1006,8 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.2 h1:7eY55bdBeCz1F2fTzSz69QC+pG46jYq9/jtSPiJ5nn0= -github.com/jackc/pgproto3/v2 v2.3.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag= +github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= @@ -968,15 +1021,15 @@ github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08 github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.18.1 h1:YP7G1KABtKpB5IHrO9vYwSrCOhs7p3uqhvhhQBptya0= -github.com/jackc/pgx/v4 v4.18.1/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE= +github.com/jackc/pgx/v4 v4.18.3 h1:dE2/TrEsGX3RBprb3qryqSV9Y60iZN1C6i8IrmW9/BA= +github.com/jackc/pgx/v4 v4.18.3/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jaegertracing/jaeger v1.48.0 h1:YuKooQ7qJsjgxws9xuf8C/BLNTPx8qTAJz4wv7IHhSc= -github.com/jaegertracing/jaeger v1.48.0/go.mod h1:BoAPkdCAIEuLsVz/EDhjXd+GSVpHtJhiGqWoFEvBCKg= -github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= +github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= +github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/jawher/mow.cli v1.0.4/go.mod h1:5hQj2V8g+qYmLUVWqu4Wuja1pI57M83EChYLVZ0sMKk= github.com/jawher/mow.cli v1.2.0/go.mod h1:y+pcA3jBAdo/GIZx/0rFjw/K2bVEODP9rfZOfaiq8Ko= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= @@ -991,14 +1044,17 @@ github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh6 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/jellydator/ttlcache/v3 v3.1.0 h1:0gPFG0IHHP6xyUyXq+JaD8fwkDCqgqwohXNJBcYE71g= -github.com/jellydator/ttlcache/v3 v3.1.0/go.mod h1:hi7MGFdMAwZna5n2tuvh63DvFLzVKySzCVW6+0gA2n4= +github.com/jellydator/ttlcache/v3 v3.2.0 h1:6lqVJ8X3ZaUwvzENqPAobDsXNExfUJd61u++uW8a3LE= +github.com/jellydator/ttlcache/v3 v3.2.0/go.mod h1:hi7MGFdMAwZna5n2tuvh63DvFLzVKySzCVW6+0gA2n4= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= 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/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= +github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= @@ -1021,21 +1077,19 @@ github.com/karrick/godirwalk v1.17.0/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1q github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= 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/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4= -github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.10.8/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid/v2 v2.2.3 h1:sxCkb+qR91z4vsqw4vGGZlDgPz3G7gjaLyK3V8y70BU= -github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -1048,6 +1102,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= @@ -1056,11 +1111,14 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leesper/go_rng v0.0.0-20190531154944-a612b043e353 h1:X/79QL0b4YJVO5+OsPH9rF2u428CIrGL/jLmPsoOQQ4= github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 h1:bCiVCRCs1Heq84lurVinUPy19keqGEe4jh5vtK37jcg= github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= github.com/leoluk/perflib_exporter v0.2.1 h1:/3/ut1k/jFt5p4ypjLZKDHDqlXAK6ERZPVWtwdI389I= github.com/leoluk/perflib_exporter v0.2.1/go.mod h1:MinSWm88jguXFFrGsP56PtleUb4Qtm4tNRH/wXNXRTI= +github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= +github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= +github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ= +github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -1071,10 +1129,10 @@ github.com/lightstep/go-expohisto v1.0.0 h1:UPtTS1rGdtehbbAF7o/dhkWLTDI73UifG8Lb github.com/lightstep/go-expohisto v1.0.0/go.mod h1:xDXD0++Mu2FOaItXtdDfksfgxfV0z1TMPa+e/EUd0cs= github.com/linkedin/goavro/v2 v2.9.8 h1:jN50elxBsGBDGVDEKqUlDuU1cFwJ11K/yrJCBMe/7Wg= github.com/linkedin/goavro/v2 v2.9.8/go.mod h1:UgQUb2N/pmueQYH9bfqFioWxzYCZXSfF8Jw03O5sjqA= -github.com/linode/linodego v1.23.0 h1:s0ReCZtuN9Z1IoUN9w1RLeYO1dMZUGPwOQ/IBFsBHtU= -github.com/linode/linodego v1.23.0/go.mod h1:0U7wj/UQOqBNbKv1FYTXiBUXueR8DY4HvIotwE0ENgg= -github.com/logicmonitor/lm-data-sdk-go v1.0.0 h1:2eiz7kq3G0rLc/hqVpsk1c2B0PMjp6nLhHzc5SmTn80= -github.com/logicmonitor/lm-data-sdk-go v1.0.0/go.mod h1:XvYS9xp/0WrPpc6ge2O3ZPn2dgbKO46PnfCfbKaeUu8= +github.com/linode/linodego v1.30.0 h1:6HJli+LX7NGu+Sne2G+ux790EkVOWOV/SR4mK3jcs6k= +github.com/linode/linodego v1.30.0/go.mod h1:/46h/XpmWi//oSA92GX2p3FIxb8HbX7grslPPQalR2o= +github.com/logicmonitor/lm-data-sdk-go v1.3.0 h1:Obrexk35IKupFQezngkesR/kMfHQdAEUR1zYbJrOrzg= +github.com/logicmonitor/lm-data-sdk-go v1.3.0/go.mod h1:nIHr4uOPfg6AM7mG1rewg3L4O3rfge34o7UYB7joBM4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c h1:VtwQ41oftZwlMnOEbMWQtSEUgU64U4s+GHk7hZK+jtY= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE= @@ -1108,24 +1166,21 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI= -github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= +github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= github.com/microsoft/ApplicationInsights-Go v0.4.4 h1:G4+H9WNs6ygSCe6sUyxRc2U81TI5Es90b2t/MwX5KqY= github.com/microsoft/ApplicationInsights-Go v0.4.4/go.mod h1:fKRUseBqkw6bDiXTs3ESTiU/4YTIHsQS4W3fP2ieF4U= +github.com/microsoft/go-mssqldb v1.7.0 h1:sgMPW0HA6Ihd37Yx0MzHyKD726C2kY/8KJsQtXHNaAs= +github.com/microsoft/go-mssqldb v1.7.0/go.mod h1:kOvZKUdrhhFQmxLZqbwUV0rHkNkZpthMITIb2Ko1IoA= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE= -github.com/miekg/dns v1.1.56/go.mod h1:cRm6Oo2C8TY9ZS/TqsSrseAcncm74lfK5G+ikN2SWWY= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= +github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4= +github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk= @@ -1137,8 +1192,11 @@ github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HK github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0= github.com/mitchellh/hashstructure v1.1.0/go.mod h1:xUDAozZz0Wmdiufv0uyhnHkUTN6/6d8ulp4AwfLKrmA= @@ -1149,16 +1207,21 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +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/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= 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= @@ -1166,13 +1229,13 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= -github.com/mongodb-forks/digest v1.0.5 h1:EJu3wtLZcA0HCvsZpX5yuD193/sW9tHiNvrEM5apXMk= -github.com/mongodb-forks/digest v1.0.5/go.mod h1:rb+EX8zotClD5Dj4NdgxnJXG9nwrlx3NWKJ8xttz1Dg= +github.com/mongodb-forks/digest v1.1.0 h1:7eUdsR1BtqLv0mdNm4OXs6ddWvR4X2/OsLwdKksrOoc= +github.com/mongodb-forks/digest v1.1.0/go.mod h1:rb+EX8zotClD5Dj4NdgxnJXG9nwrlx3NWKJ8xttz1Dg= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/montanaflynn/stats v0.7.0 h1:r3y12KyNxj/Sb/iOE46ws+3mS1+MZca1wlHQFPsY/JU= github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= 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/mrunalp/fileutils v0.5.1 h1:F+S7ZlNKnrwHfSwdlgNSkKo67ReVf8o9fel6C3dkm/Q= @@ -1193,27 +1256,31 @@ github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/ github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nginxinc/nginx-plus-go-client v0.6.0/go.mod h1:DBAmdDP71tOhgFPdCMVusegzdKmLVpVL0nVcMX17pbY= -github.com/nginxinc/nginx-prometheus-exporter v0.8.1-0.20201110005315-f5a5f8086c19 h1:jR4KbeVA+KYmPq+amRe6AdB4mIfEaSOZGY2zCpqt/p8= -github.com/nginxinc/nginx-prometheus-exporter v0.8.1-0.20201110005315-f5a5f8086c19/go.mod h1:L58Se1nwn3cEyHWlcfdlXgiGbHe/efvDbkbi+psz3lA= +github.com/nginxinc/nginx-prometheus-exporter v0.11.0 h1:21xjnqNgxtni2jDgAQ90bl15uDnrTreO9sIlu1YsX/U= +github.com/nginxinc/nginx-prometheus-exporter v0.11.0/go.mod h1:GdyHnWAb8q8OW1Pssrrqbcqra0SH0Vn6UXICMmyWkw8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/observiq/nanojack v0.0.0-20201106172433-343928847ebc h1:49ewVBwLcy+eYqI4R0ICilCI4dPjddpFXWv3liXzUxM= +github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7oOxrWo= +github.com/oapi-codegen/runtime v1.0.0/go.mod h1:LmCUMQuPB4M/nLXilQXhHw+BLZdDb18B34OO356yJ/A= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= +github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -1221,25 +1288,29 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.31.0 h1:54UJxxj6cPInHS3a35wm6BK/F9nHYueZ1NVujHDrnXE= +github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKiT6zk= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/open-telemetry/opamp-go v0.14.0 h1:KoziIK+wsFojhUXNTkCSTnCPf0eCMqFAaccOs0HrWIY= +github.com/open-telemetry/opamp-go v0.14.0/go.mod h1:XOGCigljsLSTZ8FfLwvat0M1QDj3conIIgRa77BWrKs= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= -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/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= -github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= +github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= +github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.10.1 h1:09LIPVRP3uuZGQvgR+SgMSNBd1Eb3vlRbGqQpoHsF8w= +github.com/opencontainers/selinux v1.10.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opensearch-project/opensearch-go/v2 v2.3.0 h1:nQIEMr+A92CkhHrZgUhcfsrZjibvB3APXf2a1VwCmMQ= +github.com/opensearch-project/opensearch-go/v2 v2.3.0/go.mod h1:8LDr9FCgUTVoT+5ESjc2+iaZuldqE+23Iq0r1XeNue8= github.com/openshift/api v0.0.0-20180801171038-322a19404e37 h1:05irGU4HK4IauGGDbsk+ZHrm1wOzMLYjMlfaiqMrBYc= github.com/openshift/api v0.0.0-20180801171038-322a19404e37/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/api v0.0.0-20210521075222-e273a339932a/go.mod h1:izBmoXbUu3z5kUa4FjZhvekTsyzIWiOoaIgJiZBBMQs= github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 h1:ZHRIMCFIJN1p9LsJt4HQ+akDrys4PrYnXzOWI5LK03I= github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142/go.mod h1:fjS8r9mqDVsPb5td3NehsNOAWa4uiFkYEfVZioQ2gH0= -github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDOCg/jA= @@ -1253,12 +1324,13 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/paulmach/orb v0.10.0 h1:guVYVqzxHE/CQ1KpfGO077TR0ATHSNjp4s6XGLn3W9s= -github.com/paulmach/orb v0.10.0/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= +github.com/paulmach/orb v0.11.1 h1:3koVegMC4X/WeiXYz9iswopaTwMem53NzTJuTF20JzU= +github.com/paulmach/orb v0.11.1/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY= +github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= @@ -1268,21 +1340,20 @@ github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi github.com/pierrec/lz4 v2.6.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -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/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= +github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= -github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= -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/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pkg/sftp v1.13.5 h1:a3RLUqkyjYRtBTZJZ1VRrKbN3zhuPLlUc3sphVz81go= -github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg= +github.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo= +github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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= @@ -1296,21 +1367,17 @@ github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= @@ -1318,35 +1385,31 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9 github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.31.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/prometheus v0.48.0 h1:yrBloImGQ7je4h8M10ujGh4R6oxYQJQKlMuETwNskGk= -github.com/prometheus/prometheus v0.48.0/go.mod h1:SRw624aMAxTfryAcP8rOjg4S/sHHaetx2lyJJ2nM83g= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= +github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= +github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e h1:UmqAuY2OyDoog8+l5FybViJE5B2r+UxVGCUwFTsY5AA= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e/go.mod h1:+0ld+ozir7zWFcHA2vVpWAKxXakIioEjPPNOqH+J3ZA= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/relvacode/iso8601 v1.3.0 h1:HguUjsGpIMh/zsTczGN3DVJFxTU/GX+MMmzcKoMO7ko= -github.com/relvacode/iso8601 v1.3.0/go.mod h1:FlNp+jz+TXpyRqgmM7tnzHHzBnz776kmAH2h3sZCn0I= +github.com/redis/go-redis/v9 v9.5.1 h1:H1X4D3yHPaYrkL5X06Wh6xNVM/pX0Ft4RV0vMGvLBh8= +github.com/redis/go-redis/v9 v9.5.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= +github.com/relvacode/iso8601 v1.4.0 h1:GsInVSEJfkYuirYFxa80nMLbH2aydgZpIf52gYZXUJs= +github.com/relvacode/iso8601 v1.4.0/go.mod h1:FlNp+jz+TXpyRqgmM7tnzHHzBnz776kmAH2h3sZCn0I= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= @@ -1355,13 +1418,17 @@ github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThC github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= +github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 h1:yWfiTPwYxB0l5fGMhl/G+liULugVIHD9AU77iNLrURQ= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= -github.com/scalyr/dataset-go v0.14.0 h1:uRkoUt6LcMcH3VUTjOakQ4aq+1ooJB2t47oqYRUkV/k= -github.com/scalyr/dataset-go v0.14.0/go.mod h1:+a4BvVyS7mKquK7ySuWh4vygyDBREQrdikdcnABYKFw= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 h1:/8rfZAdFfafRXOgz+ZpMZZWZ5pYggCY9t7e/BvjaBHM= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scalyr/dataset-go v0.18.0 h1:CTv7kk/FGdiicTWo3h1brFusHD1yjhVGINFamP8uukw= +github.com/scalyr/dataset-go v0.18.0/go.mod h1:4x0JK5X0UdhZ2TEO3kHu9pTELDRc3WsrBBwQfkOPZKc= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 h1:RpforrEYXWkmGwJHIGnLZ3tTWStkjVVstwzNGqxX2Ds= @@ -1370,13 +1437,14 @@ github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAj github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= -github.com/shirou/gopsutil/v3 v3.22.2/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/shirou/gopsutil/v3 v3.22.12/go.mod h1:Xd7P1kwZcp5VW52+9XsirIKd/BROzbb2wdX3Kqlz9uI= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= +github.com/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= +github.com/shoenig/test v1.7.1/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= @@ -1384,10 +1452,10 @@ github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFR github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 h1:32k2QLgsKhcEs55q4REPKyIadvid5FPy2+VMgvbmKJ0= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfiC7+VheQaz+ypdCt5SmZNL+BRxUe7y4= -github.com/signalfx/sapm-proto v0.13.0 h1:yEkp1+MAU4vZvnJMp56uhVlRjlvCK7KQjBg0g2Apw8k= -github.com/signalfx/sapm-proto v0.13.0/go.mod h1:C72HjeCW5v0Llk6pIVJ/ZH8A5GbiZpCCSkE1dSlpWxY= -github.com/sijms/go-ora/v2 v2.7.20 h1:Q+/zNx3DMgytXMAvIbt/pUJcYj2jMRv/2Zg1DDlWhTY= -github.com/sijms/go-ora/v2 v2.7.20/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= +github.com/signalfx/sapm-proto v0.14.0 h1:KWh3I5E4EkelB19aP1/54Ik8khSioC/RVRW/riOfRGg= +github.com/signalfx/sapm-proto v0.14.0/go.mod h1:Km6PskZh966cqNoUn3AmRyGRix5VfwnxVBvn2vjRC9U= +github.com/sijms/go-ora/v2 v2.8.11 h1:oQtSX145kCYSjnrmWdtqp2LON9wOQW09wPJ5pIEn5Tg= +github.com/sijms/go-ora/v2 v2.8.11/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -1399,32 +1467,33 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/snowflakedb/gosnowflake v1.6.25 h1:o5zUmxTOo0Eo9AdkEj8blCeiMuILrQJ+rjUMAeZhcRE= -github.com/snowflakedb/gosnowflake v1.6.25/go.mod h1:KfO4F7bk+aXPUIvBqYxvPhxLlu2/w4TtSC8Rw/yr5Mg= +github.com/snowflakedb/gosnowflake v1.9.0 h1:s2ZdwFxFfpqwa5CqlhnzRESnLmwU3fED6zyNOJHFBQA= +github.com/snowflakedb/gosnowflake v1.9.0/go.mod h1:4ZgHxVf2OKwecx07WjfyAMr0gn8Qj4yvwAo68Og8wsU= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -1432,8 +1501,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1445,23 +1515,24 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F 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.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -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/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.792 h1:MwUEEkppjl0GIiz/rovNF54PG+RBwdfk1/+Rys8NUko= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.792/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= -github.com/testcontainers/testcontainers-go v0.26.0 h1:uqcYdoOHBy1ca7gKODfBd9uTHVK3a7UL848z09MVZ0c= -github.com/tg123/go-htpasswd v1.2.1 h1:i4wfsX1KvvkyoMiHZzjS0VzbAPWfxzI8INcZAKtutoU= -github.com/tg123/go-htpasswd v1.2.1/go.mod h1:erHp1B86KXdwQf1X5ZrLb7erXZnWueEQezb2dql4q58= -github.com/tidwall/gjson v1.10.2 h1:APbLGOM0rrEkd8WBw9C24nllro4ajFuJu0Sc9hRz8Bo= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.896 h1:24LJSJctlcXa6KzV5quttY8R8NmmF4hTbeWgqKm6clw= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.896/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/testcontainers/testcontainers-go v0.29.1 h1:z8kxdFlovA2y97RWx98v/TQ+tR+SXZm6p35M+xB92zk= +github.com/testcontainers/testcontainers-go v0.29.1/go.mod h1:SnKnKQav8UcgtKqjp/AD8bE1MqZm+3TDb/B8crE3XnI= +github.com/tg123/go-htpasswd v1.2.2 h1:tmNccDsQ+wYsoRfiONzIhDm5OkVHQzN3w4FOBAlN6BY= +github.com/tg123/go-htpasswd v1.2.2/go.mod h1:FcIrK0J+6zptgVwK1JDlqyajW/1B4PtuJ/FLWl7nx8A= github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.14.2 h1:6BBkirS0rAHjumnjHF6qgy5d2YAJ1TLIaFE2lzfOLqo= +github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= @@ -1475,36 +1546,35 @@ github.com/tilinna/clock v1.1.0/go.mod h1:ZsP7BcY7sEEz7ktc0IVy8Us6boDrK8VradlKRU github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU= github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= +github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= github.com/tjfoc/gmsm v1.3.2 h1:7JVkAn5bvUJ7HtU08iW6UiD+UTmJTIToHCfeFzkcCxM= github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= -github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= +github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= 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.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= +github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= +github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/vincent-petithory/dataurl v1.0.0 h1:cXw+kPto8NLuJtlMsI152irrVw9fRDX8AbShPRpg2CI= github.com/vincent-petithory/dataurl v1.0.0/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U= github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs= github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f h1:p4VB7kIXpOQvVn1ZaTIVp+3vuYAXFe3OJEvjbUYJLaA= -github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= +github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8= +github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= +github.com/vmihailenco/msgpack/v4 v4.3.13 h1:A2wsiTbvp63ilDaWmsk2wjx6xZdxQOvpiNlKBGKKXKI= +github.com/vmihailenco/msgpack/v4 v4.3.13/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= -github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f h1:NbC9yOr5At92seXK+kOr2TzU3mIWzcJOVzZasGSuwoU= -github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f/go.mod h1:VEqcmf4Sp7gPB7z05QGyKVmn6xWppr7Nz8cVNvyC80o= -github.com/vmware/govmomi v0.33.1 h1:qS2VpEBd/WLbzLO5McI6h5o5zaKsrezUxRY5r9jkW8A= -github.com/vmware/govmomi v0.33.1/go.mod h1:QuzWGiEMA/FYlu5JXKjytiORQoxv2hTHdS2lWnIqKMM= +github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e h1:Vu41Q0Pv3yMdd+tcDW6QeEUIK2L+9ZrPrq8NAMrKSLc= +github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e/go.mod h1:aRq5pxwgdJpAuP97SCjX1+Db32z/b0dggQ07FDF+fqE= +github.com/vmware/govmomi v0.36.3 h1:1Ng3CBNQVbFjCQbKtfsewy5o3dFa+EoTjqeThVISUBc= +github.com/vmware/govmomi v0.36.3/go.mod h1:mtGWtM+YhTADHlCgJBiskSRPOZRsN9MSjPzaZLte/oQ= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= -github.com/wavefronthq/wavefront-sdk-go v0.15.0 h1:po9E3vh/0y7kOx8D9EtFp7kbSLLLKbmu/w/s1xGJAQU= -github.com/wavefronthq/wavefront-sdk-go v0.15.0/go.mod h1:V72c8e+bXuLK8HpA6ioW0ll5mK9IPD+4IHNNDY75ksA= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= @@ -1523,21 +1593,25 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 h1:5mLPGnFdSsevFRFc9q3yYbBkB6tsm4aCwwQV/j1JQAQ= github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/zorkian/go-datadog-api v2.30.0+incompatible h1:R4ryGocppDqZZbnNc5EDR8xGWF/z/MxzWnqTUijDQes= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +github.com/zorkian/go-datadog-api v2.30.0+incompatible/go.mod h1:PkXwHX9CUQa/FpB9ZwAD45N1uhCW4MT/Wj7m36PbKss= +go.einride.tech/aip v0.66.0 h1:XfV+NQX6L7EOYK11yoHHFtndeaWh3KbD9/cN/6iWEt8= +go.einride.tech/aip v0.66.0/go.mod h1:qAhMsfT7plxBX+Oy7Huol6YUvZ0ZzdUz26yZsQwfl1M= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.mongodb.org/atlas v0.35.0 h1:fLSPEyv+QcrG5djPWMekaM+BEVfEVBKQO4yEUQl4CQ4= -go.mongodb.org/atlas v0.35.0/go.mod h1:nfPldE9dSama6G2IbIzmEza02Ly7yFZjMMVscaM0uEc= +go.mongodb.org/atlas v0.36.0 h1:m05S3AO7zkl+bcG1qaNsEKBnAqnKx2FDwLooHpIG3j4= +go.mongodb.org/atlas v0.36.0/go.mod h1:nfPldE9dSama6G2IbIzmEza02Ly7yFZjMMVscaM0uEc= go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1549,113 +1623,133 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/configgrpc v0.89.0/go.mod h1:2GuAxpU34a1X19kCZ8Kw3FUsxOIiFcWHiYorRCyhnCc= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/connector/forwardconnector v0.89.0 h1:L2SjHTu2PtGJG9pHIBTlzWR5YnkApcR/5u3jgxa+XIM= -go.opentelemetry.io/collector/connector/forwardconnector v0.89.0/go.mod h1:s0hVBjug/iwc9Fw6QlcKFZ5ezeqFfp3uK9IgS5cZNhc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/exporter/debugexporter v0.89.0 h1:MQUEX4OWszJQqQMqtYERiiw02Ta9QMWPe/hHWoD4YBU= -go.opentelemetry.io/collector/exporter/debugexporter v0.89.0/go.mod h1:eLoVrKOjgPvAmg0XJuellJ03zEpEol26l8i48Rhv53Q= -go.opentelemetry.io/collector/exporter/loggingexporter v0.89.0 h1:AdMGaH1p9D1Kvjkd/sXMg/Hkc5M1lqBdhXY5WfmiGSE= -go.opentelemetry.io/collector/exporter/loggingexporter v0.89.0/go.mod h1:N4zI/Zkjz5hx774uM3RdQTIeiw59FMmOdHrpbOK5UvE= -go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0 h1:0oYIeiRTURjIIYXs1OsaMAyNgg6Vc/CNa882YCYS/04= -go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0/go.mod h1:kA+ycED/f5rUj2030XE45q0aXUe5haZhW62zdPgice0= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0 h1:HzEVN0r94lkymm9D+NlB/UUlLqZqC5rnHUBN0Kj/ZYs= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0/go.mod h1:2AhkhO9YDcbfZ5X5gwN+k51FYFW8qfOWIrCEASp13qI= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/extension/ballastextension v0.89.0 h1:9Nhxmaj2XtAMik3SSTswW+MiOHPzC6LE0ZJOsnmqkPY= -go.opentelemetry.io/collector/extension/ballastextension v0.89.0/go.mod h1:kVGHc9tbBPaQgDsFEDhtwbQkWJmyHne2XrVhK0zyYZk= -go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 h1:opvHcGANx+dS4HJwGTPtRMd6dZdOmmGn6c3PfW/bihQ= -go.opentelemetry.io/collector/extension/zpagesextension v0.89.0/go.mod h1:RlhcZHBMg86y1hgBf+j1lNvnZ8ihWiYTYXFiy5InwyY= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/otelcol v0.89.0 h1:b3kC0zM9T6GxjhTcNEHIzXDd4zTIc7cBpexCPZ9nPzg= -go.opentelemetry.io/collector/otelcol v0.89.0/go.mod h1:BILxDcJe32wK+paX7ssnt4jyjOmTkIHvXe9JNjlHUk8= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 h1:oTEOHs2t00f9LfRwZGzKSXJPR3FHjPDDhjt05iWXYZM= -go.opentelemetry.io/collector/processor/batchprocessor v0.89.0/go.mod h1:xaTfwrIbnsUpvaUCIecvlH8wTH500U7LtczdaEPXmmk= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.89.0 h1:Rw7SMMMGD9YIJjqwNA1nZTEFAMJumMv2hb58iTtCrH0= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.89.0/go.mod h1:3gmY8wAiqcmThKH7e8t+J/p0BGvXymHrwum7tcm2rbs= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 h1:ayqzWyj56xyc0tcBpaYjWtxvj5pfZNhYC8LrwvlLAeE= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0/go.mod h1:7p2oZ09hP+h6WpTv67PgEJx+azViVqLBE4IfrnDOWOc= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/collector/service v0.89.0/go.mod h1:6IAr9Asn6t6YxSw6Qv5LwA+ilVUtP0nQsu1xzc9+mZA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0 h1:Yty9Vs4F3D6/liF1o6FNt0PvN85h/BJJ6DQKJ3nrcM0= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0/go.mod h1:On4VgbkqYL18kbJlWsa18+cMNe6rYpBnPi1ARI/BrsU= -go.opentelemetry.io/contrib/zpages v0.45.0 h1:jIwHHGoWzJoZdbIUtWdErjL85Gni6BignnAFqDtMRL4= -go.opentelemetry.io/contrib/zpages v0.45.0/go.mod h1:4mIdA5hqH6hEx9sZgV50qKfQO8aIYolUZboHmz+G7vw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0 h1:E/sf+2slCUb7wqh5FHwhdwKWTA+VXyMMAcFNlKVf4yw= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0/go.mod h1:2xuXI78Xp9cttLsJMF/Y08cJUqckLt0kLasn+vcHR5w= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0/go.mod h1:hbzqqcIxyywu6UQ5J1wb4ntla8nCwCfNBZnMo2Dgh48= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0/go.mod h1:qmFtGlXhoa9qPt5RrZgMp4f5RfRagucrdriI+hb3yWQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0/go.mod h1:CMJYNAfooOwSZSAmAeMUV1M+TXld3BiK++z9fqIm2xk= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0/go.mod h1:nZStMoc1H/YJpRjSx9IEX4abBMekORTLQcTUT1CgLkg= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 h1:vcSjcjn/BTeM6abI5CDymZdtd1m24quD1Mx4VE3N3fM= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0/go.mod h1:HblEnlZQNsVuuDpszdKTWcrHBI09OjBn2pWSzBx1goM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 h1:4s9HxB4azeeQkhY0GE5wZlMj4/pz8tE5gx2OQpGUw58= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0/go.mod h1:djVA3TUJ2fSdMX0JE5XxFBOaZzprElJoP7fD4vnV2SU= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 h1:lRhfcLr3gK5S/zn92h3clyOPnCvvNKs1WTMbtH4UvO0= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0/go.mod h1:vNMFTWe4dF05LsodUOc84OfxdlYVp1kCMuZzb41WfAk= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 h1:x/VsGlBj+DtJCXIucwzwcxiwnwAU8a6ALK6UN8fPdKQ= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0/go.mod h1:BapTGXu7CYrQGNohbapPwTSt2Ty/k/c6Oemx9mSSiK4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 h1:SxDS+Yr8qE+ID58ELR5n0D+SUlqHKOZ72pK3YPFAelA= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0/go.mod h1:DEoB0d0k1iGt4KEABntL8AW9xYQ6E7fmgkM2/s8aXvM= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 h1:C02SPbRPvrtmZ9TvsHWpz2TvHzqY5mNyEAlDdhax/a4= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0/go.mod h1:dzZKtykJio3Rm+G+Cmr15VV3xKp0PmFuh9Q9b3c1K7A= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 h1:04zGXVQZ8D6nvoPX8AaqxWxGHNNVsGR78E+tY+2VQr8= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0/go.mod h1:+UrRiugWaQPssz4mgEgQQo640f2bDUCFlo2Xr0/5ulc= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 h1:JYpDN0OnMsu0awk0rjaYEIko9hFzzBJ6+2U5W2iVvUE= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0/go.mod h1:xrXL804nBum1PgbvmJQ4I+hyW+DU4xBGO3MKMiYFX6E= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/connector/forwardconnector v0.98.0 h1:zIn0GaqUKq+3GcvfdVEIB/GSv7Zdtda8q0XChXG6Qj0= +go.opentelemetry.io/collector/connector/forwardconnector v0.98.0/go.mod h1:eC6PfRbK0Mx7QpqfnEI0uPAjq27MR//sRb5Vxzuf6eE= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 h1:zAFCXYzpxDh64BIVujqntlN5RE4jDahbPfJBy/Wq7D0= +go.opentelemetry.io/collector/exporter/debugexporter v0.98.0/go.mod h1:S15ELDQFoP5da3NHzXJR2I8FGUnM2C1Hp6e/OhaCtw0= +go.opentelemetry.io/collector/exporter/nopexporter v0.98.0 h1:Fc+TnZeSbMTDrk0r9kRMQK9J1IvjR9RXjIxDIn0NZY4= +go.opentelemetry.io/collector/exporter/nopexporter v0.98.0/go.mod h1:K4lPZjTM3hlacY+tqN2b0lALLb13K9gu5C57hox1V6g= +go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0 h1:uhiR/luaJCwMnvvkIS/gIxBbSAp+/vbqeC3AXmuc/kg= +go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0/go.mod h1:1ySnK/6Cl+67FTP6ty04PX9nrXPYFPuBqZ+Xn9Jzz6Y= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.98.0 h1:+6mRqTgoJxXxuPwI8s5fMKm0mLfwVwJgD2EB7gUNNlE= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.98.0/go.mod h1:uGocxqpbUrZDwZz6JBKsvNCyDLrS/pnVpn4BUuPauFw= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/extension/ballastextension v0.98.0 h1:EPzsYpiSY4vAfzJMqhVK6bIh+qZRmXVskaNlRFKjA0w= +go.opentelemetry.io/collector/extension/ballastextension v0.98.0/go.mod h1:IY/JNP0g+tUUe/w5YHgBYwv5XlH4eqo5d4th+RGROFU= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 h1:JfvsDpTwAhA9au8/4vmONRh0OBVU6n36seb41JD/mTQ= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0/go.mod h1:t1zDwy6kYp4w1JgcGHMvdGbKYHqWpK00bB1AEQ0Oqlc= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/otelcol v0.98.0 h1:sUk49Wqw+VBYeDynEA+GSeVEusFvzFW3KuF2vfDbyo0= +go.opentelemetry.io/collector/otelcol v0.98.0/go.mod h1:dW3UzuaiaNTddjKajk3Tp2Y7muDvYJdQz2yGUOE53gs= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 h1:iM4fMLGig3GKmz5XNtOPKDsnCnvbi0+UHYaWsx/aSRc= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0/go.mod h1:ROnuUkZJgpKEIDf3AIVjgRGNI7KPqCKPXsw8whL6Hzs= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0 h1:1jjiC3POfIluGLVM+6y8nolKEI95/vlHAvDmIOatags= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0/go.mod h1:VQDDrhQbIoelGF+fKzy6vCQM3hWDCH2YFaZKqgTDmGk= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/receiver/nopreceiver v0.98.0 h1:PQQwtE2+qe3U6I0cfMz+L79VS41oRMM2nY8S/2mJ95E= +go.opentelemetry.io/collector/receiver/nopreceiver v0.98.0/go.mod h1:ph9KWemo5QhxII+VEES9buzGMP6hSh/ZBLmS9oK+lJ0= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 h1:j7lfLwc5o1dtXIPXU8LjmxadejmJVRHN57ZYGH33Wq4= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0/go.mod h1:uWDBDxaWuzF1U5S2UIhstO0+Q8aUiwiUu8uO1IYN2XQ= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/collector/service v0.98.0 h1:lLJ7VXPXcV62fSISh4GuNd5ti6WvKje76NSgezc3ydo= +go.opentelemetry.io/collector/service v0.98.0/go.mod h1:wB7ozvZTHtMefb5KTYy5nyrVYWpGk8teq8jWFs4blIU= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0 h1:QU8UEKyPqgr/8vCC9LlDmkPnfFmiWAUF9GtJdcLz+BU= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0/go.mod h1:qonC7wyvtX1E6cEpAR+bJmhcGr6IVRGc/f6ZTpvi7jA= +go.opentelemetry.io/contrib/zpages v0.50.0 h1:hKC5asr83xDN4ErwSHVdk3gv053pZiF8SZKmS86IPEw= +go.opentelemetry.io/contrib/zpages v0.50.0/go.mod h1:8WovRn95fZdaX/dr3e4h7D8IqiVsnZ+WxY0Yn4LyU3k= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0 h1:0o/9KwAgxjK+3pMV0pwIF5toYHqDsPmQhfrBvKaG6mU= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0/go.mod h1:rZyTdpmRqoV+PpUn6QlruxJp/kE4765rPy0pP6mRDk8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 h1:hDKnobznDpcdTlNzO0S/owRB8tyVr1OoeZZhDoqY+Cs= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0/go.mod h1:kUDQaUs1h8iTIHbQTk+iJRiUvSfJYMMKTtMCaiVu7B0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 h1:Wc4hZuYXhVqq+TfRXLXlmNIL/awOanGx8ssq3ciDQxc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0/go.mod h1:BydOvapRqVEc0DVz27qWBX2jq45Ca5TI9mhZBDIdweY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 h1:vOL89uRfOCCNIjkisd0r7SEdJF3ZJFyCNY34fdZs8eU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0/go.mod h1:8GlBGcDk8KKi7n+2S4BT/CPZQYH3erLu0/k64r1MYgo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 h1:d7nHbdzU84STOiszaOxQ3kw5IwkSmHsU5Muol5/vL4I= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0/go.mod h1:yiPA1iZbb/EHYnODXOxvtKuB0I2hV8ehfLTEWpl7BJU= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 h1:0vZZdECYzhTt9MKQZ5qQ0V+J3MFu4MQaQ3COfugF+FQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0/go.mod h1:e7iXx3HjaSSBXfy9ykVUlupS2Vp7LBIBuT21ousM2Hk= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -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.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1667,6 +1761,7 @@ go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0 go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= 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.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= @@ -1680,8 +1775,8 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -1698,22 +1793,21 @@ golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1727,8 +1821,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= -golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1757,8 +1851,9 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.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/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1800,7 +1895,6 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -1809,19 +1903,18 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= 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.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1835,9 +1928,8 @@ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1849,10 +1941,10 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/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.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.1.0/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-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1881,9 +1973,9 @@ golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1899,7 +1991,6 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200509044756-6aff5f38e54f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1928,43 +2019,41 @@ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/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-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/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-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/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.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1975,7 +2064,10 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1984,8 +2076,9 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2048,7 +2141,6 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210112230658-8b4aab62c064/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -2056,20 +2148,21 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= -golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= -gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -2094,16 +2187,17 @@ google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjR google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= -google.golang.org/api v0.150.0 h1:Z9k22qD289SZ8gCJrk4DrWXkNjtfvKAUo/l1ma8eBYE= -google.golang.org/api v0.150.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= +google.golang.org/api v0.172.0 h1:/1OcMZGPmW1rX2LCu2CmGUD1KXK1+pfzxotxyRUCCdk= +google.golang.org/api v0.172.0/go.mod h1:+fJZq6QXWfa9pXhnIzsjx4yI22d4aI9ZpLb58gvXjis= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -2139,9 +2233,7 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2149,12 +2241,12 @@ google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaE google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -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-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -2176,8 +2268,8 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -2192,9 +2284,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2218,8 +2310,6 @@ gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24 gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -2239,7 +2329,10 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 h1:umQdVO0Ytx+kYadhuJNjFtDgIsIEBnKrOTvNuu8ClKI= gopkg.in/zorkian/go-datadog-api.v2 v2.30.0/go.mod h1:kx0CSMRpzEZfx/nFH62GLU4stZjparh/BRpM89t4XCQ= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.2.0 h1:I0DwBVMGAx26dttAj1BtJLAkVGncrkkUXfJLC4Flt/I= +gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2248,46 +2341,44 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= -k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/api v0.30.0 h1:siWhRq7cNjy2iHssOB9SCGNCl2spiF1dO3dABqZ8niA= +k8s.io/api v0.30.0/go.mod h1:OPlaYhoHs8EQ1ql0R/TsUgaRPhpKNxIMrKQfWUp8QSE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= -k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/apimachinery v0.30.0 h1:qxVPsyDM5XS96NIh9Oj6LavoVFYff/Pon9cZeDIkHHA= +k8s.io/apimachinery v0.30.0/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= -k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= +k8s.io/client-go v0.30.0 h1:sB1AGGlhY/o7KCyCEQ0bPWzYDL0pwOZO4vAtTSh/gJQ= +k8s.io/client-go v0.30.0/go.mod h1:g7li5O5256qe6TYdAMyX/otJqMhIiGgTapdLchhmOaY= k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/kubelet v0.28.3 h1:bp/uIf1R5F61BlFvFtzc4PDEiK7TtFcw3wFJlc0V0LM= -k8s.io/kubelet v0.28.3/go.mod h1:E3NHYbp/v45Ao6AD0EOZnqO3L0R6Haks6Nm0+bnFwtU= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/kubelet v0.30.0 h1:/pqHVR2Rn8ExCpn211wL3pMtqRFpcBcJPl4+1INbIMk= +k8s.io/kubelet v0.30.0/go.mod h1:WukdKqbQxnj+csn3K8XOKeX7Sh60J/da25IILjvvB5s= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= -sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= +sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk= +sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= -skywalking.apache.org/repo/goapi v0.0.0-20231026090926-09378dd56587 h1:TY79I5Y7xRB8q5LQ+MJn7NYsYi0VL5nj1QDrUHwK7cQ= -skywalking.apache.org/repo/goapi v0.0.0-20231026090926-09378dd56587/go.mod h1:onFubXaIoY/2FTRVrLMqCTlaNq4SilAEwF/2G0IcaBw= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4 h1:3YIFmsshgsU6FzHgnkG9Z24CkXkgoexBN5O0aSzK79g= +skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4/go.mod h1:oD2dxcDAHVIt95Ee7kJHgZ5f64QNhrqTjQYARwfafc4= diff --git a/cmd/otelcontribcol/main.go b/cmd/otelcontribcol/main.go index d0c107130ee8..c969ea9ceaf4 100644 --- a/cmd/otelcontribcol/main.go +++ b/cmd/otelcontribcol/main.go @@ -14,7 +14,7 @@ func main() { info := component.BuildInfo{ Command: "otelcontribcol", Description: "Local OpenTelemetry Collector Contrib binary, testing only.", - Version: "0.89.0-dev", + Version: "0.98.0-dev", } if err := run(otelcol.CollectorSettings{BuildInfo: info, Factories: components}); err != nil { diff --git a/cmd/otelcontribcol/main_others.go b/cmd/otelcontribcol/main_others.go index e80a51cd4e04..3735aecb5867 100644 --- a/cmd/otelcontribcol/main_others.go +++ b/cmd/otelcontribcol/main_others.go @@ -1,7 +1,6 @@ // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. //go:build !windows -// +build !windows package main diff --git a/cmd/otelcontribcol/main_windows.go b/cmd/otelcontribcol/main_windows.go index 65eb6637e768..bb68124a52c9 100644 --- a/cmd/otelcontribcol/main_windows.go +++ b/cmd/otelcontribcol/main_windows.go @@ -1,47 +1,28 @@ // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. //go:build windows -// +build windows package main import ( + "errors" "fmt" - "os" "go.opentelemetry.io/collector/otelcol" + "golang.org/x/sys/windows" "golang.org/x/sys/windows/svc" ) func run(params otelcol.CollectorSettings) error { - if useInteractiveMode, err := checkUseInteractiveMode(); err != nil { - return err - } else if useInteractiveMode { - return runInteractive(params) - } else { - return runService(params) - } -} - -func checkUseInteractiveMode() (bool, error) { - // If environment variable NO_WINDOWS_SERVICE is set with any value other - // than 0, use interactive mode instead of running as a service. This should - // be set in case running as a service is not possible or desired even - // though the current session is not detected to be interactive - if value, present := os.LookupEnv("NO_WINDOWS_SERVICE"); present && value != "0" { - return true, nil - } - - isInteractiveSession, err := svc.IsAnInteractiveSession() - if err != nil { - return false, fmt.Errorf("failed to determine if we are running in an interactive session: %w", err) - } - return isInteractiveSession, nil -} - -func runService(params otelcol.CollectorSettings) error { - // do not need to supply service name when startup is invoked through Service Control Manager directly + // No need to supply service name when startup is invoked through + // the Service Control Manager directly. if err := svc.Run("", otelcol.NewSvcHandler(params)); err != nil { + if errors.Is(err, windows.ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) { + // Per https://learn.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-startservicectrldispatchera#return-value + // this means that the process is not running as a service, so run interactively. + return runInteractive(params) + } + return fmt.Errorf("failed to start collector server: %w", err) } diff --git a/cmd/otelcontribcol/processors_test.go b/cmd/otelcontribcol/processors_test.go deleted file mode 100644 index 053d8290d3ae..000000000000 --- a/cmd/otelcontribcol/processors_test.go +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - -package main - -import ( - "context" - "errors" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/processor" - "go.opentelemetry.io/collector/processor/memorylimiterprocessor" - "go.opentelemetry.io/collector/processor/processortest" - - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/remotetapprocessor" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor" -) - -func TestDefaultProcessors(t *testing.T) { - t.Parallel() - - allFactories, err := components() - require.NoError(t, err) - - procFactories := allFactories.Processors - - tests := []struct { - getConfigFn getProcessorConfigFn - processor component.Type - skipLifecycle bool - }{ - { - processor: "attributes", - getConfigFn: func() component.Config { - cfg := procFactories["attributes"].CreateDefaultConfig().(*attributesprocessor.Config) - cfg.Actions = []attraction.ActionKeyValue{ - {Key: "attribute1", Action: attraction.INSERT, Value: 123}, - } - return cfg - }, - }, - { - processor: "batch", - }, - { - processor: "datadog", - skipLifecycle: true, // requires external exporters to be configured to route data - }, - { - processor: "deltatorate", - }, - { - processor: "filter", - }, - { - processor: "groupbyattrs", - }, - { - processor: "groupbytrace", - }, - { - processor: "k8sattributes", - skipLifecycle: true, // Requires a k8s API to communicate with - }, - { - processor: "memory_limiter", - getConfigFn: func() component.Config { - cfg := procFactories["memory_limiter"].CreateDefaultConfig().(*memorylimiterprocessor.Config) - cfg.CheckInterval = 100 * time.Millisecond - cfg.MemoryLimitMiB = 1024 * 1024 - return cfg - }, - }, - { - processor: "metricstransform", - }, - { - processor: "experimental_metricsgeneration", - }, - { - processor: "probabilistic_sampler", - }, - { - processor: "resourcedetection", - }, - { - processor: "resource", - getConfigFn: func() component.Config { - cfg := procFactories["resource"].CreateDefaultConfig().(*resourceprocessor.Config) - cfg.AttributesActions = []attraction.ActionKeyValue{ - {Key: "attribute1", Action: attraction.INSERT, Value: 123}, - } - return cfg - }, - }, - { - processor: "routing", - skipLifecycle: true, // Requires external exporters to be configured to route data - }, - { - processor: "span", - getConfigFn: func() component.Config { - cfg := procFactories["span"].CreateDefaultConfig().(*spanprocessor.Config) - cfg.Rename.FromAttributes = []string{"test-key"} - return cfg - }, - }, - { - processor: "servicegraph", - skipLifecycle: true, - }, - { - processor: "spanmetrics", - skipLifecycle: true, // Requires a running exporter to convert data to/from - }, - { - processor: "cumulativetodelta", - }, - { - processor: "tail_sampling", - }, - { - processor: "transform", - }, - { - processor: "redaction", - }, - { - processor: "remotetap", - getConfigFn: func() component.Config { - cfg := procFactories["remotetap"].CreateDefaultConfig().(*remotetapprocessor.Config) - cfg.Endpoint = "localhost:0" - return cfg - }, - }, - { - processor: "sumologic", - }, - } - - assert.Equal(t, len(procFactories), len(tests), "All processors must be added to lifecycle tests") - for _, tt := range tests { - t.Run(string(tt.processor), func(t *testing.T) { - factory := procFactories[tt.processor] - assert.Equal(t, tt.processor, factory.Type()) - - t.Run("shutdown", func(t *testing.T) { - verifyProcessorShutdown(t, factory, tt.getConfigFn) - }) - t.Run("lifecycle", func(t *testing.T) { - if tt.skipLifecycle { - t.SkipNow() - } - verifyProcessorLifecycle(t, factory, tt.getConfigFn) - }) - }) - } -} - -// getProcessorConfigFn is used customize the configuration passed to the verification. -// This is used to change ports or provide values required but not provided by the -// default configuration. -type getProcessorConfigFn func() component.Config - -// verifyProcessorLifecycle is used to test if a processor type can handle the typical -// lifecycle of a component. The getConfigFn parameter only need to be specified if -// the test can't be done with the default configuration for the component. -func verifyProcessorLifecycle(t *testing.T, factory processor.Factory, getConfigFn getProcessorConfigFn) { - ctx := context.Background() - host := newAssertNoErrorHost(t) - processorCreationSet := processortest.NewNopCreateSettings() - - if getConfigFn == nil { - getConfigFn = factory.CreateDefaultConfig - } - - createFns := map[component.DataType]createProcessorFn{ - component.DataTypeLogs: wrapCreateLogsProc(factory), - component.DataTypeTraces: wrapCreateTracesProc(factory), - component.DataTypeMetrics: wrapCreateMetricsProc(factory), - } - - for i := 0; i < 2; i++ { - procs := make(map[component.DataType]component.Component) - for dataType, createFn := range createFns { - proc, err := createFn(ctx, processorCreationSet, getConfigFn()) - if errors.Is(err, component.ErrDataTypeIsNotSupported) { - continue - } - require.NoError(t, err) - procs[dataType] = proc - require.NoError(t, proc.Start(ctx, host)) - } - for dataType, proc := range procs { - assert.NotPanics(t, func() { - switch dataType { - case component.DataTypeLogs: - logsProc := proc.(processor.Logs) - logs := testdata.GenerateLogsManyLogRecordsSameResource(2) - if !logsProc.Capabilities().MutatesData { - logs.MarkReadOnly() - } - assert.NoError(t, logsProc.ConsumeLogs(ctx, logs)) - case component.DataTypeMetrics: - metricsProc := proc.(processor.Metrics) - metrics := testdata.GenerateMetricsTwoMetrics() - if !metricsProc.Capabilities().MutatesData { - metrics.MarkReadOnly() - } - assert.NoError(t, metricsProc.ConsumeMetrics(ctx, metrics)) - case component.DataTypeTraces: - tracesProc := proc.(processor.Traces) - traces := testdata.GenerateTracesTwoSpansSameResource() - if !tracesProc.Capabilities().MutatesData { - traces.MarkReadOnly() - } - assert.NoError(t, tracesProc.ConsumeTraces(ctx, traces)) - } - }) - require.NoError(t, proc.Shutdown(ctx)) - } - } -} - -// verifyProcessorShutdown is used to test if a processor type can be shutdown without being started first. -// We disregard errors being returned by shutdown, we're just making sure the processors don't panic. -func verifyProcessorShutdown(tb testing.TB, factory processor.Factory, getConfigFn getProcessorConfigFn) { - ctx := context.Background() - processorCreationSet := processortest.NewNopCreateSettings() - - if getConfigFn == nil { - getConfigFn = factory.CreateDefaultConfig - } - - createFns := []createProcessorFn{ - wrapCreateLogsProc(factory), - wrapCreateTracesProc(factory), - wrapCreateMetricsProc(factory), - } - - for _, createFn := range createFns { - p, err := createFn(ctx, processorCreationSet, getConfigFn()) - if errors.Is(err, component.ErrDataTypeIsNotSupported) { - continue - } - if p == nil { - continue - } - assert.NotPanics(tb, func() { - _ = p.Shutdown(ctx) - }) - } -} - -type createProcessorFn func( - ctx context.Context, - set processor.CreateSettings, - cfg component.Config, -) (component.Component, error) - -func wrapCreateLogsProc(factory processor.Factory) createProcessorFn { - return func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { - return factory.CreateLogsProcessor(ctx, set, cfg, consumertest.NewNop()) - } -} - -func wrapCreateMetricsProc(factory processor.Factory) createProcessorFn { - return func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { - return factory.CreateMetricsProcessor(ctx, set, cfg, consumertest.NewNop()) - } -} - -func wrapCreateTracesProc(factory processor.Factory) createProcessorFn { - return func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { - return factory.CreateTracesProcessor(ctx, set, cfg, consumertest.NewNop()) - } -} diff --git a/cmd/otelcontribcol/receivers_test.go b/cmd/otelcontribcol/receivers_test.go index a33ecc5fbc7c..c81c02503674 100644 --- a/cmd/otelcontribcol/receivers_test.go +++ b/cmd/otelcontribcol/receivers_test.go @@ -1,10 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - package main import ( @@ -33,6 +29,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/namedpipereceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver" @@ -41,6 +38,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/webhookeventreceiver" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver" ) func TestDefaultReceivers(t *testing.T) { @@ -50,13 +48,13 @@ func TestDefaultReceivers(t *testing.T) { rcvrFactories := allFactories.Receivers tests := []struct { - getConfigFn getReceiverConfigFn - receiver component.Type - skipLifecyle bool + getConfigFn getReceiverConfigFn + receiver component.Type + skipLifecycle bool }{ { - receiver: "active_directory_ds", - skipLifecyle: true, // Requires a running windows service + receiver: "active_directory_ds", + skipLifecycle: true, // Requires a running windows service }, { receiver: "aerospike", @@ -79,18 +77,18 @@ func TestDefaultReceivers(t *testing.T) { { receiver: "awscontainerinsightreceiver", // TODO: skipped since it will only function in a container environment with procfs in expected location. - skipLifecyle: true, + skipLifecycle: true, }, { - receiver: "awsecscontainermetrics", - skipLifecyle: true, // Requires container metaendpoint to be running + receiver: "awsecscontainermetrics", + skipLifecycle: true, // Requires container metaendpoint to be running }, { receiver: "awsfirehose", }, { - receiver: "awsxray", - skipLifecyle: true, // Requires AWS endpoint to check identity to run + receiver: "awsxray", + skipLifecycle: true, // Requires AWS endpoint to check identity to run }, { receiver: "azureblob", @@ -100,7 +98,7 @@ func TestDefaultReceivers(t *testing.T) { cfg.EventHub.EndPoint = "DefaultEndpointsProtocol=http;SharedAccessKeyName=secret;SharedAccessKey=secret;Endpoint=test.test" return cfg }, - skipLifecyle: true, // Requires Azure event hub to run + skipLifecycle: true, // Requires Azure event hub to run }, { receiver: "azureeventhub", @@ -109,7 +107,7 @@ func TestDefaultReceivers(t *testing.T) { cfg.Connection = "Endpoint=sb://example.com/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=superSecret1234=;EntityPath=hubName" return cfg }, - skipLifecyle: true, // Requires Azure event hub to run + skipLifecycle: true, // Requires Azure event hub to run }, { receiver: "azuremonitor", @@ -121,7 +119,7 @@ func TestDefaultReceivers(t *testing.T) { cfg.ClientSecret = "client_secret" return cfg }, - skipLifecyle: true, // Requires Azure event hub to run + skipLifecycle: true, // Requires Azure event hub to run }, { receiver: "bigip", @@ -133,15 +131,15 @@ func TestDefaultReceivers(t *testing.T) { cfg.Endpoint = "0.0.0.0:0" return cfg }, - skipLifecyle: true, // Panics after test have completed, requires a wait group + skipLifecycle: true, // Panics after test have completed, requires a wait group }, { - receiver: "cloudflare", - skipLifecyle: true, + receiver: "cloudflare", + skipLifecycle: true, }, { - receiver: "cloudfoundry", - skipLifecyle: true, // Requires UAA (auth) endpoint to run + receiver: "cloudfoundry", + skipLifecycle: true, // Requires UAA (auth) endpoint to run }, { receiver: "chrony", @@ -166,8 +164,8 @@ func TestDefaultReceivers(t *testing.T) { }, }, { - receiver: "docker_stats", - skipLifecyle: true, + receiver: "docker_stats", + skipLifecycle: true, }, { receiver: "elasticsearch", @@ -184,8 +182,8 @@ func TestDefaultReceivers(t *testing.T) { }, }, { - receiver: "file", - skipLifecyle: true, // Requires an existing JSONL file + receiver: "file", + skipLifecycle: true, // Requires an existing JSONL file }, { receiver: "filestats", @@ -200,8 +198,8 @@ func TestDefaultReceivers(t *testing.T) { receiver: "googlecloudspanner", }, { - receiver: "googlecloudpubsub", - skipLifecyle: true, // Requires a pubsub subscription + receiver: "googlecloudpubsub", + skipLifecycle: true, // Requires a pubsub subscription }, { receiver: "haproxy", @@ -216,15 +214,15 @@ func TestDefaultReceivers(t *testing.T) { receiver: "influxdb", }, { - receiver: "iis", - skipLifecyle: true, // Requires a running windows process + receiver: "iis", + skipLifecycle: true, // Requires a running windows process }, { receiver: "jaeger", }, { - receiver: "jmx", - skipLifecyle: true, // Requires a running instance with JMX + receiver: "jmx", + skipLifecycle: true, // Requires a running instance with JMX getConfigFn: func() component.Config { cfg := jmxreceiver.NewFactory().CreateDefaultConfig().(*jmxreceiver.Config) cfg.Endpoint = "localhost:1234" @@ -233,31 +231,31 @@ func TestDefaultReceivers(t *testing.T) { }, }, { - receiver: "journald", - skipLifecyle: runtime.GOOS != "linux", + receiver: "journald", + skipLifecycle: runtime.GOOS != "linux", }, { - receiver: "k8s_events", - skipLifecyle: true, // need a valid Kubernetes host and port + receiver: "k8s_events", + skipLifecycle: true, // need a valid Kubernetes host and port }, { - receiver: "k8sobjects", - skipLifecyle: true, // need a valid Kubernetes host and port + receiver: "k8sobjects", + skipLifecycle: true, // need a valid Kubernetes host and port }, { - receiver: "kafka", - skipLifecyle: true, // TODO: It needs access to internals to successful start. + receiver: "kafka", + skipLifecycle: true, // TODO: It needs access to internals to successful start. }, { receiver: "kafkametrics", }, { - receiver: "k8s_cluster", - skipLifecyle: true, // Requires access to the k8s host and port in order to run + receiver: "k8s_cluster", + skipLifecycle: true, // Requires access to the k8s host and port in order to run }, { - receiver: "kubeletstats", - skipLifecyle: true, // Requires access to certificates to auth against kubelet + receiver: "kubeletstats", + skipLifecycle: true, // Requires access to certificates to auth against kubelet }, { receiver: "loki", @@ -266,8 +264,8 @@ func TestDefaultReceivers(t *testing.T) { receiver: "memcached", }, { - receiver: "mongodb", - skipLifecyle: true, // Causes tests to timeout + receiver: "mongodb", + skipLifecycle: true, // Causes tests to timeout }, { receiver: "mongodbatlas", @@ -287,8 +285,8 @@ func TestDefaultReceivers(t *testing.T) { receiver: "nsxt", }, { - receiver: "opencensus", - skipLifecyle: true, // TODO: Usage of CMux doesn't allow proper shutdown. + receiver: "opencensus", + skipLifecycle: true, // TODO: Usage of CMux doesn't allow proper shutdown. }, { receiver: "oracledb", @@ -305,8 +303,8 @@ func TestDefaultReceivers(t *testing.T) { }, }, { - receiver: "podman_stats", - skipLifecyle: true, // Requires a running podman daemon + receiver: "podman_stats", + skipLifecycle: true, // Requires a running podman daemon }, { receiver: "postgresql", @@ -315,17 +313,15 @@ func TestDefaultReceivers(t *testing.T) { receiver: "prometheus", getConfigFn: func() component.Config { cfg := rcvrFactories["prometheus"].CreateDefaultConfig().(*prometheusreceiver.Config) - cfg.PrometheusConfig = &promconfig.Config{ - ScrapeConfigs: []*promconfig.ScrapeConfig{ - {JobName: "test"}, - }, + cfg.PrometheusConfig.ScrapeConfigs = []*promconfig.ScrapeConfig{ + {JobName: "test"}, } return cfg }, }, { - receiver: "pulsar", - skipLifecyle: true, // TODO It requires a running pulsar instance to start successfully. + receiver: "pulsar", + skipLifecycle: true, // TODO It requires a running pulsar instance to start successfully. }, { receiver: "rabbitmq", @@ -388,19 +384,20 @@ func TestDefaultReceivers(t *testing.T) { receiver: "sqlquery", }, { - receiver: "sqlserver", - skipLifecyle: true, // Requires a running windows process + receiver: "sqlserver", + skipLifecycle: true, // Requires a running windows process }, { - receiver: "sshcheck", + receiver: "sshcheck", + skipLifecycle: runtime.GOOS == "windows", }, { receiver: "statsd", }, { - receiver: "wavefront", - skipLifecyle: true, // Depends on carbon receiver to be running correctly + receiver: "wavefront", + skipLifecycle: true, // Depends on carbon receiver to be running correctly }, { receiver: "webhookevent", @@ -411,12 +408,17 @@ func TestDefaultReceivers(t *testing.T) { }, }, { - receiver: "windowseventlog", - skipLifecyle: true, // Requires a running windows process + receiver: "windowseventlog", + skipLifecycle: runtime.GOOS != "windows", + getConfigFn: func() component.Config { + cfg := rcvrFactories["windowseventlog"].CreateDefaultConfig().(*windowseventlogreceiver.WindowsLogConfig) + cfg.InputConfig.Channel = "Application" + return cfg + }, }, { - receiver: "windowsperfcounters", - skipLifecyle: true, // Requires a running windows process + receiver: "windowsperfcounters", + skipLifecycle: runtime.GOOS != "windows", }, { receiver: "zipkin", @@ -454,8 +456,17 @@ func TestDefaultReceivers(t *testing.T) { receiver: "vcenter", }, { - receiver: "solace", - skipLifecyle: true, // Requires a solace broker to connect to + receiver: "solace", + skipLifecycle: true, // Requires a solace broker to connect to + }, + { + receiver: "namedpipe", + skipLifecycle: runtime.GOOS != "linux", + getConfigFn: func() component.Config { + cfg := rcvrFactories["namedpipe"].CreateDefaultConfig().(*namedpipereceiver.NamedPipeConfig) + cfg.InputConfig.Path = "/tmp/foo" + return cfg + }, }, } @@ -469,7 +480,7 @@ func TestDefaultReceivers(t *testing.T) { verifyReceiverShutdown(t, factory, tt.getConfigFn) }) t.Run("lifecycle", func(t *testing.T) { - if tt.skipLifecyle { + if tt.skipLifecycle { t.SkipNow() } verifyReceiverLifecycle(t, factory, tt.getConfigFn) diff --git a/cmd/oteltestbedcol/Makefile b/cmd/oteltestbedcol/Makefile index ded7a36092dc..1994cf483835 100644 --- a/cmd/oteltestbedcol/Makefile +++ b/cmd/oteltestbedcol/Makefile @@ -1 +1,4 @@ include ../../Makefile.Common + +lint: checklicense misspell + @echo "skipping lint: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/29449" diff --git a/cmd/oteltestbedcol/builder-config.yaml b/cmd/oteltestbedcol/builder-config.yaml index dabe22086a3b..4886d926d02e 100644 --- a/cmd/oteltestbedcol/builder-config.yaml +++ b/cmd/oteltestbedcol/builder-config.yaml @@ -2,54 +2,54 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-contrib/cmd/oteltestbedcol name: oteltestbedcol description: OpenTelemetry Collector binary for testbed only tests. - version: 0.89.0-dev - otelcol_version: 0.89.0 + version: 0.98.0-dev + otelcol_version: 0.97.0 extensions: - - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.89.0 - - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.89.0 - import: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage + - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.98.0 + - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.98.0 exporters: - - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.89.0 - - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.89.0 - - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0 - - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.89.0 + - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 + - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0 + - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.98.0 processors: - - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 - - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.89.0 + - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 + - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.98.0 receivers: - - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver v0.89.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.89.0 + - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.98.0 replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage => ../../extension/storage + - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage => ../../extension/storage/filestorage - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => ../../internal/common - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver => ../../receiver/opencensusreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver => ../../receiver/splunkhecreceiver @@ -84,6 +84,7 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter => ../../exporter/signalfxexporter - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry => ../../pkg/resourcetotelemetry - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter => ../../exporter/opencensusexporter + - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter => ../../exporter/opensearchexporter - github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent => ../../internal/sharedcomponent - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver => ../../receiver/prometheusreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter => ../../exporter/sapmexporter diff --git a/cmd/oteltestbedcol/components.go b/cmd/oteltestbedcol/components.go index 8d4bd79063ef..d3a593c7b081 100644 --- a/cmd/oteltestbedcol/components.go +++ b/cmd/oteltestbedcol/components.go @@ -6,7 +6,6 @@ import ( "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/exporter" debugexporter "go.opentelemetry.io/collector/exporter/debugexporter" - loggingexporter "go.opentelemetry.io/collector/exporter/loggingexporter" otlpexporter "go.opentelemetry.io/collector/exporter/otlpexporter" otlphttpexporter "go.opentelemetry.io/collector/exporter/otlphttpexporter" "go.opentelemetry.io/collector/extension" @@ -21,6 +20,7 @@ import ( carbonexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter" opencensusexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter" + opensearchexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter" prometheusexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter" sapmexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter" signalfxexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter" @@ -82,11 +82,11 @@ func components() (otelcol.Factories, error) { factories.Exporters, err = exporter.MakeFactoryMap( debugexporter.NewFactory(), - loggingexporter.NewFactory(), otlpexporter.NewFactory(), otlphttpexporter.NewFactory(), carbonexporter.NewFactory(), opencensusexporter.NewFactory(), + opensearchexporter.NewFactory(), prometheusexporter.NewFactory(), sapmexporter.NewFactory(), signalfxexporter.NewFactory(), diff --git a/cmd/oteltestbedcol/go.mod b/cmd/oteltestbedcol/go.mod index e793656f15a6..ac5237cffe39 100644 --- a/cmd/oteltestbedcol/go.mod +++ b/cmd/oteltestbedcol/go.mod @@ -2,299 +2,302 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/oteltestbedcol -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/connector v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/exporter/debugexporter v0.89.0 - go.opentelemetry.io/collector/exporter/loggingexporter v0.89.0 - go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0 - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/extension/ballastextension v0.89.0 - go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 - go.opentelemetry.io/collector/otelcol v0.89.0 - go.opentelemetry.io/collector/processor v0.89.0 - go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 - go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.89.0 - go.opentelemetry.io/collector/receiver v0.89.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 - golang.org/x/sys v0.14.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/connector v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/extension/ballastextension v0.98.0 + go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 + go.opentelemetry.io/collector/otelcol v0.98.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0 + go.opentelemetry.io/collector/receiver v0.98.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 + go.uber.org/goleak v1.3.0 + golang.org/x/sys v0.19.0 ) require ( - cloud.google.com/go/compute v1.23.2 // indirect - cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect - github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect - github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.29 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect - github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect + cloud.google.com/go/compute v1.24.0 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 // indirect + github.com/Code-Hex/go-generics-cache v1.3.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/alecthomas/participle/v2 v2.1.0 // indirect - github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect - github.com/antonmedv/expr v1.15.3 // indirect - github.com/apache/thrift v0.19.0 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect + github.com/apache/thrift v0.20.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.47.10 // indirect + github.com/aws/aws-sdk-go v1.50.32 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dennwc/varint v1.0.0 // indirect - github.com/digitalocean/godo v1.99.0 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.7+incompatible // indirect - github.com/docker/go-connections v0.4.0 // indirect + github.com/digitalocean/godo v1.109.0 // indirect + github.com/distribution/reference v0.5.0 // indirect + github.com/docker/docker v25.0.5+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/emicklei/go-restful/v3 v3.10.2 // indirect - github.com/envoyproxy/go-control-plane v0.11.1 // indirect - github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect + github.com/elastic/go-structform v0.0.10 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/envoyproxy/go-control-plane v0.12.0 // indirect + github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect + github.com/expr-lang/expr v1.16.3 // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.3.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/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.4 // indirect - github.com/go-resty/resty/v2 v2.7.0 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.20.4 // indirect + github.com/go-openapi/swag v0.22.9 // indirect + github.com/go-resty/resty/v2 v2.11.0 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect + github.com/golang-jwt/jwt/v5 v5.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gophercloud/gophercloud v1.5.0 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect + github.com/gophercloud/gophercloud v1.8.0 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect - github.com/hashicorp/consul/api v1.25.1 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect + github.com/hashicorp/consul/api v1.28.2 // indirect github.com/hashicorp/cronexpr v1.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-hclog v1.6.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.4 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect - github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702 // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/hetznercloud/hcloud-go/v2 v2.0.0 // indirect + github.com/hetznercloud/hcloud-go/v2 v2.6.0 // indirect github.com/iancoleman/strcase v0.3.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 // indirect - github.com/ionos-cloud/sdk-go/v6 v6.1.8 // indirect - github.com/jaegertracing/jaeger v1.48.0 // indirect + github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.11 // indirect + github.com/jaegertracing/jaeger v1.55.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 // indirect - github.com/linode/linodego v1.19.0 // indirect + github.com/linode/linodego v1.30.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/miekg/dns v1.1.55 // indirect + github.com/miekg/dns v1.1.58 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.98.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect + github.com/opensearch-project/opensearch-go/v2 v2.3.0 // indirect github.com/openzipkin/zipkin-go v0.4.2 // indirect - github.com/ovh/go-ovh v1.4.1 // indirect + github.com/ovh/go-ovh v1.4.3 // indirect github.com/philhofer/fwd v1.1.2 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.52.2 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/prometheus v0.47.2 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect + github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e // indirect github.com/rs/cors v1.10.1 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 // indirect - github.com/signalfx/sapm-proto v0.13.0 // indirect + github.com/signalfx/sapm-proto v0.14.0 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tinylib/msgp v1.1.9 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect + github.com/valyala/fastjson v1.6.4 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.etcd.io/bbolt v1.3.8 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.etcd.io/bbolt v1.3.9 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.89.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.89.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/collector/service v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect - go.opentelemetry.io/contrib/zpages v0.45.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk v1.20.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.98.0 // indirect + go.opentelemetry.io/collector/config/confighttp v0.98.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.98.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/collector/service v0.98.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.25.0 // indirect + go.opentelemetry.io/contrib/zpages v0.50.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.15.0 // indirect - gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/api v0.150.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.19.0 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/api v0.170.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240314234333-6e1732d8331c // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.28.3 // indirect - k8s.io/apimachinery v0.28.3 // indirect - k8s.io/client-go v0.28.3 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect + k8s.io/api v0.29.3 // indirect + k8s.io/apimachinery v0.29.3 // indirect + k8s.io/client-go v0.29.3 // indirect + k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage => ../../extension/storage +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage => ../../extension/storage/filestorage + replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => ../../internal/common replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver => ../../receiver/opencensusreceiver @@ -363,6 +366,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourceto replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter => ../../exporter/opencensusexporter +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter => ../../exporter/opensearchexporter + replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent => ../../internal/sharedcomponent replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver => ../../receiver/prometheusreceiver diff --git a/cmd/oteltestbedcol/go.sum b/cmd/oteltestbedcol/go.sum index 2cb7c42d74c9..955ab5428875 100644 --- a/cmd/oteltestbedcol/go.sum +++ b/cmd/oteltestbedcol/go.sum @@ -19,10 +19,10 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.2 h1:nWEMDhgbBkBJjfpVySqU4jgWdc22PLR0o4vEexZHers= -cloud.google.com/go/compute v1.23.2/go.mod h1:JJ0atRC0J/oWYiiVBmsSsrRnh92DhZPG4hFDcR04Rns= -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= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -34,64 +34,55 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= -github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 h1:8q4SaHjFsClSvuVne0ID/5Ka8u3fcIHyqkLjcFpNRHQ= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/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/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= -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/azcore v1.10.0 h1:n1DH8TPV4qqPTje2RcUBYwtrTWlabVp4n46+74X2pn4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0/go.mod h1:HDcZnuGbiyppErN6lB+idp4CKhjbc8gwjto6OPpyggM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 h1:MxA59PGoCFb+vCwRQi3PhQEwHj4+r2dhuv9HG+vM7iM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0/go.mod h1:uYt4CfhkJA9o0FN7jfE5minm/i4nUE4MjGUJkzB6Zs8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 h1:PTFGRSlMKCQelWwxUyYVEUqseBJVemLyqWJjvMyt0do= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0/go.mod h1:LRr2FzBTQlONPPa5HREE5+RjSCTXl7BwOvYOaWTqCaI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 h1:bXwSugBiSbgtz7rOtbfGf+woewp4f06orW9OP5BjHLA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0/go.mod h1:Y/HgrePTmGy9HjdSGTqZNa+apUpTVIEVKXJyARP2lrk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1 h1:7CBQ+Ei8SP2c6ydQTGCCrS35bDxgTMfoP2miAwK++OU= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1/go.mod h1:c/wcGeGx5FUPbM/JltUYHZcKmigwyVLJlDq+4HdtXaw= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= -github.com/Azure/go-autorest/autorest v0.11.29/go.mod h1:ZtEzC4Jy2JDrZLxvWs8LrBWEBycl1hbT1eknI8MtfAs= -github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= -github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= -github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= -github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= -github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= -github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Code-Hex/go-generics-cache v1.3.1 h1:i8rLwyhoyhaerr7JpjtYjJZUcCbWOdiYO3fZXLiEC4g= +github.com/Code-Hex/go-generics-cache v1.3.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/hcsshim v0.11.1 h1:hJ3s7GbWlGK4YVV92sO88BQSyF4ZLVy7/awqOlPxFbA= +github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= +github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= -github.com/alecthomas/participle/v2 v2.1.0 h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4= -github.com/alecthomas/participle/v2 v2.1.0/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= -github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= -github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/apache/thrift v0.20.0 h1:631+KvYbsBZxmuJjYwhezVsrfc/TbqtZV4QcxOX1fOI= +github.com/apache/thrift v0.20.0/go.mod h1:hOk1BQqcp2OLzGsyVXdfMk7YFlMxK3aoEVhjD06QhB8= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= @@ -99,8 +90,23 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.50.32 h1:POt81DvegnpQKM4DMDLlHz1CO6OBnEoQ1gRhYFd7QRY= +github.com/aws/aws-sdk-go v1.50.32/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= +github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= +github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= +github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= +github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -108,15 +114,14 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= -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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -124,41 +129,49 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/containerd/containerd v1.7.7 h1:QOC2K4A42RQpcrZyptP6z9EJZnlHfHJUfZrAAHe15q4= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= +github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= +github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= +github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= -github.com/digitalocean/godo v1.99.0 h1:gUHO7n9bDaZFWvbzOum4bXE0/09ZuYA9yA8idQHX57E= -github.com/digitalocean/godo v1.99.0/go.mod h1:SsS2oXo2rznfM/nORlZ/6JaUJZFhmKTib1YhopUc8NA= +github.com/digitalocean/godo v1.109.0 h1:4W97RJLJSUQ3veRZDNbp1Ol3Rbn6Lmt9bKGvfqYI5SU= +github.com/digitalocean/godo v1.109.0/go.mod h1:R6EmmWI8CT1+fCtjWY9UCB+L5uufuZH13wk3YhxycCs= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= -github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/elastic/go-structform v0.0.10 h1:oy08o/Ih2hHTkNcRY/1HhaYvIp5z6t8si8gnCJPDo1w= +github.com/elastic/go-structform v0.0.10/go.mod h1:CZWf9aIRYY5SuKSmOhtXScE5uQiLZNqAFnwKR4OrIM4= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= +github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI= +github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= 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/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/expr-lang/expr v1.16.3 h1:NLldf786GffptcXNxxJx5dQ+FzeWDKChBDqOOwyK8to= +github.com/expr-lang/expr v1.16.3/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= @@ -173,37 +186,36 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= +github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= +github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= -github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= +github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= +github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= +github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= +github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= +github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= +github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= @@ -213,9 +225,8 @@ github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6x github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= +github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -245,13 +256,14 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -284,22 +296,24 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 h1:n6vlPhxsA+BW/XsS5+uqi7GyzaLa5MH7qlSLBZtRdiA= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ZWj6lSlDF3F74SfKwfTCer72Q= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/gophercloud/gophercloud v1.5.0 h1:cDN6XFCLKiiqvYpjQLq9AiM7RDRbIC9450WpPH+yvXo= -github.com/gophercloud/gophercloud v1.5.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= +github.com/gophercloud/gophercloud v1.8.0 h1:TM3Jawprb2NrdOnvcHhWJalmKmAmOGgfZElM/3oBYCk= +github.com/gophercloud/gophercloud v1.8.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= @@ -307,11 +321,13 @@ github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= -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/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= -github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= -github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= +github.com/hashicorp/consul/api v1.28.2 h1:mXfkRHrpHN4YY3RqL09nXU1eHKLNiuAN4kHvDQ16k/8= +github.com/hashicorp/consul/api v1.28.2/go.mod h1:KyzqzgMEya+IZPcD65YFoOVAgPpbfERu4I/tzG6/ueE= +github.com/hashicorp/consul/sdk v0.16.0 h1:SE9m0W6DEfgIVCJX7xU+iv/hUl4m/nxqMTnCdMxDpJ8= +github.com/hashicorp/consul/sdk v0.16.0/go.mod h1:7pxqqhqoaPqnBnzXD1StKed62LqJeClzVsUEy85Zr0A= github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -321,13 +337,14 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I= +github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -339,28 +356,34 @@ github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5O github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e h1:sr4lujmn9heD030xx/Pd4B/JSmvRhFzuotNXaaV0WLs= -github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e/go.mod h1:O23qLAZuCx4htdY9zBaO4cJPXgleSFEdq6D/sezGgYE= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702 h1:fI1LXuBaS1d9z1kmb++Og6YD8uMRwadXorCwE+xgOFA= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702/go.mod h1:z71gkJdrkAt/Rl6C7Q79VE7AwJ5lUF+M+fzFTyIHYB0= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hetznercloud/hcloud-go/v2 v2.0.0 h1:Sg1DJ+MAKvbYAqaBaq9tPbwXBS2ckPIaMtVdUjKu+4g= -github.com/hetznercloud/hcloud-go/v2 v2.0.0/go.mod h1:4iUG2NG8b61IAwNx6UsMWQ6IfIf/i1RsG0BbsKAyR5Q= +github.com/hetznercloud/hcloud-go/v2 v2.6.0 h1:RJOA2hHZ7rD1pScA4O1NF6qhkHyUdbbxjHgFNot8928= +github.com/hetznercloud/hcloud-go/v2 v2.6.0/go.mod h1:4J1cSE57+g0WS93IiHLV7ubTHItcp+awzeBp5bM9mfA= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -368,13 +391,14 @@ github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 h1:s9ZL6ZhFF8y6ebnm1FLvobkzoIu5xwDQUcRPk/IEhpM= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6/go.mod h1:aXdIdfn2OcGnMhOTojXmwZqXKgC3MU5riiNvzwwG9OY= -github.com/ionos-cloud/sdk-go/v6 v6.1.8 h1:493wE/BkZxJf7x79UCE0cYGPZoqQcPiEBALvt7uVGY0= -github.com/ionos-cloud/sdk-go/v6 v6.1.8/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= -github.com/jaegertracing/jaeger v1.48.0 h1:YuKooQ7qJsjgxws9xuf8C/BLNTPx8qTAJz4wv7IHhSc= -github.com/jaegertracing/jaeger v1.48.0/go.mod h1:BoAPkdCAIEuLsVz/EDhjXd+GSVpHtJhiGqWoFEvBCKg= -github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 h1:2r2WiFeAwiJ/uyx1qIKnV1L4C9w/2V8ehlbJY4gjFaM= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4/go.mod h1:1yEQhaLb/cETXCqQmdh7lDjupNAReO7c83AHyK2dJ48= +github.com/ionos-cloud/sdk-go/v6 v6.1.11 h1:J/uRN4UWO3wCyGOeDdMKv8LWRzKu6UIkLEaes38Kzh8= +github.com/ionos-cloud/sdk-go/v6 v6.1.11/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= +github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= +github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= 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= @@ -395,22 +419,22 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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= @@ -419,11 +443,12 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 h1:bCiVCRCs1Heq84lurVinUPy19keqGEe4jh5vtK37jcg= github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= -github.com/linode/linodego v1.19.0 h1:n4WJrcr9+30e9JGZ6DI0nZbm5SdAj1kSwvvt/998YUw= -github.com/linode/linodego v1.19.0/go.mod h1:XZFR+yJ9mm2kwf6itZ6SCpu+6w3KnIevV0Uu5HNWJgQ= +github.com/linode/linodego v1.30.0 h1:6HJli+LX7NGu+Sne2G+ux790EkVOWOV/SR4mK3jcs6k= +github.com/linode/linodego v1.30.0/go.mod h1:/46h/XpmWi//oSA92GX2p3FIxb8HbX7grslPPQalR2o= 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/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -442,29 +467,34 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= +github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= -github.com/miekg/dns v1.1.55/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= +github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4= +github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +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/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= 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= @@ -473,6 +503,7 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= 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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= @@ -480,30 +511,32 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/observiq/nanojack v0.0.0-20201106172433-343928847ebc h1:49ewVBwLcy+eYqI4R0ICilCI4dPjddpFXWv3liXzUxM= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= -github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/opensearch-project/opensearch-go/v2 v2.3.0 h1:nQIEMr+A92CkhHrZgUhcfsrZjibvB3APXf2a1VwCmMQ= +github.com/opensearch-project/opensearch-go/v2 v2.3.0/go.mod h1:8LDr9FCgUTVoT+5ESjc2+iaZuldqE+23Iq0r1XeNue8= github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDOCg/jA= github.com/openzipkin/zipkin-go v0.4.2/go.mod h1:ZeVkFjuuBiSy13y8vpSDCjMi9GoI3hPpCJSBx/EYFhY= -github.com/ovh/go-ovh v1.4.1 h1:VBGa5wMyQtTP7Zb+w97zRCh9sLtM/2YKRyy+MEJmWaM= -github.com/ovh/go-ovh v1.4.1/go.mod h1:6bL6pPyUT7tBfI0pqOegJgRjgjuO+mOo+MyXd1EEC0M= +github.com/ovh/go-ovh v1.4.3 h1:Gs3V823zwTFpzgGLZNI6ILS4rmxZgJwJCz54Er9LwD0= +github.com/ovh/go-ovh v1.4.3/go.mod h1:AkPXVtgwB6xlKblMjRKJJmjRp+ogrE7fz2lVgcQY8SY= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= -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/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -520,27 +553,21 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -548,73 +575,87 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= -github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e h1:UmqAuY2OyDoog8+l5FybViJE5B2r+UxVGCUwFTsY5AA= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e/go.mod h1:+0ld+ozir7zWFcHA2vVpWAKxXakIioEjPPNOqH+J3ZA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 h1:a9hSJdJcd16e0HoMsnFvaHvxB3pxSD+SC7+CISp7xY0= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 h1:/8rfZAdFfafRXOgz+ZpMZZWZ5pYggCY9t7e/BvjaBHM= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= +github.com/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= +github.com/shoenig/test v1.7.1/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 h1:32k2QLgsKhcEs55q4REPKyIadvid5FPy2+VMgvbmKJ0= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfiC7+VheQaz+ypdCt5SmZNL+BRxUe7y4= -github.com/signalfx/sapm-proto v0.13.0 h1:yEkp1+MAU4vZvnJMp56uhVlRjlvCK7KQjBg0g2Apw8k= -github.com/signalfx/sapm-proto v0.13.0/go.mod h1:C72HjeCW5v0Llk6pIVJ/ZH8A5GbiZpCCSkE1dSlpWxY= +github.com/signalfx/sapm-proto v0.14.0 h1:KWh3I5E4EkelB19aP1/54Ik8khSioC/RVRW/riOfRGg= +github.com/signalfx/sapm-proto v0.14.0/go.mod h1:Km6PskZh966cqNoUn3AmRyGRix5VfwnxVBvn2vjRC9U= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= 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.2/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/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/testcontainers/testcontainers-go v0.26.0 h1:uqcYdoOHBy1ca7gKODfBd9uTHVK3a7UL848z09MVZ0c= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/testcontainers/testcontainers-go v0.29.1 h1:z8kxdFlovA2y97RWx98v/TQ+tR+SXZm6p35M+xB92zk= +github.com/testcontainers/testcontainers-go v0.29.1/go.mod h1:SnKnKQav8UcgtKqjp/AD8bE1MqZm+3TDb/B8crE3XnI= github.com/tidwall/gjson v1.10.2 h1:APbLGOM0rrEkd8WBw9C24nllro4ajFuJu0Sc9hRz8Bo= +github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/tinylru v1.1.0 h1:XY6IUfzVTU9rpwdhKUF6nQdChgCdGjkMfLzbWyiau6I= +github.com/tidwall/tinylru v1.1.0/go.mod h1:3+bX+TJ2baOLMWTnlyNWHh4QMnFyARg2TLTQ6OFbzw8= github.com/tidwall/wal v1.1.7 h1:emc1TRjIVsdKKSnpwGBAcsAGg0767SvUk8+ygx7Bb+4= +github.com/tidwall/wal v1.1.7/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU= github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -622,10 +663,8 @@ github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0h github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= +github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -633,129 +672,145 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/configgrpc v0.89.0/go.mod h1:2GuAxpU34a1X19kCZ8Kw3FUsxOIiFcWHiYorRCyhnCc= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/exporter/debugexporter v0.89.0 h1:MQUEX4OWszJQqQMqtYERiiw02Ta9QMWPe/hHWoD4YBU= -go.opentelemetry.io/collector/exporter/debugexporter v0.89.0/go.mod h1:eLoVrKOjgPvAmg0XJuellJ03zEpEol26l8i48Rhv53Q= -go.opentelemetry.io/collector/exporter/loggingexporter v0.89.0 h1:AdMGaH1p9D1Kvjkd/sXMg/Hkc5M1lqBdhXY5WfmiGSE= -go.opentelemetry.io/collector/exporter/loggingexporter v0.89.0/go.mod h1:N4zI/Zkjz5hx774uM3RdQTIeiw59FMmOdHrpbOK5UvE= -go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0 h1:0oYIeiRTURjIIYXs1OsaMAyNgg6Vc/CNa882YCYS/04= -go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0/go.mod h1:kA+ycED/f5rUj2030XE45q0aXUe5haZhW62zdPgice0= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0 h1:HzEVN0r94lkymm9D+NlB/UUlLqZqC5rnHUBN0Kj/ZYs= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0/go.mod h1:2AhkhO9YDcbfZ5X5gwN+k51FYFW8qfOWIrCEASp13qI= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/extension/ballastextension v0.89.0 h1:9Nhxmaj2XtAMik3SSTswW+MiOHPzC6LE0ZJOsnmqkPY= -go.opentelemetry.io/collector/extension/ballastextension v0.89.0/go.mod h1:kVGHc9tbBPaQgDsFEDhtwbQkWJmyHne2XrVhK0zyYZk= -go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 h1:opvHcGANx+dS4HJwGTPtRMd6dZdOmmGn6c3PfW/bihQ= -go.opentelemetry.io/collector/extension/zpagesextension v0.89.0/go.mod h1:RlhcZHBMg86y1hgBf+j1lNvnZ8ihWiYTYXFiy5InwyY= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/otelcol v0.89.0 h1:b3kC0zM9T6GxjhTcNEHIzXDd4zTIc7cBpexCPZ9nPzg= -go.opentelemetry.io/collector/otelcol v0.89.0/go.mod h1:BILxDcJe32wK+paX7ssnt4jyjOmTkIHvXe9JNjlHUk8= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 h1:oTEOHs2t00f9LfRwZGzKSXJPR3FHjPDDhjt05iWXYZM= -go.opentelemetry.io/collector/processor/batchprocessor v0.89.0/go.mod h1:xaTfwrIbnsUpvaUCIecvlH8wTH500U7LtczdaEPXmmk= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.89.0 h1:Rw7SMMMGD9YIJjqwNA1nZTEFAMJumMv2hb58iTtCrH0= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.89.0/go.mod h1:3gmY8wAiqcmThKH7e8t+J/p0BGvXymHrwum7tcm2rbs= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 h1:ayqzWyj56xyc0tcBpaYjWtxvj5pfZNhYC8LrwvlLAeE= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0/go.mod h1:7p2oZ09hP+h6WpTv67PgEJx+azViVqLBE4IfrnDOWOc= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/collector/service v0.89.0/go.mod h1:6IAr9Asn6t6YxSw6Qv5LwA+ilVUtP0nQsu1xzc9+mZA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0 h1:Yty9Vs4F3D6/liF1o6FNt0PvN85h/BJJ6DQKJ3nrcM0= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0/go.mod h1:On4VgbkqYL18kbJlWsa18+cMNe6rYpBnPi1ARI/BrsU= -go.opentelemetry.io/contrib/zpages v0.45.0 h1:jIwHHGoWzJoZdbIUtWdErjL85Gni6BignnAFqDtMRL4= -go.opentelemetry.io/contrib/zpages v0.45.0/go.mod h1:4mIdA5hqH6hEx9sZgV50qKfQO8aIYolUZboHmz+G7vw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0 h1:E/sf+2slCUb7wqh5FHwhdwKWTA+VXyMMAcFNlKVf4yw= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0/go.mod h1:2xuXI78Xp9cttLsJMF/Y08cJUqckLt0kLasn+vcHR5w= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0/go.mod h1:hbzqqcIxyywu6UQ5J1wb4ntla8nCwCfNBZnMo2Dgh48= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0/go.mod h1:qmFtGlXhoa9qPt5RrZgMp4f5RfRagucrdriI+hb3yWQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0/go.mod h1:CMJYNAfooOwSZSAmAeMUV1M+TXld3BiK++z9fqIm2xk= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0/go.mod h1:nZStMoc1H/YJpRjSx9IEX4abBMekORTLQcTUT1CgLkg= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 h1:vcSjcjn/BTeM6abI5CDymZdtd1m24quD1Mx4VE3N3fM= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0/go.mod h1:HblEnlZQNsVuuDpszdKTWcrHBI09OjBn2pWSzBx1goM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 h1:4s9HxB4azeeQkhY0GE5wZlMj4/pz8tE5gx2OQpGUw58= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0/go.mod h1:djVA3TUJ2fSdMX0JE5XxFBOaZzprElJoP7fD4vnV2SU= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -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.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 h1:lRhfcLr3gK5S/zn92h3clyOPnCvvNKs1WTMbtH4UvO0= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0/go.mod h1:vNMFTWe4dF05LsodUOc84OfxdlYVp1kCMuZzb41WfAk= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 h1:x/VsGlBj+DtJCXIucwzwcxiwnwAU8a6ALK6UN8fPdKQ= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0/go.mod h1:BapTGXu7CYrQGNohbapPwTSt2Ty/k/c6Oemx9mSSiK4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 h1:SxDS+Yr8qE+ID58ELR5n0D+SUlqHKOZ72pK3YPFAelA= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0/go.mod h1:DEoB0d0k1iGt4KEABntL8AW9xYQ6E7fmgkM2/s8aXvM= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 h1:C02SPbRPvrtmZ9TvsHWpz2TvHzqY5mNyEAlDdhax/a4= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0/go.mod h1:dzZKtykJio3Rm+G+Cmr15VV3xKp0PmFuh9Q9b3c1K7A= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 h1:04zGXVQZ8D6nvoPX8AaqxWxGHNNVsGR78E+tY+2VQr8= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0/go.mod h1:+UrRiugWaQPssz4mgEgQQo640f2bDUCFlo2Xr0/5ulc= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 h1:JYpDN0OnMsu0awk0rjaYEIko9hFzzBJ6+2U5W2iVvUE= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0/go.mod h1:xrXL804nBum1PgbvmJQ4I+hyW+DU4xBGO3MKMiYFX6E= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 h1:zAFCXYzpxDh64BIVujqntlN5RE4jDahbPfJBy/Wq7D0= +go.opentelemetry.io/collector/exporter/debugexporter v0.98.0/go.mod h1:S15ELDQFoP5da3NHzXJR2I8FGUnM2C1Hp6e/OhaCtw0= +go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0 h1:uhiR/luaJCwMnvvkIS/gIxBbSAp+/vbqeC3AXmuc/kg= +go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0/go.mod h1:1ySnK/6Cl+67FTP6ty04PX9nrXPYFPuBqZ+Xn9Jzz6Y= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.98.0 h1:+6mRqTgoJxXxuPwI8s5fMKm0mLfwVwJgD2EB7gUNNlE= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.98.0/go.mod h1:uGocxqpbUrZDwZz6JBKsvNCyDLrS/pnVpn4BUuPauFw= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/extension/ballastextension v0.98.0 h1:EPzsYpiSY4vAfzJMqhVK6bIh+qZRmXVskaNlRFKjA0w= +go.opentelemetry.io/collector/extension/ballastextension v0.98.0/go.mod h1:IY/JNP0g+tUUe/w5YHgBYwv5XlH4eqo5d4th+RGROFU= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 h1:JfvsDpTwAhA9au8/4vmONRh0OBVU6n36seb41JD/mTQ= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0/go.mod h1:t1zDwy6kYp4w1JgcGHMvdGbKYHqWpK00bB1AEQ0Oqlc= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/otelcol v0.98.0 h1:sUk49Wqw+VBYeDynEA+GSeVEusFvzFW3KuF2vfDbyo0= +go.opentelemetry.io/collector/otelcol v0.98.0/go.mod h1:dW3UzuaiaNTddjKajk3Tp2Y7muDvYJdQz2yGUOE53gs= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 h1:iM4fMLGig3GKmz5XNtOPKDsnCnvbi0+UHYaWsx/aSRc= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0/go.mod h1:ROnuUkZJgpKEIDf3AIVjgRGNI7KPqCKPXsw8whL6Hzs= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0 h1:1jjiC3POfIluGLVM+6y8nolKEI95/vlHAvDmIOatags= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0/go.mod h1:VQDDrhQbIoelGF+fKzy6vCQM3hWDCH2YFaZKqgTDmGk= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 h1:j7lfLwc5o1dtXIPXU8LjmxadejmJVRHN57ZYGH33Wq4= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0/go.mod h1:uWDBDxaWuzF1U5S2UIhstO0+Q8aUiwiUu8uO1IYN2XQ= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/collector/service v0.98.0 h1:lLJ7VXPXcV62fSISh4GuNd5ti6WvKje76NSgezc3ydo= +go.opentelemetry.io/collector/service v0.98.0/go.mod h1:wB7ozvZTHtMefb5KTYy5nyrVYWpGk8teq8jWFs4blIU= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0 h1:QU8UEKyPqgr/8vCC9LlDmkPnfFmiWAUF9GtJdcLz+BU= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0/go.mod h1:qonC7wyvtX1E6cEpAR+bJmhcGr6IVRGc/f6ZTpvi7jA= +go.opentelemetry.io/contrib/zpages v0.50.0 h1:hKC5asr83xDN4ErwSHVdk3gv053pZiF8SZKmS86IPEw= +go.opentelemetry.io/contrib/zpages v0.50.0/go.mod h1:8WovRn95fZdaX/dr3e4h7D8IqiVsnZ+WxY0Yn4LyU3k= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0 h1:0o/9KwAgxjK+3pMV0pwIF5toYHqDsPmQhfrBvKaG6mU= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0/go.mod h1:rZyTdpmRqoV+PpUn6QlruxJp/kE4765rPy0pP6mRDk8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 h1:hDKnobznDpcdTlNzO0S/owRB8tyVr1OoeZZhDoqY+Cs= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0/go.mod h1:kUDQaUs1h8iTIHbQTk+iJRiUvSfJYMMKTtMCaiVu7B0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 h1:Wc4hZuYXhVqq+TfRXLXlmNIL/awOanGx8ssq3ciDQxc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0/go.mod h1:BydOvapRqVEc0DVz27qWBX2jq45Ca5TI9mhZBDIdweY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 h1:vOL89uRfOCCNIjkisd0r7SEdJF3ZJFyCNY34fdZs8eU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0/go.mod h1:8GlBGcDk8KKi7n+2S4BT/CPZQYH3erLu0/k64r1MYgo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 h1:d7nHbdzU84STOiszaOxQ3kw5IwkSmHsU5Muol5/vL4I= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0/go.mod h1:yiPA1iZbb/EHYnODXOxvtKuB0I2hV8ehfLTEWpl7BJU= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 h1:0vZZdECYzhTt9MKQZ5qQ0V+J3MFu4MQaQ3COfugF+FQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0/go.mod h1:e7iXx3HjaSSBXfy9ykVUlupS2Vp7LBIBuT21ousM2Hk= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= 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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -764,11 +819,10 @@ golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3 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.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -779,8 +833,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +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/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -802,8 +856,9 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB 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/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -839,23 +894,23 @@ golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -867,9 +922,10 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/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.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.1.0/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-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -917,29 +973,30 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/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-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -947,14 +1004,19 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= @@ -999,14 +1061,15 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= 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= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1023,16 +1086,16 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.150.0 h1:Z9k22qD289SZ8gCJrk4DrWXkNjtfvKAUo/l1ma8eBYE= -google.golang.org/api v0.150.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= +google.golang.org/api v0.170.0 h1:zMaruDePM88zxZBG+NG8+reALO2rfLhe/JShitLyT48= +google.golang.org/api v0.170.0/go.mod h1:/xql9M2btF85xac/VAm4PsLMTLVGUOpq4BE9R8jyNy8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1062,12 +1125,10 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -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-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto/googleapis/api v0.0.0-20240314234333-6e1732d8331c h1:kaI7oewGK5YnVwj+Y+EJBO/YN1ht8iTL9XkFHtVZLsc= +google.golang.org/genproto/googleapis/api v0.0.0-20240314234333-6e1732d8331c/go.mod h1:VQW3tUculP/D4B+xVCo+VgSq8As6wA9ZjHl//pmk+6s= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1081,8 +1142,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -1095,10 +1156,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj 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.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1122,6 +1181,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1129,24 +1189,24 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/cmd/oteltestbedcol/main.go b/cmd/oteltestbedcol/main.go index 304aa4e339c0..9f28298725c6 100644 --- a/cmd/oteltestbedcol/main.go +++ b/cmd/oteltestbedcol/main.go @@ -14,7 +14,7 @@ func main() { info := component.BuildInfo{ Command: "oteltestbedcol", Description: "OpenTelemetry Collector binary for testbed only tests.", - Version: "0.89.0-dev", + Version: "0.98.0-dev", } if err := run(otelcol.CollectorSettings{BuildInfo: info, Factories: components}); err != nil { diff --git a/cmd/oteltestbedcol/main_others.go b/cmd/oteltestbedcol/main_others.go index e80a51cd4e04..3735aecb5867 100644 --- a/cmd/oteltestbedcol/main_others.go +++ b/cmd/oteltestbedcol/main_others.go @@ -1,7 +1,6 @@ // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. //go:build !windows -// +build !windows package main diff --git a/cmd/oteltestbedcol/main_windows.go b/cmd/oteltestbedcol/main_windows.go index 65eb6637e768..bb68124a52c9 100644 --- a/cmd/oteltestbedcol/main_windows.go +++ b/cmd/oteltestbedcol/main_windows.go @@ -1,47 +1,28 @@ // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. //go:build windows -// +build windows package main import ( + "errors" "fmt" - "os" "go.opentelemetry.io/collector/otelcol" + "golang.org/x/sys/windows" "golang.org/x/sys/windows/svc" ) func run(params otelcol.CollectorSettings) error { - if useInteractiveMode, err := checkUseInteractiveMode(); err != nil { - return err - } else if useInteractiveMode { - return runInteractive(params) - } else { - return runService(params) - } -} - -func checkUseInteractiveMode() (bool, error) { - // If environment variable NO_WINDOWS_SERVICE is set with any value other - // than 0, use interactive mode instead of running as a service. This should - // be set in case running as a service is not possible or desired even - // though the current session is not detected to be interactive - if value, present := os.LookupEnv("NO_WINDOWS_SERVICE"); present && value != "0" { - return true, nil - } - - isInteractiveSession, err := svc.IsAnInteractiveSession() - if err != nil { - return false, fmt.Errorf("failed to determine if we are running in an interactive session: %w", err) - } - return isInteractiveSession, nil -} - -func runService(params otelcol.CollectorSettings) error { - // do not need to supply service name when startup is invoked through Service Control Manager directly + // No need to supply service name when startup is invoked through + // the Service Control Manager directly. if err := svc.Run("", otelcol.NewSvcHandler(params)); err != nil { + if errors.Is(err, windows.ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) { + // Per https://learn.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-startservicectrldispatchera#return-value + // this means that the process is not running as a service, so run interactively. + return runInteractive(params) + } + return fmt.Errorf("failed to start collector server: %w", err) } diff --git a/cmd/oteltestbedcol/package_test.go b/cmd/oteltestbedcol/package_test.go new file mode 100644 index 000000000000..ca84920f45f1 --- /dev/null +++ b/cmd/oteltestbedcol/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) +} diff --git a/cmd/telemetrygen/Dockerfile b/cmd/telemetrygen/Dockerfile index a1117f6c1097..ba1d577e41b4 100644 --- a/cmd/telemetrygen/Dockerfile +++ b/cmd/telemetrygen/Dockerfile @@ -1,10 +1,3 @@ -FROM golang:1.21 AS build - -WORKDIR /src -ADD . /src - -RUN CGO_ENABLED=0 go build -o /telemetrygen - FROM alpine:latest as certs RUN apk --update add ca-certificates @@ -13,7 +6,10 @@ FROM scratch ARG USER_UID=10001 USER ${USER_UID} +ARG TARGETOS +ARG TARGETARCH + COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt -COPY --from=build /telemetrygen /telemetrygen +COPY ./telemetrygen_${TARGETOS}_${TARGETARCH} /telemetrygen ENTRYPOINT ["/telemetrygen"] diff --git a/cmd/telemetrygen/README.md b/cmd/telemetrygen/README.md index f13788b27e95..272a286f5868 100644 --- a/cmd/telemetrygen/README.md +++ b/cmd/telemetrygen/README.md @@ -3,13 +3,13 @@ | Status | | | ------------- |-----------| -| Stability | [alpha]: traces | -| | [development]: metrics, logs | +| Stability | [development]: metrics, logs | +| | [alpha]: traces | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Acmd%2Ftelemetrygen%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Acmd%2Ftelemetrygen) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Acmd%2Ftelemetrygen%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Acmd%2Ftelemetrygen) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@mx-psi](https://www.github.com/mx-psi), [@codeboten](https://www.github.com/codeboten) | -[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [development]: https://github.com/open-telemetry/opentelemetry-collector#development +[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha This utility simulates a client generating **traces**, **metrics**, and **logs**. It is useful for testing and demonstration purposes. @@ -24,6 +24,16 @@ go install github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemet Check the [`go install` reference](https://go.dev/ref/mod#go-install) to install specific versions. +### Docker build + +You can build locally the Docker image with: + +```bash +make docker-telemetrygen +``` + +Using github actions, we also push a docker image on commit to main or on release to this [Github docker registry](https://github.com/open-telemetry/opentelemetry-collector-contrib/pkgs/container/opentelemetry-collector-contrib%2Ftelemetrygen). + ## Running First, you'll need an OpenTelemetry Collector to receive the telemetry data. Follow the project's instructions for a detailed setting up guide. The following configuration file should be sufficient: @@ -80,6 +90,8 @@ Or, to generate a specific number of traces: telemetrygen traces --otlp-insecure --traces 1 ``` +To send traces in secure connection, see [examples/secure-tracing](../../examples/secure-tracing/) + Check `telemetrygen traces --help` for all the options. ### Logs diff --git a/cmd/telemetrygen/config.go b/cmd/telemetrygen/config.go index eebbc293bf3d..f20a758fffc9 100644 --- a/cmd/telemetrygen/config.go +++ b/cmd/telemetrygen/config.go @@ -36,7 +36,7 @@ var tracesCmd = &cobra.Command{ Use: "traces", Short: fmt.Sprintf("Simulates a client generating traces. (Stability level: %s)", metadata.TracesStability), Example: "telemetrygen traces", - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, _ []string) error { return traces.Start(tracesCfg) }, } @@ -46,7 +46,7 @@ var metricsCmd = &cobra.Command{ Use: "metrics", Short: fmt.Sprintf("Simulates a client generating metrics. (Stability level: %s)", metadata.MetricsStability), Example: "telemetrygen metrics", - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, _ []string) error { return metrics.Start(metricsCfg) }, } @@ -56,7 +56,7 @@ var logsCmd = &cobra.Command{ Use: "logs", Short: fmt.Sprintf("Simulates a client generating logs. (Stability level: %s)", metadata.LogsStability), Example: "telemetrygen logs", - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, _ []string) error { return logs.Start(logsCfg) }, } diff --git a/cmd/telemetrygen/go.mod b/cmd/telemetrygen/go.mod index 16f80614913b..8d00813cb49e 100644 --- a/cmd/telemetrygen/go.mod +++ b/cmd/telemetrygen/go.mod @@ -1,61 +1,60 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen -go 1.20 +go 1.21 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.opentelemetry.io/otel v1.20.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 - go.opentelemetry.io/otel/sdk v1.20.0 - go.opentelemetry.io/otel/sdk/metric v1.20.0 - go.opentelemetry.io/otel/trace v1.20.0 - go.uber.org/zap v1.26.0 - golang.org/x/time v0.4.0 - google.golang.org/grpc v1.59.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel v1.25.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 + go.opentelemetry.io/otel/sdk v1.25.0 + go.opentelemetry.io/otel/sdk/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + golang.org/x/time v0.5.0 + google.golang.org/grpc v1.63.2 ) require ( github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text 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-20231030173426-d783a09b4405 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/cmd/telemetrygen/go.sum b/cmd/telemetrygen/go.sum index 25fe078bcc0b..974c32c94624 100644 --- a/cmd/telemetrygen/go.sum +++ b/cmd/telemetrygen/go.sum @@ -17,11 +17,13 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -29,19 +31,16 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb 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.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -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/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/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -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/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= 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= @@ -52,18 +51,18 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -77,6 +76,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= @@ -89,53 +89,52 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf 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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0/go.mod h1:hbzqqcIxyywu6UQ5J1wb4ntla8nCwCfNBZnMo2Dgh48= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0/go.mod h1:qmFtGlXhoa9qPt5RrZgMp4f5RfRagucrdriI+hb3yWQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0/go.mod h1:CMJYNAfooOwSZSAmAeMUV1M+TXld3BiK++z9fqIm2xk= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -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.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 h1:f2jriWfOdldanBwS9jNBdeOKAQN7b4ugAMaNu1/1k9g= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0/go.mod h1:B+bcQI1yTY+N0vqMpoZbEN7+XU4tNM0DmUiOwebFJWI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 h1:mM8nKi6/iFQ0iqst80wDHU2ge198Ye/TfN0WBS5U24Y= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0/go.mod h1:0PrIIzDteLSmNyxqcGYRL4mDIo8OTuBAOI/Bn1URxac= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= 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.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= 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.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -154,8 +153,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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= @@ -168,14 +167,14 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= @@ -194,25 +193,25 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 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-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -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-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= 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.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/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.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/cmd/telemetrygen/internal/common/config.go b/cmd/telemetrygen/internal/common/config.go index 8ec9a8acfac2..323f11072676 100644 --- a/cmd/telemetrygen/internal/common/config.go +++ b/cmd/telemetrygen/internal/common/config.go @@ -63,6 +63,18 @@ type Config struct { Headers KeyValue ResourceAttributes KeyValue TelemetryAttributes KeyValue + + // OTLP TLS configuration + CaFile string + + // OTLP mTLS configuration + ClientAuth ClientAuth +} + +type ClientAuth struct { + Enabled bool + ClientCertFile string + ClientKeyFile string } // Endpoint returns the appropriate endpoint URL based on the selected communication mode (gRPC or HTTP) @@ -112,17 +124,26 @@ func (c *Config) CommonFlags(fs *pflag.FlagSet) { // custom headers c.Headers = make(map[string]string) - fs.Var(&c.Headers, "otlp-header", "Custom header to be passed along with each OTLP request. The value is expected in the format key=\"value\"."+ - "Note you may need to escape the quotes when using the tool from a cli."+ - "Flag may be repeated to set multiple headers (e.g -otlp-header key1=value1 -otlp-header key2=value2)") + fs.Var(&c.Headers, "otlp-header", "Custom header to be passed along with each OTLP request. The value is expected in the format key=\"value\". "+ + "Note you may need to escape the quotes when using the tool from a cli. "+ + `Flag may be repeated to set multiple headers (e.g --otlp-header key1=\"value1\" --otlp-header key2=\"value2\")`) // custom resource attributes c.ResourceAttributes = make(map[string]string) - fs.Var(&c.ResourceAttributes, "otlp-attributes", "Custom resource attributes to use. The value is expected in the format key=\"value\"."+ - "Note you may need to escape the quotes when using the tool from a cli."+ - "Flag may be repeated to set multiple attributes (e.g -otlp-attributes key1=\"value1\" -otlp-attributes key2=\"value2\")") + fs.Var(&c.ResourceAttributes, "otlp-attributes", "Custom resource attributes to use. The value is expected in the format key=\"value\". "+ + "Note you may need to escape the quotes when using the tool from a cli. "+ + `Flag may be repeated to set multiple attributes (e.g --otlp-attributes key1=\"value1\" --otlp-attributes key2=\"value2\")`) c.TelemetryAttributes = make(map[string]string) - fs.Var(&c.TelemetryAttributes, "telemetry-attributes", "Custom telemetry attributes to use. The value is expected in the format \"key=\\\"value\\\"\". "+ - "Flag may be repeated to set multiple attributes (e.g --telemetry-attributes \"key1=\\\"value1\\\"\" --telemetry-attributes \"key2=\\\"value2\\\"\")") + fs.Var(&c.TelemetryAttributes, "telemetry-attributes", "Custom telemetry attributes to use. The value is expected in the format key=\"value\". "+ + "Note you may need to escape the quotes when using the tool from a cli. "+ + `Flag may be repeated to set multiple attributes (e.g --telemetry-attributes key1=\"value1\" --telemetry-attributes key2=\"value2\")`) + + // TLS CA configuration + fs.StringVar(&c.CaFile, "ca-cert", "", "Trusted Certificate Authority to verify server certificate") + + // mTLS configuration + fs.BoolVar(&c.ClientAuth.Enabled, "mtls", false, "Whether to require client authentication for mTLS") + fs.StringVar(&c.ClientAuth.ClientCertFile, "client-cert", "", "Client certificate file") + fs.StringVar(&c.ClientAuth.ClientKeyFile, "client-key", "", "Client private key file") } diff --git a/cmd/telemetrygen/internal/common/package_test.go b/cmd/telemetrygen/internal/common/package_test.go new file mode 100644 index 000000000000..abc80d8f3173 --- /dev/null +++ b/cmd/telemetrygen/internal/common/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package common + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/cmd/telemetrygen/internal/common/tls_utils.go b/cmd/telemetrygen/internal/common/tls_utils.go new file mode 100644 index 000000000000..286d7345adc1 --- /dev/null +++ b/cmd/telemetrygen/internal/common/tls_utils.go @@ -0,0 +1,89 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package common + +import ( + "crypto/tls" + "crypto/x509" + "errors" + "os" + + "google.golang.org/grpc/credentials" +) + +// caPool loads CA certificate from a file and returns a CertPool. +// The certPool is used to set RootCAs in certificate verification. +func caPool(caFile string) (*x509.CertPool, error) { + pool := x509.NewCertPool() + if caFile != "" { + data, err := os.ReadFile(caFile) + if err != nil { + return nil, err + } + if !pool.AppendCertsFromPEM(data) { + return nil, errors.New("failed to add CA certificate to root CA pool") + } + } + return pool, nil +} + +func GetTLSCredentialsForGRPCExporter(caFile string, cAuth ClientAuth) (credentials.TransportCredentials, error) { + + pool, err := caPool(caFile) + if err != nil { + return nil, err + } + + var creds credentials.TransportCredentials + + if caFile != "" { + creds = credentials.NewTLS(&tls.Config{ + RootCAs: pool, + }) + } else { + creds = credentials.NewTLS(&tls.Config{}) + } + + // Configuration for mTLS + if cAuth.Enabled { + keypair, err := tls.LoadX509KeyPair(cAuth.ClientCertFile, cAuth.ClientKeyFile) + if err != nil { + return nil, err + } + creds = credentials.NewTLS(&tls.Config{ + RootCAs: pool, + Certificates: []tls.Certificate{keypair}, + }) + } + + return creds, nil +} + +func GetTLSCredentialsForHTTPExporter(caFile string, cAuth ClientAuth) (*tls.Config, error) { + pool, err := caPool(caFile) + if err != nil { + return nil, err + } + + var tlsCfg tls.Config + + if caFile != "" { + tlsCfg = tls.Config{ + RootCAs: pool, + } + } else { + tlsCfg = tls.Config{} + } + + // Configuration for mTLS + if cAuth.Enabled { + keypair, err := tls.LoadX509KeyPair(cAuth.ClientCertFile, cAuth.ClientKeyFile) + if err != nil { + return nil, err + } + tlsCfg.ClientAuth = tls.RequireAndVerifyClientCert + tlsCfg.Certificates = []tls.Certificate{keypair} + } + return &tlsCfg, nil +} diff --git a/cmd/telemetrygen/internal/e2etest/go.mod b/cmd/telemetrygen/internal/e2etest/go.mod index 39453804cc57..41a428599830 100644 --- a/cmd/telemetrygen/internal/e2etest/go.mod +++ b/cmd/telemetrygen/internal/e2etest/go.mod @@ -1,81 +1,88 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen/internal/e2etest -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen v0.87.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.87.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/receiver v0.89.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 + github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen v0.97.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.97.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/receiver v0.98.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.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/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect github.com/spf13/pflag v1.0.5 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.89.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.89.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.98.0 // indirect + go.opentelemetry.io/collector/config/confighttp v0.98.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.98.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.4.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/time v0.5.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/cmd/telemetrygen/internal/e2etest/go.sum b/cmd/telemetrygen/internal/e2etest/go.sum index 7f379cd4ed98..05c32930e143 100644 --- a/cmd/telemetrygen/internal/e2etest/go.sum +++ b/cmd/telemetrygen/internal/e2etest/go.sum @@ -1,19 +1,15 @@ -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.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -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= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= 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-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= 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= @@ -21,81 +17,65 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF 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/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-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -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/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -109,13 +89,17 @@ github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFSt github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= 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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -123,92 +107,92 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/configgrpc v0.89.0/go.mod h1:2GuAxpU34a1X19kCZ8Kw3FUsxOIiFcWHiYorRCyhnCc= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 h1:ayqzWyj56xyc0tcBpaYjWtxvj5pfZNhYC8LrwvlLAeE= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0/go.mod h1:7p2oZ09hP+h6WpTv67PgEJx+azViVqLBE4IfrnDOWOc= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0/go.mod h1:CMJYNAfooOwSZSAmAeMUV1M+TXld3BiK++z9fqIm2xk= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -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.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 h1:j7lfLwc5o1dtXIPXU8LjmxadejmJVRHN57ZYGH33Wq4= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0/go.mod h1:uWDBDxaWuzF1U5S2UIhstO0+Q8aUiwiUu8uO1IYN2XQ= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= 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.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= 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.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -227,11 +211,9 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= 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= @@ -243,14 +225,14 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= @@ -266,43 +248,30 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= 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-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -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-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= 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.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/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.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/cmd/telemetrygen/internal/logs/config.go b/cmd/telemetrygen/internal/logs/config.go index e6fdfac534b5..24d334b1acaa 100644 --- a/cmd/telemetrygen/internal/logs/config.go +++ b/cmd/telemetrygen/internal/logs/config.go @@ -12,8 +12,10 @@ import ( // Config describes the test scenario. type Config struct { common.Config - NumLogs int - Body string + NumLogs int + Body string + SeverityText string + SeverityNumber int32 } // Flags registers config flags. @@ -24,4 +26,6 @@ func (c *Config) Flags(fs *pflag.FlagSet) { fs.IntVar(&c.NumLogs, "logs", 1, "Number of logs to generate in each worker (ignored if duration is provided)") fs.StringVar(&c.Body, "body", "the message", "Body of the log") + fs.StringVar(&c.SeverityText, "severity-text", "Info", "Severity text of the log") + fs.Int32Var(&c.SeverityNumber, "severity-number", 9, "Severity number of the log, range from 1 to 24 (inclusive)") } diff --git a/cmd/telemetrygen/internal/logs/exporter.go b/cmd/telemetrygen/internal/logs/exporter.go index b8b3601e50af..2e886e65823c 100644 --- a/cmd/telemetrygen/internal/logs/exporter.go +++ b/cmd/telemetrygen/internal/logs/exporter.go @@ -14,27 +14,51 @@ import ( "go.opentelemetry.io/collector/pdata/plog/plogotlp" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" + + "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen/internal/common" ) type exporter interface { export(plog.Logs) error } -func newExporter(ctx context.Context, cfg *Config) (exporter, error) { +func newExporter(cfg *Config) (exporter, error) { + + // Exporter with HTTP if cfg.UseHTTP { + if cfg.Insecure { + return &httpClientExporter{ + client: http.DefaultClient, + cfg: cfg, + }, nil + } + creds, err := common.GetTLSCredentialsForHTTPExporter(cfg.CaFile, cfg.ClientAuth) + if err != nil { + return nil, fmt.Errorf("failed to get TLS credentials: %w", err) + } return &httpClientExporter{ - client: http.DefaultClient, + client: &http.Client{Transport: &http.Transport{TLSClientConfig: creds}}, cfg: cfg, }, nil } - if !cfg.Insecure { - return nil, fmt.Errorf("'telemetrygen logs' only supports insecure gRPC") - } - // only support grpc in insecure mode - clientConn, err := grpc.DialContext(ctx, cfg.Endpoint(), grpc.WithTransportCredentials(insecure.NewCredentials())) - if err != nil { - return nil, err + // Exporter with GRPC + var err error + var clientConn *grpc.ClientConn + if cfg.Insecure { + clientConn, err = grpc.NewClient(cfg.Endpoint(), grpc.WithTransportCredentials(insecure.NewCredentials())) + if err != nil { + return nil, err + } + } else { + creds, err := common.GetTLSCredentialsForGRPCExporter(cfg.CaFile, cfg.ClientAuth) + if err != nil { + return nil, fmt.Errorf("failed to get TLS credentials: %w", err) + } + clientConn, err = grpc.NewClient(cfg.Endpoint(), grpc.WithTransportCredentials(creds)) + if err != nil { + return nil, err + } } return &gRPCClientExporter{client: plogotlp.NewGRPCClient(clientConn)}, nil } diff --git a/cmd/telemetrygen/internal/logs/logs.go b/cmd/telemetrygen/internal/logs/logs.go index 656e367ee3dc..b4349021425f 100644 --- a/cmd/telemetrygen/internal/logs/logs.go +++ b/cmd/telemetrygen/internal/logs/logs.go @@ -4,12 +4,12 @@ package logs import ( - "context" "fmt" "sync" "sync/atomic" "time" + "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/otel/sdk/resource" semconv "go.opentelemetry.io/otel/semconv/v1.4.0" "go.uber.org/zap" @@ -25,13 +25,13 @@ func Start(cfg *Config) error { return err } - e, err := newExporter(context.Background(), cfg) + e, err := newExporter(cfg) if err != nil { return err } if err = Run(cfg, e, logger); err != nil { - logger.Error("failed to stop the exporter", zap.Error(err)) + logger.Error("failed to execute the test scenario.", zap.Error(err)) return err } @@ -60,12 +60,19 @@ func Run(c *Config, exp exporter, logger *zap.Logger) error { running := &atomic.Bool{} running.Store(true) + severityText, severityNumber, err := parseSeverity(c.SeverityText, c.SeverityNumber) + if err != nil { + return err + } + for i := 0; i < c.WorkerCount; i++ { wg.Add(1) w := worker{ numLogs: c.NumLogs, limitPerSecond: limit, body: c.Body, + severityText: severityText, + severityNumber: severityNumber, totalDuration: c.TotalDuration, running: running, wg: &wg, @@ -82,3 +89,42 @@ func Run(c *Config, exp exporter, logger *zap.Logger) error { wg.Wait() return nil } + +func parseSeverity(severityText string, severityNumber int32) (string, plog.SeverityNumber, error) { + // severityNumber must range in [1,24] + if severityNumber <= 0 || severityNumber >= 25 { + return "", 0, fmt.Errorf("severity-number is out of range, the valid range is [1,24]") + } + + sn := plog.SeverityNumber(severityNumber) + + // severity number should match well-known severityText + switch severityText { + case plog.SeverityNumberTrace.String(): + if !(severityNumber >= 1 && severityNumber <= 4) { + return "", 0, fmt.Errorf("severity text %q does not match severity number %d, the valid range is [1,4]", severityText, severityNumber) + } + case plog.SeverityNumberDebug.String(): + if !(severityNumber >= 5 && severityNumber <= 8) { + return "", 0, fmt.Errorf("severity text %q does not match severity number %d, the valid range is [5,8]", severityText, severityNumber) + } + case plog.SeverityNumberInfo.String(): + if !(severityNumber >= 9 && severityNumber <= 12) { + return "", 0, fmt.Errorf("severity text %q does not match severity number %d, the valid range is [9,12]", severityText, severityNumber) + } + case plog.SeverityNumberWarn.String(): + if !(severityNumber >= 13 && severityNumber <= 16) { + return "", 0, fmt.Errorf("severity text %q does not match severity number %d, the valid range is [13,16]", severityText, severityNumber) + } + case plog.SeverityNumberError.String(): + if !(severityNumber >= 17 && severityNumber <= 20) { + return "", 0, fmt.Errorf("severity text %q does not match severity number %d, the valid range is [17,20]", severityText, severityNumber) + } + case plog.SeverityNumberFatal.String(): + if !(severityNumber >= 21 && severityNumber <= 24) { + return "", 0, fmt.Errorf("severity text %q does not match severity number %d, the valid range is [21,24]", severityText, severityNumber) + } + } + + return severityText, sn, nil +} diff --git a/cmd/telemetrygen/internal/logs/package_test.go b/cmd/telemetrygen/internal/logs/package_test.go new file mode 100644 index 000000000000..1158f120b289 --- /dev/null +++ b/cmd/telemetrygen/internal/logs/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package logs + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/cmd/telemetrygen/internal/logs/worker.go b/cmd/telemetrygen/internal/logs/worker.go index cd91b25db2e0..aa5cc0e346c2 100644 --- a/cmd/telemetrygen/internal/logs/worker.go +++ b/cmd/telemetrygen/internal/logs/worker.go @@ -18,14 +18,16 @@ import ( ) type worker struct { - running *atomic.Bool // pointer to shared flag that indicates it's time to stop the test - numLogs int // how many logs the worker has to generate (only when duration==0) - body string // the body of the log - totalDuration time.Duration // how long to run the test for (overrides `numLogs`) - limitPerSecond rate.Limit // how many logs per second to generate - wg *sync.WaitGroup // notify when done - logger *zap.Logger // logger - index int // worker index + running *atomic.Bool // pointer to shared flag that indicates it's time to stop the test + numLogs int // how many logs the worker has to generate (only when duration==0) + body string // the body of the log + severityNumber plog.SeverityNumber // the severityNumber of the log + severityText string // the severityText of the log + totalDuration time.Duration // how long to run the test for (overrides `numLogs`) + limitPerSecond rate.Limit // how many logs per second to generate + wg *sync.WaitGroup // notify when done + logger *zap.Logger // logger + index int // worker index } func (w worker) simulateLogs(res *resource.Resource, exporter exporter, telemetryAttributes []attribute.KeyValue) { @@ -43,14 +45,14 @@ func (w worker) simulateLogs(res *resource.Resource, exporter exporter, telemetr log.Body().SetStr(w.body) log.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) log.SetDroppedAttributesCount(1) - log.SetSeverityNumber(plog.SeverityNumberInfo) - log.SetSeverityText("Info") + log.SetSeverityNumber(w.severityNumber) + log.SetSeverityText(w.severityText) log.Attributes() lattrs := log.Attributes() lattrs.PutStr("app", "server") - for i, key := range telemetryAttributes { - lattrs.PutStr(key.Value.AsString(), telemetryAttributes[i].Value.AsString()) + for i, attr := range telemetryAttributes { + lattrs.PutStr(string(attr.Key), telemetryAttributes[i].Value.AsString()) } if err := exporter.export(logs); err != nil { diff --git a/cmd/telemetrygen/internal/logs/worker_test.go b/cmd/telemetrygen/internal/logs/worker_test.go index 941f6fbf57c7..99e41ef18c0c 100644 --- a/cmd/telemetrygen/internal/logs/worker_test.go +++ b/cmd/telemetrygen/internal/logs/worker_test.go @@ -36,7 +36,9 @@ func TestFixedNumberOfLogs(t *testing.T) { Config: common.Config{ WorkerCount: 1, }, - NumLogs: 5, + NumLogs: 5, + SeverityText: "Info", + SeverityNumber: 9, } exp := &mockExporter{} @@ -58,6 +60,8 @@ func TestRateOfLogs(t *testing.T) { TotalDuration: time.Second / 2, WorkerCount: 1, }, + SeverityText: "Info", + SeverityNumber: 9, } exp := &mockExporter{} @@ -77,6 +81,8 @@ func TestUnthrottled(t *testing.T) { TotalDuration: 1 * time.Second, WorkerCount: 1, }, + SeverityText: "Info", + SeverityNumber: 9, } exp := &mockExporter{} @@ -94,6 +100,8 @@ func TestCustomBody(t *testing.T) { Config: common.Config{ WorkerCount: 1, }, + SeverityText: "Info", + SeverityNumber: 9, } exp := &mockExporter{} @@ -145,6 +153,13 @@ func TestLogsWithOneTelemetryAttributes(t *testing.T) { for i := 0; i < rlogs.Len(); i++ { attrs := rlogs.At(i).ScopeLogs().At(0).LogRecords().At(0).Attributes() assert.Equal(t, 2, attrs.Len(), "shouldn't have less than 2 attributes") + + val, ok := attrs.Get(telemetryAttrKeyOne) + assert.Truef(t, ok, "there should be an attribute with key %s", telemetryAttrKeyOne) + if ok { + assert.EqualValues(t, val.AsString(), telemetryAttrValueOne) + } + } } } @@ -180,6 +195,8 @@ func configWithNoAttributes(qty int, body string) *Config { WorkerCount: 1, TelemetryAttributes: nil, }, + SeverityText: "Info", + SeverityNumber: 9, } } @@ -191,6 +208,8 @@ func configWithOneAttribute(qty int, body string) *Config { WorkerCount: 1, TelemetryAttributes: common.KeyValue{telemetryAttrKeyOne: telemetryAttrValueOne}, }, + SeverityText: "Info", + SeverityNumber: 9, } } @@ -203,5 +222,7 @@ func configWithMultipleAttributes(qty int, body string) *Config { WorkerCount: 1, TelemetryAttributes: kvs, }, + SeverityText: "Info", + SeverityNumber: 9, } } diff --git a/cmd/telemetrygen/internal/metrics/exporter.go b/cmd/telemetrygen/internal/metrics/exporter.go index d320e292447c..00af1ea0d75a 100644 --- a/cmd/telemetrygen/internal/metrics/exporter.go +++ b/cmd/telemetrygen/internal/metrics/exporter.go @@ -4,35 +4,41 @@ package metrics import ( + "fmt" + "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc" "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp" - "google.golang.org/grpc" + + "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen/internal/common" ) // grpcExporterOptions creates the configuration options for a gRPC-based OTLP metric exporter. // It configures the exporter with the provided endpoint, connection security settings, and headers. -func grpcExporterOptions(cfg *Config) []otlpmetricgrpc.Option { +func grpcExporterOptions(cfg *Config) ([]otlpmetricgrpc.Option, error) { grpcExpOpt := []otlpmetricgrpc.Option{ otlpmetricgrpc.WithEndpoint(cfg.Endpoint()), - otlpmetricgrpc.WithDialOption( - grpc.WithBlock(), - ), } if cfg.Insecure { grpcExpOpt = append(grpcExpOpt, otlpmetricgrpc.WithInsecure()) + } else { + credentials, err := common.GetTLSCredentialsForGRPCExporter(cfg.CaFile, cfg.ClientAuth) + if err != nil { + return nil, fmt.Errorf("failed to get TLS credentials: %w", err) + } + grpcExpOpt = append(grpcExpOpt, otlpmetricgrpc.WithTLSCredentials(credentials)) } if len(cfg.Headers) > 0 { grpcExpOpt = append(grpcExpOpt, otlpmetricgrpc.WithHeaders(cfg.Headers)) } - return grpcExpOpt + return grpcExpOpt, nil } // httpExporterOptions creates the configuration options for an HTTP-based OTLP metric exporter. // It configures the exporter with the provided endpoint, URL path, connection security settings, and headers. -func httpExporterOptions(cfg *Config) []otlpmetrichttp.Option { +func httpExporterOptions(cfg *Config) ([]otlpmetrichttp.Option, error) { httpExpOpt := []otlpmetrichttp.Option{ otlpmetrichttp.WithEndpoint(cfg.Endpoint()), otlpmetrichttp.WithURLPath(cfg.HTTPPath), @@ -40,11 +46,17 @@ func httpExporterOptions(cfg *Config) []otlpmetrichttp.Option { if cfg.Insecure { httpExpOpt = append(httpExpOpt, otlpmetrichttp.WithInsecure()) + } else { + tlsCfg, err := common.GetTLSCredentialsForHTTPExporter(cfg.CaFile, cfg.ClientAuth) + if err != nil { + return nil, fmt.Errorf("failed to get TLS credentials: %w", err) + } + httpExpOpt = append(httpExpOpt, otlpmetrichttp.WithTLSClientConfig(tlsCfg)) } if len(cfg.Headers) > 0 { httpExpOpt = append(httpExpOpt, otlpmetrichttp.WithHeaders(cfg.Headers)) } - return httpExpOpt + return httpExpOpt, nil } diff --git a/cmd/telemetrygen/internal/metrics/metrics.go b/cmd/telemetrygen/internal/metrics/metrics.go index 0061d64b3695..8289287e3793 100644 --- a/cmd/telemetrygen/internal/metrics/metrics.go +++ b/cmd/telemetrygen/internal/metrics/metrics.go @@ -32,11 +32,29 @@ func Start(cfg *Config) error { expFunc := func() (sdkmetric.Exporter, error) { var exp sdkmetric.Exporter if cfg.UseHTTP { + var exporterOpts []otlpmetrichttp.Option + logger.Info("starting HTTP exporter") - exp, err = otlpmetrichttp.New(context.Background(), httpExporterOptions(cfg)...) + exporterOpts, err = httpExporterOptions(cfg) + if err != nil { + return nil, err + } + exp, err = otlpmetrichttp.New(context.Background(), exporterOpts...) + if err != nil { + return nil, fmt.Errorf("failed to obtain OTLP HTTP exporter: %w", err) + } } else { + var exporterOpts []otlpmetricgrpc.Option + logger.Info("starting gRPC exporter") - exp, err = otlpmetricgrpc.New(context.Background(), grpcExporterOptions(cfg)...) + exporterOpts, err = grpcExporterOptions(cfg) + if err != nil { + return nil, err + } + exp, err = otlpmetricgrpc.New(context.Background(), exporterOpts...) + if err != nil { + return nil, fmt.Errorf("failed to obtain OTLP gRPC exporter: %w", err) + } } return exp, err } diff --git a/cmd/telemetrygen/internal/metrics/package_test.go b/cmd/telemetrygen/internal/metrics/package_test.go new file mode 100644 index 000000000000..b8f16a8085ef --- /dev/null +++ b/cmd/telemetrygen/internal/metrics/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metrics + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/cmd/telemetrygen/internal/traces/config.go b/cmd/telemetrygen/internal/traces/config.go index e8d41270d5f4..7b553b3cf04c 100644 --- a/cmd/telemetrygen/internal/traces/config.go +++ b/cmd/telemetrygen/internal/traces/config.go @@ -4,6 +4,8 @@ package traces import ( + "time" + "github.com/spf13/pflag" "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen/internal/common" @@ -13,11 +15,14 @@ import ( type Config struct { common.Config NumTraces int + NumChildSpans int PropagateContext bool ServiceName string StatusCode string Batch bool LoadSize int + + SpanDuration time.Duration } // Flags registers config flags. @@ -27,9 +32,11 @@ func (c *Config) Flags(fs *pflag.FlagSet) { fs.StringVar(&c.HTTPPath, "otlp-http-url-path", "/v1/traces", "Which URL path to write to") fs.IntVar(&c.NumTraces, "traces", 1, "Number of traces to generate in each worker (ignored if duration is provided)") + fs.IntVar(&c.NumChildSpans, "child-spans", 1, "Number of child spans to generate for each trace") fs.BoolVar(&c.PropagateContext, "marshal", false, "Whether to marshal trace context via HTTP headers") fs.StringVar(&c.ServiceName, "service", "telemetrygen", "Service name to use") fs.StringVar(&c.StatusCode, "status-code", "0", "Status code to use for the spans, one of (Unset, Error, Ok) or the equivalent integer (0,1,2)") fs.BoolVar(&c.Batch, "batch", true, "Whether to batch traces") fs.IntVar(&c.LoadSize, "size", 0, "Desired minimum size in MB of string data for each trace generated. This can be used to test traces with large payloads, i.e. when testing the OTLP receiver endpoint max receive size.") + fs.DurationVar(&c.SpanDuration, "span-duration", 123*time.Microsecond, "The duration of each generated span.") } diff --git a/cmd/telemetrygen/internal/traces/exporter.go b/cmd/telemetrygen/internal/traces/exporter.go index 4161ccc3d1f1..b5913841454a 100644 --- a/cmd/telemetrygen/internal/traces/exporter.go +++ b/cmd/telemetrygen/internal/traces/exporter.go @@ -4,35 +4,41 @@ package traces import ( + "fmt" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp" - "google.golang.org/grpc" + + "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen/internal/common" ) // grpcExporterOptions creates the configuration options for a gRPC-based OTLP trace exporter. // It configures the exporter with the provided endpoint, connection security settings, and headers. -func grpcExporterOptions(cfg *Config) []otlptracegrpc.Option { +func grpcExporterOptions(cfg *Config) ([]otlptracegrpc.Option, error) { grpcExpOpt := []otlptracegrpc.Option{ otlptracegrpc.WithEndpoint(cfg.Endpoint()), - otlptracegrpc.WithDialOption( - grpc.WithBlock(), - ), } if cfg.Insecure { grpcExpOpt = append(grpcExpOpt, otlptracegrpc.WithInsecure()) + } else { + credentials, err := common.GetTLSCredentialsForGRPCExporter(cfg.CaFile, cfg.ClientAuth) + if err != nil { + return nil, fmt.Errorf("failed to get TLS credentials: %w", err) + } + grpcExpOpt = append(grpcExpOpt, otlptracegrpc.WithTLSCredentials(credentials)) } if len(cfg.Headers) > 0 { grpcExpOpt = append(grpcExpOpt, otlptracegrpc.WithHeaders(cfg.Headers)) } - return grpcExpOpt + return grpcExpOpt, nil } // httpExporterOptions creates the configuration options for an HTTP-based OTLP trace exporter. // It configures the exporter with the provided endpoint, URL path, connection security settings, and headers. -func httpExporterOptions(cfg *Config) []otlptracehttp.Option { +func httpExporterOptions(cfg *Config) ([]otlptracehttp.Option, error) { httpExpOpt := []otlptracehttp.Option{ otlptracehttp.WithEndpoint(cfg.Endpoint()), otlptracehttp.WithURLPath(cfg.HTTPPath), @@ -40,11 +46,17 @@ func httpExporterOptions(cfg *Config) []otlptracehttp.Option { if cfg.Insecure { httpExpOpt = append(httpExpOpt, otlptracehttp.WithInsecure()) + } else { + tlsCfg, err := common.GetTLSCredentialsForHTTPExporter(cfg.CaFile, cfg.ClientAuth) + if err != nil { + return nil, fmt.Errorf("failed to get TLS credentials: %w", err) + } + httpExpOpt = append(httpExpOpt, otlptracehttp.WithTLSClientConfig(tlsCfg)) } if len(cfg.Headers) > 0 { httpExpOpt = append(httpExpOpt, otlptracehttp.WithHeaders(cfg.Headers)) } - return httpExpOpt + return httpExpOpt, nil } diff --git a/cmd/telemetrygen/internal/traces/package_test.go b/cmd/telemetrygen/internal/traces/package_test.go new file mode 100644 index 000000000000..d1398ba09b9b --- /dev/null +++ b/cmd/telemetrygen/internal/traces/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package traces + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/cmd/telemetrygen/internal/traces/traces.go b/cmd/telemetrygen/internal/traces/traces.go index a1136a25ee4c..02817577b915 100644 --- a/cmd/telemetrygen/internal/traces/traces.go +++ b/cmd/telemetrygen/internal/traces/traces.go @@ -6,6 +6,7 @@ package traces import ( "context" "fmt" + "math" "strings" "sync" "sync/atomic" @@ -34,16 +35,31 @@ func Start(cfg *Config) error { var exp *otlptrace.Exporter if cfg.UseHTTP { + var exporterOpts []otlptracehttp.Option + logger.Info("starting HTTP exporter") - exp, err = otlptracehttp.New(context.Background(), httpExporterOptions(cfg)...) + exporterOpts, err = httpExporterOptions(cfg) + if err != nil { + return err + } + exp, err = otlptracehttp.New(context.Background(), exporterOpts...) + if err != nil { + return fmt.Errorf("failed to obtain OTLP HTTP exporter: %w", err) + } } else { + var exporterOpts []otlptracegrpc.Option + logger.Info("starting gRPC exporter") - exp, err = otlptracegrpc.New(context.Background(), grpcExporterOptions(cfg)...) + exporterOpts, err = grpcExporterOptions(cfg) + if err != nil { + return err + } + exp, err = otlptracegrpc.New(context.Background(), exporterOpts...) + if err != nil { + return fmt.Errorf("failed to obtain OTLP gRPC exporter: %w", err) + } } - if err != nil { - return fmt.Errorf("failed to obtain OTLP exporter: %w", err) - } defer func() { logger.Info("stopping the exporter") if tempError := exp.Shutdown(context.Background()); tempError != nil { @@ -57,13 +73,13 @@ func Start(cfg *Config) error { defer func() { logger.Info("stop the batch span processor") if tempError := ssp.Shutdown(context.Background()); tempError != nil { - logger.Error("failed to stop the batch span processor", zap.Error(err)) + logger.Error("failed to stop the batch span processor", zap.Error(tempError)) } }() } var attributes []attribute.KeyValue - // may be overridden by `-otlp-attributes service.name="foo"` + // may be overridden by `--otlp-attributes service.name="foo"` attributes = append(attributes, semconv.ServiceNameKey.String(cfg.ServiceName)) attributes = append(attributes, cfg.GetAttributes()...) @@ -124,6 +140,7 @@ func Run(c *Config, logger *zap.Logger) error { wg.Add(1) w := worker{ numTraces: c.NumTraces, + numChildSpans: int(math.Max(1, float64(c.NumChildSpans))), propagateContext: c.PropagateContext, statusCode: statusCode, limitPerSecond: limit, @@ -132,6 +149,7 @@ func Run(c *Config, logger *zap.Logger) error { wg: &wg, logger: logger.With(zap.Int("worker", i)), loadSize: c.LoadSize, + spanDuration: c.SpanDuration, } go w.simulateTraces(telemetryAttributes) diff --git a/cmd/telemetrygen/internal/traces/worker.go b/cmd/telemetrygen/internal/traces/worker.go index cbcdc09ac1e3..cb71e2917e66 100644 --- a/cmd/telemetrygen/internal/traces/worker.go +++ b/cmd/telemetrygen/internal/traces/worker.go @@ -6,6 +6,7 @@ package traces // import "github.com/open-telemetry/opentelemetry-collector-cont import ( "context" "fmt" + "strconv" "sync" "sync/atomic" "time" @@ -23,20 +24,20 @@ import ( type worker struct { running *atomic.Bool // pointer to shared flag that indicates it's time to stop the test numTraces int // how many traces the worker has to generate (only when duration==0) + numChildSpans int // how many child spans the worker has to generate per trace propagateContext bool // whether the worker needs to propagate the trace context via HTTP headers statusCode codes.Code // the status code set for the child and parent spans totalDuration time.Duration // how long to run the test for (overrides `numTraces`) limitPerSecond rate.Limit // how many spans per second to generate wg *sync.WaitGroup // notify when done + loadSize int // desired minimum size in MB of string data for each generated trace + spanDuration time.Duration // duration of generated spans logger *zap.Logger - loadSize int } const ( fakeIP string = "1.2.3.4" - fakeSpanDuration = 123 * time.Microsecond - charactersPerMB = 1024 * 1024 // One character takes up one byte of space, so this number comes from the number of bytes in a megabyte ) @@ -46,11 +47,15 @@ func (w worker) simulateTraces(telemetryAttributes []attribute.KeyValue) { var i int for w.running.Load() { + spanStart := time.Now() + spanEnd := spanStart.Add(w.spanDuration) + ctx, sp := tracer.Start(context.Background(), "lets-go", trace.WithAttributes( semconv.NetPeerIPKey.String(fakeIP), semconv.PeerServiceKey.String("telemetrygen-server"), ), trace.WithSpanKind(trace.SpanKindClient), + trace.WithTimestamp(spanStart), ) sp.SetAttributes(telemetryAttributes...) for j := 0; j < w.loadSize; j++ { @@ -66,24 +71,32 @@ func (w worker) simulateTraces(telemetryAttributes []attribute.KeyValue) { // simulates getting a request from a client childCtx = otel.GetTextMapPropagator().Extract(childCtx, header) } + var endTimestamp trace.SpanEventOption - _, child := tracer.Start(childCtx, "okey-dokey", trace.WithAttributes( - semconv.NetPeerIPKey.String(fakeIP), - semconv.PeerServiceKey.String("telemetrygen-client"), - ), - trace.WithSpanKind(trace.SpanKindServer), - ) - child.SetAttributes(telemetryAttributes...) + for j := 0; j < w.numChildSpans; j++ { + _, child := tracer.Start(childCtx, "okey-dokey-"+strconv.Itoa(j), trace.WithAttributes( + semconv.NetPeerIPKey.String(fakeIP), + semconv.PeerServiceKey.String("telemetrygen-client"), + ), + trace.WithSpanKind(trace.SpanKindServer), + trace.WithTimestamp(spanStart), + ) + child.SetAttributes(telemetryAttributes...) - if err := limiter.Wait(context.Background()); err != nil { - w.logger.Fatal("limiter waited failed, retry", zap.Error(err)) - } + if err := limiter.Wait(context.Background()); err != nil { + w.logger.Fatal("limiter waited failed, retry", zap.Error(err)) + } - opt := trace.WithTimestamp(time.Now().Add(fakeSpanDuration)) - child.SetStatus(w.statusCode, "") - child.End(opt) + endTimestamp = trace.WithTimestamp(spanEnd) + child.SetStatus(w.statusCode, "") + child.End(endTimestamp) + + // Reset the start and end for next span + spanStart = spanEnd + spanEnd = spanStart.Add(w.spanDuration) + } sp.SetStatus(w.statusCode, "") - sp.End(opt) + sp.End(endTimestamp) i++ if w.numTraces != 0 { diff --git a/cmd/telemetrygen/internal/traces/worker_test.go b/cmd/telemetrygen/internal/traces/worker_test.go index 7d3db1e4314b..0fbbf858de61 100644 --- a/cmd/telemetrygen/internal/traces/worker_test.go +++ b/cmd/telemetrygen/internal/traces/worker_test.go @@ -50,6 +50,31 @@ func TestFixedNumberOfTraces(t *testing.T) { assert.Len(t, syncer.spans, 2) // each trace has two spans } +func TestNumberOfSpans(t *testing.T) { + // prepare + syncer := &mockSyncer{} + + tracerProvider := sdktrace.NewTracerProvider() + sp := sdktrace.NewSimpleSpanProcessor(syncer) + tracerProvider.RegisterSpanProcessor(sp) + otel.SetTracerProvider(tracerProvider) + + cfg := &Config{ + Config: common.Config{ + WorkerCount: 1, + }, + NumTraces: 1, + NumChildSpans: 5, + } + expectedNumSpans := cfg.NumChildSpans + 1 // each trace has 1 + NumChildSpans spans + + // test + require.NoError(t, Run(cfg, zap.NewNop())) + + // verify + assert.Len(t, syncer.spans, expectedNumSpans) +} + func TestRateOfSpans(t *testing.T) { // prepare syncer := &mockSyncer{} @@ -80,6 +105,38 @@ func TestRateOfSpans(t *testing.T) { assert.True(t, len(syncer.spans) <= 20, "there should have been less than 20 spans, had %d", len(syncer.spans)) } +func TestSpanDuration(t *testing.T) { + // prepare + syncer := &mockSyncer{} + + tracerProvider := sdktrace.NewTracerProvider() + sp := sdktrace.NewSimpleSpanProcessor(syncer) + tracerProvider.RegisterSpanProcessor(sp) + otel.SetTracerProvider(tracerProvider) + + targetDuration := 1 * time.Second + cfg := &Config{ + Config: common.Config{ + Rate: 10, + TotalDuration: time.Second / 2, + WorkerCount: 1, + }, + SpanDuration: targetDuration, + } + + // sanity check + require.Len(t, syncer.spans, 0) + + // test + require.NoError(t, Run(cfg, zap.NewNop())) + + for _, span := range syncer.spans { + startTime, endTime := span.StartTime(), span.EndTime() + spanDuration := endTime.Sub(startTime) + assert.Equal(t, targetDuration, spanDuration) + } +} + func TestUnthrottled(t *testing.T) { // prepare syncer := &mockSyncer{} diff --git a/cmd/telemetrygen/package_test.go b/cmd/telemetrygen/package_test.go new file mode 100644 index 000000000000..5cd502ca564b --- /dev/null +++ b/cmd/telemetrygen/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/confmap/provider/s3provider/go.mod b/confmap/provider/s3provider/go.mod index f31679ee9bf2..dbc6b3c9155f 100644 --- a/confmap/provider/s3provider/go.mod +++ b/confmap/provider/s3provider/go.mod @@ -1,41 +1,43 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider -go 1.20 +go 1.21 require ( - github.com/aws/aws-sdk-go-v2 v1.22.2 - github.com/aws/aws-sdk-go-v2/config v1.24.0 - github.com/aws/aws-sdk-go-v2/service/s3 v1.19.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/confmap v0.89.0 + github.com/aws/aws-sdk-go-v2 v1.26.1 + github.com/aws/aws-sdk-go-v2/config v1.27.11 + github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.uber.org/goleak v1.3.0 gopkg.in/yaml.v2 v2.4.0 ) require ( - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.0.0 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.15.2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.5.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.9.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 // indirect - github.com/aws/smithy-go v1.16.0 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.11 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect + github.com/aws/smithy-go v1.20.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/confmap/provider/s3provider/go.sum b/confmap/provider/s3provider/go.sum index 25c1765d5365..8bd886fb8823 100644 --- a/confmap/provider/s3provider/go.sum +++ b/confmap/provider/s3provider/go.sum @@ -1,80 +1,72 @@ -github.com/aws/aws-sdk-go-v2 v1.11.0/go.mod h1:SQfA+m2ltnu1cA0soUkj4dRSsmITiVQUJvBIZjzfPyQ= -github.com/aws/aws-sdk-go-v2 v1.22.2 h1:lV0U8fnhAnPz8YcdmZVV60+tr6CakHzqA6P8T46ExJI= -github.com/aws/aws-sdk-go-v2 v1.22.2/go.mod h1:Kd0OJtkW3Q0M0lUWGszapWjEvrXDzRW+D21JNsroB+c= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.0.0 h1:yVUAwvJC/0WNPbyl0nA3j1L6CW1CN8wBubCRqtG7JLI= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.0.0/go.mod h1:Xn6sxgRuIDflLRJFj5Ev7UxABIkNbccFPV/p8itDReM= -github.com/aws/aws-sdk-go-v2/config v1.24.0 h1:4LEk29JO3w+y9dEo/5Tq5QTP7uIEw+KQrKiHOs4xlu4= -github.com/aws/aws-sdk-go-v2/config v1.24.0/go.mod h1:11nNDAuK86kOUHeuEQo8f3CkcV5xuUxvPwFjTZE/PnQ= -github.com/aws/aws-sdk-go-v2/credentials v1.15.2 h1:rKH7khRMxPdD0u3dHecd0Q7NOVw3EUe7AqdkUOkiOGI= -github.com/aws/aws-sdk-go-v2/credentials v1.15.2/go.mod h1:tXM8wmaeAhfC7nZoCxb0FzM/aRaB1m1WQ7x0qlBLq80= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3 h1:G5KawTAkyHH6WyKQCdHiW4h3PmAXNJpOgwKg3H7sDRE= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3/go.mod h1:hugKmSFnZB+HgNI1sYGT14BUPZkO6alC/e0AWu+0IAQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.0/go.mod h1:NO3Q5ZTTQtO2xIg2+xTXYDiT7knSejfeDm7WGDaOo0U= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2 h1:AaQsr5vvGR7rmeSWBtTCcw16tT9r51mWijuCQhzLnq8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2/go.mod h1:o1IiRn7CWocIFTXJjGKJDOwxv1ibL53NpcvcqGWyRBA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.0.0/go.mod h1:anlUzBoEWglcUxUQwZA7HQOEVEnQALVZsizAapB2hq8= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 h1:UZx8SXZ0YtzRiALzYAWcjb9Y9hZUR7MBKaBQ5ouOjPs= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2/go.mod h1:ipuRpcSaklmxR6C39G187TpBAO132gUfleTGccUPs8c= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0 h1:usgqiJtamuGIBj+OvYmMq89+Z1hIKkMJToz1WpoeNUY= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.5.0 h1:lPLbw4Gn59uoKqvOfSnkJr54XWk5Ak1NK20ZEiSWb3U= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.5.0/go.mod h1:80NaCIH9YU3rzTTs/J/ECATjXuRqzo/wB6ukO6MZ0XY= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.5.0/go.mod h1:Mq6AEc+oEjCUlBuLiK5YwW4shSOAKCQ3tXN0sQeYoBA= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 h1:h7j73yuAVVjic8pqswh+L/7r2IHP43QwRyOu6zcCDDE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2/go.mod h1:H07AHdK5LSy8F7EJUQhoxyiCNkePoHj2D8P2yGTWafo= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.9.0 h1:0BOlTqnNnrEO04oYKzDxMMe68t107pmIotn18HtVonY= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.9.0/go.mod h1:xKCZ4YFSF2s4Hnb/J0TLeOsKuGzICzcElaOKNGrVnx4= -github.com/aws/aws-sdk-go-v2/service/s3 v1.19.0 h1:5mRAms4TjSTOGYsqKYte5kHr1PzpMJSyLThjF3J+hw0= -github.com/aws/aws-sdk-go-v2/service/s3 v1.19.0/go.mod h1:Gwz3aVctJe6mUY9T//bcALArPUaFmNAy2rTB9qN4No8= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.1 h1:km+ZNjtLtpXYf42RdaDZnNHm9s7SYAuDGTafy6nd89A= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.1/go.mod h1:aHBr3pvBSD5MbzOvQtYutyPLLRPbl/y9x86XyJJnUXQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1 h1:iRFNqZH4a67IqPvK8xxtyQYnyrlsvwmpHOe9r55ggBA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1/go.mod h1:pTy5WM+6sNv2tB24JNKFtn6EvciQ5k40ZJ0pq/Iaxj0= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 h1:txgVXIXWPXyqdiVn92BV6a/rgtpX31HYdsOYj0sVQQQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.1/go.mod h1:VAiJiNaoP1L89STFlEMgmHX1bKixY+FaP+TpRFrmyZ4= -github.com/aws/smithy-go v1.9.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/aws/smithy-go v1.16.0 h1:gJZEH/Fqh+RsvlJ1Zt4tVAtV6bKkp3cC+R6FCZMNzik= -github.com/aws/smithy-go v1.16.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA= +github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= +github.com/aws/aws-sdk-go-v2/config v1.27.11 h1:f47rANd2LQEYHda2ddSCKYId18/8BhSRM4BULGmfgNA= +github.com/aws/aws-sdk-go-v2/config v1.27.11/go.mod h1:SMsV78RIOYdve1vf36z8LmnszlRWkwMQtomCAI0/mIE= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11 h1:YuIB1dJNf1Re822rriUOTxopaHHvIq0l/pX3fwO+Tzs= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6EKL+NcD7LG3dpKGMV4SShgo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5 h1:81KE7vaZzrl7yHBYHVEzYB8sypz11NMOZ40YlWvPxsU= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5/go.mod h1:LIt2rg7Mcgn09Ygbdh/RdIm0rQ+3BNkbP1gyVMFtRK0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7 h1:ZMeFZ5yk+Ek+jNr1+uwCd2tG89t6oTS5yVWpa6yy2es= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7/go.mod h1:mxV05U+4JiHqIpGqqYXOHLPKUC6bDXC44bsUhNjOEwY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 h1:f9RyWNtS8oH7cZlbn+/JNPpjUk5+5fLd5lM9M0i49Ys= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5/go.mod h1:h5CoMZV2VF297/VLhRhO1WF+XYWOzXo+4HsObA4HjBQ= +github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 h1:6cnno47Me9bRykw9AEv9zkXE+5or7jz8TsskTTccbgc= +github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1/go.mod h1:qmdkIIAC+GCLASF7R2whgNrJADz0QZPX+Seiw/i4S3o= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= +github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= +github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= 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/google/go-cmp v0.5.4/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.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -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/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +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= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/confmap/provider/s3provider/package_test.go b/confmap/provider/s3provider/package_test.go new file mode 100644 index 000000000000..a247d040f870 --- /dev/null +++ b/confmap/provider/s3provider/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package s3provider + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/confmap/provider/s3provider/provider_test.go b/confmap/provider/s3provider/provider_test.go index c316cb2dd408..3593b5755133 100644 --- a/confmap/provider/s3provider/provider_test.go +++ b/confmap/provider/s3provider/provider_test.go @@ -41,7 +41,8 @@ func (client *testClient) GetObject(_ context.Context, request *s3.GetObjectInpu return &s3.GetObjectOutput{}, err } - return &s3.GetObjectOutput{Body: io.NopCloser(bytes.NewReader(f)), ContentLength: (int64)(len(f))}, nil + bodyLen := (int64)(len(f)) + return &s3.GetObjectOutput{Body: io.NopCloser(bytes.NewReader(f)), ContentLength: &bodyLen}, nil } // Create a provider mocking the s3 provider diff --git a/testbed/mockdatareceivers/mockawsxrayreceiver/Makefile b/confmap/provider/secretsmanagerprovider/Makefile similarity index 100% rename from testbed/mockdatareceivers/mockawsxrayreceiver/Makefile rename to confmap/provider/secretsmanagerprovider/Makefile diff --git a/confmap/provider/secretsmanagerprovider/README.md b/confmap/provider/secretsmanagerprovider/README.md new file mode 100644 index 000000000000..fad55427eea2 --- /dev/null +++ b/confmap/provider/secretsmanagerprovider/README.md @@ -0,0 +1,11 @@ +## Summary +This package provides a `ConfigMapProvider` implementation for Amazon Secrets Manager (`secretsmanager`) that allows +the +Collector the ability to read data stored in AWS Secrets Manager. +## How it works +- Just use the placeholders with the following pattern `${secretsmanager:}` +- Make sure you have the `secretsmanager:GetSecretValue` in the OTEL Collector Role + +Prerequisites: +- Need to setup access keys from IAM console (aws_access_key_id and aws_secret_access_key) with permission to access Amazon Secrets Manager +- For details, can take a look at https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/ \ No newline at end of file diff --git a/confmap/provider/secretsmanagerprovider/go.mod b/confmap/provider/secretsmanagerprovider/go.mod new file mode 100644 index 000000000000..a1d8864b657b --- /dev/null +++ b/confmap/provider/secretsmanagerprovider/go.mod @@ -0,0 +1,29 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider + +go 1.21 + +require ( + github.com/aws/aws-sdk-go-v2 v1.26.1 + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.6 + github.com/aws/smithy-go v1.20.2 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/confmap v0.98.0 +) + +require ( + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/knadh/koanf v1.5.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/confmap/provider/secretsmanagerprovider/go.sum b/confmap/provider/secretsmanagerprovider/go.sum new file mode 100644 index 000000000000..9a776121140a --- /dev/null +++ b/confmap/provider/secretsmanagerprovider/go.sum @@ -0,0 +1,412 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA= +github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= +github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= +github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.6 h1:TIOEjw0i2yyhmhRry3Oeu9YtiiHWISZ6j/irS1W3gX4= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.6/go.mod h1:3Ba++UwWd154xtP4FRX5pUK3Gt4up5sDHCve6kVfE+g= +github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= +github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= +github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +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/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +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/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/consul/api v1.13.0/go.mod h1:ZlVrynguJKcYr54zGaDbaL3fOvKC9m72FhPvA8T35KQ= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= +github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= +github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= +github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hjson/hjson-go/v4 v4.0.0/go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEFTse3rH13E= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs= +github.com/knadh/koanf v1.5.0/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +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.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +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.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/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-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-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-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +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.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +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= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/confmap/provider/secretsmanagerprovider/metadata.yaml b/confmap/provider/secretsmanagerprovider/metadata.yaml new file mode 100644 index 000000000000..6d3de5bc6f93 --- /dev/null +++ b/confmap/provider/secretsmanagerprovider/metadata.yaml @@ -0,0 +1,3 @@ +status: + codeowners: + active: [driverpt, atoulme] \ No newline at end of file diff --git a/confmap/provider/secretsmanagerprovider/provider.go b/confmap/provider/secretsmanagerprovider/provider.go new file mode 100644 index 000000000000..b13ff457b8d1 --- /dev/null +++ b/confmap/provider/secretsmanagerprovider/provider.go @@ -0,0 +1,60 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package secretsmanagerprovider // import "github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider" + +import ( + "context" + "fmt" + "strings" + + "github.com/aws/aws-sdk-go-v2/service/secretsmanager" + "go.opentelemetry.io/collector/confmap" +) + +const ( + schemeName = "secretsmanager" +) + +type provider struct { + client *secretsmanager.Client +} + +// New returns a new confmap.Provider that reads the configuration from the given AWS Secrets Manager Name or ARN. +// +// This Provider supports "secretsmanager" scheme, and can be called with a selector: +// `secretsmanager:NAME_OR_ARN` +func New() confmap.Provider { + return &provider{} +} + +func (provider *provider) Retrieve(ctx context.Context, uri string, _ confmap.WatcherFunc) (*confmap.Retrieved, error) { + if !strings.HasPrefix(uri, schemeName+":") { + return nil, fmt.Errorf("%q uri is not supported by %q provider", uri, schemeName) + } + + secretArn := strings.Replace(uri, schemeName+":", "", 1) + + input := &secretsmanager.GetSecretValueInput{ + SecretId: &secretArn, + } + + response, err := provider.client.GetSecretValue(ctx, input) + if err != nil { + return nil, err + } + + if response.SecretString == nil { + return nil, nil + } + + return confmap.NewRetrieved(*response.SecretString) +} + +func (*provider) Scheme() string { + return schemeName +} + +func (*provider) Shutdown(context.Context) error { + return nil +} diff --git a/confmap/provider/secretsmanagerprovider/provider_test.go b/confmap/provider/secretsmanagerprovider/provider_test.go new file mode 100644 index 000000000000..17cf6a2b2df0 --- /dev/null +++ b/confmap/provider/secretsmanagerprovider/provider_test.go @@ -0,0 +1,76 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package secretsmanagerprovider + +import ( + "context" + "encoding/json" + "net/http" + "net/http/httptest" + "testing" + "time" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/secretsmanager" + transport "github.com/aws/smithy-go/endpoints" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/confmap" +) + +type resolver struct { + url string +} + +func (r resolver) ResolveEndpoint(ctx context.Context, params secretsmanager.EndpointParameters) (transport.Endpoint, error) { + region := "us-east-1" + params.Region = ®ion + params.Endpoint = &r.url + + old := secretsmanager.NewDefaultEndpointResolverV2() + return old.ResolveEndpoint(ctx, params) +} + +// Create a provider mocking s3provider works in normal cases +func NewTestProvider(url string) confmap.Provider { + cfg := aws.NewConfig() + + return &provider{client: secretsmanager.NewFromConfig(*cfg, secretsmanager.WithEndpointResolverV2(resolver{url: url}))} +} + +func TestSecretsManagerFetchSecret(t *testing.T) { + secretName := "FOO" + secretValue := "BAR" + + s := httptest.NewServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) { + if request.Header.Get("X-Amz-Target") == "secretsmanager.GetSecretValue" { + response := &struct { + Arn string `json:"ARN"` + CreatedDate int64 `json:"CreatedDate"` + Name string `json:"Name"` + SecretString string `json:"SecretString"` + }{ + Arn: secretName, + CreatedDate: time.Now().Unix(), + Name: secretName, + SecretString: secretValue, + } + + b, _ := json.Marshal(response) + _, err := writer.Write(b) + require.NoError(t, err) + writer.WriteHeader(http.StatusOK) + } + })) + defer s.Close() + fp := NewTestProvider(s.URL) + result, err := fp.Retrieve(context.Background(), "secretsmanager:"+secretName, nil) + assert.NoError(t, err) + assert.NoError(t, fp.Shutdown(context.Background())) + + value, err := result.AsRaw() + assert.NoError(t, err) + assert.NotNil(t, value) + assert.Equal(t, secretValue, value) +} diff --git a/connector/countconnector/README.md b/connector/countconnector/README.md index 95af41b7c837..0a0512dfdd23 100644 --- a/connector/countconnector/README.md +++ b/connector/countconnector/README.md @@ -2,13 +2,12 @@ | Status | | | ------------- |-----------| -| Distributions | [contrib], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aconnector%2Fcount%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aconnector%2Fcount) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aconnector%2Fcount%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aconnector%2Fcount) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@djaglowski](https://www.github.com/djaglowski), [@jpkrohling](https://www.github.com/jpkrohling) | [development]: https://github.com/open-telemetry/opentelemetry-collector#development [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector ## Supported Pipeline Types diff --git a/connector/countconnector/config.go b/connector/countconnector/config.go index f5af7df2962d..998b32ceb9a4 100644 --- a/connector/countconnector/config.go +++ b/connector/countconnector/config.go @@ -130,7 +130,7 @@ func (c *Config) Unmarshal(componentParser *confmap.Conf) error { // Nothing to do if there is no config given. return nil } - if err := componentParser.Unmarshal(c); err != nil { + if err := componentParser.Unmarshal(c, confmap.WithIgnoreUnused()); err != nil { return err } if !componentParser.IsSet("spans") { diff --git a/connector/countconnector/config_test.go b/connector/countconnector/config_test.go index 1ee183f3b094..72a5e43d5d82 100644 --- a/connector/countconnector/config_test.go +++ b/connector/countconnector/config_test.go @@ -413,7 +413,7 @@ func TestConfigErrors(t *testing.T) { }, }, }, - expect: fmt.Sprintf("spans condition: metric %q: unable to parse OTTL statement", defaultMetricNameSpans), + expect: fmt.Sprintf("spans condition: metric %q: unable to parse OTTL condition", defaultMetricNameSpans), }, { name: "invalid_condition_spanevent", @@ -425,7 +425,7 @@ func TestConfigErrors(t *testing.T) { }, }, }, - expect: fmt.Sprintf("spanevents condition: metric %q: unable to parse OTTL statement", defaultMetricNameSpanEvents), + expect: fmt.Sprintf("spanevents condition: metric %q: unable to parse OTTL condition", defaultMetricNameSpanEvents), }, { name: "invalid_condition_metric", @@ -437,7 +437,7 @@ func TestConfigErrors(t *testing.T) { }, }, }, - expect: fmt.Sprintf("metrics condition: metric %q: unable to parse OTTL statement", defaultMetricNameMetrics), + expect: fmt.Sprintf("metrics condition: metric %q: unable to parse OTTL condition", defaultMetricNameMetrics), }, { name: "invalid_condition_datapoint", @@ -449,7 +449,7 @@ func TestConfigErrors(t *testing.T) { }, }, }, - expect: fmt.Sprintf("datapoints condition: metric %q: unable to parse OTTL statement", defaultMetricNameDataPoints), + expect: fmt.Sprintf("datapoints condition: metric %q: unable to parse OTTL condition", defaultMetricNameDataPoints), }, { name: "invalid_condition_log", @@ -461,7 +461,7 @@ func TestConfigErrors(t *testing.T) { }, }, }, - expect: fmt.Sprintf("logs condition: metric %q: unable to parse OTTL statement", defaultMetricNameLogs), + expect: fmt.Sprintf("logs condition: metric %q: unable to parse OTTL condition", defaultMetricNameLogs), }, } diff --git a/connector/countconnector/generated_component_test.go b/connector/countconnector/generated_component_test.go new file mode 100644 index 000000000000..cab0dfd4d829 --- /dev/null +++ b/connector/countconnector/generated_component_test.go @@ -0,0 +1,75 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package countconnector + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/collector/consumer/consumertest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs_to_metrics", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsToMetrics(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "metrics_to_metrics", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsToMetrics(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "traces_to_metrics", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesToMetrics(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(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + firstConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstConnector.Start(context.Background(), host)) + require.NoError(t, firstConnector.Shutdown(context.Background())) + secondConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondConnector.Start(context.Background(), host)) + require.NoError(t, secondConnector.Shutdown(context.Background())) + }) + } +} diff --git a/connector/countconnector/go.mod b/connector/countconnector/go.mod index cba235f74fb5..20b044213db6 100644 --- a/connector/countconnector/go.mod +++ b/connector/countconnector/go.mod @@ -1,58 +1,67 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/connector v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/connector v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/alecthomas/participle/v2 v2.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gobwas/glob v0.2.3 // 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.4.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/iancoleman/strcase v0.3.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/connector/countconnector/go.sum b/connector/countconnector/go.sum index 53849d810965..522d9276cb5d 100644 --- a/connector/countconnector/go.sum +++ b/connector/countconnector/go.sum @@ -1,31 +1,40 @@ github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= -github.com/alecthomas/participle/v2 v2.1.0 h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4= -github.com/alecthomas/participle/v2 v2.1.0/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= -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/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +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.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -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/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/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/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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -36,14 +45,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -53,61 +62,77 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -120,15 +145,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/connector/countconnector/internal/metadata/generated_status.go b/connector/countconnector/internal/metadata/generated_status.go index 614bd16ddcdc..ea152f0aa813 100644 --- a/connector/countconnector/internal/metadata/generated_status.go +++ b/connector/countconnector/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("count") ) const ( - Type = "count" TracesToMetricsStability = component.StabilityLevelDevelopment MetricsToMetricsStability = component.StabilityLevelDevelopment LogsToMetricsStability = component.StabilityLevelDevelopment ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/countconnector") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/countconnector") +} diff --git a/connector/countconnector/metadata.yaml b/connector/countconnector/metadata.yaml index 42ab007b9cad..1bc57a1ff9c2 100644 --- a/connector/countconnector/metadata.yaml +++ b/connector/countconnector/metadata.yaml @@ -1,9 +1,13 @@ type: count +scope_name: otelcol/countconnector status: class: connector stability: development: [traces_to_metrics, metrics_to_metrics, logs_to_metrics] - distributions: [contrib, sumo] + distributions: [contrib] codeowners: active: [djaglowski, jpkrohling] + +tests: + config: diff --git a/connector/countconnector/package_test.go b/connector/countconnector/package_test.go new file mode 100644 index 000000000000..6c55bf168a82 --- /dev/null +++ b/connector/countconnector/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package countconnector + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/connector/datadogconnector/README.md b/connector/datadogconnector/README.md index 457382cd830c..25df928f1e4f 100644 --- a/connector/datadogconnector/README.md +++ b/connector/datadogconnector/README.md @@ -5,7 +5,8 @@ | ------------- |-----------| | Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aconnector%2Fdatadog%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aconnector%2Fdatadog) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aconnector%2Fdatadog%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aconnector%2Fdatadog) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@mx-psi](https://www.github.com/mx-psi), [@gbbr](https://www.github.com/gbbr), [@dineshg13](https://www.github.com/dineshg13) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@mx-psi](https://www.github.com/mx-psi), [@dineshg13](https://www.github.com/dineshg13) | +| Emeritus | [@gbbr](https://www.github.com/gbbr) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib @@ -103,4 +104,80 @@ service: ``` -Here we have two traces pipelines that ingest the same data but one is being sampled. The one that is sampled has its data sent to the datadog backend for you to see the sampled subset of the total traces sent across. The other non-sampled pipeline of traces sends its data to the metrics pipeline to be used in the APM stats. This unsampled pipeline gives the full picture of how much data the application emits in traces. +Here we have two traces pipelines that ingest the same data but one is being sampled. The one that is sampled has its data sent to the datadog backend for you to see the sampled subset of the total traces sent across. The other non-sampled pipeline of traces sends its data to the metrics pipeline to be used in the APM stats. This unsampled pipeline gives the full picture of how much data the application emits in traces. + +## Configurations + +```yaml +connectors: + datadog/connector: + traces: + ## @param ignore_resources - list of strings - optional + ## A blacklist of regular expressions can be provided to disable certain traces based on their resource name + ## all entries must be surrounded by double quotes and separated by commas. + # + # ignore_resources: ["(GET|POST) /healthcheck"] + + ## @param span_name_remappings - map of key/value pairs - optional + ## A map of Datadog span operation name keys and preferred name valuues to update those names to. This can be used to + ## automatically map Datadog Span Operation Names to an updated value, and is useful when a user wants to + ## shorten or modify span names to something more user friendly in the case of instrumentation libraries with + ## particularly verbose names. + # + # span_name_remappings: + # io.opentelemetry.javaagent.spring.client: spring.client + # instrumentation:express.server: express + # go.opentelemetry.io_contrib_instrumentation_net_http_otelhttp.client: http.client + + ## @param span_name_as_resource_name - use OpenTelemetry semantic convention for span naming - optional + ## Option created to maintain similarity with the OpenTelemetry semantic conventions as discussed in the issue below. + ## https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/trace/semantic_conventions + ## https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/1909 + # + # span_name_as_resource_name: true + + ## @param compute_stats_by_span_kind - enables APM stats computation based on `span.kind` - optional + ## If set to true, enables an additional stats computation check on spans to see they have an eligible `span.kind` (server, consumer, client, producer). + ## If enabled, a span with an eligible `span.kind` will have stats computed. If disabled, only top-level and measured spans will have stats computed. + ## NOTE: For stats computed from OTel traces, only top-level spans are considered when this option is off. + # + # compute_stats_by_span_kind: true + + ## @param peer_tags_aggregation - enables aggregation of peer related tags in Datadog exporter - optional + ## If set to true, enables aggregation of peer related tags (e.g., `peer.service`, `db.instance`, etc.) in Datadog exporter. + ## If disabled, aggregated trace stats will not include these tags as dimensions on trace metrics. + ## For the best experience with peer tags, Datadog also recommends enabling `compute_stats_by_span_kind`. + ## If you are using an OTel tracer, it's best to have both enabled because client/producer spans with relevant peer tags + ## may not be marked by Datadog exporter as top-level spans. + ## If enabling both causes Datadog exporter to consume too many resources, try disabling `compute_stats_by_span_kind` first. + ## A high cardinality of peer tags or APM resources can also contribute to higher CPU and memory consumption. + ## You can check for the cardinality of these fields by making trace search queries in the Datadog UI. + ## The default list of peer tags can be found in https://github.com/DataDog/datadog-agent/blob/main/pkg/trace/stats/concentrator.go. + # + # peer_tags_aggregation: false + + ## @param trace_buffer - specifies the number of outgoing trace payloads to buffer before dropping - optional + ## If unset, the default value is 1000. + ## If you start seeing log messages like `Payload in channel full. Dropped 1 payload.` in the datadog exporter, consider + ## setting a higher `trace_buffer` to avoid traces being dropped. + # + # trace_buffer: 1000 + + ## @param peer_tags - [BETA] Optional list of supplementary peer tags that go beyond the defaults. The Datadog backend validates all tags + ## and will drop ones that are unapproved. The default set of peer tags can be found at + ## https://github.com/DataDog/datadog-agent/blob/505170c4ac8c3cbff1a61cf5f84b28d835c91058/pkg/trace/stats/concentrator.go#L55. + # + # peer_tags: ["tag"] + + ## @param resource_attributes_as_container_tags - enables the use of resource attributes as container tags - Optional + ## A list of resource attributes that should be used as container tags. + # + # resource_attributes_as_container_tags: ["could.availability_zone", "could.region"] +``` + +**NOTE**: `compute_stats_by_span_kind` and `peer_tags_aggregation` only work when the feature gate `connector.datadogconnector.performance` is enabled. See below for details on this feature gate. + +## Feature Gate for Performance + +In case you are experiencing high memory usage with Datadog Connector, similar to [issue](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/29755), use the feature gate `connector.datadogconnector.performance`. With the feature gate enabled, Datadog Connector takes OTLP traces and produces OTLP metric with the name `dd.internal.stats.payload`. This Metric has an attribute `dd.internal.stats.payload` that contains the bytes for StatsPayload. With the feature gate, we can use Datadog Connector only in conjunction with Datadog Exporter. Please enable the feature only if needed for performance reasons and higher throughput. Enable the feature gate on all collectors (especially in gateway deployment) in the pipeline that sends data to Datadog. We plan to refactor this component in the future so that the signals produced are usable in any metrics pipeline. + diff --git a/connector/datadogconnector/config.go b/connector/datadogconnector/config.go new file mode 100644 index 000000000000..1382f09c5740 --- /dev/null +++ b/connector/datadogconnector/config.go @@ -0,0 +1,98 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package datadogconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector" + +import ( + "fmt" + "regexp" + + "go.opentelemetry.io/collector/component" +) + +var _ component.Config = (*Config)(nil) + +// Config defines configuration for the Datadog connector. +type Config struct { + // Traces defines the Traces specific configuration + Traces TracesConfig `mapstructure:"traces"` +} + +// TracesConfig defines the traces specific configuration options +type TracesConfig struct { + // ignored resources + // A blocklist of regular expressions can be provided to disable certain traces based on their resource name + // all entries must be surrounded by double quotes and separated by commas. + // ignore_resources: ["(GET|POST) /healthcheck"] + IgnoreResources []string `mapstructure:"ignore_resources"` + + // SpanNameRemappings is the map of datadog span names and preferred name to map to. This can be used to + // automatically map Datadog Span Operation Names to an updated value. All entries should be key/value pairs. + // span_name_remappings: + // io.opentelemetry.javaagent.spring.client: spring.client + // instrumentation:express.server: express + // go.opentelemetry.io_contrib_instrumentation_net_http_otelhttp.client: http.client + SpanNameRemappings map[string]string `mapstructure:"span_name_remappings"` + + // If set to true the OpenTelemetry span name will used in the Datadog resource name. + // If set to false the resource name will be filled with the instrumentation library name + span kind. + // The default value is `false`. + SpanNameAsResourceName bool `mapstructure:"span_name_as_resource_name"` + + // If set to true, enables an additional stats computation check on spans to see they have an eligible `span.kind` (server, consumer, client, producer). + // If enabled, a span with an eligible `span.kind` will have stats computed. If disabled, only top-level and measured spans will have stats computed. + // NOTE: For stats computed from OTel traces, only top-level spans are considered when this option is off. + ComputeStatsBySpanKind bool `mapstructure:"compute_stats_by_span_kind"` + + // If set to true, enables aggregation of peer related tags (e.g., `peer.service`, `db.instance`, etc.) in the datadog connector. + // If disabled, aggregated trace stats will not include these tags as dimensions on trace metrics. + // For the best experience with peer tags, Datadog also recommends enabling `compute_stats_by_span_kind`. + // If you are using an OTel tracer, it's best to have both enabled because client/producer spans with relevant peer tags + // may not be marked by the datadog connector as top-level spans. + // If enabling both causes the datadog connector to consume too many resources, try disabling `compute_stats_by_span_kind` first. + // A high cardinality of peer tags or APM resources can also contribute to higher CPU and memory consumption. + // You can check for the cardinality of these fields by making trace search queries in the Datadog UI. + // The default list of peer tags can be found in https://github.com/DataDog/datadog-agent/blob/main/pkg/trace/stats/concentrator.go. + PeerTagsAggregation bool `mapstructure:"peer_tags_aggregation"` + + // [BETA] Optional list of supplementary peer tags that go beyond the defaults. The Datadog backend validates all tags + // and will drop ones that are unapproved. The default set of peer tags can be found at + // https://github.com/DataDog/datadog-agent/blob/505170c4ac8c3cbff1a61cf5f84b28d835c91058/pkg/trace/stats/concentrator.go#L55. + PeerTags []string `mapstructure:"peer_tags"` + + // TraceBuffer specifies the number of Datadog Agent TracerPayloads to buffer before dropping. + // The default value is 1000. + TraceBuffer int `mapstructure:"trace_buffer"` + + // ResourceAttributesAsContainerTags specifies the list of resource attributes to be used as container tags. + ResourceAttributesAsContainerTags []string `mapstructure:"resource_attributes_as_container_tags"` +} + +// Validate the configuration for errors. This is required by component.Config. +func (c *Config) Validate() error { + if c.Traces.IgnoreResources != nil { + for _, entry := range c.Traces.IgnoreResources { + _, err := regexp.Compile(entry) + if err != nil { + return fmt.Errorf("%q is not valid resource filter regular expression", entry) + } + } + } + + if c.Traces.SpanNameRemappings != nil { + for key, value := range c.Traces.SpanNameRemappings { + if value == "" { + return fmt.Errorf("%q is not valid value for span name remapping", value) + } + if key == "" { + return fmt.Errorf("%q is not valid key for span name remapping", key) + } + } + } + + if c.Traces.TraceBuffer < 0 { + return fmt.Errorf("Trace buffer must be non-negative") + } + + return nil +} diff --git a/connector/datadogconnector/config_test.go b/connector/datadogconnector/config_test.go new file mode 100644 index 000000000000..307f9e920dcd --- /dev/null +++ b/connector/datadogconnector/config_test.go @@ -0,0 +1,84 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package datadogconnector + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestValidate(t *testing.T) { + + tests := []struct { + name string + cfg *Config + err string + }{ + { + name: "span name remapping valid", + cfg: &Config{ + Traces: TracesConfig{ + SpanNameRemappings: map[string]string{"old.opentelemetryspan.name": "updated.name"}, + }, + }, + }, + { + name: "span name remapping empty val", + cfg: &Config{Traces: TracesConfig{ + SpanNameRemappings: map[string]string{"oldname": ""}, + }}, + err: "\"\" is not valid value for span name remapping", + }, + { + name: "span name remapping empty key", + cfg: &Config{Traces: TracesConfig{ + SpanNameRemappings: map[string]string{"": "newname"}, + }}, + err: "\"\" is not valid key for span name remapping", + }, + { + name: "ignore resources valid", + cfg: &Config{Traces: TracesConfig{ + IgnoreResources: []string{"[123]"}, + }}, + }, + { + name: "ignore resources missing bracket", + cfg: &Config{Traces: TracesConfig{ + IgnoreResources: []string{"[123"}, + }}, + err: "\"[123\" is not valid resource filter regular expression", + }, + { + name: "With trace_buffer", + cfg: &Config{Traces: TracesConfig{ + TraceBuffer: 10, + }}, + }, + { + name: "neg trace_buffer", + cfg: &Config{Traces: TracesConfig{ + TraceBuffer: -10, + }}, + err: "Trace buffer must be non-negative", + }, + { + name: "With peer_tags", + cfg: &Config{ + Traces: TracesConfig{PeerTags: []string{"tag1", "tag2"}}, + }, + }, + } + for _, testInstance := range tests { + t.Run(testInstance.name, func(t *testing.T) { + err := testInstance.cfg.Validate() + if testInstance.err != "" { + assert.EqualError(t, err, testInstance.err) + } else { + assert.NoError(t, err) + } + }) + } +} diff --git a/connector/datadogconnector/connector.go b/connector/datadogconnector/connector.go index 7e8efd7ffacf..22f412e8856a 100644 --- a/connector/datadogconnector/connector.go +++ b/connector/datadogconnector/connector.go @@ -5,21 +5,31 @@ package datadogconnector // import "github.com/open-telemetry/opentelemetry-coll import ( "context" + "fmt" + "sync" + "time" pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" + traceconfig "github.com/DataDog/datadog-agent/pkg/trace/config" + "github.com/DataDog/datadog-agent/pkg/trace/timing" + "github.com/DataDog/datadog-go/v5/statsd" + "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes" "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics" + "github.com/patrickmn/go-cache" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + semconv "go.opentelemetry.io/collector/semconv/v1.17.0" + "go.opentelemetry.io/otel/metric/noop" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog" ) -// connectorImp is the schema for connector -type connectorImp struct { +// traceToMetricConnector is the schema for connector +type traceToMetricConnector struct { metricsConsumer consumer.Metrics // the next component in the pipeline to ingest metrics after connector - tracesConsumer consumer.Traces // the next component in the pipeline to ingest traces after connector logger *zap.Logger // agent specifies the agent used to ingest traces and output APM Stats. @@ -30,51 +40,102 @@ type connectorImp struct { // from the agent to OTLP Metrics. translator *metrics.Translator + enrichedTags map[string]string + containerTagCache *cache.Cache + // in specifies the channel through which the agent will output Stats Payloads // resulting from ingested traces. in chan *pb.StatsPayload // exit specifies the exit channel, which will be closed upon shutdown. exit chan struct{} + + // isStarted tracks whether Start() has been called. + isStarted bool } -var _ component.Component = (*connectorImp)(nil) // testing that the connectorImp properly implements the type Component interface +var _ component.Component = (*traceToMetricConnector)(nil) // testing that the connectorImp properly implements the type Component interface -// function to create a new connector -func newConnector(logger *zap.Logger, _ component.Config, metricsConsumer consumer.Metrics, tracesConsumer consumer.Traces) (*connectorImp, error) { - logger.Info("Building datadog connector") +// cacheExpiration is the time after which a container tag cache entry will expire +// and be removed from the cache. +var cacheExpiration = time.Minute * 5 - in := make(chan *pb.StatsPayload, 100) - trans, err := metrics.NewTranslator(logger) +// cacheCleanupInterval is the time after which the cache will be cleaned up. +var cacheCleanupInterval = time.Minute - ctx := context.Background() +// function to create a new connector +func newTraceToMetricConnector(set component.TelemetrySettings, cfg component.Config, metricsConsumer consumer.Metrics, metricsClient statsd.ClientInterface, timingReporter timing.Reporter) (*traceToMetricConnector, error) { + set.Logger.Info("Building datadog connector for traces to metrics") + in := make(chan *pb.StatsPayload, 100) + set.MeterProvider = noop.NewMeterProvider() // disable metrics for the connector + attributesTranslator, err := attributes.NewTranslator(set) if err != nil { - return nil, err + return nil, fmt.Errorf("failed to create attributes translator: %w", err) + } + trans, err := metrics.NewTranslator(set, attributesTranslator) + if err != nil { + return nil, fmt.Errorf("failed to create metrics translator: %w", err) + } + + ctags := make(map[string]string, len(cfg.(*Config).Traces.ResourceAttributesAsContainerTags)) + for _, val := range cfg.(*Config).Traces.ResourceAttributesAsContainerTags { + if v, ok := attributes.ContainerMappings[val]; ok { + ctags[v] = "" + } else { + ctags[val] = "" + } } - return &connectorImp{ - logger: logger, - agent: datadog.NewAgent(ctx, in), - translator: trans, - in: in, - metricsConsumer: metricsConsumer, - tracesConsumer: tracesConsumer, - exit: make(chan struct{}), + ctx := context.Background() + return &traceToMetricConnector{ + logger: set.Logger, + agent: datadog.NewAgentWithConfig(ctx, getTraceAgentCfg(cfg.(*Config).Traces, attributesTranslator), in, metricsClient, timingReporter), + translator: trans, + in: in, + metricsConsumer: metricsConsumer, + enrichedTags: ctags, + containerTagCache: cache.New(cacheExpiration, cacheCleanupInterval), + exit: make(chan struct{}), }, nil } +func getTraceAgentCfg(cfg TracesConfig, attributesTranslator *attributes.Translator) *traceconfig.AgentConfig { + acfg := traceconfig.New() + acfg.OTLPReceiver.AttributesTranslator = attributesTranslator + acfg.OTLPReceiver.SpanNameRemappings = cfg.SpanNameRemappings + acfg.OTLPReceiver.SpanNameAsResourceName = cfg.SpanNameAsResourceName + acfg.Ignore["resource"] = cfg.IgnoreResources + acfg.ComputeStatsBySpanKind = cfg.ComputeStatsBySpanKind + acfg.PeerTagsAggregation = cfg.PeerTagsAggregation + acfg.PeerTags = cfg.PeerTags + if len(cfg.ResourceAttributesAsContainerTags) > 0 { + acfg.Features["enable_cid_stats"] = struct{}{} + delete(acfg.Features, "disable_cid_stats") + } + if v := cfg.TraceBuffer; v > 0 { + acfg.TraceBuffer = v + } + return acfg +} + // Start implements the component.Component interface. -func (c *connectorImp) Start(_ context.Context, _ component.Host) error { +func (c *traceToMetricConnector) Start(_ context.Context, _ component.Host) error { c.logger.Info("Starting datadogconnector") c.agent.Start() - if c.metricsConsumer != nil { - go c.run() - } + go c.run() + c.isStarted = true return nil } // Shutdown implements the component.Component interface. -func (c *connectorImp) Shutdown(context.Context) error { +func (c *traceToMetricConnector) Shutdown(context.Context) error { + if !c.isStarted { + // Note: it is not necessary to manually close c.exit, c.in and c.agent.(*datadog.TraceAgent).exit channels as these are unused. + c.logger.Info("Requested shutdown, but not started, ignoring.") + return nil + } c.logger.Info("Shutting down datadog connector") + c.logger.Info("Stopping datadog agent") + // stop the agent and wait for the run loop to exit c.agent.Stop() c.exit <- struct{}{} // signal exit <-c.exit // wait for close @@ -83,21 +144,71 @@ func (c *connectorImp) Shutdown(context.Context) error { // Capabilities implements the consumer interface. // tells use whether the component(connector) will mutate the data passed into it. if set to true the connector does modify the data -func (c *connectorImp) Capabilities() consumer.Capabilities { - return consumer.Capabilities{MutatesData: true} // ConsumeTraces puts a new attribute _dd.stats_computed +func (c *traceToMetricConnector) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: false} } -func (c *connectorImp) ConsumeTraces(ctx context.Context, traces ptrace.Traces) error { - c.agent.Ingest(ctx, traces) - if c.tracesConsumer != nil { - return c.tracesConsumer.ConsumeTraces(ctx, traces) +func (c *traceToMetricConnector) addToCache(containerID string, key string) { + if tags, ok := c.containerTagCache.Get(containerID); ok { + tagList := tags.(*sync.Map) + tagList.Store(key, struct{}{}) + } else { + tagList := &sync.Map{} + tagList.Store(key, struct{}{}) + c.containerTagCache.Set(containerID, tagList, cache.DefaultExpiration) } +} + +func (c *traceToMetricConnector) populateContainerTagsCache(traces ptrace.Traces) { + for i := 0; i < traces.ResourceSpans().Len(); i++ { + rs := traces.ResourceSpans().At(i) + attrs := rs.Resource().Attributes() + + containerID, ok := attrs.Get(semconv.AttributeContainerID) + if !ok { + continue + } + ddContainerTags := attributes.ContainerTagsFromResourceAttributes(attrs) + for attr := range c.enrichedTags { + if val, ok := ddContainerTags[attr]; ok { + key := fmt.Sprintf("%s:%s", attr, val) + c.addToCache(containerID.AsString(), key) + } else if incomingVal, ok := attrs.Get(attr); ok { + key := fmt.Sprintf("%s:%s", attr, incomingVal.Str()) + c.addToCache(containerID.AsString(), key) + } + } + } +} + +func (c *traceToMetricConnector) ConsumeTraces(ctx context.Context, traces ptrace.Traces) error { + c.populateContainerTagsCache(traces) + c.agent.Ingest(ctx, traces) return nil } +func (c *traceToMetricConnector) enrichStatsPayload(stats *pb.StatsPayload) { + for _, stat := range stats.Stats { + if stat.ContainerID != "" { + if tags, ok := c.containerTagCache.Get(stat.ContainerID); ok { + + tagList := tags.(*sync.Map) + for _, tag := range stat.Tags { + tagList.Store(tag, struct{}{}) + } + stat.Tags = make([]string, 0) + tagList.Range(func(key, _ any) bool { + stat.Tags = append(stat.Tags, key.(string)) + return true + }) + } + } + } +} + // run awaits incoming stats resulting from the agent's ingestion, converts them // to metrics and flushes them using the configured metrics exporter. -func (c *connectorImp) run() { +func (c *traceToMetricConnector) run() { defer close(c.exit) for { select { @@ -105,8 +216,21 @@ func (c *connectorImp) run() { if len(stats.Stats) == 0 { continue } + var mx pmetric.Metrics + var err error + // Enrich the stats with container tags + if len(c.enrichedTags) > 0 { + c.enrichStatsPayload(stats) + } + + c.logger.Debug("Received stats payload", zap.Any("stats", stats)) + + mx, err = c.translator.StatsToMetrics(stats) + if err != nil { + c.logger.Error("Failed to convert stats to metrics", zap.Error(err)) + continue + } // APM stats as metrics - mx := c.translator.StatsPayloadToMetrics(stats) ctx := context.TODO() // send metrics to the consumer or next component in pipeline diff --git a/connector/datadogconnector/connector_test.go b/connector/datadogconnector/connector_test.go index d5410720be71..4fb76843df72 100644 --- a/connector/datadogconnector/connector_test.go +++ b/connector/datadogconnector/connector_test.go @@ -5,19 +5,30 @@ package datadogconnector import ( "context" + "sync" "testing" + "time" + pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" + "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes" + otlpmetrics "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics" "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/connector/connectortest" "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/ptrace" + semconv "go.opentelemetry.io/collector/semconv/v1.5.0" + "go.uber.org/zap" + "google.golang.org/protobuf/proto" ) -var _ component.Component = (*connectorImp)(nil) // testing that the connectorImp properly implements the type Component interface +var _ component.Component = (*traceToMetricConnector)(nil) // testing that the connectorImp properly implements the type Component interface // create test to create a connector, check that basic code compiles func TestNewConnector(t *testing.T) { - factory := NewFactory() creationParams := connectortest.NewNopCreateSettings() @@ -26,12 +37,202 @@ func TestNewConnector(t *testing.T) { traceToMetricsConnector, err := factory.CreateTracesToMetrics(context.Background(), creationParams, cfg, consumertest.NewNop()) assert.NoError(t, err) - _, ok := traceToMetricsConnector.(*connectorImp) + _, ok := traceToMetricsConnector.(*traceToMetricConnector) assert.True(t, ok) // checks if the created connector implements the connectorImp struct +} + +func TestTraceToTraceConnector(t *testing.T) { + factory := NewFactory() + + creationParams := connectortest.NewNopCreateSettings() + cfg := factory.CreateDefaultConfig().(*Config) traceToTracesConnector, err := factory.CreateTracesToTraces(context.Background(), creationParams, cfg, consumertest.NewNop()) assert.NoError(t, err) - _, ok = traceToTracesConnector.(*connectorImp) + _, ok := traceToTracesConnector.(*traceToTraceConnector) assert.True(t, ok) // checks if the created connector implements the connectorImp struct } + +var ( + spanStartTimestamp = pcommon.NewTimestampFromTime(time.Date(2020, 2, 11, 20, 26, 12, 321, time.UTC)) + spanEventTimestamp = pcommon.NewTimestampFromTime(time.Date(2020, 2, 11, 20, 26, 13, 123, time.UTC)) + spanEndTimestamp = pcommon.NewTimestampFromTime(time.Date(2020, 2, 11, 20, 26, 13, 789, time.UTC)) +) + +func generateTrace() ptrace.Traces { + td := ptrace.NewTraces() + res := td.ResourceSpans().AppendEmpty().Resource() + res.Attributes().EnsureCapacity(3) + res.Attributes().PutStr("resource-attr1", "resource-attr-val1") + res.Attributes().PutStr("container.id", "my-container-id") + res.Attributes().PutStr("cloud.availability_zone", "my-zone") + res.Attributes().PutStr("cloud.region", "my-region") + // add a custom Resource attribute + res.Attributes().PutStr("az", "my-az") + + ss := td.ResourceSpans().At(0).ScopeSpans().AppendEmpty().Spans() + ss.EnsureCapacity(1) + fillSpanOne(ss.AppendEmpty()) + return td +} + +func fillSpanOne(span ptrace.Span) { + span.SetName("operationA") + span.SetStartTimestamp(spanStartTimestamp) + span.SetEndTimestamp(spanEndTimestamp) + span.SetDroppedAttributesCount(1) + span.SetTraceID([16]byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10}) + span.SetSpanID([8]byte{0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18}) + evs := span.Events() + ev0 := evs.AppendEmpty() + ev0.SetTimestamp(spanEventTimestamp) + ev0.SetName("event-with-attr") + ev0.Attributes().PutStr("span-event-attr", "span-event-attr-val") + ev0.SetDroppedAttributesCount(2) + ev1 := evs.AppendEmpty() + ev1.SetTimestamp(spanEventTimestamp) + ev1.SetName("event") + ev1.SetDroppedAttributesCount(2) + span.SetDroppedEventsCount(1) + status := span.Status() + status.SetCode(ptrace.StatusCodeError) + status.SetMessage("status-cancelled") +} + +func creteConnector(t *testing.T) (*traceToMetricConnector, *consumertest.MetricsSink) { + factory := NewFactory() + + creationParams := connectortest.NewNopCreateSettings() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.Traces.ResourceAttributesAsContainerTags = []string{semconv.AttributeCloudAvailabilityZone, semconv.AttributeCloudRegion, "az"} + + metricsSink := &consumertest.MetricsSink{} + + traceToMetricsConnector, err := factory.CreateTracesToMetrics(context.Background(), creationParams, cfg, metricsSink) + assert.NoError(t, err) + + connector, ok := traceToMetricsConnector.(*traceToMetricConnector) + require.True(t, ok) + return connector, metricsSink +} + +func TestContainerTags(t *testing.T) { + connector, metricsSink := creteConnector(t) + err := connector.Start(context.Background(), componenttest.NewNopHost()) + if err != nil { + t.Errorf("Error starting connector: %v", err) + return + } + defer func() { + _ = connector.Shutdown(context.Background()) + }() + + trace1 := generateTrace() + + err = connector.ConsumeTraces(context.Background(), trace1) + assert.NoError(t, err) + + // Send two traces to ensure unique container tags are added to the cache + trace2 := generateTrace() + err = connector.ConsumeTraces(context.Background(), trace2) + assert.NoError(t, err) + // check if the container tags are added to the cache + assert.Equal(t, 1, len(connector.containerTagCache.Items())) + count := 0 + connector.containerTagCache.Items()["my-container-id"].Object.(*sync.Map).Range(func(_, _ any) bool { + count++ + return true + }) + assert.Equal(t, 3, count) + + for { + if len(metricsSink.AllMetrics()) > 0 { + break + } + time.Sleep(100 * time.Millisecond) + } + + // check if the container tags are added to the metrics + metrics := metricsSink.AllMetrics() + assert.Equal(t, 1, len(metrics)) + + ch := make(chan []byte, 100) + tr := newTranslatorWithStatsChannel(t, zap.NewNop(), ch) + _, err = tr.MapMetrics(context.Background(), metrics[0], nil) + require.NoError(t, err) + msg := <-ch + sp := &pb.StatsPayload{} + + err = proto.Unmarshal(msg, sp) + require.NoError(t, err) + + tags := sp.Stats[0].Tags + assert.Equal(t, 3, len(tags)) + assert.ElementsMatch(t, []string{"region:my-region", "zone:my-zone", "az:my-az"}, tags) +} + +func newTranslatorWithStatsChannel(t *testing.T, logger *zap.Logger, ch chan []byte) *otlpmetrics.Translator { + options := []otlpmetrics.TranslatorOption{ + otlpmetrics.WithHistogramMode(otlpmetrics.HistogramModeDistributions), + + otlpmetrics.WithNumberMode(otlpmetrics.NumberModeCumulativeToDelta), + otlpmetrics.WithHistogramAggregations(), + otlpmetrics.WithStatsOut(ch), + } + + set := componenttest.NewNopTelemetrySettings() + set.Logger = logger + + attributesTranslator, err := attributes.NewTranslator(set) + require.NoError(t, err) + tr, err := otlpmetrics.NewTranslator( + set, + attributesTranslator, + options..., + ) + + require.NoError(t, err) + return tr +} + +func TestDataRace(t *testing.T) { + connector, _ := creteConnector(t) + trace1 := generateTrace() + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + var wg sync.WaitGroup + wg.Add(1) + go func() { + defer wg.Done() + for { + select { + case <-ctx.Done(): + return + default: + connector.populateContainerTagsCache(trace1) + } + } + }() + + wg.Add(1) + go func() { + defer wg.Done() + for { + select { + case <-ctx.Done(): + return + default: + sp := &pb.StatsPayload{ + Stats: []*pb.ClientStatsPayload{ + { + ContainerID: "my-container-id", + }, + }, + } + connector.enrichStatsPayload(sp) + } + } + }() + wg.Wait() +} diff --git a/connector/datadogconnector/example_test.go b/connector/datadogconnector/example_test.go new file mode 100644 index 000000000000..13ef46e716f0 --- /dev/null +++ b/connector/datadogconnector/example_test.go @@ -0,0 +1,66 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package datadogconnector + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/debugexporter" + "go.opentelemetry.io/collector/otelcol" + "go.opentelemetry.io/collector/otelcol/otelcoltest" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/batchprocessor" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/otlpreceiver" + + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor" +) + +func TestExamples(t *testing.T) { + t.Setenv("DD_API_KEY", "testvalue") + factories := newTestComponents(t) + const configFile = "./examples/config.yaml" + _, err := otelcoltest.LoadConfigAndValidate(configFile, factories) + require.NoError(t, err, "All yaml config must validate. Please ensure that all necessary component factories are added in newTestComponents()") +} + +// newTestComponents returns the minimum amount of components necessary for +// running a collector with any of the examples/* yaml configuration files. +func newTestComponents(t *testing.T) otelcol.Factories { + var ( + factories otelcol.Factories + err error + ) + factories.Receivers, err = receiver.MakeFactoryMap( + []receiver.Factory{ + otlpreceiver.NewFactory(), + }..., + ) + require.NoError(t, err) + factories.Processors, err = processor.MakeFactoryMap( + []processor.Factory{ + batchprocessor.NewFactory(), + tailsamplingprocessor.NewFactory(), + }..., + ) + require.NoError(t, err) + factories.Connectors, err = connector.MakeFactoryMap( + []connector.Factory{ + NewFactory(), + }..., + ) + require.NoError(t, err) + factories.Exporters, err = exporter.MakeFactoryMap( + []exporter.Factory{ + datadogexporter.NewFactory(), + debugexporter.NewFactory(), + }..., + ) + require.NoError(t, err) + return factories +} diff --git a/connector/datadogconnector/examples/config.yaml b/connector/datadogconnector/examples/config.yaml new file mode 100644 index 000000000000..5d6f03374b67 --- /dev/null +++ b/connector/datadogconnector/examples/config.yaml @@ -0,0 +1,93 @@ +receivers: + otlp: + protocols: + http: + endpoint: "localhost:4318" + grpc: + endpoint: "localhost:4317" +processors: + batch: + send_batch_size: 10 + timeout: 5s + tail_sampling: + decision_wait: 1s + policies: [{name: sample_flag, type: boolean_attribute, boolean_attribute: {key: sampled, value: true}}] +connectors: + datadog/connector: + traces: + ## @param ignore_resources - list of strings - optional + ## A blacklist of regular expressions can be provided to disable certain traces based on their resource name + ## all entries must be surrounded by double quotes and separated by commas. + # + ignore_resources: ["(GET|POST) /healthcheck"] + ## @param span_name_remappings - map of key/value pairs - optional + ## A map of Datadog span operation name keys and preferred name valuues to update those names to. This can be used to + ## automatically map Datadog Span Operation Names to an updated value, and is useful when a user wants to + ## shorten or modify span names to something more user friendly in the case of instrumentation libraries with + ## particularly verbose names. + # + span_name_remappings: + io.opentelemetry.javaagent.spring.client: spring.client + instrumentation:express.server: express + go.opentelemetry.io_contrib_instrumentation_net_http_otelhttp.client: http.client + ## @param span_name_as_resource_name - use OpenTelemetry semantic convention for span naming - optional + ## Option created to maintain similarity with the OpenTelemetry semantic conventions as discussed in the issue below. + ## https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/trace/semantic_conventions + ## https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/1909 + # + span_name_as_resource_name: true + ## @param compute_stats_by_span_kind - enables APM stats computation based on `span.kind` - optional + ## If set to true, enables an additional stats computation check on spans to see they have an eligible `span.kind` (server, consumer, client, producer). + ## If enabled, a span with an eligible `span.kind` will have stats computed. If disabled, only top-level and measured spans will have stats computed. + ## NOTE: For stats computed from OTel traces, only top-level spans are considered when this option is off. + # + compute_stats_by_span_kind: true + ## @param peer_tags_aggregation - enables aggregation of peer related tags in Datadog exporter - optional + ## If set to true, enables aggregation of peer related tags (e.g., `peer.service`, `db.instance`, etc.) in Datadog exporter. + ## If disabled, aggregated trace stats will not include these tags as dimensions on trace metrics. + ## For the best experience with peer tags, Datadog also recommends enabling `compute_stats_by_span_kind`. + ## If you are using an OTel tracer, it's best to have both enabled because client/producer spans with relevant peer tags + ## may not be marked by Datadog exporter as top-level spans. + ## If enabling both causes Datadog exporter to consume too many resources, try disabling `compute_stats_by_span_kind` first. + ## A high cardinality of peer tags or APM resources can also contribute to higher CPU and memory consumption. + ## You can check for the cardinality of these fields by making trace search queries in the Datadog UI. + ## The default list of peer tags can be found in https://github.com/DataDog/datadog-agent/blob/main/pkg/trace/stats/concentrator.go. + # + peer_tags_aggregation: true + ## @param trace_buffer - specifies the number of outgoing trace payloads to buffer before dropping - optional + ## If unset, the default value is 1000. + ## If you start seeing log messages like `Payload in channel full. Dropped 1 payload.` in the datadog exporter, consider + ## setting a higher `trace_buffer` to avoid traces being dropped. + # + trace_buffer: 500 + ## @param peer_tags - [BETA] Optional list of supplementary peer tags that go beyond the defaults. The Datadog backend validates all tags + ## and will drop ones that are unapproved. The default set of peer tags can be found at + ## https://github.com/DataDog/datadog-agent/blob/505170c4ac8c3cbff1a61cf5f84b28d835c91058/pkg/trace/stats/concentrator.go#L55. + # + peer_tags: ["tag"] + ## @param resource_attributes_as_container_tags - enables the use of resource attributes as container tags - Optional + ## A list of resource attributes that should be used as container tags. + # + resource_attributes_as_container_tags: ["could.availability_zone", "could.region"] +exporters: + debug: + verbosity: detailed + datadog: + api: + key: ${env:DD_API_KEY} + traces: + trace_buffer: 100 +service: + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [datadog/connector] + traces/2: # this pipeline uses sampling + receivers: [datadog/connector] + processors: [tail_sampling, batch] + exporters: [datadog, debug] + metrics: + receivers: [datadog/connector] + processors: [batch] + exporters: [datadog, debug] diff --git a/connector/datadogconnector/factory.go b/connector/datadogconnector/factory.go index 5d1d6673426c..bd7f2b7c04c2 100644 --- a/connector/datadogconnector/factory.go +++ b/connector/datadogconnector/factory.go @@ -8,11 +8,13 @@ package datadogconnector // import "github.com/open-telemetry/opentelemetry-coll import ( "context" + "github.com/DataDog/datadog-agent/pkg/trace/timing" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/consumer" "github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog" ) // NewFactory creates a factory for tailtracer connector. @@ -25,28 +27,27 @@ func NewFactory() connector.Factory { connector.WithTracesToTraces(createTracesToTracesConnector, metadata.TracesToTracesStability)) } -var _ component.Config = (*Config)(nil) - -type Config struct{} - func createDefaultConfig() component.Config { - return &Config{} + return &Config{ + Traces: TracesConfig{ + IgnoreResources: []string{}, + TraceBuffer: 1000, + }, + } } // defines the consumer type of the connector // we want to consume traces and export metrics therefore define nextConsumer as metrics, consumer is the next component in the pipeline func createTracesToMetricsConnector(_ context.Context, params connector.CreateSettings, cfg component.Config, nextConsumer consumer.Metrics) (connector.Traces, error) { - c, err := newConnector(params.Logger, cfg, nextConsumer, nil) + metricsClient := datadog.InitializeMetricClient(params.MeterProvider, datadog.ConnectorSourceTag) + timingReporter := timing.New(metricsClient) + c, err := newTraceToMetricConnector(params.TelemetrySettings, cfg, nextConsumer, metricsClient, timingReporter) if err != nil { return nil, err } return c, nil } -func createTracesToTracesConnector(_ context.Context, params connector.CreateSettings, cfg component.Config, nextConsumer consumer.Traces) (connector.Traces, error) { - c, err := newConnector(params.Logger, cfg, nil, nextConsumer) - if err != nil { - return nil, err - } - return c, nil +func createTracesToTracesConnector(_ context.Context, params connector.CreateSettings, _ component.Config, nextConsumer consumer.Traces) (connector.Traces, error) { + return newTraceToTraceConnector(params.Logger, nextConsumer), nil } diff --git a/connector/datadogconnector/factory_test.go b/connector/datadogconnector/factory_test.go new file mode 100644 index 000000000000..8dc505d731bd --- /dev/null +++ b/connector/datadogconnector/factory_test.go @@ -0,0 +1,27 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package datadogconnector + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/component/componenttest" +) + +func TestCreateDefaultConfig(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + + assert.Equal(t, + &Config{ + Traces: TracesConfig{ + IgnoreResources: []string{}, + TraceBuffer: 1000, + }, + }, + cfg, "failed to create default config") + + assert.NoError(t, componenttest.CheckConfigStruct(cfg)) +} diff --git a/connector/datadogconnector/generated_component_test.go b/connector/datadogconnector/generated_component_test.go new file mode 100644 index 000000000000..bf777c39bb36 --- /dev/null +++ b/connector/datadogconnector/generated_component_test.go @@ -0,0 +1,68 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package datadogconnector + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/collector/consumer/consumertest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "traces_to_metrics", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesToMetrics(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "traces_to_traces", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesToTraces(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(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + firstConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstConnector.Start(context.Background(), host)) + require.NoError(t, firstConnector.Shutdown(context.Background())) + secondConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondConnector.Start(context.Background(), host)) + require.NoError(t, secondConnector.Shutdown(context.Background())) + }) + } +} diff --git a/connector/datadogconnector/go.mod b/connector/datadogconnector/go.mod index 9c288c261fd0..8af2a7014262 100644 --- a/connector/datadogconnector/go.mod +++ b/connector/datadogconnector/go.mod @@ -1,94 +1,273 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector -go 1.20 +go 1.21 require ( - github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/connector v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae + github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae + github.com/DataDog/datadog-go/v5 v5.5.0 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.98.0 + github.com/patrickmn/go-cache v2.1.0+incompatible + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/connector v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 + go.opentelemetry.io/collector/otelcol v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 + go.opentelemetry.io/collector/receiver v0.98.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/zap v1.27.0 + google.golang.org/protobuf v1.33.0 ) require ( - github.com/DataDog/datadog-agent/pkg/obfuscate v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231030140030-aa8a206e6ac7 // indirect - github.com/DataDog/datadog-agent/pkg/util/cgroups v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-go/v5 v5.1.1 // indirect + cloud.google.com/go/compute v1.24.0 // indirect + cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect + github.com/DataDog/agent-payload/v5 v5.0.111 // indirect + github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-api-client-go/v2 v2.24.0 // indirect + github.com/DataDog/go-sqllexer v0.0.9 // indirect github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 // indirect - github.com/DataDog/sketches-go v1.4.3 // indirect + github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.4 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4 // 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.22.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20240415183253-230331014d2c // indirect + github.com/aws/aws-sdk-go v1.51.17 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff v2.2.1+incompatible // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect - github.com/containerd/cgroups/v3 v3.0.2 // indirect + github.com/containerd/cgroups/v3 v3.0.3 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // 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/go-ole/go-ole v1.2.6 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.20.4 // indirect + github.com/go-openapi/swag v0.22.9 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gobwas/glob v0.2.3 // indirect + github.com/goccy/go-json v0.10.2 // indirect github.com/godbus/dbus/v5 v5.0.6 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect + github.com/imdario/mergo v0.3.16 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/karrick/godirwalk v1.17.0 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.98.0 // indirect github.com/opencontainers/runtime-spec v1.1.0-rc.3 // indirect + github.com/openshift/api v3.9.0+incompatible // indirect + github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect github.com/outcaste-io/ristretto v0.2.1 // indirect - github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/philhofer/fwd v1.1.2 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.52.2 // indirect + github.com/prometheus/procfs v0.13.0 // indirect + github.com/rs/cors v1.10.1 // indirect github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // 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/stretchr/objx v0.5.2 // indirect github.com/tinylib/msgp v1.1.9 // 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.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.98.0 // indirect + go.opentelemetry.io/collector/config/confighttp v0.98.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.98.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/collector/service v0.98.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.25.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.15.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.19.0 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 // indirect + k8s.io/api v0.29.3 // indirect + k8s.io/apimachinery v0.29.3 // indirect + k8s.io/client-go v0.29.3 // indirect + k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog => ../../internal/datadog + +replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor => ../../processor/tailsamplingprocessor + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders => ../../internal/metadataproviders + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig => ../../internal/k8sconfig + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker => ../../internal/docker + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../internal/k8stest + +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry => ../../pkg/resourcetotelemetry + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter => ../../internal/filter + +replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver => ../../receiver/prometheusreceiver + +replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver => ../../receiver/hostmetricsreceiver + +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter => ../../exporter/prometheusremotewriteexporter + +replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver => ../../receiver/filelogreceiver + +replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver => ../../receiver/dockerstatsreceiver + +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 + +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza => ../../pkg/stanza + +replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor => ../../processor/resourcedetectionprocessor + +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl => ../../pkg/ottl + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal + +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter => ../../exporter/datadogexporter + +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus => ../../pkg/translator/prometheus + +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite => ../../pkg/translator/prometheusremotewrite + +replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor => ../../processor/probabilisticsamplerprocessor + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => ../../internal/common + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil => ../../internal/aws/ecsutil + +replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor => ../../processor/k8sattributesprocessor + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage => ../../extension/storage + +replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20180801171038-322a19404e37 + +replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor => ../../processor/transformprocessor diff --git a/connector/datadogconnector/go.sum b/connector/datadogconnector/go.sum index 992b7955e5c3..b83849dff1e1 100644 --- a/connector/datadogconnector/go.sum +++ b/connector/datadogconnector/go.sum @@ -1,118 +1,501 @@ -github.com/DataDog/datadog-agent/pkg/obfuscate v0.49.0-rc.2 h1:Y56sdsJotnJmxTzyHvADM2/0VpWzonQrSAeIjHCqk+s= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.49.0-rc.2/go.mod h1:HzySONXnAgSmIQfL6gOv9hWprKJkx8CicuXuUbmgWfo= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel h1:lGJKaJlKDbycF6jItLw8ONN8GX3dkN6S+95AvDfGF+s= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel/go.mod h1:A4qG1PwNPYcM391xyksJ47ZZjknSAQVvNdXAXsrR+N0= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.49.0-rc.2 h1:MXrLVVauNLDQnJ0TTY35L1rtKv7YnNU3zl8wtE5sI9g= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.49.0-rc.2/go.mod h1:Vc+snp0Bey4MrrJyiV2tVxxJb6BmLomPvN1RgAvjGaQ= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231030140030-aa8a206e6ac7 h1:ciOBHpTSHrFy/xn/+ana53F3cvPdhR3JGuoHeGa6r+4= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231030140030-aa8a206e6ac7/go.mod h1:x6SswkmUaSmjAhSPUeVixs/Czr0w9Y5324Anoa6V+xE= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.49.0-rc.2 h1:X3nPQuiTkBVWaBGLb9oEycHhSzMJsgRcb3VNoxlGyYM= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.49.0-rc.2/go.mod h1:hVKZ+BweMQiL/dOCPvSPH/66vDSd3A3IeWQPuExkZw0= -github.com/DataDog/datadog-agent/pkg/util/log v0.49.0-rc.2 h1:64AGy6AuNW/7uW+ix55S1iFqadpzLDHYk5LtbHCeSJc= -github.com/DataDog/datadog-agent/pkg/util/log v0.49.0-rc.2/go.mod h1:RvGVny6LcLD0F9/N5OnxPoXKE8GwFtAKCD/viDv0Jw8= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.49.0-rc.2 h1:Z4PwDkI/ML5spAbG1aXbPkWiJ4T4XD2pQqKgfSy/rb8= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.49.0-rc.2/go.mod h1:eTXti9mx7qhkoi+Qg3mMmvVY5McghUUgsf4Hrk9zY8k= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.49.0-rc.2 h1:SQ6pGb8ppcTnCKoTuaCfZpAhMlTWhEqdIQiVL1Jgpnk= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.49.0-rc.2/go.mod h1:EOGgNrSPskIxY3+KgCl+yEggMjrGqrA2oL5va+/p2jM= -github.com/DataDog/datadog-go/v5 v5.1.1 h1:JLZ6s2K1pG2h9GkvEvMdEGqMDyVLEAccdX5TltWcLMU= -github.com/DataDog/datadog-go/v5 v5.1.1/go.mod h1:KhiYb2Badlv9/rofz+OznKoEF5XKTonWyhx5K83AP8E= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= +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= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 h1:n1DH8TPV4qqPTje2RcUBYwtrTWlabVp4n46+74X2pn4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0/go.mod h1:HDcZnuGbiyppErN6lB+idp4CKhjbc8gwjto6OPpyggM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 h1:MxA59PGoCFb+vCwRQi3PhQEwHj4+r2dhuv9HG+vM7iM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0/go.mod h1:uYt4CfhkJA9o0FN7jfE5minm/i4nUE4MjGUJkzB6Zs8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 h1:bXwSugBiSbgtz7rOtbfGf+woewp4f06orW9OP5BjHLA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0/go.mod h1:Y/HgrePTmGy9HjdSGTqZNa+apUpTVIEVKXJyARP2lrk= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Code-Hex/go-generics-cache v1.3.1 h1:i8rLwyhoyhaerr7JpjtYjJZUcCbWOdiYO3fZXLiEC4g= +github.com/Code-Hex/go-generics-cache v1.3.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= +github.com/DataDog/agent-payload/v5 v5.0.111 h1:mM+4OBkXF9tjKV0VjwnNO5As9aKcNAEsagvKDSBaTyc= +github.com/DataDog/agent-payload/v5 v5.0.111/go.mod h1:COngtbYYCncpIPiE5D93QlXDH/3VAKk10jDNwGHcMRE= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae h1:aVo1Uh2WQ8TvgbjqlbDvfP5AcUtnqXUUrc9pVP8MvKc= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:AVPQWekk3h9AOC7+plBlNB68Sy6UIGFoMMVUDeSoNoI= +github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae h1:b6lU79trCyadhkxhb51jXiqmZaHs1Z0fwWlWKFVCqJ4= +github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:s6zD4ZvPBta68SBCsCnnbn3VJzoQk5wNd0VJOpB84Ug= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae h1:/vfuF60+5qeGM62IDG1F6Asfa1VGAohiQVivRo9TWoo= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:JhAilx32dkIgoDkFXquCTfaWDsAOfe+vfBaxbiZoPI0= +github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae h1:B1E9jVLpw+Hrcv9ggzCridX3YMeUmZBE3zHghdwfTSc= +github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:1FTu8gSg8Pd8DVgRfxlcPN4F+d8K7A3lbMCT84FX44Y= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae h1:GL9JPEUyKDH2brURt09llrqWBmExCuqbHeWucezZ6sY= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:OnkC+HYj+NU9dmowWVtFpmnA4wVVibejbzID7TNm7jA= +github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae h1:sUEteYos3JjJJB1+A9inYJ3uzM18t9cygjSs0cik8x4= +github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:z4lpju3fhDa8JcbXxU0Bc6A6ci8xoQMuxDXbBdf4gHw= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae h1:qveAzof7ZZXvm93FL7h5mRM8B4q9w14g2fx6wcZt88k= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:HgJEYNmnFTKIuBhWxYe1coqmzoJXMxQTfK+4wIG5G1Q= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae h1:YZz6I8ym9P4MLytAdAJlafF3tgItgAGZrDqe4otbVUk= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:EVETfdJCkqy0YEvSpQd9LZdcYQ7vrUomCm+bQ6h3lc4= +github.com/DataDog/datadog-api-client-go/v2 v2.24.0 h1:7G+eyezFM8gHq5dOHcrQcGVxrXnwPqX2yYHxsLiq3iM= +github.com/DataDog/datadog-api-client-go/v2 v2.24.0/go.mod h1:QKOu6vscsh87fMY1lHfLEmNSunyXImj8BUaUWJXOehc= +github.com/DataDog/datadog-go/v5 v5.5.0 h1:G5KHeB8pWBNXT4Jtw0zAkhdxEAWSpWH00geHI6LDrKU= +github.com/DataDog/datadog-go/v5 v5.5.0/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= +github.com/DataDog/go-sqllexer v0.0.9 h1:Cx2Cu1S0hfj4coCCA8hzjM9+UNFRkcu1avIV//RU5Qw= +github.com/DataDog/go-sqllexer v0.0.9/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.8.1 h1:0GyngySyxePf1RozAdm8p51uxT/kDsxqhzWPZGNrqVg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 h1:ly/egks++IqejMVPcp0OWV1fcL+Nsq4EHF48AAQPKu4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1/go.mod h1:8jOAAH5PrNN6zICpu65M7mNPAeOQsW5Wk/sq80txutA= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 h1:TbZDzUrW8iahevDY5Xw+j1EfrX8XZdeg/M6UYBl9mxg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1/go.mod h1:nVIKiAwP/Zd8IFxeHhEAiirJRH1kOOoZ315HQeSEkng= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 h1:4cyzwoXrnjElTIlsFbpyXQkAJs3+6ly9HExOu9lrup4= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1/go.mod h1:3AEt8/uCtbpzjPOPPxIBDcR1qcUq2hBbrkrdE/qNfb0= -github.com/DataDog/sketches-go v1.4.3 h1:ZB9nijteJRFUQixkQfatCqASartGNfiolIlMiEv3u/w= -github.com/DataDog/sketches-go v1.4.3/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= +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.4 h1:PTIZJAsfnr2XLB3V3duL+mSbZvYV8G3XQ9e57KyOuOA= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.4/go.mod h1:5yS6i90MEZS3NG+o7PrQQ8i7OaEMzwQvn4bCZ9h9Rao= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.4 h1:B2R7Wh791uphpltmorbvvdKk0rJOhoExwM4NnE7hXTg= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.4/go.mod h1:Tk2wwdBgWeSvDPtrGGyym8CdVWSuphiToGc/tRvFoNQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0 h1:10TPqpTlIkmDPFWVIEZ4ZX3rWrCrx3rEoeoAooZr6LM= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0/go.mod h1:dvIWN9pA2zWNTw5rhDWZgzZnhcfpH++d+8d1SWW6xkY= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4 h1:dU9oPMbAr/wYMNdzhu0pxIhAJOn1Btj1T3ZSyY6RvY0= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4/go.mod h1:ud/Xr5TWUopcaGHdkh9RN8lhnCAFa95X16Rb5mrkE18= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4 h1:ZuYc5Ql/GSyAEMgpKkbQiHOtIHkEpYujITW1wIVFgLE= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4/go.mod h1:YSntkplFoUM1mepnPeJFsoblqD0Wdi+Avg1/d1upgZQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4 h1:t/Zh8ztLDBOMRMiuVNFthWMMG5F4POgc5M6+Y3DTX9g= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4/go.mod h1:JfdBBDreQfbIN5FYrAtZV3VmQMXnf9o4tMbaMxWqe40= +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= +github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0 h1:PWcDbDjrcT/ZHLn4Bc/FuglaZZVPP8bWO/YRmJBbe38= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0/go.mod h1:XEK/YHYsi+Wk2Bk1+zi/he+gjRfDWtoIZEZwuwcYjhk= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Showmax/go-fqdn v1.0.0 h1:0rG5IbmVliNT5O19Mfuvna9LL7zlHyRfsSvBPZmF9tM= +github.com/Showmax/go-fqdn v1.0.0/go.mod h1:SfrFBzmDCtCGrnHhoDjuvFnKsWjEQX/Q9ARZvOrJAko= +github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20240415183253-230331014d2c h1:K03a1ym9+/iY//g1TuNWPn6Udc5W7UzwLXtSTAAkM4M= +github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20240415183253-230331014d2c/go.mod h1:t/hYoRTnlPuRjh8y0BwVGgNvNIXpU2QJME5YVppUUHQ= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +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/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= +github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cihub/seelog v0.0.0-20151216151435-d2c6e5aa9fbf/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1c8PVE1PubbNx3mjUr09OqWGCs= github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= -github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0= -github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE= +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-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= +github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= +github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= +github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/digitalocean/godo v1.109.0 h1:4W97RJLJSUQ3veRZDNbp1Ol3Rbn6Lmt9bKGvfqYI5SU= +github.com/digitalocean/godo v1.109.0/go.mod h1:R6EmmWI8CT1+fCtjWY9UCB+L5uufuZH13wk3YhxycCs= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI= +github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/expr-lang/expr v1.16.3 h1:NLldf786GffptcXNxxJx5dQ+FzeWDKChBDqOOwyK8to= +github.com/expr-lang/expr v1.16.3/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +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-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.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/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= +github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= +github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= +github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= +github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= +github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +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/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= 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/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= +github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.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/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +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.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.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/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ZWj6lSlDF3F74SfKwfTCer72Q= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= +github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gophercloud/gophercloud v1.8.0 h1:TM3Jawprb2NrdOnvcHhWJalmKmAmOGgfZElM/3oBYCk= +github.com/gophercloud/gophercloud v1.8.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= +github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/hashicorp/consul/api v1.28.2 h1:mXfkRHrpHN4YY3RqL09nXU1eHKLNiuAN4kHvDQ16k/8= +github.com/hashicorp/consul/api v1.28.2/go.mod h1:KyzqzgMEya+IZPcD65YFoOVAgPpbfERu4I/tzG6/ueE= +github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= +github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= +github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= +github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= 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/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702 h1:fI1LXuBaS1d9z1kmb++Og6YD8uMRwadXorCwE+xgOFA= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702/go.mod h1:z71gkJdrkAt/Rl6C7Q79VE7AwJ5lUF+M+fzFTyIHYB0= +github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= +github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= +github.com/hetznercloud/hcloud-go/v2 v2.6.0 h1:RJOA2hHZ7rD1pScA4O1NF6qhkHyUdbbxjHgFNot8928= +github.com/hetznercloud/hcloud-go/v2 v2.6.0/go.mod h1:4J1cSE57+g0WS93IiHLV7ubTHItcp+awzeBp5bM9mfA= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 h1:2r2WiFeAwiJ/uyx1qIKnV1L4C9w/2V8ehlbJY4gjFaM= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4/go.mod h1:1yEQhaLb/cETXCqQmdh7lDjupNAReO7c83AHyK2dJ48= +github.com/ionos-cloud/sdk-go/v6 v6.1.11 h1:J/uRN4UWO3wCyGOeDdMKv8LWRzKu6UIkLEaes38Kzh8= +github.com/ionos-cloud/sdk-go/v6 v6.1.11/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +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/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/karrick/godirwalk v1.17.0 h1:b4kY7nqDdioR/6qnbHQyDvmA17u5G1cZ6J+CZXwSWoI= github.com/karrick/godirwalk v1.17.0/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= 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.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 h1:bCiVCRCs1Heq84lurVinUPy19keqGEe4jh5vtK37jcg= +github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= +github.com/leoluk/perflib_exporter v0.2.1 h1:/3/ut1k/jFt5p4ypjLZKDHDqlXAK6ERZPVWtwdI389I= +github.com/leoluk/perflib_exporter v0.2.1/go.mod h1:MinSWm88jguXFFrGsP56PtleUb4Qtm4tNRH/wXNXRTI= github.com/lightstep/go-expohisto v1.0.0 h1:UPtTS1rGdtehbbAF7o/dhkWLTDI73UifG8LbfQI7cA4= +github.com/lightstep/go-expohisto v1.0.0/go.mod h1:xDXD0++Mu2FOaItXtdDfksfgxfV0z1TMPa+e/EUd0cs= +github.com/linode/linodego v1.30.0 h1:6HJli+LX7NGu+Sne2G+ux790EkVOWOV/SR4mK3jcs6k= +github.com/linode/linodego v1.30.0/go.mod h1:/46h/XpmWi//oSA92GX2p3FIxb8HbX7grslPPQalR2o= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c h1:VtwQ41oftZwlMnOEbMWQtSEUgU64U4s+GHk7hZK+jtY= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4= +github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= +github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +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/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/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/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= 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/openshift/api v0.0.0-20180801171038-322a19404e37 h1:05irGU4HK4IauGGDbsk+ZHrm1wOzMLYjMlfaiqMrBYc= +github.com/openshift/api v0.0.0-20180801171038-322a19404e37/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= +github.com/openshift/api v0.0.0-20210521075222-e273a339932a/go.mod h1:izBmoXbUu3z5kUa4FjZhvekTsyzIWiOoaIgJiZBBMQs= +github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= +github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 h1:ZHRIMCFIJN1p9LsJt4HQ+akDrys4PrYnXzOWI5LK03I= +github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142/go.mod h1:fjS8r9mqDVsPb5td3NehsNOAWa4uiFkYEfVZioQ2gH0= github.com/outcaste-io/ristretto v0.2.1 h1:KCItuNIGJZcursqHr3ghO7fc5ddZLEHspL9UR0cQM64= github.com/outcaste-io/ristretto v0.2.1/go.mod h1:W8HywhmtlopSB1jeMg3JtdIhf+DYkLAr0VN/s4+MHac= +github.com/ovh/go-ovh v1.4.3 h1:Gs3V823zwTFpzgGLZNI6ILS4rmxZgJwJCz54Er9LwD0= +github.com/ovh/go-ovh v1.4.3/go.mod h1:AkPXVtgwB6xlKblMjRKJJmjRp+ogrE7fz2lVgcQY8SY= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -121,145 +504,548 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c h1:NRoLoZvkBTKvR5gQLgA3e0hqjkY9u1wm+iOL45VN/qI= github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= +github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= +github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= +github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= +github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e h1:UmqAuY2OyDoog8+l5FybViJE5B2r+UxVGCUwFTsY5AA= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e/go.mod h1:+0ld+ozir7zWFcHA2vVpWAKxXakIioEjPPNOqH+J3ZA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 h1:/8rfZAdFfafRXOgz+ZpMZZWZ5pYggCY9t7e/BvjaBHM= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/shirou/gopsutil/v3 v3.22.12/go.mod h1:Xd7P1kwZcp5VW52+9XsirIKd/BROzbb2wdX3Kqlz9uI= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +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 v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= 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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU= github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k= +github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= 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.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= +github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= +github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= +github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= +github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/collector v0.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/zorkian/go-datadog-api v2.30.0+incompatible h1:R4ryGocppDqZZbnNc5EDR8xGWF/z/MxzWnqTUijDQes= +github.com/zorkian/go-datadog-api v2.30.0+incompatible/go.mod h1:PkXwHX9CUQa/FpB9ZwAD45N1uhCW4MT/Wj7m36PbKss= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 h1:lRhfcLr3gK5S/zn92h3clyOPnCvvNKs1WTMbtH4UvO0= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0/go.mod h1:vNMFTWe4dF05LsodUOc84OfxdlYVp1kCMuZzb41WfAk= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 h1:x/VsGlBj+DtJCXIucwzwcxiwnwAU8a6ALK6UN8fPdKQ= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0/go.mod h1:BapTGXu7CYrQGNohbapPwTSt2Ty/k/c6Oemx9mSSiK4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 h1:SxDS+Yr8qE+ID58ELR5n0D+SUlqHKOZ72pK3YPFAelA= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0/go.mod h1:DEoB0d0k1iGt4KEABntL8AW9xYQ6E7fmgkM2/s8aXvM= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 h1:C02SPbRPvrtmZ9TvsHWpz2TvHzqY5mNyEAlDdhax/a4= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0/go.mod h1:dzZKtykJio3Rm+G+Cmr15VV3xKp0PmFuh9Q9b3c1K7A= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 h1:04zGXVQZ8D6nvoPX8AaqxWxGHNNVsGR78E+tY+2VQr8= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0/go.mod h1:+UrRiugWaQPssz4mgEgQQo640f2bDUCFlo2Xr0/5ulc= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 h1:JYpDN0OnMsu0awk0rjaYEIko9hFzzBJ6+2U5W2iVvUE= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0/go.mod h1:xrXL804nBum1PgbvmJQ4I+hyW+DU4xBGO3MKMiYFX6E= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 h1:zAFCXYzpxDh64BIVujqntlN5RE4jDahbPfJBy/Wq7D0= +go.opentelemetry.io/collector/exporter/debugexporter v0.98.0/go.mod h1:S15ELDQFoP5da3NHzXJR2I8FGUnM2C1Hp6e/OhaCtw0= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 h1:JfvsDpTwAhA9au8/4vmONRh0OBVU6n36seb41JD/mTQ= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0/go.mod h1:t1zDwy6kYp4w1JgcGHMvdGbKYHqWpK00bB1AEQ0Oqlc= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/otelcol v0.98.0 h1:sUk49Wqw+VBYeDynEA+GSeVEusFvzFW3KuF2vfDbyo0= +go.opentelemetry.io/collector/otelcol v0.98.0/go.mod h1:dW3UzuaiaNTddjKajk3Tp2Y7muDvYJdQz2yGUOE53gs= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 h1:iM4fMLGig3GKmz5XNtOPKDsnCnvbi0+UHYaWsx/aSRc= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0/go.mod h1:ROnuUkZJgpKEIDf3AIVjgRGNI7KPqCKPXsw8whL6Hzs= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0 h1:1jjiC3POfIluGLVM+6y8nolKEI95/vlHAvDmIOatags= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0/go.mod h1:VQDDrhQbIoelGF+fKzy6vCQM3hWDCH2YFaZKqgTDmGk= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 h1:j7lfLwc5o1dtXIPXU8LjmxadejmJVRHN57ZYGH33Wq4= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0/go.mod h1:uWDBDxaWuzF1U5S2UIhstO0+Q8aUiwiUu8uO1IYN2XQ= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/collector/service v0.98.0 h1:lLJ7VXPXcV62fSISh4GuNd5ti6WvKje76NSgezc3ydo= +go.opentelemetry.io/collector/service v0.98.0/go.mod h1:wB7ozvZTHtMefb5KTYy5nyrVYWpGk8teq8jWFs4blIU= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0 h1:QU8UEKyPqgr/8vCC9LlDmkPnfFmiWAUF9GtJdcLz+BU= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0/go.mod h1:qonC7wyvtX1E6cEpAR+bJmhcGr6IVRGc/f6ZTpvi7jA= +go.opentelemetry.io/contrib/zpages v0.50.0 h1:hKC5asr83xDN4ErwSHVdk3gv053pZiF8SZKmS86IPEw= +go.opentelemetry.io/contrib/zpages v0.50.0/go.mod h1:8WovRn95fZdaX/dr3e4h7D8IqiVsnZ+WxY0Yn4LyU3k= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0 h1:0o/9KwAgxjK+3pMV0pwIF5toYHqDsPmQhfrBvKaG6mU= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0/go.mod h1:rZyTdpmRqoV+PpUn6QlruxJp/kE4765rPy0pP6mRDk8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 h1:hDKnobznDpcdTlNzO0S/owRB8tyVr1OoeZZhDoqY+Cs= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0/go.mod h1:kUDQaUs1h8iTIHbQTk+iJRiUvSfJYMMKTtMCaiVu7B0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 h1:Wc4hZuYXhVqq+TfRXLXlmNIL/awOanGx8ssq3ciDQxc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0/go.mod h1:BydOvapRqVEc0DVz27qWBX2jq45Ca5TI9mhZBDIdweY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 h1:vOL89uRfOCCNIjkisd0r7SEdJF3ZJFyCNY34fdZs8eU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0/go.mod h1:8GlBGcDk8KKi7n+2S4BT/CPZQYH3erLu0/k64r1MYgo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 h1:d7nHbdzU84STOiszaOxQ3kw5IwkSmHsU5Muol5/vL4I= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0/go.mod h1:yiPA1iZbb/EHYnODXOxvtKuB0I2hV8ehfLTEWpl7BJU= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 h1:0vZZdECYzhTt9MKQZ5qQ0V+J3MFu4MQaQ3COfugF+FQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0/go.mod h1:e7iXx3HjaSSBXfy9ykVUlupS2Vp7LBIBuT21ousM2Hk= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/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/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -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/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +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-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-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-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= 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/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= 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/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.168.0 h1:MBRe+Ki4mMN93jhDDbpuRLjRddooArz4FeSObvUMmjY= +google.golang.org/api v0.168.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= +google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +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.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/apimachinery v0.25.5 h1:SQomYHvv+aO43qdu3QKRf9YuI0oI8w3RrOQ1qPbAUGY= +gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 h1:umQdVO0Ytx+kYadhuJNjFtDgIsIEBnKrOTvNuu8ClKI= +gopkg.in/zorkian/go-datadog-api.v2 v2.30.0/go.mod h1:kx0CSMRpzEZfx/nFH62GLU4stZjparh/BRpM89t4XCQ= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= +k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= +k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= +k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/connector/datadogconnector/internal/metadata/generated_status.go b/connector/datadogconnector/internal/metadata/generated_status.go index 1e601630c741..2c540857fc70 100644 --- a/connector/datadogconnector/internal/metadata/generated_status.go +++ b/connector/datadogconnector/internal/metadata/generated_status.go @@ -4,10 +4,23 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("datadog") ) const ( - Type = "datadog" TracesToMetricsStability = component.StabilityLevelBeta TracesToTracesStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/datadog") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/datadog") +} diff --git a/connector/datadogconnector/metadata.yaml b/connector/datadogconnector/metadata.yaml index f6b1f32221ef..7feb71b52186 100644 --- a/connector/datadogconnector/metadata.yaml +++ b/connector/datadogconnector/metadata.yaml @@ -1,4 +1,5 @@ type: datadog +scope_name: otelcol/datadog status: class: connector @@ -6,4 +7,7 @@ status: beta: [traces_to_metrics, traces_to_traces] distributions: [contrib] codeowners: - active: [mx-psi, gbbr, dineshg13] + active: [mx-psi, dineshg13] + emeritus: [gbbr] + +tests: diff --git a/connector/datadogconnector/traces_connector.go b/connector/datadogconnector/traces_connector.go new file mode 100644 index 000000000000..34e57eb65d20 --- /dev/null +++ b/connector/datadogconnector/traces_connector.go @@ -0,0 +1,47 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package datadogconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.uber.org/zap" +) + +type traceToTraceConnector struct { + logger *zap.Logger + tracesConsumer consumer.Traces // the next component in the pipeline to ingest traces after connector +} + +func newTraceToTraceConnector(logger *zap.Logger, nextConsumer consumer.Traces) *traceToTraceConnector { + logger.Info("Building datadog connector for trace to trace") + return &traceToTraceConnector{ + logger: logger, + tracesConsumer: nextConsumer, + } +} + +// Start implements the component interface. +func (c *traceToTraceConnector) Start(_ context.Context, _ component.Host) error { + return nil +} + +// Shutdown implements the component interface. +func (c *traceToTraceConnector) Shutdown(_ context.Context) error { + return nil +} + +// Capabilities implements the consumer interface. +// tells use whether the component(connector) will mutate the data passed into it. if set to true the connector does modify the data +func (c *traceToTraceConnector) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: false} +} + +// ConsumeTraces implements the consumer interface. +func (c *traceToTraceConnector) ConsumeTraces(ctx context.Context, traces ptrace.Traces) error { + return c.tracesConsumer.ConsumeTraces(ctx, traces) +} diff --git a/connector/exceptionsconnector/README.md b/connector/exceptionsconnector/README.md index 1ebf392f922f..da6c0a21a6cb 100644 --- a/connector/exceptionsconnector/README.md +++ b/connector/exceptionsconnector/README.md @@ -5,17 +5,17 @@ | ------------- |-----------| | Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aconnector%2Fexceptions%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aconnector%2Fexceptions) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aconnector%2Fexceptions%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aconnector%2Fexceptions) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling), [@marctc](https://www.github.com/marctc) | -[development]: https://github.com/open-telemetry/opentelemetry-collector#development +[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib ## Supported Pipeline Types | [Exporter Pipeline Type] | [Receiver Pipeline Type] | [Stability Level] | | ------------------------ | ------------------------ | ----------------- | -| traces | metrics | [development] | -| traces | logs | [development] | +| traces | metrics | [alpha] | +| traces | logs | [alpha] | [Exporter Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#exporter-pipeline-type [Receiver Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#receiver-pipeline-type @@ -37,7 +37,7 @@ With the provided default config, each **metric** and **log** will also have the Each log will additionally have the following attributes: - Exception stacktrace -- HTTP attributes from spans starting with `http.`. +- Span attributes. If you want to filter out some attributes (like only copying HTTP attributes starting with `http.`) use the [transform processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/transformprocessor/). ## Configurations diff --git a/connector/exceptionsconnector/connector_logs.go b/connector/exceptionsconnector/connector_logs.go index 30fc8499b064..91ead84eccce 100644 --- a/connector/exceptionsconnector/connector_logs.go +++ b/connector/exceptionsconnector/connector_logs.go @@ -5,7 +5,6 @@ package exceptionsconnector // import "github.com/open-telemetry/opentelemetry-c import ( "context" - "strings" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" @@ -103,6 +102,9 @@ func (c *logsConnector) attrToLogRecord(sl plog.ScopeLogs, serviceName string, s eventAttrs := event.Attributes() spanAttrs := span.Attributes() + // Copy span attributes to the log record. + spanAttrs.CopyTo(logRecord.Attributes()) + // Add common attributes to the log record. logRecord.Attributes().PutStr(spanKindKey, traceutil.SpanKindStr(span.Kind())) logRecord.Attributes().PutStr(statusCodeKey, traceutil.StatusCodeStr(span.Status().Code())) @@ -117,26 +119,9 @@ func (c *logsConnector) attrToLogRecord(sl plog.ScopeLogs, serviceName string, s // Add stacktrace to the log record. logRecord.Attributes().PutStr(exceptionStacktraceKey, getValue(eventAttrs, exceptionStacktraceKey)) - - // Add HTTP context to the log record. - for k, v := range extractHTTP(spanAttrs) { - logRecord.Attributes().PutStr(k, v) - } return logRecord } -// extractHTTP extracts the HTTP context from span attributes. -func extractHTTP(attr pcommon.Map) map[string]string { - http := make(map[string]string) - attr.Range(func(k string, v pcommon.Value) bool { - if strings.HasPrefix(k, "http.") { - http[k] = v.Str() - } - return true - }) - return http -} - // getValue returns the value of the attribute with the given key. func getValue(attr pcommon.Map, key string) string { if attrVal, ok := attr.Get(key); ok { diff --git a/connector/exceptionsconnector/factory_test.go b/connector/exceptionsconnector/factory_test.go index 37878cf024c2..642bc93d19c9 100644 --- a/connector/exceptionsconnector/factory_test.go +++ b/connector/exceptionsconnector/factory_test.go @@ -48,7 +48,7 @@ func TestNewConnector(t *testing.T) { traceMetricsConnector, err := factory.CreateTracesToMetrics(context.Background(), creationParams, cfg, consumertest.NewNop()) smc := traceMetricsConnector.(*metricsConnector) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, smc) assert.Equal(t, tc.wantDimensions, smc.dimensions) @@ -56,7 +56,7 @@ func TestNewConnector(t *testing.T) { traceLogsConnector, err := factory.CreateTracesToLogs(context.Background(), creationParams, cfg, consumertest.NewNop()) slc := traceLogsConnector.(*logsConnector) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, slc) assert.Equal(t, tc.wantDimensions, smc.dimensions) }) diff --git a/connector/exceptionsconnector/generated_component_test.go b/connector/exceptionsconnector/generated_component_test.go new file mode 100644 index 000000000000..5e7ce302158c --- /dev/null +++ b/connector/exceptionsconnector/generated_component_test.go @@ -0,0 +1,68 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package exceptionsconnector + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/collector/consumer/consumertest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "traces_to_logs", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesToLogs(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "traces_to_metrics", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesToMetrics(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(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + firstConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstConnector.Start(context.Background(), host)) + require.NoError(t, firstConnector.Shutdown(context.Background())) + secondConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondConnector.Start(context.Background(), host)) + require.NoError(t, secondConnector.Shutdown(context.Background())) + }) + } +} diff --git a/connector/exceptionsconnector/go.mod b/connector/exceptionsconnector/go.mod index 01c2bc217b7e..1c1f8c3dd271 100644 --- a/connector/exceptionsconnector/go.mod +++ b/connector/exceptionsconnector/go.mod @@ -1,51 +1,60 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/connector v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 - google.golang.org/grpc v1.59.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/connector v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + google.golang.org/grpc v1.63.2 ) require ( - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/connector/exceptionsconnector/go.sum b/connector/exceptionsconnector/go.sum index e2ea203d6593..5002883913f9 100644 --- a/connector/exceptionsconnector/go.sum +++ b/connector/exceptionsconnector/go.sum @@ -1,20 +1,24 @@ -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/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.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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/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/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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -23,14 +27,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -40,42 +44,58 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -85,16 +105,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -107,15 +127,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/connector/exceptionsconnector/internal/metadata/generated_status.go b/connector/exceptionsconnector/internal/metadata/generated_status.go index 70e4fef83c5c..8868a61f603d 100644 --- a/connector/exceptionsconnector/internal/metadata/generated_status.go +++ b/connector/exceptionsconnector/internal/metadata/generated_status.go @@ -4,10 +4,23 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("exceptions") ) const ( - Type = "exceptions" - TracesToMetricsStability = component.StabilityLevelDevelopment - TracesToLogsStability = component.StabilityLevelDevelopment + TracesToMetricsStability = component.StabilityLevelAlpha + TracesToLogsStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/exceptions") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/exceptions") +} diff --git a/connector/exceptionsconnector/metadata.yaml b/connector/exceptionsconnector/metadata.yaml index 5bf4696c041c..9b1d65b140e7 100644 --- a/connector/exceptionsconnector/metadata.yaml +++ b/connector/exceptionsconnector/metadata.yaml @@ -1,9 +1,13 @@ type: exceptions +scope_name: otelcol/exceptions status: class: connector stability: - development: [traces_to_metrics, traces_to_logs] + alpha: [traces_to_metrics, traces_to_logs] distributions: [contrib] codeowners: - active: [jpkrohling] + active: [jpkrohling, marctc] + +tests: + config: diff --git a/connector/exceptionsconnector/package_test.go b/connector/exceptionsconnector/package_test.go new file mode 100644 index 000000000000..08df820c3e17 --- /dev/null +++ b/connector/exceptionsconnector/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exceptionsconnector + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/connector/exceptionsconnector/testdata/logs.yml b/connector/exceptionsconnector/testdata/logs.yml index b2918264516e..e79d4d969fdb 100644 --- a/connector/exceptionsconnector/testdata/logs.yml +++ b/connector/exceptionsconnector/testdata/logs.yml @@ -3,6 +3,26 @@ resourceLogs: scopeLogs: - logRecords: - attributes: + - key: stringAttrName + value: + stringValue: stringAttrValue + - key: intAttrName + value: + intValue: "99" + - key: doubleAttrName + value: + doubleValue: 99.99 + - key: boolAttrName + value: + boolValue: true + - key: nullAttrName + value: {} + - key: mapAttrName + value: + kvlistValue: {} + - key: arrayAttrName + value: + arrayValue: {} - key: span.kind value: stringValue: SPAN_KIND_SERVER @@ -27,6 +47,26 @@ resourceLogs: spanId: 2a00000000000000 traceId: 2a000000000000000000000000000000 - attributes: + - key: stringAttrName + value: + stringValue: stringAttrValue + - key: intAttrName + value: + intValue: "99" + - key: doubleAttrName + value: + doubleValue: 99.99 + - key: boolAttrName + value: + boolValue: true + - key: nullAttrName + value: {} + - key: mapAttrName + value: + kvlistValue: {} + - key: arrayAttrName + value: + arrayValue: {} - key: span.kind value: stringValue: SPAN_KIND_CLIENT @@ -55,6 +95,26 @@ resourceLogs: scopeLogs: - logRecords: - attributes: + - key: stringAttrName + value: + stringValue: stringAttrValue + - key: intAttrName + value: + intValue: "99" + - key: doubleAttrName + value: + doubleValue: 99.99 + - key: boolAttrName + value: + boolValue: true + - key: nullAttrName + value: {} + - key: mapAttrName + value: + kvlistValue: {} + - key: arrayAttrName + value: + arrayValue: {} - key: span.kind value: stringValue: SPAN_KIND_SERVER diff --git a/cmd/mdatagen/Makefile b/connector/failoverconnector/Makefile similarity index 100% rename from cmd/mdatagen/Makefile rename to connector/failoverconnector/Makefile diff --git a/connector/failoverconnector/README.md b/connector/failoverconnector/README.md new file mode 100644 index 000000000000..9694a6394f3b --- /dev/null +++ b/connector/failoverconnector/README.md @@ -0,0 +1,98 @@ +# Failover Connector + + +| Status | | +| ------------- |-----------| +| Distributions | [] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aconnector%2Ffailover%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aconnector%2Ffailover) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aconnector%2Ffailover%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aconnector%2Ffailover) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@akats7](https://www.github.com/akats7), [@djaglowski](https://www.github.com/djaglowski), [@fatsheep9146](https://www.github.com/fatsheep9146) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development + +## Supported Pipeline Types + +| [Exporter Pipeline Type] | [Receiver Pipeline Type] | [Stability Level] | +| ------------------------ | ------------------------ | ----------------- | +| metrics | metrics | [development] | +| traces | traces | [development] | +| logs | logs | [development] | + +[Exporter Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#exporter-pipeline-type +[Receiver Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#receiver-pipeline-type +[Stability Level]: https://github.com/open-telemetry/opentelemetry-collector#stability-levels + + +Allows for health based routing between trace, metric, and log pipelines depending on the health of target downstream exporters. + +## Configuration + +If you are not already familiar with connectors, you may find it helpful to first visit the [Connectors README]. + +The following settings are available: + +- `priority_levels (required)`: list of pipeline level priorities in a 1 - n configuration, multiple pipelines can sit at a single priority level. +- `retry_interval (optional)`: the frequency at which the pipeline levels will attempt to reestablish connection with all higher priority levels. Default value is 10 minutes. (See Example below for further explanation) +- `retry_gap (optional)`: the amount of time between trying two separate priority levels in a single retry_interval timeframe. Default value is 30 seconds. (See Example below for further explanation) +- `max_retries (optional)`: the maximum retries per level. Default value is 10. Set to 0 to allow unlimited retries. + +The connector intakes a list of `priority_levels` each of which can contain multiple pipelines. +If any pipeline at a stable level fails, the level is considered unhealthy and the connector will move down one priority level and route all data to the new level (assuming it is stable). + +The connector will periodically try to reestablish a stable connection with the higher priority levels. `retry_interval` will be the frequency at which the connector will try to iterate through all unhealthy higher priority levels while `retry_gap` is how long it will wait after a failed retry at one level before retrying the next level (if retry_gap is 2m, after trying to reestablish level 1, it will wait 2m before trying level 2) It will retry a maximum of one unhealthy level before returning to the current stable level.) +There is a `max_retries` config param as well that will track how many retries have occurred at each level, and once the max is hit, it will no longer retry that priority level. + +#### Configuration Example: + +```yaml +connectors: + failover: + priority_levels: + - [traces/first, traces/also_first] + - [traces/second] + - [traces/third] + retry_interval: 5m + retry_gap: 1m + max_retries: 10 + +service: + pipelines: + traces: + receivers: [otlp] + exporters: [failover] + traces/first: + receivers: [failover] + exporters: [otlp/first] + traces/second: + receivers: [failover] + exporters: [otlp/second] + traces/third: + receivers: [failover] + exporters: [otlp/third] + traces/also_first: + receivers: [failover] + exporters: [otlp/fourth] +``` + +#### Example with Explanation: + +```yaml +connectors: + failover: + priority_levels: + - [traces/first] + - [traces/second] + - [traces/third] + - [traces/fourth] + retry_interval: 5m + retry_gap: 1m + max_retries: 10 +``` + +Assume the current stable level is level 4 (traces/fourth) on the priority_level list. +At the start of the `retry_interval`, the connector will try to reestablish the pipeline on level 1 (trace/first). If it fails, the connector will return to level 4 (traces/fourth) and wait the 1m as the `retry_gap`, when that 1m passes it will now retry level 2 (traces/second) and if that fails will first return to level 4 before waiting another 1m until trying level 3. +Once it tries level 3 and it fails, it will return to level 4 and wait the 10m retry_interval again before repeating the process. If a retry is successful then the retried level becomes the stable level, and the connector will continue to retry any higher priority levels that haven't exceeded the `max_retries`. + +[Connectors README]:https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md +[Exporter Pipeline Type]:https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#exporter-pipeline-type +[Receiver Pipeline Type]:https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#receiver-pipeline-type +[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/connector/failoverconnector/config.go b/connector/failoverconnector/config.go new file mode 100644 index 000000000000..3ea82c03fe36 --- /dev/null +++ b/connector/failoverconnector/config.go @@ -0,0 +1,48 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package failoverconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector" + +import ( + "errors" + "time" + + "go.opentelemetry.io/collector/component" +) + +var ( + errNoPipelinePriority = errors.New("No pipelines are defined in the priority list") + errInvalidRetryIntervals = errors.New("Retry interval must be positive, and retry_interval must be greater than retry_gap times the length of the priority list") +) + +type Config struct { + // PipelinePriority is the list of pipeline level priorities in a 1 - n configuration, multiple pipelines can + // sit at a single priority level and will be routed in a fanout. If any pipeline at a level fails, the + // level is considered unhealthy + PipelinePriority [][]component.ID `mapstructure:"priority_levels"` + + // RetryInterval is the frequency at which the pipeline levels will attempt to recover by going over + // all levels below the current + RetryInterval time.Duration `mapstructure:"retry_interval"` + + // RetryGap is how much time will pass between trying two separate priority levels in a single RetryInterval + // If the priority list has 3 levels, the RetryInterval is 5m, and the retryGap is 1m, within the 5m RetryInterval, + // the connector will only try one level every 1m, and will return to the stable level in the interim + RetryGap time.Duration `mapstructure:"retry_gap"` + + // MaxRetry is the maximum retries per level, once this limit is hit for a level, even if the next pipeline level fails, + // it will not try to recover the level that exceeded the maximum retries + MaxRetries int `mapstructure:"max_retries"` +} + +// Validate needs to ensure RetryInterval > # elements in PriorityList * RetryGap +func (c *Config) Validate() error { + if len(c.PipelinePriority) == 0 { + return errNoPipelinePriority + } + retryTime := c.RetryGap * time.Duration(len(c.PipelinePriority)) + if c.RetryGap <= 0 || c.RetryInterval <= 0 || c.RetryInterval <= retryTime { + return errInvalidRetryIntervals + } + return nil +} diff --git a/connector/failoverconnector/config_test.go b/connector/failoverconnector/config_test.go new file mode 100644 index 000000000000..4f8a886ca0a3 --- /dev/null +++ b/connector/failoverconnector/config_test.go @@ -0,0 +1,115 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package failoverconnector + +import ( + "path/filepath" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector/internal/metadata" +) + +func TestLoadConfig(t *testing.T) { + testcases := []struct { + id component.ID + expected *Config + }{ + { + id: component.NewIDWithName(metadata.Type, "default"), + expected: &Config{ + PipelinePriority: [][]component.ID{ + { + component.NewIDWithName(component.DataTypeTraces, ""), + }, + }, + RetryInterval: 10 * time.Minute, + RetryGap: 30 * time.Second, + MaxRetries: 10, + }, + }, + { + id: component.NewIDWithName(metadata.Type, "full"), + expected: &Config{ + PipelinePriority: [][]component.ID{ + { + component.NewIDWithName(component.DataTypeTraces, "first"), + component.NewIDWithName(component.DataTypeTraces, "also_first"), + }, + { + component.NewIDWithName(component.DataTypeTraces, "second"), + }, + { + component.NewIDWithName(component.DataTypeTraces, "third"), + }, + { + component.NewIDWithName(component.DataTypeTraces, "fourth"), + }, + }, + RetryInterval: 5 * time.Minute, + RetryGap: time.Minute, + MaxRetries: 10, + }, + }, + } + + for _, tc := range testcases { + t.Run(tc.id.String(), func(t *testing.T) { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + + sub, err := cm.Sub(tc.id.String()) + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + assert.NoError(t, component.ValidateConfig(cfg)) + assert.Equal(t, tc.expected, cfg) + }) + } +} + +func TestValidateConfig(t *testing.T) { + testcases := []struct { + name string + id component.ID + err error + }{ + { + name: "no priority levels provided", + id: component.NewIDWithName(metadata.Type, ""), + err: errNoPipelinePriority, + }, + { + name: "invalid ratio of retry_gap to retry_interval", + id: component.NewIDWithName(metadata.Type, "invalid"), + err: errInvalidRetryIntervals, + }, + } + + for _, tc := range testcases { + t.Run(tc.id.String(), func(t *testing.T) { + t.Run(tc.name, func(t *testing.T) { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + + sub, err := cm.Sub(tc.id.String()) + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + assert.EqualError(t, component.ValidateConfig(cfg), tc.err.Error()) + }) + }) + } +} diff --git a/connector/failoverconnector/doc.go b/connector/failoverconnector/doc.go new file mode 100644 index 000000000000..1d7bd66015c5 --- /dev/null +++ b/connector/failoverconnector/doc.go @@ -0,0 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +package failoverconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector" diff --git a/connector/failoverconnector/factory.go b/connector/failoverconnector/factory.go new file mode 100644 index 000000000000..0ad9b4d7eecc --- /dev/null +++ b/connector/failoverconnector/factory.go @@ -0,0 +1,60 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package failoverconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector" + +import ( + "context" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/consumer" + + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector/internal/metadata" +) + +func NewFactory() connector.Factory { + return connector.NewFactory( + metadata.Type, + createDefaultConfig, + connector.WithTracesToTraces(createTracesToTraces, metadata.TracesToTracesStability), + connector.WithMetricsToMetrics(createMetricsToMetrics, metadata.MetricsToMetricsStability), + connector.WithLogsToLogs(createLogsToLogs, metadata.LogsToLogsStability), + ) +} + +func createDefaultConfig() component.Config { + return &Config{ + RetryGap: 30 * time.Second, + RetryInterval: 10 * time.Minute, + MaxRetries: 10, + } +} + +func createTracesToTraces( + _ context.Context, + set connector.CreateSettings, + cfg component.Config, + traces consumer.Traces, +) (connector.Traces, error) { + return newTracesToTraces(set, cfg, traces) +} + +func createMetricsToMetrics( + _ context.Context, + set connector.CreateSettings, + cfg component.Config, + metrics consumer.Metrics, +) (connector.Metrics, error) { + return newMetricsToMetrics(set, cfg, metrics) +} + +func createLogsToLogs( + _ context.Context, + set connector.CreateSettings, + cfg component.Config, + logs consumer.Logs, +) (connector.Logs, error) { + return newLogsToLogs(set, cfg, logs) +} diff --git a/connector/failoverconnector/factory_test.go b/connector/failoverconnector/factory_test.go new file mode 100644 index 000000000000..1990eee65329 --- /dev/null +++ b/connector/failoverconnector/factory_test.go @@ -0,0 +1,44 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package failoverconnector + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" +) + +func TestNewFactory(t *testing.T) { + traces0 := component.NewIDWithName(component.DataTypeTraces, "0") + traces1 := component.NewIDWithName(component.DataTypeTraces, "1") + traces2 := component.NewIDWithName(component.DataTypeTraces, "2") + cfg := &Config{ + PipelinePriority: [][]component.ID{{traces0, traces1}, {traces2}}, + RetryInterval: 5 * time.Minute, + RetryGap: 10 * time.Second, + MaxRetries: 5, + } + + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{ + traces0: consumertest.NewNop(), + traces1: consumertest.NewNop(), + traces2: consumertest.NewNop(), + }) + + conn, err := NewFactory().CreateTracesToTraces(context.Background(), + connectortest.NewNopCreateSettings(), cfg, router.(consumer.Traces)) + defer func() { + assert.NoError(t, conn.Shutdown(context.Background())) + }() + + assert.NoError(t, err) + assert.NotNil(t, conn) +} diff --git a/connector/failoverconnector/failover.go b/connector/failoverconnector/failover.go new file mode 100644 index 000000000000..f76341646d72 --- /dev/null +++ b/connector/failoverconnector/failover.go @@ -0,0 +1,88 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package failoverconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector" + +import ( + "errors" + "sync" + + "go.opentelemetry.io/collector/component" + + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector/internal/state" +) + +type consumerProvider[C any] func(...component.ID) (C, error) + +type failoverRouter[C any] struct { + consumerProvider consumerProvider[C] + cfg *Config + pS *state.PipelineSelector + wg *sync.WaitGroup + consumers []C + + done chan struct{} +} + +var ( + errNoValidPipeline = errors.New("All provided pipelines return errors") + errConsumer = errors.New("Error registering consumer") +) + +func newFailoverRouter[C any](provider consumerProvider[C], cfg *Config) *failoverRouter[C] { + var wg sync.WaitGroup + done := make(chan struct{}) + pSConstants := state.PSConstants{ + RetryInterval: cfg.RetryInterval, + RetryGap: cfg.RetryGap, + MaxRetries: cfg.MaxRetries, + } + + selector := state.NewPipelineSelector(len(cfg.PipelinePriority), pSConstants) + selector.Start(done, &wg) + return &failoverRouter[C]{ + consumerProvider: provider, + cfg: cfg, + pS: selector, + done: done, + wg: &wg, + } +} + +func (f *failoverRouter[C]) getCurrentConsumer() (C, chan bool, bool) { + var nilConsumer C + pl, ch := f.pS.SelectedPipeline() + if pl >= len(f.cfg.PipelinePriority) { + return nilConsumer, nil, false + } + return f.consumers[pl], ch, true +} + +func (f *failoverRouter[C]) registerConsumers() error { + consumers := make([]C, 0) + for _, pipelines := range f.cfg.PipelinePriority { + newConsumer, err := f.consumerProvider(pipelines...) + if err != nil { + return errConsumer + } + consumers = append(consumers, newConsumer) + } + f.consumers = consumers + return nil +} + +func (f *failoverRouter[C]) Shutdown() { + f.pS.RS.InvokeCancel() + + close(f.done) + f.wg.Wait() +} + +// For Testing +func (f *failoverRouter[C]) GetConsumerAtIndex(idx int) C { + return f.consumers[idx] +} + +func (f *failoverRouter[C]) ModifyConsumerAtIndex(idx int, c C) { + f.consumers[idx] = c +} diff --git a/connector/failoverconnector/failover_test.go b/connector/failoverconnector/failover_test.go new file mode 100644 index 000000000000..9afa2b2b865c --- /dev/null +++ b/connector/failoverconnector/failover_test.go @@ -0,0 +1,205 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package failoverconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector" +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" +) + +func TestFailoverRecovery(t *testing.T) { + var sinkFirst, sinkSecond, sinkThird, sinkFourth consumertest.TracesSink + tracesFirst := component.NewIDWithName(component.DataTypeTraces, "traces/first") + tracesSecond := component.NewIDWithName(component.DataTypeTraces, "traces/second") + tracesThird := component.NewIDWithName(component.DataTypeTraces, "traces/third") + tracesFourth := component.NewIDWithName(component.DataTypeTraces, "traces/fourth") + + cfg := &Config{ + PipelinePriority: [][]component.ID{{tracesFirst}, {tracesSecond}, {tracesThird}, {tracesFourth}}, + RetryInterval: 50 * time.Millisecond, + RetryGap: 10 * time.Millisecond, + MaxRetries: 10000, + } + + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{ + tracesFirst: &sinkFirst, + tracesSecond: &sinkSecond, + tracesThird: &sinkThird, + tracesFourth: &sinkFourth, + }) + + conn, err := NewFactory().CreateTracesToTraces(context.Background(), + connectortest.NewNopCreateSettings(), cfg, router.(consumer.Traces)) + + require.NoError(t, err) + + failoverConnector := conn.(*tracesFailover) + + tr := sampleTrace() + + defer func() { + assert.NoError(t, failoverConnector.Shutdown(context.Background())) + }() + + t.Run("single failover recovery to primary consumer: level 2 -> 1", func(t *testing.T) { + defer func() { + resetConsumers(failoverConnector, &sinkFirst, &sinkSecond, &sinkThird, &sinkFourth) + }() + failoverConnector.failover.ModifyConsumerAtIndex(0, consumertest.NewErr(errTracesConsumer)) + + require.NoError(t, conn.ConsumeTraces(context.Background(), tr)) + idx := failoverConnector.failover.pS.TestStableIndex() + require.Equal(t, idx, 1) + + failoverConnector.failover.ModifyConsumerAtIndex(0, &sinkFirst) + + require.Eventually(t, func() bool { + return consumeTracesAndCheckStable(failoverConnector, 0, tr) + }, 3*time.Second, 5*time.Millisecond) + }) + + t.Run("double failover recovery: level 3 -> 2 -> 1", func(t *testing.T) { + defer func() { + resetConsumers(failoverConnector, &sinkFirst, &sinkSecond, &sinkThird, &sinkFourth) + }() + failoverConnector.failover.ModifyConsumerAtIndex(0, consumertest.NewErr(errTracesConsumer)) + failoverConnector.failover.ModifyConsumerAtIndex(1, consumertest.NewErr(errTracesConsumer)) + + require.NoError(t, conn.ConsumeTraces(context.Background(), tr)) + idx := failoverConnector.failover.pS.TestStableIndex() + require.Equal(t, idx, 2) + + // Simulate recovery of exporter + failoverConnector.failover.ModifyConsumerAtIndex(1, &sinkSecond) + + require.Eventually(t, func() bool { + return consumeTracesAndCheckStable(failoverConnector, 1, tr) + }, 3*time.Second, 5*time.Millisecond) + + failoverConnector.failover.ModifyConsumerAtIndex(0, &sinkFirst) + + require.Eventually(t, func() bool { + return consumeTracesAndCheckStable(failoverConnector, 0, tr) + }, 3*time.Second, 5*time.Millisecond) + }) + + t.Run("multiple failover recovery: level 3 -> 2 -> 4 -> 3 -> 1", func(t *testing.T) { + defer func() { + resetConsumers(failoverConnector, &sinkFirst, &sinkSecond, &sinkThird, &sinkFourth) + }() + failoverConnector.failover.ModifyConsumerAtIndex(0, consumertest.NewErr(errTracesConsumer)) + failoverConnector.failover.ModifyConsumerAtIndex(1, consumertest.NewErr(errTracesConsumer)) + + require.Eventually(t, func() bool { + return consumeTracesAndCheckStable(failoverConnector, 2, tr) + }, 3*time.Second, 5*time.Millisecond) + + // Simulate recovery of exporter + failoverConnector.failover.ModifyConsumerAtIndex(1, &sinkSecond) + + require.Eventually(t, func() bool { + return consumeTracesAndCheckStable(failoverConnector, 1, tr) + }, 3*time.Second, 5*time.Millisecond) + + failoverConnector.failover.ModifyConsumerAtIndex(2, consumertest.NewErr(errTracesConsumer)) + failoverConnector.failover.ModifyConsumerAtIndex(1, consumertest.NewErr(errTracesConsumer)) + + require.Eventually(t, func() bool { + return consumeTracesAndCheckStable(failoverConnector, 3, tr) + }, 3*time.Second, 5*time.Millisecond) + + failoverConnector.failover.ModifyConsumerAtIndex(2, &sinkThird) + + require.Eventually(t, func() bool { + return consumeTracesAndCheckStable(failoverConnector, 2, tr) + }, 3*time.Second, 5*time.Millisecond) + + failoverConnector.failover.ModifyConsumerAtIndex(0, &sinkThird) + + require.Eventually(t, func() bool { + return consumeTracesAndCheckStable(failoverConnector, 0, tr) + }, 3*time.Second, 5*time.Millisecond) + }) +} + +func TestFailoverRecovery_MaxRetries(t *testing.T) { + var sinkFirst, sinkSecond, sinkThird, sinkFourth consumertest.TracesSink + tracesFirst := component.NewIDWithName(component.DataTypeTraces, "traces/first") + tracesSecond := component.NewIDWithName(component.DataTypeTraces, "traces/second") + tracesThird := component.NewIDWithName(component.DataTypeTraces, "traces/third") + tracesFourth := component.NewIDWithName(component.DataTypeTraces, "traces/fourth") + + cfg := &Config{ + PipelinePriority: [][]component.ID{{tracesFirst}, {tracesSecond}, {tracesThird}, {tracesFourth}}, + RetryInterval: 50 * time.Millisecond, + RetryGap: 10 * time.Millisecond, + MaxRetries: 10000, + } + + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{ + tracesFirst: &sinkFirst, + tracesSecond: &sinkSecond, + tracesThird: &sinkThird, + tracesFourth: &sinkFourth, + }) + + conn, err := NewFactory().CreateTracesToTraces(context.Background(), + connectortest.NewNopCreateSettings(), cfg, router.(consumer.Traces)) + + require.NoError(t, err) + + failoverConnector := conn.(*tracesFailover) + + tr := sampleTrace() + + defer func() { + assert.NoError(t, failoverConnector.Shutdown(context.Background())) + }() + + failoverConnector.failover.ModifyConsumerAtIndex(0, consumertest.NewErr(errTracesConsumer)) + failoverConnector.failover.ModifyConsumerAtIndex(1, consumertest.NewErr(errTracesConsumer)) + + require.Eventually(t, func() bool { + return consumeTracesAndCheckStable(failoverConnector, 2, tr) + }, 3*time.Second, 5*time.Millisecond) + + failoverConnector.failover.ModifyConsumerAtIndex(0, &sinkFirst) + failoverConnector.failover.ModifyConsumerAtIndex(1, &sinkSecond) + + require.Eventually(t, func() bool { + return consumeTracesAndCheckStable(failoverConnector, 0, tr) + }, 3*time.Second, 5*time.Millisecond) + + failoverConnector.failover.ModifyConsumerAtIndex(0, consumertest.NewErr(errTracesConsumer)) + failoverConnector.failover.ModifyConsumerAtIndex(1, consumertest.NewErr(errTracesConsumer)) + failoverConnector.failover.pS.SetRetryCountToMax(0) + + require.Eventually(t, func() bool { + return consumeTracesAndCheckStable(failoverConnector, 2, tr) + }, 3*time.Second, 5*time.Millisecond) + + failoverConnector.failover.ModifyConsumerAtIndex(0, &sinkFirst) + failoverConnector.failover.ModifyConsumerAtIndex(1, &sinkSecond) + + require.Eventually(t, func() bool { + return consumeTracesAndCheckStable(failoverConnector, 1, tr) + }, 3*time.Second, 5*time.Millisecond) + +} + +func resetConsumers(conn *tracesFailover, consumers ...consumer.Traces) { + for i, sink := range consumers { + + conn.failover.ModifyConsumerAtIndex(i, sink) + } + conn.failover.pS.TestSetStableIndex(0) +} diff --git a/connector/failoverconnector/go.mod b/connector/failoverconnector/go.mod new file mode 100644 index 000000000000..7fc73c67b566 --- /dev/null +++ b/connector/failoverconnector/go.mod @@ -0,0 +1,55 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector + +go 1.21 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/connector v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.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/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.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.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/connector/failoverconnector/go.sum b/connector/failoverconnector/go.sum new file mode 100644 index 000000000000..85d58c46a27b --- /dev/null +++ b/connector/failoverconnector/go.sum @@ -0,0 +1,146 @@ +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/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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/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/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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/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/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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/connector/failoverconnector/internal/metadata/generated_status.go b/connector/failoverconnector/internal/metadata/generated_status.go new file mode 100644 index 000000000000..10fdcbe7b9fb --- /dev/null +++ b/connector/failoverconnector/internal/metadata/generated_status.go @@ -0,0 +1,27 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("failover") +) + +const ( + MetricsToMetricsStability = component.StabilityLevelDevelopment + TracesToTracesStability = component.StabilityLevelDevelopment + LogsToLogsStability = component.StabilityLevelDevelopment +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/failover") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/failover") +} diff --git a/connector/failoverconnector/internal/state/pipeline_selector.go b/connector/failoverconnector/internal/state/pipeline_selector.go new file mode 100644 index 000000000000..2ccba6023e14 --- /dev/null +++ b/connector/failoverconnector/internal/state/pipeline_selector.go @@ -0,0 +1,251 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package state // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector/internal/state" + +import ( + "context" + "reflect" + "sync" + "sync/atomic" + "time" +) + +// PipelineSelector is meant to serve as the source of truth for the target priority level +type PipelineSelector struct { + currentIndex atomic.Int32 + stableIndex atomic.Int32 + pipelineRetries []atomic.Int32 + constants PSConstants + RS *RetryState + + errTryLock *TryLock + stableTryLock *TryLock + chans []chan bool +} + +func (p *PipelineSelector) handlePipelineError(idx int) { + if idx != p.loadCurrent() { + return + } + doRetry := p.indexIsStable(idx) + p.updatePipelineIndex(idx) + if !doRetry { + return + } + ctx, cancel := context.WithCancel(context.Background()) + p.RS.InvokeCancel() + p.RS.UpdateCancelFunc(cancel) + p.enableRetry(ctx) +} + +func (p *PipelineSelector) enableRetry(ctx context.Context) { + go func() { + ticker := time.NewTicker(p.constants.RetryInterval) + defer ticker.Stop() + + var cancelFunc context.CancelFunc + for p.checkContinueRetry(p.loadStable()) { + select { + case <-ticker.C: + if cancelFunc != nil { + cancelFunc() + } + cancelFunc = p.handleRetry(ctx) + case <-ctx.Done(): + return + } + } + p.RS.InvokeCancel() + }() +} + +// handleRetry is responsible for launching goroutine and returning cancelFunc +func (p *PipelineSelector) handleRetry(parentCtx context.Context) context.CancelFunc { + retryCtx, cancelFunc := context.WithCancel(parentCtx) + go p.retryHighPriorityPipelines(retryCtx, p.constants.RetryGap) + return cancelFunc +} + +// UpdatePipelineIndex is the main function that updates the pipeline indexes due to an error +func (p *PipelineSelector) updatePipelineIndex(idx int) { + if p.indexIsStable(idx) { + p.setToNextPriorityPipeline(idx) + return + } + p.setToStableIndex(idx) +} + +// NextPipeline skips through any lower priority pipelines that have exceeded their maxRetries +func (p *PipelineSelector) setToNextPriorityPipeline(idx int) { + for ok := true; ok; ok = p.exceededMaxRetries(idx) { + idx++ + } + p.stableIndex.Store(int32(idx)) + p.currentIndex.Store(int32(idx)) +} + +// RetryHighPriorityPipelines responsible for single iteration through all higher priority pipelines +func (p *PipelineSelector) retryHighPriorityPipelines(ctx context.Context, retryGap time.Duration) { + + ticker := time.NewTicker(retryGap) + + defer ticker.Stop() + + for i := 0; i < len(p.pipelineRetries); i++ { + if i > p.loadStable() { + return + } + if p.maxRetriesUsed(i) { + continue + } + select { + case <-ctx.Done(): + return + case <-ticker.C: + p.currentIndex.Store(int32(i)) + } + } +} + +// checkStopRetry checks if retry should be suspended if all higher priority levels have exceeded their max retries +func (p *PipelineSelector) checkContinueRetry(index int) bool { + for i := 0; i < index; i++ { + if p.loadRetryCount(i) < p.constants.MaxRetries { + return true + } + } + return false +} + +func (p *PipelineSelector) exceededMaxRetries(idx int) bool { + return p.constants.MaxRetries > 0 && idx < len(p.pipelineRetries) && (p.loadRetryCount(idx) >= p.constants.MaxRetries) +} + +// SetToStableIndex returns the CurrentIndex to the known Stable Index +func (p *PipelineSelector) setToStableIndex(idx int) { + p.incrementRetryCount(idx) + p.currentIndex.Store(p.stableIndex.Load()) +} + +// MaxRetriesUsed exported access to maxRetriesUsed +func (p *PipelineSelector) maxRetriesUsed(idx int) bool { + return p.loadRetryCount(idx) >= p.constants.MaxRetries +} + +// SetNewStableIndex Update stableIndex to the passed stable index +func (p *PipelineSelector) setNewStableIndex(idx int) { + p.resetRetryCount(idx) + p.stableIndex.Store(int32(idx)) +} + +// IndexIsStable returns if index passed is the stable index +func (p *PipelineSelector) indexIsStable(idx int) bool { + return p.loadStable() == idx +} + +func (p *PipelineSelector) loadStable() int { + return int(p.stableIndex.Load()) +} + +func (p *PipelineSelector) loadCurrent() int { + return int(p.currentIndex.Load()) +} + +func (p *PipelineSelector) loadRetryCount(idx int) int { + return int(p.pipelineRetries[idx].Load()) +} + +func (p *PipelineSelector) incrementRetryCount(idx int) { + p.pipelineRetries[idx].Add(1) +} + +func (p *PipelineSelector) resetRetryCount(idx int) { + p.pipelineRetries[idx].Store(0) +} + +// ReportStable reports back to the failoverRouter that the current priority was stable +func (p *PipelineSelector) reportStable(idx int) { + if p.indexIsStable(idx) { + return + } + p.setNewStableIndex(idx) +} + +func NewPipelineSelector(lenPriority int, consts PSConstants) *PipelineSelector { + chans := make([]chan bool, lenPriority) + + for i := 0; i < lenPriority; i++ { + chans[i] = make(chan bool) + } + + ps := &PipelineSelector{ + pipelineRetries: make([]atomic.Int32, lenPriority), + constants: consts, + RS: &RetryState{}, + errTryLock: NewTryLock(), + stableTryLock: NewTryLock(), + chans: chans, + } + return ps +} + +func (p *PipelineSelector) Start(done chan struct{}, wg *sync.WaitGroup) { + wg.Add(1) + go p.ListenToChannels(done, wg) +} + +func (p *PipelineSelector) ListenToChannels(done chan struct{}, wg *sync.WaitGroup) { + defer wg.Done() + cases := make([]reflect.SelectCase, len(p.chans)+1) + for i, ch := range p.chans { + cases[i] = reflect.SelectCase{Dir: reflect.SelectRecv, Chan: reflect.ValueOf(ch)} + } + cases[len(p.chans)] = reflect.SelectCase{Dir: reflect.SelectRecv, Chan: reflect.ValueOf(done)} + + for { + chosen, value, ok := reflect.Select(cases) + if !ok { + return + } + if value.Bool() { + p.stableTryLock.TryExecute(p.reportStable, chosen) + } else { + p.errTryLock.TryExecute(p.handlePipelineError, chosen) + } + } +} + +func (p *PipelineSelector) SelectedPipeline() (int, chan bool) { + idx := p.loadCurrent() + if idx < len(p.chans) { + return idx, p.chans[idx] + } + return idx, nil +} + +// For Testing +func (p *PipelineSelector) ChannelIndex(ch chan bool) int { + for i, ch1 := range p.chans { + if ch == ch1 { + return i + } + } + return -1 +} + +func (p *PipelineSelector) TestStableIndex() int { + return p.loadStable() +} + +func (p *PipelineSelector) TestSetStableIndex(idx int32) { + p.stableIndex.Store(idx) +} + +func (p *PipelineSelector) SetRetryCountToMax(idx int) { + p.pipelineRetries[idx].Store(int32(p.constants.MaxRetries)) +} + +func (p *PipelineSelector) ResetRetryCount(idx int) { + p.pipelineRetries[idx].Store(0) +} diff --git a/connector/failoverconnector/internal/state/pipeline_selector_test.go b/connector/failoverconnector/internal/state/pipeline_selector_test.go new file mode 100644 index 000000000000..eb32a458f3d3 --- /dev/null +++ b/connector/failoverconnector/internal/state/pipeline_selector_test.go @@ -0,0 +1,89 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package state + +import ( + "sync" + "testing" + "time" + + "github.com/stretchr/testify/require" +) + +func TestSelectPipeline(t *testing.T) { + constants := PSConstants{ + RetryInterval: 50 * time.Millisecond, + RetryGap: 10 * time.Millisecond, + MaxRetries: 1000, + } + pS := NewPipelineSelector(5, constants) + + idx, ch := pS.SelectedPipeline() + + require.Equal(t, idx, 0) + require.Equal(t, pS.ChannelIndex(ch), 0) +} + +func TestHandlePipelineError(t *testing.T) { + var wg sync.WaitGroup + done := make(chan struct{}) + constants := PSConstants{ + RetryInterval: 50 * time.Millisecond, + RetryGap: 10 * time.Millisecond, + MaxRetries: 1000, + } + pS := NewPipelineSelector(5, constants) + + wg.Add(1) + go pS.ListenToChannels(done, &wg) + defer func() { + close(done) + wg.Wait() + }() + + idx, ch := pS.SelectedPipeline() + require.Equal(t, idx, 0) + ch <- false + + require.Eventually(t, func() bool { + idx, _ = pS.SelectedPipeline() + return idx == 1 + }, 3*time.Minute, 5*time.Millisecond) +} + +func TestCurrentPipelineWithRetry(t *testing.T) { + var wg sync.WaitGroup + done := make(chan struct{}) + constants := PSConstants{ + RetryInterval: 50 * time.Millisecond, + RetryGap: 10 * time.Millisecond, + MaxRetries: 1000, + } + pS := NewPipelineSelector(5, constants) + + wg.Add(1) + go pS.ListenToChannels(done, &wg) + defer func() { + close(done) + wg.Wait() + }() + + _, ch := pS.SelectedPipeline() + ch <- false + + require.Eventually(t, func() bool { + idx, _ := pS.SelectedPipeline() + return idx == 0 + }, 3*time.Second, 5*time.Millisecond) + + require.Eventually(t, func() bool { + idx, _ := pS.SelectedPipeline() + return idx == 1 + }, 3*time.Second, 5*time.Millisecond) + + require.Eventually(t, func() bool { + idx, _ := pS.SelectedPipeline() + return idx == 0 + }, 3*time.Second, 5*time.Millisecond) +} diff --git a/connector/failoverconnector/internal/state/utils.go b/connector/failoverconnector/internal/state/utils.go new file mode 100644 index 000000000000..6283f544d41b --- /dev/null +++ b/connector/failoverconnector/internal/state/utils.go @@ -0,0 +1,51 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package state // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector/internal/state" + +import ( + "context" + "sync" + "time" +) + +type PSConstants struct { + RetryInterval time.Duration + RetryGap time.Duration + MaxRetries int +} + +type TryLock struct { + lock sync.Mutex +} + +func (t *TryLock) TryExecute(fn func(int), arg int) { + if t.lock.TryLock() { + defer t.lock.Unlock() + fn(arg) + } +} + +func NewTryLock() *TryLock { + return &TryLock{} +} + +// Manages cancel function for retry goroutine, ends up cleaner than using channels +type RetryState struct { + lock sync.Mutex + cancelRetry context.CancelFunc +} + +func (m *RetryState) UpdateCancelFunc(newCancelFunc context.CancelFunc) { + m.lock.Lock() + defer m.lock.Unlock() + m.cancelRetry = newCancelFunc +} + +func (m *RetryState) InvokeCancel() { + m.lock.Lock() + defer m.lock.Unlock() + if m.cancelRetry != nil { + m.cancelRetry() + } +} diff --git a/connector/failoverconnector/logs.go b/connector/failoverconnector/logs.go new file mode 100644 index 000000000000..540e10ff6175 --- /dev/null +++ b/connector/failoverconnector/logs.go @@ -0,0 +1,83 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package failoverconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector" + +import ( + "context" + "errors" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/plog" + "go.uber.org/zap" +) + +type logsFailover struct { + component.StartFunc + component.ShutdownFunc + + config *Config + failover *failoverRouter[consumer.Logs] + logger *zap.Logger +} + +func (f *logsFailover) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: false} +} + +// ConsumeLogs will try to export to the current set priority level and handle failover in the case of an error +func (f *logsFailover) ConsumeLogs(ctx context.Context, ld plog.Logs) error { + tc, ch, ok := f.failover.getCurrentConsumer() + if !ok { + return errNoValidPipeline + } + err := tc.ConsumeLogs(ctx, ld) + if err == nil { + ch <- true + return nil + } + return f.FailoverLogs(ctx, ld) +} + +// FailoverLogs is the function responsible for handling errors returned by the nextConsumer +func (f *logsFailover) FailoverLogs(ctx context.Context, ld plog.Logs) error { + for tc, ch, ok := f.failover.getCurrentConsumer(); ok; tc, ch, ok = f.failover.getCurrentConsumer() { + err := tc.ConsumeLogs(ctx, ld) + if err != nil { + ch <- false + continue + } + ch <- true + return nil + } + f.logger.Error("All provided pipelines return errors, dropping data") + return errNoValidPipeline +} + +func (f *logsFailover) Shutdown(_ context.Context) error { + if f.failover != nil { + f.failover.Shutdown() + } + return nil +} + +func newLogsToLogs(set connector.CreateSettings, cfg component.Config, logs consumer.Logs) (connector.Logs, error) { + config := cfg.(*Config) + lr, ok := logs.(connector.LogsRouterAndConsumer) + if !ok { + return nil, errors.New("consumer is not of type LogsRouter") + } + + failover := newFailoverRouter[consumer.Logs](lr.Consumer, config) + err := failover.registerConsumers() + if err != nil { + return nil, err + } + return &logsFailover{ + config: config, + failover: failover, + logger: set.TelemetrySettings.Logger, + }, nil +} diff --git a/connector/failoverconnector/logs_test.go b/connector/failoverconnector/logs_test.go new file mode 100644 index 000000000000..7039f844d2e9 --- /dev/null +++ b/connector/failoverconnector/logs_test.go @@ -0,0 +1,149 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package failoverconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector" +import ( + "context" + "errors" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/plog" +) + +var errLogsConsumer = errors.New("Error from ConsumeLogs") + +func TestLogsRegisterConsumers(t *testing.T) { + var sinkFirst, sinkSecond, sinkThird consumertest.LogsSink + logsFirst := component.NewIDWithName(component.DataTypeLogs, "logs/first") + logsSecond := component.NewIDWithName(component.DataTypeLogs, "logs/second") + logsThird := component.NewIDWithName(component.DataTypeLogs, "logs/third") + + cfg := &Config{ + PipelinePriority: [][]component.ID{{logsFirst}, {logsSecond}, {logsThird}}, + RetryInterval: 50 * time.Millisecond, + RetryGap: 10 * time.Millisecond, + MaxRetries: 10000, + } + + router := connector.NewLogsRouter(map[component.ID]consumer.Logs{ + logsFirst: &sinkFirst, + logsSecond: &sinkSecond, + logsThird: &sinkThird, + }) + + conn, err := NewFactory().CreateLogsToLogs(context.Background(), + connectortest.NewNopCreateSettings(), cfg, router.(consumer.Logs)) + + failoverConnector := conn.(*logsFailover) + defer func() { + assert.NoError(t, failoverConnector.Shutdown(context.Background())) + }() + + require.NoError(t, err) + require.NotNil(t, conn) + + lc, _, ok := failoverConnector.failover.getCurrentConsumer() + lc1 := failoverConnector.failover.GetConsumerAtIndex(1) + lc2 := failoverConnector.failover.GetConsumerAtIndex(2) + + assert.True(t, ok) + require.Implements(t, (*consumer.Logs)(nil), lc) + require.Implements(t, (*consumer.Logs)(nil), lc1) + require.Implements(t, (*consumer.Logs)(nil), lc2) +} + +func TestLogsWithValidFailover(t *testing.T) { + var sinkFirst, sinkSecond, sinkThird consumertest.LogsSink + logsFirst := component.NewIDWithName(component.DataTypeLogs, "logs/first") + logsSecond := component.NewIDWithName(component.DataTypeLogs, "logs/second") + logsThird := component.NewIDWithName(component.DataTypeLogs, "logs/third") + + cfg := &Config{ + PipelinePriority: [][]component.ID{{logsFirst}, {logsSecond}, {logsThird}}, + RetryInterval: 50 * time.Millisecond, + RetryGap: 10 * time.Millisecond, + MaxRetries: 10000, + } + + router := connector.NewLogsRouter(map[component.ID]consumer.Logs{ + logsFirst: &sinkFirst, + logsSecond: &sinkSecond, + logsThird: &sinkThird, + }) + + conn, err := NewFactory().CreateLogsToLogs(context.Background(), + connectortest.NewNopCreateSettings(), cfg, router.(consumer.Logs)) + + require.NoError(t, err) + + failoverConnector := conn.(*logsFailover) + failoverConnector.failover.ModifyConsumerAtIndex(0, consumertest.NewErr(errLogsConsumer)) + defer func() { + assert.NoError(t, failoverConnector.Shutdown(context.Background())) + }() + + ld := sampleLog() + + require.Eventually(t, func() bool { + return consumeLogsAndCheckStable(failoverConnector, 1, ld) + }, 3*time.Second, 5*time.Millisecond) +} + +func TestLogsWithFailoverError(t *testing.T) { + var sinkFirst, sinkSecond, sinkThird consumertest.LogsSink + logsFirst := component.NewIDWithName(component.DataTypeLogs, "logs/first") + logsSecond := component.NewIDWithName(component.DataTypeLogs, "logs/second") + logsThird := component.NewIDWithName(component.DataTypeLogs, "logs/third") + + cfg := &Config{ + PipelinePriority: [][]component.ID{{logsFirst}, {logsSecond}, {logsThird}}, + RetryInterval: 50 * time.Millisecond, + RetryGap: 10 * time.Millisecond, + MaxRetries: 10000, + } + + router := connector.NewLogsRouter(map[component.ID]consumer.Logs{ + logsFirst: &sinkFirst, + logsSecond: &sinkSecond, + logsThird: &sinkThird, + }) + + conn, err := NewFactory().CreateLogsToLogs(context.Background(), + connectortest.NewNopCreateSettings(), cfg, router.(consumer.Logs)) + + require.NoError(t, err) + + failoverConnector := conn.(*logsFailover) + failoverConnector.failover.ModifyConsumerAtIndex(0, consumertest.NewErr(errLogsConsumer)) + failoverConnector.failover.ModifyConsumerAtIndex(1, consumertest.NewErr(errLogsConsumer)) + failoverConnector.failover.ModifyConsumerAtIndex(2, consumertest.NewErr(errLogsConsumer)) + defer func() { + assert.NoError(t, failoverConnector.Shutdown(context.Background())) + }() + + ld := sampleLog() + + assert.EqualError(t, conn.ConsumeLogs(context.Background(), ld), "All provided pipelines return errors") +} + +func consumeLogsAndCheckStable(conn *logsFailover, idx int, lr plog.Logs) bool { + _ = conn.ConsumeLogs(context.Background(), lr) + stableIndex := conn.failover.pS.TestStableIndex() + return stableIndex == idx +} + +func sampleLog() plog.Logs { + l := plog.NewLogs() + rl := l.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("test", "logs-test") + rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + return l +} diff --git a/connector/failoverconnector/metadata.yaml b/connector/failoverconnector/metadata.yaml new file mode 100644 index 000000000000..0558c7a0c2eb --- /dev/null +++ b/connector/failoverconnector/metadata.yaml @@ -0,0 +1,14 @@ +type: failover +scope_name: otelcol/failover + +status: + class: connector + stability: + development: [metrics_to_metrics, traces_to_traces, logs_to_logs] + distributions: [] + codeowners: + active: [akats7, djaglowski, fatsheep9146] + +tests: + skip_lifecycle: true + skip_shutdown: true diff --git a/connector/failoverconnector/metrics.go b/connector/failoverconnector/metrics.go new file mode 100644 index 000000000000..0e0e42777838 --- /dev/null +++ b/connector/failoverconnector/metrics.go @@ -0,0 +1,83 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package failoverconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector" + +import ( + "context" + "errors" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.uber.org/zap" +) + +type metricsFailover struct { + component.StartFunc + component.ShutdownFunc + + config *Config + failover *failoverRouter[consumer.Metrics] + logger *zap.Logger +} + +func (f *metricsFailover) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: false} +} + +// ConsumeMetrics will try to export to the current set priority level and handle failover in the case of an error +func (f *metricsFailover) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error { + tc, ch, ok := f.failover.getCurrentConsumer() + if !ok { + return errNoValidPipeline + } + err := tc.ConsumeMetrics(ctx, md) + if err == nil { + ch <- true + return nil + } + return f.FailoverMetrics(ctx, md) +} + +// FailoverMetrics is the function responsible for handling errors returned by the nextConsumer +func (f *metricsFailover) FailoverMetrics(ctx context.Context, md pmetric.Metrics) error { + for tc, ch, ok := f.failover.getCurrentConsumer(); ok; tc, ch, ok = f.failover.getCurrentConsumer() { + err := tc.ConsumeMetrics(ctx, md) + if err != nil { + ch <- false + continue + } + ch <- true + return nil + } + f.logger.Error("All provided pipelines return errors, dropping data") + return errNoValidPipeline +} + +func (f *metricsFailover) Shutdown(_ context.Context) error { + if f.failover != nil { + f.failover.Shutdown() + } + return nil +} + +func newMetricsToMetrics(set connector.CreateSettings, cfg component.Config, metrics consumer.Metrics) (connector.Metrics, error) { + config := cfg.(*Config) + mr, ok := metrics.(connector.MetricsRouterAndConsumer) + if !ok { + return nil, errors.New("consumer is not of type MetricsRouter") + } + + failover := newFailoverRouter[consumer.Metrics](mr.Consumer, config) + err := failover.registerConsumers() + if err != nil { + return nil, err + } + return &metricsFailover{ + config: config, + failover: failover, + logger: set.TelemetrySettings.Logger, + }, nil +} diff --git a/connector/failoverconnector/metrics_test.go b/connector/failoverconnector/metrics_test.go new file mode 100644 index 000000000000..179ab8f3f35b --- /dev/null +++ b/connector/failoverconnector/metrics_test.go @@ -0,0 +1,151 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package failoverconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector" +import ( + "context" + "errors" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pmetric" +) + +var errMetricsConsumer = errors.New("Error from ConsumeMetrics") + +func TestMetricsRegisterConsumers(t *testing.T) { + var sinkFirst, sinkSecond, sinkThird consumertest.MetricsSink + metricsFirst := component.NewIDWithName(component.DataTypeMetrics, "metrics/first") + metricsSecond := component.NewIDWithName(component.DataTypeMetrics, "metrics/second") + metricsThird := component.NewIDWithName(component.DataTypeMetrics, "metrics/third") + + cfg := &Config{ + PipelinePriority: [][]component.ID{{metricsFirst}, {metricsSecond}, {metricsThird}}, + RetryInterval: 50 * time.Millisecond, + RetryGap: 10 * time.Millisecond, + MaxRetries: 10000, + } + + router := connector.NewMetricsRouter(map[component.ID]consumer.Metrics{ + metricsFirst: &sinkFirst, + metricsSecond: &sinkSecond, + metricsThird: &sinkThird, + }) + + conn, err := NewFactory().CreateMetricsToMetrics(context.Background(), + connectortest.NewNopCreateSettings(), cfg, router.(consumer.Metrics)) + + failoverConnector := conn.(*metricsFailover) + defer func() { + assert.NoError(t, failoverConnector.Shutdown(context.Background())) + }() + + require.NoError(t, err) + require.NotNil(t, conn) + + mc, _, ok := failoverConnector.failover.getCurrentConsumer() + mc1 := failoverConnector.failover.GetConsumerAtIndex(1) + mc2 := failoverConnector.failover.GetConsumerAtIndex(2) + + assert.True(t, ok) + require.Implements(t, (*consumer.Metrics)(nil), mc) + require.Implements(t, (*consumer.Metrics)(nil), mc1) + require.Implements(t, (*consumer.Metrics)(nil), mc2) +} + +func TestMetricsWithValidFailover(t *testing.T) { + var sinkFirst, sinkSecond, sinkThird consumertest.MetricsSink + metricsFirst := component.NewIDWithName(component.DataTypeMetrics, "metrics/first") + metricsSecond := component.NewIDWithName(component.DataTypeMetrics, "metrics/second") + metricsThird := component.NewIDWithName(component.DataTypeMetrics, "metrics/third") + + cfg := &Config{ + PipelinePriority: [][]component.ID{{metricsFirst}, {metricsSecond}, {metricsThird}}, + RetryInterval: 50 * time.Millisecond, + RetryGap: 10 * time.Millisecond, + MaxRetries: 10000, + } + + router := connector.NewMetricsRouter(map[component.ID]consumer.Metrics{ + metricsFirst: &sinkFirst, + metricsSecond: &sinkSecond, + metricsThird: &sinkThird, + }) + + conn, err := NewFactory().CreateMetricsToMetrics(context.Background(), + connectortest.NewNopCreateSettings(), cfg, router.(consumer.Metrics)) + + require.NoError(t, err) + + failoverConnector := conn.(*metricsFailover) + failoverConnector.failover.ModifyConsumerAtIndex(0, consumertest.NewErr(errMetricsConsumer)) + defer func() { + assert.NoError(t, failoverConnector.Shutdown(context.Background())) + }() + + md := sampleMetric() + + require.Eventually(t, func() bool { + return consumeMetricsAndCheckStable(failoverConnector, 1, md) + }, 3*time.Second, 5*time.Millisecond) +} + +func TestMetricsWithFailoverError(t *testing.T) { + var sinkFirst, sinkSecond, sinkThird consumertest.MetricsSink + metricsFirst := component.NewIDWithName(component.DataTypeMetrics, "metrics/first") + metricsSecond := component.NewIDWithName(component.DataTypeMetrics, "metrics/second") + metricsThird := component.NewIDWithName(component.DataTypeMetrics, "metrics/third") + + cfg := &Config{ + PipelinePriority: [][]component.ID{{metricsFirst}, {metricsSecond}, {metricsThird}}, + RetryInterval: 50 * time.Millisecond, + RetryGap: 10 * time.Millisecond, + MaxRetries: 10000, + } + + router := connector.NewMetricsRouter(map[component.ID]consumer.Metrics{ + metricsFirst: &sinkFirst, + metricsSecond: &sinkSecond, + metricsThird: &sinkThird, + }) + + conn, err := NewFactory().CreateMetricsToMetrics(context.Background(), + connectortest.NewNopCreateSettings(), cfg, router.(consumer.Metrics)) + + require.NoError(t, err) + + failoverConnector := conn.(*metricsFailover) + failoverConnector.failover.ModifyConsumerAtIndex(0, consumertest.NewErr(errMetricsConsumer)) + failoverConnector.failover.ModifyConsumerAtIndex(1, consumertest.NewErr(errMetricsConsumer)) + failoverConnector.failover.ModifyConsumerAtIndex(2, consumertest.NewErr(errMetricsConsumer)) + defer func() { + assert.NoError(t, failoverConnector.Shutdown(context.Background())) + }() + + md := sampleMetric() + + assert.EqualError(t, conn.ConsumeMetrics(context.Background(), md), "All provided pipelines return errors") +} + +func consumeMetricsAndCheckStable(conn *metricsFailover, idx int, mr pmetric.Metrics) bool { + _ = conn.ConsumeMetrics(context.Background(), mr) + stableIndex := conn.failover.pS.TestStableIndex() + return stableIndex == idx +} + +func sampleMetric() pmetric.Metrics { + m := pmetric.NewMetrics() + rm := m.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutInt("sample", 1) + metric := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + metric.SetEmptySum() + metric.SetName("test") + return m +} diff --git a/connector/failoverconnector/package_test.go b/connector/failoverconnector/package_test.go new file mode 100644 index 000000000000..bd8e101d2a05 --- /dev/null +++ b/connector/failoverconnector/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package failoverconnector + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/connector/failoverconnector/testdata/config.yaml b/connector/failoverconnector/testdata/config.yaml new file mode 100644 index 000000000000..f221350848a9 --- /dev/null +++ b/connector/failoverconnector/testdata/config.yaml @@ -0,0 +1,22 @@ +failover: + +failover/default: + priority_levels: [traces] + +failover/full: + priority_levels: + - [ traces/first, traces/also_first ] + - [ traces/second ] + - [ traces/third ] + - [ traces/fourth ] + retry_interval: 5m + retry_gap: 1m + max_retries: 10 + +failover/invalid: + priority_levels: + - [ traces/first ] + - [ traces/second ] + retry_interval: 3m + retry_gap: 2m + max_retries: 10 \ No newline at end of file diff --git a/connector/failoverconnector/traces.go b/connector/failoverconnector/traces.go new file mode 100644 index 000000000000..957bc8eb12f1 --- /dev/null +++ b/connector/failoverconnector/traces.go @@ -0,0 +1,84 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package failoverconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector" + +import ( + "context" + "errors" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.uber.org/zap" +) + +type tracesFailover struct { + component.StartFunc + component.ShutdownFunc + + config *Config + failover *failoverRouter[consumer.Traces] + logger *zap.Logger +} + +func (f *tracesFailover) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: false} +} + +// ConsumeTraces will try to export to the current set priority level and handle failover in the case of an error +func (f *tracesFailover) ConsumeTraces(ctx context.Context, td ptrace.Traces) error { + tc, ch, ok := f.failover.getCurrentConsumer() + if !ok { + return errNoValidPipeline + } + err := tc.ConsumeTraces(ctx, td) + if err == nil { + ch <- true + return nil + } + return f.FailoverTraces(ctx, td) +} + +// FailoverTraces is the function responsible for handling errors returned by the nextConsumer +func (f *tracesFailover) FailoverTraces(ctx context.Context, td ptrace.Traces) error { + for tc, ch, ok := f.failover.getCurrentConsumer(); ok; tc, ch, ok = f.failover.getCurrentConsumer() { + err := tc.ConsumeTraces(ctx, td) + if err != nil { + ch <- false + continue + } + ch <- true + return nil + } + f.logger.Error("All provided pipelines return errors, dropping data") + return errNoValidPipeline +} + +func (f *tracesFailover) Shutdown(_ context.Context) error { + if f.failover != nil { + f.failover.Shutdown() + } + return nil +} + +func newTracesToTraces(set connector.CreateSettings, cfg component.Config, traces consumer.Traces) (connector.Traces, error) { + config := cfg.(*Config) + tr, ok := traces.(connector.TracesRouterAndConsumer) + if !ok { + return nil, errors.New("consumer is not of type TracesRouter") + } + + failover := newFailoverRouter[consumer.Traces](tr.Consumer, config) + err := failover.registerConsumers() + if err != nil { + return nil, err + } + + return &tracesFailover{ + config: config, + failover: failover, + logger: set.TelemetrySettings.Logger, + }, nil +} diff --git a/connector/failoverconnector/traces_test.go b/connector/failoverconnector/traces_test.go new file mode 100644 index 000000000000..8b9e68369414 --- /dev/null +++ b/connector/failoverconnector/traces_test.go @@ -0,0 +1,153 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package failoverconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector" +import ( + "context" + "errors" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +var errTracesConsumer = errors.New("Error from ConsumeTraces") + +func TestTracesRegisterConsumers(t *testing.T) { + var sinkFirst, sinkSecond, sinkThird consumertest.TracesSink + tracesFirst := component.NewIDWithName(component.DataTypeTraces, "traces/first") + tracesSecond := component.NewIDWithName(component.DataTypeTraces, "traces/second") + tracesThird := component.NewIDWithName(component.DataTypeTraces, "traces/third") + + cfg := &Config{ + PipelinePriority: [][]component.ID{{tracesFirst}, {tracesSecond}, {tracesThird}}, + RetryInterval: 25 * time.Millisecond, + RetryGap: 5 * time.Millisecond, + MaxRetries: 10000, + } + + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{ + tracesFirst: &sinkFirst, + tracesSecond: &sinkSecond, + tracesThird: &sinkThird, + }) + + conn, err := NewFactory().CreateTracesToTraces(context.Background(), + connectortest.NewNopCreateSettings(), cfg, router.(consumer.Traces)) + + failoverConnector := conn.(*tracesFailover) + defer func() { + assert.NoError(t, failoverConnector.Shutdown(context.Background())) + }() + + require.NoError(t, err) + require.NotNil(t, conn) + + tc, _, ok := failoverConnector.failover.getCurrentConsumer() + tc1 := failoverConnector.failover.GetConsumerAtIndex(1) + tc2 := failoverConnector.failover.GetConsumerAtIndex(2) + + assert.True(t, ok) + require.Implements(t, (*consumer.Traces)(nil), tc) + require.Implements(t, (*consumer.Traces)(nil), tc1) + require.Implements(t, (*consumer.Traces)(nil), tc2) +} + +func TestTracesWithValidFailover(t *testing.T) { + var sinkSecond, sinkThird consumertest.TracesSink + + tracesFirst := component.NewIDWithName(component.DataTypeTraces, "traces/first") + tracesSecond := component.NewIDWithName(component.DataTypeTraces, "traces/second") + tracesThird := component.NewIDWithName(component.DataTypeTraces, "traces/third") + noOp := consumertest.NewNop() + + cfg := &Config{ + PipelinePriority: [][]component.ID{{tracesFirst}, {tracesSecond}, {tracesThird}}, + RetryInterval: 50 * time.Millisecond, + RetryGap: 10 * time.Millisecond, + MaxRetries: 10000, + } + + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{ + tracesFirst: noOp, + tracesSecond: &sinkSecond, + tracesThird: &sinkThird, + }) + + conn, err := NewFactory().CreateTracesToTraces(context.Background(), + connectortest.NewNopCreateSettings(), cfg, router.(consumer.Traces)) + + require.NoError(t, err) + + failoverConnector := conn.(*tracesFailover) + failoverConnector.failover.ModifyConsumerAtIndex(0, consumertest.NewErr(errTracesConsumer)) + defer func() { + assert.NoError(t, failoverConnector.Shutdown(context.Background())) + }() + + tr := sampleTrace() + + require.Eventually(t, func() bool { + return consumeTracesAndCheckStable(failoverConnector, 1, tr) + }, 3*time.Second, 5*time.Millisecond) +} + +func TestTracesWithFailoverError(t *testing.T) { + var sinkSecond, sinkThird consumertest.TracesSink + tracesFirst := component.NewIDWithName(component.DataTypeTraces, "traces/first") + tracesSecond := component.NewIDWithName(component.DataTypeTraces, "traces/second") + tracesThird := component.NewIDWithName(component.DataTypeTraces, "traces/third") + noOp := consumertest.NewNop() + + cfg := &Config{ + PipelinePriority: [][]component.ID{{tracesFirst}, {tracesSecond}, {tracesThird}}, + RetryInterval: 50 * time.Millisecond, + RetryGap: 10 * time.Millisecond, + MaxRetries: 10000, + } + + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{ + tracesFirst: noOp, + tracesSecond: &sinkSecond, + tracesThird: &sinkThird, + }) + + conn, err := NewFactory().CreateTracesToTraces(context.Background(), + connectortest.NewNopCreateSettings(), cfg, router.(consumer.Traces)) + + require.NoError(t, err) + + failoverConnector := conn.(*tracesFailover) + failoverConnector.failover.ModifyConsumerAtIndex(0, consumertest.NewErr(errTracesConsumer)) + failoverConnector.failover.ModifyConsumerAtIndex(1, consumertest.NewErr(errTracesConsumer)) + failoverConnector.failover.ModifyConsumerAtIndex(2, consumertest.NewErr(errTracesConsumer)) + defer func() { + assert.NoError(t, failoverConnector.Shutdown(context.Background())) + }() + + tr := sampleTrace() + + assert.EqualError(t, conn.ConsumeTraces(context.Background(), tr), "All provided pipelines return errors") +} + +func consumeTracesAndCheckStable(conn *tracesFailover, idx int, tr ptrace.Traces) bool { + _ = conn.ConsumeTraces(context.Background(), tr) + stableIndex := conn.failover.pS.TestStableIndex() + return stableIndex == idx +} + +func sampleTrace() ptrace.Traces { + tr := ptrace.NewTraces() + rl := tr.ResourceSpans().AppendEmpty() + rl.Resource().Attributes().PutStr("conn", "failover") + span := rl.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.SetName("SampleSpan") + return tr +} diff --git a/exporter/f5cloudexporter/Makefile b/connector/grafanacloudconnector/Makefile similarity index 100% rename from exporter/f5cloudexporter/Makefile rename to connector/grafanacloudconnector/Makefile diff --git a/connector/grafanacloudconnector/README.md b/connector/grafanacloudconnector/README.md new file mode 100644 index 000000000000..41c415c8d770 --- /dev/null +++ b/connector/grafanacloudconnector/README.md @@ -0,0 +1,38 @@ +# Grafana Cloud Connector + + +| Status | | +| ------------- |-----------| +| Distributions | [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aconnector%2Fgrafanacloud%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aconnector%2Fgrafanacloud) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aconnector%2Fgrafanacloud%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aconnector%2Fgrafanacloud) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling), [@rlankfo](https://www.github.com/rlankfo), [@jcreixell](https://www.github.com/jcreixell) \| Seeking more code owners! | + +[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + +## Supported Pipeline Types + +| [Exporter Pipeline Type] | [Receiver Pipeline Type] | [Stability Level] | +| ------------------------ | ------------------------ | ----------------- | +| traces | metrics | [alpha] | + +[Exporter Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#exporter-pipeline-type +[Receiver Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#receiver-pipeline-type +[Stability Level]: https://github.com/open-telemetry/opentelemetry-collector#stability-levels + + +## Overview + +The Grafana Cloud Connector (grafanacloudconnector) is a connector component that can analyze telemetry in pipelines to generate usage metrics for the following Grafana Cloud products: +* Application Observability + +#### Example configuration for the component + +```yaml +connectors: + grafanacloud: + host_identifiers: ["host.id"] + metrics_flush_interval: 60s +``` + +This connector will generate a host info metric based on the first "host_identifiers" resource attribute found on spans. The rest are skipped. Valid flush intervals are between 15s and 5m. diff --git a/connector/grafanacloudconnector/config.go b/connector/grafanacloudconnector/config.go new file mode 100644 index 000000000000..b6ddcc913888 --- /dev/null +++ b/connector/grafanacloudconnector/config.go @@ -0,0 +1,34 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package grafanacloudconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector" + +import ( + "fmt" + "time" + + "go.opentelemetry.io/collector/component" +) + +// Config defines the configuration options for the Grafana Cloud connector. +type Config struct { + // HostIdentifiers defines the list of resource attributes used to derive + // a unique `grafana.host.id` value. In most cases, this should be [ "host.id" ] + HostIdentifiers []string `mapstructure:"host_identifiers"` + MetricsFlushInterval time.Duration `mapstructure:"metrics_flush_interval"` +} + +var _ component.ConfigValidator = (*Config)(nil) + +// Validate checks if the configuration is valid +func (c Config) Validate() error { + if len(c.HostIdentifiers) == 0 { + return fmt.Errorf("at least one host identifier is required") + } + + if c.MetricsFlushInterval > 5*time.Minute || c.MetricsFlushInterval < 15*time.Second { + return fmt.Errorf("%q is not a valid flush interval between 15s and 5m", c.MetricsFlushInterval) + } + + return nil +} diff --git a/connector/grafanacloudconnector/config_test.go b/connector/grafanacloudconnector/config_test.go new file mode 100644 index 000000000000..9c0a4a6792d4 --- /dev/null +++ b/connector/grafanacloudconnector/config_test.go @@ -0,0 +1,88 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package grafanacloudconnector + +import ( + "path/filepath" + "testing" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "gotest.tools/assert" + + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector/internal/metadata" +) + +func TestLoadConfig(t *testing.T) { + testCases := []struct { + name string + expect *Config + }{ + { + name: "", + expect: createDefaultConfig().(*Config), + }, + { + name: "custom", + expect: &Config{ + HostIdentifiers: []string{"k8s.node.name", "host.name", "host.id"}, + MetricsFlushInterval: 30 * time.Second, + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + assert.NilError(t, err) + + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + + sub, err := cm.Sub(component.NewIDWithName(metadata.Type, tc.name).String()) + assert.NilError(t, err) + assert.NilError(t, component.UnmarshalConfig(sub, cfg)) + assert.DeepEqual(t, tc.expect, cfg) + }) + } +} + +func TestValidate(t *testing.T) { + testCases := []struct { + name string + cfg *Config + errMsg string + }{ + { + name: "valid", + cfg: createDefaultConfig().(*Config), + errMsg: "", + }, + { + name: "missing identifiers", + cfg: &Config{}, + errMsg: "at least one host identifier is required", + }, + { + name: "invalid flush interval", + cfg: &Config{ + HostIdentifiers: []string{"host.id"}, + MetricsFlushInterval: time.Hour, + }, + errMsg: "\"1h0m0s\" is not a valid flush interval between 15s and 5m", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + err := tc.cfg.Validate() + if tc.errMsg != "" { + assert.Equal(t, tc.errMsg, err.Error()) + } else { + assert.NilError(t, err) + } + }) + } +} diff --git a/connector/grafanacloudconnector/connector.go b/connector/grafanacloudconnector/connector.go new file mode 100644 index 000000000000..ac0056c884dd --- /dev/null +++ b/connector/grafanacloudconnector/connector.go @@ -0,0 +1,163 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package grafanacloudconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector" + +import ( + "context" + "sync" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/otel/metric" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector/internal/metadata" +) + +const ( + hostInfoMetric = "traces_host_info" + hostIdentifierAttr = "grafana.host.id" +) + +var _ connector.Traces = (*connectorImp)(nil) + +type connectorImp struct { + config Config + logger *zap.Logger + + started bool + done chan struct{} + shutdownOnce sync.Once + + metricsConsumer consumer.Metrics + hostMetrics *hostMetrics + + metricHostCount metric.Int64ObservableGauge + metricFlushCount metric.Int64Counter + metricDatapointCount metric.Int64Counter +} + +func newConnector(logger *zap.Logger, set component.TelemetrySettings, config component.Config) (*connectorImp, error) { + hm := newHostMetrics() + mHostCount, err := metadata.Meter(set).Int64ObservableGauge( + "grafanacloud_host_count", + metric.WithDescription("Number of unique hosts"), + metric.WithUnit("1"), + metric.WithInt64Callback(func(_ context.Context, result metric.Int64Observer) error { + result.Observe(int64(hm.count())) + return nil + }), + ) + + if err != nil { + return nil, err + } + + mFlushCount, err := metadata.Meter(set).Int64Counter( + "grafanacloud_flush_count", + metric.WithDescription("Number of metrics flushes"), + metric.WithUnit("1"), + ) + if err != nil { + return nil, err + } + + mDatapointCount, err := metadata.Meter(set).Int64Counter( + "grafanacloud_datapoint_count", + metric.WithDescription("Number of datapoints sent to Grafana Cloud"), + metric.WithUnit("1"), + ) + if err != nil { + return nil, err + } + + cfg := config.(*Config) + return &connectorImp{ + config: *cfg, + logger: logger, + done: make(chan struct{}), + hostMetrics: hm, + metricHostCount: mHostCount, + metricFlushCount: mFlushCount, + metricDatapointCount: mDatapointCount, + }, nil +} + +// Capabilities implements connector.Traces. +func (c *connectorImp) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: false} +} + +// ConsumeTraces implements connector.Traces. +func (c *connectorImp) ConsumeTraces(_ context.Context, td ptrace.Traces) error { + for i := 0; i < td.ResourceSpans().Len(); i++ { + resourceSpan := td.ResourceSpans().At(i) + attrs := resourceSpan.Resource().Attributes() + mapping := attrs.AsRaw() + + for _, attrName := range c.config.HostIdentifiers { + if val, ok := mapping[attrName]; ok { + if v, ok := val.(string); ok { + c.hostMetrics.add(v) + } + break + } + } + } + return nil +} + +// Start implements connector.Traces. +func (c *connectorImp) Start(ctx context.Context, _ component.Host) error { + c.logger.Info("Starting Grafana Cloud connector") + c.started = true + ticker := time.NewTicker(c.config.MetricsFlushInterval) + go func() { + for { + select { + case <-c.done: + ticker.Stop() + return + case <-ticker.C: + if err := c.flush(ctx); err != nil { + c.logger.Error("Error consuming metrics", zap.Error(err)) + } + } + } + }() + return nil +} + +// Shutdown implements connector.Traces. +func (c *connectorImp) Shutdown(ctx context.Context) error { + c.shutdownOnce.Do(func() { + c.logger.Info("Stopping Grafana Cloud connector") + if c.started { + // flush metrics on shutdown + if err := c.flush(ctx); err != nil { + c.logger.Error("Error consuming metrics", zap.Error(err)) + } + c.done <- struct{}{} + c.started = false + } + }) + return nil +} + +func (c *connectorImp) flush(ctx context.Context) error { + var err error + + metrics, count := c.hostMetrics.metrics() + if count > 0 { + c.hostMetrics.reset() + c.logger.Debug("Flushing metrics", zap.Int("count", count)) + c.metricDatapointCount.Add(ctx, int64(metrics.DataPointCount())) + err = c.metricsConsumer.ConsumeMetrics(ctx, *metrics) + } + c.metricFlushCount.Add(ctx, int64(1)) + return err +} diff --git a/connector/grafanacloudconnector/connector_test.go b/connector/grafanacloudconnector/connector_test.go new file mode 100644 index 000000000000..1c191680e13b --- /dev/null +++ b/connector/grafanacloudconnector/connector_test.go @@ -0,0 +1,110 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package grafanacloudconnector + +import ( + "context" + "testing" + "time" + + "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "gotest.tools/assert" +) + +func TestNewConnector(t *testing.T) { + for _, tc := range []struct { + name string + hostIdentifiers []string + metricsFlushInterval *time.Duration + expectedConfig *Config + }{ + { + name: "default config", + expectedConfig: createDefaultConfig().(*Config), + }, + { + name: "other config", + hostIdentifiers: []string{"host.id", "host.name", "k8s.node.uid"}, + metricsFlushInterval: durationPtr(15 * time.Second), + expectedConfig: &Config{ + HostIdentifiers: []string{"host.id", "host.name", "k8s.node.uid"}, + MetricsFlushInterval: 15 * time.Second, + }, + }, + } { + t.Run(tc.name, func(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + if tc.hostIdentifiers != nil { + cfg.HostIdentifiers = tc.hostIdentifiers + } + if tc.metricsFlushInterval != nil { + cfg.MetricsFlushInterval = *tc.metricsFlushInterval + } + + c, err := factory.CreateTracesToMetrics(context.Background(), connectortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) + imp := c.(*connectorImp) + + assert.NilError(t, err) + assert.Assert(t, imp != nil) + assert.DeepEqual(t, tc.expectedConfig.HostIdentifiers, imp.config.HostIdentifiers) + assert.DeepEqual(t, tc.expectedConfig.MetricsFlushInterval, imp.config.MetricsFlushInterval) + }) + } +} + +func TestConsumeTraces(t *testing.T) { + testCases := []struct { + name string + input ptrace.Traces + output []pmetric.Metrics + }{ + { + name: "sample", + input: testTraces(), + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.MetricsFlushInterval = 50 * time.Millisecond + + sink := &consumertest.MetricsSink{} + c, err := factory.CreateTracesToMetrics(context.Background(), connectortest.NewNopCreateSettings(), cfg, sink) + assert.NilError(t, err) + + ctx := context.Background() + assert.NilError(t, c.Start(ctx, nil)) + err = c.ConsumeTraces(ctx, tc.input) + assert.NilError(t, err) + assert.NilError(t, c.Shutdown(ctx)) + + metrics := sink.AllMetrics() + assert.Assert(t, len(metrics) > 0) + + sm := metrics[0].ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0) + assert.Equal(t, hostInfoMetric, sm.Name()) + + val, ok := sm.Gauge().DataPoints().At(0).Attributes().Get(hostIdentifierAttr) + assert.Assert(t, ok) + assert.Equal(t, "foo", val.AsString()) + }) + } +} + +func testTraces() ptrace.Traces { + traces := ptrace.NewTraces() + resourceSpans := traces.ResourceSpans().AppendEmpty() + resourceSpans.Resource().Attributes().PutStr("host.id", "foo") + return traces +} + +func durationPtr(t time.Duration) *time.Duration { + return &t +} diff --git a/connector/grafanacloudconnector/doc.go b/connector/grafanacloudconnector/doc.go new file mode 100644 index 000000000000..56307a15e0dd --- /dev/null +++ b/connector/grafanacloudconnector/doc.go @@ -0,0 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +package grafanacloudconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector" diff --git a/connector/grafanacloudconnector/factory.go b/connector/grafanacloudconnector/factory.go new file mode 100644 index 000000000000..d2bac2b00dac --- /dev/null +++ b/connector/grafanacloudconnector/factory.go @@ -0,0 +1,39 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package grafanacloudconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector" + +import ( + "context" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/consumer" + + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector/internal/metadata" +) + +func NewFactory() connector.Factory { + return connector.NewFactory( + metadata.Type, + createDefaultConfig, + connector.WithTracesToMetrics(createTracesToMetricsConnector, metadata.TracesToMetricsStability), + ) +} + +func createDefaultConfig() component.Config { + return &Config{ + HostIdentifiers: []string{"host.id"}, + MetricsFlushInterval: 60 * time.Second, + } +} + +func createTracesToMetricsConnector(_ context.Context, params connector.CreateSettings, cfg component.Config, next consumer.Metrics) (connector.Traces, error) { + c, err := newConnector(params.Logger, params.TelemetrySettings, cfg) + if err != nil { + return nil, err + } + c.metricsConsumer = next + return c, nil +} diff --git a/connector/grafanacloudconnector/factory_test.go b/connector/grafanacloudconnector/factory_test.go new file mode 100644 index 000000000000..40141cf7eeaf --- /dev/null +++ b/connector/grafanacloudconnector/factory_test.go @@ -0,0 +1,24 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package grafanacloudconnector + +import ( + "testing" + "time" + + "go.opentelemetry.io/collector/component/componenttest" + "gotest.tools/assert" +) + +func TestCreateDefaultConfig(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + + assert.DeepEqual(t, &Config{ + HostIdentifiers: []string{"host.id"}, + MetricsFlushInterval: 60 * time.Second, + }, cfg) + + assert.NilError(t, componenttest.CheckConfigStruct(cfg)) +} diff --git a/connector/grafanacloudconnector/generated_component_test.go b/connector/grafanacloudconnector/generated_component_test.go new file mode 100644 index 000000000000..e5e0fd8e4f86 --- /dev/null +++ b/connector/grafanacloudconnector/generated_component_test.go @@ -0,0 +1,61 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package grafanacloudconnector + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/collector/consumer/consumertest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "traces_to_metrics", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesToMetrics(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(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + firstConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstConnector.Start(context.Background(), host)) + require.NoError(t, firstConnector.Shutdown(context.Background())) + secondConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondConnector.Start(context.Background(), host)) + require.NoError(t, secondConnector.Shutdown(context.Background())) + }) + } +} diff --git a/connector/grafanacloudconnector/go.mod b/connector/grafanacloudconnector/go.mod new file mode 100644 index 000000000000..f1cd33429d03 --- /dev/null +++ b/connector/grafanacloudconnector/go.mod @@ -0,0 +1,58 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector + +go 1.21 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/connector v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + gotest.tools v2.2.0+incompatible +) + +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.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/uuid v1.6.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.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/connector/grafanacloudconnector/go.sum b/connector/grafanacloudconnector/go.sum new file mode 100644 index 000000000000..c40d8723b97a --- /dev/null +++ b/connector/grafanacloudconnector/go.sum @@ -0,0 +1,148 @@ +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/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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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/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/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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/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/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= diff --git a/connector/grafanacloudconnector/host_metrics.go b/connector/grafanacloudconnector/host_metrics.go new file mode 100644 index 000000000000..c927f87891b9 --- /dev/null +++ b/connector/grafanacloudconnector/host_metrics.go @@ -0,0 +1,78 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package grafanacloudconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector" + +import ( + "sync" + "time" + + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" +) + +type hostMetrics struct { + mutex sync.RWMutex + hosts map[string]struct{} +} + +func newHostMetrics() *hostMetrics { + return &hostMetrics{ + hosts: make(map[string]struct{}), + } +} + +func (h *hostMetrics) add(hostName string) { + h.mutex.RLock() + if _, ok := h.hosts[hostName]; !ok { + h.mutex.RUnlock() + h.mutex.Lock() + defer h.mutex.Unlock() + h.hosts[hostName] = struct{}{} + } else { + h.mutex.RUnlock() + } +} + +func (h *hostMetrics) count() int { + h.mutex.RLock() + defer h.mutex.RUnlock() + return len(h.hosts) +} + +func (h *hostMetrics) metrics() (*pmetric.Metrics, int) { + h.mutex.RLock() + defer h.mutex.RUnlock() + + count := len(h.hosts) + var pm *pmetric.Metrics + + if count > 0 { + metrics := pmetric.NewMetrics() + pm = &metrics + + ilm := metrics.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty() + m := ilm.Metrics().AppendEmpty() + m.SetName(hostInfoMetric) + m.SetEmptyGauge() + dps := m.Gauge().DataPoints() + + dps.EnsureCapacity(count) + timestamp := pcommon.NewTimestampFromTime(time.Now()) + for k := range h.hosts { + dpCalls := dps.AppendEmpty() + dpCalls.SetStartTimestamp(timestamp) + dpCalls.SetTimestamp(timestamp) + dpCalls.Attributes().PutStr(hostIdentifierAttr, k) + dpCalls.SetIntValue(int64(1)) + } + } + + return pm, count +} + +func (h *hostMetrics) reset() { + h.mutex.Lock() + defer h.mutex.Unlock() + h.hosts = make(map[string]struct{}) +} diff --git a/connector/grafanacloudconnector/host_metrics_test.go b/connector/grafanacloudconnector/host_metrics_test.go new file mode 100644 index 000000000000..ac790f1c7045 --- /dev/null +++ b/connector/grafanacloudconnector/host_metrics_test.go @@ -0,0 +1,65 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package grafanacloudconnector + +import ( + "strings" + "testing" + + "gotest.tools/assert" +) + +func TestHostMetrics(t *testing.T) { + for _, tc := range []struct { + name string + hosts []string + expectedHostCount int + expectedMetricCount int + expectedDatapointCount int + }{ + { + name: "single host", + hosts: []string{"hostA"}, + expectedHostCount: 1, + expectedMetricCount: 1, + expectedDatapointCount: 1, + }, + { + name: "multiple hosts", + hosts: []string{"hostA", "hostB", "hostC", "hostA", "hostB"}, + expectedHostCount: 3, + expectedMetricCount: 1, + expectedDatapointCount: 3, + }, + { + name: "none", + hosts: []string{}, + }, + } { + t.Run(tc.name, func(t *testing.T) { + hm := newHostMetrics() + for _, h := range tc.hosts { + hm.add(h) + } + + metrics, count := hm.metrics() + hm.reset() + assert.Equal(t, tc.expectedHostCount, count) + if metrics != nil { + assert.Equal(t, tc.expectedMetricCount, metrics.MetricCount()) + assert.Equal(t, tc.expectedDatapointCount, metrics.DataPointCount()) + rm := metrics.ResourceMetrics() + metric := rm.At(0).ScopeMetrics().At(0).Metrics().At(0) + assert.Equal(t, hostInfoMetric, metric.Name()) + for i := 0; i < count; i++ { + dp := metric.Gauge().DataPoints().At(i) + val, ok := dp.Attributes().Get(hostIdentifierAttr) + assert.Assert(t, ok) + assert.Assert(t, strings.HasPrefix(val.AsString(), "host")) + assert.Equal(t, int64(1), dp.IntValue()) + } + } + }) + } +} diff --git a/connector/grafanacloudconnector/internal/metadata/generated_status.go b/connector/grafanacloudconnector/internal/metadata/generated_status.go new file mode 100644 index 000000000000..78efdb31a113 --- /dev/null +++ b/connector/grafanacloudconnector/internal/metadata/generated_status.go @@ -0,0 +1,25 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("grafanacloud") +) + +const ( + TracesToMetricsStability = component.StabilityLevelAlpha +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/grafanacloud") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/grafanacloud") +} diff --git a/connector/grafanacloudconnector/metadata.yaml b/connector/grafanacloudconnector/metadata.yaml new file mode 100644 index 000000000000..df5a33ad6cc2 --- /dev/null +++ b/connector/grafanacloudconnector/metadata.yaml @@ -0,0 +1,15 @@ +type: grafanacloud +scope_name: otelcol/grafanacloud + +status: + class: connector + stability: + alpha: [traces_to_metrics] + distributions: [contrib] + codeowners: + active: [jpkrohling, rlankfo, jcreixell] + emeritus: [] + seeking_new: true + +tests: + config: diff --git a/connector/grafanacloudconnector/package_test.go b/connector/grafanacloudconnector/package_test.go new file mode 100644 index 000000000000..23858a7b92ce --- /dev/null +++ b/connector/grafanacloudconnector/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package grafanacloudconnector + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/connector/grafanacloudconnector/testdata/config.yaml b/connector/grafanacloudconnector/testdata/config.yaml new file mode 100644 index 000000000000..4b138a7b873f --- /dev/null +++ b/connector/grafanacloudconnector/testdata/config.yaml @@ -0,0 +1,10 @@ +# default configuration +grafanacloud: + +# custom configuration +grafanacloud/custom: + host_identifiers: + - k8s.node.name + - host.name + - host.id + metrics_flush_interval: 30s diff --git a/connector/routingconnector/README.md b/connector/routingconnector/README.md index 1a3f04da41a5..7ce1b0dd9937 100644 --- a/connector/routingconnector/README.md +++ b/connector/routingconnector/README.md @@ -35,7 +35,8 @@ The following settings are available: - `table.statement (required)`: the routing condition provided as the [OTTL] statement. - `table.pipelines (required)`: the list of pipelines to use when the routing condition is met. - `default_pipelines (optional)`: contains the list of pipelines to use when a record does not meet any of specified conditions. -- `error_mode (optional)`: determines how errors returned from OTTL statements are handled. Valid values are `ignore` and `propagate`. If `ignored` is used and a statement's condition has an error then the payload will be routed to the default pipelines. If not supplied, `propagate` is used. +- `error_mode (optional)`: determines how errors returned from OTTL statements are handled. Valid values are `propagate`, `ignore` and `silent`. If `ignore` or `silent` is used and a statement's condition has an error then the payload will be routed to the default pipelines. When `silent` is used the error is not logged. If not supplied, `propagate` is used. +- `match_once (optional, default: false)`: determines whether the connector matches multiple statements or not. If enabled, the payload will be routed to the first pipeline in the `table` whose routing condition is met. Example: @@ -55,12 +56,23 @@ connectors: routing: default_pipelines: [traces/jaeger] error_mode: ignore + match_once: false table: - statement: route() where attributes["X-Tenant"] == "acme" pipelines: [traces/jaeger-acme] - statement: delete_key(attributes, "X-Tenant") where IsMatch(attributes["X-Tenant"], ".*corp") pipelines: [traces/jaeger-ecorp] + routing/match_once: + default_pipelines: [traces/jaeger] + error_mode: ignore + match_once: true + table: + - statement: route() where attributes["X-Tenant"] == "acme" + pipelines: [traces/jaeger-acme] + - statement: route() where attributes["X-Tenant"] == ".*acme" + pipelines: [traces/jaeger-ecorp] + service: pipelines: traces/in: diff --git a/connector/routingconnector/config.go b/connector/routingconnector/config.go index 58c5102dff5c..5f79cdcde6e1 100644 --- a/connector/routingconnector/config.go +++ b/connector/routingconnector/config.go @@ -29,7 +29,7 @@ type Config struct { // condition. // Valid values are `ignore` and `propagate`. // `ignore` means the processor ignores errors returned by conditions and continues on to the - // next condition. This is the recommended mode. If `ignored` is used and a statement's + // next condition. This is the recommended mode. If `ignore` is used and a statement's // condition has an error then the payload will be routed to the default exporter. `propagate` // means the processor returns the error up the pipeline. This will result in the payload being // dropped from the collector. @@ -39,6 +39,10 @@ type Config struct { // Table contains the routing table for this processor. // Required. Table []RoutingTableItem `mapstructure:"table"` + + // MatchOnce determines whether the connector matches multiple statements. + // Optional. + MatchOnce bool `mapstructure:"match_once"` } // Validate checks if the processor configuration is valid. diff --git a/connector/routingconnector/factory_test.go b/connector/routingconnector/factory_test.go index cdb27656d228..56f436223b2c 100644 --- a/connector/routingconnector/factory_test.go +++ b/connector/routingconnector/factory_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/connector/connectortest" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" @@ -24,10 +25,10 @@ func TestConnectorCreatedWithValidConfiguration(t *testing.T) { }}, } - router := connectortest.NewTracesRouter( - connectortest.WithNopTraces(component.NewIDWithName(component.DataTypeTraces, "default")), - connectortest.WithNopTraces(component.NewIDWithName(component.DataTypeTraces, "0")), - ) + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{ + component.NewIDWithName(component.DataTypeTraces, "default"): consumertest.NewNop(), + component.NewIDWithName(component.DataTypeTraces, "0"): consumertest.NewNop(), + }) factory := NewFactory() conn, err := factory.CreateTracesToTraces(context.Background(), diff --git a/connector/routingconnector/go.mod b/connector/routingconnector/go.mod index a8f4fb44f554..1b16c1576926 100644 --- a/connector/routingconnector/go.mod +++ b/connector/routingconnector/go.mod @@ -1,52 +1,62 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/connector v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/connector v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/alecthomas/participle/v2 v2.1.0 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.4.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/iancoleman/strcase v0.3.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/connector/routingconnector/go.sum b/connector/routingconnector/go.sum index 2aee1203d80a..f4c9dc410deb 100644 --- a/connector/routingconnector/go.sum +++ b/connector/routingconnector/go.sum @@ -1,13 +1,24 @@ github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= -github.com/alecthomas/participle/v2 v2.1.0 h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4= -github.com/alecthomas/participle/v2 v2.1.0/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +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.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -17,12 +28,12 @@ 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/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/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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -33,14 +44,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -51,61 +62,77 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -118,15 +145,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/connector/routingconnector/internal/metadata/generated_status.go b/connector/routingconnector/internal/metadata/generated_status.go index c118c256ee31..ddf7e9c1c51d 100644 --- a/connector/routingconnector/internal/metadata/generated_status.go +++ b/connector/routingconnector/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("routing") ) const ( - Type = "routing" TracesToTracesStability = component.StabilityLevelAlpha MetricsToMetricsStability = component.StabilityLevelAlpha LogsToLogsStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/routing") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/routing") +} diff --git a/connector/routingconnector/logs.go b/connector/routingconnector/logs.go index e1db011eefda..b5a38fcc05e3 100644 --- a/connector/routingconnector/logs.go +++ b/connector/routingconnector/logs.go @@ -33,7 +33,7 @@ func newLogsConnector( ) (*logsConnector, error) { cfg := config.(*Config) - lr, ok := logs.(connector.LogsRouter) + lr, ok := logs.(connector.LogsRouterAndConsumer) if !ok { return nil, errUnexpectedConsumer } @@ -72,7 +72,7 @@ func (c *logsConnector) ConsumeLogs(ctx context.Context, ld plog.Logs) error { rtx := ottlresource.NewTransformContext(rlogs.Resource()) noRoutesMatch := true - for _, route := range c.router.routes { + for _, route := range c.router.routeSlice { _, isMatch, err := route.statement.Execute(ctx, rtx) if err != nil { if c.config.ErrorMode == ottl.PropagateError { @@ -84,6 +84,9 @@ func (c *logsConnector) ConsumeLogs(ctx context.Context, ld plog.Logs) error { if isMatch { noRoutesMatch = false c.group(groups, route.consumer, rlogs) + if c.config.MatchOnce { + break + } } } diff --git a/connector/routingconnector/logs_test.go b/connector/routingconnector/logs_test.go index ed2c8dcc0cba..bcd97da62ba1 100644 --- a/connector/routingconnector/logs_test.go +++ b/connector/routingconnector/logs_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/connector/connectortest" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" @@ -40,11 +41,11 @@ func TestLogsRegisterConsumersForValidRoute(t *testing.T) { var defaultSink, sink0, sink1 consumertest.LogsSink - router := connectortest.NewLogsRouter( - connectortest.WithLogsSink(logsDefault, &defaultSink), - connectortest.WithLogsSink(logs0, &sink0), - connectortest.WithLogsSink(logs1, &sink1), - ) + router := connector.NewLogsRouter(map[component.ID]consumer.Logs{ + logsDefault: &defaultSink, + logs0: &sink0, + logs1: &sink1, + }) conn, err := NewFactory().CreateLogsToLogs(context.Background(), connectortest.NewNopCreateSettings(), cfg, router.(consumer.Logs)) @@ -99,11 +100,11 @@ func TestLogsAreCorrectlySplitPerResourceAttributeWithOTTL(t *testing.T) { var defaultSink, sink0, sink1 consumertest.LogsSink - router := connectortest.NewLogsRouter( - connectortest.WithLogsSink(logsDefault, &defaultSink), - connectortest.WithLogsSink(logs0, &sink0), - connectortest.WithLogsSink(logs1, &sink1), - ) + router := connector.NewLogsRouter(map[component.ID]consumer.Logs{ + logsDefault: &defaultSink, + logs0: &sink0, + logs1: &sink1, + }) resetSinks := func() { defaultSink.Reset() @@ -229,6 +230,158 @@ func TestLogsAreCorrectlySplitPerResourceAttributeWithOTTL(t *testing.T) { }) } +func TestLogsAreCorrectlyMatchOnceWithOTTL(t *testing.T) { + logsDefault := component.NewIDWithName(component.DataTypeLogs, "default") + logs0 := component.NewIDWithName(component.DataTypeLogs, "0") + logs1 := component.NewIDWithName(component.DataTypeLogs, "1") + + cfg := &Config{ + DefaultPipelines: []component.ID{logsDefault}, + Table: []RoutingTableItem{ + { + Statement: `route() where IsMatch(attributes["X-Tenant"], ".*acme") == true`, + Pipelines: []component.ID{logs0}, + }, + { + Statement: `route() where IsMatch(attributes["X-Tenant"], "_acme") == true`, + Pipelines: []component.ID{logs1}, + }, + { + Statement: `route() where attributes["X-Tenant"] == "ecorp"`, + Pipelines: []component.ID{logsDefault, logs0}, + }, + }, + MatchOnce: true, + } + + var defaultSink, sink0, sink1 consumertest.LogsSink + + router := connector.NewLogsRouter(map[component.ID]consumer.Logs{ + logsDefault: &defaultSink, + logs0: &sink0, + logs1: &sink1, + }) + + resetSinks := func() { + defaultSink.Reset() + sink0.Reset() + sink1.Reset() + } + + factory := NewFactory() + conn, err := factory.CreateLogsToLogs( + context.Background(), + connectortest.NewNopCreateSettings(), + cfg, + router.(consumer.Logs), + ) + + require.NoError(t, err) + require.NotNil(t, conn) + require.NoError(t, conn.Start(context.Background(), componenttest.NewNopHost())) + defer func() { + assert.NoError(t, conn.Shutdown(context.Background())) + }() + + t.Run("logs matched by no expressions", func(t *testing.T) { + resetSinks() + + l := plog.NewLogs() + rl := l.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("X-Tenant", "something-else") + rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + + require.NoError(t, conn.ConsumeLogs(context.Background(), l)) + + assert.Len(t, defaultSink.AllLogs(), 1) + assert.Len(t, sink0.AllLogs(), 0) + assert.Len(t, sink1.AllLogs(), 0) + }) + + t.Run("logs matched one expression", func(t *testing.T) { + resetSinks() + + l := plog.NewLogs() + + rl := l.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("X-Tenant", "xacme") + rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + + require.NoError(t, conn.ConsumeLogs(context.Background(), l)) + + assert.Len(t, defaultSink.AllLogs(), 0) + assert.Len(t, sink0.AllLogs(), 1) + assert.Len(t, sink1.AllLogs(), 0) + }) + + t.Run("logs matched by two expressions, but sinks to one", func(t *testing.T) { + resetSinks() + + l := plog.NewLogs() + + rl := l.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("X-Tenant", "x_acme") + rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + + rl = l.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("X-Tenant", "_acme") + rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + + require.NoError(t, conn.ConsumeLogs(context.Background(), l)) + + assert.Len(t, defaultSink.AllLogs(), 0) + assert.Len(t, sink0.AllLogs(), 1) + assert.Len(t, sink1.AllLogs(), 0) + + assert.Equal(t, sink0.AllLogs()[0].LogRecordCount(), 2) + }) + + t.Run("one log matched by multiple expressions, other matched none", func(t *testing.T) { + resetSinks() + + l := plog.NewLogs() + + rl := l.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("X-Tenant", "_acme") + rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + + rl = l.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("X-Tenant", "something-else") + rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + + require.NoError(t, conn.ConsumeLogs(context.Background(), l)) + + assert.Len(t, defaultSink.AllLogs(), 1) + assert.Len(t, sink0.AllLogs(), 1) + assert.Len(t, sink1.AllLogs(), 0) + + rlog := defaultSink.AllLogs()[0].ResourceLogs().At(0) + attr, ok := rlog.Resource().Attributes().Get("X-Tenant") + assert.True(t, ok, "routing attribute must exists") + assert.Equal(t, attr.AsString(), "something-else") + }) + + t.Run("logs matched by one expression, multiple pipelines", func(t *testing.T) { + resetSinks() + + l := plog.NewLogs() + + rl := l.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("X-Tenant", "ecorp") + rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + + require.NoError(t, conn.ConsumeLogs(context.Background(), l)) + + assert.Len(t, defaultSink.AllLogs(), 1) + assert.Len(t, sink0.AllLogs(), 1) + assert.Len(t, sink1.AllLogs(), 0) + + assert.Equal(t, defaultSink.AllLogs()[0].LogRecordCount(), 1) + assert.Equal(t, sink0.AllLogs()[0].LogRecordCount(), 1) + assert.Equal(t, defaultSink.AllLogs(), sink0.AllLogs()) + }) +} + func TestLogsResourceAttributeDroppedByOTTL(t *testing.T) { logsDefault := component.NewIDWithName(component.DataTypeLogs, "default") logsOther := component.NewIDWithName(component.DataTypeLogs, "other") @@ -245,10 +398,10 @@ func TestLogsResourceAttributeDroppedByOTTL(t *testing.T) { var sink0, sink1 consumertest.LogsSink - router := connectortest.NewLogsRouter( - connectortest.WithLogsSink(logsDefault, &sink0), - connectortest.WithLogsSink(logsOther, &sink1), - ) + router := connector.NewLogsRouter(map[component.ID]consumer.Logs{ + logsDefault: &sink0, + logsOther: &sink1, + }) factory := NewFactory() conn, err := factory.CreateLogsToLogs( @@ -296,10 +449,10 @@ func TestLogsConnectorCapabilities(t *testing.T) { }}, } - router := connectortest.NewLogsRouter( - connectortest.WithNopLogs(logsDefault), - connectortest.WithNopLogs(logsOther), - ) + router := connector.NewLogsRouter(map[component.ID]consumer.Logs{ + logsDefault: consumertest.NewNop(), + logsOther: consumertest.NewNop(), + }) factory := NewFactory() conn, err := factory.CreateLogsToLogs( diff --git a/connector/routingconnector/metadata.yaml b/connector/routingconnector/metadata.yaml index b65774a79be5..0251ca2da379 100644 --- a/connector/routingconnector/metadata.yaml +++ b/connector/routingconnector/metadata.yaml @@ -1,4 +1,5 @@ type: routing +scope_name: otelcol/routing status: class: connector @@ -7,3 +8,7 @@ status: distributions: [contrib] codeowners: active: [jpkrohling, mwear] + +tests: + skip_lifecycle: true + skip_shutdown: true diff --git a/connector/routingconnector/metrics.go b/connector/routingconnector/metrics.go index c0c7fdad5e7e..853d88a34361 100644 --- a/connector/routingconnector/metrics.go +++ b/connector/routingconnector/metrics.go @@ -33,7 +33,7 @@ func newMetricsConnector( ) (*metricsConnector, error) { cfg := config.(*Config) - mr, ok := metrics.(connector.MetricsRouter) + mr, ok := metrics.(connector.MetricsRouterAndConsumer) if !ok { return nil, errUnexpectedConsumer } @@ -72,7 +72,7 @@ func (c *metricsConnector) ConsumeMetrics(ctx context.Context, md pmetric.Metric rtx := ottlresource.NewTransformContext(rmetrics.Resource()) noRoutesMatch := true - for _, route := range c.router.routes { + for _, route := range c.router.routeSlice { _, isMatch, err := route.statement.Execute(ctx, rtx) if err != nil { if c.config.ErrorMode == ottl.PropagateError { @@ -84,6 +84,9 @@ func (c *metricsConnector) ConsumeMetrics(ctx context.Context, md pmetric.Metric if isMatch { noRoutesMatch = false c.group(groups, route.consumer, rmetrics) + if c.config.MatchOnce { + break + } } } diff --git a/connector/routingconnector/metrics_test.go b/connector/routingconnector/metrics_test.go index 377d966865f8..db2421b285d6 100644 --- a/connector/routingconnector/metrics_test.go +++ b/connector/routingconnector/metrics_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/connector/connectortest" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" @@ -40,11 +41,11 @@ func TestMetricsRegisterConsumersForValidRoute(t *testing.T) { var defaultSink, sink0, sink1 consumertest.MetricsSink - router := connectortest.NewMetricsRouter( - connectortest.WithMetricsSink(metricsDefault, &defaultSink), - connectortest.WithMetricsSink(metrics0, &sink0), - connectortest.WithMetricsSink(metrics1, &sink1), - ) + router := connector.NewMetricsRouter(map[component.ID]consumer.Metrics{ + metricsDefault: &defaultSink, + metrics0: &sink0, + metrics1: &sink1, + }) conn, err := NewFactory().CreateMetricsToMetrics(context.Background(), connectortest.NewNopCreateSettings(), cfg, router.(consumer.Metrics)) @@ -99,11 +100,11 @@ func TestMetricsAreCorrectlySplitPerResourceAttributeWithOTTL(t *testing.T) { var defaultSink, sink0, sink1 consumertest.MetricsSink - router := connectortest.NewMetricsRouter( - connectortest.WithMetricsSink(metricsDefault, &defaultSink), - connectortest.WithMetricsSink(metrics0, &sink0), - connectortest.WithMetricsSink(metrics1, &sink1), - ) + router := connector.NewMetricsRouter(map[component.ID]consumer.Metrics{ + metricsDefault: &defaultSink, + metrics0: &sink0, + metrics1: &sink1, + }) resetSinks := func() { defaultSink.Reset() @@ -244,6 +245,173 @@ func TestMetricsAreCorrectlySplitPerResourceAttributeWithOTTL(t *testing.T) { }) } +func TestMetricsAreCorrectlyMatchOnceWithOTTL(t *testing.T) { + metricsDefault := component.NewIDWithName(component.DataTypeMetrics, "default") + metrics0 := component.NewIDWithName(component.DataTypeMetrics, "0") + metrics1 := component.NewIDWithName(component.DataTypeMetrics, "1") + + cfg := &Config{ + DefaultPipelines: []component.ID{metricsDefault}, + Table: []RoutingTableItem{ + { + Statement: `route() where attributes["value"] > 2.5`, + Pipelines: []component.ID{metrics0}, + }, + { + Statement: `route() where attributes["value"] > 3.0`, + Pipelines: []component.ID{metrics1}, + }, + { + Statement: `route() where attributes["value"] == 1.0`, + Pipelines: []component.ID{metricsDefault, metrics0}, + }, + }, + MatchOnce: true, + } + + var defaultSink, sink0, sink1 consumertest.MetricsSink + + router := connector.NewMetricsRouter(map[component.ID]consumer.Metrics{ + metricsDefault: &defaultSink, + metrics0: &sink0, + metrics1: &sink1, + }) + + resetSinks := func() { + defaultSink.Reset() + sink0.Reset() + sink1.Reset() + } + + factory := NewFactory() + conn, err := factory.CreateMetricsToMetrics( + context.Background(), + connectortest.NewNopCreateSettings(), + cfg, + router.(consumer.Metrics), + ) + + require.NoError(t, err) + require.NotNil(t, conn) + require.NoError(t, conn.Start(context.Background(), componenttest.NewNopHost())) + defer func() { + assert.NoError(t, conn.Shutdown(context.Background())) + }() + + t.Run("metric matched by no expressions", func(t *testing.T) { + resetSinks() + + m := pmetric.NewMetrics() + + rm := m.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutDouble("value", 0.0) + metric := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + metric.SetEmptyGauge() + metric.SetName("cpu") + + require.NoError(t, conn.ConsumeMetrics(context.Background(), m)) + + assert.Len(t, defaultSink.AllMetrics(), 1) + assert.Len(t, sink0.AllMetrics(), 0) + assert.Len(t, sink1.AllMetrics(), 0) + }) + + t.Run("metric matched by one of two expressions", func(t *testing.T) { + resetSinks() + + m := pmetric.NewMetrics() + + rm := m.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutDouble("value", 2.7) + metric := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + metric.SetEmptyGauge() + metric.SetName("cpu") + + require.NoError(t, conn.ConsumeMetrics(context.Background(), m)) + + assert.Len(t, defaultSink.AllMetrics(), 0) + assert.Len(t, sink0.AllMetrics(), 1) + assert.Len(t, sink1.AllMetrics(), 0) + }) + + t.Run("metric matched by two expressions, but sinks to one", func(t *testing.T) { + resetSinks() + + m := pmetric.NewMetrics() + + rm := m.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutDouble("value", 5.0) + metric := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + metric.SetEmptyGauge() + metric.SetName("cpu") + + rm = m.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutDouble("value", 3.1) + metric = rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + metric.SetEmptyGauge() + metric.SetName("cpu1") + + require.NoError(t, conn.ConsumeMetrics(context.Background(), m)) + + assert.Len(t, defaultSink.AllMetrics(), 0) + assert.Len(t, sink0.AllMetrics(), 1) + assert.Len(t, sink1.AllMetrics(), 0) + + assert.Equal(t, sink0.AllMetrics()[0].MetricCount(), 2) + }) + + t.Run("one metric matched by 2 expressions, others matched by none", func(t *testing.T) { + resetSinks() + + m := pmetric.NewMetrics() + + rm := m.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutDouble("value", 5.0) + metric := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + metric.SetEmptyGauge() + metric.SetName("cpu") + + rm = m.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutDouble("value", -1.0) + metric = rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + metric.SetEmptyGauge() + metric.SetName("cpu1") + + require.NoError(t, conn.ConsumeMetrics(context.Background(), m)) + + assert.Len(t, defaultSink.AllMetrics(), 1) + assert.Len(t, sink0.AllMetrics(), 1) + assert.Len(t, sink1.AllMetrics(), 0) + + rmetric := defaultSink.AllMetrics()[0].ResourceMetrics().At(0) + attr, ok := rmetric.Resource().Attributes().Get("value") + assert.True(t, ok, "routing attribute must exist") + assert.Equal(t, attr.Double(), float64(-1.0)) + }) + + t.Run("metric matched by one expression, multiple pipelines", func(t *testing.T) { + resetSinks() + + m := pmetric.NewMetrics() + + rm := m.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutDouble("value", 1.0) + metric := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + metric.SetEmptyGauge() + metric.SetName("cpu") + + require.NoError(t, conn.ConsumeMetrics(context.Background(), m)) + + assert.Len(t, defaultSink.AllMetrics(), 1) + assert.Len(t, sink0.AllMetrics(), 1) + assert.Len(t, sink1.AllMetrics(), 0) + + assert.Equal(t, defaultSink.AllMetrics()[0].MetricCount(), 1) + assert.Equal(t, sink0.AllMetrics()[0].MetricCount(), 1) + assert.Equal(t, defaultSink.AllMetrics(), sink0.AllMetrics()) + }) +} + func TestMetricsResourceAttributeDroppedByOTTL(t *testing.T) { metricsDefault := component.NewIDWithName(component.DataTypeMetrics, "default") metricsOther := component.NewIDWithName(component.DataTypeMetrics, "other") @@ -260,10 +428,10 @@ func TestMetricsResourceAttributeDroppedByOTTL(t *testing.T) { var sink0, sink1 consumertest.MetricsSink - router := connectortest.NewMetricsRouter( - connectortest.WithMetricsSink(metricsDefault, &sink0), - connectortest.WithMetricsSink(metricsOther, &sink1), - ) + router := connector.NewMetricsRouter(map[component.ID]consumer.Metrics{ + metricsDefault: &sink0, + metricsOther: &sink1, + }) factory := NewFactory() conn, err := factory.CreateMetricsToMetrics( @@ -311,10 +479,10 @@ func TestMetricsConnectorCapabilities(t *testing.T) { }}, } - router := connectortest.NewMetricsRouter( - connectortest.WithNopMetrics(metricsDefault), - connectortest.WithNopMetrics(metricsOther), - ) + router := connector.NewMetricsRouter(map[component.ID]consumer.Metrics{ + metricsDefault: consumertest.NewNop(), + metricsOther: consumertest.NewNop(), + }) factory := NewFactory() conn, err := factory.CreateMetricsToMetrics( diff --git a/connector/routingconnector/package_test.go b/connector/routingconnector/package_test.go new file mode 100644 index 000000000000..badf42ea5d43 --- /dev/null +++ b/connector/routingconnector/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package routingconnector + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/connector/routingconnector/router.go b/connector/routingconnector/router.go index 65a4b639d1d6..24fc5978a0b6 100644 --- a/connector/routingconnector/router.go +++ b/connector/routingconnector/router.go @@ -6,6 +6,7 @@ package routingconnector // import "github.com/open-telemetry/opentelemetry-coll import ( "errors" "fmt" + "strings" "go.opentelemetry.io/collector/component" "go.uber.org/zap" @@ -29,8 +30,9 @@ type router[C any] struct { logger *zap.Logger parser ottl.Parser[ottlresource.TransformContext] - table []RoutingTableItem - routes map[string]routingItem[C] + table []RoutingTableItem + routes map[string]routingItem[C] + routeSlice []routingItem[C] defaultConsumer C consumerProvider consumerProvider[C] @@ -118,6 +120,13 @@ func (r *router[C]) registerRouteConsumers() error { route, ok := r.routes[key(item)] if !ok { route.statement = statement + } else { + pipelineNames := []string{} + for _, pipeline := range item.Pipelines { + pipelineNames = append(pipelineNames, pipeline.String()) + } + exporters := strings.Join(pipelineNames, ", ") + r.logger.Warn(fmt.Sprintf(`Statement %q already exists in the routing table, the route with target pipeline(s) %q will be ignored.`, item.Statement, exporters)) } consumer, err := r.consumerProvider(item.Pipelines...) @@ -125,6 +134,9 @@ func (r *router[C]) registerRouteConsumers() error { return fmt.Errorf("%w: %s", errPipelineNotFound, err.Error()) } route.consumer = consumer + if !ok { + r.routeSlice = append(r.routeSlice, route) + } r.routes[key(item)] = route } diff --git a/connector/routingconnector/traces.go b/connector/routingconnector/traces.go index 99397d4482ab..1d1b4f2083b0 100644 --- a/connector/routingconnector/traces.go +++ b/connector/routingconnector/traces.go @@ -33,7 +33,7 @@ func newTracesConnector( ) (*tracesConnector, error) { cfg := config.(*Config) - tr, ok := traces.(connector.TracesRouter) + tr, ok := traces.(connector.TracesRouterAndConsumer) if !ok { return nil, errUnexpectedConsumer } @@ -71,7 +71,7 @@ func (c *tracesConnector) ConsumeTraces(ctx context.Context, t ptrace.Traces) er rtx := ottlresource.NewTransformContext(rspans.Resource()) noRoutesMatch := true - for _, route := range c.router.routes { + for _, route := range c.router.routeSlice { _, isMatch, err := route.statement.Execute(ctx, rtx) if err != nil { if c.config.ErrorMode == ottl.PropagateError { @@ -83,6 +83,9 @@ func (c *tracesConnector) ConsumeTraces(ctx context.Context, t ptrace.Traces) er if isMatch { noRoutesMatch = false c.group(groups, route.consumer, rspans) + if c.config.MatchOnce { + break + } } } diff --git a/connector/routingconnector/traces_test.go b/connector/routingconnector/traces_test.go index f45c6fcb7c51..502997a65790 100644 --- a/connector/routingconnector/traces_test.go +++ b/connector/routingconnector/traces_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/connector/connectortest" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" @@ -40,11 +41,11 @@ func TestTracesRegisterConsumersForValidRoute(t *testing.T) { var defaultSink, sink0, sink1 consumertest.TracesSink - router := connectortest.NewTracesRouter( - connectortest.WithTracesSink(tracesDefault, &defaultSink), - connectortest.WithTracesSink(traces0, &sink0), - connectortest.WithTracesSink(traces1, &sink1), - ) + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{ + tracesDefault: &defaultSink, + traces0: &sink0, + traces1: &sink1, + }) conn, err := NewFactory().CreateTracesToTraces(context.Background(), connectortest.NewNopCreateSettings(), cfg, router.(consumer.Traces)) @@ -105,11 +106,11 @@ func TestTracesCorrectlySplitPerResourceAttributeWithOTTL(t *testing.T) { sink1.Reset() } - router := connectortest.NewTracesRouter( - connectortest.WithTracesSink(tracesDefault, &defaultSink), - connectortest.WithTracesSink(traces0, &sink0), - connectortest.WithTracesSink(traces1, &sink1), - ) + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{ + tracesDefault: &defaultSink, + traces1: &sink1, + traces0: &sink0, + }) factory := NewFactory() conn, err := factory.CreateTracesToTraces( @@ -204,6 +205,135 @@ func TestTracesCorrectlySplitPerResourceAttributeWithOTTL(t *testing.T) { }) } +func TestTracesCorrectlyMatchOnceWithOTTL(t *testing.T) { + tracesDefault := component.NewIDWithName(component.DataTypeTraces, "default") + traces0 := component.NewIDWithName(component.DataTypeTraces, "0") + traces1 := component.NewIDWithName(component.DataTypeTraces, "1") + + cfg := &Config{ + DefaultPipelines: []component.ID{tracesDefault}, + MatchOnce: true, + Table: []RoutingTableItem{ + { + Statement: `route() where attributes["value"] > 0 and attributes["value"] < 4`, + Pipelines: []component.ID{traces0}, + }, + { + Statement: `route() where attributes["value"] > 1 and attributes["value"] < 4`, + Pipelines: []component.ID{traces1}, + }, + { + Statement: `route() where attributes["value"] == 5`, + Pipelines: []component.ID{tracesDefault, traces0}, + }, + }, + } + + var defaultSink, sink0, sink1 consumertest.TracesSink + + resetSinks := func() { + defaultSink.Reset() + sink0.Reset() + sink1.Reset() + } + + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{ + tracesDefault: &defaultSink, + traces0: &sink0, + traces1: &sink1, + }) + + factory := NewFactory() + conn, err := factory.CreateTracesToTraces( + context.Background(), + connectortest.NewNopCreateSettings(), + cfg, + router.(consumer.Traces), + ) + + require.NoError(t, err) + require.NotNil(t, conn) + require.NoError(t, conn.Start(context.Background(), componenttest.NewNopHost())) + defer func() { + assert.NoError(t, conn.Shutdown(context.Background())) + }() + + t.Run("span matched by 0 expressions", func(t *testing.T) { + resetSinks() + + tr := ptrace.NewTraces() + rl := tr.ResourceSpans().AppendEmpty() + rl.Resource().Attributes().PutInt("value", 10) + span := rl.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.SetName("span") + + require.NoError(t, conn.ConsumeTraces(context.Background(), tr)) + + assert.Len(t, defaultSink.AllTraces(), 1) + assert.Len(t, sink0.AllTraces(), 0) + assert.Len(t, sink1.AllTraces(), 0) + }) + + t.Run("span matched by one of two expressions", func(t *testing.T) { + resetSinks() + + tr := ptrace.NewTraces() + rl := tr.ResourceSpans().AppendEmpty() + rl.Resource().Attributes().PutInt("value", 1) + span := rl.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.SetName("span") + + require.NoError(t, conn.ConsumeTraces(context.Background(), tr)) + + assert.Len(t, defaultSink.AllTraces(), 0) + assert.Len(t, sink0.AllTraces(), 1) + assert.Len(t, sink1.AllTraces(), 0) + }) + + t.Run("span matched by all expressions, but sinks to one", func(t *testing.T) { + resetSinks() + + tr := ptrace.NewTraces() + rl := tr.ResourceSpans().AppendEmpty() + rl.Resource().Attributes().PutInt("value", 2) + span := rl.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.SetName("span") + + rl = tr.ResourceSpans().AppendEmpty() + rl.Resource().Attributes().PutInt("value", 3) + span = rl.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.SetName("span1") + + require.NoError(t, conn.ConsumeTraces(context.Background(), tr)) + + assert.Len(t, defaultSink.AllTraces(), 0) + assert.Len(t, sink0.AllTraces(), 1) + assert.Len(t, sink1.AllTraces(), 0) + + assert.Equal(t, sink0.AllTraces()[0].SpanCount(), 2) + }) + + t.Run("span matched by one expression, multiple pipelines", func(t *testing.T) { + resetSinks() + + tr := ptrace.NewTraces() + rl := tr.ResourceSpans().AppendEmpty() + rl.Resource().Attributes().PutInt("value", 5) + span := rl.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.SetName("span") + + require.NoError(t, conn.ConsumeTraces(context.Background(), tr)) + + assert.Len(t, defaultSink.AllTraces(), 1) + assert.Len(t, sink0.AllTraces(), 1) + assert.Len(t, sink1.AllTraces(), 0) + + assert.Equal(t, defaultSink.AllTraces()[0].SpanCount(), 1) + assert.Equal(t, sink0.AllTraces()[0].SpanCount(), 1) + assert.Equal(t, defaultSink.AllTraces(), sink0.AllTraces()) + }) +} + func TestTracesResourceAttributeDroppedByOTTL(t *testing.T) { tracesDefault := component.NewIDWithName(component.DataTypeTraces, "default") tracesOther := component.NewIDWithName(component.DataTypeTraces, "other") @@ -220,10 +350,10 @@ func TestTracesResourceAttributeDroppedByOTTL(t *testing.T) { var sink0, sink1 consumertest.TracesSink - router := connectortest.NewTracesRouter( - connectortest.WithTracesSink(tracesDefault, &sink0), - connectortest.WithTracesSink(tracesOther, &sink1), - ) + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{ + tracesDefault: &sink0, + tracesOther: &sink1, + }) factory := NewFactory() conn, err := factory.CreateTracesToTraces( @@ -273,10 +403,10 @@ func TestTraceConnectorCapabilities(t *testing.T) { }}, } - router := connectortest.NewTracesRouter( - connectortest.WithNopTraces(tracesDefault), - connectortest.WithNopTraces(tracesOther), - ) + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{ + tracesDefault: consumertest.NewNop(), + tracesOther: consumertest.NewNop(), + }) factory := NewFactory() conn, err := factory.CreateTracesToTraces( diff --git a/connector/servicegraphconnector/README.md b/connector/servicegraphconnector/README.md index 78a909bac2c2..3c163a88977b 100644 --- a/connector/servicegraphconnector/README.md +++ b/connector/servicegraphconnector/README.md @@ -3,14 +3,12 @@ | Status | | | ------------- |-----------| -| Distributions | [contrib], [grafana], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aconnector%2Fservicegraph%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aconnector%2Fservicegraph) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aconnector%2Fservicegraph%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aconnector%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) | [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[grafana]: https://github.com/grafana/agent -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector ## Supported Pipeline Types @@ -116,6 +114,33 @@ datasources: 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. + - Default: `1m` +- `store_expiration_loop`: the time to expire old entries from the store periodically. + - Default: `2s` +- `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. + - Default: Metrics are flushed on every received batch of traces. +- `database_name_attribute`: the attribute name used to identify the database name from span attributes. + - Default: `db.name` + ## Example configuration ```yaml @@ -126,7 +151,7 @@ receivers: connectors: servicegraph: - latency_histogram_buckets: [1,2,3,4,5] + latency_histogram_buckets: [100ms, 250ms, 1s, 5s, 10s] dimensions: - dimension-1 - dimension-2 diff --git a/connector/servicegraphconnector/config.go b/connector/servicegraphconnector/config.go new file mode 100644 index 000000000000..5f27ea7444df --- /dev/null +++ b/connector/servicegraphconnector/config.go @@ -0,0 +1,52 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package servicegraphconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector" + +import ( + "time" +) + +// Config defines the configuration options for servicegraphprocessor. +type Config struct { + + // MetricsExporter is the name of the metrics exporter to use to ship metrics. + MetricsExporter string `mapstructure:"metrics_exporter"` + + // LatencyHistogramBuckets is the list of durations representing latency histogram buckets. + // See defaultLatencyHistogramBucketsMs in processor.go for the default value. + LatencyHistogramBuckets []time.Duration `mapstructure:"latency_histogram_buckets"` + + // Dimensions defines the list of additional dimensions on top of the provided: + // - client + // - server + // - failed + // - connection_type + // The dimensions will be fetched from the span's attributes. Examples of some conventionally used attributes: + // https://github.com/open-telemetry/opentelemetry-collector/blob/main/model/semconv/opentelemetry.go. + Dimensions []string `mapstructure:"dimensions"` + + // Store contains the config for the in-memory store used to find requests between services by pairing spans. + Store StoreConfig `mapstructure:"store"` + // CacheLoop is the time to cleans the cache periodically. + CacheLoop time.Duration `mapstructure:"cache_loop"` + // CacheLoop is the time to expire old entries from the store periodically. + StoreExpirationLoop time.Duration `mapstructure:"store_expiration_loop"` + // VirtualNodePeerAttributes the list of attributes need to match, the higher the front, the higher the priority. + VirtualNodePeerAttributes []string `mapstructure:"virtual_node_peer_attributes"` + + // MetricsFlushInterval is the interval at which metrics are flushed to the exporter. + // If set to 0, metrics are flushed on every received batch of traces. + MetricsFlushInterval time.Duration `mapstructure:"metrics_flush_interval"` + + // DatabaseNameAttribute is the attribute name used to identify the database name from span attributes. + // The default value is db.name. + DatabaseNameAttribute string `mapstructure:"database_name_attribute"` +} + +type StoreConfig struct { + // MaxItems is the maximum number of items to keep in the store. + MaxItems int `mapstructure:"max_items"` + // TTL is the time to live for items in the store. + TTL time.Duration `mapstructure:"ttl"` +} diff --git a/connector/servicegraphconnector/config_test.go b/connector/servicegraphconnector/config_test.go new file mode 100644 index 000000000000..8357c09535f8 --- /dev/null +++ b/connector/servicegraphconnector/config_test.go @@ -0,0 +1,46 @@ +// 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, + DatabaseNameAttribute: "db.name", + }, + cfg.Connectors[component.NewID(metadata.Type)], + ) + +} diff --git a/connector/servicegraphconnector/connector.go b/connector/servicegraphconnector/connector.go new file mode 100644 index 000000000000..bd8a22a431be --- /dev/null +++ b/connector/servicegraphconnector/connector.go @@ -0,0 +1,711 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package servicegraphconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector" + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + "sync" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + semconv "go.opentelemetry.io/collector/semconv/v1.13.0" + "go.opentelemetry.io/otel/metric" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector/internal/store" +) + +const ( + metricKeySeparator = string(byte(0)) + clientKind = "client" + serverKind = "server" +) + +var ( + legacyDefaultLatencyHistogramBuckets = []float64{ + 2, 4, 6, 8, 10, 50, 100, 200, 400, 800, 1000, 1400, 2000, 5000, 10_000, 15_000, + } + defaultLatencyHistogramBuckets = []float64{ + 0.002, 0.004, 0.006, 0.008, 0.01, 0.05, 0.1, 0.2, 0.4, 0.8, 1, 1.4, 2, 5, 10, 15, + } + + defaultPeerAttributes = []string{ + semconv.AttributeDBName, semconv.AttributeNetSockPeerAddr, semconv.AttributeNetPeerName, semconv.AttributeRPCService, semconv.AttributeNetSockPeerName, semconv.AttributeNetPeerName, semconv.AttributeHTTPURL, semconv.AttributeHTTPTarget, + } + + defaultDatabaseNameAttribute = semconv.AttributeDBName +) + +type metricSeries struct { + dimensions pcommon.Map + lastUpdated int64 // Used to remove stale series +} + +var _ processor.Traces = (*serviceGraphConnector)(nil) + +type serviceGraphConnector struct { + config *Config + logger *zap.Logger + metricsConsumer consumer.Metrics + + store *store.Store + + startTime time.Time + + seriesMutex sync.Mutex + reqTotal map[string]int64 + reqFailedTotal map[string]int64 + reqClientDurationSecondsCount map[string]uint64 + reqClientDurationSecondsSum map[string]float64 + reqClientDurationSecondsBucketCounts map[string][]uint64 + reqServerDurationSecondsCount map[string]uint64 + reqServerDurationSecondsSum map[string]float64 + reqServerDurationSecondsBucketCounts map[string][]uint64 + reqDurationBounds []float64 + + metricMutex sync.RWMutex + keyToMetric map[string]metricSeries + + statDroppedSpans metric.Int64Counter + statTotalEdges metric.Int64Counter + statExpiredEdges metric.Int64Counter + + shutdownCh chan any +} + +func customMetricName(name string) string { + return "connector/" + metadata.Type.String() + "/" + name +} + +func newConnector(set component.TelemetrySettings, config component.Config) *serviceGraphConnector { + pConfig := config.(*Config) + + bounds := defaultLatencyHistogramBuckets + if legacyLatencyUnitMsFeatureGate.IsEnabled() { + bounds = legacyDefaultLatencyHistogramBuckets + } + if pConfig.LatencyHistogramBuckets != nil { + bounds = mapDurationsToFloat(pConfig.LatencyHistogramBuckets) + } + + if pConfig.CacheLoop <= 0 { + pConfig.CacheLoop = time.Minute + } + + if pConfig.StoreExpirationLoop <= 0 { + pConfig.StoreExpirationLoop = 2 * time.Second + } + + if pConfig.VirtualNodePeerAttributes == nil { + pConfig.VirtualNodePeerAttributes = defaultPeerAttributes + } + + if pConfig.DatabaseNameAttribute == "" { + pConfig.DatabaseNameAttribute = defaultDatabaseNameAttribute + } + + meter := metadata.Meter(set) + + droppedSpan, _ := meter.Int64Counter( + customMetricName("dropped_spans"), + metric.WithDescription("Number of spans dropped when trying to add edges"), + metric.WithUnit("1"), + ) + totalEdges, _ := meter.Int64Counter( + customMetricName("total_edges"), + metric.WithDescription("Total number of unique edges"), + metric.WithUnit("1"), + ) + expiredEdges, _ := meter.Int64Counter( + customMetricName("expired_edges"), + metric.WithDescription("Number of edges that expired before finding its matching span"), + metric.WithUnit("1"), + ) + + return &serviceGraphConnector{ + config: pConfig, + logger: set.Logger, + startTime: time.Now(), + reqTotal: make(map[string]int64), + reqFailedTotal: make(map[string]int64), + reqClientDurationSecondsCount: make(map[string]uint64), + reqClientDurationSecondsSum: make(map[string]float64), + reqClientDurationSecondsBucketCounts: make(map[string][]uint64), + reqServerDurationSecondsCount: make(map[string]uint64), + reqServerDurationSecondsSum: make(map[string]float64), + reqServerDurationSecondsBucketCounts: make(map[string][]uint64), + reqDurationBounds: bounds, + keyToMetric: make(map[string]metricSeries), + shutdownCh: make(chan any), + statDroppedSpans: droppedSpan, + statTotalEdges: totalEdges, + statExpiredEdges: expiredEdges, + } +} + +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 { + exporters := host.GetExporters() //nolint:staticcheck + + // The available list of exporters come from any configured metrics pipelines' exporters. + for k, exp := range exporters[component.DataTypeMetrics] { + metricsExp, ok := exp.(exporter.Metrics) + if k.String() == p.config.MetricsExporter && ok { + p.metricsConsumer = metricsExp + break + } + } + + if p.metricsConsumer == nil { + return fmt.Errorf("failed to find metrics exporter: %s", + p.config.MetricsExporter) + } + } + + go p.metricFlushLoop(p.config.MetricsFlushInterval) + + go p.cacheLoop(p.config.CacheLoop) + + go p.storeExpirationLoop(p.config.StoreExpirationLoop) + + p.logger.Info("Started servicegraphconnector") + return nil +} + +func (p *serviceGraphConnector) metricFlushLoop(flushInterval time.Duration) { + if flushInterval <= 0 { + return + } + + ticker := time.NewTicker(flushInterval) + defer ticker.Stop() + + for { + select { + case <-ticker.C: + if err := p.flushMetrics(context.Background()); err != nil { + p.logger.Error("failed to flush metrics", zap.Error(err)) + } + case <-p.shutdownCh: + return + } + } +} + +func (p *serviceGraphConnector) flushMetrics(ctx context.Context) error { + md, err := p.buildMetrics() + if err != nil { + return fmt.Errorf("failed to build metrics: %w", err) + } + + // Skip empty metrics. + if md.MetricCount() == 0 { + return nil + } + + // Firstly, export md to avoid being impacted by downstream trace serviceGraphConnector errors/latency. + return p.metricsConsumer.ConsumeMetrics(ctx, md) +} + +func (p *serviceGraphConnector) Shutdown(_ context.Context) error { + p.logger.Info("Shutting down servicegraphconnector") + close(p.shutdownCh) + return nil +} + +func (p *serviceGraphConnector) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: false} +} + +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) + } + + // If metricsFlushInterval is not set, flush metrics immediately. + if p.config.MetricsFlushInterval <= 0 { + if err := p.flushMetrics(ctx); err != nil { + // Not return error here to avoid impacting traces. + p.logger.Error("failed to flush metrics", zap.Error(err)) + } + } + + return nil +} + +func (p *serviceGraphConnector) aggregateMetrics(ctx context.Context, td ptrace.Traces) (err error) { + var ( + isNew bool + totalDroppedSpans int + ) + + rss := td.ResourceSpans() + for i := 0; i < rss.Len(); i++ { + rSpans := rss.At(i) + + rAttributes := rSpans.Resource().Attributes() + + serviceName, ok := findServiceName(rAttributes) + if !ok { + // If service.name doesn't exist, skip processing this trace + continue + } + + scopeSpans := rSpans.ScopeSpans() + for j := 0; j < scopeSpans.Len(); j++ { + spans := scopeSpans.At(j).Spans() + for k := 0; k < spans.Len(); k++ { + span := spans.At(k) + + connectionType := store.Unknown + + switch span.Kind() { + case ptrace.SpanKindProducer: + // override connection type and continue processing as span kind client + connectionType = store.MessagingSystem + fallthrough + case ptrace.SpanKindClient: + traceID := span.TraceID() + key := store.NewKey(traceID, span.SpanID()) + isNew, err = p.store.UpsertEdge(key, func(e *store.Edge) { + e.TraceID = traceID + e.ConnectionType = connectionType + e.ClientService = serviceName + e.ClientLatencySec = spanDuration(span) + e.Failed = e.Failed || span.Status().Code() == ptrace.StatusCodeError + p.upsertDimensions(clientKind, e.Dimensions, rAttributes, span.Attributes()) + + if virtualNodeFeatureGate.IsEnabled() { + p.upsertPeerAttributes(p.config.VirtualNodePeerAttributes, e.Peer, span.Attributes()) + } + + // A database request will only have one span, we don't wait for the server + // span but just copy details from the client span + if dbName, ok := findAttributeValue(p.config.DatabaseNameAttribute, rAttributes, span.Attributes()); ok { + e.ConnectionType = store.Database + e.ServerService = dbName + e.ServerLatencySec = spanDuration(span) + } + }) + case ptrace.SpanKindConsumer: + // override connection type and continue processing as span kind server + connectionType = store.MessagingSystem + fallthrough + case ptrace.SpanKindServer: + traceID := span.TraceID() + key := store.NewKey(traceID, span.ParentSpanID()) + isNew, err = p.store.UpsertEdge(key, func(e *store.Edge) { + e.TraceID = traceID + e.ConnectionType = connectionType + e.ServerService = serviceName + e.ServerLatencySec = spanDuration(span) + e.Failed = e.Failed || span.Status().Code() == ptrace.StatusCodeError + p.upsertDimensions(serverKind, e.Dimensions, rAttributes, span.Attributes()) + }) + default: + // this span is not part of an edge + continue + } + + if errors.Is(err, store.ErrTooManyItems) { + totalDroppedSpans++ + p.statDroppedSpans.Add(ctx, 1) + continue + } + + // UpsertEdge will only return ErrTooManyItems + if err != nil { + return err + } + + if isNew { + p.statTotalEdges.Add(ctx, 1) + } + } + } + } + return nil +} + +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 + } + } +} + +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 + break + } + } +} + +func (p *serviceGraphConnector) onComplete(e *store.Edge) { + p.logger.Debug( + "edge completed", + zap.String("client_service", e.ClientService), + zap.String("server_service", e.ServerService), + zap.String("connection_type", string(e.ConnectionType)), + zap.Stringer("trace_id", e.TraceID), + ) + p.aggregateMetricsForEdge(e) +} + +func (p *serviceGraphConnector) onExpire(e *store.Edge) { + p.logger.Debug( + "edge expired", + zap.String("client_service", e.ClientService), + zap.String("server_service", e.ServerService), + zap.String("connection_type", string(e.ConnectionType)), + zap.Stringer("trace_id", e.TraceID), + ) + + p.statExpiredEdges.Add(context.Background(), 1) + + if virtualNodeFeatureGate.IsEnabled() { + e.ConnectionType = store.VirtualNode + if len(e.ClientService) == 0 && e.Key.SpanIDIsEmpty() { + e.ClientService = "user" + p.onComplete(e) + } + + if len(e.ServerService) == 0 { + e.ServerService = p.getPeerHost(p.config.VirtualNodePeerAttributes, e.Peer) + p.onComplete(e) + } + } +} + +func (p *serviceGraphConnector) aggregateMetricsForEdge(e *store.Edge) { + metricKey := p.buildMetricKey(e.ClientService, e.ServerService, string(e.ConnectionType), e.Dimensions) + dimensions := buildDimensions(e) + + p.seriesMutex.Lock() + defer p.seriesMutex.Unlock() + p.updateSeries(metricKey, dimensions) + p.updateCountMetrics(metricKey) + if e.Failed { + p.updateErrorMetrics(metricKey) + } + p.updateDurationMetrics(metricKey, e.ServerLatencySec, e.ClientLatencySec) +} + +func (p *serviceGraphConnector) updateSeries(key string, dimensions pcommon.Map) { + p.metricMutex.Lock() + defer p.metricMutex.Unlock() + // Overwrite the series if it already exists + p.keyToMetric[key] = metricSeries{ + dimensions: dimensions, + lastUpdated: time.Now().UnixMilli(), + } +} + +func (p *serviceGraphConnector) dimensionsForSeries(key string) (pcommon.Map, bool) { + p.metricMutex.RLock() + defer p.metricMutex.RUnlock() + if series, ok := p.keyToMetric[key]; ok { + return series.dimensions, true + } + + return pcommon.Map{}, false +} + +func (p *serviceGraphConnector) updateCountMetrics(key string) { p.reqTotal[key]++ } + +func (p *serviceGraphConnector) updateErrorMetrics(key string) { p.reqFailedTotal[key]++ } + +func (p *serviceGraphConnector) updateDurationMetrics(key string, serverDuration, clientDuration float64) { + p.updateServerDurationMetrics(key, serverDuration) + p.updateClientDurationMetrics(key, clientDuration) +} + +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) + } + p.reqServerDurationSecondsSum[key] += duration + p.reqServerDurationSecondsCount[key]++ + p.reqServerDurationSecondsBucketCounts[key][index]++ +} + +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) + } + p.reqClientDurationSecondsSum[key] += duration + p.reqClientDurationSecondsCount[key]++ + p.reqClientDurationSecondsBucketCounts[key][index]++ +} + +func buildDimensions(e *store.Edge) pcommon.Map { + dims := pcommon.NewMap() + dims.PutStr("client", e.ClientService) + dims.PutStr("server", e.ServerService) + dims.PutStr("connection_type", string(e.ConnectionType)) + dims.PutBool("failed", e.Failed) + for k, v := range e.Dimensions { + dims.PutStr(k, v) + } + return dims +} + +func (p *serviceGraphConnector) buildMetrics() (pmetric.Metrics, error) { + m := pmetric.NewMetrics() + ilm := m.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty() + ilm.Scope().SetName("traces_service_graph") + + // Obtain write lock to reset data + p.seriesMutex.Lock() + defer p.seriesMutex.Unlock() + + if err := p.collectCountMetrics(ilm); err != nil { + return m, err + } + + if err := p.collectLatencyMetrics(ilm); err != nil { + return m, err + } + + return m, nil +} + +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") + mCount.SetEmptySum().SetIsMonotonic(true) + // TODO: Support other aggregation temporalities + mCount.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + + dpCalls := mCount.Sum().DataPoints().AppendEmpty() + dpCalls.SetStartTimestamp(pcommon.NewTimestampFromTime(p.startTime)) + dpCalls.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + dpCalls.SetIntValue(c) + + dimensions, ok := p.dimensionsForSeries(key) + if !ok { + return fmt.Errorf("failed to find dimensions for key %s", key) + } + + dimensions.CopyTo(dpCalls.Attributes()) + } + + for key, c := range p.reqFailedTotal { + mCount := ilm.Metrics().AppendEmpty() + mCount.SetName("traces_service_graph_request_failed_total") + mCount.SetEmptySum().SetIsMonotonic(true) + // TODO: Support other aggregation temporalities + mCount.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + + dpCalls := mCount.Sum().DataPoints().AppendEmpty() + dpCalls.SetStartTimestamp(pcommon.NewTimestampFromTime(p.startTime)) + dpCalls.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + dpCalls.SetIntValue(c) + + dimensions, ok := p.dimensionsForSeries(key) + if !ok { + return fmt.Errorf("failed to find dimensions for key %s", key) + } + + dimensions.CopyTo(dpCalls.Attributes()) + } + + return nil +} + +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") + } + + if err := p.collectServerLatencyMetrics(ilm, "traces_service_graph_request_server_seconds"); err != nil { + return err + } + + return p.collectClientLatencyMetrics(ilm) +} + +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") + // TODO: Support other aggregation temporalities + mDuration.SetEmptyHistogram().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + + timestamp := pcommon.NewTimestampFromTime(time.Now()) + + dpDuration := mDuration.Histogram().DataPoints().AppendEmpty() + dpDuration.SetStartTimestamp(pcommon.NewTimestampFromTime(p.startTime)) + dpDuration.SetTimestamp(timestamp) + dpDuration.ExplicitBounds().FromRaw(p.reqDurationBounds) + dpDuration.BucketCounts().FromRaw(p.reqServerDurationSecondsBucketCounts[key]) + dpDuration.SetCount(p.reqServerDurationSecondsCount[key]) + dpDuration.SetSum(p.reqServerDurationSecondsSum[key]) + + // TODO: Support exemplars + dimensions, ok := p.dimensionsForSeries(key) + if !ok { + return fmt.Errorf("failed to find dimensions for key %s", key) + } + + dimensions.CopyTo(dpDuration.Attributes()) + } + return nil +} + +func (p *serviceGraphConnector) collectServerLatencyMetrics(ilm pmetric.ScopeMetrics, mName string) error { + for key := range p.reqServerDurationSecondsCount { + mDuration := ilm.Metrics().AppendEmpty() + mDuration.SetName(mName) + // TODO: Support other aggregation temporalities + mDuration.SetEmptyHistogram().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + + timestamp := pcommon.NewTimestampFromTime(time.Now()) + + dpDuration := mDuration.Histogram().DataPoints().AppendEmpty() + dpDuration.SetStartTimestamp(pcommon.NewTimestampFromTime(p.startTime)) + dpDuration.SetTimestamp(timestamp) + dpDuration.ExplicitBounds().FromRaw(p.reqDurationBounds) + dpDuration.BucketCounts().FromRaw(p.reqClientDurationSecondsBucketCounts[key]) + dpDuration.SetCount(p.reqClientDurationSecondsCount[key]) + dpDuration.SetSum(p.reqClientDurationSecondsSum[key]) + + // TODO: Support exemplars + dimensions, ok := p.dimensionsForSeries(key) + if !ok { + return fmt.Errorf("failed to find dimensions for key %s", key) + } + + dimensions.CopyTo(dpDuration.Attributes()) + } + return nil +} + +func (p *serviceGraphConnector) buildMetricKey(clientName, serverName, connectionType string, edgeDimensions map[string]string) string { + var metricKey strings.Builder + metricKey.WriteString(clientName + metricKeySeparator + serverName + metricKeySeparator + connectionType) + + for _, dimName := range p.config.Dimensions { + dim, ok := edgeDimensions[dimName] + if !ok { + continue + } + metricKey.WriteString(metricKeySeparator + dim) + } + + return metricKey.String() +} + +// storeExpirationLoop periodically expires old entries from the store. +func (p *serviceGraphConnector) storeExpirationLoop(d time.Duration) { + t := time.NewTicker(d) + for { + select { + case <-t.C: + p.store.Expire() + case <-p.shutdownCh: + return + } + } +} + +func (p *serviceGraphConnector) getPeerHost(m []string, peers map[string]string) string { + peerStr := "unknown" + for _, s := range m { + if peer, ok := peers[s]; ok { + peerStr = peer + break + } + } + return peerStr +} + +// cacheLoop periodically cleans the cache +func (p *serviceGraphConnector) cacheLoop(d time.Duration) { + t := time.NewTicker(d) + for { + select { + case <-t.C: + p.cleanCache() + case <-p.shutdownCh: + return + } + } + +} + +// cleanCache removes series that have not been updated in 15 minutes +func (p *serviceGraphConnector) cleanCache() { + var staleSeries []string + p.metricMutex.RLock() + for key, series := range p.keyToMetric { + if series.lastUpdated+15*time.Minute.Milliseconds() < time.Now().UnixMilli() { + staleSeries = append(staleSeries, key) + } + } + p.metricMutex.RUnlock() + + p.seriesMutex.Lock() + for _, key := range staleSeries { + delete(p.reqTotal, key) + delete(p.reqFailedTotal, key) + delete(p.reqClientDurationSecondsCount, key) + delete(p.reqClientDurationSecondsSum, key) + delete(p.reqClientDurationSecondsBucketCounts, key) + delete(p.reqServerDurationSecondsCount, key) + delete(p.reqServerDurationSecondsSum, key) + delete(p.reqServerDurationSecondsBucketCounts, key) + } + p.seriesMutex.Unlock() + + p.metricMutex.Lock() + for _, key := range staleSeries { + delete(p.keyToMetric, key) + } + p.metricMutex.Unlock() +} + +// spanDuration returns the duration of the given span in seconds (legacy ms). +func spanDuration(span ptrace.Span) float64 { + if legacyLatencyUnitMsFeatureGate.IsEnabled() { + return float64(span.EndTimestamp()-span.StartTimestamp()) / float64(time.Millisecond.Nanoseconds()) + } + return float64(span.EndTimestamp()-span.StartTimestamp()) / float64(time.Second.Nanoseconds()) +} + +// durationToFloat converts the given duration to the number of seconds (legacy ms) it represents. +func durationToFloat(d time.Duration) float64 { + if legacyLatencyUnitMsFeatureGate.IsEnabled() { + return float64(d.Milliseconds()) + } + return d.Seconds() +} + +func mapDurationsToFloat(vs []time.Duration) []float64 { + vsm := make([]float64, len(vs)) + for i, v := range vs { + vsm[i] = durationToFloat(v) + } + return vsm +} diff --git a/connector/servicegraphconnector/connector_test.go b/connector/servicegraphconnector/connector_test.go new file mode 100644 index 000000000000..9537104ced61 --- /dev/null +++ b/connector/servicegraphconnector/connector_test.go @@ -0,0 +1,479 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package servicegraphconnector + +import ( + "context" + "crypto/rand" + "sync" + "testing" + "time" + + "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/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/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + semconv "go.opentelemetry.io/collector/semconv/v1.13.0" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" + "go.uber.org/zap/zaptest" +) + +func TestConnectorStart(t *testing.T) { + // Create servicegraph connector + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + + procCreationParams := connectortest.NewNopCreateSettings() + traceConnector, err := factory.CreateTracesToMetrics(context.Background(), procCreationParams, cfg, consumertest.NewNop()) + require.NoError(t, err) + + // Test + smp := traceConnector.(*serviceGraphConnector) + err = smp.Start(context.Background(), componenttest.NewNopHost()) + defer require.NoError(t, smp.Shutdown(context.Background())) + + // Verify + assert.NoError(t, err) +} + +func TestConnectorShutdown(t *testing.T) { + // Prepare + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + + // Test + next := new(consumertest.MetricsSink) + set := componenttest.NewNopTelemetrySettings() + set.Logger = zaptest.NewLogger(t) + p := newConnector(set, cfg) + p.metricsConsumer = next + err := p.Shutdown(context.Background()) + + // Verify + assert.NoError(t, err) +} + +func TestConnectorConsume(t *testing.T) { + // Prepare + cfg := &Config{ + Dimensions: []string{"some-attribute", "non-existing-attribute"}, + Store: StoreConfig{MaxItems: 10}, + } + + set := componenttest.NewNopTelemetrySettings() + set.Logger = zaptest.NewLogger(t) + conn := newConnector(set, cfg) + conn.metricsConsumer = newMockMetricsExporter() + + assert.NoError(t, conn.Start(context.Background(), componenttest.NewNopHost())) + + // Test & verify + td := buildSampleTrace(t, "val") + // The assertion is part of verifyHappyCaseMetrics func. + assert.NoError(t, conn.ConsumeTraces(context.Background(), td)) + + // Force collection + conn.store.Expire() + md, err := conn.buildMetrics() + assert.NoError(t, err) + verifyHappyCaseMetrics(t, md) + + // Shutdown the connector + assert.NoError(t, conn.Shutdown(context.Background())) +} + +func verifyHappyCaseMetrics(t *testing.T, md pmetric.Metrics) { + verifyHappyCaseMetricsWithDuration(1)(t, md) +} + +func verifyHappyCaseMetricsWithDuration(durationSum float64) func(t *testing.T, md pmetric.Metrics) { + return func(t *testing.T, md pmetric.Metrics) { + assert.Equal(t, 3, md.MetricCount()) + + rms := md.ResourceMetrics() + assert.Equal(t, 1, rms.Len()) + + sms := rms.At(0).ScopeMetrics() + assert.Equal(t, 1, sms.Len()) + + ms := sms.At(0).Metrics() + assert.Equal(t, 3, ms.Len()) + + mCount := ms.At(0) + verifyCount(t, mCount) + + mServerDuration := ms.At(1) + assert.Equal(t, "traces_service_graph_request_server_seconds", mServerDuration.Name()) + verifyDuration(t, mServerDuration, durationSum) + + mClientDuration := ms.At(2) + assert.Equal(t, "traces_service_graph_request_client_seconds", mClientDuration.Name()) + verifyDuration(t, mClientDuration, durationSum) + } +} + +func verifyCount(t *testing.T, m pmetric.Metric) { + assert.Equal(t, "traces_service_graph_request_total", m.Name()) + + assert.Equal(t, pmetric.MetricTypeSum, m.Type()) + dps := m.Sum().DataPoints() + assert.Equal(t, 1, dps.Len()) + + dp := dps.At(0) + assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType()) + assert.Equal(t, int64(1), dp.IntValue()) + + attributes := dp.Attributes() + assert.Equal(t, 5, attributes.Len()) + verifyAttr(t, attributes, "client", "some-service") + verifyAttr(t, attributes, "server", "some-service") + verifyAttr(t, attributes, "connection_type", "") + verifyAttr(t, attributes, "failed", "false") + verifyAttr(t, attributes, "client_some-attribute", "val") +} + +func verifyDuration(t *testing.T, m pmetric.Metric, durationSum float64) { + assert.Equal(t, pmetric.MetricTypeHistogram, m.Type()) + dps := m.Histogram().DataPoints() + assert.Equal(t, 1, dps.Len()) + + dp := dps.At(0) + assert.Equal(t, durationSum, dp.Sum()) // Duration: 1sec + assert.Equal(t, uint64(1), dp.Count()) + buckets := pcommon.NewUInt64Slice() + buckets.FromRaw([]uint64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}) + assert.Equal(t, buckets, dp.BucketCounts()) + + attributes := dp.Attributes() + assert.Equal(t, 5, attributes.Len()) + verifyAttr(t, attributes, "client", "some-service") + verifyAttr(t, attributes, "server", "some-service") + verifyAttr(t, attributes, "connection_type", "") + verifyAttr(t, attributes, "client_some-attribute", "val") +} + +func verifyAttr(t *testing.T, attrs pcommon.Map, k, expected string) { + v, ok := attrs.Get(k) + assert.True(t, ok) + assert.Equal(t, expected, v.AsString()) +} + +func buildSampleTrace(t *testing.T, attrValue string) 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-service") + + scopeSpans := resourceSpans.ScopeSpans().AppendEmpty() + + var traceID pcommon.TraceID + _, err := rand.Read(traceID[:]) + assert.NoError(t, err) + + var clientSpanID, serverSpanID pcommon.SpanID + _, err = rand.Read(clientSpanID[:]) + assert.NoError(t, err) + _, err = rand.Read(serverSpanID[:]) + assert.NoError(t, err) + + clientSpan := scopeSpans.Spans().AppendEmpty() + clientSpan.SetName("client span") + clientSpan.SetSpanID(clientSpanID) + clientSpan.SetTraceID(traceID) + clientSpan.SetKind(ptrace.SpanKindClient) + clientSpan.SetStartTimestamp(pcommon.NewTimestampFromTime(tStart)) + clientSpan.SetEndTimestamp(pcommon.NewTimestampFromTime(tEnd)) + clientSpan.Attributes().PutStr("some-attribute", attrValue) // Attribute selected as dimension for metrics + + serverSpan := scopeSpans.Spans().AppendEmpty() + serverSpan.SetName("server span") + serverSpan.SetSpanID(serverSpanID) + serverSpan.SetTraceID(traceID) + serverSpan.SetParentSpanID(clientSpanID) + serverSpan.SetKind(ptrace.SpanKindServer) + serverSpan.SetStartTimestamp(pcommon.NewTimestampFromTime(tStart)) + serverSpan.SetEndTimestamp(pcommon.NewTimestampFromTime(tEnd)) + + return traces +} + +type mockHost struct { + component.Host + exps map[component.DataType]map[component.ID]component.Component +} + +func newMockHost(exps map[component.DataType]map[component.ID]component.Component) component.Host { + return &mockHost{ + Host: componenttest.NewNopHost(), + exps: exps, + } +} + +func (m *mockHost) GetExporters() map[component.DataType]map[component.ID]component.Component { + return m.exps +} + +var _ exporter.Metrics = (*mockMetricsExporter)(nil) + +func newMockMetricsExporter() *mockMetricsExporter { + return &mockMetricsExporter{} +} + +type mockMetricsExporter struct { + mtx sync.Mutex + md []pmetric.Metrics +} + +func (m *mockMetricsExporter) Start(context.Context, component.Host) error { return nil } + +func (m *mockMetricsExporter) Shutdown(context.Context) error { return nil } + +func (m *mockMetricsExporter) Capabilities() consumer.Capabilities { return consumer.Capabilities{} } + +func (m *mockMetricsExporter) ConsumeMetrics(_ context.Context, md pmetric.Metrics) error { + m.mtx.Lock() + defer m.mtx.Unlock() + m.md = append(m.md, md) + return nil +} + +func TestUpdateDurationMetrics(t *testing.T) { + p := serviceGraphConnector{ + reqTotal: make(map[string]int64), + reqFailedTotal: make(map[string]int64), + reqServerDurationSecondsSum: make(map[string]float64), + reqServerDurationSecondsCount: make(map[string]uint64), + reqServerDurationSecondsBucketCounts: make(map[string][]uint64), + reqClientDurationSecondsSum: make(map[string]float64), + reqClientDurationSecondsCount: make(map[string]uint64), + reqClientDurationSecondsBucketCounts: make(map[string][]uint64), + reqDurationBounds: defaultLatencyHistogramBuckets, + keyToMetric: make(map[string]metricSeries), + config: &Config{ + Dimensions: []string{}, + }, + } + metricKey := p.buildMetricKey("foo", "bar", "", map[string]string{}) + + testCases := []struct { + caseStr string + duration float64 + }{ + + { + caseStr: "index 0 latency", + duration: 0, + }, + { + caseStr: "out-of-range latency 1", + duration: 25_000, + }, + { + caseStr: "out-of-range latency 2", + duration: 125_000, + }, + } + for _, tc := range testCases { + t.Run(tc.caseStr, func(_ *testing.T) { + p.updateDurationMetrics(metricKey, tc.duration, tc.duration) + }) + } +} + +func TestStaleSeriesCleanup(t *testing.T) { + // Prepare + cfg := &Config{ + MetricsExporter: "mock", + Dimensions: []string{"some-attribute", "non-existing-attribute"}, + Store: StoreConfig{ + MaxItems: 10, + TTL: time.Second, + }, + } + + mockMetricsExporter := newMockMetricsExporter() + + set := componenttest.NewNopTelemetrySettings() + set.Logger = zaptest.NewLogger(t) + p := newConnector(set, cfg) + + mHost := newMockHost(map[component.DataType]map[component.ID]component.Component{ + component.DataTypeMetrics: { + component.MustNewID("mock"): mockMetricsExporter, + }, + }) + + assert.NoError(t, p.Start(context.Background(), mHost)) + + // ConsumeTraces + td := buildSampleTrace(t, "first") + assert.NoError(t, p.ConsumeTraces(context.Background(), td)) + + // Make series stale and force a cache cleanup + for key, metric := range p.keyToMetric { + metric.lastUpdated = 0 + p.keyToMetric[key] = metric + } + p.cleanCache() + assert.Equal(t, 0, len(p.keyToMetric)) + + // ConsumeTraces with a trace with different attribute value + td = buildSampleTrace(t, "second") + assert.NoError(t, p.ConsumeTraces(context.Background(), td)) + + // Shutdown the connector + assert.NoError(t, p.Shutdown(context.Background())) +} + +func TestMapsAreConsistentDuringCleanup(t *testing.T) { + // Prepare + cfg := &Config{ + MetricsExporter: "mock", + Dimensions: []string{"some-attribute", "non-existing-attribute"}, + Store: StoreConfig{ + MaxItems: 10, + TTL: time.Second, + }, + } + + mockMetricsExporter := newMockMetricsExporter() + + set := componenttest.NewNopTelemetrySettings() + set.Logger = zaptest.NewLogger(t) + p := newConnector(set, cfg) + + mHost := newMockHost(map[component.DataType]map[component.ID]component.Component{ + component.DataTypeMetrics: { + component.MustNewID("mock"): mockMetricsExporter, + }, + }) + + assert.NoError(t, p.Start(context.Background(), mHost)) + + // ConsumeTraces + td := buildSampleTrace(t, "first") + assert.NoError(t, p.ConsumeTraces(context.Background(), td)) + + // Make series stale and force a cache cleanup + for key, metric := range p.keyToMetric { + metric.lastUpdated = 0 + p.keyToMetric[key] = metric + } + + // Start cleanup, but use locks to pretend that we are: + // - currently collecting metrics (so seriesMutex is locked) + // - currently getting dimensions for that series (so metricMutex is locked) + p.seriesMutex.Lock() + p.metricMutex.RLock() + go p.cleanCache() + + // Since everything is locked, nothing has happened, so both should still have length 1 + assert.Equal(t, 1, len(p.reqTotal)) + assert.Equal(t, 1, len(p.keyToMetric)) + + // Now we pretend that we have stopped collecting metrics, by unlocking seriesMutex + p.seriesMutex.Unlock() + + // Make sure cleanupCache has continued to the next mutex + time.Sleep(time.Millisecond) + p.seriesMutex.Lock() + + // The expired series should have been removed. The metrics collector now won't look + // for dimensions from that series. It's important that it happens this way around, + // instead of deleting it from `keyToMetric`, otherwise the metrics collector will try + // and fail to find dimensions for a series that is about to be removed. + assert.Equal(t, 0, len(p.reqTotal)) + assert.Equal(t, 1, len(p.keyToMetric)) + + p.metricMutex.RUnlock() + p.seriesMutex.Unlock() + + // Shutdown the connector + assert.NoError(t, p.Shutdown(context.Background())) +} + +func setupTelemetry(reader *sdkmetric.ManualReader) component.TelemetrySettings { + settings := componenttest.NewNopTelemetrySettings() + settings.MetricsLevel = configtelemetry.LevelNormal + + settings.MeterProvider = sdkmetric.NewMeterProvider(sdkmetric.WithReader(reader)) + return settings +} + +func TestValidateOwnTelemetry(t *testing.T) { + cfg := &Config{ + MetricsExporter: "mock", + Dimensions: []string{"some-attribute", "non-existing-attribute"}, + Store: StoreConfig{ + MaxItems: 10, + TTL: time.Second, + }, + } + + mockMetricsExporter := newMockMetricsExporter() + + reader := sdkmetric.NewManualReader() + set := setupTelemetry(reader) + p := newConnector(set, cfg) + + mHost := newMockHost(map[component.DataType]map[component.ID]component.Component{ + component.DataTypeMetrics: { + component.MustNewID("mock"): mockMetricsExporter, + }, + }) + + assert.NoError(t, p.Start(context.Background(), mHost)) + + // ConsumeTraces + td := buildSampleTrace(t, "first") + assert.NoError(t, p.ConsumeTraces(context.Background(), td)) + + // Make series stale and force a cache cleanup + for key, metric := range p.keyToMetric { + metric.lastUpdated = 0 + p.keyToMetric[key] = metric + } + p.cleanCache() + assert.Equal(t, 0, len(p.keyToMetric)) + + // ConsumeTraces with a trace with different attribute value + td = buildSampleTrace(t, "second") + assert.NoError(t, p.ConsumeTraces(context.Background(), td)) + + // Shutdown the connector + assert.NoError(t, p.Shutdown(context.Background())) + + rm := metricdata.ResourceMetrics{} + assert.NoError(t, reader.Collect(context.Background(), &rm)) + require.Len(t, rm.ScopeMetrics, 1) + sm := rm.ScopeMetrics[0] + require.Len(t, sm.Metrics, 1) + got := sm.Metrics[0] + want := metricdata.Metrics{ + Name: "connector/servicegraph/total_edges", + Description: "Total number of unique edges", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + {Value: 2}, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) +} diff --git a/connector/servicegraphconnector/factory.go b/connector/servicegraphconnector/factory.go index 4731aa09e3af..daec2316c71c 100644 --- a/connector/servicegraphconnector/factory.go +++ b/connector/servicegraphconnector/factory.go @@ -6,8 +6,71 @@ 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" ) -var NewFactory = servicegraphprocessor.NewConnectorFactoryFunc(metadata.Type, metadata.TracesToMetricsStability) +const ( + // 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 connector.NewFactory( + metadata.Type, + 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/generated_component_test.go b/connector/servicegraphconnector/generated_component_test.go new file mode 100644 index 000000000000..773a46625861 --- /dev/null +++ b/connector/servicegraphconnector/generated_component_test.go @@ -0,0 +1,61 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package servicegraphconnector + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/collector/consumer/consumertest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "traces_to_metrics", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesToMetrics(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(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + firstConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstConnector.Start(context.Background(), host)) + require.NoError(t, firstConnector.Shutdown(context.Background())) + secondConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondConnector.Start(context.Background(), host)) + require.NoError(t, secondConnector.Shutdown(context.Background())) + }) + } +} diff --git a/connector/servicegraphconnector/go.mod b/connector/servicegraphconnector/go.mod index 510d8b39e5e7..f3f8c30ce447 100644 --- a/connector/servicegraphconnector/go.mod +++ b/connector/servicegraphconnector/go.mod @@ -1,50 +1,100 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector -go 1.18 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/connector v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/connector v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/featuregate v1.5.0 + go.opentelemetry.io/collector/otelcol v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/sdk/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // 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/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // 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/knadh/koanf/v2 v2.1.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.20220423185008-bf980b35cac4 // 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.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // 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.4 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/exporter v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/processor v0.89.0 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/collector/service v0.98.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.25.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -53,5 +103,3 @@ retract ( v0.76.1 v0.65.0 ) - -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor => ../../processor/servicegraphprocessor/ diff --git a/connector/servicegraphconnector/go.sum b/connector/servicegraphconnector/go.sum index d180ff096b43..90522d37454d 100644 --- a/connector/servicegraphconnector/go.sum +++ b/connector/servicegraphconnector/go.sum @@ -1,12 +1,15 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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= @@ -14,17 +17,21 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF 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/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -35,44 +42,44 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W 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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 h1:6UKoz5ujsI55KNpsJH3UwCq3T8kKbZwNZBNPuTTje8U= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= 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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -80,101 +87,151 @@ 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/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= 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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= +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/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0 h1:0oYIeiRTURjIIYXs1OsaMAyNgg6Vc/CNa882YCYS/04= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/otelcol v0.89.0 h1:b3kC0zM9T6GxjhTcNEHIzXDd4zTIc7cBpexCPZ9nPzg= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0 h1:Yty9Vs4F3D6/liF1o6FNt0PvN85h/BJJ6DQKJ3nrcM0= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0 h1:E/sf+2slCUb7wqh5FHwhdwKWTA+VXyMMAcFNlKVf4yw= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 h1:vcSjcjn/BTeM6abI5CDymZdtd1m24quD1Mx4VE3N3fM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 h1:4s9HxB4azeeQkhY0GE5wZlMj4/pz8tE5gx2OQpGUw58= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 h1:lRhfcLr3gK5S/zn92h3clyOPnCvvNKs1WTMbtH4UvO0= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0/go.mod h1:vNMFTWe4dF05LsodUOc84OfxdlYVp1kCMuZzb41WfAk= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 h1:x/VsGlBj+DtJCXIucwzwcxiwnwAU8a6ALK6UN8fPdKQ= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0/go.mod h1:BapTGXu7CYrQGNohbapPwTSt2Ty/k/c6Oemx9mSSiK4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 h1:SxDS+Yr8qE+ID58ELR5n0D+SUlqHKOZ72pK3YPFAelA= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0/go.mod h1:DEoB0d0k1iGt4KEABntL8AW9xYQ6E7fmgkM2/s8aXvM= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 h1:C02SPbRPvrtmZ9TvsHWpz2TvHzqY5mNyEAlDdhax/a4= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0/go.mod h1:dzZKtykJio3Rm+G+Cmr15VV3xKp0PmFuh9Q9b3c1K7A= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 h1:04zGXVQZ8D6nvoPX8AaqxWxGHNNVsGR78E+tY+2VQr8= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0/go.mod h1:+UrRiugWaQPssz4mgEgQQo640f2bDUCFlo2Xr0/5ulc= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 h1:JYpDN0OnMsu0awk0rjaYEIko9hFzzBJ6+2U5W2iVvUE= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0/go.mod h1:xrXL804nBum1PgbvmJQ4I+hyW+DU4xBGO3MKMiYFX6E= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 h1:JfvsDpTwAhA9au8/4vmONRh0OBVU6n36seb41JD/mTQ= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0/go.mod h1:t1zDwy6kYp4w1JgcGHMvdGbKYHqWpK00bB1AEQ0Oqlc= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/otelcol v0.98.0 h1:sUk49Wqw+VBYeDynEA+GSeVEusFvzFW3KuF2vfDbyo0= +go.opentelemetry.io/collector/otelcol v0.98.0/go.mod h1:dW3UzuaiaNTddjKajk3Tp2Y7muDvYJdQz2yGUOE53gs= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/collector/service v0.98.0 h1:lLJ7VXPXcV62fSISh4GuNd5ti6WvKje76NSgezc3ydo= +go.opentelemetry.io/collector/service v0.98.0/go.mod h1:wB7ozvZTHtMefb5KTYy5nyrVYWpGk8teq8jWFs4blIU= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0 h1:QU8UEKyPqgr/8vCC9LlDmkPnfFmiWAUF9GtJdcLz+BU= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0/go.mod h1:qonC7wyvtX1E6cEpAR+bJmhcGr6IVRGc/f6ZTpvi7jA= +go.opentelemetry.io/contrib/zpages v0.50.0 h1:hKC5asr83xDN4ErwSHVdk3gv053pZiF8SZKmS86IPEw= +go.opentelemetry.io/contrib/zpages v0.50.0/go.mod h1:8WovRn95fZdaX/dr3e4h7D8IqiVsnZ+WxY0Yn4LyU3k= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0 h1:0o/9KwAgxjK+3pMV0pwIF5toYHqDsPmQhfrBvKaG6mU= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0/go.mod h1:rZyTdpmRqoV+PpUn6QlruxJp/kE4765rPy0pP6mRDk8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 h1:hDKnobznDpcdTlNzO0S/owRB8tyVr1OoeZZhDoqY+Cs= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0/go.mod h1:kUDQaUs1h8iTIHbQTk+iJRiUvSfJYMMKTtMCaiVu7B0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 h1:Wc4hZuYXhVqq+TfRXLXlmNIL/awOanGx8ssq3ciDQxc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0/go.mod h1:BydOvapRqVEc0DVz27qWBX2jq45Ca5TI9mhZBDIdweY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 h1:vOL89uRfOCCNIjkisd0r7SEdJF3ZJFyCNY34fdZs8eU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0/go.mod h1:8GlBGcDk8KKi7n+2S4BT/CPZQYH3erLu0/k64r1MYgo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 h1:d7nHbdzU84STOiszaOxQ3kw5IwkSmHsU5Muol5/vL4I= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0/go.mod h1:yiPA1iZbb/EHYnODXOxvtKuB0I2hV8ehfLTEWpl7BJU= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 h1:0vZZdECYzhTt9MKQZ5qQ0V+J3MFu4MQaQ3COfugF+FQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0/go.mod h1:e7iXx3HjaSSBXfy9ykVUlupS2Vp7LBIBuT21ousM2Hk= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= 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= @@ -189,8 +246,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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= @@ -200,9 +257,14 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +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.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -219,23 +281,26 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= 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-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= -google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= 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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= +google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -245,13 +310,11 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/connector/servicegraphconnector/internal/metadata/generated_status.go b/connector/servicegraphconnector/internal/metadata/generated_status.go index 4c38438390fe..3a35891d36ff 100644 --- a/connector/servicegraphconnector/internal/metadata/generated_status.go +++ b/connector/servicegraphconnector/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("servicegraph") ) const ( - Type = "servicegraph" TracesToMetricsStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/servicegraph") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/servicegraph") +} 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/connector/servicegraphconnector/internal/store/package_test.go b/connector/servicegraphconnector/internal/store/package_test.go new file mode 100644 index 000000000000..852a149af742 --- /dev/null +++ b/connector/servicegraphconnector/internal/store/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package store + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/connector/servicegraphconnector/internal/store/store.go b/connector/servicegraphconnector/internal/store/store.go new file mode 100644 index 000000000000..c2c4fee7a389 --- /dev/null +++ b/connector/servicegraphconnector/internal/store/store.go @@ -0,0 +1,139 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package store // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector/internal/store" + +import ( + "container/list" + "errors" + "sync" + "time" + + "go.opentelemetry.io/collector/pdata/pcommon" +) + +var ( + ErrTooManyItems = errors.New("too many items") +) + +type Callback func(e *Edge) + +type Key struct { + tid pcommon.TraceID + sid pcommon.SpanID +} + +func (k *Key) SpanIDIsEmpty() bool { + return k.sid.IsEmpty() +} + +func NewKey(tid pcommon.TraceID, sid pcommon.SpanID) Key { + return Key{tid: tid, sid: sid} +} + +type Store struct { + l *list.List + mtx sync.Mutex + m map[Key]*list.Element + + onComplete Callback + onExpire Callback + + ttl time.Duration + maxItems int +} + +// NewStore creates a Store to build service graphs. The store caches edges, each representing a +// request between two services. Once an edge is complete its metrics can be collected. Edges that +// have not found their pair are deleted after ttl time. +func NewStore(ttl time.Duration, maxItems int, onComplete, onExpire Callback) *Store { + s := &Store{ + l: list.New(), + m: make(map[Key]*list.Element), + + onComplete: onComplete, + onExpire: onExpire, + + ttl: ttl, + maxItems: maxItems, + } + + return s +} + +// len is only used for testing. +func (s *Store) len() int { + return s.l.Len() +} + +// UpsertEdge fetches an Edge from the store and updates it using the given callback. If the Edge +// doesn't exist yet, it creates a new one with the default TTL. +// If the Edge is complete after applying the callback, it's completed and removed. +func (s *Store) UpsertEdge(key Key, update Callback) (isNew bool, err error) { + s.mtx.Lock() + defer s.mtx.Unlock() + + if storedEdge, ok := s.m[key]; ok { + edge := storedEdge.Value.(*Edge) + update(edge) + + if edge.isComplete() { + s.onComplete(edge) + delete(s.m, key) + s.l.Remove(storedEdge) + } + + return false, nil + } + + edge := newEdge(key, s.ttl) + update(edge) + + if edge.isComplete() { + s.onComplete(edge) + return true, nil + } + + // Check we can add new edges + if s.l.Len() >= s.maxItems { + // TODO: try to evict expired items + return false, ErrTooManyItems + } + + ele := s.l.PushBack(edge) + s.m[key] = ele + + return true, nil +} + +// Expire evicts all expired items in the store. +func (s *Store) Expire() { + s.mtx.Lock() + defer s.mtx.Unlock() + + // Iterates until no more items can be evicted + for s.tryEvictHead() { // nolint + } +} + +// tryEvictHead checks if the oldest item (head of list) can be evicted and will delete it if so. +// Returns true if the head was evicted. +// +// Must be called holding lock. +func (s *Store) tryEvictHead() bool { + head := s.l.Front() + if head == nil { + return false // list is empty + } + + headEdge := head.Value.(*Edge) + if !headEdge.isExpired() { + return false + } + + s.onExpire(headEdge) + delete(s.m, headEdge.Key) + s.l.Remove(head) + + return true +} 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/metadata.yaml b/connector/servicegraphconnector/metadata.yaml index b6475ebc66cb..e06f036ece4a 100644 --- a/connector/servicegraphconnector/metadata.yaml +++ b/connector/servicegraphconnector/metadata.yaml @@ -1,9 +1,13 @@ type: servicegraph +scope_name: otelcol/servicegraph status: class: connector stability: alpha: [traces_to_metrics] - distributions: [contrib, sumo, grafana] + distributions: [contrib] codeowners: active: [jpkrohling, mapno] + +tests: + config: diff --git a/connector/servicegraphconnector/package_test.go b/connector/servicegraphconnector/package_test.go new file mode 100644 index 000000000000..79216a2f631a --- /dev/null +++ b/connector/servicegraphconnector/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package servicegraphconnector + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + 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 90% rename from processor/servicegraphprocessor/testdata/service-graph-connector-config.yaml rename to connector/servicegraphconnector/testdata/service-graph-connector-config.yaml index 6ba8ca594b45..fa44050cef3b 100644 --- a/processor/servicegraphprocessor/testdata/service-graph-connector-config.yaml +++ b/connector/servicegraphconnector/testdata/service-graph-connector-config.yaml @@ -13,6 +13,7 @@ connectors: store: ttl: 1s max_items: 10 + database_name_attribute: db.name service: pipelines: diff --git a/connector/servicegraphconnector/util.go b/connector/servicegraphconnector/util.go new file mode 100644 index 000000000000..fc447e9546de --- /dev/null +++ b/connector/servicegraphconnector/util.go @@ -0,0 +1,22 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package servicegraphconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector" + +import ( + "go.opentelemetry.io/collector/pdata/pcommon" + semconv "go.opentelemetry.io/collector/semconv/v1.9.0" +) + +func findAttributeValue(key string, attributes ...pcommon.Map) (string, bool) { + for _, attr := range attributes { + if v, ok := attr.Get(key); ok { + return v.AsString(), true + } + } + return "", false +} + +func findServiceName(attributes pcommon.Map) (string, bool) { + return findAttributeValue(semconv.AttributeServiceName, attributes) +} diff --git a/connector/spanmetricsconnector/README.md b/connector/spanmetricsconnector/README.md index c81086f9c9b8..51ac04d98c89 100644 --- a/connector/spanmetricsconnector/README.md +++ b/connector/spanmetricsconnector/README.md @@ -3,14 +3,13 @@ | Status | | | ------------- |-----------| -| Distributions | [contrib], [grafana], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aconnector%2Fspanmetrics%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aconnector%2Fspanmetrics) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aconnector%2Fspanmetrics%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aconnector%2Fspanmetrics) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@albertteoh](https://www.github.com/albertteoh) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@portertech](https://www.github.com/portertech), [@Frapschen](https://www.github.com/Frapschen) \| Seeking more code owners! | +| Emeritus | [@albertteoh](https://www.github.com/albertteoh) | [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[grafana]: https://github.com/grafana/agent -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector ## Supported Pipeline Types @@ -31,11 +30,23 @@ Aggregates Request, Error and Duration (R.E.D) OpenTelemetry metrics from span d dimensions, including Errors. Multiple metrics can be aggregated if, for instance, a user wishes to view call counts just on `service.name` and `span.name`. +``` +calls{service.name="shipping",span.name="get_shipping/{shippingId}",span.kind="SERVER",status.code="Ok"} +``` + **Error** counts are computed from the Request counts which have an `Error` Status Code metric dimension. +``` +calls{service.name="shipping",span.name="get_shipping/{shippingId},span.kind="SERVER",status.code="Error"} +``` + **Duration** is computed from the difference between the span start and end times and inserted into the relevant duration histogram time bucket for each unique set dimensions. +``` +duration{service.name="shipping",span.name="get_shipping/{shippingId}",span.kind="SERVER",status.code="Ok"} +``` + Each metric will have _at least_ the following dimensions because they are common across all spans: @@ -47,7 +58,7 @@ across all spans: ## Span to Metrics processor to Span to metrics connector -The spanmetrics connector is a port of the [spanmetrics](../../processor/spanmetricsprocessor/README.md) processor, but with multiple improvements +The spanmetrics connector is a port of the [spanmetrics](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/processor/spanmetricsprocessor/v0.95.0/processor/spanmetricsprocessor/README.md) processor, but with multiple improvements and breaking changes. It was done to bring the `spanmetrics` connector closer to the OpenTelemetry specification and make the component agnostic to exporters logic. The `spanmetrics` processor essentially was mixing the OTel with Prometheus conventions by using the OTel data model and @@ -96,15 +107,19 @@ The following settings can be optionally configured: If no `default` is provided, this dimension will be **omitted** from the metric. - `exclude_dimensions`: the list of dimensions to be excluded from the default set of dimensions. Use to exclude unneeded data from metrics. - `dimensions_cache_size` (default: `1000`): the size of cache for storing Dimensions to improve collectors memory usage. Must be a positive number. +- `resource_metrics_cache_size` (default: `1000`): the size of the cache holding metrics for a service. This is mostly relevant for + cumulative temporality to avoid memory leaks and correct metric timestamp resets. - `aggregation_temporality` (default: `AGGREGATION_TEMPORALITY_CUMULATIVE`): Defines the aggregation temporality of the generated metrics. One of either `AGGREGATION_TEMPORALITY_CUMULATIVE` or `AGGREGATION_TEMPORALITY_DELTA`. - `namespace`: Defines the namespace of the generated metrics. If `namespace` provided, generated metric name will be added `namespace.` prefix. -- `metrics_flush_interval` (default: `15s`): Defines the flush interval of the generated metrics. +- `metrics_flush_interval` (default: `60s`): Defines the flush interval of the generated metrics. +- `metrics_expiration` (default: `0`): Defines the expiration time as `time.Duration`, after which, if no new spans are received, metrics will no longer be exported. Setting to `0` means the metrics will never expire (default behavior). - `exemplars`: Use to configure how to attach exemplars to histograms - `enabled` (default: `false`): enabling will add spans as Exemplars. - `events`: Use to configure the events metric. - `enabled`: (default: `false`): enabling will add the events metric. - `dimensions`: (mandatory if `enabled`) the list of the span's event attributes to add as dimensions to the events metric, which will be included _on top of_ the common and configured `dimensions` for span and resource attributes. +- `resource_metrics_key_attributes`: Filter the resource attributes used to produce the resource metrics key map hash. Use this in case changing resource attributes (e.g. process id) are breaking counter metrics. ## Examples @@ -136,11 +151,16 @@ connectors: dimensions_cache_size: 1000 aggregation_temporality: "AGGREGATION_TEMPORALITY_CUMULATIVE" metrics_flush_interval: 15s + metrics_expiration: 5m events: enabled: true dimensions: - name: exception.type - name: exception.message + resource_metrics_key_attributes: + - service.name + - telemetry.sdk.language + - telemetry.sdk.name service: pipelines: diff --git a/connector/spanmetricsconnector/config.go b/connector/spanmetricsconnector/config.go index 26d36d785c60..c379a2c38fd9 100644 --- a/connector/spanmetricsconnector/config.go +++ b/connector/spanmetricsconnector/config.go @@ -46,6 +46,20 @@ type Config struct { // Optional. See defaultDimensionsCacheSize in connector.go for the default value. DimensionsCacheSize int `mapstructure:"dimensions_cache_size"` + // ResourceMetricsCacheSize defines the size of the cache holding metrics for a service. This is mostly relevant for + // cumulative temporality to avoid memory leaks and correct metric timestamp resets. + // Optional. See defaultResourceMetricsCacheSize in connector.go for the default value. + ResourceMetricsCacheSize int `mapstructure:"resource_metrics_cache_size"` + + // ResourceMetricsKeyAttributes filters the resource attributes used to create the resource metrics key hash. + // This can be used to avoid situations where resource attributes may change across service restarts, causing + // metric counters to break (and duplicate). A resource does not need to have all of the attributes. The list + // must include enough attributes to properly identify unique resources or risk aggregating data from more + // than one service and span. + // e.g. ["service.name", "telemetry.sdk.language", "telemetry.sdk.name"] + // See https://opentelemetry.io/docs/specs/semconv/resource/ for possible attributes. + ResourceMetricsKeyAttributes []string `mapstructure:"resource_metrics_key_attributes"` + AggregationTemporality string `mapstructure:"aggregation_temporality"` Histogram HistogramConfig `mapstructure:"histogram"` @@ -53,6 +67,10 @@ type Config struct { // MetricsEmitInterval is the time period between when metrics are flushed or emitted to the configured MetricsExporter. MetricsFlushInterval time.Duration `mapstructure:"metrics_flush_interval"` + // MetricsExpiration is the time period after which, if no new spans are received, metrics are considered stale and will no longer be exported. + // Default value (0) means that the metrics will never expire. + MetricsExpiration time.Duration `mapstructure:"metrics_expiration"` + // Namespace is the namespace of the metrics emitted by the connector. Namespace string `mapstructure:"namespace"` @@ -71,7 +89,8 @@ type HistogramConfig struct { } type ExemplarsConfig struct { - Enabled bool `mapstructure:"enabled"` + Enabled bool `mapstructure:"enabled"` + MaxPerDataPoint *int `mapstructure:"max_per_data_point"` } type ExponentialHistogramConfig struct { @@ -112,6 +131,14 @@ func (c Config) Validate() error { return errors.New("use either `explicit` or `exponential` buckets histogram") } + if c.MetricsFlushInterval < 0 { + return fmt.Errorf("invalid metrics_flush_interval: %v, the duration should be positive", c.MetricsFlushInterval) + } + + if c.MetricsExpiration < 0 { + return fmt.Errorf("invalid metrics_expiration: %v, the duration should be positive", c.MetricsExpiration) + } + return nil } diff --git a/connector/spanmetricsconnector/config_test.go b/connector/spanmetricsconnector/config_test.go index 2530c481d27b..da235794f3cb 100644 --- a/connector/spanmetricsconnector/config_test.go +++ b/connector/spanmetricsconnector/config_test.go @@ -26,6 +26,7 @@ func TestLoadConfig(t *testing.T) { require.NoError(t, err) defaultMethod := "GET" + defaultMaxPerDatapoint := 5 tests := []struct { id component.ID expected component.Config @@ -47,8 +48,9 @@ func TestLoadConfig(t *testing.T) { {Name: "http.method", Default: &defaultMethod}, {Name: "http.status_code", Default: (*string)(nil)}, }, - DimensionsCacheSize: 1500, - MetricsFlushInterval: 30 * time.Second, + DimensionsCacheSize: 1500, + ResourceMetricsCacheSize: 1600, + MetricsFlushInterval: 30 * time.Second, Exemplars: ExemplarsConfig{ Enabled: true, }, @@ -66,9 +68,10 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "exponential_histogram"), expected: &Config{ - AggregationTemporality: cumulative, - DimensionsCacheSize: 1000, - MetricsFlushInterval: 15 * time.Second, + AggregationTemporality: cumulative, + DimensionsCacheSize: defaultDimensionsCacheSize, + ResourceMetricsCacheSize: defaultResourceMetricsCacheSize, + MetricsFlushInterval: 60 * time.Second, Histogram: HistogramConfig{ Unit: metrics.Milliseconds, Exponential: &ExponentialHistogramConfig{ @@ -85,14 +88,41 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, "invalid_histogram_unit"), errorMessage: "unknown Unit \"h\"", }, + { + id: component.NewIDWithName(metadata.Type, "invalid_metrics_expiration"), + errorMessage: "the duration should be positive", + }, { id: component.NewIDWithName(metadata.Type, "exemplars_enabled"), expected: &Config{ - AggregationTemporality: "AGGREGATION_TEMPORALITY_CUMULATIVE", - DimensionsCacheSize: defaultDimensionsCacheSize, - MetricsFlushInterval: 15 * time.Second, - Histogram: HistogramConfig{Disable: false, Unit: defaultUnit}, - Exemplars: ExemplarsConfig{Enabled: true}, + AggregationTemporality: "AGGREGATION_TEMPORALITY_CUMULATIVE", + DimensionsCacheSize: defaultDimensionsCacheSize, + ResourceMetricsCacheSize: defaultResourceMetricsCacheSize, + MetricsFlushInterval: 60 * time.Second, + Histogram: HistogramConfig{Disable: false, Unit: defaultUnit}, + Exemplars: ExemplarsConfig{Enabled: true}, + }, + }, + { + id: component.NewIDWithName(metadata.Type, "exemplars_enabled_with_max_per_datapoint"), + expected: &Config{ + AggregationTemporality: "AGGREGATION_TEMPORALITY_CUMULATIVE", + DimensionsCacheSize: defaultDimensionsCacheSize, + ResourceMetricsCacheSize: defaultResourceMetricsCacheSize, + MetricsFlushInterval: 60 * time.Second, + Histogram: HistogramConfig{Disable: false, Unit: defaultUnit}, + Exemplars: ExemplarsConfig{Enabled: true, MaxPerDataPoint: &defaultMaxPerDatapoint}, + }, + }, + { + id: component.NewIDWithName(metadata.Type, "resource_metrics_key_attributes"), + expected: &Config{ + AggregationTemporality: "AGGREGATION_TEMPORALITY_CUMULATIVE", + DimensionsCacheSize: defaultDimensionsCacheSize, + ResourceMetricsCacheSize: defaultResourceMetricsCacheSize, + ResourceMetricsKeyAttributes: []string{"service.name", "telemetry.sdk.language", "telemetry.sdk.name"}, + MetricsFlushInterval: 60 * time.Second, + Histogram: HistogramConfig{Disable: false, Unit: defaultUnit}, }, }, } diff --git a/connector/spanmetricsconnector/connector.go b/connector/spanmetricsconnector/connector.go index 3832dca63997..702c1f7319b4 100644 --- a/connector/spanmetricsconnector/connector.go +++ b/connector/spanmetricsconnector/connector.go @@ -32,7 +32,8 @@ const ( statusCodeKey = "status.code" // OpenTelemetry non-standard constant. metricKeySeparator = string(byte(0)) - defaultDimensionsCacheSize = 1000 + defaultDimensionsCacheSize = 1000 + defaultResourceMetricsCacheSize = 1000 metricNameDuration = "duration" metricNameCalls = "calls" @@ -51,10 +52,9 @@ type connectorImp struct { // Additional dimensions to add to metrics. dimensions []dimension - // The starting time of the data points. - startTimestamp pcommon.Timestamp + resourceMetrics *cache.Cache[resourceKey, *resourceMetrics] - resourceMetrics map[resourceKey]*resourceMetrics + resourceMetricsKeyAttributes map[string]struct{} keyBuf *bytes.Buffer @@ -79,6 +79,10 @@ type resourceMetrics struct { sums metrics.SumMetrics events metrics.SumMetrics attributes pcommon.Map + // startTimestamp captures when the first data points for this resource are recorded. + startTimestamp pcommon.Timestamp + // lastSeen captures when the last data points for this resource were recorded. + lastSeen time.Time } type dimension struct { @@ -110,18 +114,29 @@ func newConnector(logger *zap.Logger, config component.Config, ticker *clock.Tic return nil, err } + resourceMetricsCache, err := cache.NewCache[resourceKey, *resourceMetrics](cfg.ResourceMetricsCacheSize) + if err != nil { + return nil, err + } + + resourceMetricsKeyAttributes := make(map[string]struct{}, len(cfg.ResourceMetricsKeyAttributes)) + var s struct{} + for _, attr := range cfg.ResourceMetricsKeyAttributes { + resourceMetricsKeyAttributes[attr] = s + } + return &connectorImp{ - logger: logger, - config: *cfg, - startTimestamp: pcommon.NewTimestampFromTime(time.Now()), - resourceMetrics: make(map[resourceKey]*resourceMetrics), - dimensions: newDimensions(cfg.Dimensions), - keyBuf: bytes.NewBuffer(make([]byte, 0, 1024)), - metricKeyToDimensions: metricKeyToDimensionsCache, - ticker: ticker, - done: make(chan struct{}), - eDimensions: newDimensions(cfg.Events.Dimensions), - events: cfg.Events, + logger: logger, + config: *cfg, + resourceMetrics: resourceMetricsCache, + resourceMetricsKeyAttributes: resourceMetricsKeyAttributes, + dimensions: newDimensions(cfg.Dimensions), + keyBuf: bytes.NewBuffer(make([]byte, 0, 1024)), + metricKeyToDimensions: metricKeyToDimensionsCache, + ticker: ticker, + done: make(chan struct{}), + eDimensions: newDimensions(cfg.Events.Dimensions), + events: cfg.Events, }, nil } @@ -134,7 +149,7 @@ func initHistogramMetrics(cfg Config) metrics.HistogramMetrics { if cfg.Histogram.Exponential.MaxSize != 0 { maxSize = cfg.Histogram.Exponential.MaxSize } - return metrics.NewExponentialHistogramMetrics(maxSize) + return metrics.NewExponentialHistogramMetrics(maxSize, cfg.Exemplars.MaxPerDataPoint) } var bounds []float64 @@ -152,7 +167,7 @@ func initHistogramMetrics(cfg Config) metrics.HistogramMetrics { } } - return metrics.NewExplicitHistogramMetrics(bounds) + return metrics.NewExplicitHistogramMetrics(bounds, cfg.Exemplars.MaxPerDataPoint) } // unitDivider returns a unit divider to convert nanoseconds to milliseconds or seconds. @@ -236,7 +251,8 @@ func (p *connectorImp) exportMetrics(ctx context.Context) { // buildMetrics collects the computed raw metrics data and builds OTLP metrics. func (p *connectorImp) buildMetrics() pmetric.Metrics { m := pmetric.NewMetrics() - for _, rawMetrics := range p.resourceMetrics { + + p.resourceMetrics.ForEach(func(_ resourceKey, rawMetrics *resourceMetrics) { rm := m.ResourceMetrics().AppendEmpty() rawMetrics.attributes.CopyTo(rm.Resource().Attributes()) @@ -246,22 +262,22 @@ func (p *connectorImp) buildMetrics() pmetric.Metrics { sums := rawMetrics.sums metric := sm.Metrics().AppendEmpty() metric.SetName(buildMetricName(p.config.Namespace, metricNameCalls)) - sums.BuildMetrics(metric, p.startTimestamp, p.config.GetAggregationTemporality()) + sums.BuildMetrics(metric, rawMetrics.startTimestamp, p.config.GetAggregationTemporality()) if !p.config.Histogram.Disable { histograms := rawMetrics.histograms metric = sm.Metrics().AppendEmpty() metric.SetName(buildMetricName(p.config.Namespace, metricNameDuration)) metric.SetUnit(p.config.Histogram.Unit.String()) - histograms.BuildMetrics(metric, p.startTimestamp, p.config.GetAggregationTemporality()) + histograms.BuildMetrics(metric, rawMetrics.startTimestamp, p.config.GetAggregationTemporality()) } events := rawMetrics.events if p.events.Enabled { metric = sm.Metrics().AppendEmpty() metric.SetName(buildMetricName(p.config.Namespace, metricNameEvents)) - events.BuildMetrics(metric, p.startTimestamp, p.config.GetAggregationTemporality()) + events.BuildMetrics(metric, rawMetrics.startTimestamp, p.config.GetAggregationTemporality()) } - } + }) return m } @@ -269,19 +285,32 @@ func (p *connectorImp) buildMetrics() pmetric.Metrics { func (p *connectorImp) resetState() { // If delta metrics, reset accumulated data if p.config.GetAggregationTemporality() == pmetric.AggregationTemporalityDelta { - p.resourceMetrics = make(map[resourceKey]*resourceMetrics) + p.resourceMetrics.Purge() p.metricKeyToDimensions.Purge() - p.startTimestamp = pcommon.NewTimestampFromTime(time.Now()) } else { + p.resourceMetrics.RemoveEvictedItems() p.metricKeyToDimensions.RemoveEvictedItems() - // Exemplars are only relevant to this batch of traces, so must be cleared within the lock - if p.config.Histogram.Disable { + // If no histogram and no metrics expiration is configured, we can skip the remaining operations. + // Enabling either of these features requires to go over resource metrics and do operation on each. + if p.config.Histogram.Disable && p.config.MetricsExpiration == 0 { return } - for _, m := range p.resourceMetrics { - m.histograms.Reset(true) - } + + now := time.Now() + p.resourceMetrics.ForEach(func(k resourceKey, m *resourceMetrics) { + // Exemplars are only relevant to this batch of traces, so must be cleared within the lock + if !p.config.Histogram.Disable { + m.histograms.Reset(true) + } + + // If metrics expiration is configured, remove metrics that haven't been seen for longer than the expiration period. + if p.config.MetricsExpiration > 0 { + if now.Sub(m.lastSeen) >= p.config.MetricsExpiration { + p.resourceMetrics.Remove(k) + } + } + }) } } @@ -361,6 +390,9 @@ func (p *connectorImp) aggregateMetrics(traces ptrace.Traces) { p.metricKeyToDimensions.Add(eKey, eAttributes) } e := events.GetOrCreate(eKey, eAttributes) + if p.config.Exemplars.Enabled && !span.TraceID().IsEmpty() { + e.AddExemplar(span.TraceID(), span.SpanID(), duration) + } e.Add(1) } } @@ -382,18 +414,38 @@ func (p *connectorImp) addExemplar(span ptrace.Span, duration float64, h metrics type resourceKey [16]byte +func (p *connectorImp) createResourceKey(attr pcommon.Map) resourceKey { + if len(p.resourceMetricsKeyAttributes) == 0 { + return pdatautil.MapHash(attr) + } + m := pcommon.NewMap() + attr.CopyTo(m) + m.RemoveIf(func(k string, _ pcommon.Value) bool { + _, ok := p.resourceMetricsKeyAttributes[k] + return !ok + }) + return pdatautil.MapHash(m) +} + func (p *connectorImp) getOrCreateResourceMetrics(attr pcommon.Map) *resourceMetrics { - key := resourceKey(pdatautil.MapHash(attr)) - v, ok := p.resourceMetrics[key] + key := p.createResourceKey(attr) + v, ok := p.resourceMetrics.Get(key) if !ok { v = &resourceMetrics{ - histograms: initHistogramMetrics(p.config), - sums: metrics.NewSumMetrics(), - events: metrics.NewSumMetrics(), - attributes: attr, + histograms: initHistogramMetrics(p.config), + sums: metrics.NewSumMetrics(p.config.Exemplars.MaxPerDataPoint), + events: metrics.NewSumMetrics(p.config.Exemplars.MaxPerDataPoint), + attributes: attr, + startTimestamp: pcommon.NewTimestampFromTime(time.Now()), } - p.resourceMetrics[key] = v + p.resourceMetrics.Add(key, v) } + + // If expiration is enabled, track the last seen time. + if p.config.MetricsExpiration > 0 { + v.lastSeen = time.Now() + } + return v } diff --git a/connector/spanmetricsconnector/connector_test.go b/connector/spanmetricsconnector/connector_test.go index c10078313795..669e14be02b2 100644 --- a/connector/spanmetricsconnector/connector_test.go +++ b/connector/spanmetricsconnector/connector_test.go @@ -32,18 +32,19 @@ import ( ) const ( - stringAttrName = "stringAttrName" - intAttrName = "intAttrName" - doubleAttrName = "doubleAttrName" - boolAttrName = "boolAttrName" - nullAttrName = "nullAttrName" - mapAttrName = "mapAttrName" - arrayAttrName = "arrayAttrName" - notInSpanAttrName0 = "shouldBeInMetric" - notInSpanAttrName1 = "shouldNotBeInMetric" - regionResourceAttrName = "region" - exceptionTypeAttrName = "exception.type" - DimensionsCacheSize = 2 + stringAttrName = "stringAttrName" + intAttrName = "intAttrName" + doubleAttrName = "doubleAttrName" + boolAttrName = "boolAttrName" + nullAttrName = "nullAttrName" + mapAttrName = "mapAttrName" + arrayAttrName = "arrayAttrName" + notInSpanAttrName0 = "shouldBeInMetric" + notInSpanAttrName1 = "shouldNotBeInMetric" + regionResourceAttrName = "region" + exceptionTypeAttrName = "exception.type" + dimensionsCacheSize = 2 + resourceMetricsCacheSize = 5 sampleRegion = "us-east-1" sampleDuration = float64(11) @@ -413,6 +414,19 @@ func enabledExemplarsConfig() ExemplarsConfig { } } +func enabledEventsConfig() EventsConfig { + return EventsConfig{ + Enabled: true, + Dimensions: []Dimension{{Name: "exception.type"}}, + } +} + +func disabledEventsConfig() EventsConfig { + return EventsConfig{ + Enabled: false, + } +} + func explicitHistogramsConfig() HistogramConfig { return HistogramConfig{ Unit: defaultUnit, @@ -438,6 +452,50 @@ func disabledHistogramsConfig() HistogramConfig { } } +func newConnectorImp(defaultNullValue *string, histogramConfig func() HistogramConfig, exemplarsConfig func() ExemplarsConfig, eventsConfig func() EventsConfig, temporality string, expiration time.Duration, resourceMetricsKeyAttributes []string, excludedDimensions ...string) (*connectorImp, *clock.Mock, error) { + cfg := &Config{ + AggregationTemporality: temporality, + Histogram: histogramConfig(), + Exemplars: exemplarsConfig(), + ExcludeDimensions: excludedDimensions, + DimensionsCacheSize: dimensionsCacheSize, + ResourceMetricsCacheSize: resourceMetricsCacheSize, + ResourceMetricsKeyAttributes: resourceMetricsKeyAttributes, + Dimensions: []Dimension{ + // Set nil defaults to force a lookup for the attribute in the span. + {stringAttrName, nil}, + {intAttrName, nil}, + {doubleAttrName, nil}, + {boolAttrName, nil}, + {mapAttrName, nil}, + {arrayAttrName, nil}, + {nullAttrName, defaultNullValue}, + // Add a default value for an attribute that doesn't exist in a span + {notInSpanAttrName0, stringp("defaultNotInSpanAttrVal")}, + // Leave the default value unset to test that this dimension should not be added to the metric. + {notInSpanAttrName1, nil}, + // Add a resource attribute to test "process" attributes like IP, host, region, cluster, etc. + {regionResourceAttrName, nil}, + }, + Events: eventsConfig(), + MetricsExpiration: expiration, + } + + mockClock := clock.NewMock(time.Now()) + ticker := mockClock.NewTicker(time.Nanosecond) + + c, err := newConnector(zap.NewNop(), cfg, ticker) + if err != nil { + return nil, nil, err + } + c.metricsConsumer = consumertest.NewNop() + return c, mockClock, nil +} + +func stringp(str string) *string { + return &str +} + func TestBuildKeySameServiceNameCharSequence(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) @@ -580,14 +638,14 @@ func TestConcurrentShutdown(t *testing.T) { // Prepare ctx := context.Background() core, observedLogs := observer.New(zapcore.InfoLevel) - logger := zap.New(core) - - mockClock := clock.NewMock(time.Now()) - ticker := mockClock.NewTicker(time.Nanosecond) // Test - p := newConnectorImp(t, new(consumertest.MetricsSink), nil, explicitHistogramsConfig, disabledExemplarsConfig, cumulative, logger, ticker) - err := p.Start(ctx, componenttest.NewNopHost()) + p, _, err := newConnectorImp(nil, explicitHistogramsConfig, disabledExemplarsConfig, disabledEventsConfig, cumulative, 0, []string{}) + require.NoError(t, err) + // Override the default no-op consumer and logger for testing. + p.metricsConsumer = new(consumertest.MetricsSink) + p.logger = zap.New(core) + err = p.Start(ctx, componenttest.NewNopHost()) require.NoError(t, err) // Allow goroutines time to start. @@ -615,11 +673,10 @@ func TestConcurrentShutdown(t *testing.T) { return len(allLogs) > 0 }, time.Second, time.Millisecond*10) - // Building spanmetrics connector... // Starting spanmetricsconnector... // Shutting down spanmetricsconnector... // Stopping ticker. - assert.Len(t, allLogs, 4) + assert.Len(t, allLogs, 3) } func TestConnectorCapabilities(t *testing.T) { @@ -629,6 +686,7 @@ func TestConnectorCapabilities(t *testing.T) { // Test c, err := newConnector(zaptest.NewLogger(t), cfg, nil) + // Override the default no-op consumer for testing. c.metricsConsumer = new(consumertest.MetricsSink) assert.NoError(t, err) caps := c.Capabilities() @@ -660,16 +718,17 @@ func TestConsumeMetricsErrors(t *testing.T) { logger := zap.New(core) var wg sync.WaitGroup - mcon := &errConsumer{ + p, mockClock, err := newConnectorImp(nil, explicitHistogramsConfig, disabledExemplarsConfig, disabledEventsConfig, cumulative, 0, []string{}) + require.NoError(t, err) + // Override the default no-op consumer and logger for testing. + p.metricsConsumer = &errConsumer{ wg: &wg, fakeErr: fakeErr, } - mockClock := clock.NewMock(time.Now()) - ticker := mockClock.NewTicker(time.Nanosecond) - p := newConnectorImp(t, mcon, nil, explicitHistogramsConfig, disabledExemplarsConfig, cumulative, logger, ticker) + p.logger = logger ctx := metadata.NewIncomingContext(context.Background(), nil) - err := p.Start(ctx, componenttest.NewNopHost()) + err = p.Start(ctx, componenttest.NewNopHost()) defer func() { sdErr := p.Shutdown(ctx); require.NoError(t, sdErr) }() require.NoError(t, err) @@ -824,14 +883,13 @@ func TestConsumeTraces(t *testing.T) { // Prepare mcon := &consumertest.MetricsSink{} - - mockClock := clock.NewMock(time.Now()) - ticker := mockClock.NewTicker(time.Nanosecond) - - p := newConnectorImp(t, mcon, stringp("defaultNullValue"), tc.histogramConfig, tc.exemplarConfig, tc.aggregationTemporality, zaptest.NewLogger(t), ticker) + p, mockClock, err := newConnectorImp(stringp("defaultNullValue"), tc.histogramConfig, tc.exemplarConfig, disabledEventsConfig, tc.aggregationTemporality, 0, []string{}) + require.NoError(t, err) + // Override the default no-op consumer with metrics sink for testing. + p.metricsConsumer = mcon ctx := metadata.NewIncomingContext(context.Background(), nil) - err := p.Start(ctx, componenttest.NewNopHost()) + err = p.Start(ctx, componenttest.NewNopHost()) defer func() { sdErr := p.Shutdown(ctx); require.NoError(t, sdErr) }() require.NoError(t, err) @@ -852,9 +910,8 @@ func TestConsumeTraces(t *testing.T) { } func TestMetricKeyCache(t *testing.T) { - mcon := consumertest.NewNop() - - p := newConnectorImp(t, mcon, stringp("defaultNullValue"), explicitHistogramsConfig, disabledExemplarsConfig, cumulative, zaptest.NewLogger(t), nil) + p, _, err := newConnectorImp(stringp("defaultNullValue"), explicitHistogramsConfig, disabledExemplarsConfig, disabledEventsConfig, cumulative, 0, []string{}) + require.NoError(t, err) traces := buildSampleTrace() // Test @@ -863,12 +920,12 @@ func TestMetricKeyCache(t *testing.T) { // 0 key was cached at beginning assert.Zero(t, p.metricKeyToDimensions.Len()) - err := p.ConsumeTraces(ctx, traces) + err = p.ConsumeTraces(ctx, traces) // Validate require.NoError(t, err) // 2 key was cached, 1 key was evicted and cleaned after the processing assert.Eventually(t, func() bool { - return p.metricKeyToDimensions.Len() == DimensionsCacheSize + return p.metricKeyToDimensions.Len() == dimensionsCacheSize }, 10*time.Second, time.Millisecond*100) // consume another batch of traces @@ -877,15 +934,113 @@ func TestMetricKeyCache(t *testing.T) { // 2 key was cached, other keys were evicted and cleaned after the processing assert.Eventually(t, func() bool { - return p.metricKeyToDimensions.Len() == DimensionsCacheSize + return p.metricKeyToDimensions.Len() == dimensionsCacheSize }, 10*time.Second, time.Millisecond*100) } +func TestResourceMetricsCache(t *testing.T) { + p, _, err := newConnectorImp(stringp("defaultNullValue"), explicitHistogramsConfig, disabledExemplarsConfig, disabledEventsConfig, cumulative, 0, []string{}) + require.NoError(t, err) + + // Test + ctx := metadata.NewIncomingContext(context.Background(), nil) + + // 0 resources in the beginning + assert.Zero(t, p.resourceMetrics.Len()) + + err = p.ConsumeTraces(ctx, buildSampleTrace()) + // Validate + require.NoError(t, err) + assert.Equal(t, 2, p.resourceMetrics.Len()) + + // consume another batch of traces for the same resources + err = p.ConsumeTraces(ctx, buildSampleTrace()) + require.NoError(t, err) + assert.Equal(t, 2, p.resourceMetrics.Len()) + + // consume more batches for new resources. Max size is exceeded causing old resource entries to be discarded + for i := 0; i < resourceMetricsCacheSize; i++ { + traces := buildSampleTrace() + + // add resource attributes to simulate additional resources providing data + for j := 0; j < traces.ResourceSpans().Len(); j++ { + traces.ResourceSpans().At(j).Resource().Attributes().PutStr("dummy", fmt.Sprintf("%d", i)) + } + + err = p.ConsumeTraces(ctx, traces) + require.NoError(t, err) + } + + // validate that the cache doesn't grow past its limit + assert.Equal(t, resourceMetricsCacheSize, p.resourceMetrics.Len()) +} + +func TestResourceMetricsExpiration(t *testing.T) { + p, _, err := newConnectorImp(stringp("defaultNullValue"), explicitHistogramsConfig, disabledExemplarsConfig, disabledEventsConfig, cumulative, 1*time.Millisecond, []string{}) + require.NoError(t, err) + + // Test + ctx := metadata.NewIncomingContext(context.Background(), nil) + + // 0 resources in the beginning + assert.Zero(t, p.resourceMetrics.Len()) + + err = p.ConsumeTraces(ctx, buildSampleTrace()) + // Validate + require.NoError(t, err) + assert.Equal(t, 2, p.resourceMetrics.Len()) + + // consume another batch of traces for the same resources + err = p.ConsumeTraces(ctx, buildSampleTrace()) + require.NoError(t, err) + assert.Equal(t, 2, p.resourceMetrics.Len()) +} + +func TestResourceMetricsKeyAttributes(t *testing.T) { + resourceMetricsKeyAttributes := []string{ + "service.name", + } + + p, _, err := newConnectorImp(stringp("defaultNullValue"), explicitHistogramsConfig, disabledExemplarsConfig, disabledEventsConfig, cumulative, 0, resourceMetricsKeyAttributes) + require.NoError(t, err) + + // Test + ctx := metadata.NewIncomingContext(context.Background(), nil) + + // 0 resources in the beginning + assert.Zero(t, p.resourceMetrics.Len()) + + err = p.ConsumeTraces(ctx, buildSampleTrace()) + // Validate + require.NoError(t, err) + assert.Equal(t, 2, p.resourceMetrics.Len()) + + // consume another batch of traces for the same resources + err = p.ConsumeTraces(ctx, buildSampleTrace()) + require.NoError(t, err) + assert.Equal(t, 2, p.resourceMetrics.Len()) + + // consume more batches for new resources. Max size is exceeded causing old resource entries to be discarded + for i := 0; i < resourceMetricsCacheSize; i++ { + traces := buildSampleTrace() + + // add resource attributes to simulate additional resources providing data + for j := 0; j < traces.ResourceSpans().Len(); j++ { + traces.ResourceSpans().At(j).Resource().Attributes().PutStr("not included in resource key attributes", fmt.Sprintf("%d", i)) + } + + err = p.ConsumeTraces(ctx, traces) + require.NoError(t, err) + } + + // validate that the additional resources providing data did not result in additional resource metrics + assert.Equal(t, 2, p.resourceMetrics.Len()) +} + func BenchmarkConnectorConsumeTraces(b *testing.B) { // Prepare - mcon := consumertest.NewNop() - - conn := newConnectorImp(nil, mcon, stringp("defaultNullValue"), explicitHistogramsConfig, disabledExemplarsConfig, cumulative, zaptest.NewLogger(b), nil) + conn, _, err := newConnectorImp(stringp("defaultNullValue"), explicitHistogramsConfig, disabledExemplarsConfig, disabledEventsConfig, cumulative, 0, []string{}) + require.NoError(b, err) traces := buildSampleTrace() @@ -897,15 +1052,15 @@ func BenchmarkConnectorConsumeTraces(b *testing.B) { } func TestExcludeDimensionsConsumeTraces(t *testing.T) { - mcon := consumertest.NewNop() excludeDimensions := []string{"span.kind", "span.name", "totallyWrongNameDoesNotAffectAnything"} - p := newConnectorImp(t, mcon, stringp("defaultNullValue"), explicitHistogramsConfig, disabledExemplarsConfig, cumulative, zaptest.NewLogger(t), nil, excludeDimensions...) + p, _, err := newConnectorImp(stringp("defaultNullValue"), explicitHistogramsConfig, disabledExemplarsConfig, disabledEventsConfig, cumulative, 0, []string{}, excludeDimensions...) + require.NoError(t, err) traces := buildSampleTrace() // Test ctx := metadata.NewIncomingContext(context.Background(), nil) - err := p.ConsumeTraces(ctx, traces) + err = p.ConsumeTraces(ctx, traces) require.NoError(t, err) metrics := p.buildMetrics() @@ -948,41 +1103,6 @@ func TestExcludeDimensionsConsumeTraces(t *testing.T) { } -func newConnectorImp(t *testing.T, mcon consumer.Metrics, defaultNullValue *string, histogramConfig func() HistogramConfig, exemplarsConfig func() ExemplarsConfig, temporality string, logger *zap.Logger, ticker *clock.Ticker, excludedDimensions ...string) *connectorImp { - - cfg := &Config{ - AggregationTemporality: temporality, - Histogram: histogramConfig(), - Exemplars: exemplarsConfig(), - ExcludeDimensions: excludedDimensions, - DimensionsCacheSize: DimensionsCacheSize, - Dimensions: []Dimension{ - // Set nil defaults to force a lookup for the attribute in the span. - {stringAttrName, nil}, - {intAttrName, nil}, - {doubleAttrName, nil}, - {boolAttrName, nil}, - {mapAttrName, nil}, - {arrayAttrName, nil}, - {nullAttrName, defaultNullValue}, - // Add a default value for an attribute that doesn't exist in a span - {notInSpanAttrName0, stringp("defaultNotInSpanAttrVal")}, - // Leave the default value unset to test that this dimension should not be added to the metric. - {notInSpanAttrName1, nil}, - // Add a resource attribute to test "process" attributes like IP, host, region, cluster, etc. - {regionResourceAttrName, nil}, - }, - } - c, err := newConnector(logger, cfg, ticker) - require.NoError(t, err) - c.metricsConsumer = mcon - return c -} - -func stringp(str string) *string { - return &str -} - func TestConnectorConsumeTracesEvictedCacheKey(t *testing.T) { // Prepare traces0 := ptrace.NewTraces() @@ -1062,14 +1182,14 @@ func TestConnectorConsumeTracesEvictedCacheKey(t *testing.T) { var wg sync.WaitGroup wg.Add(len(wantDataPointCounts)) - mockClock := clock.NewMock(time.Now()) - ticker := mockClock.NewTicker(time.Nanosecond) - // Note: default dimension key cache size is 2. - p := newConnectorImp(t, mcon, stringp("defaultNullValue"), explicitHistogramsConfig, disabledExemplarsConfig, cumulative, zaptest.NewLogger(t), ticker) + p, mockClock, err := newConnectorImp(stringp("defaultNullValue"), explicitHistogramsConfig, disabledExemplarsConfig, disabledEventsConfig, cumulative, 0, []string{}) + require.NoError(t, err) + // Override the default no-op consumer with metrics sink for testing. + p.metricsConsumer = mcon ctx := metadata.NewIncomingContext(context.Background(), nil) - err := p.Start(ctx, componenttest.NewNopHost()) + err = p.Start(ctx, componenttest.NewNopHost()) defer func() { sdErr := p.Shutdown(ctx); require.NoError(t, sdErr) }() require.NoError(t, err) @@ -1104,6 +1224,87 @@ func TestConnectorConsumeTracesEvictedCacheKey(t *testing.T) { } } +func TestConnectorConsumeTracesExpiredMetrics(t *testing.T) { + // Prepare + traces0 := ptrace.NewTraces() + + initServiceSpans( + serviceSpans{ + serviceName: "service-a", + spans: []span{ + { + name: "/ping", + kind: ptrace.SpanKindServer, + statusCode: ptrace.StatusCodeOk, + }, + }, + }, traces0.ResourceSpans().AppendEmpty()) + initServiceSpans( + serviceSpans{ + serviceName: "service-b", + spans: []span{ + { + name: "/ping", + kind: ptrace.SpanKindServer, + statusCode: ptrace.StatusCodeError, + }, + }, + }, traces0.ResourceSpans().AppendEmpty()) + + traces1 := ptrace.NewTraces() + + initServiceSpans( + serviceSpans{ + serviceName: "service-x", + spans: []span{ + { + name: "/ping", + kind: ptrace.SpanKindServer, + statusCode: ptrace.StatusCodeOk, + }, + }, + }, traces1.ResourceSpans().AppendEmpty()) + + mcon := &consumertest.MetricsSink{} + + // Creating a connector with a very short metricsTTL to ensure that the metrics are expired. + p, mockClock, err := newConnectorImp(stringp("defaultNullValue"), explicitHistogramsConfig, disabledExemplarsConfig, disabledEventsConfig, cumulative, 1*time.Nanosecond, []string{}) + require.NoError(t, err) + // Override the default no-op consumer with metrics sink for testing. + p.metricsConsumer = mcon + + ctx := metadata.NewIncomingContext(context.Background(), nil) + err = p.Start(ctx, componenttest.NewNopHost()) + defer func() { sdErr := p.Shutdown(ctx); require.NoError(t, sdErr) }() + require.NoError(t, err) + + // Test expiration by sending three batches of traces, with the second and third batch being identical. + // On firsts test run, we should see only data points for traces #0 (= 4 data points) + // On second test run, we want to see both data points for traces #0 and #1 (= 6 data points) + // On third test run, we want to see only data points for traces #1, since metrics for traces #0 should be expired (= 2 data points) + wantedDataPointCounts := []int{4, 6, 2} + for i, traces := range []ptrace.Traces{traces0, traces1, traces1} { + // Test + err = p.ConsumeTraces(ctx, traces) + require.NoError(t, err) + + // Allow time for metrics aggregation to complete. + time.Sleep(time.Millisecond) + + // Trigger flush. + mockClock.Add(time.Nanosecond) + + // Allow time for metrics flush to complete. + time.Sleep(time.Millisecond) + + // Verify. + require.Equal(t, wantedDataPointCounts[i], mcon.AllMetrics()[0].DataPointCount()) + + // Reset so we can verify the next set of metrics from scratch. + mcon.Reset() + } +} + func TestBuildMetricName(t *testing.T) { tests := []struct { namespace string @@ -1175,7 +1376,7 @@ func TestConnector_initHistogramMetrics(t *testing.T) { { name: "initialize histogram with no config provided", config: Config{}, - want: metrics.NewExplicitHistogramMetrics(defaultHistogramBucketsMs), + want: metrics.NewExplicitHistogramMetrics(defaultHistogramBucketsMs, nil), }, { name: "Disable histogram", @@ -1193,7 +1394,7 @@ func TestConnector_initHistogramMetrics(t *testing.T) { Unit: metrics.Milliseconds, }, }, - want: metrics.NewExplicitHistogramMetrics(defaultHistogramBucketsMs), + want: metrics.NewExplicitHistogramMetrics(defaultHistogramBucketsMs, nil), }, { name: "initialize explicit histogram with default bounds (seconds)", @@ -1202,7 +1403,7 @@ func TestConnector_initHistogramMetrics(t *testing.T) { Unit: metrics.Seconds, }, }, - want: metrics.NewExplicitHistogramMetrics(defaultHistogramBucketsSeconds), + want: metrics.NewExplicitHistogramMetrics(defaultHistogramBucketsSeconds, nil), }, { name: "initialize explicit histogram with bounds (seconds)", @@ -1217,7 +1418,7 @@ func TestConnector_initHistogramMetrics(t *testing.T) { }, }, }, - want: metrics.NewExplicitHistogramMetrics([]float64{0.1, 1}), + want: metrics.NewExplicitHistogramMetrics([]float64{0.1, 1}, nil), }, { name: "initialize explicit histogram with bounds (ms)", @@ -1232,7 +1433,7 @@ func TestConnector_initHistogramMetrics(t *testing.T) { }, }, }, - want: metrics.NewExplicitHistogramMetrics([]float64{100, 1000}), + want: metrics.NewExplicitHistogramMetrics([]float64{100, 1000}, nil), }, { name: "initialize exponential histogram", @@ -1244,7 +1445,7 @@ func TestConnector_initHistogramMetrics(t *testing.T) { }, }, }, - want: metrics.NewExponentialHistogramMetrics(10), + want: metrics.NewExponentialHistogramMetrics(10, nil), }, { name: "initialize exponential histogram with default max buckets count", @@ -1254,7 +1455,7 @@ func TestConnector_initHistogramMetrics(t *testing.T) { Exponential: &ExponentialHistogramConfig{}, }, }, - want: metrics.NewExponentialHistogramMetrics(structure.DefaultMaxSize), + want: metrics.NewExponentialHistogramMetrics(structure.DefaultMaxSize, nil), }, } for _, tt := range tests { @@ -1319,14 +1520,14 @@ func TestSpanMetrics_Events(t *testing.T) { } } func TestExemplarsForSumMetrics(t *testing.T) { - mcon := consumertest.NewNop() - p := newConnectorImp(t, mcon, stringp("defaultNullValue"), explicitHistogramsConfig, enabledExemplarsConfig, cumulative, zaptest.NewLogger(t), nil) + p, _, err := newConnectorImp(stringp("defaultNullValue"), explicitHistogramsConfig, enabledExemplarsConfig, enabledEventsConfig, cumulative, 0, []string{}) + require.NoError(t, err) traces := buildSampleTrace() // Test ctx := metadata.NewIncomingContext(context.Background(), nil) - err := p.ConsumeTraces(ctx, traces) + err = p.ConsumeTraces(ctx, traces) require.NoError(t, err) metrics := p.buildMetrics() diff --git a/connector/spanmetricsconnector/factory.go b/connector/spanmetricsconnector/factory.go index 792b47935b7e..60f2b554ce80 100644 --- a/connector/spanmetricsconnector/factory.go +++ b/connector/spanmetricsconnector/factory.go @@ -28,10 +28,11 @@ func NewFactory() connector.Factory { func createDefaultConfig() component.Config { return &Config{ - AggregationTemporality: "AGGREGATION_TEMPORALITY_CUMULATIVE", - DimensionsCacheSize: defaultDimensionsCacheSize, - MetricsFlushInterval: 15 * time.Second, - Histogram: HistogramConfig{Disable: false, Unit: defaultUnit}, + AggregationTemporality: "AGGREGATION_TEMPORALITY_CUMULATIVE", + DimensionsCacheSize: defaultDimensionsCacheSize, + ResourceMetricsCacheSize: defaultResourceMetricsCacheSize, + MetricsFlushInterval: 60 * time.Second, + Histogram: HistogramConfig{Disable: false, Unit: defaultUnit}, } } diff --git a/connector/spanmetricsconnector/factory_test.go b/connector/spanmetricsconnector/factory_test.go index 6b079cbbc293..0d8f5cfc4682 100644 --- a/connector/spanmetricsconnector/factory_test.go +++ b/connector/spanmetricsconnector/factory_test.go @@ -56,7 +56,7 @@ func TestNewConnector(t *testing.T) { smc := traceConnector.(*connectorImp) // Verify - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, smc) assert.Equal(t, tc.wantDimensions, smc.dimensions) diff --git a/connector/spanmetricsconnector/generated_component_test.go b/connector/spanmetricsconnector/generated_component_test.go new file mode 100644 index 000000000000..81cf90b69a7e --- /dev/null +++ b/connector/spanmetricsconnector/generated_component_test.go @@ -0,0 +1,61 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package spanmetricsconnector + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/collector/consumer/consumertest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "traces_to_metrics", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesToMetrics(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(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + firstConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstConnector.Start(context.Background(), host)) + require.NoError(t, firstConnector.Shutdown(context.Background())) + secondConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondConnector.Start(context.Background(), host)) + require.NoError(t, secondConnector.Shutdown(context.Background())) + }) + } +} diff --git a/connector/spanmetricsconnector/go.mod b/connector/spanmetricsconnector/go.mod index db567ecb1b63..d42b141ac2c1 100644 --- a/connector/spanmetricsconnector/go.mod +++ b/connector/spanmetricsconnector/go.mod @@ -1,52 +1,61 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector -go 1.20 +go 1.21 require ( github.com/hashicorp/golang-lru v1.0.2 github.com/lightstep/go-expohisto v1.0.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 - github.com/stretchr/testify v1.8.4 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 + github.com/stretchr/testify v1.9.0 github.com/tilinna/clock v1.1.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/connector v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 - google.golang.org/grpc v1.59.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/connector v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + google.golang.org/grpc v1.63.2 ) require ( - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/connector/spanmetricsconnector/go.sum b/connector/spanmetricsconnector/go.sum index c4d43e048e93..f66d624d4f3b 100644 --- a/connector/spanmetricsconnector/go.sum +++ b/connector/spanmetricsconnector/go.sum @@ -1,20 +1,24 @@ -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/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.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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/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/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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -25,16 +29,16 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lightstep/go-expohisto v1.0.0 h1:UPtTS1rGdtehbbAF7o/dhkWLTDI73UifG8LbfQI7cA4= github.com/lightstep/go-expohisto v1.0.0/go.mod h1:xDXD0++Mu2FOaItXtdDfksfgxfV0z1TMPa+e/EUd0cs= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -44,44 +48,60 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tilinna/clock v1.1.0 h1:6IQQQCo6KoBxVudv6gwtY8o4eDfhHo8ojA5dP0MfhSs= github.com/tilinna/clock v1.1.0/go.mod h1:ZsP7BcY7sEEz7ktc0IVy8Us6boDrK8VradlKRUGfOao= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -91,16 +111,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -113,15 +133,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/connector/spanmetricsconnector/internal/cache/cache.go b/connector/spanmetricsconnector/internal/cache/cache.go index 8b35f77fbc29..2559d42eadf7 100644 --- a/connector/spanmetricsconnector/internal/cache/cache.go +++ b/connector/spanmetricsconnector/internal/cache/cache.go @@ -64,6 +64,11 @@ func (c *Cache[K, V]) Get(key K) (V, bool) { return val, ok } +// Remove removes a key from the cache if it exists. +func (c *Cache[K, V]) Remove(key K) bool { + return c.lru.Remove(key) +} + // Len returns the number of items in the cache. func (c *Cache[K, V]) Len() int { return c.lru.Len() @@ -74,3 +79,17 @@ func (c *Cache[K, V]) Purge() { c.lru.Purge() c.RemoveEvictedItems() } + +// ForEach iterates over all the items within the cache, as well as the evicted items (if any). +func (c *Cache[K, V]) ForEach(fn func(k K, v V)) { + for _, k := range c.lru.Keys() { + v, ok := c.lru.Get(k) + if ok { + fn(k.(K), v.(V)) + } + } + + for k, v := range c.evictedItems { + fn(k, v) + } +} diff --git a/connector/spanmetricsconnector/internal/cache/package_test.go b/connector/spanmetricsconnector/internal/cache/package_test.go new file mode 100644 index 000000000000..f8a293b2ad92 --- /dev/null +++ b/connector/spanmetricsconnector/internal/cache/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package cache + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/connector/spanmetricsconnector/internal/metadata/generated_status.go b/connector/spanmetricsconnector/internal/metadata/generated_status.go index 19337d4e8a25..c0da10adabc6 100644 --- a/connector/spanmetricsconnector/internal/metadata/generated_status.go +++ b/connector/spanmetricsconnector/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("spanmetrics") ) const ( - Type = "spanmetrics" TracesToMetricsStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/spanmetrics") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/spanmetrics") +} diff --git a/connector/spanmetricsconnector/internal/metrics/metrics.go b/connector/spanmetricsconnector/internal/metrics/metrics.go index 2bae86f4333c..456c0bed5d04 100644 --- a/connector/spanmetricsconnector/internal/metrics/metrics.go +++ b/connector/spanmetricsconnector/internal/metrics/metrics.go @@ -26,13 +26,15 @@ type Histogram interface { } type explicitHistogramMetrics struct { - metrics map[Key]*explicitHistogram - bounds []float64 + metrics map[Key]*explicitHistogram + bounds []float64 + maxExemplarCount *int } type exponentialHistogramMetrics struct { - metrics map[Key]*exponentialHistogram - maxSize int32 + metrics map[Key]*exponentialHistogram + maxSize int32 + maxExemplarCount *int } type explicitHistogram struct { @@ -44,6 +46,8 @@ type explicitHistogram struct { sum float64 bounds []float64 + + maxExemplarCount *int } type exponentialHistogram struct { @@ -51,19 +55,23 @@ type exponentialHistogram struct { exemplars pmetric.ExemplarSlice histogram *structure.Histogram[float64] + + maxExemplarCount *int } -func NewExponentialHistogramMetrics(maxSize int32) HistogramMetrics { +func NewExponentialHistogramMetrics(maxSize int32, maxExemplarCount *int) HistogramMetrics { return &exponentialHistogramMetrics{ - metrics: make(map[Key]*exponentialHistogram), - maxSize: maxSize, + metrics: make(map[Key]*exponentialHistogram), + maxSize: maxSize, + maxExemplarCount: maxExemplarCount, } } -func NewExplicitHistogramMetrics(bounds []float64) HistogramMetrics { +func NewExplicitHistogramMetrics(bounds []float64, maxExemplarCount *int) HistogramMetrics { return &explicitHistogramMetrics{ - metrics: make(map[Key]*explicitHistogram), - bounds: bounds, + metrics: make(map[Key]*explicitHistogram), + bounds: bounds, + maxExemplarCount: maxExemplarCount, } } @@ -71,10 +79,11 @@ func (m *explicitHistogramMetrics) GetOrCreate(key Key, attributes pcommon.Map) h, ok := m.metrics[key] if !ok { h = &explicitHistogram{ - attributes: attributes, - exemplars: pmetric.NewExemplarSlice(), - bounds: m.bounds, - bucketCounts: make([]uint64, len(m.bounds)+1), + attributes: attributes, + exemplars: pmetric.NewExemplarSlice(), + bounds: m.bounds, + bucketCounts: make([]uint64, len(m.bounds)+1), + maxExemplarCount: m.maxExemplarCount, } m.metrics[key] = h } @@ -128,11 +137,13 @@ func (m *exponentialHistogramMetrics) GetOrCreate(key Key, attributes pcommon.Ma histogram.Init(cfg) h = &exponentialHistogram{ - histogram: histogram, - attributes: attributes, - exemplars: pmetric.NewExemplarSlice(), + histogram: histogram, + attributes: attributes, + exemplars: pmetric.NewExemplarSlice(), + maxExemplarCount: m.maxExemplarCount, } m.metrics[key] = h + } return h @@ -212,6 +223,9 @@ func (h *explicitHistogram) Observe(value float64) { } func (h *explicitHistogram) AddExemplar(traceID pcommon.TraceID, spanID pcommon.SpanID, value float64) { + if h.maxExemplarCount != nil && h.exemplars.Len() >= *h.maxExemplarCount { + return + } e := h.exemplars.AppendEmpty() e.SetTraceID(traceID) e.SetSpanID(spanID) @@ -223,6 +237,9 @@ func (h *exponentialHistogram) Observe(value float64) { } func (h *exponentialHistogram) AddExemplar(traceID pcommon.TraceID, spanID pcommon.SpanID, value float64) { + if h.maxExemplarCount != nil && h.exemplars.Len() >= *h.maxExemplarCount { + return + } e := h.exemplars.AppendEmpty() e.SetTraceID(traceID) e.SetSpanID(spanID) @@ -230,29 +247,35 @@ func (h *exponentialHistogram) AddExemplar(traceID pcommon.TraceID, spanID pcomm } type Sum struct { - attributes pcommon.Map - count uint64 - exemplars pmetric.ExemplarSlice + attributes pcommon.Map + count uint64 + exemplars pmetric.ExemplarSlice + maxExemplarCount *int } func (s *Sum) Add(value uint64) { s.count += value } -func NewSumMetrics() SumMetrics { - return SumMetrics{metrics: make(map[Key]*Sum)} +func NewSumMetrics(maxExemplarCount *int) SumMetrics { + return SumMetrics{ + metrics: make(map[Key]*Sum), + maxExemplarCount: maxExemplarCount, + } } type SumMetrics struct { - metrics map[Key]*Sum + metrics map[Key]*Sum + maxExemplarCount *int } func (m *SumMetrics) GetOrCreate(key Key, attributes pcommon.Map) *Sum { s, ok := m.metrics[key] if !ok { s = &Sum{ - attributes: attributes, - exemplars: pmetric.NewExemplarSlice(), + attributes: attributes, + exemplars: pmetric.NewExemplarSlice(), + maxExemplarCount: m.maxExemplarCount, } m.metrics[key] = s } @@ -260,6 +283,9 @@ func (m *SumMetrics) GetOrCreate(key Key, attributes pcommon.Map) *Sum { } func (s *Sum) AddExemplar(traceID pcommon.TraceID, spanID pcommon.SpanID, value float64) { + if s.maxExemplarCount != nil && s.exemplars.Len() >= *s.maxExemplarCount { + return + } e := s.exemplars.AppendEmpty() e.SetTraceID(traceID) e.SetSpanID(spanID) diff --git a/connector/spanmetricsconnector/internal/metrics/metrics_test.go b/connector/spanmetricsconnector/internal/metrics/metrics_test.go index 67b5a356a3fb..edb88236f5b5 100644 --- a/connector/spanmetricsconnector/internal/metrics/metrics_test.go +++ b/connector/spanmetricsconnector/internal/metrics/metrics_test.go @@ -8,6 +8,7 @@ import ( "github.com/lightstep/go-expohisto/structure" "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" ) @@ -103,3 +104,186 @@ func TestConnector_ExpoHistToExponentialDataPoint(t *testing.T) { }) } } + +func TestSum_AddExemplar(t *testing.T) { + maxCount := 3 + tests := []struct { + name string + input Sum + want int + }{ + { + name: "Sum Metric - No exemplars configured", + input: Sum{exemplars: pmetric.NewExemplarSlice(), maxExemplarCount: &maxCount}, + want: 1, + }, + { + name: "Sum Metric - With exemplars length less than configured max count", + input: func() Sum { + exs := pmetric.NewExemplarSlice() + + e1 := exs.AppendEmpty() + e1.SetTimestamp(1) + e1.SetDoubleValue(1) + + return Sum{ + exemplars: exs, + maxExemplarCount: &maxCount, + } + }(), + want: 2, + }, + { + name: "Sum Metric - With exemplars length equal to configured max count", + input: func() Sum { + exs := pmetric.NewExemplarSlice() + + e1 := exs.AppendEmpty() + e1.SetTimestamp(1) + e1.SetDoubleValue(1) + + e2 := exs.AppendEmpty() + e2.SetTimestamp(2) + e2.SetDoubleValue(2) + + e3 := exs.AppendEmpty() + e3.SetTimestamp(3) + e3.SetDoubleValue(3) + + return Sum{ + exemplars: exs, + maxExemplarCount: &maxCount, + } + }(), + want: 3, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tt.input.AddExemplar(pcommon.TraceID{}, pcommon.SpanID{}, 4) + assert.Equal(t, tt.want, tt.input.exemplars.Len()) + }) + } +} + +func TestExplicitHistogram_AddExemplar(t *testing.T) { + maxCount := 3 + tests := []struct { + name string + input explicitHistogram + want int + }{ + { + name: "Explicit Histogram - No exemplars configured", + input: explicitHistogram{exemplars: pmetric.NewExemplarSlice(), maxExemplarCount: &maxCount}, + want: 1, + }, + { + name: "Explicit Histogram - With exemplars length less than configured max count", + input: func() explicitHistogram { + exs := pmetric.NewExemplarSlice() + + e1 := exs.AppendEmpty() + e1.SetTimestamp(1) + e1.SetDoubleValue(1) + + return explicitHistogram{ + exemplars: exs, + maxExemplarCount: &maxCount, + } + }(), + want: 2, + }, + { + name: "Explicit Histogram - With exemplars length equal to configured max count", + input: func() explicitHistogram { + exs := pmetric.NewExemplarSlice() + + e1 := exs.AppendEmpty() + e1.SetTimestamp(1) + e1.SetDoubleValue(1) + + e2 := exs.AppendEmpty() + e2.SetTimestamp(2) + e2.SetDoubleValue(2) + + e3 := exs.AppendEmpty() + e3.SetTimestamp(3) + e3.SetDoubleValue(3) + + return explicitHistogram{ + exemplars: exs, + maxExemplarCount: &maxCount, + } + }(), + want: 3, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tt.input.AddExemplar(pcommon.TraceID{}, pcommon.SpanID{}, 4) + assert.Equal(t, tt.want, tt.input.exemplars.Len()) + }) + } +} + +func TestExponentialHistogram_AddExemplar(t *testing.T) { + maxCount := 3 + tests := []struct { + name string + input exponentialHistogram + want int + }{ + { + name: "Exponential Histogram - No exemplars configured", + input: exponentialHistogram{exemplars: pmetric.NewExemplarSlice(), maxExemplarCount: &maxCount}, + want: 1, + }, + { + name: "Exponential Histogram - With exemplars length less than configured max count", + input: func() exponentialHistogram { + exs := pmetric.NewExemplarSlice() + + e1 := exs.AppendEmpty() + e1.SetTimestamp(1) + e1.SetDoubleValue(1) + + return exponentialHistogram{ + exemplars: exs, + maxExemplarCount: &maxCount, + } + }(), + want: 2, + }, + { + name: "Exponential Histogram - With exemplars length equal to configured max count", + input: func() exponentialHistogram { + exs := pmetric.NewExemplarSlice() + + e1 := exs.AppendEmpty() + e1.SetTimestamp(1) + e1.SetDoubleValue(1) + + e2 := exs.AppendEmpty() + e2.SetTimestamp(2) + e2.SetDoubleValue(2) + + e3 := exs.AppendEmpty() + e3.SetTimestamp(3) + e3.SetDoubleValue(3) + + return exponentialHistogram{ + exemplars: exs, + maxExemplarCount: &maxCount, + } + }(), + want: 3, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tt.input.AddExemplar(pcommon.TraceID{}, pcommon.SpanID{}, 4) + assert.Equal(t, tt.want, tt.input.exemplars.Len()) + }) + } +} diff --git a/connector/spanmetricsconnector/internal/metrics/package_test.go b/connector/spanmetricsconnector/internal/metrics/package_test.go new file mode 100644 index 000000000000..b8f16a8085ef --- /dev/null +++ b/connector/spanmetricsconnector/internal/metrics/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metrics + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/connector/spanmetricsconnector/metadata.yaml b/connector/spanmetricsconnector/metadata.yaml index 44c256214d12..8ea19a8fe23e 100644 --- a/connector/spanmetricsconnector/metadata.yaml +++ b/connector/spanmetricsconnector/metadata.yaml @@ -1,9 +1,15 @@ type: spanmetrics +scope_name: otelcol/spanmetrics status: class: connector stability: alpha: [traces_to_metrics] - distributions: [contrib, sumo, grafana] + distributions: [contrib] codeowners: - active: [albertteoh] + active: [portertech, Frapschen] + emeritus: [albertteoh] + seeking_new: true + +tests: + config: diff --git a/connector/spanmetricsconnector/package_test.go b/connector/spanmetricsconnector/package_test.go new file mode 100644 index 000000000000..f00ec737b5ed --- /dev/null +++ b/connector/spanmetricsconnector/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package spanmetricsconnector + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/connector/spanmetricsconnector/testdata/config.yaml b/connector/spanmetricsconnector/testdata/config.yaml index b952c8d38120..7358cd000549 100644 --- a/connector/spanmetricsconnector/testdata/config.yaml +++ b/connector/spanmetricsconnector/testdata/config.yaml @@ -15,6 +15,7 @@ spanmetrics/full: exemplars: enabled: true dimensions_cache_size: 1500 + resource_metrics_cache_size: 1600 # Additional list of dimensions on top of: # - service.name @@ -36,7 +37,7 @@ spanmetrics/full: aggregation_temporality: "AGGREGATION_TEMPORALITY_DELTA" # The period on which all metrics (whose dimension keys remain in cache) will be emitted. - # Default: 15s. + # Default: 60s. metrics_flush_interval: 30s # default configuration with exponential buckets histogram @@ -57,7 +58,23 @@ spanmetrics/invalid_histogram_unit: histogram: unit: "h" +spanmetrics/invalid_metrics_expiration: + metrics_expiration: -20s + # exemplars enabled spanmetrics/exemplars_enabled: exemplars: enabled: true + +# exemplars enabled with max per datapoint configured +spanmetrics/exemplars_enabled_with_max_per_datapoint: + exemplars: + enabled: true + max_per_data_point: 5 + +# resource metrics key attributes filter +spanmetrics/resource_metrics_key_attributes: + resource_metrics_key_attributes: + - service.name + - telemetry.sdk.language + - telemetry.sdk.name diff --git a/distributions.yaml b/distributions.yaml new file mode 100644 index 000000000000..1ec93c7d9e36 --- /dev/null +++ b/distributions.yaml @@ -0,0 +1,8 @@ +# A collection of distributions that can be referenced in the metadata.yaml files. +# The rules below apply to every distribution added to this list: +# - The distribution is open source and maintained by the OpenTelemetry project. +# - The link must point to a publicly accessible repository. + - name: core + url: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol + - name: contrib + url: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib \ No newline at end of file diff --git a/docs/testing.md b/docs/testing.md new file mode 100644 index 000000000000..f6686a24916b --- /dev/null +++ b/docs/testing.md @@ -0,0 +1,14 @@ + +## Testing your components + +- `scraperint` is a wrapper around testcontainers and the golang testing api for use with receivers only (at least, today). See docs in [`scraperinttest`](../internal/coreinternal/scraperinttest/README.md) for information on usage. +- Add the `integration` [build constraint](#constraining-build-targets) for longer-running, comprehensive tests. These will be run via github actions when submitting a PR. + +## Constraining build targets + +This project uses golang [build-constraints](https://pkg.go.dev/cmd/go#hdr-Build_constraints) to tag build targets. Guidance on using existing targets + +- `e2e` should be used for end-to-end tests. These are currently manually configured to be run in `.github/workflows` on a per-component basis. +- `integration` should be used for integration tests (able to be run on local hardware but not require any credentials or environmental infrastructure). You can run this with `make integration-test` or `cd componentclass/yourcomponent && make mod-integration-test` +- Restrict builds for varying platforms or processor architectures with their relevant platform names. See [documentation](https://pkg.go.dev/cmd/go#hdr-Build_constraints) on `GOOS` and `GOOARCH` for how these are set. +- Add other build tags as needed, such as has been done for `tools` and `race`. Please document any needed commands here and ensure to get consensus with the otel collector working group before introducing build constraints. diff --git a/examples/couchbase/docker-compose.yaml b/examples/couchbase/docker-compose.yaml index 95dfcee5eccb..1d9bf5043112 100644 --- a/examples/couchbase/docker-compose.yaml +++ b/examples/couchbase/docker-compose.yaml @@ -10,14 +10,14 @@ services: cpus: "0.50" memory: 1512M opentelemetry-collector-contrib: - image: otel/opentelemetry-collector-contrib:0.88.0 + image: otel/opentelemetry-collector-contrib:0.97.0 command: ["--config=/etc/otel-collector-config.yml"] volumes: - ./otel-collector-config.yaml:/etc/otel-collector-config.yml depends_on: - couchbase prometheus: - image: prom/prometheus:v2.47.2 + image: prom/prometheus:v2.51.1 volumes: - ./prometheus-config.yaml:/etc/prometheus/prometheus.yml ports: diff --git a/examples/demo/client/Dockerfile b/examples/demo/client/Dockerfile index 224a5bda1eb1..2e144949cc7d 100644 --- a/examples/demo/client/Dockerfile +++ b/examples/demo/client/Dockerfile @@ -1,10 +1,10 @@ # Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 -FROM golang:1.21 as build +FROM golang:1.22 as build WORKDIR /app/ COPY . . RUN go env -w GOPROXY=direct RUN CGO_ENABLED=0 go build -o main main.go -FROM alpine:3.18 +FROM alpine:3.19 COPY --from=build /app/main /app/main CMD ["/app/main"] diff --git a/examples/demo/client/go.mod b/examples/demo/client/go.mod index 6ca06dd7edb1..725dd25afe27 100644 --- a/examples/demo/client/go.mod +++ b/examples/demo/client/go.mod @@ -1,34 +1,33 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/examples/demo/client -go 1.20 +go 1.21 require ( - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 - go.opentelemetry.io/otel v1.20.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 - go.opentelemetry.io/otel/metric v1.20.0 - go.opentelemetry.io/otel/sdk v1.20.0 - go.opentelemetry.io/otel/sdk/metric v1.20.0 - google.golang.org/grpc v1.59.0 + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 + go.opentelemetry.io/otel v1.24.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/sdk v1.24.0 + go.opentelemetry.io/otel/sdk/metric v1.24.0 + google.golang.org/grpc v1.63.2 ) require ( github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text 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-20231030173426-d783a09b4405 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect ) retract ( diff --git a/examples/demo/client/go.sum b/examples/demo/client/go.sum index 9e27a950caf4..281e77712327 100644 --- a/examples/demo/client/go.sum +++ b/examples/demo/client/go.sum @@ -1,59 +1,59 @@ 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/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/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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/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/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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= 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/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0/go.mod h1:hbzqqcIxyywu6UQ5J1wb4ntla8nCwCfNBZnMo2Dgh48= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -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= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 h1:f2jriWfOdldanBwS9jNBdeOKAQN7b4ugAMaNu1/1k9g= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0/go.mod h1:B+bcQI1yTY+N0vqMpoZbEN7+XU4tNM0DmUiOwebFJWI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -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-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/examples/demo/docker-compose.yaml b/examples/demo/docker-compose.yaml index 9b14e04bbc6c..b23fbb3b823d 100644 --- a/examples/demo/docker-compose.yaml +++ b/examples/demo/docker-compose.yaml @@ -13,6 +13,8 @@ services: # Zipkin zipkin-all-in-one: image: openzipkin/zipkin:latest + environment: + - JAVA_OPTS=-Xms1024m -Xmx1024m -XX:+ExitOnOutOfMemoryError restart: always ports: - "9411:9411" diff --git a/examples/demo/server/Dockerfile b/examples/demo/server/Dockerfile index 224a5bda1eb1..2e144949cc7d 100644 --- a/examples/demo/server/Dockerfile +++ b/examples/demo/server/Dockerfile @@ -1,10 +1,10 @@ # Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 -FROM golang:1.21 as build +FROM golang:1.22 as build WORKDIR /app/ COPY . . RUN go env -w GOPROXY=direct RUN CGO_ENABLED=0 go build -o main main.go -FROM alpine:3.18 +FROM alpine:3.19 COPY --from=build /app/main /app/main CMD ["/app/main"] diff --git a/examples/demo/server/go.mod b/examples/demo/server/go.mod index 16b4e1e2f38d..653e519af1a5 100644 --- a/examples/demo/server/go.mod +++ b/examples/demo/server/go.mod @@ -1,34 +1,33 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/examples/demo/server -go 1.20 +go 1.21 require ( - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 - go.opentelemetry.io/otel v1.20.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 - go.opentelemetry.io/otel/metric v1.20.0 - go.opentelemetry.io/otel/sdk v1.20.0 - go.opentelemetry.io/otel/sdk/metric v1.20.0 - go.opentelemetry.io/otel/trace v1.20.0 - google.golang.org/grpc v1.59.0 + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 + go.opentelemetry.io/otel v1.24.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/sdk v1.24.0 + go.opentelemetry.io/otel/sdk/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + google.golang.org/grpc v1.63.2 ) require ( github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text 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-20231030173426-d783a09b4405 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect ) retract ( diff --git a/examples/demo/server/go.sum b/examples/demo/server/go.sum index 9e27a950caf4..281e77712327 100644 --- a/examples/demo/server/go.sum +++ b/examples/demo/server/go.sum @@ -1,59 +1,59 @@ 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/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/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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/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/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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= 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/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0/go.mod h1:hbzqqcIxyywu6UQ5J1wb4ntla8nCwCfNBZnMo2Dgh48= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -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= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 h1:f2jriWfOdldanBwS9jNBdeOKAQN7b4ugAMaNu1/1k9g= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0/go.mod h1:B+bcQI1yTY+N0vqMpoZbEN7+XU4tNM0DmUiOwebFJWI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -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-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/examples/fault-tolerant-logs-collection/README.md b/examples/fault-tolerant-logs-collection/README.md new file mode 100644 index 000000000000..54f868a3eb9a --- /dev/null +++ b/examples/fault-tolerant-logs-collection/README.md @@ -0,0 +1,9 @@ +## Fault tolerant log collection example + +Filelog receiver's persistence can be covered by the usage of the following extensions: +- [filestorage](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/storage/filestorage) extension, + to ensure that Collector's restarts do not affect the log collection and offset tracking. +- [exporterhelper persistent-queue](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md#persistent-queue), + to ensure that Collector's restarts do not affect the delivery of the already collected logs. + +A full configuration example is provided in [example config](./otel-col-config.yaml) \ No newline at end of file diff --git a/examples/fault-tolerant-logs-collection/otel-col-config.yaml b/examples/fault-tolerant-logs-collection/otel-col-config.yaml new file mode 100644 index 000000000000..eec53399f20a --- /dev/null +++ b/examples/fault-tolerant-logs-collection/otel-col-config.yaml @@ -0,0 +1,24 @@ +receivers: + filelog: + include: [/var/log/busybox/simple.log] + storage: file_storage/filelogreceiver + +extensions: + file_storage/filelogreceiver: + directory: /var/lib/otelcol/file_storage/receiver + file_storage/otlpoutput: + directory: /var/lib/otelcol/file_storage/output + +service: + extensions: [file_storage/filelogreceiver, file_storage/otlpoutput] + pipelines: + logs: + receivers: [filelog] + exporters: [otlp/custom] + processors: [] + +exporters: + otlp/custom: + endpoint: http://0.0.0.0:4242 + sending_queue: + storage: file_storage/otlpoutput diff --git a/examples/logline-filtering/README.md b/examples/logline-filtering/README.md new file mode 100644 index 000000000000..9ae695a33ae1 --- /dev/null +++ b/examples/logline-filtering/README.md @@ -0,0 +1,13 @@ +## Filtering log messages based on content + +Filelog receiver provides support for filtering logs based on their content. This can be achieved by using +the [filter operator](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/stanza/docs/operators/filter.md), +configured with matching regular expressions. + +With this happening at the collection point, a lot of resources at the destination backend +can be saved since no additional processing would need to take place. + +A full configuration example on how to filter out logs that start with the `INFO:` pattern is +provided in the [example config](./otel-col-config-filter-out-logs.yaml). +A full configuration example on how to only collect logs that start with the `WARN:` pattern is provided in +the [example config](./otel-col-config-filter-in-logs.yaml) \ No newline at end of file diff --git a/examples/logline-filtering/otel-col-config-filter-in-logs.yaml b/examples/logline-filtering/otel-col-config-filter-in-logs.yaml new file mode 100644 index 000000000000..a03f7b08b36f --- /dev/null +++ b/examples/logline-filtering/otel-col-config-filter-in-logs.yaml @@ -0,0 +1,17 @@ +receivers: + filelog: + include: [/var/log/busybox/simple.log] + operators: + - type: filter + expr: 'body not matches "^WARN:"' + +service: + pipelines: + logs: + receivers: [filelog] + exporters: [otlp/custom] + processors: [] + +exporters: + otlp/custom: + endpoint: http://0.0.0.0:4242 diff --git a/examples/logline-filtering/otel-col-config-filter-out-logs.yaml b/examples/logline-filtering/otel-col-config-filter-out-logs.yaml new file mode 100644 index 000000000000..ff19b50c6889 --- /dev/null +++ b/examples/logline-filtering/otel-col-config-filter-out-logs.yaml @@ -0,0 +1,17 @@ +receivers: + filelog: + include: [/var/log/busybox/simple.log] + operators: + - type: filter + expr: 'body matches "^INFO:"' + +service: + pipelines: + logs: + receivers: [filelog] + exporters: [otlp/custom] + processors: [] + +exporters: + otlp/custom: + endpoint: http://0.0.0.0:4242 diff --git a/examples/secure-tracing/README.md b/examples/secure-tracing/README.md new file mode 100644 index 000000000000..9b0312d4638e --- /dev/null +++ b/examples/secure-tracing/README.md @@ -0,0 +1,117 @@ +# Build A Secure Trace Collection Pipeline + +Implementing robust security measures is essential for any tracing ingestion service and infrastructure. This is an illustrative example of a secure setup encompassing the following features for trace ingestion: + +- Data Encryption with OTLP receiver supporting TLS. Transport Layer Security (TLS) is employed to encrypt traces in transit between the application and the OpenTelemetry (OTLP) endpoint, fortifying data security. +- Client Authentication via [Envoy](https://www.envoyproxy.io/docs/envoy/latest/start/start), a high-performance proxy. +Even though we can configure OTLP receiver with mTLS for client authentication, authorization is not supported by OpenTelemetry Collector. This is one of the reasons that we use Envoy for client authentication. It allows us to easily add authorization, ensuring that only authorized clients can submit traces to the ingestion service. + +In this example, we also include a test via telementrygen: a tool provided from this repository for generating synthetic telemetry data, which helps verify the security features and overall functionality of the set up. + + +## Data Encryption via TLS +The OpenTelemetry Collector has detailed [documentation](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md) on how to configure TLS. In this example, we enable TLS for receivers which leverages server configuration. + +Example +``` +receivers: + otlp: + protocols: + grpc: + endpoint: mysite.local:55690 + tls: + cert_file: server.crt + key_file: server.key +``` + +## Client Authentication +Envoy [sandbox for TLS](https://www.envoyproxy.io/docs/envoy/latest/start/sandboxes/tls) is a good source for reference. A few elements in following configuration are good to call out, +- `require_client_certificate` is set true +- The `matcher` under `validation_context` expects a client certificate with `group-id` as well as `tenat-id` which provides more granular control. + +``` +typed_config: + "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext + require_client_certificate: true + common_tls_context: + # h2 If the listener is going to support both HTTP/2 and HTTP/1.1. + alpn_protocols: "h2" + tls_certificates: + - certificate_chain: + filename: "/etc/envoy.crt" + private_key: + filename: "/etc/envoy.key" + validation_context: + match_typed_subject_alt_names: + - san_type: URI + matcher: + Match tenant by two level info: group id and tenant-id. + exact: "aprn:trace-client:certmgr:::group-x:/ig/5003178/uv/tenant-a" + trusted_ca: + filename: "/etc/ca.crt" +``` + +## Setup Environment +### Generate Certificates +To generate various self-signed certificates, including those for Envoy and the OpenTelemetry Collector receiver, as well as tracing client certificate, we utilize the widely renowned open-source tool [OpenSSL](https://www.openssl.org/source/), OpenSSL 3.1.0 14 was tested. + +In the `certs` folder, you can find a set of `.ext` files which define the properties for a certificate. A `MakeFile` is provided to facilate the process. + +``` +$ cd certs +$ make clean && make all +``` +### Bring up services +We use docker compose to bring up Envoy and OpenTelemetry Collection Pipeline. Make sure the current folder is `secure-tracing`, + +``` +$ docker compose up +``` +From the console window, verify that `Envoy` and `Collector` are up and running. If you see error similar to following, + +``` +secure-tracing-otel-collector-1 | Error: cannot start pipelines: failed to load TLS config: failed to load TLS cert and key: read /etc/otel-collector.crt: is a directory +``` +It's most likely due to missing certificates. Follow the steps from section above to generate certificates. + +## Run test + +### Compile telemetrygen +From the root of this repository, +``` +$ cd cmd/telemetrygen +$ go build . +$ cp telemetrygen ../../examples/secure-tracing +``` + +### Send a trace +From the root of this repository, +``` +$ cd examples/secure-tracing +$ chmod +x telemetrygen +$ ./telemetrygen traces --traces 1 --otlp-endpoint 127.0.0.1:10000 --ca-cert 'certs/ca.crt' --mtls --client-cert 'certs/tracing-client.crt' --client-key 'certs/tracing-client.key' +``` + +Verify traces are captured and sent to console running `docker compose up`, similar to following ... +``` +secure-tracing-otel-collector-1 | -> service.name: Str(telemetrygen) +secure-tracing-otel-collector-1 | ScopeSpans #0 +secure-tracing-otel-collector-1 | ScopeSpans SchemaURL: +secure-tracing-otel-collector-1 | InstrumentationScope telemetrygen +secure-tracing-otel-collector-1 | Span #0 +secure-tracing-otel-collector-1 | Trace ID : 0fe7ca900fda938ce918f8b2d82d6ae9 +secure-tracing-otel-collector-1 | Parent ID : 1011b3f973049923 +secure-tracing-otel-collector-1 | ID : 65f3cfe524375dd4 +secure-tracing-otel-collector-1 | Name : okey-dokey +secure-tracing-otel-collector-1 | Kind : Server +... +secure-tracing-otel-collector-1 | Attributes: +secure-tracing-otel-collector-1 | -> net.peer.ip: Str(1.2.3.4) +secure-tracing-otel-collector-1 | -> peer.service: Str(telemetrygen-client) +... + +``` +## Shutdown Services +``` +$ docker compose down +``` diff --git a/examples/secure-tracing/certs/Makefile b/examples/secure-tracing/certs/Makefile new file mode 100644 index 000000000000..54185145249f --- /dev/null +++ b/examples/secure-tracing/certs/Makefile @@ -0,0 +1,39 @@ + +all: ca.crt envoy.crt tracing-client.crt otel-collector.crt + +clean: + rm -rf *.key *.crt + rm -f *.key *.crt *.csr ca.srl + +ca.key: + openssl genrsa -out ca.key 2048 + +ca.crt: ca.key + openssl req -x509 -new -nodes -key ca.key -sha256 -days 365 -out ca.crt -config ca.ext + +envoy.key: + openssl genrsa -out envoy.key 2048 + +envoy.csr: envoy.key + openssl req -new -key envoy.key -out envoy.csr -config envoy.ext -extensions 'v3_req' + +envoy.crt: envoy.csr + openssl x509 -req -in envoy.csr -CA ca.crt -CAkey ca.key -out envoy.crt -CAcreateserial -days 365 -sha256 -extfile envoy.ext -extensions 'v3_req' + +tracing-client.key: + openssl genrsa -out tracing-client.key 2048 + +tracing-client.csr: tracing-client.key + openssl req -new -key tracing-client.key -out tracing-client.csr -config tracing-client.ext -extensions 'v3_req' + +tracing-client.crt: tracing-client.csr + openssl x509 -req -in tracing-client.csr -CA ca.crt -CAkey ca.key -out tracing-client.crt -CAcreateserial -days 365 -sha256 -extfile tracing-client.ext -extensions 'v3_req' + +otel-collector.key: + openssl genrsa -out otel-collector.key 2048 + +otel-collector.csr: otel-collector.key + openssl req -new -key otel-collector.key -out otel-collector.csr -config otel-collector.ext -extensions 'v3_req' + +otel-collector.crt: otel-collector.csr + openssl x509 -req -in otel-collector.csr -CA ca.crt -CAkey ca.key -out otel-collector.crt -CAcreateserial -days 365 -sha256 -extfile otel-collector.ext -extensions 'v3_req' diff --git a/examples/secure-tracing/certs/ca.ext b/examples/secure-tracing/certs/ca.ext new file mode 100644 index 000000000000..ad89873ecd3c --- /dev/null +++ b/examples/secure-tracing/certs/ca.ext @@ -0,0 +1,11 @@ +[req] +distinguished_name = req_distinguished_name +prompt = no + +[req_distinguished_name] +C = US +ST = CA +L = Cupertino +O = Example +OU = Local Development +CN = ca diff --git a/examples/secure-tracing/certs/envoy.ext b/examples/secure-tracing/certs/envoy.ext new file mode 100644 index 000000000000..09f2fcfeb8f3 --- /dev/null +++ b/examples/secure-tracing/certs/envoy.ext @@ -0,0 +1,22 @@ +[req] +distinguished_name = req_distinguished_name +x509_extensions = v3_req +prompt = no + +[req_distinguished_name] +C = US +ST = CA +L = Cupertino +O = Example +OU = Local Development +CN = envoy-example + +[v3_req] +keyUsage = keyEncipherment, dataEncipherment +extendedKeyUsage = serverAuth +subjectAltName = @alt_names + +[alt_names] +DNS.1 = envoy-example +DNS.2 = localhost +IP.1 = 127.0.0.1 diff --git a/examples/secure-tracing/certs/otel-collector.ext b/examples/secure-tracing/certs/otel-collector.ext new file mode 100644 index 000000000000..bcce792808c8 --- /dev/null +++ b/examples/secure-tracing/certs/otel-collector.ext @@ -0,0 +1,23 @@ +[req] +distinguished_name = req_distinguished_name +x509_extensions = v3_req +prompt = no + +[req_distinguished_name] +C = US +ST = CA +L = Cupertino +O = Example +OU = Local Development +CN = otel-collector-example + +[v3_req] +keyUsage = keyEncipherment, dataEncipherment +extendedKeyUsage = serverAuth +subjectAltName = @alt_names + +[alt_names] +DNS.1 = otel-collector +DNS.2 = otel-collector.default.svc.cluster.local +DNS.3 = localhost +IP.1 = 127.0.0.1 diff --git a/examples/secure-tracing/certs/tracing-client.ext b/examples/secure-tracing/certs/tracing-client.ext new file mode 100644 index 000000000000..8dc741bdd9dd --- /dev/null +++ b/examples/secure-tracing/certs/tracing-client.ext @@ -0,0 +1,20 @@ +[req] +distinguished_name = req_distinguished_name +x509_extensions = v3_req +prompt = no + +[req_distinguished_name] +C = US +ST = CA +L = Cupertino +O = Example +OU = Local Development +CN = traces-client + +[v3_req] +keyUsage = keyEncipherment, digitalSignature +extendedKeyUsage = clientAuth +subjectAltName = @alt_names + +[alt_names] +URI.1 = trace-client:group-x:tenant-a diff --git a/examples/secure-tracing/docker-compose.yaml b/examples/secure-tracing/docker-compose.yaml new file mode 100644 index 000000000000..fc936a2958ba --- /dev/null +++ b/examples/secure-tracing/docker-compose.yaml @@ -0,0 +1,26 @@ +version: '3' +services: + envoy: + image: envoyproxy/envoy-alpine:v1.21-latest + command: ["/usr/local/bin/envoy", "-c", "/etc/envoy-config.yaml", "-l", "debug"] + ports: + - "10000:10000" + - "9901:9901" + volumes: + - ./certs/envoy.crt:/etc/envoy.crt + - ./certs/envoy.key:/etc/envoy.key + - ./certs/ca.crt:/etc/ca.crt + - ./envoy-config.yaml:/etc/envoy-config.yaml + otel-collector: + image: otel/opentelemetry-collector:0.97.0 + command: ["--config=/etc/otel-collector-config.yaml"] + volumes: + - ./certs/otel-collector.crt:/etc/otel-collector.crt + - ./certs/otel-collector.key:/etc/otel-collector.key + - ./certs/ca.crt:/etc/ca.crt + - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml + ports: + - "13133:13133" # health_check extension + - "55690" # OTLP gRPC receiver + depends_on: + - envoy diff --git a/examples/secure-tracing/envoy-config.yaml b/examples/secure-tracing/envoy-config.yaml new file mode 100644 index 000000000000..951782dff6e7 --- /dev/null +++ b/examples/secure-tracing/envoy-config.yaml @@ -0,0 +1,70 @@ +admin: + address: + socket_address: + protocol: TCP + address: 0.0.0.0 + port_value: 9901 +static_resources: + listeners: + - name: listener_0 + address: + socket_address: { address: 0.0.0.0, port_value: 10000 } + filter_chains: + - filters: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + stat_prefix: ingress_http + route_config: + name: local_route + virtual_hosts: + - name: local_service + domains: ["*"] + routes: + - match: { prefix: "/" } + route: { cluster: collector_service } + http_filters: + - name: envoy.filters.http.router + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router + transport_socket: + name: envoy.transport_sockets.tls + typed_config: + "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext + require_client_certificate: true + common_tls_context: + # h2 If the listener is going to support both HTTP/2 and HTTP/1.1. + alpn_protocols: "h2" + tls_certificates: + - certificate_chain: + filename: "/etc/envoy.crt" + private_key: + filename: "/etc/envoy.key" + validation_context: + match_typed_subject_alt_names: + - san_type: URI + matcher: + # Match tenant by two levels: group-id and tenant-id. + exact: "trace-client:group-x:tenant-a" + trusted_ca: + filename: "/etc/ca.crt" + + clusters: + - name: collector_service + connect_timeout: 25s + type: LOGICAL_DNS + lb_policy: ROUND_ROBIN + http2_protocol_options: { } + load_assignment: + cluster_name: collector_service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: otel-collector + port_value: 55690 + transport_socket: + name: envoy.transport_sockets.tls + typed_config: + "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext diff --git a/examples/secure-tracing/otel-collector-config.yaml b/examples/secure-tracing/otel-collector-config.yaml new file mode 100644 index 000000000000..c5da2ef697be --- /dev/null +++ b/examples/secure-tracing/otel-collector-config.yaml @@ -0,0 +1,23 @@ +receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:55690 + tls: + cert_file: /etc/otel-collector.crt + key_file: /etc/otel-collector.key + +processors: + batch: + +exporters: + debug: + verbosity: detailed + +service: + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [debug] + diff --git a/exporter/alertmanagerexporter/README.md b/exporter/alertmanagerexporter/README.md index 08ef4d0b5bf5..3ef900df2304 100644 --- a/exporter/alertmanagerexporter/README.md +++ b/exporter/alertmanagerexporter/README.md @@ -3,15 +3,14 @@ | Status | | | ------------- |-----------| | Stability | [development]: traces | -| Distributions | [contrib] | +| Distributions | [] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Falertmanager%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Falertmanager) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Falertmanager%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Falertmanager) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling), [@sokoide](https://www.github.com/sokoide), [@mcube8](https://www.github.com/mcube8) | [development]: https://github.com/open-telemetry/opentelemetry-collector#development -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -Exports OTEL Events (SpanEvent in Tracing added by AddEvent API) as Alerts to [Alertmanager] (https://prometheus.io/docs/alerting/latest/alertmanager/) back-end to notify Errors or Change events. +Exports OTEL Events (SpanEvent in Tracing added by AddEvent API) as Alerts to [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) back-end to notify Errors or Change events. Supported pipeline types: traces @@ -19,8 +18,8 @@ Supported pipeline types: traces The following settings are required: -- `endpoint` : Alertmanager endpoint to send events -- `severity` (default info): Default severity for Alerts +- `endpoint`: Alertmanager endpoint to send events +- `severity`: Default severity for Alerts The following settings are optional: @@ -29,9 +28,8 @@ The following settings are optional: - [HTTP settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/confighttp/README.md) - [TLS and mTLS settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md) - `generator_url` is the source of the alerts to be used in Alertmanager's payload. The default value is "opentelemetry-collector", and can be set to the URL of the opentelemetry collector. -- `severity_attribute`is the spanevent Attribute name which can be used instead of default severity string in Alert payload - eg: If severity_attribute is set to "foo" and the SpanEvent has an attribute called foo, foo's attribute value will be used as the severity value for that particular Alert generated from the SpanEvent. - +- `severity_attribute` is the SpanEvent Attribute name which can be used instead of default severity string in Alert payload + e.g.: If `severity_attribute` is set to "foo" and the SpanEvent has an attribute called foo, foo's attribute value will be used as the severity value for that particular Alert generated from the SpanEvent. Example config: @@ -57,4 +55,4 @@ exporters: max_interval: 60s max_elapsed_time: 10m generator_url: "opentelemetry-collector" -``` \ No newline at end of file +``` diff --git a/exporter/alertmanagerexporter/alertmanager_exporter.go b/exporter/alertmanagerexporter/alertmanager_exporter.go index 8050fbf1f349..4288c7acba71 100644 --- a/exporter/alertmanagerexporter/alertmanager_exporter.go +++ b/exporter/alertmanagerexporter/alertmanager_exporter.go @@ -4,17 +4,27 @@ package alertmanagerexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alertmanagerexporter" import ( + "bytes" "context" + "encoding/json" + "fmt" + "io" + "net/http" + "time" + "github.com/prometheus/common/model" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" + "go.uber.org/zap" ) type alertmanagerExporter struct { config *Config + client *http.Client tracesMarshaler ptrace.Marshaler settings component.TelemetrySettings endpoint string @@ -23,20 +33,167 @@ type alertmanagerExporter struct { severityAttribute string } -func (s *alertmanagerExporter) pushTraces(_ context.Context, _ ptrace.Traces) error { +type alertmanagerEvent struct { + spanEvent ptrace.SpanEvent + traceID string + spanID string + severity string +} + +func (s *alertmanagerExporter) convertEventSliceToArray(eventSlice ptrace.SpanEventSlice, traceID pcommon.TraceID, spanID pcommon.SpanID) []*alertmanagerEvent { + if eventSlice.Len() > 0 { + events := make([]*alertmanagerEvent, eventSlice.Len()) - // To Be Implemented + for i := 0; i < eventSlice.Len(); i++ { + var severity string + severityAttrValue, ok := eventSlice.At(i).Attributes().Get(s.severityAttribute) + if ok { + severity = severityAttrValue.AsString() + } else { + severity = s.defaultSeverity + } + event := alertmanagerEvent{ + spanEvent: eventSlice.At(i), + traceID: traceID.String(), + spanID: spanID.String(), + severity: severity, + } + + events[i] = &event + } + return events + } return nil } -func (s *alertmanagerExporter) start(_ context.Context, _ component.Host) error { +func (s *alertmanagerExporter) extractEvents(td ptrace.Traces) []*alertmanagerEvent { + + // Stitch parent trace ID and span ID + rss := td.ResourceSpans() + var events []*alertmanagerEvent + if rss.Len() == 0 { + return nil + } + + for i := 0; i < rss.Len(); i++ { + resource := rss.At(i).Resource() + ilss := rss.At(i).ScopeSpans() + + if resource.Attributes().Len() == 0 && ilss.Len() == 0 { + return nil + } + + for j := 0; j < ilss.Len(); j++ { + spans := ilss.At(j).Spans() + for k := 0; k < spans.Len(); k++ { + traceID := spans.At(k).TraceID() + spanID := spans.At(k).SpanID() + events = append(events, s.convertEventSliceToArray(spans.At(k).Events(), traceID, spanID)...) + } + } + } + return events +} + +func createAnnotations(event *alertmanagerEvent) model.LabelSet { + labelMap := make(model.LabelSet, event.spanEvent.Attributes().Len()+2) + event.spanEvent.Attributes().Range(func(key string, attr pcommon.Value) bool { + labelMap[model.LabelName(key)] = model.LabelValue(attr.AsString()) + return true + }) + labelMap["TraceID"] = model.LabelValue(event.traceID) + labelMap["SpanID"] = model.LabelValue(event.spanID) + return labelMap +} + +func (s *alertmanagerExporter) convertEventsToAlertPayload(events []*alertmanagerEvent) []model.Alert { + + payload := make([]model.Alert, len(events)) + + for i, event := range events { + annotations := createAnnotations(event) + + alert := model.Alert{ + StartsAt: time.Now(), + Labels: model.LabelSet{"severity": model.LabelValue(event.severity), "event_name": model.LabelValue(event.spanEvent.Name())}, + Annotations: annotations, + GeneratorURL: s.generatorURL, + } + + payload[i] = alert + } + return payload +} + +func (s *alertmanagerExporter) postAlert(ctx context.Context, payload []model.Alert) error { + + msg, err := json.Marshal(payload) + if err != nil { + return fmt.Errorf("error marshaling alert to JSON: %w", err) + } + + req, err := http.NewRequestWithContext(ctx, "POST", s.endpoint, bytes.NewBuffer(msg)) + if err != nil { + return fmt.Errorf("error creating HTTP request: %w", err) + } + req.Header.Set("Content-Type", "application/json") - // To Be Implemented + resp, err := s.client.Do(req) + if err != nil { + return fmt.Errorf("error sending HTTP request: %w", err) + } + + defer func() { + if closeErr := resp.Body.Close(); closeErr != nil { + s.settings.Logger.Warn("failed to close response body", zap.Error(closeErr)) + } + }() + + _, err = io.ReadAll(resp.Body) + if err != nil { + return fmt.Errorf("failed to read response body %w", err) + } + + if resp.StatusCode != http.StatusOK { + s.settings.Logger.Debug("post request to Alertmanager failed", zap.Error(err)) + return fmt.Errorf("request POST %s failed - %q", req.URL.String(), resp.Status) + } + return nil +} + +func (s *alertmanagerExporter) pushTraces(ctx context.Context, td ptrace.Traces) error { + + events := s.extractEvents(td) + + if len(events) == 0 { + return nil + } + + alert := s.convertEventsToAlertPayload(events) + err := s.postAlert(ctx, alert) + + if err != nil { + return err + } + + return nil +} + +func (s *alertmanagerExporter) start(ctx context.Context, host component.Host) error { + + client, err := s.config.ClientConfig.ToClientContext(ctx, host, s.settings) + if err != nil { + return fmt.Errorf("failed to create HTTP Client: %w", err) + } + s.client = client return nil } func (s *alertmanagerExporter) shutdown(context.Context) error { - // To Be Implemented + + if s.client != nil { + s.client.CloseIdleConnections() + } return nil } @@ -46,7 +203,7 @@ func newAlertManagerExporter(cfg *Config, set component.TelemetrySettings) *aler config: cfg, settings: set, tracesMarshaler: &ptrace.JSONMarshaler{}, - endpoint: cfg.HTTPClientSettings.Endpoint, + endpoint: fmt.Sprintf("%s/api/v1/alerts", cfg.ClientConfig.Endpoint), generatorURL: cfg.GeneratorURL, defaultSeverity: cfg.DefaultSeverity, severityAttribute: cfg.SeverityAttribute, @@ -54,6 +211,7 @@ func newAlertManagerExporter(cfg *Config, set component.TelemetrySettings) *aler } func newTracesExporter(ctx context.Context, cfg component.Config, set exporter.CreateSettings) (exporter.Traces, error) { + config := cfg.(*Config) s := newAlertManagerExporter(config, set.TelemetrySettings) @@ -64,10 +222,9 @@ func newTracesExporter(ctx context.Context, cfg component.Config, set exporter.C cfg, s.pushTraces, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), - // Disable Timeout/RetryOnFailure and SendingQueue exporterhelper.WithStart(s.start), exporterhelper.WithTimeout(config.TimeoutSettings), - exporterhelper.WithRetry(config.RetrySettings), + exporterhelper.WithRetry(config.BackoffConfig), exporterhelper.WithQueue(config.QueueSettings), exporterhelper.WithShutdown(s.shutdown), ) diff --git a/exporter/alertmanagerexporter/alertmanager_exporter_test.go b/exporter/alertmanagerexporter/alertmanager_exporter_test.go new file mode 100644 index 000000000000..29ceafbbeb8d --- /dev/null +++ b/exporter/alertmanagerexporter/alertmanager_exporter_test.go @@ -0,0 +1,421 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package alertmanagerexporter + +import ( + "context" + "fmt" + "io" + "net/http" + "net/http/httptest" + "testing" + "time" + + "github.com/prometheus/common/model" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configtls" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/ptrace" + conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" +) + +func createTracesAndSpan() (ptrace.Traces, ptrace.Span) { + // make a trace + traces := ptrace.NewTraces() + // add trace attributes + rs := traces.ResourceSpans().AppendEmpty() + resource := rs.Resource() + attrs := resource.Attributes() + attrs.Clear() + attrs.EnsureCapacity(4) // service name + 3 attributes + attrs.PutStr(conventions.AttributeServiceName, "unittest-resource") + attrs.PutStr("attr1", "unittest-foo") + attrs.PutInt("attr2", 40) + attrs.PutDouble("attr3", 3.14) + + // add a span + spans := rs.ScopeSpans().AppendEmpty().Spans() + spans.EnsureCapacity(1) + span := spans.AppendEmpty() + // add span attributes + span.SetTraceID(pcommon.TraceID([16]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2})) + span.SetSpanID(pcommon.SpanID([8]byte{0, 0, 0, 0, 0, 0, 0, 3})) + span.SetName("unittest-span") + startTime := pcommon.Timestamp(time.Now().UnixNano()) + span.SetStartTimestamp(startTime) + span.SetEndTimestamp(startTime + 1) + span.SetParentSpanID(pcommon.SpanID([8]byte{0, 0, 0, 0, 0, 0, 0, 1})) + attrs = span.Attributes() + attrs.Clear() + attrs.EnsureCapacity(4) + attrs.PutStr("attr1", "unittest-bar") + attrs.PutInt("attr2", 41) + attrs.PutDouble("attr3", 4.14) + + return traces, span +} + +func TestAlertManagerExporterExtractEvents(t *testing.T) { + tests := []struct { + name string + events int + }{ + {"TestAlertManagerExporterExtractEvents0", 0}, + {"TestAlertManagerExporterExtractEvents1", 1}, + {"TestAlertManagerExporterExtractEvents5", 5}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + set := exportertest.NewNopCreateSettings() + am := newAlertManagerExporter(cfg, set.TelemetrySettings) + require.NotNil(t, am) + + // make traces & a span + traces, span := createTracesAndSpan() + + // add events + for i := 0; i < tt.events; i++ { + event := span.Events().AppendEmpty() + // add event attributes + startTime := pcommon.Timestamp(time.Now().UnixNano()) + event.SetTimestamp(startTime + 3) + event.SetName(fmt.Sprintf("unittest-event-%d", i)) + attrs := event.Attributes() + attrs.Clear() + attrs.EnsureCapacity(4) + attrs.PutStr("attr1", fmt.Sprintf("unittest-baz-%d", i)) + attrs.PutInt("attr2", 42) + attrs.PutDouble("attr3", 5.14) + } + + // test - events + got := am.extractEvents(traces) + assert.Equal(t, tt.events, len(got)) + }) + } +} + +func TestAlertManagerExporterEventNameAttributes(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + set := exportertest.NewNopCreateSettings() + am := newAlertManagerExporter(cfg, set.TelemetrySettings) + require.NotNil(t, am) + + // make traces & a span + traces, span := createTracesAndSpan() + + // add a span event w/ 3 attributes + event := span.Events().AppendEmpty() + // add event attributes + startTime := pcommon.Timestamp(time.Now().UnixNano()) + event.SetTimestamp(startTime + 3) + event.SetName("unittest-event") + attrs := event.Attributes() + attrs.Clear() + attrs.EnsureCapacity(4) + attrs.PutStr("attr1", "unittest-baz") + attrs.PutInt("attr2", 42) + attrs.PutDouble("attr3", 5.14) + + // test - 1 event + got := am.extractEvents(traces) + + // test - result length + assert.Equal(t, 1, len(got)) + + // test - count of attributes + assert.Equal(t, 3, got[0].spanEvent.Attributes().Len()) + attr, b := got[0].spanEvent.Attributes().Get("attr1") + assert.Equal(t, true, b) + assert.Equal(t, "unittest-event", got[0].spanEvent.Name()) + assert.Equal(t, "unittest-baz", attr.AsString()) + attr, b = got[0].spanEvent.Attributes().Get("attr3") + assert.Equal(t, true, b) + assert.Equal(t, 5.14, attr.Double()) +} + +func TestAlertManagerExporterSeverity(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.SeverityAttribute = "foo" + set := exportertest.NewNopCreateSettings() + am := newAlertManagerExporter(cfg, set.TelemetrySettings) + require.NotNil(t, am) + + // make traces & a span + traces, span := createTracesAndSpan() + + // add a span event with severity attribute + event := span.Events().AppendEmpty() + // add event attributes + startTime := pcommon.Timestamp(time.Now().UnixNano()) + event.SetTimestamp(startTime + 3) + event.SetName("unittest-event") + attrs := event.Attributes() + attrs.Clear() + attrs.EnsureCapacity(4) + attrs.PutStr("attr1", "unittest-baz") + attrs.PutStr("foo", "debug") + + // add a span event without severity attribute + event = span.Events().AppendEmpty() + // add event attributes + startTime = pcommon.Timestamp(time.Now().UnixNano()) + event.SetTimestamp(startTime + 3) + event.SetName("unittest-event") + attrs = event.Attributes() + attrs.Clear() + attrs.EnsureCapacity(4) + attrs.PutStr("attr1", "unittest-baz") + attrs.PutStr("bar", "debug") + + // test - 0 event + got := am.extractEvents(traces) + alerts := am.convertEventsToAlertPayload(got) + + ls := model.LabelSet{"event_name": "unittest-event", "severity": "debug"} + assert.Equal(t, ls, alerts[0].Labels) + + ls = model.LabelSet{"event_name": "unittest-event", "severity": "info"} + assert.Equal(t, ls, alerts[1].Labels) + +} + +func TestAlertManagerExporterNoDefaultSeverity(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + set := exportertest.NewNopCreateSettings() + am := newAlertManagerExporter(cfg, set.TelemetrySettings) + require.NotNil(t, am) + + // make traces & a span + traces, span := createTracesAndSpan() + + // add a span event with severity attribute + event := span.Events().AppendEmpty() + // add event attributes + startTime := pcommon.Timestamp(time.Now().UnixNano()) + event.SetTimestamp(startTime + 3) + event.SetName("unittest-event") + attrs := event.Attributes() + attrs.Clear() + attrs.EnsureCapacity(4) + attrs.PutStr("attr1", "unittest-baz") + attrs.PutStr("attr2", "debug") + + // test - 0 event + got := am.extractEvents(traces) + alerts := am.convertEventsToAlertPayload(got) + + ls := model.LabelSet{"event_name": "unittest-event", "severity": "info"} + assert.Equal(t, ls, alerts[0].Labels) + +} + +func TestAlertManagerExporterAlertPayload(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + set := exportertest.NewNopCreateSettings() + am := newAlertManagerExporter(cfg, set.TelemetrySettings) + + require.NotNil(t, am) + + // make traces & a span + _, span := createTracesAndSpan() + + // add a span event w/ 3 attributes + event := span.Events().AppendEmpty() + // add event attributes + startTime := pcommon.Timestamp(time.Now().UTC().Unix()) + event.SetTimestamp(startTime + 3) + event.SetName("unittest-event") + attrs := event.Attributes() + attrs.Clear() + attrs.EnsureCapacity(4) + attrs.PutStr("attr1", "unittest-baz") + attrs.PutInt("attr2", 42) + attrs.PutDouble("attr3", 5.14) + + var events []*alertmanagerEvent + events = append(events, &alertmanagerEvent{ + spanEvent: event, + severity: am.defaultSeverity, + traceID: "0000000000000002", + spanID: "00000002", + }) + + got := am.convertEventsToAlertPayload(events) + + // test - count of attributes + expect := model.Alert{ + Labels: model.LabelSet{"severity": "info", "event_name": "unittest-event"}, + Annotations: model.LabelSet{"SpanID": "00000002", "TraceID": "0000000000000002", "attr1": "unittest-baz", "attr2": "42", "attr3": "5.14"}, + GeneratorURL: "opentelemetry-collector", + } + assert.Equal(t, expect.Labels, got[0].Labels) + assert.Equal(t, expect.Annotations, got[0].Annotations) + assert.Equal(t, expect.GeneratorURL, got[0].GeneratorURL) + +} + +func TestAlertManagerTracesExporterNoErrors(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + lte, err := newTracesExporter(context.Background(), cfg, exportertest.NewNopCreateSettings()) + fmt.Println(lte) + require.NotNil(t, lte) + assert.NoError(t, err) +} + +type ( + MockServer struct { + mockserver *httptest.Server // this means MockServer aggreagates 'httptest.Server', but can it's more like inheritance in C++ + fooCalledSuccessfully bool // this is false by default + } +) + +func newMockServer(t *testing.T) *MockServer { + mock := MockServer{ + fooCalledSuccessfully: false, + } + + handler := http.NewServeMux() + handler.HandleFunc("/api/v1/alerts", func(w http.ResponseWriter, r *http.Request) { + _, errWrite := fmt.Fprint(w, "test") + assert.NoError(t, errWrite) + _, err := io.ReadAll(r.Body) + if err != nil { + t.Fatal(err) + } + mock.fooCalledSuccessfully = true + _, _ = w.Write([]byte("hello")) + }) + mock.mockserver = httptest.NewServer(handler) + return &mock +} + +func TestAlertManagerPostAlert(t *testing.T) { + mock := newMockServer(t) + defer func() { mock.mockserver.Close() }() + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + + var alerts []model.Alert + alerts = append(alerts, model.Alert{ + Labels: model.LabelSet{"new": "info"}, + Annotations: model.LabelSet{"foo": "bar1"}, + GeneratorURL: "http://example.com/alert", + }) + + cfg.Endpoint = mock.mockserver.URL + set := exportertest.NewNopCreateSettings() + am := newAlertManagerExporter(cfg, set.TelemetrySettings) + err := am.start(context.Background(), componenttest.NewNopHost()) + + assert.NoError(t, err) + + err = am.postAlert(context.Background(), alerts) + assert.NoError(t, err) + if mock.fooCalledSuccessfully == false { + t.Errorf("mock server wasn't called") + } +} + +func TestClientConfig(t *testing.T) { + endpoint := "http://" + testutil.GetAvailableLocalAddress(t) + fmt.Println(endpoint) + tests := []struct { + name string + config *Config + mustFailOnCreate bool + mustFailOnStart bool + }{ + { + name: "UseSecure", + config: &Config{ + ClientConfig: confighttp.ClientConfig{ + Endpoint: endpoint, + TLSSetting: configtls.ClientConfig{ + Insecure: false, + }, + }, + }, + }, + { + name: "Headers", + config: &Config{ + ClientConfig: confighttp.ClientConfig{ + Endpoint: endpoint, + Headers: map[string]configopaque.String{ + "hdr1": "val1", + "hdr2": "val2", + }, + }, + }, + }, + { + name: "CaCert", + config: &Config{ + ClientConfig: confighttp.ClientConfig{ + Endpoint: endpoint, + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ + CAFile: "testdata/test_cert.pem", + }, + }, + }, + }, + }, + { + name: "CertPemFileError", + config: &Config{ + ClientConfig: confighttp.ClientConfig{ + Endpoint: endpoint, + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ + CAFile: "nosuchfile", + }, + }, + }, + }, + mustFailOnCreate: false, + mustFailOnStart: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + set := exportertest.NewNopCreateSettings() + am := newAlertManagerExporter(tt.config, set.TelemetrySettings) + + exp, err := newTracesExporter(context.Background(), tt.config, set) + if tt.mustFailOnCreate { + assert.Error(t, err) + return + } + assert.NoError(t, err) + assert.NotNil(t, exp) + + err = am.start(context.Background(), componenttest.NewNopHost()) + if tt.mustFailOnStart { + assert.Error(t, err) + } + + t.Cleanup(func() { + require.NoError(t, am.shutdown(context.Background())) + }) + }) + } +} diff --git a/exporter/alertmanagerexporter/config.go b/exporter/alertmanagerexporter/config.go index 54ef65734a7f..3948dc360137 100644 --- a/exporter/alertmanagerexporter/config.go +++ b/exporter/alertmanagerexporter/config.go @@ -4,8 +4,11 @@ package alertmanagerexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alertmanagerexporter" import ( + "errors" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -13,17 +16,24 @@ import ( type Config struct { exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + BackoffConfig configretry.BackOffConfig `mapstructure:"retry_on_failure"` - confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. - GeneratorURL string `mapstructure:"generator_url"` - DefaultSeverity string `mapstructure:"severity"` - SeverityAttribute string `mapstructure:"severity_attribute"` + confighttp.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + GeneratorURL string `mapstructure:"generator_url"` + DefaultSeverity string `mapstructure:"severity"` + SeverityAttribute string `mapstructure:"severity_attribute"` } var _ component.Config = (*Config)(nil) // Validate checks if the exporter configuration is valid func (cfg *Config) Validate() error { + + if cfg.ClientConfig.Endpoint == "" { + return errors.New("endpoint must be non-empty") + } + if cfg.DefaultSeverity == "" { + return errors.New("severity must be non-empty") + } return nil } diff --git a/exporter/alertmanagerexporter/config_test.go b/exporter/alertmanagerexporter/config_test.go index 03a45f251150..a31c66fca227 100644 --- a/exporter/alertmanagerexporter/config_test.go +++ b/exporter/alertmanagerexporter/config_test.go @@ -14,6 +14,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -48,7 +49,7 @@ func TestLoadConfig(t *testing.T) { TimeoutSettings: exporterhelper.TimeoutSettings{ Timeout: 10 * time.Second, }, - RetrySettings: exporterhelper.RetrySettings{ + BackoffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, MaxInterval: 1 * time.Minute, @@ -61,15 +62,15 @@ func TestLoadConfig(t *testing.T) { NumConsumers: 2, QueueSize: 10, }, - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Headers: map[string]configopaque.String{ "can you have a . here?": "F0000000-0000-0000-0000-000000000000", "header1": "234", "another": "somevalue", }, Endpoint: "a.new.alertmanager.target:9093", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "/var/lib/mycert.pem", }, }, @@ -95,3 +96,46 @@ func TestLoadConfig(t *testing.T) { }) } } + +func TestConfig_Validate(t *testing.T) { + tests := []struct { + name string + cfg *Config + wantErr string + }{ + { + name: "NoEndpoint", + cfg: func() *Config { + cfg := createDefaultConfig().(*Config) + cfg.ClientConfig.Endpoint = "" + return cfg + }(), + wantErr: "endpoint must be non-empty", + }, + { + name: "NoSeverity", + cfg: func() *Config { + cfg := createDefaultConfig().(*Config) + cfg.DefaultSeverity = "" + return cfg + }(), + wantErr: "severity must be non-empty", + }, + { + name: "Success", + cfg: createDefaultConfig().(*Config), + wantErr: "", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.cfg.Validate() + if tt.wantErr == "" { + require.NoError(t, err) + } else { + require.EqualError(t, err, tt.wantErr) + } + }) + } +} diff --git a/exporter/alertmanagerexporter/factory.go b/exporter/alertmanagerexporter/factory.go index 5ec549fa5e70..12155d32d6a0 100644 --- a/exporter/alertmanagerexporter/factory.go +++ b/exporter/alertmanagerexporter/factory.go @@ -11,6 +11,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -30,13 +31,12 @@ func createDefaultConfig() component.Config { GeneratorURL: "opentelemetry-collector", DefaultSeverity: "info", TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackoffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), - HTTPClientSettings: confighttp.HTTPClientSettings{ - Endpoint: "http://localhost:9093", - Timeout: 30 * time.Second, - Headers: map[string]configopaque.String{}, - // We almost read 0 bytes, so no need to tune ReadBufferSize. + ClientConfig: confighttp.ClientConfig{ + Endpoint: "http://localhost:9093", + Timeout: 30 * time.Second, + Headers: map[string]configopaque.String{}, WriteBufferSize: 512 * 1024, }, } diff --git a/exporter/alertmanagerexporter/generated_component_test.go b/exporter/alertmanagerexporter/generated_component_test.go new file mode 100644 index 000000000000..3cc537978d84 --- /dev/null +++ b/exporter/alertmanagerexporter/generated_component_test.go @@ -0,0 +1,126 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package alertmanagerexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/alertmanagerexporter/go.mod b/exporter/alertmanagerexporter/go.mod index 824eaac9601a..718dbeaf5c2a 100644 --- a/exporter/alertmanagerexporter/go.mod +++ b/exporter/alertmanagerexporter/go.mod @@ -1,64 +1,77 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alertmanagerexporter -go 1.20 +go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.1 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/cenkalti/backoff/v4 v4.3.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/prometheus/common v0.52.2 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.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.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -67,3 +80,5 @@ retract ( v0.76.1 v0.65.0 ) + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => ../../internal/common diff --git a/exporter/alertmanagerexporter/go.sum b/exporter/alertmanagerexporter/go.sum index 2c44c444e3c5..4f016ba70eef 100644 --- a/exporter/alertmanagerexporter/go.sum +++ b/exporter/alertmanagerexporter/go.sum @@ -1,82 +1,56 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -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/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -86,119 +60,108 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -206,38 +169,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/alertmanagerexporter/internal/metadata/generated_status.go b/exporter/alertmanagerexporter/internal/metadata/generated_status.go index a8c6c32b1f19..2f14617c3498 100644 --- a/exporter/alertmanagerexporter/internal/metadata/generated_status.go +++ b/exporter/alertmanagerexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("alertmanager") ) const ( - Type = "alertmanager" TracesStability = component.StabilityLevelDevelopment ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/alertmanager") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/alertmanager") +} diff --git a/exporter/alertmanagerexporter/metadata.yaml b/exporter/alertmanagerexporter/metadata.yaml index bb55d0b05d79..3be5f22d58a7 100644 --- a/exporter/alertmanagerexporter/metadata.yaml +++ b/exporter/alertmanagerexporter/metadata.yaml @@ -1,9 +1,21 @@ type: alertmanager +scope_name: otelcol/alertmanager status: class: exporter stability: development: [traces] - distributions: [contrib] + distributions: [] codeowners: - active: [jpkrohling, sokoide, mcube8] \ No newline at end of file + active: [jpkrohling, sokoide, mcube8] + +tests: + config: + endpoint: http://localhost:0 + generator_url: opentelemetry-collector + severity: info + sending_queue: + enabled: false + retry_on_failure: + enabled: false + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/alertmanagerexporter/package_test.go b/exporter/alertmanagerexporter/package_test.go new file mode 100644 index 000000000000..7b9d83eff120 --- /dev/null +++ b/exporter/alertmanagerexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package alertmanagerexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/alertmanagerexporter/testdata/test_cert.pem b/exporter/alertmanagerexporter/testdata/test_cert.pem new file mode 100644 index 000000000000..0cb62d37aad7 --- /dev/null +++ b/exporter/alertmanagerexporter/testdata/test_cert.pem @@ -0,0 +1,29 @@ +-----BEGIN CERTIFICATE----- +MIIE6jCCAtICCQDVU4PtqpqADTANBgkqhkiG9w0BAQsFADA3MQswCQYDVQQGEwJV +UzETMBEGA1UECAwKY2FsaWZvcm5pYTETMBEGA1UECgwKb3BlbmNlbnN1czAeFw0x +OTAzMDQxODA3MjZaFw0yMDAzMDMxODA3MjZaMDcxCzAJBgNVBAYTAlVTMRMwEQYD +VQQIDApjYWxpZm9ybmlhMRMwEQYDVQQKDApvcGVuY2Vuc3VzMIICIjANBgkqhkiG +9w0BAQEFAAOCAg8AMIICCgKCAgEAy9JQiAOMzArcdiS4szbTuzg5yYijSSY6SvGj +XMs4/LEFLxgGmFfyHXxoVQzV26lTu/AiUFlZi4JY2qlkZyPwmmmSg4fmzikpVPiC +Vv9pvSIojs8gs0sHaOt40Q8ym43bNt3Mh8rYrs+XMERi6Ol9//j4LnfePkNU5uEo +qC8KQamckaMR6UEHFNunyOwvNBsipgTPldQUPGVnCsNKk8olYGAXS7DR25bgbPli +4T9VCSElsSPAODmyo+2MEDagVXa1vVYxKyO2k6oeBS0lsvdRqRTmGggcg0B/dk+a +H1CL9ful0cu9P3dQif+hfGay8udPkwDLPEq1+WnjJFut3Pmbk3SqUCas5iWt76kK +eKFh4k8fCy4yiaZxzvSbm9+bEBHAl0ZXd8pjvAsBfCKe6G9SBzE1DK4FjWiiEGCb +5dGsyTKr33q3DekLvT3LF8ZeON/13d9toucX9PqG2HDwMP/Fb4WjQIzOc/H9wIak +pf7u6QBDGUiCMmoDrp1d8RsI1RPbEhoywH0YlLmwgf+cr1dU7vlISf576EsGxFz4 ++/sZjIBvZBHn/x0MH+bs4J8V3vMujfDoRdhL07bK7q/AkEALUxljKEfoWeqiuVzK +F9BVv3xNhiua2kgPVbMNWPrQ5uotkNp8IykJ3QOuQ3p5pzxdGfpLd6f8gmJDmcbi +AI9dWTcCAwEAATANBgkqhkiG9w0BAQsFAAOCAgEAVVi4t/Sumre+AGTaU7np9dl2 +tpllbES5ixe6m2uezt5wAzYNNyuQ2mMG2XrSkMy5gvBZRT9nRNSmLV8VEcxZihG0 +YHS5soXnLL3Jdlwxp98WTDPvM1ntxcHyEyqrrg9YDfKn4sOrr5vo2yZzoKwtxtc7 +lue9JormVx7GxMi7NwaUtCbnwAIcqJJpFjt1EhmJOxGqTJPgUvTBdeGvRj30c6fk +pqpUdPbZ7RKPEtbLoMoCBujKnErv+H0G6Vp9WyCHN+Mi9uTMsGwH14cmJjmfwGDC +8/WF4LdlawFnf/arIp9YcVwcP91d4ywyvbuuo2M7qdosQ7k4uRZ3tyggLYShS3RW +BMEhMRDz9dM0oKGF+HnaS824BIh6O6Hn82Vt8uCKS7IbEX99/kkN1KcqqQe6Lwjq +tG/lm4K5yf+FJVDivpZ9mYTvqTBjhTaOp6m3HYSNJfS0hLQVvEuBNXd8bHiXkcLp +rmFOYUWsjxV1Qku3U5Rner0UpB2Fuw9nJcXuDgWG0gjwzAZ83y3du1VIZp0Ad8Vv +IYpaucbImGJszMtNXn3l72K1wvQVIhm9eRwYc3QteJzweHaDsbytZEoS/GhTrZIT +wRe5ZGrjJBJngRANRSm1BH8j6PjLem9mzPb2eytwJJA0lLhUk4vYproVvXcx0vow +5F+5VB1YB8/tbWePmpo= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/exporter/alibabacloudlogserviceexporter/README.md b/exporter/alibabacloudlogserviceexporter/README.md index 9709eda9e794..d1c7389b2567 100644 --- a/exporter/alibabacloudlogserviceexporter/README.md +++ b/exporter/alibabacloudlogserviceexporter/README.md @@ -4,13 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces, metrics, logs | -| Distributions | [contrib], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Falibabacloudlogservice%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Falibabacloudlogservice) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Falibabacloudlogservice%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Falibabacloudlogservice) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@shabicheng](https://www.github.com/shabicheng), [@kongluoxing](https://www.github.com/kongluoxing), [@qiansheng91](https://www.github.com/qiansheng91) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector This exporter supports sending OpenTelemetry data to [LogService](https://www.alibabacloud.com/product/log-service). diff --git a/exporter/alibabacloudlogserviceexporter/generated_component_test.go b/exporter/alibabacloudlogserviceexporter/generated_component_test.go new file mode 100644 index 000000000000..3f21d51c8285 --- /dev/null +++ b/exporter/alibabacloudlogserviceexporter/generated_component_test.go @@ -0,0 +1,142 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package alibabacloudlogserviceexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + require.NoError(t, err) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/alibabacloudlogserviceexporter/go.mod b/exporter/alibabacloudlogserviceexporter/go.mod index 07f1188000f9..ed953fe48202 100644 --- a/exporter/alibabacloudlogserviceexporter/go.mod +++ b/exporter/alibabacloudlogserviceexporter/go.mod @@ -1,60 +1,71 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter -go 1.20 +go 1.21 require ( - github.com/aliyun/aliyun-log-go-sdk v0.1.63 + github.com/aliyun/aliyun-log-go-sdk v0.1.72 github.com/gogo/protobuf v1.3.2 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/pdata/testdata v0.98.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/zap v1.27.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-kit/kit v0.10.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/pierrec/lz4 v2.6.0+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/alibabacloudlogserviceexporter/go.sum b/exporter/alibabacloudlogserviceexporter/go.sum index c5d6429b6cf9..ae3a0738d7b8 100644 --- a/exporter/alibabacloudlogserviceexporter/go.sum +++ b/exporter/alibabacloudlogserviceexporter/go.sum @@ -30,7 +30,6 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -78,8 +77,8 @@ github.com/alibabacloud-go/tea-utils/v2 v2.0.1 h1:K6kwgo+UiYx+/kr6CO0PN5ACZDzE3n github.com/alibabacloud-go/tea-utils/v2 v2.0.1/go.mod h1:U5MTY10WwlquGPS34DOeomUGBB0gXbLueiq5Trwu0C4= github.com/alibabacloud-go/tea-xml v1.1.2 h1:oLxa7JUXm2EDFzMg+7oRsYc+kutgCVwm+bZlhhmvW5M= github.com/alibabacloud-go/tea-xml v1.1.2/go.mod h1:Rq08vgCcCAjHyRi/M7xlHKUykZCEtyBy9+DPF6GgEu8= -github.com/aliyun/aliyun-log-go-sdk v0.1.63 h1:XeKeHgQS0Aoo6BtzF7vB/PlhzqK1/xuPdLr7mLMOp9Y= -github.com/aliyun/aliyun-log-go-sdk v0.1.63/go.mod h1:FSKcIjukUy+LeUKhRk13PCO+9gPMTfGsYhFBHQbDqmM= +github.com/aliyun/aliyun-log-go-sdk v0.1.72 h1:8Gvg3ydMG4bbF7DkTb4m3odd5BRFXo0LmhNBv/xg7Mo= +github.com/aliyun/aliyun-log-go-sdk v0.1.72/go.mod h1:FSKcIjukUy+LeUKhRk13PCO+9gPMTfGsYhFBHQbDqmM= github.com/aliyun/credentials-go v1.1.2 h1:qU1vwGIBb3UJ8BwunHDRFtAhS6jnQLnde/yk0+Ih2GY= github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= @@ -102,14 +101,14 @@ github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRt github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -168,10 +167,15 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -183,7 +187,6 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -227,6 +230,7 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ 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.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/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -239,6 +243,8 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -266,8 +272,6 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= @@ -302,8 +306,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -311,6 +315,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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= @@ -325,9 +330,7 @@ github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcME github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= @@ -341,8 +344,6 @@ github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eI github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -395,30 +396,34 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -436,19 +441,14 @@ github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tjfoc/gmsm v1.3.2 h1:7JVkAn5bvUJ7HtU08iW6UiD+UTmJTIToHCfeFzkcCxM= github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= @@ -468,41 +468,44 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -510,15 +513,16 @@ go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +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.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= 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.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -609,8 +613,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -687,8 +691,8 @@ golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -818,8 +822,8 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -837,8 +841,8 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -852,14 +856,15 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= @@ -877,7 +882,6 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/exporter/alibabacloudlogserviceexporter/internal/metadata/generated_status.go b/exporter/alibabacloudlogserviceexporter/internal/metadata/generated_status.go index 2edd082d57f7..8d609d8e3e36 100644 --- a/exporter/alibabacloudlogserviceexporter/internal/metadata/generated_status.go +++ b/exporter/alibabacloudlogserviceexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("alibabacloud_logservice") ) const ( - Type = "alibabacloud_logservice" TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/alibabacloudlogservice") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/alibabacloudlogservice") +} diff --git a/exporter/alibabacloudlogserviceexporter/metadata.yaml b/exporter/alibabacloudlogserviceexporter/metadata.yaml index 4f2b6cb14f64..a5bbcbecb194 100644 --- a/exporter/alibabacloudlogserviceexporter/metadata.yaml +++ b/exporter/alibabacloudlogserviceexporter/metadata.yaml @@ -1,9 +1,16 @@ type: alibabacloud_logservice +scope_name: otelcol/alibabacloudlogservice status: class: exporter stability: beta: [traces, metrics, logs] - distributions: [contrib, observiq] + distributions: [contrib] codeowners: active: [shabicheng, kongluoxing, qiansheng91] + +tests: + config: + endpoint: "http://localhost:0" + project: "otel-testing" + logstore: "otel-data" \ No newline at end of file diff --git a/exporter/alibabacloudlogserviceexporter/metrics_exporter_test.go b/exporter/alibabacloudlogserviceexporter/metrics_exporter_test.go index 5356bd578083..a3fc451a0fba 100644 --- a/exporter/alibabacloudlogserviceexporter/metrics_exporter_test.go +++ b/exporter/alibabacloudlogserviceexporter/metrics_exporter_test.go @@ -10,8 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/exporter/exportertest" - - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestNewMetricsExporter(t *testing.T) { @@ -24,7 +23,7 @@ func TestNewMetricsExporter(t *testing.T) { require.NotNil(t, got) // This will put trace data to send buffer and return success. - err = got.ConsumeMetrics(context.Background(), testdata.GenerateMetricsOneMetric()) + err = got.ConsumeMetrics(context.Background(), testdata.GenerateMetrics(1)) assert.NoError(t, err) } diff --git a/exporter/alibabacloudlogserviceexporter/uploader.go b/exporter/alibabacloudlogserviceexporter/uploader.go index 08712e565939..1839dcdd70e8 100644 --- a/exporter/alibabacloudlogserviceexporter/uploader.go +++ b/exporter/alibabacloudlogserviceexporter/uploader.go @@ -53,9 +53,9 @@ func newLogServiceClient(config *Config, logger *zap.Logger) (logServiceClient, producerConfig.AccessKeySecret = string(config.AccessKeySecret) if config.ECSRamRole != "" || config.TokenFilePath != "" { tokenUpdateFunc, _ := slsutil.NewTokenUpdateFunc(config.ECSRamRole, config.TokenFilePath) - // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/26987 - // nolint - producerConfig.UpdateStsToken = tokenUpdateFunc + provider := sls.NewUpdateFuncProviderAdapter(tokenUpdateFunc) + producerConfig.CredentialsProvider = provider + producerConfig.StsTokenShutDown = make(chan struct{}) } diff --git a/exporter/awscloudwatchlogsexporter/README.md b/exporter/awscloudwatchlogsexporter/README.md index ce85109deb58..9ec172840d4d 100644 --- a/exporter/awscloudwatchlogsexporter/README.md +++ b/exporter/awscloudwatchlogsexporter/README.md @@ -4,13 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: logs | -| Distributions | [contrib], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fawscloudwatchlogs%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fawscloudwatchlogs) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fawscloudwatchlogs%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fawscloudwatchlogs) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@boostchicken](https://www.github.com/boostchicken), [@bryan-aguilar](https://www.github.com/bryan-aguilar), [@rapphil](https://www.github.com/rapphil) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector AWS CloudWatch Logs Exporter sends logs data to AWS [CloudWatch Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html). diff --git a/exporter/awscloudwatchlogsexporter/config.go b/exporter/awscloudwatchlogsexporter/config.go index 74e6c34a6274..915003e993d0 100644 --- a/exporter/awscloudwatchlogsexporter/config.go +++ b/exporter/awscloudwatchlogsexporter/config.go @@ -7,6 +7,7 @@ import ( "errors" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil" @@ -15,7 +16,7 @@ import ( // Config represent a configuration for the CloudWatch logs exporter. type Config struct { - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // LogGroupName is the name of CloudWatch log group which defines group of log streams // that share the same retention, monitoring, and access control settings. diff --git a/exporter/awscloudwatchlogsexporter/config_test.go b/exporter/awscloudwatchlogsexporter/config_test.go index 917ce98871ca..cccc7aa076b3 100644 --- a/exporter/awscloudwatchlogsexporter/config_test.go +++ b/exporter/awscloudwatchlogsexporter/config_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/multierr" @@ -27,7 +28,7 @@ func TestLoadConfig(t *testing.T) { cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) require.NoError(t, err) - defaultRetrySettings := exporterhelper.NewDefaultRetrySettings() + defaultBackOffConfig := configretry.NewDefaultBackOffConfig() tests := []struct { id component.ID @@ -37,7 +38,7 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "e1-defaults"), expected: &Config{ - RetrySettings: defaultRetrySettings, + BackOffConfig: defaultBackOffConfig, LogGroupName: "test-1", LogStreamName: "testing", Endpoint: "", @@ -52,11 +53,11 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "e2-no-retries-short-queue"), expected: &Config{ - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: false, - InitialInterval: defaultRetrySettings.InitialInterval, - MaxInterval: defaultRetrySettings.MaxInterval, - MaxElapsedTime: defaultRetrySettings.MaxElapsedTime, + InitialInterval: defaultBackOffConfig.InitialInterval, + MaxInterval: defaultBackOffConfig.MaxInterval, + MaxElapsedTime: defaultBackOffConfig.MaxElapsedTime, RandomizationFactor: backoff.DefaultRandomizationFactor, Multiplier: backoff.DefaultMultiplier, }, @@ -109,9 +110,9 @@ func TestLoadConfig(t *testing.T) { } func TestRetentionValidateCorrect(t *testing.T) { - defaultRetrySettings := exporterhelper.NewDefaultRetrySettings() + defaultBackOffConfig := configretry.NewDefaultBackOffConfig() cfg := &Config{ - RetrySettings: defaultRetrySettings, + BackOffConfig: defaultBackOffConfig, LogGroupName: "test-1", LogStreamName: "testing", Endpoint: "", @@ -128,9 +129,9 @@ func TestRetentionValidateCorrect(t *testing.T) { } func TestRetentionValidateWrong(t *testing.T) { - defaultRetrySettings := exporterhelper.NewDefaultRetrySettings() + defaultBackOffConfig := configretry.NewDefaultBackOffConfig() wrongcfg := &Config{ - RetrySettings: defaultRetrySettings, + BackOffConfig: defaultBackOffConfig, LogGroupName: "test-1", LogStreamName: "testing", Endpoint: "", @@ -146,7 +147,7 @@ func TestRetentionValidateWrong(t *testing.T) { } func TestValidateTags(t *testing.T) { - defaultRetrySettings := exporterhelper.NewDefaultRetrySettings() + defaultBackOffConfig := configretry.NewDefaultBackOffConfig() // Create *string values for tags inputs basicValue := "avalue" @@ -214,7 +215,7 @@ func TestValidateTags(t *testing.T) { for _, tt := range tests { t.Run(tt.id.String(), func(t *testing.T) { cfg := &Config{ - RetrySettings: defaultRetrySettings, + BackOffConfig: defaultBackOffConfig, LogGroupName: "test-1", LogStreamName: "testing", Endpoint: "", @@ -269,9 +270,9 @@ func TestRawLogEmfOnlyCombination(t *testing.T) { } for _, tt := range tests { t.Run(tt.Test, func(t *testing.T) { - defaultRetrySettings := exporterhelper.NewDefaultRetrySettings() + defaultBackOffConfig := configretry.NewDefaultBackOffConfig() cfg := &Config{ - RetrySettings: defaultRetrySettings, + BackOffConfig: defaultBackOffConfig, LogGroupName: "test-1", LogStreamName: "testing", Endpoint: "", diff --git a/exporter/awscloudwatchlogsexporter/exporter.go b/exporter/awscloudwatchlogsexporter/exporter.go index 8f8fb32eccd7..1c509fedcad0 100644 --- a/exporter/awscloudwatchlogsexporter/exporter.go +++ b/exporter/awscloudwatchlogsexporter/exporter.go @@ -91,7 +91,7 @@ func newCwLogsExporter(config component.Config, params exp.CreateSettings) (exp. config, logsPusher.consumeLogs, exporterhelper.WithQueue(expConfig.QueueSettings), - exporterhelper.WithRetry(expConfig.RetrySettings), + exporterhelper.WithRetry(expConfig.BackOffConfig), exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), exporterhelper.WithStart(logsPusher.start), exporterhelper.WithShutdown(logsPusher.shutdown), @@ -145,10 +145,11 @@ func pushLogsToCWLogs(logger *zap.Logger, ld plog.Logs, config *Config, pusher c sls := rl.ScopeLogs() for j := 0; j < sls.Len(); j++ { sl := sls.At(j) + scope := sl.Scope() logs := sl.LogRecords() for k := 0; k < logs.Len(); k++ { log := logs.At(k) - event, err := logToCWLog(resourceAttrs, log, config) + event, err := logToCWLog(resourceAttrs, scope, log, config) if err != nil { logger.Debug("Failed to convert to CloudWatch Log", zap.Error(err)) } else { @@ -164,19 +165,26 @@ func pushLogsToCWLogs(logger *zap.Logger, ld plog.Logs, config *Config, pusher c return errs } +type scopeCwLogBody struct { + Name string `json:"name,omitempty"` + Version string `json:"version,omitempty"` + Attributes map[string]any `json:"attributes,omitempty"` +} + type cwLogBody struct { - Body any `json:"body,omitempty"` - SeverityNumber int32 `json:"severity_number,omitempty"` - SeverityText string `json:"severity_text,omitempty"` - DroppedAttributesCount uint32 `json:"dropped_attributes_count,omitempty"` - Flags uint32 `json:"flags,omitempty"` - TraceID string `json:"trace_id,omitempty"` - SpanID string `json:"span_id,omitempty"` - Attributes map[string]any `json:"attributes,omitempty"` - Resource map[string]any `json:"resource,omitempty"` + Body any `json:"body,omitempty"` + SeverityNumber int32 `json:"severity_number,omitempty"` + SeverityText string `json:"severity_text,omitempty"` + DroppedAttributesCount uint32 `json:"dropped_attributes_count,omitempty"` + Flags uint32 `json:"flags,omitempty"` + TraceID string `json:"trace_id,omitempty"` + SpanID string `json:"span_id,omitempty"` + Attributes map[string]any `json:"attributes,omitempty"` + Scope *scopeCwLogBody `json:"scope,omitempty"` + Resource map[string]any `json:"resource,omitempty"` } -func logToCWLog(resourceAttrs map[string]any, log plog.LogRecord, config *Config) (*cwlogs.Event, error) { +func logToCWLog(resourceAttrs map[string]any, scope pcommon.InstrumentationScope, log plog.LogRecord, config *Config) (*cwlogs.Event, error) { // TODO(jbd): Benchmark and improve the allocations. // Evaluate go.elastic.co/fastjson as a replacement for encoding/json. logGroupName := config.LogGroupName @@ -223,6 +231,16 @@ func logToCWLog(resourceAttrs map[string]any, log plog.LogRecord, config *Config body.Attributes = attrsValue(log.Attributes()) body.Resource = resourceAttrs + // scope should have a name at least + if scope.Name() != "" { + scopeBody := &scopeCwLogBody{ + Name: scope.Name(), + Version: scope.Version(), + Attributes: attrsValue(scope.Attributes()), + } + body.Scope = scopeBody + } + bodyJSON, err = json.Marshal(body) if err != nil { return &cwlogs.Event{}, err diff --git a/exporter/awscloudwatchlogsexporter/exporter_test.go b/exporter/awscloudwatchlogsexporter/exporter_test.go index 0d920f8ad4f8..e513099449f7 100644 --- a/exporter/awscloudwatchlogsexporter/exporter_test.go +++ b/exporter/awscloudwatchlogsexporter/exporter_test.go @@ -55,6 +55,7 @@ func TestLogToCWLog(t *testing.T) { tests := []struct { name string resource pcommon.Resource + scope pcommon.InstrumentationScope log plog.LogRecord config *Config want cwlogs.Event @@ -64,12 +65,13 @@ func TestLogToCWLog(t *testing.T) { name: "basic", resource: testResource(), log: testLogRecord(), + scope: testScope(), config: &Config{}, want: cwlogs.Event{ GeneratedTime: time.Now(), InputLogEvent: &cloudwatchlogs.InputLogEvent{ Timestamp: aws.Int64(1609719139), - Message: aws.String(`{"body":"hello world","severity_number":5,"severity_text":"debug","dropped_attributes_count":4,"flags":1,"trace_id":"0102030405060708090a0b0c0d0e0f10","span_id":"0102030405060708","attributes":{"key1":1,"key2":"attr2"},"resource":{"host":"abc123","node":5}}`), + Message: aws.String(`{"body":"hello world","severity_number":5,"severity_text":"debug","dropped_attributes_count":4,"flags":1,"trace_id":"0102030405060708090a0b0c0d0e0f10","span_id":"0102030405060708","attributes":{"key1":1,"key2":"attr2"},"scope":{"name":"test-scope","version":"1.0.0","attributes":{"scope-attr":"value"}},"resource":{"host":"abc123","node":5}}`), }, StreamKey: cwlogs.StreamKey{ LogGroupName: "", @@ -80,13 +82,32 @@ func TestLogToCWLog(t *testing.T) { { name: "no resource", resource: pcommon.NewResource(), + scope: testScope(), log: testLogRecord(), config: &Config{}, want: cwlogs.Event{ GeneratedTime: time.Now(), InputLogEvent: &cloudwatchlogs.InputLogEvent{ Timestamp: aws.Int64(1609719139), - Message: aws.String(`{"body":"hello world","severity_number":5,"severity_text":"debug","dropped_attributes_count":4,"flags":1,"trace_id":"0102030405060708090a0b0c0d0e0f10","span_id":"0102030405060708","attributes":{"key1":1,"key2":"attr2"}}`), + Message: aws.String(`{"body":"hello world","severity_number":5,"severity_text":"debug","dropped_attributes_count":4,"flags":1,"trace_id":"0102030405060708090a0b0c0d0e0f10","span_id":"0102030405060708","attributes":{"key1":1,"key2":"attr2"},"scope":{"name":"test-scope","version":"1.0.0","attributes":{"scope-attr":"value"}}}`), + }, + StreamKey: cwlogs.StreamKey{ + LogGroupName: "", + LogStreamName: "", + }, + }, + }, + { + name: "no scope", + resource: testResource(), + log: testLogRecord(), + scope: emptyScope(), + config: &Config{}, + want: cwlogs.Event{ + GeneratedTime: time.Now(), + InputLogEvent: &cloudwatchlogs.InputLogEvent{ + Timestamp: aws.Int64(1609719139), + Message: aws.String(`{"body":"hello world","severity_number":5,"severity_text":"debug","dropped_attributes_count":4,"flags":1,"trace_id":"0102030405060708090a0b0c0d0e0f10","span_id":"0102030405060708","attributes":{"key1":1,"key2":"attr2"},"resource":{"host":"abc123","node":5}}`), }, StreamKey: cwlogs.StreamKey{ LogGroupName: "", @@ -97,6 +118,7 @@ func TestLogToCWLog(t *testing.T) { { name: "no trace", resource: testResource(), + scope: testScope(), log: testLogRecordWithoutTrace(), config: &Config{ LogGroupName: "tLogGroup", @@ -106,7 +128,7 @@ func TestLogToCWLog(t *testing.T) { GeneratedTime: time.Now(), InputLogEvent: &cloudwatchlogs.InputLogEvent{ Timestamp: aws.Int64(1609719139), - Message: aws.String(`{"body":"hello world","severity_number":5,"severity_text":"debug","dropped_attributes_count":4,"attributes":{"key1":1,"key2":"attr2"},"resource":{"host":"abc123","node":5}}`), + Message: aws.String(`{"body":"hello world","severity_number":5,"severity_text":"debug","dropped_attributes_count":4,"attributes":{"key1":1,"key2":"attr2"},"scope":{"name":"test-scope","version":"1.0.0","attributes":{"scope-attr":"value"}},"resource":{"host":"abc123","node":5}}`), }, StreamKey: cwlogs.StreamKey{ LogGroupName: "tLogGroup", @@ -117,6 +139,7 @@ func TestLogToCWLog(t *testing.T) { { name: "raw", resource: testResource(), + scope: testScope(), log: testLogRecordWithoutTrace(), config: &Config{ LogGroupName: "tLogGroup", @@ -138,6 +161,7 @@ func TestLogToCWLog(t *testing.T) { { name: "raw emf v1", resource: testResource(), + scope: testScope(), log: createPLog(`{"_aws":{"Timestamp":1574109732004,"LogGroupName":"Foo","CloudWatchMetrics":[{"Namespace":"MyApp","Dimensions":[["Operation"]],"Metrics":[{"Name":"ProcessingLatency","Unit":"Milliseconds","StorageResolution":60}]}]},"Operation":"Aggregator","ProcessingLatency":100}`), config: &Config{ LogGroupName: "tLogGroup", @@ -159,6 +183,7 @@ func TestLogToCWLog(t *testing.T) { { name: "raw emf v1 with log stream", resource: testResource(), + scope: testScope(), log: createPLog(`{"_aws":{"Timestamp":1574109732004,"LogGroupName":"Foo","LogStreamName":"Foo","CloudWatchMetrics":[{"Namespace":"MyApp","Dimensions":[["Operation"]],"Metrics":[{"Name":"ProcessingLatency","Unit":"Milliseconds","StorageResolution":60}]}]},"Operation":"Aggregator","ProcessingLatency":100}`), config: &Config{ LogGroupName: "tLogGroup", @@ -180,6 +205,7 @@ func TestLogToCWLog(t *testing.T) { { name: "raw emf v0", resource: testResource(), + scope: testScope(), log: createPLog(`{"Timestamp":1574109732004,"log_group_name":"Foo","CloudWatchMetrics":[{"Namespace":"MyApp","Dimensions":[["Operation"]],"Metrics":[{"Name":"ProcessingLatency","Unit":"Milliseconds","StorageResolution":60}]}],"Operation":"Aggregator","ProcessingLatency":100}`), config: &Config{ LogGroupName: "tLogGroup", @@ -201,6 +227,7 @@ func TestLogToCWLog(t *testing.T) { { name: "raw emf v0 with log stream", resource: testResource(), + scope: testScope(), log: createPLog(`{"Timestamp":1574109732004,"log_group_name":"Foo","log_stream_name":"Foo","CloudWatchMetrics":[{"Namespace":"MyApp","Dimensions":[["Operation"]],"Metrics":[{"Name":"ProcessingLatency","Unit":"Milliseconds","StorageResolution":60}]}],"Operation":"Aggregator","ProcessingLatency":100}`), config: &Config{ LogGroupName: "tLogGroup", @@ -270,7 +297,7 @@ func TestLogToCWLog(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { resourceAttrs := attrsValue(tt.resource.Attributes()) - got, err := logToCWLog(resourceAttrs, tt.log, tt.config) + got, err := logToCWLog(resourceAttrs, tt.scope, tt.log, tt.config) if (err != nil) != tt.wantErr { t.Errorf("logToCWLog() error = %v, wantErr %v", err, tt.wantErr) return @@ -288,8 +315,9 @@ func BenchmarkLogToCWLog(b *testing.B) { resource := testResource() log := testLogRecord() + scope := testScope() for i := 0; i < b.N; i++ { - _, err := logToCWLog(attrsValue(resource.Attributes()), log, &Config{}) + _, err := logToCWLog(attrsValue(resource.Attributes()), scope, log, &Config{}) if err != nil { b.Errorf("logToCWLog() failed %v", err) return @@ -304,6 +332,19 @@ func testResource() pcommon.Resource { return resource } +func testScope() pcommon.InstrumentationScope { + scope := pcommon.NewInstrumentationScope() + scope.SetName("test-scope") + scope.SetVersion("1.0.0") + scope.Attributes().PutStr("scope-attr", "value") + return scope +} + +func emptyScope() pcommon.InstrumentationScope { + scope := pcommon.NewInstrumentationScope() + return scope +} + func testLogRecord() plog.LogRecord { record := plog.NewLogRecord() record.SetSeverityNumber(5) @@ -393,7 +434,7 @@ func TestConsumeLogs(t *testing.T) { t.Run(testcase.id, func(t *testing.T) { logPusher := new(mockPusher) exp.pusherFactory = &mockFactory{logPusher} - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exp) ld := plog.NewLogs() r := ld.ResourceLogs().AppendEmpty() @@ -427,7 +468,8 @@ func TestConsumeLogs(t *testing.T) { } func TestMiddleware(t *testing.T) { - id := component.NewID("test") + testType, _ := component.NewType("test") + id := component.NewID(testType) ctx, cancel := context.WithCancel(context.Background()) defer cancel() factory := NewFactory() @@ -469,5 +511,5 @@ func TestNewExporterWithoutRegionErr(t *testing.T) { expCfg.MaxRetries = 0 exp, err := newCwLogsExporter(expCfg, exportertest.NewNopCreateSettings()) assert.Nil(t, exp) - assert.NotNil(t, err) + assert.Error(t, err) } diff --git a/exporter/awscloudwatchlogsexporter/factory.go b/exporter/awscloudwatchlogsexporter/factory.go index 0b8f5b030c49..f91ef82bafe2 100644 --- a/exporter/awscloudwatchlogsexporter/factory.go +++ b/exporter/awscloudwatchlogsexporter/factory.go @@ -12,6 +12,7 @@ import ( "errors" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -32,7 +33,7 @@ func createDefaultConfig() component.Config { queueSettings.NumConsumers = 1 return &Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), AWSSessionSettings: awsutil.CreateDefaultSessionConfig(), QueueSettings: queueSettings, } diff --git a/exporter/awscloudwatchlogsexporter/factory_test.go b/exporter/awscloudwatchlogsexporter/factory_test.go index f647bcd7e0c2..df45d3957395 100644 --- a/exporter/awscloudwatchlogsexporter/factory_test.go +++ b/exporter/awscloudwatchlogsexporter/factory_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil" @@ -14,7 +15,7 @@ import ( func TestDefaultConfig_exporterSettings(t *testing.T) { want := &Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), AWSSessionSettings: awsutil.CreateDefaultSessionConfig(), QueueSettings: exporterhelper.QueueSettings{ Enabled: true, diff --git a/exporter/awscloudwatchlogsexporter/generated_component_test.go b/exporter/awscloudwatchlogsexporter/generated_component_test.go new file mode 100644 index 000000000000..43a94327eafc --- /dev/null +++ b/exporter/awscloudwatchlogsexporter/generated_component_test.go @@ -0,0 +1,126 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package awscloudwatchlogsexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/awscloudwatchlogsexporter/go.mod b/exporter/awscloudwatchlogsexporter/go.mod index 29f7cf248c3a..6713d8b4fa56 100644 --- a/exporter/awscloudwatchlogsexporter/go.mod +++ b/exporter/awscloudwatchlogsexporter/go.mod @@ -1,59 +1,69 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter -go 1.20 +go 1.21 require ( - github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-00010101000000-000000000000 - github.com/aws/aws-sdk-go v1.47.10 - github.com/cenkalti/backoff/v4 v4.2.1 - github.com/google/uuid v1.4.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-20240419190856-2f880467f335 + github.com/aws/aws-sdk-go v1.51.17 + github.com/cenkalti/backoff/v4 v4.3.0 + github.com/google/uuid v1.6.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 ) require ( github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-00010101000000-000000000000 // indirect github.com/aws/aws-sdk-go-v2 v1.22.2 // indirect github.com/aws/smithy-go v1.16.0 // indirect + github.com/beorn7/perks v1.0.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect github.com/jmespath/go-jmespath v0.4.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/stretchr/objx v0.5.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/awscloudwatchlogsexporter/go.sum b/exporter/awscloudwatchlogsexporter/go.sum index 85baca28f40e..05e9b4aab0a8 100644 --- a/exporter/awscloudwatchlogsexporter/go.sum +++ b/exporter/awscloudwatchlogsexporter/go.sum @@ -1,71 +1,54 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v1.22.2 h1:lV0U8fnhAnPz8YcdmZVV60+tr6CakHzqA6P8T46ExJI= github.com/aws/aws-sdk-go-v2 v1.22.2/go.mod h1:Kd0OJtkW3Q0M0lUWGszapWjEvrXDzRW+D21JNsroB+c= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13 h1:OPLEkmhXf6xFPiz0bLeDArZIDx1NNS4oJyG4nv3Gct0= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13/go.mod h1:gpAbvyDGQFozTEmlTFO8XcQKHzubdq0LzRyJpG6MiXM= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 h1:SijA0mgjV8E+8G45ltVHs0fvKpTj8xmZJ3VwhGKtUSI= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4 h1:6lJvvkQ9HmbHZ4h/IEwclwv2mrTW8Uq1SOB/kXy0mfw= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4/go.mod h1:1PrKYwxTM+zjpw9Y41KFtoJCQrJ34Z47Y4VgVbfndjo= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 h1:m0QTSI6pZYJTk5WSKx3fm5cNW/DCicVzULBgU/6IyD0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14/go.mod h1:dDilntgHy9WnHXsh7dDtUPgHKEfTJIBUTHM8OWm0f/0= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36 h1:eev2yZX7esGRjqRbnVk1UxMLw4CyVZDpZXRCcy75oQk= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36/go.mod h1:lGnOkH9NJATw0XEPcAknFBj3zzNTEGRHtSw+CwC1YTg= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 h1:v0jkRigbSD6uOdwcaUQmgEwG1BkPfAPDqaeNt/29ghg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4/go.mod h1:LhTyt8J04LL+9cIt7pYJ5lbS/U98ZmXovLOR/4LUsk8= github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0 h1:wl5dxN1NONhTDQD9uaEvNsDRX29cBmGED/nl0jkWlt4= +github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0/go.mod h1:rDGMZA7f4pbmTtPOk5v5UM2lmX6UAbRnMDJeDvnH7AM= github.com/aws/smithy-go v1.16.0 h1:gJZEH/Fqh+RsvlJ1Zt4tVAtV6bKkp3cC+R6FCZMNzik= github.com/aws/smithy-go v1.16.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -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/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -78,15 +61,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -96,102 +78,88 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -199,39 +167,19 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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/exporter/awscloudwatchlogsexporter/internal/metadata/generated_status.go b/exporter/awscloudwatchlogsexporter/internal/metadata/generated_status.go index 85737d8480e2..2b54cdf29629 100644 --- a/exporter/awscloudwatchlogsexporter/internal/metadata/generated_status.go +++ b/exporter/awscloudwatchlogsexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("awscloudwatchlogs") ) const ( - Type = "awscloudwatchlogs" LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/awscloudwatchlogs") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/awscloudwatchlogs") +} diff --git a/exporter/awscloudwatchlogsexporter/metadata.yaml b/exporter/awscloudwatchlogsexporter/metadata.yaml index 370faa1e41e2..7b4422fa1019 100644 --- a/exporter/awscloudwatchlogsexporter/metadata.yaml +++ b/exporter/awscloudwatchlogsexporter/metadata.yaml @@ -1,9 +1,20 @@ type: awscloudwatchlogs +scope_name: otelcol/awscloudwatchlogs status: class: exporter stability: beta: [logs] - distributions: [contrib, observiq] + distributions: [contrib] codeowners: active: [boostchicken, bryan-aguilar, rapphil] + +tests: + config: + endpoint: http://localhost:0 + region: local + sending_queue: + enabled: false + retry_on_failure: + enabled: false + expect_consumer_error: true diff --git a/exporter/awscloudwatchlogsexporter/package_test.go b/exporter/awscloudwatchlogsexporter/package_test.go new file mode 100644 index 000000000000..026f54ff1134 --- /dev/null +++ b/exporter/awscloudwatchlogsexporter/package_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package awscloudwatchlogsexporter + +import ( + "testing" + + "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")) +} diff --git a/exporter/awsemfexporter/README.md b/exporter/awsemfexporter/README.md index f3bfd1ef1ee6..cd2dc8378d7d 100644 --- a/exporter/awsemfexporter/README.md +++ b/exporter/awsemfexporter/README.md @@ -4,14 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: metrics | -| Distributions | [contrib], [aws], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fawsemf%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fawsemf) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fawsemf%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fawsemf) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@shaochengwang](https://www.github.com/shaochengwang), [@mxiamxia](https://www.github.com/mxiamxia), [@bryan-aguilar](https://www.github.com/bryan-aguilar) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector This exporter converts OpenTelemetry metrics to @@ -22,7 +20,7 @@ and then sends them directly to CloudWatch Logs using the ## Data Conversion Convert OpenTelemetry ```Int64DataPoints```, ```DoubleDataPoints```, ```SummaryDataPoints``` metrics datapoints into CloudWatch ```EMF``` structured log formats and send it to CloudWatch. Logs and Metrics will be displayed in -CloudWatch console. NaN values are not supported by CloudWatch EMF and will be dropped by the exporter. +CloudWatch console. NaN, Inf values are not supported by CloudWatch EMF and will be dropped by the exporter. ## Exporter Configuration diff --git a/exporter/awsemfexporter/datapoint.go b/exporter/awsemfexporter/datapoint.go index a4fe8245e100..bfdce3ce20bc 100644 --- a/exporter/awsemfexporter/datapoint.go +++ b/exporter/awsemfexporter/datapoint.go @@ -61,10 +61,10 @@ type dataPoints interface { // retained: indicates whether the data point is valid for further process // NOTE: It is an expensive call as it calculates the metric value. CalculateDeltaDatapoints(i int, instrumentationScopeName string, detailedMetrics bool, calculators *emfCalculators) (dataPoint []dataPoint, retained bool) - // IsStaleOrNaN returns true if metric value has NoRecordedValue flag set or if any metric value contains a NaN. - // When return value is true, IsStaleOrNaN also returns the attributes attached to the metric which can be used for + // IsStaleNaNInf returns true if metric value has NoRecordedValue flag set or if any metric value contains a NaN or Inf. + // When return value is true, IsStaleNaNInf also returns the attributes attached to the metric which can be used for // logging purposes. - IsStaleOrNaN(i int) (bool, pcommon.Map) + IsStaleNaNInf(i int) (bool, pcommon.Map) } // deltaMetricMetadata contains the metadata required to perform rate/delta calculation @@ -145,13 +145,13 @@ func (dps numberDataPointSlice) CalculateDeltaDatapoints(i int, instrumentationS return []dataPoint{{name: dps.metricName, value: metricVal, labels: labels, timestampMs: timestampMs}}, retained } -func (dps numberDataPointSlice) IsStaleOrNaN(i int) (bool, pcommon.Map) { +func (dps numberDataPointSlice) IsStaleNaNInf(i int) (bool, pcommon.Map) { metric := dps.NumberDataPointSlice.At(i) if metric.Flags().NoRecordedValue() { return true, metric.Attributes() } if metric.ValueType() == pmetric.NumberDataPointValueTypeDouble { - return math.IsNaN(metric.DoubleValue()), metric.Attributes() + return math.IsNaN(metric.DoubleValue()) || math.IsInf(metric.DoubleValue(), 0), metric.Attributes() } return false, pcommon.Map{} } @@ -199,12 +199,14 @@ func (dps histogramDataPointSlice) CalculateDeltaDatapoints(i int, instrumentati }}, true } -func (dps histogramDataPointSlice) IsStaleOrNaN(i int) (bool, pcommon.Map) { +func (dps histogramDataPointSlice) IsStaleNaNInf(i int) (bool, pcommon.Map) { metric := dps.HistogramDataPointSlice.At(i) if metric.Flags().NoRecordedValue() { return true, metric.Attributes() } - if math.IsNaN(metric.Max()) || math.IsNaN(metric.Sum()) || math.IsNaN(metric.Min()) { + if math.IsNaN(metric.Max()) || math.IsNaN(metric.Sum()) || + math.IsNaN(metric.Min()) || math.IsInf(metric.Max(), 0) || + math.IsInf(metric.Sum(), 0) || math.IsInf(metric.Min(), 0) { return true, metric.Attributes() } return false, pcommon.Map{} @@ -292,14 +294,17 @@ func (dps exponentialHistogramDataPointSlice) CalculateDeltaDatapoints(idx int, }}, true } -func (dps exponentialHistogramDataPointSlice) IsStaleOrNaN(i int) (bool, pcommon.Map) { +func (dps exponentialHistogramDataPointSlice) IsStaleNaNInf(i int) (bool, pcommon.Map) { metric := dps.ExponentialHistogramDataPointSlice.At(i) if metric.Flags().NoRecordedValue() { return true, metric.Attributes() } if math.IsNaN(metric.Max()) || math.IsNaN(metric.Min()) || - math.IsNaN(metric.Sum()) { + math.IsNaN(metric.Sum()) || + math.IsInf(metric.Max(), 0) || + math.IsInf(metric.Min(), 0) || + math.IsInf(metric.Sum(), 0) { return true, metric.Attributes() } @@ -363,14 +368,24 @@ func (dps summaryDataPointSlice) CalculateDeltaDatapoints(i int, instrumentation return datapoints, retained } -func (dps summaryDataPointSlice) IsStaleOrNaN(i int) (bool, pcommon.Map) { +func (dps summaryDataPointSlice) IsStaleNaNInf(i int) (bool, pcommon.Map) { metric := dps.SummaryDataPointSlice.At(i) if metric.Flags().NoRecordedValue() { return true, metric.Attributes() } - if math.IsNaN(metric.Sum()) { + if math.IsNaN(metric.Sum()) || math.IsInf(metric.Sum(), 0) { return true, metric.Attributes() } + + values := metric.QuantileValues() + for i := 0; i < values.Len(); i++ { + quantile := values.At(i) + if math.IsNaN(quantile.Value()) || math.IsNaN(quantile.Quantile()) || + math.IsInf(quantile.Value(), 0) || math.IsInf(quantile.Quantile(), 0) { + return true, metric.Attributes() + } + } + return false, metric.Attributes() } diff --git a/exporter/awsemfexporter/datapoint_test.go b/exporter/awsemfexporter/datapoint_test.go index 82c2ac49e62e..00141e455a6b 100644 --- a/exporter/awsemfexporter/datapoint_test.go +++ b/exporter/awsemfexporter/datapoint_test.go @@ -67,6 +67,22 @@ func generateTestGaugeMetricNaN(name string) pmetric.Metrics { return otelMetrics } +func generateTestGaugeMetricInf(name string) pmetric.Metrics { + otelMetrics := pmetric.NewMetrics() + rs := otelMetrics.ResourceMetrics().AppendEmpty() + metrics := rs.ScopeMetrics().AppendEmpty().Metrics() + metric := metrics.AppendEmpty() + metric.SetName(name) + metric.SetUnit("Count") + gaugeMetric := metric.SetEmptyGauge() + gaugeDatapoint := gaugeMetric.DataPoints().AppendEmpty() + gaugeDatapoint.Attributes().PutStr("label1", "value1") + + gaugeDatapoint.SetDoubleValue(math.Inf(0)) + + return otelMetrics +} + func generateTestSumMetric(name string, valueType metricValueType) pmetric.Metrics { otelMetrics := pmetric.NewMetrics() rs := otelMetrics.ResourceMetrics().AppendEmpty() @@ -127,6 +143,23 @@ func generateTestHistogramMetricWithNaNs(name string) pmetric.Metrics { return otelMetrics } +func generateTestHistogramMetricWithInfs(name string) pmetric.Metrics { + otelMetrics := pmetric.NewMetrics() + rs := otelMetrics.ResourceMetrics().AppendEmpty() + metrics := rs.ScopeMetrics().AppendEmpty().Metrics() + metric := metrics.AppendEmpty() + metric.SetName(name) + metric.SetUnit("Seconds") + histogramMetric := metric.SetEmptyHistogram() + histogramDatapoint := histogramMetric.DataPoints().AppendEmpty() + histogramDatapoint.BucketCounts().FromRaw([]uint64{5, 6, 7}) + histogramDatapoint.ExplicitBounds().FromRaw([]float64{0, math.Inf(0)}) + histogramDatapoint.Attributes().PutStr("label1", "value1") + histogramDatapoint.SetCount(18) + histogramDatapoint.SetSum(math.Inf(0)) + return otelMetrics +} + func generateTestExponentialHistogramMetric(name string) pmetric.Metrics { otelMetrics := pmetric.NewMetrics() rs := otelMetrics.ResourceMetrics().AppendEmpty() @@ -183,6 +216,34 @@ func generateTestExponentialHistogramMetricWithNaNs(name string) pmetric.Metrics return otelMetrics } +func generateTestExponentialHistogramMetricWithInfs(name string) pmetric.Metrics { + otelMetrics := pmetric.NewMetrics() + rs := otelMetrics.ResourceMetrics().AppendEmpty() + metrics := rs.ScopeMetrics().AppendEmpty().Metrics() + metric := metrics.AppendEmpty() + metric.SetName(name) + metric.SetUnit("Seconds") + exponentialHistogramMetric := metric.SetEmptyExponentialHistogram() + + exponentialHistogramDatapoint := exponentialHistogramMetric.DataPoints().AppendEmpty() + exponentialHistogramDatapoint.SetCount(4) + exponentialHistogramDatapoint.SetSum(math.Inf(0)) + exponentialHistogramDatapoint.SetMin(math.Inf(0)) + exponentialHistogramDatapoint.SetMax(math.Inf(0)) + exponentialHistogramDatapoint.SetZeroCount(0) + exponentialHistogramDatapoint.SetScale(1) + exponentialHistogramDatapoint.Positive().SetOffset(1) + exponentialHistogramDatapoint.Positive().BucketCounts().FromRaw([]uint64{ + 1, 0, 1, + }) + exponentialHistogramDatapoint.Negative().SetOffset(1) + exponentialHistogramDatapoint.Negative().BucketCounts().FromRaw([]uint64{ + 1, 0, 1, + }) + exponentialHistogramDatapoint.Attributes().PutStr("label1", "value1") + return otelMetrics +} + func generateTestSummaryMetric(name string) pmetric.Metrics { otelMetrics := pmetric.NewMetrics() rs := otelMetrics.ResourceMetrics().AppendEmpty() @@ -223,11 +284,36 @@ func generateTestSummaryMetricWithNaN(name string) pmetric.Metrics { summaryDatapoint.SetCount(uint64(5 * i)) summaryDatapoint.SetSum(math.NaN()) firstQuantile := summaryDatapoint.QuantileValues().AppendEmpty() - firstQuantile.SetQuantile(0.0) - firstQuantile.SetValue(1) + firstQuantile.SetQuantile(math.NaN()) + firstQuantile.SetValue(math.NaN()) secondQuantile := summaryDatapoint.QuantileValues().AppendEmpty() - secondQuantile.SetQuantile(100.0) - secondQuantile.SetValue(5) + secondQuantile.SetQuantile(math.NaN()) + secondQuantile.SetValue(math.NaN()) + } + + return otelMetrics +} + +func generateTestSummaryMetricWithInf(name string) pmetric.Metrics { + otelMetrics := pmetric.NewMetrics() + rs := otelMetrics.ResourceMetrics().AppendEmpty() + metrics := rs.ScopeMetrics().AppendEmpty().Metrics() + + for i := 0; i < 2; i++ { + metric := metrics.AppendEmpty() + metric.SetName(name) + metric.SetUnit("Seconds") + summaryMetric := metric.SetEmptySummary() + summaryDatapoint := summaryMetric.DataPoints().AppendEmpty() + summaryDatapoint.Attributes().PutStr("label1", "value1") + summaryDatapoint.SetCount(uint64(5 * i)) + summaryDatapoint.SetSum(math.Inf(0)) + firstQuantile := summaryDatapoint.QuantileValues().AppendEmpty() + firstQuantile.SetQuantile(math.Inf(0)) + firstQuantile.SetValue(math.Inf(0)) + secondQuantile := summaryDatapoint.QuantileValues().AppendEmpty() + secondQuantile.SetQuantile(math.Inf(0)) + secondQuantile.SetValue(math.Inf(0)) } return otelMetrics @@ -272,7 +358,7 @@ func shutdownEmfCalculators(c *emfCalculators) error { } -func TestIsStaleOrNaN_NumberDataPointSlice(t *testing.T) { +func TestIsStaleNaNInf_NumberDataPointSlice(t *testing.T) { testCases := []struct { name string metricName string @@ -286,6 +372,12 @@ func TestIsStaleOrNaN_NumberDataPointSlice(t *testing.T) { metricName: "NaN", expectedAssert: assert.True, }, + { + name: "inf", + metricValue: math.Inf(0), + metricName: "Inf", + expectedAssert: assert.True, + }, { name: "valid float", metricValue: 0.4, @@ -323,8 +415,8 @@ func TestIsStaleOrNaN_NumberDataPointSlice(t *testing.T) { } numberDatapointSlice := numberDataPointSlice{deltaMetricMetadata{}, numberDPS} - isStaleOrNan, _ := numberDatapointSlice.IsStaleOrNaN(0) - tc.expectedAssert(t, isStaleOrNan) + isStaleNanInf, _ := numberDatapointSlice.IsStaleNaNInf(0) + tc.expectedAssert(t, isStaleNanInf) }) } } @@ -534,7 +626,7 @@ func TestCalculateDeltaDatapoints_HistogramDataPointSlice(t *testing.T) { } -func TestIsStaleOrNaN_HistogramDataPointSlice(t *testing.T) { +func TestIsStaleNaNInf_HistogramDataPointSlice(t *testing.T) { testCases := []struct { name string @@ -543,7 +635,7 @@ func TestIsStaleOrNaN_HistogramDataPointSlice(t *testing.T) { setFlagsFunc func(point pmetric.HistogramDataPoint) pmetric.HistogramDataPoint }{ { - name: "Histogram with NaNs", + name: "Histogram with all NaNs", histogramDPS: func() pmetric.HistogramDataPointSlice { histogramDPS := pmetric.NewHistogramDataPointSlice() histogramDP := histogramDPS.AppendEmpty() @@ -556,6 +648,48 @@ func TestIsStaleOrNaN_HistogramDataPointSlice(t *testing.T) { }(), boolAssertFunc: assert.True, }, + { + name: "Histogram with NaN Sum", + histogramDPS: func() pmetric.HistogramDataPointSlice { + histogramDPS := pmetric.NewHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(math.NaN()) + histogramDP.SetMin(1234) + histogramDP.SetMax(1234) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, + { + name: "Histogram with NaN Min", + histogramDPS: func() pmetric.HistogramDataPointSlice { + histogramDPS := pmetric.NewHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(123) + histogramDP.SetMin(math.NaN()) + histogramDP.SetMax(123) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, + { + name: "Histogram with nan Max", + histogramDPS: func() pmetric.HistogramDataPointSlice { + histogramDPS := pmetric.NewHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(123) + histogramDP.SetMin(123) + histogramDP.SetMax(math.NaN()) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, { name: "Histogram with min and max", histogramDPS: func() pmetric.HistogramDataPointSlice { @@ -571,7 +705,7 @@ func TestIsStaleOrNaN_HistogramDataPointSlice(t *testing.T) { boolAssertFunc: assert.False, }, { - name: "Histogram with no NaNs", + name: "Histogram with no NaNs or Inf", histogramDPS: func() pmetric.HistogramDataPointSlice { histogramDPS := pmetric.NewHistogramDataPointSlice() histogramDP := histogramDPS.AppendEmpty() @@ -588,6 +722,62 @@ func TestIsStaleOrNaN_HistogramDataPointSlice(t *testing.T) { return point }, }, + { + name: "Histogram with all Infs", + histogramDPS: func() pmetric.HistogramDataPointSlice { + histogramDPS := pmetric.NewHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(math.Inf(0)) + histogramDP.SetMin(math.Inf(0)) + histogramDP.SetMax(math.Inf(0)) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, + { + name: "Histogram with Inf Sum", + histogramDPS: func() pmetric.HistogramDataPointSlice { + histogramDPS := pmetric.NewHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(math.Inf(0)) + histogramDP.SetMin(1234) + histogramDP.SetMax(1234) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, + { + name: "Histogram with Inf Min", + histogramDPS: func() pmetric.HistogramDataPointSlice { + histogramDPS := pmetric.NewHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(123) + histogramDP.SetMin(math.Inf(0)) + histogramDP.SetMax(123) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, + { + name: "Histogram with Inf Max", + histogramDPS: func() pmetric.HistogramDataPointSlice { + histogramDPS := pmetric.NewHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(123) + histogramDP.SetMin(123) + histogramDP.SetMax(math.Inf(0)) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, } for _, tc := range testCases { @@ -597,8 +787,8 @@ func TestIsStaleOrNaN_HistogramDataPointSlice(t *testing.T) { if tc.setFlagsFunc != nil { tc.setFlagsFunc(histogramDatapointSlice.At(0)) } - isStaleOrNan, _ := histogramDatapointSlice.IsStaleOrNaN(0) - tc.boolAssertFunc(t, isStaleOrNan) + isStaleNanInf, _ := histogramDatapointSlice.IsStaleNaNInf(0) + tc.boolAssertFunc(t, isStaleNanInf) }) } @@ -749,7 +939,7 @@ func TestCalculateDeltaDatapoints_ExponentialHistogramDataPointSlice(t *testing. } -func TestIsStaleOrNaN_ExponentialHistogramDataPointSlice(t *testing.T) { +func TestIsStaleNaNInf_ExponentialHistogramDataPointSlice(t *testing.T) { testCases := []struct { name string @@ -758,7 +948,7 @@ func TestIsStaleOrNaN_ExponentialHistogramDataPointSlice(t *testing.T) { setFlagsFunc func(point pmetric.ExponentialHistogramDataPoint) pmetric.ExponentialHistogramDataPoint }{ { - name: "Exponential histogram with non NaNs", + name: "Exponential histogram with non NaNs or Infs", histogramDPS: func() pmetric.ExponentialHistogramDataPointSlice { histogramDPS := pmetric.NewExponentialHistogramDataPointSlice() histogramDP := histogramDPS.AppendEmpty() @@ -771,6 +961,62 @@ func TestIsStaleOrNaN_ExponentialHistogramDataPointSlice(t *testing.T) { }(), boolAssertFunc: assert.False, }, + { + name: "Exponential histogram with all possible NaN", + histogramDPS: func() pmetric.ExponentialHistogramDataPointSlice { + histogramDPS := pmetric.NewExponentialHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(math.NaN()) + histogramDP.SetMin(math.NaN()) + histogramDP.SetMax(math.NaN()) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, + { + name: "Exponential histogram with NaN Sum", + histogramDPS: func() pmetric.ExponentialHistogramDataPointSlice { + histogramDPS := pmetric.NewExponentialHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(math.NaN()) + histogramDP.SetMin(1245) + histogramDP.SetMax(1234556) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, + { + name: "Exponential histogram with NaN Min", + histogramDPS: func() pmetric.ExponentialHistogramDataPointSlice { + histogramDPS := pmetric.NewExponentialHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(1255) + histogramDP.SetMin(math.NaN()) + histogramDP.SetMax(12545) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, + { + name: "Exponential histogram with NaN Max", + histogramDPS: func() pmetric.ExponentialHistogramDataPointSlice { + histogramDPS := pmetric.NewExponentialHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(512444) + histogramDP.SetMin(123) + histogramDP.SetMax(math.NaN()) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, { name: "Exponential histogram with NaNs", histogramDPS: func() pmetric.ExponentialHistogramDataPointSlice { @@ -803,6 +1049,76 @@ func TestIsStaleOrNaN_ExponentialHistogramDataPointSlice(t *testing.T) { return point }, }, + { + name: "Exponential histogram with all possible Inf", + histogramDPS: func() pmetric.ExponentialHistogramDataPointSlice { + histogramDPS := pmetric.NewExponentialHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(math.Inf(0)) + histogramDP.SetMin(math.Inf(0)) + histogramDP.SetMax(math.Inf(0)) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, + { + name: "Exponential histogram with Inf Sum", + histogramDPS: func() pmetric.ExponentialHistogramDataPointSlice { + histogramDPS := pmetric.NewExponentialHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(math.Inf(0)) + histogramDP.SetMin(1245) + histogramDP.SetMax(1234556) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, + { + name: "Exponential histogram with Inf Min", + histogramDPS: func() pmetric.ExponentialHistogramDataPointSlice { + histogramDPS := pmetric.NewExponentialHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(1255) + histogramDP.SetMin(math.Inf(0)) + histogramDP.SetMax(12545) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, + { + name: "Exponential histogram with Inf Max", + histogramDPS: func() pmetric.ExponentialHistogramDataPointSlice { + histogramDPS := pmetric.NewExponentialHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(512444) + histogramDP.SetMin(123) + histogramDP.SetMax(math.Inf(0)) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, + { + name: "Exponential histogram with Infs", + histogramDPS: func() pmetric.ExponentialHistogramDataPointSlice { + histogramDPS := pmetric.NewExponentialHistogramDataPointSlice() + histogramDP := histogramDPS.AppendEmpty() + histogramDP.SetCount(uint64(17)) + histogramDP.SetSum(math.Inf(0)) + histogramDP.SetMin(math.Inf(0)) + histogramDP.SetMax(math.Inf(0)) + histogramDP.Attributes().PutStr("label1", "value1") + return histogramDPS + }(), + boolAssertFunc: assert.True, + }, } for _, tc := range testCases { @@ -812,9 +1128,9 @@ func TestIsStaleOrNaN_ExponentialHistogramDataPointSlice(t *testing.T) { if tc.setFlagsFunc != nil { tc.setFlagsFunc(exponentialHistogramDatapointSlice.At(0)) } - isStaleOrNaN, _ := exponentialHistogramDatapointSlice.IsStaleOrNaN(0) + isStaleNaNInf, _ := exponentialHistogramDatapointSlice.IsStaleNaNInf(0) // When calculate the delta datapoints for histograms - tc.boolAssertFunc(t, isStaleOrNaN) + tc.boolAssertFunc(t, isStaleNaNInf) }) } } @@ -904,57 +1220,193 @@ func TestCalculateDeltaDatapoints_SummaryDataPointSlice(t *testing.T) { } } -func TestIsStaleOrNaN_SummaryDataPointSlice(t *testing.T) { +func TestIsStaleNaNInf_SummaryDataPointSlice(t *testing.T) { + type qMetricObject struct { + value float64 + quantile float64 + } + type quantileTestObj struct { + sum float64 + count uint64 + qMetrics []qMetricObject + } testCases := []struct { name string - summaryMetricValue map[string]any + summaryMetricValue quantileTestObj expectedBoolAssert assert.BoolAssertionFunc setFlagsFunc func(point pmetric.SummaryDataPoint) pmetric.SummaryDataPoint }{ { - name: "summary with no nan values", - summaryMetricValue: map[string]any{"sum": float64(17.3), "count": uint64(17), "firstQuantile": float64(1), "secondQuantile": float64(5)}, + name: "summary with no nan or inf values", + summaryMetricValue: quantileTestObj{ + sum: 17.3, + count: 17, + qMetrics: []qMetricObject{ + { + value: 1, + quantile: 0.5, + }, + { + value: 5, + quantile: 2.0, + }, + }, + }, expectedBoolAssert: assert.False, }, { - name: "Summary with nan values", - summaryMetricValue: map[string]any{"sum": math.NaN(), "count": uint64(25), "firstQuantile": math.NaN(), "secondQuantile": math.NaN()}, + name: "Summary with nan sum", + summaryMetricValue: quantileTestObj{ + sum: math.NaN(), + count: 17, + qMetrics: []qMetricObject{ + { + value: 1, + quantile: 0.5, + }, + { + value: 5, + quantile: 2.0, + }, + }, + }, expectedBoolAssert: assert.True, }, { - name: "Summary with set flag func", - summaryMetricValue: map[string]any{"sum": math.NaN(), "count": uint64(25), "firstQuantile": math.NaN(), "secondQuantile": math.NaN()}, + name: "Summary with no recorded value flag set to true", + summaryMetricValue: quantileTestObj{ + sum: 1245.65, + count: 17, + qMetrics: []qMetricObject{ + { + value: 1, + quantile: 0.5, + }, + { + value: 5, + quantile: 2.0, + }, + }, + }, expectedBoolAssert: assert.True, setFlagsFunc: func(point pmetric.SummaryDataPoint) pmetric.SummaryDataPoint { point.SetFlags(pmetric.DefaultDataPointFlags.WithNoRecordedValue(true)) return point }, }, + { + name: "Summary with nan quantile value", + summaryMetricValue: quantileTestObj{ + sum: 1245.65, + count: 17, + qMetrics: []qMetricObject{ + { + value: 1, + quantile: 0.5, + }, + { + value: math.NaN(), + quantile: 2.0, + }, + }, + }, + expectedBoolAssert: assert.True, + }, + { + name: "Summary with nan quantile", + summaryMetricValue: quantileTestObj{ + sum: 1245.65, + count: 17, + qMetrics: []qMetricObject{ + { + value: 1, + quantile: 0.5, + }, + { + value: 7.8, + quantile: math.NaN(), + }, + }, + }, + expectedBoolAssert: assert.True, + }, + { + name: "Summary with Inf sum", + summaryMetricValue: quantileTestObj{ + sum: math.Inf(0), + count: 17, + qMetrics: []qMetricObject{ + { + value: 1, + quantile: 0.5, + }, + { + value: 5, + quantile: 2.0, + }, + }, + }, + expectedBoolAssert: assert.True, + }, + { + name: "Summary with inf quantile value", + summaryMetricValue: quantileTestObj{ + sum: 1245.65, + count: 17, + qMetrics: []qMetricObject{ + { + value: 1, + quantile: 0.5, + }, + { + value: math.Inf(0), + quantile: 2.0, + }, + }, + }, + expectedBoolAssert: assert.True, + }, + { + name: "Summary with inf quantile", + summaryMetricValue: quantileTestObj{ + sum: 1245.65, + count: 17, + qMetrics: []qMetricObject{ + { + value: 1, + quantile: 0.5, + }, + { + value: 7.8, + quantile: math.Inf(0), + }, + }, + }, + expectedBoolAssert: assert.True, + }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - // Given the summary datapoints with quantile 0, quantile 100, sum and count summaryDPS := pmetric.NewSummaryDataPointSlice() summaryDP := summaryDPS.AppendEmpty() - summaryDP.SetSum(tc.summaryMetricValue["sum"].(float64)) - summaryDP.SetCount(tc.summaryMetricValue["count"].(uint64)) + summaryDP.SetSum(tc.summaryMetricValue.sum) + summaryDP.SetCount(tc.summaryMetricValue.count) summaryDP.Attributes().PutStr("label1", "value1") - summaryDP.QuantileValues().EnsureCapacity(2) - firstQuantileValue := summaryDP.QuantileValues().AppendEmpty() - firstQuantileValue.SetQuantile(0) - firstQuantileValue.SetValue(tc.summaryMetricValue["firstQuantile"].(float64)) - secondQuantileValue := summaryDP.QuantileValues().AppendEmpty() - secondQuantileValue.SetQuantile(100) - secondQuantileValue.SetValue(tc.summaryMetricValue["secondQuantile"].(float64)) + summaryDP.QuantileValues().EnsureCapacity(len(tc.summaryMetricValue.qMetrics)) + for _, qMetric := range tc.summaryMetricValue.qMetrics { + newQ := summaryDP.QuantileValues().AppendEmpty() + newQ.SetValue(qMetric.value) + newQ.SetQuantile(qMetric.quantile) + } summaryDatapointSlice := summaryDataPointSlice{deltaMetricMetadata{}, summaryDPS} if tc.setFlagsFunc != nil { tc.setFlagsFunc(summaryDatapointSlice.At(0)) } - isStaleOrNaN, _ := summaryDatapointSlice.IsStaleOrNaN(0) - tc.expectedBoolAssert(t, isStaleOrNaN) + isStaleNaNInf, _ := summaryDatapointSlice.IsStaleNaNInf(0) + tc.expectedBoolAssert(t, isStaleNaNInf) }) } diff --git a/exporter/awsemfexporter/emf_exporter.go b/exporter/awsemfexporter/emf_exporter.go index 148e874062ad..d2a446481b53 100644 --- a/exporter/awsemfexporter/emf_exporter.go +++ b/exporter/awsemfexporter/emf_exporter.go @@ -172,7 +172,7 @@ func (emf *emfExporter) pushMetricsData(_ context.Context, md pmetric.Metrics) e } } - emf.config.logger.Info("Finish processing resource metrics", zap.Any("labels", labels)) + emf.config.logger.Debug("Finish processing resource metrics", zap.Any("labels", labels)) return nil } diff --git a/exporter/awsemfexporter/emf_exporter_test.go b/exporter/awsemfexporter/emf_exporter_test.go index 76542fca93de..499f4226cf32 100644 --- a/exporter/awsemfexporter/emf_exporter_test.go +++ b/exporter/awsemfexporter/emf_exporter_test.go @@ -62,7 +62,7 @@ func TestConsumeMetrics(t *testing.T) { expCfg.Region = "us-west-2" expCfg.MaxRetries = 0 exp, err := newEmfExporter(expCfg, exportertest.NewNopCreateSettings()) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exp) md := generateTestMetrics(testMetric{ @@ -103,7 +103,47 @@ func TestConsumeMetricsWithNaNValues(t *testing.T) { expCfg.MaxRetries = 0 expCfg.OutputDestination = "stdout" exp, err := newEmfExporter(expCfg, exportertest.NewNopCreateSettings()) - assert.Nil(t, err) + assert.NoError(t, err) + assert.NotNil(t, exp) + md := tc.generateFunc(tc.testName) + require.NoError(t, exp.pushMetricsData(ctx, md)) + require.NoError(t, exp.shutdown(ctx)) + }) + } + +} + +func TestConsumeMetricsWithInfValues(t *testing.T) { + tests := []struct { + testName string + generateFunc func(string) pmetric.Metrics + }{ + { + "histograme-with-inf", + generateTestHistogramMetricWithInfs, + }, { + "gauge-with-inf", + generateTestGaugeMetricInf, + }, { + "summary-with-inf", + generateTestSummaryMetricWithInf, + }, { + "exponentialHistogram-with-inf", + generateTestExponentialHistogramMetricWithInfs, + }, + } + + for _, tc := range tests { + t.Run(tc.testName, func(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + factory := NewFactory() + expCfg := factory.CreateDefaultConfig().(*Config) + expCfg.Region = "us-west-2" + expCfg.MaxRetries = 0 + expCfg.OutputDestination = "stdout" + exp, err := newEmfExporter(expCfg, exportertest.NewNopCreateSettings()) + assert.NoError(t, err) assert.NotNil(t, exp) md := tc.generateFunc(tc.testName) require.NoError(t, exp.pushMetricsData(ctx, md)) @@ -122,7 +162,7 @@ func TestConsumeMetricsWithOutputDestination(t *testing.T) { expCfg.MaxRetries = 0 expCfg.OutputDestination = "stdout" exp, err := newEmfExporter(expCfg, exportertest.NewNopCreateSettings()) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exp) md := generateTestMetrics(testMetric{ @@ -143,7 +183,7 @@ func TestConsumeMetricsWithLogGroupStreamConfig(t *testing.T) { expCfg.LogGroupName = "test-logGroupName" expCfg.LogStreamName = "test-logStreamName" exp, err := newEmfExporter(expCfg, exportertest.NewNopCreateSettings()) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exp) md := generateTestMetrics(testMetric{ @@ -170,7 +210,7 @@ func TestConsumeMetricsWithLogGroupStreamValidPlaceholder(t *testing.T) { expCfg.LogGroupName = "/aws/ecs/containerinsights/{ClusterName}/performance" expCfg.LogStreamName = "{TaskId}" exp, err := newEmfExporter(expCfg, exportertest.NewNopCreateSettings()) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exp) md := generateTestMetrics(testMetric{ @@ -201,7 +241,7 @@ func TestConsumeMetricsWithOnlyLogStreamPlaceholder(t *testing.T) { expCfg.LogGroupName = "test-logGroupName" expCfg.LogStreamName = "{TaskId}" exp, err := newEmfExporter(expCfg, exportertest.NewNopCreateSettings()) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exp) md := generateTestMetrics(testMetric{ @@ -232,7 +272,7 @@ func TestConsumeMetricsWithWrongPlaceholder(t *testing.T) { expCfg.LogGroupName = "test-logGroupName" expCfg.LogStreamName = "{WrongKey}" exp, err := newEmfExporter(expCfg, exportertest.NewNopCreateSettings()) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exp) md := generateTestMetrics(testMetric{ @@ -263,7 +303,7 @@ func TestPushMetricsDataWithErr(t *testing.T) { expCfg.LogGroupName = "test-logGroupName" expCfg.LogStreamName = "test-logStreamName" exp, err := newEmfExporter(expCfg, exportertest.NewNopCreateSettings()) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exp) logPusher := new(mockPusher) @@ -295,7 +335,7 @@ func TestNewExporterWithoutConfig(t *testing.T) { t.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "fake") exp, err := newEmfExporter(expCfg, settings) - assert.NotNil(t, err) + assert.Error(t, err) assert.Nil(t, exp) assert.Equal(t, settings.Logger, expCfg.logger) } @@ -332,10 +372,10 @@ func TestNewExporterWithMetricDeclarations(t *testing.T) { params.Logger = zap.New(obs) exp, err := newEmfExporter(expCfg, params) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exp) err = expCfg.Validate() - assert.Nil(t, err) + assert.NoError(t, err) // Invalid metric declaration should be filtered out assert.Equal(t, 3, len(exp.config.MetricDeclarations)) @@ -365,7 +405,7 @@ func TestNewExporterWithMetricDeclarations(t *testing.T) { func TestNewExporterWithoutSession(t *testing.T) { exp, err := newEmfExporter(nil, exportertest.NewNopCreateSettings()) - assert.NotNil(t, err) + assert.Error(t, err) assert.Nil(t, exp) } @@ -387,13 +427,14 @@ func TestNewEmfExporterWithoutConfig(t *testing.T) { t.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "fake") exp, err := newEmfExporter(expCfg, settings) - assert.NotNil(t, err) + assert.Error(t, err) assert.Nil(t, exp) assert.Equal(t, settings.Logger, expCfg.logger) } func TestMiddleware(t *testing.T) { - id := component.NewID("test") + testType, _ := component.NewType("test") + id := component.NewID(testType) ctx, cancel := context.WithCancel(context.Background()) defer cancel() factory := NewFactory() diff --git a/exporter/awsemfexporter/factory_test.go b/exporter/awsemfexporter/factory_test.go index 5a01cde8e03c..d1b71fec7f84 100644 --- a/exporter/awsemfexporter/factory_test.go +++ b/exporter/awsemfexporter/factory_test.go @@ -38,7 +38,7 @@ func TestCreateTracesExporter(t *testing.T) { ctx := context.Background() exporter, err := factory.CreateTracesExporter(ctx, exportertest.NewNopCreateSettings(), cfg) - assert.NotNil(t, err) + assert.Error(t, err) assert.Nil(t, exporter) } @@ -54,6 +54,6 @@ func TestCreateMetricsExporter(t *testing.T) { ctx := context.Background() exporter, err := factory.CreateMetricsExporter(ctx, exportertest.NewNopCreateSettings(), cfg) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exporter) } diff --git a/exporter/awsemfexporter/generated_component_test.go b/exporter/awsemfexporter/generated_component_test.go new file mode 100644 index 000000000000..8613a09d57d9 --- /dev/null +++ b/exporter/awsemfexporter/generated_component_test.go @@ -0,0 +1,126 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package awsemfexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/awsemfexporter/go.mod b/exporter/awsemfexporter/go.mod index 3668d21c949b..6fb7f4694a6b 100644 --- a/exporter/awsemfexporter/go.mod +++ b/exporter/awsemfexporter/go.mod @@ -1,36 +1,43 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter -go 1.20 +go 1.21 require ( - github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-00010101000000-000000000000 - github.com/aws/aws-sdk-go v1.47.10 - github.com/google/uuid v1.4.0 - github.com/jellydator/ttlcache/v3 v3.1.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 + github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-20240419190856-2f880467f335 + github.com/aws/aws-sdk-go v1.51.17 + github.com/google/uuid v1.6.0 + github.com/jellydator/ttlcache/v3 v3.2.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/featuregate v1.5.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 + go.uber.org/zap v1.27.0 + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc ) require ( github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-00010101000000-000000000000 // indirect github.com/aws/aws-sdk-go-v2 v1.22.2 // indirect github.com/aws/smithy-go v1.16.0 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect @@ -38,29 +45,33 @@ require ( 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/stretchr/objx v0.5.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/awsemfexporter/go.sum b/exporter/awsemfexporter/go.sum index 5d50f63cf2b4..7852498cf43e 100644 --- a/exporter/awsemfexporter/go.sum +++ b/exporter/awsemfexporter/go.sum @@ -1,73 +1,58 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v1.22.2 h1:lV0U8fnhAnPz8YcdmZVV60+tr6CakHzqA6P8T46ExJI= github.com/aws/aws-sdk-go-v2 v1.22.2/go.mod h1:Kd0OJtkW3Q0M0lUWGszapWjEvrXDzRW+D21JNsroB+c= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13 h1:OPLEkmhXf6xFPiz0bLeDArZIDx1NNS4oJyG4nv3Gct0= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13/go.mod h1:gpAbvyDGQFozTEmlTFO8XcQKHzubdq0LzRyJpG6MiXM= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 h1:SijA0mgjV8E+8G45ltVHs0fvKpTj8xmZJ3VwhGKtUSI= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4 h1:6lJvvkQ9HmbHZ4h/IEwclwv2mrTW8Uq1SOB/kXy0mfw= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4/go.mod h1:1PrKYwxTM+zjpw9Y41KFtoJCQrJ34Z47Y4VgVbfndjo= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 h1:m0QTSI6pZYJTk5WSKx3fm5cNW/DCicVzULBgU/6IyD0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14/go.mod h1:dDilntgHy9WnHXsh7dDtUPgHKEfTJIBUTHM8OWm0f/0= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36 h1:eev2yZX7esGRjqRbnVk1UxMLw4CyVZDpZXRCcy75oQk= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36/go.mod h1:lGnOkH9NJATw0XEPcAknFBj3zzNTEGRHtSw+CwC1YTg= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 h1:v0jkRigbSD6uOdwcaUQmgEwG1BkPfAPDqaeNt/29ghg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4/go.mod h1:LhTyt8J04LL+9cIt7pYJ5lbS/U98ZmXovLOR/4LUsk8= github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0 h1:wl5dxN1NONhTDQD9uaEvNsDRX29cBmGED/nl0jkWlt4= +github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0/go.mod h1:rDGMZA7f4pbmTtPOk5v5UM2lmX6UAbRnMDJeDvnH7AM= github.com/aws/smithy-go v1.16.0 h1:gJZEH/Fqh+RsvlJ1Zt4tVAtV6bKkp3cC+R6FCZMNzik= github.com/aws/smithy-go v1.16.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/jellydator/ttlcache/v3 v3.1.0 h1:0gPFG0IHHP6xyUyXq+JaD8fwkDCqgqwohXNJBcYE71g= -github.com/jellydator/ttlcache/v3 v3.1.0/go.mod h1:hi7MGFdMAwZna5n2tuvh63DvFLzVKySzCVW6+0gA2n4= +github.com/jellydator/ttlcache/v3 v3.2.0 h1:6lqVJ8X3ZaUwvzENqPAobDsXNExfUJd61u++uW8a3LE= +github.com/jellydator/ttlcache/v3 v3.2.0/go.mod h1:hi7MGFdMAwZna5n2tuvh63DvFLzVKySzCVW6+0gA2n4= 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= @@ -80,15 +65,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -98,108 +82,96 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -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/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -207,39 +179,19 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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/exporter/awsemfexporter/grouped_metric.go b/exporter/awsemfexporter/grouped_metric.go index c62c723a4a5e..dd3426cdc2e9 100644 --- a/exporter/awsemfexporter/grouped_metric.go +++ b/exporter/awsemfexporter/grouped_metric.go @@ -27,16 +27,24 @@ type metricInfo struct { } // addToGroupedMetric processes OT metrics and adds them into GroupedMetric buckets -func addToGroupedMetric(pmd pmetric.Metric, groupedMetrics map[any]*groupedMetric, metadata cWMetricMetadata, patternReplaceSucceeded bool, logger *zap.Logger, descriptor map[string]MetricDescriptor, config *Config, calculators *emfCalculators) error { - - dps := getDataPoints(pmd, metadata, logger) +func addToGroupedMetric( + pmd pmetric.Metric, + groupedMetrics map[any]*groupedMetric, + metadata cWMetricMetadata, + patternReplaceSucceeded bool, + descriptor map[string]MetricDescriptor, + config *Config, + calculators *emfCalculators, +) error { + + dps := getDataPoints(pmd, metadata, config.logger) if dps == nil || dps.Len() == 0 { return nil } for i := 0; i < dps.Len(); i++ { // Drop stale or NaN metric values - if staleOrNan, attrs := dps.IsStaleOrNaN(i); staleOrNan { + if isStaleNanInf, attrs := dps.IsStaleNaNInf(i); isStaleNanInf { if config != nil && config.logger != nil { config.logger.Debug("dropped metric with nan value", zap.String("metric.name", pmd.Name()), @@ -83,7 +91,7 @@ func addToGroupedMetric(pmd pmetric.Metric, groupedMetrics map[any]*groupedMetri if _, ok := groupedMetrics[groupKey]; ok { // if MetricName already exists in metrics map, print warning log if _, ok := groupedMetrics[groupKey].metrics[dp.name]; ok { - logger.Warn( + config.logger.Warn( "Duplicate metric found", zap.String("Name", dp.name), zap.Any("Labels", labels), diff --git a/exporter/awsemfexporter/grouped_metric_test.go b/exporter/awsemfexporter/grouped_metric_test.go index a21d5f523771..47bee6e50fea 100644 --- a/exporter/awsemfexporter/grouped_metric_test.go +++ b/exporter/awsemfexporter/grouped_metric_test.go @@ -27,7 +27,6 @@ func TestAddToGroupedMetric(t *testing.T) { namespace := "namespace" instrumentationLibName := "cloudwatch-otel" timestamp := time.Now().UnixNano() / int64(time.Millisecond) - logger := zap.NewNop() testCases := []struct { name string @@ -110,11 +109,11 @@ func TestAddToGroupedMetric(t *testing.T) { for i := 0; i < metrics.Len(); i++ { err := addToGroupedMetric(metrics.At(i), groupedMetrics, generateTestMetricMetadata(namespace, timestamp, logGroup, logStreamName, instrumentationLibName, metrics.At(i).Type()), - true, zap.NewNop(), + true, nil, testCfg, emfCalcs) - assert.Nil(t, err) + assert.NoError(t, err) } assert.Equal(t, 1, len(groupedMetrics)) @@ -153,11 +152,10 @@ func TestAddToGroupedMetric(t *testing.T) { groupedMetrics, generateTestMetricMetadata(namespace, timestamp, logGroup, logStreamName, instrumentationLibName, metrics.At(i).Type()), true, - logger, nil, testCfg, emfCalcs) - assert.Nil(t, err) + assert.NoError(t, err) } assert.Equal(t, 4, len(groupedMetrics)) @@ -192,7 +190,7 @@ func TestAddToGroupedMetric(t *testing.T) { } }) - t.Run("Add multiple different metrics with NaN types", func(t *testing.T) { + t.Run("Add multiple different metrics with NaN and Inf types", func(t *testing.T) { emfCalcs := setupEmfCalculators() defer require.NoError(t, shutdownEmfCalculators(emfCalcs)) @@ -204,28 +202,32 @@ func TestAddToGroupedMetric(t *testing.T) { generateTestSumMetric("int-sum", intValueType), generateTestSumMetric("double-sum", doubleValueType), generateTestSummaryMetric("summary"), - // We do not expect these to be added to the grouped metric. Metrics with NaN values should be dropped. + // We do not expect these to be added to the grouped metric. Metrics with NaN or Inf values should be dropped. generateTestGaugeMetricNaN("double-gauge-nan"), generateTestExponentialHistogramMetricWithNaNs("expo-with-nan"), generateTestHistogramMetricWithNaNs("histo-with-nan"), generateTestSummaryMetricWithNaN("sum-with-nan"), + generateTestGaugeMetricInf("double-gauge-inf"), + generateTestExponentialHistogramMetricWithInfs("expo-with-inf"), + generateTestHistogramMetricWithInfs("histo-with-inf"), + generateTestSummaryMetricWithInf("sum-with-inf"), } finalOtelMetrics := generateOtelTestMetrics(generateMetrics...) rms := finalOtelMetrics.ResourceMetrics() ilms := rms.At(0).ScopeMetrics() metrics := ilms.At(0).Metrics() - require.Equal(t, 14, metrics.Len(), "mock metric creation failed") + // Verify if all metrics are generated, including NaN, Inf values + require.Equal(t, 19, metrics.Len(), "mock metric creation failed") for i := 0; i < metrics.Len(); i++ { err := addToGroupedMetric(metrics.At(i), groupedMetrics, generateTestMetricMetadata(namespace, timestamp, logGroup, logStreamName, instrumentationLibName, metrics.At(i).Type()), true, - logger, nil, testCfg, emfCalcs) - assert.Nil(t, err) + assert.NoError(t, err) } assert.Equal(t, 4, len(groupedMetrics)) @@ -272,11 +274,11 @@ func TestAddToGroupedMetric(t *testing.T) { err := addToGroupedMetric(metric, groupedMetrics, metricMetadata1, - true, logger, + true, nil, testCfg, emfCalcs) - assert.Nil(t, err) + assert.NoError(t, err) metricMetadata2 := generateTestMetricMetadata(namespace, timestamp, @@ -285,8 +287,8 @@ func TestAddToGroupedMetric(t *testing.T) { instrumentationLibName, metric.Type(), ) - err = addToGroupedMetric(metric, groupedMetrics, metricMetadata2, true, logger, nil, testCfg, emfCalcs) - assert.Nil(t, err) + err = addToGroupedMetric(metric, groupedMetrics, metricMetadata2, true, nil, testCfg, emfCalcs) + assert.NoError(t, err) assert.Len(t, groupedMetrics, 2) seenLogGroup1 := false @@ -333,18 +335,18 @@ func TestAddToGroupedMetric(t *testing.T) { assert.Equal(t, 2, metrics.Len()) obs, logs := observer.New(zap.WarnLevel) - obsLogger := zap.New(obs) + testCfg.logger = zap.New(obs) for i := 0; i < metrics.Len(); i++ { err := addToGroupedMetric(metrics.At(i), groupedMetrics, generateTestMetricMetadata(namespace, timestamp, logGroup, logStreamName, instrumentationLibName, metrics.At(i).Type()), - true, obsLogger, + true, nil, testCfg, emfCalcs, ) - assert.Nil(t, err) + assert.NoError(t, err) } assert.Equal(t, 1, len(groupedMetrics)) @@ -377,17 +379,16 @@ func TestAddToGroupedMetric(t *testing.T) { metric.SetUnit("Count") obs, logs := observer.New(zap.WarnLevel) - obsLogger := zap.New(obs) + testCfg.logger = zap.New(obs) err := addToGroupedMetric(metric, groupedMetrics, generateTestMetricMetadata(namespace, timestamp, logGroup, logStreamName, instrumentationLibName, pmetric.MetricTypeEmpty), true, - obsLogger, nil, testCfg, emfCalcs, ) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, 0, len(groupedMetrics)) // Test output warning logs @@ -455,14 +456,12 @@ func BenchmarkAddToGroupedMetric(b *testing.B) { metrics := rms.At(0).ScopeMetrics().At(0).Metrics() numMetrics := metrics.Len() - logger := zap.NewNop() - b.ResetTimer() for n := 0; n < b.N; n++ { groupedMetrics := make(map[any]*groupedMetric) for i := 0; i < numMetrics; i++ { metadata := generateTestMetricMetadata("namespace", int64(1596151098037), "log-group", "log-stream", "cloudwatch-otel", metrics.At(i).Type()) - err := addToGroupedMetric(metrics.At(i), groupedMetrics, metadata, true, logger, nil, testCfg, emfCalcs) + err := addToGroupedMetric(metrics.At(i), groupedMetrics, metadata, true, nil, testCfg, emfCalcs) assert.Nil(b, err) } } @@ -496,7 +495,7 @@ func TestTranslateUnit(t *testing.T) { "Bi": "Bits", } for input, output := range translateUnitCases { - t.Run(input, func(tt *testing.T) { + t.Run(input, func(_ *testing.T) { metric.SetUnit(input) v := translateUnit(metric, translator.metricDescriptor) diff --git a/exporter/awsemfexporter/internal/metadata/generated_status.go b/exporter/awsemfexporter/internal/metadata/generated_status.go index 4496ea408180..5d050d27619a 100644 --- a/exporter/awsemfexporter/internal/metadata/generated_status.go +++ b/exporter/awsemfexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("awsemf") ) const ( - Type = "awsemf" MetricsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/awsemf") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/awsemf") +} diff --git a/exporter/awsemfexporter/metadata.yaml b/exporter/awsemfexporter/metadata.yaml index 582e4087ead6..62292f087f17 100644 --- a/exporter/awsemfexporter/metadata.yaml +++ b/exporter/awsemfexporter/metadata.yaml @@ -1,9 +1,17 @@ type: awsemf +scope_name: otelcol/awsemf status: class: exporter stability: beta: [metrics] - distributions: [contrib, aws, observiq] + distributions: [contrib] codeowners: active: [Aneurysm9, shaochengwang, mxiamxia, bryan-aguilar] + +tests: + config: + region: 'us-west-2' + resource_to_telemetry_conversion: + enabled: true + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/awsemfexporter/metric_declaration_test.go b/exporter/awsemfexporter/metric_declaration_test.go index 78c6d11bff5e..00706b006a33 100644 --- a/exporter/awsemfexporter/metric_declaration_test.go +++ b/exporter/awsemfexporter/metric_declaration_test.go @@ -19,37 +19,37 @@ func TestLabelMatcherInit(t *testing.T) { Regex: ".+", } err := lm.init() - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, ";", lm.Separator) assert.Equal(t, ".+", lm.Regex) assert.NotNil(t, lm.compiledRegex) lm.Separator = "" err = lm.init() - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, ";", lm.Separator) lm.Separator = "," err = lm.init() - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, ",", lm.Separator) lm.Regex = "a*" err = lm.init() - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, "a*", lm.Regex) assert.NotNil(t, lm.compiledRegex) // Test error lm.Regex = "" err = lm.init() - assert.NotNil(t, err) + assert.Error(t, err) assert.EqualError(t, err, "regex not specified for label matcher") lm.LabelNames = []string{} lm.Regex = ".+" err = lm.init() - assert.NotNil(t, err) + assert.Error(t, err) assert.EqualError(t, err, "label matcher must have at least one label name specified") } @@ -104,7 +104,7 @@ func TestGetConcatenatedLabels(t *testing.T) { Regex: ".+", } err := lm.init() - assert.Nil(t, err) + assert.NoError(t, err) t.Run(tc.testName, func(t *testing.T) { concatenatedLabels := lm.getConcatenatedLabels(labels) assert.Equal(t, tc.expected, concatenatedLabels) @@ -210,7 +210,7 @@ func TestLabelMatcherMatches(t *testing.T) { for _, tc := range testCases { err := tc.labelMatcher.init() - assert.Nil(t, err) + assert.NoError(t, err) t.Run(tc.testName, func(t *testing.T) { matches := tc.labelMatcher.Matches(tc.labels) assert.Equal(t, tc.expected, matches) @@ -225,7 +225,7 @@ func TestMetricDeclarationInit(t *testing.T) { MetricNameSelectors: []string{"a", "b", "aa"}, } err := m.init(logger) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, 3, len(m.metricRegexList)) }) @@ -238,7 +238,7 @@ func TestMetricDeclarationInit(t *testing.T) { MetricNameSelectors: []string{"a.*", "b$", "aa+"}, } err := m.init(logger) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, 3, len(m.metricRegexList)) assert.Equal(t, 2, len(m.Dimensions)) }) @@ -255,7 +255,7 @@ func TestMetricDeclarationInit(t *testing.T) { obs, logs := observer.New(zap.WarnLevel) obsLogger := zap.New(obs) err := m.init(obsLogger) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, 3, len(m.metricRegexList)) assert.Equal(t, 1, len(m.Dimensions)) // Check logged warning message @@ -280,7 +280,7 @@ func TestMetricDeclarationInit(t *testing.T) { obs, logs := observer.New(zap.DebugLevel) obsLogger := zap.New(obs) err := m.init(obsLogger) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, 1, len(m.Dimensions)) assert.Equal(t, []string{"a", "b", "c"}, m.Dimensions[0]) // Check logged warning message @@ -302,7 +302,7 @@ func TestMetricDeclarationInit(t *testing.T) { t.Run("invalid metric declaration", func(t *testing.T) { m := &MetricDeclaration{} err := m.init(logger) - assert.NotNil(t, err) + assert.Error(t, err) assert.EqualError(t, err, "invalid metric declaration: no metric name selectors defined") }) @@ -323,7 +323,7 @@ func TestMetricDeclarationInit(t *testing.T) { }, } err := m.init(logger) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, 2, len(m.LabelMatchers)) assert.Equal(t, ";", m.LabelMatchers[0].Separator) assert.Equal(t, ".+", m.LabelMatchers[0].Regex) @@ -349,7 +349,7 @@ func TestMetricDeclarationInit(t *testing.T) { }, } err := m.init(logger) - assert.NotNil(t, err) + assert.Error(t, err) assert.EqualError(t, err, "label matcher must have at least one label name specified") m = &MetricDeclaration{ @@ -361,7 +361,7 @@ func TestMetricDeclarationInit(t *testing.T) { }, } err = m.init(logger) - assert.NotNil(t, err) + assert.Error(t, err) assert.EqualError(t, err, "regex not specified for label matcher") }) } @@ -372,7 +372,7 @@ func TestMetricDeclarationMatchesName(t *testing.T) { } logger := zap.NewNop() err := m.init(logger) - assert.Nil(t, err) + assert.NoError(t, err) assert.True(t, m.MatchesName("a")) assert.True(t, m.MatchesName("aa")) @@ -497,7 +497,7 @@ func TestMetricDeclarationMatchesLabels(t *testing.T) { } t.Run(tc.testName, func(t *testing.T) { err := m.init(logger) - assert.Nil(t, err) + assert.NoError(t, err) matches := m.MatchesLabels(labels) assert.Equal(t, tc.expected, matches) }) @@ -580,7 +580,7 @@ func TestExtractDimensions(t *testing.T) { } t.Run(tc.testName, func(t *testing.T) { err := m.init(logger) - assert.Nil(t, err) + assert.NoError(t, err) dimensions := m.ExtractDimensions(tc.labels) assert.Equal(t, tc.extractedDimensions, dimensions) }) diff --git a/exporter/awsemfexporter/metric_translator.go b/exporter/awsemfexporter/metric_translator.go index f432a07dcaa3..19415b46113b 100644 --- a/exporter/awsemfexporter/metric_translator.go +++ b/exporter/awsemfexporter/metric_translator.go @@ -160,7 +160,7 @@ func (mt metricTranslator) translateOTelToGroupedMetric(rm pmetric.ResourceMetri instrumentationScopeName: instrumentationScopeName, receiver: metricReceiver, } - err := addToGroupedMetric(metric, groupedMetrics, metadata, patternReplaceSucceeded, config.logger, mt.metricDescriptor, config, mt.calculators) + err := addToGroupedMetric(metric, groupedMetrics, metadata, patternReplaceSucceeded, mt.metricDescriptor, config, mt.calculators) if err != nil { return err } diff --git a/exporter/awsemfexporter/metric_translator_test.go b/exporter/awsemfexporter/metric_translator_test.go index 852ccdcc54d5..3c893c07e0ba 100644 --- a/exporter/awsemfexporter/metric_translator_test.go +++ b/exporter/awsemfexporter/metric_translator_test.go @@ -412,7 +412,7 @@ func TestTranslateOtToGroupedMetric(t *testing.T) { t.Run(tc.testName, func(t *testing.T) { groupedMetrics := make(map[any]*groupedMetric) err := translator.translateOTelToGroupedMetric(tc.metric, groupedMetrics, config) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, groupedMetrics) assert.Equal(t, defaultNumberOfTestMetrics, len(groupedMetrics)) @@ -453,7 +453,7 @@ func TestTranslateOtToGroupedMetric(t *testing.T) { rm.Resource().Attributes().PutStr(occonventions.AttributeExporterVersion, "SomeVersion") groupedMetrics := make(map[any]*groupedMetric) err := translator.translateOTelToGroupedMetric(rm, groupedMetrics, config) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, 0, len(groupedMetrics)) }) } @@ -996,7 +996,7 @@ func TestTranslateGroupedMetricToCWMetric(t *testing.T) { } for _, decl := range tc.metricDeclarations { err := decl.init(logger) - assert.Nil(t, err) + assert.NoError(t, err) } cWMetric := translateGroupedMetricToCWMetric(tc.groupedMetric, config) assert.NotNil(t, cWMetric) @@ -1640,7 +1640,7 @@ func TestGroupedMetricToCWMeasurementsWithFilters(t *testing.T) { } for _, decl := range tc.metricDeclarations { err := decl.init(logger) - assert.Nil(t, err) + assert.NoError(t, err) } cWMeasurements := groupedMetricToCWMeasurementsWithFilters(groupedMetric, config) @@ -1685,7 +1685,7 @@ func TestGroupedMetricToCWMeasurementsWithFilters(t *testing.T) { } for _, decl := range metricDeclarations { err := decl.init(zap.NewNop()) - assert.Nil(t, err) + assert.NoError(t, err) } obs, logs := observer.New(zap.DebugLevel) logger := zap.New(obs) @@ -1750,7 +1750,7 @@ func TestGroupedMetricToCWMeasurementsWithFilters(t *testing.T) { } for _, decl := range metricDeclarations { err := decl.init(zap.NewNop()) - assert.Nil(t, err) + assert.NoError(t, err) } obs, logs := observer.New(zap.DebugLevel) logger := zap.New(obs) @@ -2165,7 +2165,7 @@ func TestGroupedMetricToCWMeasurementsWithFilters(t *testing.T) { } for _, decl := range tc.metricDeclarations { err := decl.init(zap.NewNop()) - assert.Nil(t, err) + assert.NoError(t, err) } config := &Config{ DimensionRollupOption: tc.dimensionRollupOption, @@ -2550,7 +2550,7 @@ func TestTranslateOtToGroupedMetricForLogGroupAndStream(t *testing.T) { rm := test.inputMetrics.ResourceMetrics().At(0) err := translator.translateOTelToGroupedMetric(rm, groupedMetrics, config) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, groupedMetrics) assert.Equal(t, 1, len(groupedMetrics)) @@ -2581,7 +2581,7 @@ func TestTranslateOtToGroupedMetricForInitialDeltaValue(t *testing.T) { rm := test.inputMetrics.ResourceMetrics().At(0) err := translator.translateOTelToGroupedMetric(rm, groupedMetrics, config) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, groupedMetrics) assert.Equal(t, 1, len(groupedMetrics)) diff --git a/exporter/awskinesisexporter/README.md b/exporter/awskinesisexporter/README.md index cea253290ec0..a6e873e2e7d9 100644 --- a/exporter/awskinesisexporter/README.md +++ b/exporter/awskinesisexporter/README.md @@ -4,13 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces, metrics, logs | -| Distributions | [contrib], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fawskinesis%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fawskinesis) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fawskinesis%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fawskinesis) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@MovieStoreGuy](https://www.github.com/MovieStoreGuy) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector The kinesis exporter currently exports dynamic encodings to the configured kinesis stream. diff --git a/exporter/awskinesisexporter/config.go b/exporter/awskinesisexporter/config.go index c58ee025a584..b4aded26792a 100644 --- a/exporter/awskinesisexporter/config.go +++ b/exporter/awskinesisexporter/config.go @@ -7,6 +7,7 @@ import ( "fmt" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -27,7 +28,7 @@ type Encoding struct { type Config struct { exporterhelper.TimeoutSettings `mapstructure:",squash"` exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` Encoding `mapstructure:"encoding"` AWS AWSConfig `mapstructure:"aws"` diff --git a/exporter/awskinesisexporter/config_test.go b/exporter/awskinesisexporter/config_test.go index 37f0001d63ef..bc5d78ece97b 100644 --- a/exporter/awskinesisexporter/config_test.go +++ b/exporter/awskinesisexporter/config_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -34,7 +35,7 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, "default"), expected: &Config{ QueueSettings: exporterhelper.NewDefaultQueueSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), Encoding: Encoding{ Name: "otlp", @@ -50,7 +51,7 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, ""), expected: &Config{ - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: false, MaxInterval: 30 * time.Second, InitialInterval: 5 * time.Second, diff --git a/exporter/awskinesisexporter/factory.go b/exporter/awskinesisexporter/factory.go index 47fc792b008d..d4d0a4c48dc2 100644 --- a/exporter/awskinesisexporter/factory.go +++ b/exporter/awskinesisexporter/factory.go @@ -9,6 +9,7 @@ import ( "context" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -35,7 +36,7 @@ func NewFactory() exporter.Factory { func createDefaultConfig() component.Config { return &Config{ TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), Encoding: Encoding{ Name: defaultEncoding, @@ -62,7 +63,7 @@ func newTracesExporter(ctx context.Context, params exporter.CreateSettings, conf exp.consumeTraces, exporterhelper.WithStart(exp.start), exporterhelper.WithTimeout(c.TimeoutSettings), - exporterhelper.WithRetry(c.RetrySettings), + exporterhelper.WithRetry(c.BackOffConfig), exporterhelper.WithQueue(c.QueueSettings), ) } @@ -80,7 +81,7 @@ func newMetricsExporter(ctx context.Context, params exporter.CreateSettings, con exp.consumeMetrics, exporterhelper.WithStart(exp.start), exporterhelper.WithTimeout(c.TimeoutSettings), - exporterhelper.WithRetry(c.RetrySettings), + exporterhelper.WithRetry(c.BackOffConfig), exporterhelper.WithQueue(c.QueueSettings), ) } @@ -98,7 +99,7 @@ func newLogsExporter(ctx context.Context, params exporter.CreateSettings, conf c exp.consumeLogs, exporterhelper.WithStart(exp.start), exporterhelper.WithTimeout(c.TimeoutSettings), - exporterhelper.WithRetry(c.RetrySettings), + exporterhelper.WithRetry(c.BackOffConfig), exporterhelper.WithQueue(c.QueueSettings), ) } diff --git a/exporter/awskinesisexporter/generated_component_test.go b/exporter/awskinesisexporter/generated_component_test.go new file mode 100644 index 000000000000..597a3eb9754f --- /dev/null +++ b/exporter/awskinesisexporter/generated_component_test.go @@ -0,0 +1,101 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package awskinesisexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/awskinesisexporter/go.mod b/exporter/awskinesisexporter/go.mod index 74813841f3de..5aaa4011dffb 100644 --- a/exporter/awskinesisexporter/go.mod +++ b/exporter/awskinesisexporter/go.mod @@ -1,75 +1,83 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter -go 1.20 +go 1.21 require ( - github.com/aws/aws-sdk-go-v2 v1.22.2 - github.com/aws/aws-sdk-go-v2/config v1.24.0 - github.com/aws/aws-sdk-go-v2/credentials v1.15.2 - github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.1 - github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 - github.com/cenkalti/backoff/v4 v4.2.1 + github.com/aws/aws-sdk-go-v2 v1.26.1 + github.com/aws/aws-sdk-go-v2/config v1.27.11 + github.com/aws/aws-sdk-go-v2/credentials v1.17.11 + github.com/aws/aws-sdk-go-v2/service/kinesis v1.27.4 + github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 + github.com/cenkalti/backoff/v4 v4.3.0 github.com/gogo/protobuf v1.3.2 - github.com/google/uuid v1.4.0 - github.com/jaegertracing/jaeger v1.48.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/google/uuid v1.6.0 + github.com/jaegertracing/jaeger v1.55.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 ) require ( github.com/apache/thrift v0.19.0 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1 // indirect - github.com/aws/smithy-go v1.16.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect + github.com/aws/smithy-go v1.20.2 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect github.com/jmespath/go-jmespath v0.4.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect github.com/openzipkin/zipkin-go v0.4.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/atomic v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/awskinesisexporter/go.sum b/exporter/awskinesisexporter/go.sum index 44e06bd0f779..a76c4a0c5972 100644 --- a/exporter/awskinesisexporter/go.sum +++ b/exporter/awskinesisexporter/go.sum @@ -1,90 +1,65 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= -github.com/aws/aws-sdk-go-v2 v1.22.2 h1:lV0U8fnhAnPz8YcdmZVV60+tr6CakHzqA6P8T46ExJI= -github.com/aws/aws-sdk-go-v2 v1.22.2/go.mod h1:Kd0OJtkW3Q0M0lUWGszapWjEvrXDzRW+D21JNsroB+c= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 h1:hHgLiIrTRtddC0AKcJr5s7i/hLgcpTt+q/FKxf1Zayk= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0/go.mod h1:w4I/v3NOWgD+qvs1NPEwhd++1h3XPHFaVxasfY6HlYQ= -github.com/aws/aws-sdk-go-v2/config v1.24.0 h1:4LEk29JO3w+y9dEo/5Tq5QTP7uIEw+KQrKiHOs4xlu4= -github.com/aws/aws-sdk-go-v2/config v1.24.0/go.mod h1:11nNDAuK86kOUHeuEQo8f3CkcV5xuUxvPwFjTZE/PnQ= -github.com/aws/aws-sdk-go-v2/credentials v1.15.2 h1:rKH7khRMxPdD0u3dHecd0Q7NOVw3EUe7AqdkUOkiOGI= -github.com/aws/aws-sdk-go-v2/credentials v1.15.2/go.mod h1:tXM8wmaeAhfC7nZoCxb0FzM/aRaB1m1WQ7x0qlBLq80= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3 h1:G5KawTAkyHH6WyKQCdHiW4h3PmAXNJpOgwKg3H7sDRE= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3/go.mod h1:hugKmSFnZB+HgNI1sYGT14BUPZkO6alC/e0AWu+0IAQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2 h1:AaQsr5vvGR7rmeSWBtTCcw16tT9r51mWijuCQhzLnq8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2/go.mod h1:o1IiRn7CWocIFTXJjGKJDOwxv1ibL53NpcvcqGWyRBA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 h1:UZx8SXZ0YtzRiALzYAWcjb9Y9hZUR7MBKaBQ5ouOjPs= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2/go.mod h1:ipuRpcSaklmxR6C39G187TpBAO132gUfleTGccUPs8c= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0 h1:usgqiJtamuGIBj+OvYmMq89+Z1hIKkMJToz1WpoeNUY= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 h1:h7j73yuAVVjic8pqswh+L/7r2IHP43QwRyOu6zcCDDE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2/go.mod h1:H07AHdK5LSy8F7EJUQhoxyiCNkePoHj2D8P2yGTWafo= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.1 h1:wLRIuz/llNgtN1OvZDmSotR+hjIXSxbxX/3Nw9ViaRg= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.1/go.mod h1:tMRFyoPjrh0oGqCKQHOf1EkxVzLynY/uQk2pejYVrzk= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.1 h1:km+ZNjtLtpXYf42RdaDZnNHm9s7SYAuDGTafy6nd89A= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.1/go.mod h1:aHBr3pvBSD5MbzOvQtYutyPLLRPbl/y9x86XyJJnUXQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1 h1:iRFNqZH4a67IqPvK8xxtyQYnyrlsvwmpHOe9r55ggBA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1/go.mod h1:pTy5WM+6sNv2tB24JNKFtn6EvciQ5k40ZJ0pq/Iaxj0= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 h1:txgVXIXWPXyqdiVn92BV6a/rgtpX31HYdsOYj0sVQQQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.1/go.mod h1:VAiJiNaoP1L89STFlEMgmHX1bKixY+FaP+TpRFrmyZ4= -github.com/aws/smithy-go v1.16.0 h1:gJZEH/Fqh+RsvlJ1Zt4tVAtV6bKkp3cC+R6FCZMNzik= -github.com/aws/smithy-go v1.16.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA= +github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= +github.com/aws/aws-sdk-go-v2/config v1.27.11 h1:f47rANd2LQEYHda2ddSCKYId18/8BhSRM4BULGmfgNA= +github.com/aws/aws-sdk-go-v2/config v1.27.11/go.mod h1:SMsV78RIOYdve1vf36z8LmnszlRWkwMQtomCAI0/mIE= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11 h1:YuIB1dJNf1Re822rriUOTxopaHHvIq0l/pX3fwO+Tzs= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6EKL+NcD7LG3dpKGMV4SShgo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.27.4 h1:Oe8awBiS/iitcsRJB5+DHa3iCxoA0KwJJf0JNrYMINY= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.27.4/go.mod h1:RCZCSFbieSgNG1RKegO26opXV4EXyef/vNBVJsUyHuw= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= +github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= +github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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 v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/jaegertracing/jaeger v1.48.0 h1:YuKooQ7qJsjgxws9xuf8C/BLNTPx8qTAJz4wv7IHhSc= -github.com/jaegertracing/jaeger v1.48.0/go.mod h1:BoAPkdCAIEuLsVz/EDhjXd+GSVpHtJhiGqWoFEvBCKg= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= 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= @@ -97,16 +72,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -114,115 +87,93 @@ 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/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDOCg/jA= github.com/openzipkin/zipkin-go v0.4.2/go.mod h1:ZeVkFjuuBiSy13y8vpSDCjMi9GoI3hPpCJSBx/EYFhY= -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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= +github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +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/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= 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.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/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -230,39 +181,19 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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/exporter/awskinesisexporter/internal/batch/batch.go b/exporter/awskinesisexporter/internal/batch/batch.go index ee2c35401d04..9aab615793cc 100644 --- a/exporter/awskinesisexporter/internal/batch/batch.go +++ b/exporter/awskinesisexporter/internal/batch/batch.go @@ -67,7 +67,7 @@ func New(opts ...Option) *Batch { maxBatchSize: MaxBatchedRecords, maxRecordSize: MaxRecordSize, compression: compress.NewNoopCompressor(), - records: make([]types.PutRecordsRequestEntry, 0, MaxRecordSize), + records: make([]types.PutRecordsRequestEntry, 0, MaxBatchedRecords), } for _, op := range opts { diff --git a/exporter/awskinesisexporter/internal/batch/batch_max_records_test.go b/exporter/awskinesisexporter/internal/batch/batch_max_records_test.go new file mode 100644 index 000000000000..fb4215117448 --- /dev/null +++ b/exporter/awskinesisexporter/internal/batch/batch_max_records_test.go @@ -0,0 +1,18 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package batch + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestBatchRecordsCapacity(t *testing.T) { + t.Parallel() + + b := New() + + assert.Equal(t, MaxBatchedRecords, cap(b.records), "Must have correct value set") +} diff --git a/exporter/awskinesisexporter/internal/batch/package_test.go b/exporter/awskinesisexporter/internal/batch/package_test.go new file mode 100644 index 000000000000..89fc4ed7891f --- /dev/null +++ b/exporter/awskinesisexporter/internal/batch/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package batch + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/awskinesisexporter/internal/compress/compresser.go b/exporter/awskinesisexporter/internal/compress/compresser.go index f3060253678f..9197d19e3556 100644 --- a/exporter/awskinesisexporter/internal/compress/compresser.go +++ b/exporter/awskinesisexporter/internal/compress/compresser.go @@ -16,6 +16,7 @@ type bufferedResetWriter interface { Write(p []byte) (int, error) Flush() error Reset(newWriter io.Writer) + Close() error } type Compressor interface { @@ -74,5 +75,11 @@ func (c *compressor) Do(in []byte) ([]byte, error) { return nil, err } + if closer, ok := c.compression.(io.Closer); ok { + if err := closer.Close(); err != nil { + return nil, err + } + } + return buf.Bytes(), nil } diff --git a/exporter/awskinesisexporter/internal/compress/noop_compression.go b/exporter/awskinesisexporter/internal/compress/noop_compression.go index 0c8abf17b329..be594b6214f1 100644 --- a/exporter/awskinesisexporter/internal/compress/noop_compression.go +++ b/exporter/awskinesisexporter/internal/compress/noop_compression.go @@ -26,3 +26,5 @@ func (n noop) Write(p []byte) (int, error) { func (n noop) Flush() error { return nil } + +func (n *noop) Close() error { return nil } diff --git a/exporter/awskinesisexporter/internal/compress/package_test.go b/exporter/awskinesisexporter/internal/compress/package_test.go new file mode 100644 index 000000000000..0f565f12cfbf --- /dev/null +++ b/exporter/awskinesisexporter/internal/compress/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package compress + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/awskinesisexporter/internal/key/package_test.go b/exporter/awskinesisexporter/internal/key/package_test.go new file mode 100644 index 000000000000..9b314959f169 --- /dev/null +++ b/exporter/awskinesisexporter/internal/key/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package key + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/awskinesisexporter/internal/metadata/generated_status.go b/exporter/awskinesisexporter/internal/metadata/generated_status.go index 3f8213f8f2cf..72c8f97afd97 100644 --- a/exporter/awskinesisexporter/internal/metadata/generated_status.go +++ b/exporter/awskinesisexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("awskinesis") ) const ( - Type = "awskinesis" TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/awskinesis") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/awskinesis") +} diff --git a/exporter/awskinesisexporter/internal/producer/package_test.go b/exporter/awskinesisexporter/internal/producer/package_test.go new file mode 100644 index 000000000000..be7a4a5eaf8a --- /dev/null +++ b/exporter/awskinesisexporter/internal/producer/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package producer + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/awskinesisexporter/metadata.yaml b/exporter/awskinesisexporter/metadata.yaml index c35b07494fc0..2efe3f753cf1 100644 --- a/exporter/awskinesisexporter/metadata.yaml +++ b/exporter/awskinesisexporter/metadata.yaml @@ -1,9 +1,15 @@ type: awskinesis +scope_name: otelcol/awskinesis status: class: exporter stability: beta: [traces, metrics, logs] - distributions: [contrib, observiq] + distributions: [contrib] codeowners: active: [Aneurysm9, MovieStoreGuy] + +# TODO: Update the exporter to pass the tests +tests: + skip_lifecycle: true + diff --git a/exporter/awskinesisexporter/package_test.go b/exporter/awskinesisexporter/package_test.go new file mode 100644 index 000000000000..fb24f8d2fb50 --- /dev/null +++ b/exporter/awskinesisexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package awskinesisexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/awss3exporter/README.md b/exporter/awss3exporter/README.md index 1fad6621f116..ba2f1b8cbf92 100644 --- a/exporter/awss3exporter/README.md +++ b/exporter/awss3exporter/README.md @@ -4,14 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [alpha]: traces, metrics, logs | -| Distributions | [contrib], [observiq], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fawss3%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fawss3) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fawss3%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fawss3) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@atoulme](https://www.github.com/atoulme), [@pdelewski](https://www.github.com/pdelewski) | [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector ## Schema supported @@ -19,26 +17,44 @@ This exporter targets to support proto/json format. ## Exporter Configuration -The following exporter configuration parameters are supported. - -| Name | Description | Default | -|:---------------|:-----------------------------------------------------------------------------------------------------|-------------| -| `region` | AWS region. | "us-east-1" | -| `s3_bucket` | S3 bucket | | -| `s3_prefix` | prefix for the S3 key (root directory inside bucket). | | -| `s3_partition` | time granularity of S3 key: hour or minute | "minute" | -| `role_arn` | the Role ARN to be assumed | | -| `file_prefix` | file prefix defined by user | | -| `marshaler` | marshaler used to produce output data | `otlp_json` | -| `endpoint` | overrides the endpoint used by the exporter instead of constructing it from `region` and `s3_bucket` | | +The following exporter configuration parameters are supported. + +| Name | Description | Default | +|:----------------------|:-------------------------------------------------------------------------------------------------------------------------------------------|-------------| +| `region` | AWS region. | "us-east-1" | +| `s3_bucket` | S3 bucket | | +| `s3_prefix` | prefix for the S3 key (root directory inside bucket). | | +| `s3_partition` | time granularity of S3 key: hour or minute | "minute" | +| `role_arn` | the Role ARN to be assumed | | +| `file_prefix` | file prefix defined by user | | +| `marshaler` | marshaler used to produce output data | `otlp_json` | +| `encoding` | Encoding extension to use to marshal data. Overrides the `marshaler` configuration option if set. | | +| `encoding_file_extension` | file format extension suffix when using the `encoding` configuration option. May be left empty for no suffix to be appended. | | +| `endpoint` | overrides the endpoint used by the exporter instead of constructing it from `region` and `s3_bucket` | | +| `s3_force_path_style` | [set this to `true` to force the request to use path-style addressing](http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html) | false | +| `disable_ssl` | set this to `true` to disable SSL when sending requests | false | +| `compression` | should the file be compressed | none | ### Marshaler Marshaler determines the format of data sent to AWS S3. Currently, the following marshalers are implemented: - `otlp_json` (default): the [OpenTelemetry Protocol format](https://github.com/open-telemetry/opentelemetry-proto), represented as json. +- `otlp_proto`: the [OpenTelemetry Protocol format](https://github.com/open-telemetry/opentelemetry-proto), represented as Protocol Buffers. A single protobuf message is written into each object. - `sumo_ic`: the [Sumo Logic Installed Collector Archive format](https://help.sumologic.com/docs/manage/data-archiving/archive/). **This format is supported only for logs.** +- `body`: export the log body as string. + **This format is supported only for logs.** + +### Encoding + +Encoding overrides marshaler if present and sets to use an encoding extension defined in the collector configuration. + +See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/encoding. + +### Compression +- `none` (default): No compression will be applied +- `gzip`: Files will be compressed with gzip. **This does not support `sumo_ic`marshaler.** # Example Configuration @@ -67,3 +83,13 @@ This exporter follows default credential resolution for the Follow the [guidelines](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html) for the credential configuration. + +### OpenTelemetry Collector Helm Chart for Kubernetes +For example, when using OpenTelemetry Collector Helm Chart you could use `extraEnvs` in the values.yaml. +```yaml +extraEnvs: +- name: AWS_ACCESS_KEY_ID + value: "< YOUR AWS ACCESS KEY >" +- name: AWS_SECRET_ACCESS_KEY + value: "< YOUR AWS SECRET ACCESS KEY >" +``` diff --git a/exporter/awss3exporter/body_marshaler.go b/exporter/awss3exporter/body_marshaler.go new file mode 100644 index 000000000000..b526c3ea4e6e --- /dev/null +++ b/exporter/awss3exporter/body_marshaler.go @@ -0,0 +1,52 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package awss3exporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter" + +import ( + "bytes" + "fmt" + + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +type bodyMarshaler struct{} + +func (*bodyMarshaler) format() string { + return "txt" +} + +func newbodyMarshaler() bodyMarshaler { + return bodyMarshaler{} +} + +func (bodyMarshaler) MarshalLogs(ld plog.Logs) ([]byte, error) { + buf := bytes.Buffer{} + rls := ld.ResourceLogs() + for i := 0; i < rls.Len(); i++ { + rl := rls.At(i) + + ills := rl.ScopeLogs() + for j := 0; j < ills.Len(); j++ { + ils := ills.At(j) + logs := ils.LogRecords() + for k := 0; k < logs.Len(); k++ { + lr := logs.At(k) + body := lr.Body() + buf.WriteString(body.AsString()) + buf.WriteString("\n") + } + } + } + return buf.Bytes(), nil +} + +func (s bodyMarshaler) MarshalTraces(_ ptrace.Traces) ([]byte, error) { + return nil, fmt.Errorf("traces can't be marshaled into %s format", s.format()) +} + +func (s bodyMarshaler) MarshalMetrics(_ pmetric.Metrics) ([]byte, error) { + return nil, fmt.Errorf("metrics can't be marshaled into %s format", s.format()) +} diff --git a/exporter/awss3exporter/body_marshaler_test.go b/exporter/awss3exporter/body_marshaler_test.go new file mode 100644 index 000000000000..0363e20722a2 --- /dev/null +++ b/exporter/awss3exporter/body_marshaler_test.go @@ -0,0 +1,81 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package awss3exporter + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" +) + +func TestBodyMarshalerWithBooleanType(t *testing.T) { + logs := plog.NewLogs() + rls := logs.ResourceLogs().AppendEmpty() + sl := rls.ScopeLogs().AppendEmpty() + + const recordNum = 0 + ts := pcommon.Timestamp(int64(recordNum) * time.Millisecond.Nanoseconds()) + logRecord := sl.LogRecords().AppendEmpty() + logRecord.SetTimestamp(ts) + + // Boolean + logRecord.Body().SetBool(true) + + marshaler := &bodyMarshaler{} + require.NotNil(t, marshaler) + body, err := marshaler.MarshalLogs(logs) + assert.NoError(t, err) + assert.Equal(t, body, []byte("true\n")) +} + +func TestBodyMarshalerWithNumberType(t *testing.T) { + logs := plog.NewLogs() + rls := logs.ResourceLogs().AppendEmpty() + sl := rls.ScopeLogs().AppendEmpty() + + const recordNum = 0 + ts := pcommon.Timestamp(int64(recordNum) * time.Millisecond.Nanoseconds()) + logRecord := sl.LogRecords().AppendEmpty() + logRecord.SetTimestamp(ts) + + // Number + logRecord.Body().SetDouble(0.05) + + marshaler := &bodyMarshaler{} + require.NotNil(t, marshaler) + body, err := marshaler.MarshalLogs(logs) + assert.NoError(t, err) + assert.Equal(t, body, []byte("0.05\n")) +} + +func TestBodyMarshalerWithMapType(t *testing.T) { + logs := plog.NewLogs() + rls := logs.ResourceLogs().AppendEmpty() + sl := rls.ScopeLogs().AppendEmpty() + + const recordNum = 0 + ts := pcommon.Timestamp(int64(recordNum) * time.Millisecond.Nanoseconds()) + logRecord := sl.LogRecords().AppendEmpty() + logRecord.SetTimestamp(ts) + + // Map + m := logRecord.Body().SetEmptyMap() + m.PutStr("foo", "foo") + m.PutStr("bar", "bar") + m.PutBool("foobar", false) + m.PutDouble("foobardouble", 0.006) + m.PutInt("foobarint", 1) + + var expect = `{"bar":"bar","foo":"foo","foobar":false,"foobardouble":0.006,"foobarint":1}` + + marshaler := &bodyMarshaler{} + require.NotNil(t, marshaler) + body, err := marshaler.MarshalLogs(logs) + assert.NoError(t, err) + assert.Equal(t, body, []byte(expect+"\n")) +} diff --git a/exporter/awss3exporter/config.go b/exporter/awss3exporter/config.go index d63631a98e7e..276d73f357b1 100644 --- a/exporter/awss3exporter/config.go +++ b/exporter/awss3exporter/config.go @@ -6,26 +6,33 @@ package awss3exporter // import "github.com/open-telemetry/opentelemetry-collect import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configcompression" "go.uber.org/multierr" ) // S3UploaderConfig contains aws s3 uploader related config to controls things // like bucket, prefix, batching, connections, retries, etc. type S3UploaderConfig struct { - Region string `mapstructure:"region"` - S3Bucket string `mapstructure:"s3_bucket"` - S3Prefix string `mapstructure:"s3_prefix"` - S3Partition string `mapstructure:"s3_partition"` - FilePrefix string `mapstructure:"file_prefix"` - Endpoint string `mapstructure:"endpoint"` - RoleArn string `mapstructure:"role_arn"` + Region string `mapstructure:"region"` + S3Bucket string `mapstructure:"s3_bucket"` + S3Prefix string `mapstructure:"s3_prefix"` + S3Partition string `mapstructure:"s3_partition"` + FilePrefix string `mapstructure:"file_prefix"` + Endpoint string `mapstructure:"endpoint"` + RoleArn string `mapstructure:"role_arn"` + S3ForcePathStyle bool `mapstructure:"s3_force_path_style"` + DisableSSL bool `mapstructure:"disable_ssl"` + Compression configcompression.Type `mapstructure:"compression"` } type MarshalerType string const ( - OtlpJSON MarshalerType = "otlp_json" - SumoIC MarshalerType = "sumo_ic" + OtlpProtobuf MarshalerType = "otlp_proto" + OtlpJSON MarshalerType = "otlp_json" + SumoIC MarshalerType = "sumo_ic" + Body MarshalerType = "body" ) // Config contains the main configuration options for the s3 exporter @@ -33,7 +40,9 @@ type Config struct { S3Uploader S3UploaderConfig `mapstructure:"s3uploader"` MarshalerName MarshalerType `mapstructure:"marshaler"` - FileFormat string `mapstructure:"file_format"` + // Encoding to apply. If present, overrides the marshaler configuration option. + Encoding *component.ID `mapstructure:"encoding"` + EncodingFileExtension string `mapstructure:"encoding_file_extension"` } func (c *Config) Validate() error { @@ -44,5 +53,15 @@ func (c *Config) Validate() error { if c.S3Uploader.S3Bucket == "" { errs = multierr.Append(errs, errors.New("bucket is required")) } + compression := c.S3Uploader.Compression + if compression.IsCompressed() { + if compression != configcompression.TypeGzip { + errs = multierr.Append(errs, errors.New("unknown compression type")) + } + + if c.MarshalerName == SumoIC { + errs = multierr.Append(errs, errors.New("marshaler does not support compression")) + } + } return errs } diff --git a/exporter/awss3exporter/config_test.go b/exporter/awss3exporter/config_test.go index b4d9013ab0e0..8638aa27076b 100644 --- a/exporter/awss3exporter/config_test.go +++ b/exporter/awss3exporter/config_test.go @@ -13,6 +13,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/otelcol/otelcoltest" "go.uber.org/multierr" + + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter/internal/metadata" ) func TestLoadConfig(t *testing.T) { @@ -20,15 +22,18 @@ func TestLoadConfig(t *testing.T) { assert.NoError(t, err) factory := NewFactory() - factories.Exporters["awss3"] = factory + factories.Exporters[metadata.Type] = factory cfg, err := otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "default.yaml"), factories) require.NoError(t, err) require.NotNil(t, cfg) - e := cfg.Exporters[component.NewID("awss3")].(*Config) + e := cfg.Exporters[component.MustNewID("awss3")].(*Config) + encoding := component.MustNewIDWithName("foo", "bar") assert.Equal(t, e, &Config{ + Encoding: &encoding, + EncodingFileExtension: "baz", S3Uploader: S3UploaderConfig{ Region: "us-east-1", S3Bucket: "foo", @@ -41,7 +46,7 @@ func TestLoadConfig(t *testing.T) { func TestConfig(t *testing.T) { factories, err := otelcoltest.NopFactories() - assert.Nil(t, err) + assert.NoError(t, err) factory := NewFactory() factories.Exporters[factory.Type()] = factory @@ -51,7 +56,7 @@ func TestConfig(t *testing.T) { require.NoError(t, err) require.NotNil(t, cfg) - e := cfg.Exporters[component.NewID("awss3")].(*Config) + e := cfg.Exporters[component.MustNewID("awss3")].(*Config) assert.Equal(t, e, &Config{ @@ -67,6 +72,36 @@ func TestConfig(t *testing.T) { ) } +func TestConfigForS3CompatibleSystems(t *testing.T) { + factories, err := otelcoltest.NopFactories() + assert.NoError(t, err) + + factory := NewFactory() + factories.Exporters[factory.Type()] = factory + cfg, err := otelcoltest.LoadConfigAndValidate( + filepath.Join("testdata", "config-s3-compatible-systems.yaml"), factories) + + require.NoError(t, err) + require.NotNil(t, cfg) + + e := cfg.Exporters[component.MustNewID("awss3")].(*Config) + + assert.Equal(t, e, + &Config{ + S3Uploader: S3UploaderConfig{ + Region: "us-east-1", + S3Bucket: "foo", + S3Prefix: "bar", + S3Partition: "minute", + Endpoint: "alternative-s3-system.example.com", + S3ForcePathStyle: true, + DisableSSL: true, + }, + MarshalerName: "otlp_json", + }, + ) +} + func TestConfig_Validate(t *testing.T) { tests := []struct { name string @@ -127,7 +162,7 @@ func TestConfig_Validate(t *testing.T) { func TestMarshallerName(t *testing.T) { factories, err := otelcoltest.NopFactories() - assert.Nil(t, err) + assert.NoError(t, err) factory := NewFactory() factories.Exporters[factory.Type()] = factory @@ -137,7 +172,7 @@ func TestMarshallerName(t *testing.T) { require.NoError(t, err) require.NotNil(t, cfg) - e := cfg.Exporters[component.NewID("awss3")].(*Config) + e := cfg.Exporters[component.MustNewID("awss3")].(*Config) assert.Equal(t, e, &Config{ @@ -149,4 +184,60 @@ func TestMarshallerName(t *testing.T) { MarshalerName: "sumo_ic", }, ) + + e = cfg.Exporters[component.MustNewIDWithName("awss3", "proto")].(*Config) + + assert.Equal(t, e, + &Config{ + S3Uploader: S3UploaderConfig{ + Region: "us-east-1", + S3Bucket: "bar", + S3Partition: "minute", + }, + MarshalerName: "otlp_proto", + }, + ) + +} + +func TestCompressionName(t *testing.T) { + factories, err := otelcoltest.NopFactories() + assert.NoError(t, err) + + factory := NewFactory() + factories.Exporters[factory.Type()] = factory + cfg, err := otelcoltest.LoadConfigAndValidate( + filepath.Join("testdata", "compression.yaml"), factories) + + require.NoError(t, err) + require.NotNil(t, cfg) + + e := cfg.Exporters[component.MustNewID("awss3")].(*Config) + + assert.Equal(t, e, + &Config{ + S3Uploader: S3UploaderConfig{ + Region: "us-east-1", + S3Bucket: "foo", + S3Partition: "minute", + Compression: "gzip", + }, + MarshalerName: "otlp_json", + }, + ) + + e = cfg.Exporters[component.MustNewIDWithName("awss3", "proto")].(*Config) + + assert.Equal(t, e, + &Config{ + S3Uploader: S3UploaderConfig{ + Region: "us-east-1", + S3Bucket: "bar", + S3Partition: "minute", + Compression: "none", + }, + MarshalerName: "otlp_proto", + }, + ) + } diff --git a/exporter/awss3exporter/exporter.go b/exporter/awss3exporter/exporter.go index 6f86d185e19a..f4524ee40be0 100644 --- a/exporter/awss3exporter/exporter.go +++ b/exporter/awss3exporter/exporter.go @@ -5,8 +5,9 @@ package awss3exporter // import "github.com/open-telemetry/opentelemetry-collect import ( "context" - "errors" + "fmt" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/pdata/plog" @@ -23,26 +24,32 @@ type s3Exporter struct { } func newS3Exporter(config *Config, - params exporter.CreateSettings) (*s3Exporter, error) { - - if config == nil { - return nil, errors.New("s3 exporter config is nil") - } - - logger := params.Logger - - m, err := newMarshaler(config.MarshalerName, logger) - if err != nil { - return nil, errors.New("unknown marshaler") - } + params exporter.CreateSettings) *s3Exporter { s3Exporter := &s3Exporter{ config: config, dataWriter: &s3Writer{}, - logger: logger, - marshaler: m, + logger: params.Logger, } - return s3Exporter, nil + return s3Exporter +} + +func (e *s3Exporter) start(_ context.Context, host component.Host) error { + + var m marshaler + var err error + if e.config.Encoding != nil { + if m, err = newMarshalerFromEncoding(e.config.Encoding, e.config.EncodingFileExtension, host, e.logger); err != nil { + return err + } + } else { + if m, err = newMarshaler(e.config.MarshalerName, e.logger); err != nil { + return fmt.Errorf("unknown marshaler %q", e.config.MarshalerName) + } + } + + e.marshaler = m + return nil } func (e *s3Exporter) Capabilities() consumer.Capabilities { diff --git a/exporter/awss3exporter/factory.go b/exporter/awss3exporter/factory.go index 61c64807f483..12c1ead83d1a 100644 --- a/exporter/awss3exporter/factory.go +++ b/exporter/awss3exporter/factory.go @@ -39,24 +39,19 @@ func createLogsExporter(ctx context.Context, params exporter.CreateSettings, config component.Config) (exporter.Logs, error) { - s3Exporter, err := newS3Exporter(config.(*Config), params) - if err != nil { - return nil, err - } + s3Exporter := newS3Exporter(config.(*Config), params) return exporterhelper.NewLogsExporter(ctx, params, config, - s3Exporter.ConsumeLogs) + s3Exporter.ConsumeLogs, + exporterhelper.WithStart(s3Exporter.start)) } func createMetricsExporter(ctx context.Context, params exporter.CreateSettings, config component.Config) (exporter.Metrics, error) { - s3Exporter, err := newS3Exporter(config.(*Config), params) - if err != nil { - return nil, err - } + s3Exporter := newS3Exporter(config.(*Config), params) if config.(*Config).MarshalerName == SumoIC { return nil, fmt.Errorf("metrics are not supported by sumo_ic output format") @@ -64,17 +59,15 @@ func createMetricsExporter(ctx context.Context, return exporterhelper.NewMetricsExporter(ctx, params, config, - s3Exporter.ConsumeMetrics) + s3Exporter.ConsumeMetrics, + exporterhelper.WithStart(s3Exporter.start)) } func createTracesExporter(ctx context.Context, params exporter.CreateSettings, config component.Config) (exporter.Traces, error) { - s3Exporter, err := newS3Exporter(config.(*Config), params) - if err != nil { - return nil, err - } + s3Exporter := newS3Exporter(config.(*Config), params) if config.(*Config).MarshalerName == SumoIC { return nil, fmt.Errorf("traces are not supported by sumo_ic output format") @@ -83,5 +76,6 @@ func createTracesExporter(ctx context.Context, return exporterhelper.NewTracesExporter(ctx, params, config, - s3Exporter.ConsumeTraces) + s3Exporter.ConsumeTraces, + exporterhelper.WithStart(s3Exporter.start)) } diff --git a/exporter/awss3exporter/generated_component_test.go b/exporter/awss3exporter/generated_component_test.go new file mode 100644 index 000000000000..cd70588d72a3 --- /dev/null +++ b/exporter/awss3exporter/generated_component_test.go @@ -0,0 +1,140 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package awss3exporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/awss3exporter/go.mod b/exporter/awss3exporter/go.mod index cdb5570d406b..41515195e9b4 100644 --- a/exporter/awss3exporter/go.mod +++ b/exporter/awss3exporter/go.mod @@ -1,99 +1,103 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter -go 1.20 +go 1.21 require ( - github.com/aws/aws-sdk-go v1.47.10 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/otelcol v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/aws/aws-sdk-go v1.51.17 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configcompression v1.5.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/otelcol v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 ) require ( - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.3.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/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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.4.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.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/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // 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 + github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/connector v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/processor v0.89.0 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/collector/service v0.89.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk v1.20.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 // indirect + go.opentelemetry.io/collector/connector v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/collector/processor v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/collector/service v0.98.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.25.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.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-20231030173426-d783a09b4405 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/awss3exporter/go.sum b/exporter/awss3exporter/go.sum index 08d347656b19..a96d18cafbea 100644 --- a/exporter/awss3exporter/go.sum +++ b/exporter/awss3exporter/go.sum @@ -1,62 +1,14 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= 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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -67,583 +19,296 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF 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-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/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.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/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/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/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= 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/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= 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/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/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/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/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 v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/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.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/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.1.1/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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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.6.1/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/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 h1:opvHcGANx+dS4HJwGTPtRMd6dZdOmmGn6c3PfW/bihQ= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/otelcol v0.89.0 h1:b3kC0zM9T6GxjhTcNEHIzXDd4zTIc7cBpexCPZ9nPzg= -go.opentelemetry.io/collector/otelcol v0.89.0/go.mod h1:BILxDcJe32wK+paX7ssnt4jyjOmTkIHvXe9JNjlHUk8= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/collector/service v0.89.0/go.mod h1:6IAr9Asn6t6YxSw6Qv5LwA+ilVUtP0nQsu1xzc9+mZA= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0 h1:Yty9Vs4F3D6/liF1o6FNt0PvN85h/BJJ6DQKJ3nrcM0= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0/go.mod h1:On4VgbkqYL18kbJlWsa18+cMNe6rYpBnPi1ARI/BrsU= -go.opentelemetry.io/contrib/zpages v0.45.0 h1:jIwHHGoWzJoZdbIUtWdErjL85Gni6BignnAFqDtMRL4= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0 h1:E/sf+2slCUb7wqh5FHwhdwKWTA+VXyMMAcFNlKVf4yw= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0/go.mod h1:2xuXI78Xp9cttLsJMF/Y08cJUqckLt0kLasn+vcHR5w= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0/go.mod h1:hbzqqcIxyywu6UQ5J1wb4ntla8nCwCfNBZnMo2Dgh48= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0/go.mod h1:qmFtGlXhoa9qPt5RrZgMp4f5RfRagucrdriI+hb3yWQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0/go.mod h1:CMJYNAfooOwSZSAmAeMUV1M+TXld3BiK++z9fqIm2xk= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0/go.mod h1:nZStMoc1H/YJpRjSx9IEX4abBMekORTLQcTUT1CgLkg= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 h1:vcSjcjn/BTeM6abI5CDymZdtd1m24quD1Mx4VE3N3fM= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0/go.mod h1:HblEnlZQNsVuuDpszdKTWcrHBI09OjBn2pWSzBx1goM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 h1:4s9HxB4azeeQkhY0GE5wZlMj4/pz8tE5gx2OQpGUw58= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0/go.mod h1:djVA3TUJ2fSdMX0JE5XxFBOaZzprElJoP7fD4vnV2SU= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -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.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 h1:lRhfcLr3gK5S/zn92h3clyOPnCvvNKs1WTMbtH4UvO0= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0/go.mod h1:vNMFTWe4dF05LsodUOc84OfxdlYVp1kCMuZzb41WfAk= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 h1:x/VsGlBj+DtJCXIucwzwcxiwnwAU8a6ALK6UN8fPdKQ= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0/go.mod h1:BapTGXu7CYrQGNohbapPwTSt2Ty/k/c6Oemx9mSSiK4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 h1:SxDS+Yr8qE+ID58ELR5n0D+SUlqHKOZ72pK3YPFAelA= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0/go.mod h1:DEoB0d0k1iGt4KEABntL8AW9xYQ6E7fmgkM2/s8aXvM= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 h1:C02SPbRPvrtmZ9TvsHWpz2TvHzqY5mNyEAlDdhax/a4= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0/go.mod h1:dzZKtykJio3Rm+G+Cmr15VV3xKp0PmFuh9Q9b3c1K7A= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 h1:04zGXVQZ8D6nvoPX8AaqxWxGHNNVsGR78E+tY+2VQr8= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0/go.mod h1:+UrRiugWaQPssz4mgEgQQo640f2bDUCFlo2Xr0/5ulc= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 h1:JYpDN0OnMsu0awk0rjaYEIko9hFzzBJ6+2U5W2iVvUE= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0/go.mod h1:xrXL804nBum1PgbvmJQ4I+hyW+DU4xBGO3MKMiYFX6E= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 h1:JfvsDpTwAhA9au8/4vmONRh0OBVU6n36seb41JD/mTQ= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0/go.mod h1:t1zDwy6kYp4w1JgcGHMvdGbKYHqWpK00bB1AEQ0Oqlc= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/otelcol v0.98.0 h1:sUk49Wqw+VBYeDynEA+GSeVEusFvzFW3KuF2vfDbyo0= +go.opentelemetry.io/collector/otelcol v0.98.0/go.mod h1:dW3UzuaiaNTddjKajk3Tp2Y7muDvYJdQz2yGUOE53gs= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/collector/service v0.98.0 h1:lLJ7VXPXcV62fSISh4GuNd5ti6WvKje76NSgezc3ydo= +go.opentelemetry.io/collector/service v0.98.0/go.mod h1:wB7ozvZTHtMefb5KTYy5nyrVYWpGk8teq8jWFs4blIU= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0 h1:QU8UEKyPqgr/8vCC9LlDmkPnfFmiWAUF9GtJdcLz+BU= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0/go.mod h1:qonC7wyvtX1E6cEpAR+bJmhcGr6IVRGc/f6ZTpvi7jA= +go.opentelemetry.io/contrib/zpages v0.50.0 h1:hKC5asr83xDN4ErwSHVdk3gv053pZiF8SZKmS86IPEw= +go.opentelemetry.io/contrib/zpages v0.50.0/go.mod h1:8WovRn95fZdaX/dr3e4h7D8IqiVsnZ+WxY0Yn4LyU3k= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0 h1:0o/9KwAgxjK+3pMV0pwIF5toYHqDsPmQhfrBvKaG6mU= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0/go.mod h1:rZyTdpmRqoV+PpUn6QlruxJp/kE4765rPy0pP6mRDk8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 h1:hDKnobznDpcdTlNzO0S/owRB8tyVr1OoeZZhDoqY+Cs= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0/go.mod h1:kUDQaUs1h8iTIHbQTk+iJRiUvSfJYMMKTtMCaiVu7B0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 h1:Wc4hZuYXhVqq+TfRXLXlmNIL/awOanGx8ssq3ciDQxc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0/go.mod h1:BydOvapRqVEc0DVz27qWBX2jq45Ca5TI9mhZBDIdweY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 h1:vOL89uRfOCCNIjkisd0r7SEdJF3ZJFyCNY34fdZs8eU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0/go.mod h1:8GlBGcDk8KKi7n+2S4BT/CPZQYH3erLu0/k64r1MYgo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 h1:d7nHbdzU84STOiszaOxQ3kw5IwkSmHsU5Muol5/vL4I= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0/go.mod h1:yiPA1iZbb/EHYnODXOxvtKuB0I2hV8ehfLTEWpl7BJU= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 h1:0vZZdECYzhTt9MKQZ5qQ0V+J3MFu4MQaQ3COfugF+FQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0/go.mod h1:e7iXx3HjaSSBXfy9ykVUlupS2Vp7LBIBuT21ousM2Hk= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= 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-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/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/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -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-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= +google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -652,38 +317,17 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/exporter/awss3exporter/internal/metadata/generated_status.go b/exporter/awss3exporter/internal/metadata/generated_status.go index 37542f92cd7e..d8c6a2dacd2c 100644 --- a/exporter/awss3exporter/internal/metadata/generated_status.go +++ b/exporter/awss3exporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("awss3") ) const ( - Type = "awss3" TracesStability = component.StabilityLevelAlpha MetricsStability = component.StabilityLevelAlpha LogsStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/awss3") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/awss3") +} diff --git a/exporter/awss3exporter/marshaler.go b/exporter/awss3exporter/marshaler.go index 30d18bfd3b86..57ac6455d823 100644 --- a/exporter/awss3exporter/marshaler.go +++ b/exporter/awss3exporter/marshaler.go @@ -5,7 +5,9 @@ package awss3exporter // import "github.com/open-telemetry/opentelemetry-collect import ( "errors" + "fmt" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" @@ -23,9 +25,28 @@ var ( ErrUnknownMarshaler = errors.New("unknown marshaler") ) +func newMarshalerFromEncoding(encoding *component.ID, fileFormat string, host component.Host, logger *zap.Logger) (marshaler, error) { + marshaler := &s3Marshaler{logger: logger} + e, ok := host.GetExtensions()[*encoding] + if !ok { + return nil, fmt.Errorf("unknown encoding %q", encoding) + } + // cast with ok to avoid panics. + marshaler.logsMarshaler, _ = e.(plog.Marshaler) + marshaler.metricsMarshaler, _ = e.(pmetric.Marshaler) + marshaler.tracesMarshaler, _ = e.(ptrace.Marshaler) + marshaler.fileFormat = fileFormat + return marshaler, nil +} + func newMarshaler(mType MarshalerType, logger *zap.Logger) (marshaler, error) { marshaler := &s3Marshaler{logger: logger} switch mType { + case OtlpProtobuf: + marshaler.logsMarshaler = &plog.ProtoMarshaler{} + marshaler.tracesMarshaler = &ptrace.ProtoMarshaler{} + marshaler.metricsMarshaler = &pmetric.ProtoMarshaler{} + marshaler.fileFormat = "binpb" case OtlpJSON: marshaler.logsMarshaler = &plog.JSONMarshaler{} marshaler.tracesMarshaler = &ptrace.JSONMarshaler{} @@ -35,6 +56,10 @@ func newMarshaler(mType MarshalerType, logger *zap.Logger) (marshaler, error) { sumomarshaler := newSumoICMarshaler() marshaler.logsMarshaler = &sumomarshaler marshaler.fileFormat = "json.gz" + case Body: + exportbodyMarshaler := newbodyMarshaler() + marshaler.logsMarshaler = &exportbodyMarshaler + marshaler.fileFormat = exportbodyMarshaler.format() default: return nil, ErrUnknownMarshaler } diff --git a/exporter/awss3exporter/marshaler_test.go b/exporter/awss3exporter/marshaler_test.go index d0ede1990099..9a56d83d1f6f 100644 --- a/exporter/awss3exporter/marshaler_test.go +++ b/exporter/awss3exporter/marshaler_test.go @@ -4,10 +4,13 @@ package awss3exporter import ( + "context" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" "go.uber.org/zap" ) @@ -18,6 +21,12 @@ func TestMarshaler(t *testing.T) { require.NotNil(t, m) assert.Equal(t, m.format(), "json") } + { + m, err := newMarshaler("otlp_proto", zap.NewNop()) + assert.NoError(t, err) + require.NotNil(t, m) + assert.Equal(t, m.format(), "binpb") + } { m, err := newMarshaler("sumo_ic", zap.NewNop()) assert.NoError(t, err) @@ -29,4 +38,66 @@ func TestMarshaler(t *testing.T) { assert.Error(t, err) require.Nil(t, m) } + { + m, err := newMarshaler("body", zap.NewNop()) + assert.NoError(t, err) + require.NotNil(t, m) + assert.Equal(t, m.format(), "txt") + } +} + +type hostWithExtensions struct { + encoding encodingExtension +} + +func (h hostWithExtensions) Start(context.Context, component.Host) error { + panic("unsupported") +} + +func (h hostWithExtensions) Shutdown(context.Context) error { + panic("unsupported") +} + +func (h hostWithExtensions) GetFactory(component.Kind, component.Type) component.Factory { + panic("unsupported") +} + +func (h hostWithExtensions) GetExtensions() map[component.ID]component.Component { + return map[component.ID]component.Component{ + component.MustNewID("foo"): h.encoding, + } +} + +func (h hostWithExtensions) GetExporters() map[component.DataType]map[component.ID]component.Component { + panic("unsupported") +} + +type encodingExtension struct { +} + +func (e encodingExtension) Start(_ context.Context, _ component.Host) error { + panic("unsupported") +} + +func (e encodingExtension) Shutdown(_ context.Context) error { + panic("unsupported") +} + +func TestMarshalerFromEncoding(t *testing.T) { + id := component.MustNewID("foo") + + { + host := hostWithExtensions{ + encoding: encodingExtension{}, + } + m, err := newMarshalerFromEncoding(&id, "myext", host, zap.NewNop()) + assert.NoError(t, err) + require.NotNil(t, m) + assert.Equal(t, "myext", m.format()) + } + { + m, err := newMarshalerFromEncoding(&id, "", componenttest.NewNopHost(), zap.NewNop()) + assert.EqualError(t, err, `unknown encoding "foo"`) + require.Nil(t, m) + } } diff --git a/exporter/awss3exporter/metadata.yaml b/exporter/awss3exporter/metadata.yaml index 2c3f6559028b..9e41b330e1f7 100644 --- a/exporter/awss3exporter/metadata.yaml +++ b/exporter/awss3exporter/metadata.yaml @@ -1,9 +1,13 @@ type: awss3 +scope_name: otelcol/awss3 status: class: exporter stability: alpha: [traces, metrics, logs] - distributions: [contrib, observiq, sumo] + distributions: [contrib] codeowners: active: [atoulme, pdelewski] + +tests: + expect_consumer_error: true diff --git a/exporter/awss3exporter/s3_writer.go b/exporter/awss3exporter/s3_writer.go index 367e1dc8b4ed..38376c45605d 100644 --- a/exporter/awss3exporter/s3_writer.go +++ b/exporter/awss3exporter/s3_writer.go @@ -5,6 +5,7 @@ package awss3exporter // import "github.com/open-telemetry/opentelemetry-collect import ( "bytes" + "compress/gzip" "context" "fmt" "math/rand" @@ -15,6 +16,7 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials/stscreds" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3/s3manager" + "go.opentelemetry.io/collector/config/configcompression" ) type s3Writer struct { @@ -38,18 +40,29 @@ func randomInRange(low, hi int) int { return low + rand.Intn(hi-low) } -func getS3Key(time time.Time, keyPrefix string, partition string, filePrefix string, metadata string, fileformat string) string { +func getS3Key(time time.Time, keyPrefix string, partition string, filePrefix string, metadata string, fileFormat string, compression configcompression.Type) string { timeKey := getTimeKey(time, partition) randomID := randomInRange(100000000, 999999999) + suffix := "" + if fileFormat != "" { + suffix = "." + fileFormat + } + + s3Key := keyPrefix + "/" + timeKey + "/" + filePrefix + metadata + "_" + strconv.Itoa(randomID) + suffix - s3Key := keyPrefix + "/" + timeKey + "/" + filePrefix + metadata + "_" + strconv.Itoa(randomID) + "." + fileformat + // add ".gz" extension to files if compression is enabled + if compression == configcompression.TypeGzip { + s3Key += ".gz" + } return s3Key } func getSessionConfig(config *Config) *aws.Config { sessionConfig := &aws.Config{ - Region: aws.String(config.S3Uploader.Region), + Region: aws.String(config.S3Uploader.Region), + S3ForcePathStyle: &config.S3Uploader.S3ForcePathStyle, + DisableSSL: &config.S3Uploader.DisableSSL, } endpoint := config.S3Uploader.Endpoint @@ -75,10 +88,28 @@ func (s3writer *s3Writer) writeBuffer(_ context.Context, buf []byte, config *Con now := time.Now() key := getS3Key(now, config.S3Uploader.S3Prefix, config.S3Uploader.S3Partition, - config.S3Uploader.FilePrefix, metadata, format) - - // create a reader from data data in memory - reader := bytes.NewReader(buf) + config.S3Uploader.FilePrefix, metadata, format, config.S3Uploader.Compression) + + encoding := "" + var reader *bytes.Reader + if config.S3Uploader.Compression == configcompression.TypeGzip { + // set s3 uploader content encoding to "gzip" + encoding = "gzip" + var gzipContents bytes.Buffer + + // create a gzip from data + gzipWriter := gzip.NewWriter(&gzipContents) + _, err := gzipWriter.Write(buf) + if err != nil { + return err + } + gzipWriter.Close() + + reader = bytes.NewReader(gzipContents.Bytes()) + } else { + // create a reader from data in memory + reader = bytes.NewReader(buf) + } sessionConfig := getSessionConfig(config) sess, err := getSession(config, sessionConfig) @@ -90,9 +121,10 @@ func (s3writer *s3Writer) writeBuffer(_ context.Context, buf []byte, config *Con uploader := s3manager.NewUploader(sess) _, err = uploader.Upload(&s3manager.UploadInput{ - Bucket: aws.String(config.S3Uploader.S3Bucket), - Key: aws.String(key), - Body: reader, + Bucket: aws.String(config.S3Uploader.S3Bucket), + Key: aws.String(key), + Body: reader, + ContentEncoding: &encoding, }) if err != nil { return err diff --git a/exporter/awss3exporter/s3_writer_test.go b/exporter/awss3exporter/s3_writer_test.go index 8b5e4eedcb5d..6df1998b07d5 100644 --- a/exporter/awss3exporter/s3_writer_test.go +++ b/exporter/awss3exporter/s3_writer_test.go @@ -36,7 +36,49 @@ func TestS3Key(t *testing.T) { require.NotNil(t, tm) re := regexp.MustCompile(`keyprefix/year=2022/month=06/day=05/hour=00/minute=00/fileprefixlogs_([0-9]+).json`) - s3Key := getS3Key(tm, "keyprefix", "minute", "fileprefix", "logs", "json") + s3Key := getS3Key(tm, "keyprefix", "minute", "fileprefix", "logs", "json", "") + matched := re.MatchString(s3Key) + assert.Equal(t, true, matched) +} + +func TestS3KeyEmptyFileFormat(t *testing.T) { + const layout = "2006-01-02" + + tm, err := time.Parse(layout, "2022-06-05") + + assert.NoError(t, err) + require.NotNil(t, tm) + + re := regexp.MustCompile(`keyprefix/year=2022/month=06/day=05/hour=00/minute=00/fileprefixlogs_([0-9]+)`) + s3Key := getS3Key(tm, "keyprefix", "minute", "fileprefix", "logs", "", "") + matched := re.MatchString(s3Key) + assert.Equal(t, true, matched) +} + +func TestS3KeyOfCompressedFile(t *testing.T) { + const layout = "2006-01-02" + + tm, err := time.Parse(layout, "2022-06-05") + + assert.NoError(t, err) + require.NotNil(t, tm) + + re := regexp.MustCompile(`keyprefix/year=2022/month=06/day=05/hour=00/minute=00/fileprefixlogs_([0-9]+).json.gz`) + s3Key := getS3Key(tm, "keyprefix", "minute", "fileprefix", "logs", "json", "gzip") + matched := re.MatchString(s3Key) + assert.Equal(t, true, matched) +} + +func TestS3KeyOfCompressedFileEmptyFileFormat(t *testing.T) { + const layout = "2006-01-02" + + tm, err := time.Parse(layout, "2022-06-05") + + assert.NoError(t, err) + require.NotNil(t, tm) + + re := regexp.MustCompile(`keyprefix/year=2022/month=06/day=05/hour=00/minute=00/fileprefixlogs_([0-9]+).gz`) + s3Key := getS3Key(tm, "keyprefix", "minute", "fileprefix", "logs", "", "gzip") matched := re.MatchString(s3Key) assert.Equal(t, true, matched) } diff --git a/exporter/awss3exporter/testdata/compression.yaml b/exporter/awss3exporter/testdata/compression.yaml new file mode 100644 index 000000000000..68966317b961 --- /dev/null +++ b/exporter/awss3exporter/testdata/compression.yaml @@ -0,0 +1,26 @@ +receivers: + nop: + +exporters: + awss3: + s3uploader: + s3_bucket: "foo" + compression: "gzip" + marshaler: otlp_json + + awss3/proto: + s3uploader: + s3_bucket: "bar" + compression: "none" + marshaler: otlp_proto + + +processors: + nop: + +service: + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [awss3, awss3/proto] diff --git a/exporter/awss3exporter/testdata/config-s3-compatible-systems.yaml b/exporter/awss3exporter/testdata/config-s3-compatible-systems.yaml new file mode 100644 index 000000000000..f6342e4b14c1 --- /dev/null +++ b/exporter/awss3exporter/testdata/config-s3-compatible-systems.yaml @@ -0,0 +1,22 @@ +receivers: + nop: + +exporters: + awss3: + s3uploader: + s3_bucket: 'foo' + s3_prefix: 'bar' + s3_partition: 'minute' + endpoint: "alternative-s3-system.example.com" + s3_force_path_style: true + disable_ssl: true + +processors: + nop: + +service: + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [awss3] diff --git a/exporter/awss3exporter/testdata/default.yaml b/exporter/awss3exporter/testdata/default.yaml index 09513cb0fae0..656db12122ea 100644 --- a/exporter/awss3exporter/testdata/default.yaml +++ b/exporter/awss3exporter/testdata/default.yaml @@ -3,6 +3,8 @@ receivers: exporters: awss3: + encoding: "foo/bar" + encoding_file_extension: "baz" s3uploader: s3_bucket: "foo" region: 'us-east-1' diff --git a/exporter/awss3exporter/testdata/marshaler.yaml b/exporter/awss3exporter/testdata/marshaler.yaml index fcbcba6be079..8527410a0a12 100644 --- a/exporter/awss3exporter/testdata/marshaler.yaml +++ b/exporter/awss3exporter/testdata/marshaler.yaml @@ -7,6 +7,12 @@ exporters: s3_bucket: "foo" marshaler: sumo_ic + awss3/proto: + s3uploader: + s3_bucket: "bar" + marshaler: otlp_proto + + processors: nop: @@ -15,4 +21,4 @@ service: traces: receivers: [nop] processors: [nop] - exporters: [awss3] + exporters: [awss3, awss3/proto] diff --git a/exporter/awsxrayexporter/README.md b/exporter/awsxrayexporter/README.md index e8898f731be6..22f57948317b 100644 --- a/exporter/awsxrayexporter/README.md +++ b/exporter/awsxrayexporter/README.md @@ -4,14 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces | -| Distributions | [contrib], [aws], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fawsxray%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fawsxray) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fawsxray%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fawsxray) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@wangzlei](https://www.github.com/wangzlei), [@srprash](https://www.github.com/srprash) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector This exporter converts OpenTelemetry spans to diff --git a/exporter/awsxrayexporter/awsxray.go b/exporter/awsxrayexporter/awsxray.go index 3454b5e663a0..04a9e42b545f 100644 --- a/exporter/awsxrayexporter/awsxray.go +++ b/exporter/awsxrayexporter/awsxray.go @@ -35,7 +35,7 @@ func newTracesExporter( cn awsutil.ConnAttr, registry telemetry.Registry, ) (exporter.Traces, error) { - typeLog := zap.String("type", string(set.ID.Type())) + typeLog := zap.String("type", set.ID.Type().String()) nameLog := zap.String("name", set.ID.String()) logger := set.Logger awsConfig, session, err := awsutil.GetAWSConfigSession(logger, cn, &cfg.AWSSessionSettings) @@ -53,7 +53,7 @@ func newTracesExporter( context.TODO(), set, cfg, - func(ctx context.Context, td ptrace.Traces) error { + func(_ context.Context, td ptrace.Traces) error { var err error logger.Debug("TracesExporter", typeLog, nameLog, zap.Int("#spans", td.SpanCount())) diff --git a/exporter/awsxrayexporter/awsxray_test.go b/exporter/awsxrayexporter/awsxray_test.go index 27802d97ebfc..da13617f5973 100644 --- a/exporter/awsxrayexporter/awsxray_test.go +++ b/exporter/awsxrayexporter/awsxray_test.go @@ -34,9 +34,9 @@ func TestTraceExport(t *testing.T) { ctx := context.Background() td := constructSpanData() err := traceExporter.ConsumeTraces(ctx, td) - assert.NotNil(t, err) + assert.Error(t, err) err = traceExporter.Shutdown(ctx) - assert.Nil(t, err) + assert.NoError(t, err) } func TestXraySpanTraceResourceExtraction(t *testing.T) { @@ -50,9 +50,9 @@ func TestXrayAndW3CSpanTraceExport(t *testing.T) { ctx := context.Background() td := constructXrayAndW3CSpanData() err := traceExporter.ConsumeTraces(ctx, td) - assert.NotNil(t, err) + assert.Error(t, err) err = traceExporter.Shutdown(ctx) - assert.Nil(t, err) + assert.NoError(t, err) } func TestXrayAndW3CSpanTraceResourceExtraction(t *testing.T) { @@ -72,20 +72,22 @@ func TestTelemetryEnabled(t *testing.T) { registry := telemetry.NewRegistry() sink := telemetrytest.NewSenderSink() // preload the sender that the exporter will use - sender, loaded := registry.LoadOrStore(component.NewID(""), sink) + set := exportertest.NewNopCreateSettings() + sender, loaded := registry.LoadOrStore(set.ID, sink) require.False(t, loaded) require.NotNil(t, sender) require.Equal(t, sink, sender) cfg := generateConfig(t) cfg.TelemetryConfig.Enabled = true - traceExporter := initializeTracesExporter(t, cfg, registry) + traceExporter, err := newTracesExporter(cfg, set, new(awsutil.Conn), registry) + assert.NoError(t, err) ctx := context.Background() assert.NoError(t, traceExporter.Start(ctx, componenttest.NewNopHost())) td := constructSpanData() - err := traceExporter.ConsumeTraces(ctx, td) - assert.NotNil(t, err) + err = traceExporter.ConsumeTraces(ctx, td) + assert.Error(t, err) err = traceExporter.Shutdown(ctx) - assert.Nil(t, err) + assert.NoError(t, err) assert.EqualValues(t, 1, sink.StartCount.Load()) assert.EqualValues(t, 1, sink.StopCount.Load()) assert.True(t, sink.HasRecording()) @@ -94,7 +96,8 @@ func TestTelemetryEnabled(t *testing.T) { } func TestMiddleware(t *testing.T) { - id := component.NewID("test") + testType, _ := component.NewType("test") + id := component.NewID(testType) cfg := generateConfig(t) cfg.MiddlewareID = &id handler := new(awsmiddleware.MockHandler) diff --git a/exporter/awsxrayexporter/factory_test.go b/exporter/awsxrayexporter/factory_test.go index 321eb82a7601..35763d0afaef 100644 --- a/exporter/awsxrayexporter/factory_test.go +++ b/exporter/awsxrayexporter/factory_test.go @@ -81,7 +81,7 @@ func TestCreateTracesExporter(t *testing.T) { ctx := context.Background() exporter, err := factory.CreateTracesExporter(ctx, exportertest.NewNopCreateSettings(), cfg) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exporter) } @@ -97,6 +97,6 @@ func TestCreateMetricsExporter(t *testing.T) { ctx := context.Background() exporter, err := factory.CreateMetricsExporter(ctx, exportertest.NewNopCreateSettings(), cfg) - assert.NotNil(t, err) + assert.Error(t, err) assert.Nil(t, exporter) } diff --git a/exporter/awsxrayexporter/generated_component_test.go b/exporter/awsxrayexporter/generated_component_test.go new file mode 100644 index 000000000000..de2a712670ad --- /dev/null +++ b/exporter/awsxrayexporter/generated_component_test.go @@ -0,0 +1,126 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package awsxrayexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/awsxrayexporter/go.mod b/exporter/awsxrayexporter/go.mod index f62ce1411986..99670b6b79d3 100644 --- a/exporter/awsxrayexporter/go.mod +++ b/exporter/awsxrayexporter/go.mod @@ -1,61 +1,73 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter -go 1.20 +go 1.21 require ( - github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-00010101000000-000000000000 - github.com/aws/aws-sdk-go v1.47.10 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 + github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-20240419190856-2f880467f335 + github.com/aws/aws-sdk-go v1.51.17 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/featuregate v1.5.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-00010101000000-000000000000 // indirect github.com/aws/aws-sdk-go-v2 v1.22.2 // indirect github.com/aws/smithy-go v1.16.0 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/jmespath/go-jmespath v0.4.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/stretchr/objx v0.5.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/awsxrayexporter/go.sum b/exporter/awsxrayexporter/go.sum index 0e137ce8057b..f798a1e43afd 100644 --- a/exporter/awsxrayexporter/go.sum +++ b/exporter/awsxrayexporter/go.sum @@ -1,69 +1,54 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v1.22.2 h1:lV0U8fnhAnPz8YcdmZVV60+tr6CakHzqA6P8T46ExJI= github.com/aws/aws-sdk-go-v2 v1.22.2/go.mod h1:Kd0OJtkW3Q0M0lUWGszapWjEvrXDzRW+D21JNsroB+c= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13 h1:OPLEkmhXf6xFPiz0bLeDArZIDx1NNS4oJyG4nv3Gct0= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13/go.mod h1:gpAbvyDGQFozTEmlTFO8XcQKHzubdq0LzRyJpG6MiXM= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 h1:SijA0mgjV8E+8G45ltVHs0fvKpTj8xmZJ3VwhGKtUSI= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4 h1:6lJvvkQ9HmbHZ4h/IEwclwv2mrTW8Uq1SOB/kXy0mfw= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4/go.mod h1:1PrKYwxTM+zjpw9Y41KFtoJCQrJ34Z47Y4VgVbfndjo= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 h1:m0QTSI6pZYJTk5WSKx3fm5cNW/DCicVzULBgU/6IyD0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14/go.mod h1:dDilntgHy9WnHXsh7dDtUPgHKEfTJIBUTHM8OWm0f/0= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36 h1:eev2yZX7esGRjqRbnVk1UxMLw4CyVZDpZXRCcy75oQk= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36/go.mod h1:lGnOkH9NJATw0XEPcAknFBj3zzNTEGRHtSw+CwC1YTg= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 h1:v0jkRigbSD6uOdwcaUQmgEwG1BkPfAPDqaeNt/29ghg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4/go.mod h1:LhTyt8J04LL+9cIt7pYJ5lbS/U98ZmXovLOR/4LUsk8= github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0 h1:wl5dxN1NONhTDQD9uaEvNsDRX29cBmGED/nl0jkWlt4= +github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0/go.mod h1:rDGMZA7f4pbmTtPOk5v5UM2lmX6UAbRnMDJeDvnH7AM= github.com/aws/smithy-go v1.16.0 h1:gJZEH/Fqh+RsvlJ1Zt4tVAtV6bKkp3cC+R6FCZMNzik= github.com/aws/smithy-go v1.16.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -78,15 +63,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -96,104 +80,92 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -201,39 +173,19 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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/exporter/awsxrayexporter/internal/metadata/generated_status.go b/exporter/awsxrayexporter/internal/metadata/generated_status.go index 12af796c7f9f..63420257a6a6 100644 --- a/exporter/awsxrayexporter/internal/metadata/generated_status.go +++ b/exporter/awsxrayexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("awsxray") ) const ( - Type = "awsxray" TracesStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/awsxray") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/awsxray") +} diff --git a/exporter/awsxrayexporter/internal/translator/package_test.go b/exporter/awsxrayexporter/internal/translator/package_test.go new file mode 100644 index 000000000000..3b3d8ccb5c0f --- /dev/null +++ b/exporter/awsxrayexporter/internal/translator/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package translator + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/awsxrayexporter/internal/translator/segment.go b/exporter/awsxrayexporter/internal/translator/segment.go index c8d78792fa11..ff8efb3090f5 100644 --- a/exporter/awsxrayexporter/internal/translator/segment.go +++ b/exporter/awsxrayexporter/internal/translator/segment.go @@ -15,6 +15,7 @@ import ( "time" awsP "github.com/aws/aws-sdk-go/aws" + "go.opentelemetry.io/collector/featuregate" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" conventions "go.opentelemetry.io/collector/semconv/v1.8.0" @@ -51,6 +52,15 @@ var ( reInvalidSpanCharacters = regexp.MustCompile(`[^ 0-9\p{L}N_.:/%&#=+,\-@]`) ) +var ( + remoteXrayExporterDotConverter = featuregate.GlobalRegistry().MustRegister( + "exporter.xray.allowDot", + featuregate.StageAlpha, + featuregate.WithRegisterDescription("X-Ray Exporter will no longer convert . to _ in annotation keys when this feature gate is enabled. "), + featuregate.WithRegisterFromVersion("v0.97.0"), + ) +) + const ( // defaultMetadataNamespace is used for non-namespaced non-indexed attributes. defaultMetadataNamespace = "default" @@ -746,7 +756,7 @@ func fixAnnotationKey(key string) string { fallthrough case 'a' <= r && r <= 'z': fallthrough - case r == '.': + case remoteXrayExporterDotConverter.IsEnabled() && r == '.': return r default: return '_' diff --git a/exporter/awsxrayexporter/internal/translator/segment_test.go b/exporter/awsxrayexporter/internal/translator/segment_test.go index 27774221adad..f0082f891ccb 100644 --- a/exporter/awsxrayexporter/internal/translator/segment_test.go +++ b/exporter/awsxrayexporter/internal/translator/segment_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/featuregate" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" conventions "go.opentelemetry.io/collector/semconv/v1.8.0" @@ -59,7 +60,7 @@ func TestClientSpanWithRpcAwsSdkClientAttributes(t *testing.T) { jsonStr, err := MakeSegmentDocumentString(span, resource, nil, false, nil, false) assert.NotNil(t, jsonStr) - assert.Nil(t, err) + assert.NoError(t, err) assert.True(t, strings.Contains(jsonStr, "DynamoDB")) assert.True(t, strings.Contains(jsonStr, "GetItem")) assert.False(t, strings.Contains(jsonStr, user)) @@ -92,7 +93,7 @@ func TestClientSpanWithLegacyAwsSdkClientAttributes(t *testing.T) { jsonStr, err := MakeSegmentDocumentString(span, resource, nil, false, nil, false) assert.NotNil(t, jsonStr) - assert.Nil(t, err) + assert.NoError(t, err) assert.True(t, strings.Contains(jsonStr, "DynamoDB")) assert.True(t, strings.Contains(jsonStr, "GetItem")) assert.False(t, strings.Contains(jsonStr, user)) @@ -333,7 +334,7 @@ func TestSpanWithInvalidTraceId(t *testing.T) { _, err := MakeSegmentDocumentString(span, resource, nil, false, nil, false) - assert.NotNil(t, err) + assert.Error(t, err) } func TestSpanWithExpiredTraceId(t *testing.T) { @@ -345,7 +346,7 @@ func TestSpanWithExpiredTraceId(t *testing.T) { binary.BigEndian.PutUint32(tempTraceID[0:4], uint32(ExpiredEpoch)) _, err := convertToAmazonTraceID(tempTraceID, false) - assert.NotNil(t, err) + assert.Error(t, err) } func TestSpanWithInvalidTraceIdWithoutTimestampValidation(t *testing.T) { @@ -367,13 +368,13 @@ func TestSpanWithInvalidTraceIdWithoutTimestampValidation(t *testing.T) { span.SetTraceID(traceID) segment, err := MakeSegment(span, resource, nil, false, nil, true) - require.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "ProducerService", *segment.Name) assert.Equal(t, "subsegment", *segment.Type) jsonStr, err := MakeSegmentDocumentString(span, resource, nil, false, nil, true) - require.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, jsonStr) assert.True(t, strings.Contains(jsonStr, "ProducerService")) assert.False(t, strings.Contains(jsonStr, user)) @@ -389,7 +390,7 @@ func TestSpanWithExpiredTraceIdWithoutTimestampValidation(t *testing.T) { binary.BigEndian.PutUint32(tempTraceID[0:4], uint32(ExpiredEpoch)) amazonTraceID, err := convertToAmazonTraceID(tempTraceID, true) - assert.Nil(t, err) + assert.NoError(t, err) expectedTraceID := "1-" + fmt.Sprintf("%x", tempTraceID[0:4]) + "-" + fmt.Sprintf("%x", tempTraceID[4:16]) assert.Equal(t, expectedTraceID, amazonTraceID) } @@ -407,9 +408,30 @@ func TestFixSegmentName(t *testing.T) { } func TestFixAnnotationKey(t *testing.T) { + err := featuregate.GlobalRegistry().Set("exporter.xray.allowDot", false) + assert.Nil(t, err) + + validKey := "Key_1" + fixedKey := fixAnnotationKey(validKey) + assert.Equal(t, validKey, fixedKey) + validDotKey := "Key.1" + fixedDotKey := fixAnnotationKey(validDotKey) + assert.Equal(t, "Key_1", fixedDotKey) + invalidKey := "Key@1" + fixedKey = fixAnnotationKey(invalidKey) + assert.Equal(t, "Key_1", fixedKey) +} + +func TestFixAnnotationKeyWithAllowDot(t *testing.T) { + err := featuregate.GlobalRegistry().Set("exporter.xray.allowDot", true) + assert.Nil(t, err) + validKey := "Key_1" fixedKey := fixAnnotationKey(validKey) assert.Equal(t, validKey, fixedKey) + validDotKey := "Key.1" + fixedDotKey := fixAnnotationKey(validDotKey) + assert.Equal(t, validDotKey, fixedDotKey) invalidKey := "Key@1" fixedKey = fixAnnotationKey(invalidKey) assert.Equal(t, "Key_1", fixedKey) @@ -562,12 +584,14 @@ func TestSpanWithAttributesSegmentMetadata(t *testing.T) { } func TestResourceAttributesCanBeIndexed(t *testing.T) { + err := featuregate.GlobalRegistry().Set("exporter.xray.allowDot", true) + assert.Nil(t, err) + spanName := "/api/locations" parentSpanID := newSegmentID() attributes := make(map[string]any) resource := constructDefaultResource() span := constructServerSpan(parentSpanID, spanName, ptrace.StatusCodeError, "OK", attributes) - segment, _ := MakeSegment(span, resource, []string{ "otel.resource.string.key", "otel.resource.int.key", @@ -615,6 +639,9 @@ func TestResourceAttributesNotIndexedIfSubsegment(t *testing.T) { } func TestSpanWithSpecialAttributesAsListed(t *testing.T) { + err := featuregate.GlobalRegistry().Set("exporter.xray.allowDot", true) + assert.Nil(t, err) + spanName := "/api/locations" parentSpanID := newSegmentID() attributes := make(map[string]any) @@ -631,7 +658,30 @@ func TestSpanWithSpecialAttributesAsListed(t *testing.T) { assert.Equal(t, "rpc_method_val", segment.Annotations["rpc.method"]) } +func TestSpanWithSpecialAttributesAsListedWithAllowDot(t *testing.T) { + err := featuregate.GlobalRegistry().Set("exporter.xray.allowDot", true) + assert.Nil(t, err) + + spanName := "/api/locations" + parentSpanID := newSegmentID() + attributes := make(map[string]any) + attributes[awsxray.AWSOperationAttribute] = "aws_operation_val" + attributes[conventions.AttributeRPCMethod] = "rpc_method_val" + resource := constructDefaultResource() + span := constructServerSpan(parentSpanID, spanName, ptrace.StatusCodeError, "OK", attributes) + + segment, _ := MakeSegment(span, resource, []string{awsxray.AWSOperationAttribute, conventions.AttributeRPCMethod}, false, nil, false) + + assert.NotNil(t, segment) + assert.Equal(t, 2, len(segment.Annotations)) + assert.Equal(t, "aws_operation_val", segment.Annotations[awsxray.AWSOperationAttribute]) + assert.Equal(t, "rpc_method_val", segment.Annotations[conventions.AttributeRPCMethod]) +} + func TestSpanWithSpecialAttributesAsListedAndIndexAll(t *testing.T) { + err := featuregate.GlobalRegistry().Set("exporter.xray.allowDot", true) + assert.Nil(t, err) + spanName := "/api/locations" parentSpanID := newSegmentID() attributes := make(map[string]any) @@ -647,6 +697,25 @@ func TestSpanWithSpecialAttributesAsListedAndIndexAll(t *testing.T) { assert.Equal(t, "rpc_method_val", segment.Annotations["rpc.method"]) } +func TestSpanWithSpecialAttributesAsListedAndIndexAllWithAllowDot(t *testing.T) { + err := featuregate.GlobalRegistry().Set("exporter.xray.allowDot", true) + assert.Nil(t, err) + + spanName := "/api/locations" + parentSpanID := newSegmentID() + attributes := make(map[string]any) + attributes[awsxray.AWSOperationAttribute] = "aws_operation_val" + attributes[conventions.AttributeRPCMethod] = "rpc_method_val" + resource := constructDefaultResource() + span := constructServerSpan(parentSpanID, spanName, ptrace.StatusCodeError, "OK", attributes) + + segment, _ := MakeSegment(span, resource, []string{awsxray.AWSOperationAttribute, conventions.AttributeRPCMethod}, true, nil, false) + + assert.NotNil(t, segment) + assert.Equal(t, "aws_operation_val", segment.Annotations[awsxray.AWSOperationAttribute]) + assert.Equal(t, "rpc_method_val", segment.Annotations[conventions.AttributeRPCMethod]) +} + func TestSpanWithSpecialAttributesNotListedAndIndexAll(t *testing.T) { spanName := "/api/locations" parentSpanID := newSegmentID() @@ -986,7 +1055,7 @@ func TestClientSpanWithAwsRemoteServiceName(t *testing.T) { jsonStr, err := MakeSegmentDocumentString(span, resource, nil, false, nil, false) assert.NotNil(t, jsonStr) - assert.Nil(t, err) + assert.NoError(t, err) assert.True(t, strings.Contains(jsonStr, "PaymentService")) assert.False(t, strings.Contains(jsonStr, user)) assert.False(t, strings.Contains(jsonStr, "user")) @@ -1013,7 +1082,7 @@ func TestAwsSdkSpanWithAwsRemoteServiceName(t *testing.T) { jsonStr, err := MakeSegmentDocumentString(span, resource, nil, false, nil, false) assert.NotNil(t, jsonStr) - assert.Nil(t, err) + assert.NoError(t, err) assert.True(t, strings.Contains(jsonStr, "DynamoDb")) assert.False(t, strings.Contains(jsonStr, "DynamoDb.PutItem")) assert.False(t, strings.Contains(jsonStr, user)) @@ -1042,7 +1111,7 @@ func TestProducerSpanWithAwsRemoteServiceName(t *testing.T) { jsonStr, err := MakeSegmentDocumentString(span, resource, nil, false, nil, false) assert.NotNil(t, jsonStr) - assert.Nil(t, err) + assert.NoError(t, err) assert.True(t, strings.Contains(jsonStr, "ProducerService")) assert.False(t, strings.Contains(jsonStr, user)) assert.False(t, strings.Contains(jsonStr, "user")) @@ -1061,7 +1130,7 @@ func TestConsumerSpanWithAwsRemoteServiceName(t *testing.T) { jsonStr, err := MakeSegmentDocumentString(span, resource, nil, false, nil, false) assert.NotNil(t, jsonStr) - assert.Nil(t, err) + assert.NoError(t, err) assert.True(t, strings.Contains(jsonStr, "ConsumerService")) assert.False(t, strings.Contains(jsonStr, user)) assert.False(t, strings.Contains(jsonStr, "user")) @@ -1089,7 +1158,7 @@ func TestServerSpanWithAwsLocalServiceName(t *testing.T) { jsonStr, err := MakeSegmentDocumentString(span, resource, nil, false, nil, false) assert.NotNil(t, jsonStr) - assert.Nil(t, err) + assert.NoError(t, err) assert.True(t, strings.Contains(jsonStr, "PaymentLocalService")) assert.False(t, strings.Contains(jsonStr, user)) assert.False(t, strings.Contains(jsonStr, "user")) diff --git a/exporter/awsxrayexporter/metadata.yaml b/exporter/awsxrayexporter/metadata.yaml index 327ff2f2a011..684c17f946ee 100644 --- a/exporter/awsxrayexporter/metadata.yaml +++ b/exporter/awsxrayexporter/metadata.yaml @@ -1,9 +1,15 @@ type: awsxray +scope_name: otelcol/awsxray status: class: exporter stability: beta: [traces] - distributions: [contrib, aws, observiq] + distributions: [contrib] codeowners: active: [wangzlei, srprash] + +tests: + config: + region: 'us-west-2' + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/azuredataexplorerexporter/adx_exporter_test.go b/exporter/azuredataexplorerexporter/adx_exporter_test.go index 653c3626a8f8..857ab8902ebb 100644 --- a/exporter/azuredataexplorerexporter/adx_exporter_test.go +++ b/exporter/azuredataexplorerexporter/adx_exporter_test.go @@ -37,18 +37,24 @@ func TestNewExporter(t *testing.T) { LogTableMapping: "otellogs_mapping", TraceTableMapping: "oteltraces_mapping", } - texp, err := newExporter(&c, logger, metricsType, component.NewDefaultBuildInfo().Version) + mexp, err := newExporter(&c, logger, metricsType, component.NewDefaultBuildInfo().Version) assert.NoError(t, err) - assert.NotNil(t, texp) - texp, err = newExporter(&c, logger, logsType, component.NewDefaultBuildInfo().Version) + assert.NotNil(t, mexp) + assert.NoError(t, mexp.Close(context.Background())) + + lexp, err := newExporter(&c, logger, logsType, component.NewDefaultBuildInfo().Version) assert.NoError(t, err) - assert.NotNil(t, texp) - texp, err = newExporter(&c, logger, tracesType, component.NewDefaultBuildInfo().Version) + assert.NotNil(t, lexp) + assert.NoError(t, lexp.Close(context.Background())) + + texp, err := newExporter(&c, logger, tracesType, component.NewDefaultBuildInfo().Version) assert.NoError(t, err) assert.NotNil(t, texp) - texp, err = newExporter(&c, logger, 5, component.NewDefaultBuildInfo().Version) + assert.NoError(t, texp.Close(context.Background())) + + fexp, err := newExporter(&c, logger, 5, component.NewDefaultBuildInfo().Version) assert.Error(t, err) - assert.Nil(t, texp) + assert.Nil(t, fexp) } func TestMetricsDataPusherStreaming(t *testing.T) { @@ -66,7 +72,8 @@ func TestMetricsDataPusherStreaming(t *testing.T) { } assert.NotNil(t, adxDataProducer) err := adxDataProducer.metricsDataPusher(context.Background(), createMetricsData(10)) - assert.NotNil(t, err) + assert.Error(t, err) + assert.NoError(t, adxDataProducer.Close(context.Background())) } func TestMetricsDataPusherQueued(t *testing.T) { @@ -84,7 +91,8 @@ func TestMetricsDataPusherQueued(t *testing.T) { } assert.NotNil(t, adxDataProducer) err := adxDataProducer.metricsDataPusher(context.Background(), createMetricsData(10)) - assert.NotNil(t, err) + assert.Error(t, err) + assert.NoError(t, adxDataProducer.Close(context.Background())) } func TestLogsDataPusher(t *testing.T) { @@ -102,7 +110,8 @@ func TestLogsDataPusher(t *testing.T) { } assert.NotNil(t, adxDataProducer) err := adxDataProducer.logsDataPusher(context.Background(), createLogsData()) - assert.NotNil(t, err) + assert.Error(t, err) + assert.NoError(t, adxDataProducer.Close(context.Background())) } func TestTracesDataPusher(t *testing.T) { @@ -120,7 +129,8 @@ func TestTracesDataPusher(t *testing.T) { } assert.NotNil(t, adxDataProducer) err := adxDataProducer.tracesDataPusher(context.Background(), createTracesData()) - assert.NotNil(t, err) + assert.Error(t, err) + assert.NoError(t, adxDataProducer.Close(context.Background())) } func TestClose(t *testing.T) { @@ -137,7 +147,7 @@ func TestClose(t *testing.T) { logger: logger, } err := adxDataProducer.Close(context.Background()) - assert.Nil(t, err) + assert.NoError(t, err) } func TestIngestedDataRecordCount(t *testing.T) { @@ -159,7 +169,7 @@ func TestIngestedDataRecordCount(t *testing.T) { err := adxDataProducer.metricsDataPusher(context.Background(), createMetricsData(recordstoingest)) ingestedrecordsactual := ingestor.Records() assert.Equal(t, recordstoingest, len(ingestedrecordsactual), "Number of metrics created should match number of records ingested") - assert.Nil(t, err) + assert.NoError(t, err) } func TestCreateKcsb(t *testing.T) { diff --git a/exporter/azuredataexplorerexporter/config.go b/exporter/azuredataexplorerexporter/config.go index 084566b8c76e..e6d92cbbaf5d 100644 --- a/exporter/azuredataexplorerexporter/config.go +++ b/exporter/azuredataexplorerexporter/config.go @@ -10,6 +10,7 @@ import ( "github.com/google/uuid" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -17,7 +18,7 @@ import ( type Config struct { exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` ClusterURI string `mapstructure:"cluster_uri"` ApplicationID string `mapstructure:"application_id"` ApplicationKey configopaque.String `mapstructure:"application_key"` diff --git a/exporter/azuredataexplorerexporter/config_test.go b/exporter/azuredataexplorerexporter/config_test.go index 9167568179ae..2c6667c3db61 100644 --- a/exporter/azuredataexplorerexporter/config_test.go +++ b/exporter/azuredataexplorerexporter/config_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -97,7 +98,7 @@ func TestLoadConfig(t *testing.T) { TimeoutSettings: exporterhelper.TimeoutSettings{ Timeout: 10 * time.Second, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, MaxInterval: 60 * time.Second, diff --git a/exporter/azuredataexplorerexporter/factory.go b/exporter/azuredataexplorerexporter/factory.go index ca77d82ea13e..e2a4ee4ac6b0 100644 --- a/exporter/azuredataexplorerexporter/factory.go +++ b/exporter/azuredataexplorerexporter/factory.go @@ -75,7 +75,7 @@ func createMetricsExporter( adxCfg, adp.metricsDataPusher, exporterhelper.WithTimeout(adxCfg.TimeoutSettings), - exporterhelper.WithRetry(adxCfg.RetrySettings), + exporterhelper.WithRetry(adxCfg.BackOffConfig), exporterhelper.WithQueue(adxCfg.QueueSettings), exporterhelper.WithShutdown(adp.Close)) @@ -107,7 +107,7 @@ func createTracesExporter( adxCfg, adp.tracesDataPusher, exporterhelper.WithTimeout(adxCfg.TimeoutSettings), - exporterhelper.WithRetry(adxCfg.RetrySettings), + exporterhelper.WithRetry(adxCfg.BackOffConfig), exporterhelper.WithQueue(adxCfg.QueueSettings), exporterhelper.WithShutdown(adp.Close)) @@ -139,7 +139,7 @@ func createLogsExporter( adxCfg, adp.logsDataPusher, exporterhelper.WithTimeout(adxCfg.TimeoutSettings), - exporterhelper.WithRetry(adxCfg.RetrySettings), + exporterhelper.WithRetry(adxCfg.BackOffConfig), exporterhelper.WithQueue(adxCfg.QueueSettings), exporterhelper.WithShutdown(adp.Close)) diff --git a/exporter/azuredataexplorerexporter/generated_component_test.go b/exporter/azuredataexplorerexporter/generated_component_test.go new file mode 100644 index 000000000000..dff9e46e372b --- /dev/null +++ b/exporter/azuredataexplorerexporter/generated_component_test.go @@ -0,0 +1,101 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package azuredataexplorerexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/azuredataexplorerexporter/go.mod b/exporter/azuredataexplorerexporter/go.mod index b7d6a649329a..ddb8604302e1 100644 --- a/exporter/azuredataexplorerexporter/go.mod +++ b/exporter/azuredataexplorerexporter/go.mod @@ -1,76 +1,87 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter -go 1.20 +go 1.21 require ( - github.com/Azure/azure-kusto-go v0.13.1 - github.com/google/uuid v1.4.0 + github.com/Azure/azure-kusto-go v0.15.2 + github.com/google/uuid v1.6.0 github.com/json-iterator/go v1.1.12 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( github.com/Azure/azure-pipeline-go v0.2.3 // indirect github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.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.2.0 // indirect - github.com/Azure/azure-storage-queue-go v0.0.0-20191125232315-636801874cdd // indirect + github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.28 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.22 // indirect + github.com/Azure/go-autorest/autorest v0.11.29 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/gofrs/uuid v4.2.0+incompatible // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect + github.com/golang-jwt/jwt/v5 v5.0.0 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/kylelemons/godebug v1.1.0 // indirect - github.com/mattn/go-ieproxy v0.0.1 // indirect + github.com/mattn/go-ieproxy v0.0.11 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/samber/lo v1.37.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/samber/lo v1.38.1 // indirect github.com/shopspring/decimal v1.3.1 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/azuredataexplorerexporter/go.sum b/exporter/azuredataexplorerexporter/go.sum index 78c498e3df41..1efaebd6f565 100644 --- a/exporter/azuredataexplorerexporter/go.sum +++ b/exporter/azuredataexplorerexporter/go.sum @@ -1,100 +1,78 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/Azure/azure-kusto-go v0.13.1 h1:0w4CmUTROT8qbLbKq921PhCb7mIfRFWeDu4iJxrNEOM= -github.com/Azure/azure-kusto-go v0.13.1/go.mod h1:AyWTO0r50y7rAkxkTveLtn80njNyXpJP5WADvoSZ/P4= +github.com/Azure/azure-kusto-go v0.15.2 h1:OlABJilic9TythSgWW6i8Fd0SgNTg0t9jBu6WVsaixM= +github.com/Azure/azure-kusto-go v0.15.2/go.mod h1:9F2zvXH8B6eWzgI1S4k1ZXAIufnBZ1bv1cW1kB1n3D0= github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U= github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 h1:8q4SaHjFsClSvuVne0ID/5Ka8u3fcIHyqkLjcFpNRHQ= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/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/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 h1:t5+QXLCK9SVi0PPdaY0PrFvYUo24KwA0QwxnaHRSVd4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 h1:LNHhpdK7hzUcx/k1LIcuh5k7k1LGIWLQfCjaneSj7Fc= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1/go.mod h1:uE9zaUfEQT/nbQjVi2IblCG9iaLtZsuYZ8ne+PuQ02M= 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/resourcemanager/storage/armstorage v1.2.0 h1:Ma67P/GGprNwsslzEH6+Kb8nybI8jpDTm4Wmzu2ReK8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0/go.mod h1:c+Lifp3EDEamAkPVzMooRNOK6CZjNSdEnf1A7jsI9u4= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 h1:gggzg0SUMs6SQbEw+3LoSsYf9YMjkupeAnHMX8O9mmY= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0/go.mod h1:+6KLcKIVgxoBDMqMO/Nvy7bZ9a0nbU3I1DtFQK3YvB4= -github.com/Azure/azure-storage-queue-go v0.0.0-20191125232315-636801874cdd h1:b3wyxBl3vvr15tUAziPBPK354y+LSdfPCpex5oBttHo= -github.com/Azure/azure-storage-queue-go v0.0.0-20191125232315-636801874cdd/go.mod h1:K6am8mT+5iFXgingS9LUc7TmbsW6XBw3nxaRyaMyWc8= +github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe h1:HGuouUM1533rBXmMtR7qh5pYNSSjUZG90b/MgJAnb/A= +github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe/go.mod h1:K6am8mT+5iFXgingS9LUc7TmbsW6XBw3nxaRyaMyWc8= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= -github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= -github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/adal v0.9.22 h1:/GblQdIudfEM3AWWZ0mrYJQSd7JS4S/Mbzh6F0ov0Xc= +github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= +github.com/Azure/go-autorest/autorest v0.11.29/go.mod h1:ZtEzC4Jy2JDrZLxvWs8LrBWEBycl1hbT1eknI8MtfAs= github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= +github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= +github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= +github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= -github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0 h1:hVeq+yCyUi+MsoO/CU95yqCIcdzra5ovzk8Q2BBpV2M= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +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/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= -github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= +github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= +github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= 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/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.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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -103,19 +81,19 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/mattn/go-ieproxy v0.0.1 h1:qiyop7gCflfhwCzGyeT0gro3sF9AIg9HU98JORTkqfI= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/mattn/go-ieproxy v0.0.11 h1:MQ/5BuGSgDAHZOJe6YY80IF2UVCfGkwfo6AeD7HtHYo= +github.com/mattn/go-ieproxy v0.0.11/go.mod h1:/NsJd+kxZBmjMc5hrJCKMbP57B84rvq9BiDRbtO9AS0= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -129,15 +107,18 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= +github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -146,86 +127,84 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE 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/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= +github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= -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/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -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/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= 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/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 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-20191112182307-2180aed22343/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.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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/sync v0.0.0-20220722155255-886fb9371eb4/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-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -234,60 +213,45 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/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.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.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-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/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 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/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.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/exporter/azuredataexplorerexporter/internal/metadata/generated_status.go b/exporter/azuredataexplorerexporter/internal/metadata/generated_status.go index 9e42ff39a993..7bc6416a120b 100644 --- a/exporter/azuredataexplorerexporter/internal/metadata/generated_status.go +++ b/exporter/azuredataexplorerexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("azuredataexplorer") ) const ( - Type = "azuredataexplorer" TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/azuredataexplorer") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/azuredataexplorer") +} diff --git a/exporter/azuredataexplorerexporter/metadata.yaml b/exporter/azuredataexplorerexporter/metadata.yaml index 7b7c031da4da..efc972b0b490 100644 --- a/exporter/azuredataexplorerexporter/metadata.yaml +++ b/exporter/azuredataexplorerexporter/metadata.yaml @@ -1,4 +1,5 @@ type: azuredataexplorer +scope_name: otelcol/azuredataexplorer status: class: exporter @@ -6,4 +7,13 @@ status: beta: [traces, metrics, logs] distributions: [contrib] codeowners: - active: [asaharn, ag-ramachandran] \ No newline at end of file + active: [asaharn, ag-ramachandran] + +# TODO: Update the exporter to pass the tests +tests: + config: + cluster_uri: "https://CLUSTER.kusto.windows.net" + application_id: "f80da32c-108c-415c-a19e-643f461a677a" + application_key: "xx-xx-xx-xx" + tenant_id: "21ff9e36-fbaa-43c8-98ba-00431ea10bc3" + skip_lifecycle: true \ No newline at end of file diff --git a/exporter/azuredataexplorerexporter/package_test.go b/exporter/azuredataexplorerexporter/package_test.go new file mode 100644 index 000000000000..37c834b440ea --- /dev/null +++ b/exporter/azuredataexplorerexporter/package_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package azuredataexplorerexporter + +import ( + "testing" + + "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")) +} diff --git a/exporter/azuremonitorexporter/AUTHENTICATION.md b/exporter/azuremonitorexporter/AUTHENTICATION.md index 8317edc1fc7f..c2c4b8dc8863 100644 --- a/exporter/azuremonitorexporter/AUTHENTICATION.md +++ b/exporter/azuremonitorexporter/AUTHENTICATION.md @@ -2,42 +2,41 @@ ## Local Authentication -The default authentication mechanism used by the Azure Monitor Exporter is "Local Authentication" - based solely on the Application Insights Instrumentation Key. An example of the exporters section of the configuration is +The default authentication mechanism used by the Azure Monitor Exporter is "Local Authentication", which relies exclusively on the `InstrumentationKey` obtained from the connection string of the Application Insights. Below is an illustrative example of the exporters section in a configuration file: ```yaml exporters: azuremonitor: - instrumentation_key: 00000000-0000-0000-0000-000000000000 + connection_string: "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://ingestion.azuremonitor.com/" ``` -Where the zero guid is replaced with the instrumentation key of your Application Insights instance. +Use the connection string from your Application Insights instance. The same can be achieved by using an environment variable to hold the key ```yaml exporters: azuremonitor: - instrumentation_key: ${env:APP_INSIGHTS_KEY} + connection_string: ${env:APPLICATIONINSIGHTS_CONNECTION_STRING} ``` ## AAD/Entra Authentication -Local Authentication can be disabled in [Application Insights](https://learn.microsoft.com/en-us/azure/azure-monitor/app/azure-ad-authentication) and an AAD based identity can be used in conjunction with the instrumentation key. The instrumentation key is still required by the Exporter, but it is no long sufficient to just have this in order to import data. +Local Authentication can be disabled in [Application Insights](https://learn.microsoft.com/en-us/azure/azure-monitor/app/azure-ad-authentication) and an AAD based identity can be used in conjunction with the instrumentation key. The Azure Monitor Exporter does not support this approach directly, but it can be used with the [AAD Authentication Proxy](https://github.com/Azure/aad-auth-proxy) from the Azure Monitor product group. The AAD Auth Proxy is a separate container/side-car that proxies calls to the Application Insights ingestion endpoint and attaches a bearer token to each call, asserting an AAD identity. This identity is managed by a certificate in the container that is registered with a Service Principal in AAD. -To use this, both Azure Monitor Exporter and the AAD Auth Proxy require specific configuration. In the Exporter's configuration, it is necessary to override the default endpoint used to send data to. In the following example, it is assumed the AAD Auth Proxy is listening on localhost:8081. +To integrate this setup, both the Azure Monitor Exporter and the AAD Auth Proxy must be configured appropriately. For the Exporter, replace the ingestion endpoint in the connection string with the proxy endpoint. For instance, if the AAD Auth Proxy listens on localhost:8081, configure as follows: ```yaml exporters: azuremonitor: - instrumentation_key: ${env:APP_INSIGHTS_KEY} - endpoint: http://localhost:8081/v2.1/track + connection_string: "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=http://localhost:8081" ``` -The key difference is this uses the `v2.1` endpoint, not the standard `v2` one. +The original `IngestionEndpoint` from the connection string needs to be set as the `TARGET_HOST` environment variable in the aad-auth-proxy configuration. In the docker compose file for AAD Auth Proxy, the following values need to be set: @@ -60,7 +59,7 @@ azuremonitor-ingestion-proxy: ``` - `AUDIENCE`: value is the generic Azure Monitor Scope. -- `TARGET_HOST`: the Application Insights IngestionEndpoint value from the Connection String, available in the Azure Portal. +- `TARGET_HOST`: the Application Insights `IngestionEndpoint` value from the Connection String, available in the Azure Portal. - `AAD_CLIENT_ID`: client id of the service principal representing the AAD identity to use. - `AAD_TENANT_ID`: id of the AAD Tenant the service principal exists in. - `AAD_CLIENT_CERTIFICATE_PATH`: path to the .pem certificate file containing the CERTIFICATE and PRIVATE KEY parts of the certificate registered with the service principal. diff --git a/exporter/azuremonitorexporter/README.md b/exporter/azuremonitorexporter/README.md index d2d5f1ed4f25..54bbea0df5f7 100644 --- a/exporter/azuremonitorexporter/README.md +++ b/exporter/azuremonitorexporter/README.md @@ -4,13 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces, metrics, logs | -| Distributions | [contrib], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fazuremonitor%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fazuremonitor) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fazuremonitor%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fazuremonitor) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@pcwiese](https://www.github.com/pcwiese) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector This exporter sends logs, traces and metrics to [Azure Monitor](https://docs.microsoft.com/azure/azure-monitor/). @@ -22,6 +21,14 @@ To configure the Azure Monitor Exporter, you must specify one of the following s - `connection_string` (recommended): The Azure Application Insights Connection String is required to send telemetry data to the monitoring service. It is the recommended method for configuring the exporter, aligning with Azure Monitor's best practices. If you need guidance on creating Azure resources, please refer to the step-by-step guides to [Create an Application Insights resource](https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource) and [find your connection string](https://docs.microsoft.com/azure/azure-monitor/app/sdk-connection-string?tabs=net#find-your-connection-string). - `instrumentation_key`: Application Insights instrumentation key, which can be found in the Application Insights resource in the Azure Portal. While it is currently supported, its use is discouraged and it is slated for deprecation. It is highly encouraged to use the `connection_string` setting for new configurations and migrate existing configurations to use the `connection_string` as soon as possible. +### Environment Variable Support + +In addition to the above configuration options, the Azure Monitor Exporter now supports setting the connection string via the `APPLICATIONINSIGHTS_CONNECTION_STRING` environment variable. This method is particularly useful for cloud or containerized environments where managing configuration through environment variables is standard practice. + +**Note:** If both the environment variable and the `connection_string` configuration option are provided, the environment variable takes precedence. + +### Configuration Options + **Important**: Only one of `connection_string` or `instrumentation_key` should be specified in your configuration. If both are provided, `connection_string` will be used as the priority setting. The following settings can be optionally configured: @@ -58,6 +65,15 @@ exporters: instrumentation_key: b1cd0778-85fc-4677-a3fa-79d3c23e0efd ``` +Example using environment variable: + +Ensure `APPLICATIONINSIGHTS_CONNECTION_STRING` is set in your environment, then configure the exporter without specifying a connection string or instrumentation key: + +```yaml +exporters: + azuremonitor: +``` + ## Attribute mapping ### Traces diff --git a/exporter/azuremonitorexporter/config_test.go b/exporter/azuremonitorexporter/config_test.go index 4eb5bc07022f..ba1e41f7fefb 100644 --- a/exporter/azuremonitorexporter/config_test.go +++ b/exporter/azuremonitorexporter/config_test.go @@ -23,7 +23,7 @@ func TestLoadConfig(t *testing.T) { cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) require.NoError(t, err) - disk := component.NewIDWithName("disk", "") + disk := component.MustNewIDWithName("disk", "") tests := []struct { id component.ID diff --git a/exporter/azuremonitorexporter/connection_string_parser.go b/exporter/azuremonitorexporter/connection_string_parser.go index 15b4f57827fc..064f09c8a6f6 100644 --- a/exporter/azuremonitorexporter/connection_string_parser.go +++ b/exporter/azuremonitorexporter/connection_string_parser.go @@ -6,6 +6,7 @@ package azuremonitorexporter // import "github.com/open-telemetry/opentelemetry- import ( "fmt" "net/url" + "os" "path" "strings" ) @@ -16,14 +17,22 @@ type ConnectionVars struct { } const ( - DefaultIngestionEndpoint = "https://dc.services.visualstudio.com/" - IngestionEndpointKey = "IngestionEndpoint" - InstrumentationKey = "InstrumentationKey" - ConnectionStringMaxLength = 4096 + ApplicationInsightsConnectionString = "APPLICATIONINSIGHTS_CONNECTION_STRING" + DefaultIngestionEndpoint = "https://dc.services.visualstudio.com/" + IngestionEndpointKey = "IngestionEndpoint" + InstrumentationKey = "InstrumentationKey" + ConnectionStringMaxLength = 4096 ) func parseConnectionString(exporterConfig *Config) (*ConnectionVars, error) { - connectionString := string(exporterConfig.ConnectionString) + // First, try to get the connection string from the environment variable + connectionString := os.Getenv(ApplicationInsightsConnectionString) + + // If not found in the environment, use the one from the configuration + if connectionString == "" { + connectionString = string(exporterConfig.ConnectionString) + } + instrumentationKey := string(exporterConfig.InstrumentationKey) connectionVars := &ConnectionVars{} @@ -75,6 +84,6 @@ func getIngestionURL(ingestionEndpoint string) string { ingestionURL, _ = url.Parse(DefaultIngestionEndpoint) } - ingestionURL.Path = path.Join(ingestionURL.Path, "/v2/track") + ingestionURL.Path = path.Join(ingestionURL.Path, "/v2.1/track") return ingestionURL.String() } diff --git a/exporter/azuremonitorexporter/connection_string_parser_test.go b/exporter/azuremonitorexporter/connection_string_parser_test.go index ad8315f49159..dd0adb373c0b 100644 --- a/exporter/azuremonitorexporter/connection_string_parser_test.go +++ b/exporter/azuremonitorexporter/connection_string_parser_test.go @@ -4,6 +4,7 @@ package azuremonitorexporter import ( + "os" "strings" "testing" @@ -15,6 +16,7 @@ import ( func TestParseConnectionString(t *testing.T) { tests := []struct { name string + envValue string config *Config want *ConnectionVars wantError bool @@ -27,7 +29,7 @@ func TestParseConnectionString(t *testing.T) { }, want: &ConnectionVars{ InstrumentationKey: "00000000-0000-0000-0000-000000000000", - IngestionURL: "https://ingestion.azuremonitor.com/v2/track", + IngestionURL: "https://ingestion.azuremonitor.com/v2.1/track", }, wantError: false, }, @@ -38,7 +40,7 @@ func TestParseConnectionString(t *testing.T) { }, want: &ConnectionVars{ InstrumentationKey: "00000000-0000-0000-0000-000000000000", - IngestionURL: DefaultIngestionEndpoint + "v2/track", + IngestionURL: DefaultIngestionEndpoint + "v2.1/track", }, wantError: false, }, @@ -49,7 +51,7 @@ func TestParseConnectionString(t *testing.T) { }, want: &ConnectionVars{ InstrumentationKey: "00000000-0000-0000-0000-000000000000", - IngestionURL: "https://ingestion.azuremonitor.com/v2/track", + IngestionURL: "https://ingestion.azuremonitor.com/v2.1/track", }, wantError: false, }, @@ -93,7 +95,7 @@ func TestParseConnectionString(t *testing.T) { }, want: &ConnectionVars{ InstrumentationKey: "00000000-0000-0000-0000-000000000000", - IngestionURL: "https://ingestion.azuremonitor.com/v2/track", + IngestionURL: "https://ingestion.azuremonitor.com/v2.1/track", }, wantError: false, }, @@ -104,7 +106,7 @@ func TestParseConnectionString(t *testing.T) { }, want: &ConnectionVars{ InstrumentationKey: "00000000-0000-0000-0000-000000000000", - IngestionURL: "https://ingestion.azuremonitor.com/v2/track", + IngestionURL: "https://ingestion.azuremonitor.com/v2.1/track", }, wantError: false, }, @@ -116,10 +118,38 @@ func TestParseConnectionString(t *testing.T) { want: nil, wantError: true, }, + { + name: "Environment variable only", + envValue: "InstrumentationKey=00000000-0000-0000-0000-00000000ENV;IngestionEndpoint=https://ingestion.env.azuremonitor.com/", + config: &Config{}, + want: &ConnectionVars{ + InstrumentationKey: "00000000-0000-0000-0000-00000000ENV", + IngestionURL: "https://ingestion.env.azuremonitor.com/v2.1/track", + }, + wantError: false, + }, + { + name: "Environment variable override", + envValue: "InstrumentationKey=00000000-0000-0000-0000-00000000ENV;IngestionEndpoint=https://ingestion.override.azuremonitor.com/", + config: &Config{ + ConnectionString: "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://ingestion.azuremonitor.com/", + InstrumentationKey: "00000000-0000-0000-0000-00000000IKEY", + }, + want: &ConnectionVars{ + InstrumentationKey: "00000000-0000-0000-0000-00000000ENV", + IngestionURL: "https://ingestion.override.azuremonitor.com/v2.1/track", + }, + wantError: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + if tt.envValue != "" { + os.Setenv(ApplicationInsightsConnectionString, tt.envValue) + defer os.Unsetenv(ApplicationInsightsConnectionString) + } + got, err := parseConnectionString(tt.config) if tt.wantError { require.Error(t, err, "Expected an error but got none") diff --git a/exporter/azuremonitorexporter/factory_test.go b/exporter/azuremonitorexporter/factory_test.go index 5fa5bd0f2f86..9572b67168f9 100644 --- a/exporter/azuremonitorexporter/factory_test.go +++ b/exporter/azuremonitorexporter/factory_test.go @@ -24,7 +24,7 @@ func TestCreateTracesExporterUsingSpecificTransportChannel(t *testing.T) { config.ConnectionString = "InstrumentationKey=test-key;IngestionEndpoint=https://test-endpoint/" exporter, err := f.createTracesExporter(ctx, params, config) assert.NotNil(t, exporter) - assert.Nil(t, err) + assert.NoError(t, err) } func TestCreateTracesExporterUsingDefaultTransportChannel(t *testing.T) { @@ -36,7 +36,7 @@ func TestCreateTracesExporterUsingDefaultTransportChannel(t *testing.T) { config.ConnectionString = "InstrumentationKey=test-key;IngestionEndpoint=https://test-endpoint/" exporter, err := f.createTracesExporter(ctx, exportertest.NewNopCreateSettings(), config) assert.NotNil(t, exporter) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, f.tChannel) } @@ -51,5 +51,5 @@ func TestCreateTracesExporterUsingBadConfig(t *testing.T) { exporter, err := f.createTracesExporter(ctx, params, badConfig) assert.Nil(t, exporter) - assert.NotNil(t, err) + assert.Error(t, err) } diff --git a/exporter/azuremonitorexporter/generated_component_test.go b/exporter/azuremonitorexporter/generated_component_test.go new file mode 100644 index 000000000000..d2d202bfd315 --- /dev/null +++ b/exporter/azuremonitorexporter/generated_component_test.go @@ -0,0 +1,140 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package azuremonitorexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/azuremonitorexporter/go.mod b/exporter/azuremonitorexporter/go.mod index 0180c33ec43b..d35810d3fb6a 100644 --- a/exporter/azuremonitorexporter/go.mod +++ b/exporter/azuremonitorexporter/go.mod @@ -1,56 +1,66 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter -go 1.20 +go 1.21 require ( github.com/microsoft/ApplicationInsights-Go v0.4.4 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 - golang.org/x/net v0.18.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/zap v1.27.0 + golang.org/x/net v0.24.0 ) require ( code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gofrs/uuid v4.0.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/stretchr/objx v0.5.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/azuremonitorexporter/go.sum b/exporter/azuremonitorexporter/go.sum index 1b0d9b59664a..39d3f7eba100 100644 --- a/exporter/azuremonitorexporter/go.sum +++ b/exporter/azuremonitorexporter/go.sum @@ -1,60 +1,37 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c h1:5eeuG0BHx1+DHeT3AP+ISKZ2ht1UjGhm581ljqYpVeQ= code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -64,20 +41,19 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/microsoft/ApplicationInsights-Go v0.4.4 h1:G4+H9WNs6ygSCe6sUyxRc2U81TI5Es90b2t/MwX5KqY= github.com/microsoft/ApplicationInsights-Go v0.4.4/go.mod h1:fKRUseBqkw6bDiXTs3ESTiU/4YTIHsQS4W3fP2ieF4U= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -90,109 +66,96 @@ github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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-20180906233101-161cd47e91fd/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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-20180909124046-d0be0721c37e/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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -200,42 +163,20 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.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= -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/exporter/azuremonitorexporter/internal/metadata/generated_status.go b/exporter/azuremonitorexporter/internal/metadata/generated_status.go index 5dd0580e914d..f11bc387284c 100644 --- a/exporter/azuremonitorexporter/internal/metadata/generated_status.go +++ b/exporter/azuremonitorexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("azuremonitor") ) const ( - Type = "azuremonitor" TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/azuremonitor") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/azuremonitor") +} diff --git a/exporter/azuremonitorexporter/metadata.yaml b/exporter/azuremonitorexporter/metadata.yaml index f6b86a88aac0..7ea9d35e4e82 100644 --- a/exporter/azuremonitorexporter/metadata.yaml +++ b/exporter/azuremonitorexporter/metadata.yaml @@ -1,9 +1,16 @@ type: azuremonitor +scope_name: otelcol/azuremonitor status: class: exporter stability: beta: [traces, metrics, logs] - distributions: [contrib, observiq] + distributions: [contrib] codeowners: - active: [pcwiese] \ No newline at end of file + active: [pcwiese] + +tests: + config: + connection_string: "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://ingestion.azuremonitor.com/" + instrumentation_key: b1cd0778-85fc-4677-a3fa-79d3c23e0efd + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/azuremonitorexporter/trace_to_envelope.go b/exporter/azuremonitorexporter/trace_to_envelope.go index 0ee4df804355..2daa54d26790 100644 --- a/exporter/azuremonitorexporter/trace_to_envelope.go +++ b/exporter/azuremonitorexporter/trace_to_envelope.go @@ -191,7 +191,6 @@ func spanToRequestData(span ptrace.Span, incomingSpanType spanType) *contracts.R data.Name = span.Name() data.Duration = formatSpanDuration(span) data.Properties = make(map[string]string) - data.Measurements = make(map[string]float64) data.ResponseCode, data.Success = getDefaultFormattedSpanStatus(span.Status()) switch incomingSpanType { @@ -202,7 +201,7 @@ func spanToRequestData(span ptrace.Span, incomingSpanType spanType) *contracts.R case messagingSpanType: fillRequestDataMessaging(span, data) case unknownSpanType: - copyAttributesWithoutMapping(span.Attributes(), data.Properties, data.Measurements) + copyAttributesWithoutMapping(span.Attributes(), data.Properties) } return data @@ -218,7 +217,6 @@ func spanToRemoteDependencyData(span ptrace.Span, incomingSpanType spanType) *co data.ResultCode, data.Success = getDefaultFormattedSpanStatus(span.Status()) data.Duration = formatSpanDuration(span) data.Properties = make(map[string]string) - data.Measurements = make(map[string]float64) switch incomingSpanType { case httpSpanType: @@ -230,7 +228,7 @@ func spanToRemoteDependencyData(span ptrace.Span, incomingSpanType spanType) *co case messagingSpanType: fillRemoteDependencyDataMessaging(span, data) case unknownSpanType: - copyAttributesWithoutMapping(span.Attributes(), data.Properties, data.Measurements) + copyAttributesWithoutMapping(span.Attributes(), data.Properties) } return data @@ -240,9 +238,8 @@ func spanToRemoteDependencyData(span ptrace.Span, incomingSpanType spanType) *co func spanEventToExceptionData(spanEvent ptrace.SpanEvent) *contracts.ExceptionData { data := contracts.NewExceptionData() data.Properties = make(map[string]string) - data.Measurements = make(map[string]float64) - attrs := copyAndExtractExceptionAttributes(spanEvent.Attributes(), data.Properties, data.Measurements) + attrs := copyAndExtractExceptionAttributes(spanEvent.Attributes(), data.Properties) details := contracts.NewExceptionDetails() details.TypeName = attrs.ExceptionType @@ -262,7 +259,7 @@ func spanEventToMessageData(spanEvent ptrace.SpanEvent) *contracts.MessageData { data.Message = spanEvent.Name() data.Properties = make(map[string]string) - copyAttributesWithoutMapping(spanEvent.Attributes(), data.Properties, nil) + copyAttributesWithoutMapping(spanEvent.Attributes(), data.Properties) return data } @@ -274,7 +271,7 @@ func getFormattedHTTPStatusValues(statusCode int64) (statusAsString string, succ // Maps HTTP Server Span to AppInsights RequestData // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#semantic-conventions-for-http-spans func fillRequestDataHTTP(span ptrace.Span, data *contracts.RequestData) { - attrs := copyAndExtractHTTPAttributes(span.Attributes(), data.Properties, data.Measurements) + attrs := copyAndExtractHTTPAttributes(span.Attributes(), data.Properties) if attrs.HTTPStatusCode != 0 { data.ResponseCode, data.Success = getFormattedHTTPStatusValues(attrs.HTTPStatusCode) @@ -361,7 +358,7 @@ func fillRequestDataHTTP(span ptrace.Span, data *contracts.RequestData) { // Maps HTTP Client Span to AppInsights RemoteDependencyData // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md func fillRemoteDependencyDataHTTP(span ptrace.Span, data *contracts.RemoteDependencyData) { - attrs := copyAndExtractHTTPAttributes(span.Attributes(), data.Properties, data.Measurements) + attrs := copyAndExtractHTTPAttributes(span.Attributes(), data.Properties) data.Type = "HTTP" if attrs.HTTPStatusCode != 0 { @@ -449,7 +446,7 @@ func fillRemoteDependencyDataHTTP(span ptrace.Span, data *contracts.RemoteDepend // Maps RPC Server Span to AppInsights RequestData // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/rpc.md func fillRequestDataRPC(span ptrace.Span, data *contracts.RequestData) { - attrs := copyAndExtractRPCAttributes(span.Attributes(), data.Properties, data.Measurements) + attrs := copyAndExtractRPCAttributes(span.Attributes(), data.Properties) data.ResponseCode = getRPCStatusCodeAsString(attrs) @@ -475,7 +472,7 @@ func fillRequestDataRPC(span ptrace.Span, data *contracts.RequestData) { // Maps RPC Client Span to AppInsights RemoteDependencyData // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/rpc.md func fillRemoteDependencyDataRPC(span ptrace.Span, data *contracts.RemoteDependencyData) { - attrs := copyAndExtractRPCAttributes(span.Attributes(), data.Properties, data.Measurements) + attrs := copyAndExtractRPCAttributes(span.Attributes(), data.Properties) data.ResultCode = getRPCStatusCodeAsString(attrs) @@ -501,7 +498,7 @@ func getRPCStatusCodeAsString(rpcAttributes *RPCAttributes) (statusCodeAsString // Maps Database Client Span to AppInsights RemoteDependencyData // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md func fillRemoteDependencyDataDatabase(span ptrace.Span, data *contracts.RemoteDependencyData) { - attrs := copyAndExtractDatabaseAttributes(span.Attributes(), data.Properties, data.Measurements) + attrs := copyAndExtractDatabaseAttributes(span.Attributes(), data.Properties) data.Type = attrs.DBSystem @@ -519,7 +516,7 @@ func fillRemoteDependencyDataDatabase(span ptrace.Span, data *contracts.RemoteDe // Maps Messaging Consumer/Server Span to AppInsights RequestData // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/messaging.md func fillRequestDataMessaging(span ptrace.Span, data *contracts.RequestData) { - attrs := copyAndExtractMessagingAttributes(span.Attributes(), data.Properties, data.Measurements) + attrs := copyAndExtractMessagingAttributes(span.Attributes(), data.Properties) // TODO Understand how to map attributes to RequestData fields if attrs.MessagingURL != "" { @@ -534,7 +531,7 @@ func fillRequestDataMessaging(span ptrace.Span, data *contracts.RequestData) { // Maps Messaging Producer/Client Span to AppInsights RemoteDependencyData // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/messaging.md func fillRemoteDependencyDataMessaging(span ptrace.Span, data *contracts.RemoteDependencyData) { - attrs := copyAndExtractMessagingAttributes(span.Attributes(), data.Properties, data.Measurements) + attrs := copyAndExtractMessagingAttributes(span.Attributes(), data.Properties) // TODO Understand how to map attributes to RemoteDependencyData fields data.Data = attrs.MessagingURL @@ -553,11 +550,10 @@ func fillRemoteDependencyDataMessaging(span ptrace.Span, data *contracts.RemoteD func copyAndMapAttributes( attributeMap pcommon.Map, properties map[string]string, - measurements map[string]float64, mappingFunc func(k string, v pcommon.Value)) { attributeMap.Range(func(k string, v pcommon.Value) bool { - setAttributeValueAsPropertyOrMeasurement(k, v, properties, measurements) + setAttributeValueAsProperty(k, v, properties) if mappingFunc != nil { mappingFunc(k, v) } @@ -568,23 +564,20 @@ func copyAndMapAttributes( // Copies all attributes to either properties or measurements without any kind of mapping to a known set of attributes func copyAttributesWithoutMapping( attributeMap pcommon.Map, - properties map[string]string, - measurements map[string]float64) { + properties map[string]string) { - copyAndMapAttributes(attributeMap, properties, measurements, nil) + copyAndMapAttributes(attributeMap, properties, nil) } // Attribute extraction logic for HTTP Span attributes func copyAndExtractHTTPAttributes( attributeMap pcommon.Map, - properties map[string]string, - measurements map[string]float64) *HTTPAttributes { + properties map[string]string) *HTTPAttributes { attrs := &HTTPAttributes{} copyAndMapAttributes( attributeMap, properties, - measurements, func(k string, v pcommon.Value) { attrs.MapAttribute(k, v) }) return attrs @@ -593,14 +586,12 @@ func copyAndExtractHTTPAttributes( // Attribute extraction logic for RPC Span attributes func copyAndExtractRPCAttributes( attributeMap pcommon.Map, - properties map[string]string, - measurements map[string]float64) *RPCAttributes { + properties map[string]string) *RPCAttributes { attrs := &RPCAttributes{} copyAndMapAttributes( attributeMap, properties, - measurements, func(k string, v pcommon.Value) { attrs.MapAttribute(k, v) }) return attrs @@ -609,14 +600,12 @@ func copyAndExtractRPCAttributes( // Attribute extraction logic for Database Span attributes func copyAndExtractDatabaseAttributes( attributeMap pcommon.Map, - properties map[string]string, - measurements map[string]float64) *DatabaseAttributes { + properties map[string]string) *DatabaseAttributes { attrs := &DatabaseAttributes{} copyAndMapAttributes( attributeMap, properties, - measurements, func(k string, v pcommon.Value) { attrs.MapAttribute(k, v) }) return attrs @@ -625,14 +614,12 @@ func copyAndExtractDatabaseAttributes( // Attribute extraction logic for Messaging Span attributes func copyAndExtractMessagingAttributes( attributeMap pcommon.Map, - properties map[string]string, - measurements map[string]float64) *MessagingAttributes { + properties map[string]string) *MessagingAttributes { attrs := &MessagingAttributes{} copyAndMapAttributes( attributeMap, properties, - measurements, func(k string, v pcommon.Value) { attrs.MapAttribute(k, v) }) return attrs @@ -641,14 +628,12 @@ func copyAndExtractMessagingAttributes( // Attribute extraction logic for Span event exception attributes func copyAndExtractExceptionAttributes( attributeMap pcommon.Map, - properties map[string]string, - measurements map[string]float64) *ExceptionAttributes { + properties map[string]string) *ExceptionAttributes { attrs := &ExceptionAttributes{} copyAndMapAttributes( attributeMap, properties, - measurements, func(k string, v pcommon.Value) { attrs.MapAttribute(k, v) }) return attrs @@ -715,13 +700,10 @@ func writeFormattedPeerAddressFromNetworkAttributes(networkAttributes *NetworkAt } } -// Sets the attribute value as a property or measurement. -// Int and floats go to measurements if measurements is not nil, otherwise everything goes to properties. -func setAttributeValueAsPropertyOrMeasurement( +func setAttributeValueAsProperty( key string, attributeValue pcommon.Value, - properties map[string]string, - measurements map[string]float64) { + properties map[string]string) { switch attributeValue.Type() { case pcommon.ValueTypeBool: @@ -731,18 +713,10 @@ func setAttributeValueAsPropertyOrMeasurement( properties[key] = attributeValue.Str() case pcommon.ValueTypeInt: - if measurements == nil { - properties[key] = strconv.FormatInt(attributeValue.Int(), 10) - } else { - measurements[key] = float64(attributeValue.Int()) - } + properties[key] = strconv.FormatInt(attributeValue.Int(), 10) case pcommon.ValueTypeDouble: - if measurements == nil { - properties[key] = strconv.FormatFloat(attributeValue.Double(), 'f', -1, 64) - } else { - measurements[key] = attributeValue.Double() - } + properties[key] = strconv.FormatFloat(attributeValue.Double(), 'f', -1, 64) } } diff --git a/exporter/azuremonitorexporter/trace_to_envelope_test.go b/exporter/azuremonitorexporter/trace_to_envelope_test.go index b575971b9b6b..25f7473a674e 100644 --- a/exporter/azuremonitorexporter/trace_to_envelope_test.go +++ b/exporter/azuremonitorexporter/trace_to_envelope_test.go @@ -589,7 +589,7 @@ func commonRequestDataValidations( span ptrace.Span, data *contracts.RequestData) { - assertAttributesCopiedToPropertiesOrMeasurements(t, span.Attributes(), data.Properties, data.Measurements) + assertAttributesCopiedToProperties(t, span.Attributes(), data.Properties) assert.Equal(t, defaultSpanIDAsHex, data.Id) assert.Equal(t, defaultSpanDuration, data.Duration) @@ -616,7 +616,7 @@ func commonRemoteDependencyDataValidations( span ptrace.Span, data *contracts.RemoteDependencyData) { - assertAttributesCopiedToPropertiesOrMeasurements(t, span.Attributes(), data.Properties, data.Measurements) + assertAttributesCopiedToProperties(t, span.Attributes(), data.Properties) assert.Equal(t, defaultSpanIDAsHex, data.Id) assert.Equal(t, defaultSpanDuration, data.Duration) } @@ -711,35 +711,29 @@ func defaultInternalRemoteDependencyDataValidations( span ptrace.Span, data *contracts.RemoteDependencyData) { - assertAttributesCopiedToPropertiesOrMeasurements(t, span.Attributes(), data.Properties, data.Measurements) + assertAttributesCopiedToProperties(t, span.Attributes(), data.Properties) assert.Equal(t, "InProc", data.Type) } -// Verifies that all attributes are copies to either the properties or measurements maps of the envelope's data element -func assertAttributesCopiedToPropertiesOrMeasurements( +// Verifies that all attributes are copies to either the properties maps of the envelope's data element +func assertAttributesCopiedToProperties( t *testing.T, attributeMap pcommon.Map, - properties map[string]string, - measurements map[string]float64) { + properties map[string]string) { attributeMap.Range(func(k string, v pcommon.Value) bool { + p, exists := properties[k] + assert.True(t, exists) + switch v.Type() { case pcommon.ValueTypeStr: - p, exists := properties[k] - assert.True(t, exists) assert.Equal(t, v.Str(), p) case pcommon.ValueTypeBool: - p, exists := properties[k] - assert.True(t, exists) assert.Equal(t, strconv.FormatBool(v.Bool()), p) case pcommon.ValueTypeInt: - m, exists := measurements[k] - assert.True(t, exists) - assert.Equal(t, float64(v.Int()), m) + assert.Equal(t, strconv.FormatInt(v.Int(), 10), p) case pcommon.ValueTypeDouble: - m, exists := measurements[k] - assert.True(t, exists) - assert.Equal(t, v.Double(), m) + assert.Equal(t, strconv.FormatFloat(v.Double(), 'f', -1, 64), p) } return true }) diff --git a/exporter/carbonexporter/README.md b/exporter/carbonexporter/README.md index 327a66fda990..17d5dbc1236b 100644 --- a/exporter/carbonexporter/README.md +++ b/exporter/carbonexporter/README.md @@ -4,14 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: metrics | -| Distributions | [contrib], [observiq], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fcarbon%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fcarbon) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fcarbon%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fcarbon) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@aboguszewski-sumo](https://www.github.com/aboguszewski-sumo) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector The [Carbon](https://github.com/graphite-project/carbon) exporter supports @@ -24,8 +22,6 @@ The following settings are required: - `endpoint` (default = `localhost:2003`): Address and port that the exporter should send data to. -- `timeout` (default = `5s`): Maximum duration allowed to connect - and send data to the configured `endpoint`. Example: @@ -45,3 +41,10 @@ exporters: The full list of settings exposed for this receiver are documented [here](./config.go) with detailed sample configurations [here](./testdata/config.yaml). + +## Advanced Configuration + +Several helper files are leveraged to provide additional capabilities automatically: + +- [net settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/confignet/README.md) +- [Queuing, retry and timeout settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md) diff --git a/exporter/carbonexporter/config.go b/exporter/carbonexporter/config.go index ead7eee80219..de3d0f75e08d 100644 --- a/exporter/carbonexporter/config.go +++ b/exporter/carbonexporter/config.go @@ -7,26 +7,30 @@ import ( "errors" "fmt" "net" - "time" -) -// Defaults for not specified configuration settings. -const ( - DefaultEndpoint = "localhost:2003" - DefaultSendTimeout = 5 * time.Second + "go.opentelemetry.io/collector/config/confignet" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/exporter/exporterhelper" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry" ) // Config defines configuration for Carbon exporter. type Config struct { - - // Endpoint specifies host and port to send metrics in the Carbon plaintext - // format. The default value is defined by the DefaultEndpoint constant. - Endpoint string `mapstructure:"endpoint"` + // Specifies the connection endpoint config. The default value is "localhost:2003". + confignet.TCPAddrConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + // MaxIdleConns is used to set a limit to the maximum idle TCP connections the client can keep open. Default value is 100. + // If `sending_queue` is enabled, it is recommended to use same value as `sending_queue::num_consumers`. + MaxIdleConns int `mapstructure:"max_idle_conns"` // Timeout is the maximum duration allowed to connecting and sending the - // data to the Carbon/Graphite backend. - // The default value is defined by the DefaultSendTimeout constant. - Timeout time.Duration `mapstructure:"timeout"` + // data to the Carbon/Graphite backend. The default value is 5s. + exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + QueueConfig exporterhelper.QueueSettings `mapstructure:"sending_queue"` + RetryConfig configretry.BackOffConfig `mapstructure:"retry_on_failure"` + + // ResourceToTelemetrySettings defines configuration for converting resource attributes to metric labels. + ResourceToTelemetryConfig resourcetotelemetry.Settings `mapstructure:"resource_to_telemetry_conversion"` } func (cfg *Config) Validate() error { @@ -38,7 +42,11 @@ func (cfg *Config) Validate() error { // Negative timeouts are not acceptable, since all sends will fail. if cfg.Timeout < 0 { - return errors.New("exporter requires a positive timeout") + return errors.New("'timeout' must be non-negative") + } + + if cfg.MaxIdleConns < 0 { + return errors.New("'max_idle_conns' must be non-negative") } return nil diff --git a/exporter/carbonexporter/config_test.go b/exporter/carbonexporter/config_test.go index 07cfaf48e42b..767908147d08 100644 --- a/exporter/carbonexporter/config_test.go +++ b/exporter/carbonexporter/config_test.go @@ -11,9 +11,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/confignet" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry" ) func TestLoadConfig(t *testing.T) { @@ -35,8 +39,29 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "allsettings"), expected: &Config{ - Endpoint: "localhost:8080", - Timeout: 10 * time.Second, + TCPAddrConfig: confignet.TCPAddrConfig{ + Endpoint: "localhost:8080", + }, + MaxIdleConns: 15, + TimeoutSettings: exporterhelper.TimeoutSettings{ + Timeout: 10 * time.Second, + }, + RetryConfig: configretry.BackOffConfig{ + Enabled: true, + InitialInterval: 10 * time.Second, + RandomizationFactor: 0.7, + Multiplier: 3.14, + MaxInterval: 1 * time.Minute, + MaxElapsedTime: 10 * time.Minute, + }, + QueueConfig: exporterhelper.QueueSettings{ + Enabled: true, + NumConsumers: 2, + QueueSize: 10, + }, + ResourceToTelemetryConfig: resourcetotelemetry.Settings{ + Enabled: true, + }, }, }, } @@ -69,14 +94,27 @@ func TestValidateConfig(t *testing.T) { { name: "invalid_tcp_addr", config: &Config{ - Endpoint: "http://localhost:2003", + TCPAddrConfig: confignet.TCPAddrConfig{ + Endpoint: "http://localhost:2003", + }, }, wantErr: true, }, { name: "invalid_timeout", config: &Config{ - Timeout: -5 * time.Second, + TCPAddrConfig: confignet.TCPAddrConfig{Endpoint: defaultEndpoint}, + TimeoutSettings: exporterhelper.TimeoutSettings{ + Timeout: -5 * time.Second, + }, + }, + wantErr: true, + }, + { + name: "invalid_max_idle_conns", + config: &Config{ + TCPAddrConfig: confignet.TCPAddrConfig{Endpoint: defaultEndpoint}, + MaxIdleConns: -1, }, wantErr: true, }, diff --git a/exporter/carbonexporter/exporter.go b/exporter/carbonexporter/exporter.go index e6a8fbc62ccb..a0c6610ba746 100644 --- a/exporter/carbonexporter/exporter.go +++ b/exporter/carbonexporter/exporter.go @@ -9,145 +9,196 @@ import ( "sync" "time" + "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/pdata/pmetric" + "go.uber.org/multierr" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry" ) // newCarbonExporter returns a new Carbon exporter. -func newCarbonExporter(cfg *Config, set exporter.CreateSettings) (exporter.Metrics, error) { +func newCarbonExporter(ctx context.Context, cfg *Config, set exporter.CreateSettings) (exporter.Metrics, error) { sender := carbonSender{ - connPool: newTCPConnPool(cfg.Endpoint, cfg.Timeout), + writeTimeout: cfg.Timeout, + conns: newConnPool(cfg.TCPAddrConfig, cfg.Timeout, cfg.MaxIdleConns), } - return exporterhelper.NewMetricsExporter( - context.TODO(), + exp, err := exporterhelper.NewMetricsExporter( + ctx, set, cfg, sender.pushMetricsData, + // We don't use exporterhelper.WithTimeout because the TCP connection does not accept writing with context. + exporterhelper.WithQueue(cfg.QueueConfig), + exporterhelper.WithRetry(cfg.RetryConfig), exporterhelper.WithShutdown(sender.Shutdown)) + if err != nil { + return nil, err + } + + return resourcetotelemetry.WrapMetricsExporter(cfg.ResourceToTelemetryConfig, exp), nil } // carbonSender is the struct tying the translation function and the TCP // connections into an implementations of exporterhelper.PushMetricsData so // the exporter can leverage the helper and get consistent observability. type carbonSender struct { - connPool *connPool + writeTimeout time.Duration + conns connPool } func (cs *carbonSender) pushMetricsData(_ context.Context, md pmetric.Metrics) error { lines := metricDataToPlaintext(md) - if _, err := cs.connPool.Write([]byte(lines)); err != nil { - // Use the sum of converted and dropped since the write failed for all. + // There is no way to do a call equivalent to recvfrom with an empty buffer + // to check if the connection was terminated (if the size of the buffer is + // 0 the Read call doesn't call lower level). So due to buffer sizes it is + // possible that a write will succeed on a connection that was already + // closed by the server. + // + // At least on Darwin it is possible to work around this by configuring the + // buffer on each call, ie.: + // + // if err = conn.SetWriteBuffer(len(bytes)-1); err != nil { + // return 0, err + // } + // + // However, this causes a performance penalty of ~10% cpu and it is not + // present in various implementations of Carbon clients. Considering these + // facts this "workaround" is not being added at this moment. If it is + // needed in some scenarios the workaround should be validated on other + // platforms and offered as a configuration setting. + conn, err := cs.conns.get() + if err != nil { return err } + if err = conn.SetWriteDeadline(time.Now().Add(cs.writeTimeout)); err != nil { + // Do not re-enqueue the connection since it failed to set a deadline. + return multierr.Append(err, conn.Close()) + } + + // If we did not write all bytes will get an error, so no need to check for that. + _, err = conn.Write([]byte(lines)) + if err != nil { + // Do not re-enqueue the connection since it failed to write. + return multierr.Append(err, conn.Close()) + } + + // Even if we close the connection because of the max idle connections, + cs.conns.put(conn) return nil } func (cs *carbonSender) Shutdown(context.Context) error { - cs.connPool.Close() - return nil + return cs.conns.close() } -// connPool is a very simple implementation of a pool of net.TCPConn instances. -// The implementation hides the pool and exposes a Write and Close methods. -// It leverages the prior art from SignalFx Gateway (see -// https://github.com/signalfx/gateway/blob/master/protocol/carbon/conn_pool.go -// but not its implementation). -// -// It keeps a unbounded "stack" of TCPConn instances always "popping" the most -// recently returned to the pool. There is no accounting to terminating old -// unused connections as that was the case on the prior art mentioned above. -type connPool struct { - mtx sync.Mutex - conns []*net.TCPConn - endpoint string - timeout time.Duration +// connPool is a very simple implementation of a pool of net.Conn instances. +type connPool interface { + get() (net.Conn, error) + put(conn net.Conn) + close() error } -func newTCPConnPool( - endpoint string, +func newConnPool( + tcpConfig confignet.TCPAddrConfig, timeout time.Duration, -) *connPool { - return &connPool{ - endpoint: endpoint, - timeout: timeout, + maxIdleConns int, +) connPool { + if maxIdleConns == 0 { + return &nopConnPool{ + timeout: timeout, + tcpConfig: tcpConfig, + } + } + return &connPoolWithIdle{ + timeout: timeout, + tcpConfig: tcpConfig, + maxIdleConns: maxIdleConns, } } -func (cp *connPool) Write(bytes []byte) (int, error) { - var conn *net.TCPConn - var err error +// nopConnPool is a very simple implementation that does not cache any net.Conn. +type nopConnPool struct { + timeout time.Duration + tcpConfig confignet.TCPAddrConfig +} - // The deferred function below is what puts back connections on the pool. - defer func() { - if err == nil { - cp.mtx.Lock() - cp.conns = append(cp.conns, conn) - cp.mtx.Unlock() - } else if conn != nil { - conn.Close() - } - }() +func (cp *nopConnPool) get() (net.Conn, error) { + return createTCPConn(cp.tcpConfig, cp.timeout) +} - start := time.Now() - cp.mtx.Lock() - lastIdx := len(cp.conns) - 1 - if lastIdx >= 0 { - conn = cp.conns[lastIdx] - cp.conns = cp.conns[0:lastIdx] - } - cp.mtx.Unlock() - if conn == nil { - if conn, err = cp.createTCPConn(); err != nil { - return 0, err - } +func (cp *nopConnPool) put(conn net.Conn) { + _ = conn.Close() +} + +func (cp *nopConnPool) close() error { + return nil +} + +// connPool is a very simple implementation of a pool of net.Conn instances. +// +// It keeps at most maxIdleConns net.Conn and always "popping" the most +// recently returned to the pool. There is no accounting to terminating old +// unused connections. +type connPoolWithIdle struct { + timeout time.Duration + maxIdleConns int + mtx sync.Mutex + conns []net.Conn + tcpConfig confignet.TCPAddrConfig +} + +func (cp *connPoolWithIdle) get() (net.Conn, error) { + if conn := cp.getFromCache(); conn != nil { + return conn, nil } - // There is no way to do a call equivalent to recvfrom with an empty buffer - // to check if the connection was terminated (if the size of the buffer is - // 0 the Read call doesn't call lower level). So due to buffer sizes it is - // possible that a write will succeed on a connection that was already - // closed by the server. - // - // At least on Darwin it is possible to work around this by configuring the - // buffer on each call, ie.: - // - // if err = conn.SetWriteBuffer(len(bytes)-1); err != nil { - // return 0, err - // } - // - // However, this causes a performance penalty of ~10% cpu and it is not - // present in various implementations of Carbon clients. Considering these - // facts this "workaround" is not being added at this moment. If it is - // needed in some scenarios the workaround should be validated on other - // platforms and offered as a configuration setting. + return createTCPConn(cp.tcpConfig, cp.timeout) +} - if err = conn.SetWriteDeadline(start.Add(cp.timeout)); err != nil { - return 0, err +func (cp *connPoolWithIdle) put(conn net.Conn) { + cp.mtx.Lock() + defer cp.mtx.Unlock() + // Do not cache if above limit. + if len(cp.conns) > cp.maxIdleConns { + _ = conn.Close() + return } + cp.conns = append(cp.conns, conn) +} - var n int - n, err = conn.Write(bytes) - return n, err +func (cp *connPoolWithIdle) getFromCache() net.Conn { + cp.mtx.Lock() + defer cp.mtx.Unlock() + lastIdx := len(cp.conns) - 1 + if lastIdx < 0 { + return nil + } + conn := cp.conns[lastIdx] + cp.conns = cp.conns[0:lastIdx] + return conn } -func (cp *connPool) Close() { +func (cp *connPoolWithIdle) close() error { cp.mtx.Lock() defer cp.mtx.Unlock() + var errs error for _, conn := range cp.conns { - conn.Close() + errs = multierr.Append(errs, conn.Close()) } cp.conns = nil + return errs } -func (cp *connPool) createTCPConn() (*net.TCPConn, error) { - c, err := net.DialTimeout("tcp", cp.endpoint, cp.timeout) +func createTCPConn(tcpConfig confignet.TCPAddrConfig, timeout time.Duration) (net.Conn, error) { + c, err := net.DialTimeout("tcp", tcpConfig.Endpoint, timeout) if err != nil { return nil, err } - return c.(*net.TCPConn), err + return c, err } diff --git a/exporter/carbonexporter/exporter_test.go b/exporter/carbonexporter/exporter_test.go index a97f61cf5e32..5af6e35befae 100644 --- a/exporter/carbonexporter/exporter_test.go +++ b/exporter/carbonexporter/exporter_test.go @@ -7,7 +7,6 @@ import ( "bufio" "context" "errors" - "fmt" "io" "net" "runtime" @@ -20,233 +19,347 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/confignet" + "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" conventions "go.opentelemetry.io/collector/semconv/v1.9.0" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry" ) -func TestNew(t *testing.T) { +func TestNewWithDefaultConfig(t *testing.T) { cfg := createDefaultConfig().(*Config) - got, err := newCarbonExporter(cfg, exportertest.NewNopCreateSettings()) + got, err := newCarbonExporter(context.Background(), cfg, exportertest.NewNopCreateSettings()) assert.NotNil(t, got) assert.NoError(t, err) } -func TestConsumeMetricsData(t *testing.T) { - t.Skip("skipping flaky test, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/396") - smallBatch := pmetric.NewMetrics() - m := smallBatch.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() - m.SetName("test_gauge") - dp := m.SetEmptyGauge().DataPoints().AppendEmpty() - dp.Attributes().PutStr("k0", "v0") - dp.Attributes().PutStr("k1", "v1") - dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) - dp.SetDoubleValue(123) - largeBatch := generateLargeBatch() +func TestConsumeMetricsNoServer(t *testing.T) { + exp, err := newCarbonExporter( + context.Background(), + &Config{ + TCPAddrConfig: confignet.TCPAddrConfig{Endpoint: testutil.GetAvailableLocalAddress(t)}, + TimeoutSettings: exporterhelper.TimeoutSettings{Timeout: 5 * time.Second}, + }, + exportertest.NewNopCreateSettings()) + require.NoError(t, err) + require.NoError(t, exp.Start(context.Background(), componenttest.NewNopHost())) + require.Error(t, exp.ConsumeMetrics(context.Background(), generateSmallBatch())) + require.NoError(t, exp.Shutdown(context.Background())) +} + +func TestConsumeMetricsWithResourceToTelemetry(t *testing.T) { + addr := testutil.GetAvailableLocalAddress(t) + cs := newCarbonServer(t, addr, "test_0;key_0=value_0;key_1=value_1;key_2=value_2;service.name=carbon 0") + // Each metric point will generate one Carbon line, set up the wait + // for all of them. + cs.start(t, 1) + + exp, err := newCarbonExporter( + context.Background(), + &Config{ + TCPAddrConfig: confignet.TCPAddrConfig{Endpoint: addr}, + TimeoutSettings: exporterhelper.TimeoutSettings{Timeout: 5 * time.Second}, + ResourceToTelemetryConfig: resourcetotelemetry.Settings{Enabled: true}, + }, + exportertest.NewNopCreateSettings()) + require.NoError(t, err) + require.NoError(t, exp.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, exp.ConsumeMetrics(context.Background(), generateSmallBatch())) + assert.NoError(t, exp.Shutdown(context.Background())) + cs.shutdownAndVerify(t) +} + +func TestConsumeMetrics(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("skipping test on windows, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/10147") + } tests := []struct { - name string - md pmetric.Metrics - acceptClient bool - createServer bool + name string + md pmetric.Metrics + numProducers int + writesPerProducer int }{ { - name: "small_batch", - md: smallBatch, - }, - { - name: "small_batch", - md: smallBatch, - createServer: true, + name: "small_batch", + md: generateSmallBatch(), + numProducers: 1, + writesPerProducer: 5, }, { - name: "small_batch", - md: smallBatch, - createServer: true, - acceptClient: true, + name: "large_batch", + md: generateLargeBatch(), + numProducers: 1, + writesPerProducer: 5, }, { - name: "large_batch", - md: largeBatch, + name: "concurrent_small_batch", + md: generateSmallBatch(), + numProducers: 5, + writesPerProducer: 5, }, { - name: "large_batch", - md: largeBatch, - createServer: true, + name: "concurrent_large_batch", + md: generateLargeBatch(), + numProducers: 5, + writesPerProducer: 5, }, { - name: "large_batch", - md: largeBatch, - createServer: true, - acceptClient: true, + name: "high_concurrency", + md: generateLargeBatch(), + numProducers: 10, + writesPerProducer: 200, }, } for _, tt := range tests { - testName := fmt.Sprintf( - "%s_createServer_%t_acceptClient_%t", tt.name, tt.createServer, tt.acceptClient) - t.Run(testName, func(t *testing.T) { + t.Run(tt.name, func(t *testing.T) { addr := testutil.GetAvailableLocalAddress(t) - var ln *net.TCPListener - if tt.createServer { - laddr, err := net.ResolveTCPAddr("tcp", addr) - require.NoError(t, err) - ln, err = net.ListenTCP("tcp", laddr) - require.NoError(t, err) - defer ln.Close() - } + cs := newCarbonServer(t, addr, "") + // Each metric point will generate one Carbon line, set up the wait + // for all of them. + cs.start(t, tt.numProducers*tt.writesPerProducer*tt.md.DataPointCount()) - config := &Config{Endpoint: addr, Timeout: 1000 * time.Millisecond} - exp, err := newCarbonExporter(config, exportertest.NewNopCreateSettings()) + exp, err := newCarbonExporter( + context.Background(), + &Config{ + TCPAddrConfig: confignet.TCPAddrConfig{Endpoint: addr}, + MaxIdleConns: tt.numProducers, + TimeoutSettings: exporterhelper.TimeoutSettings{Timeout: 5 * time.Second}, + }, + exportertest.NewNopCreateSettings()) require.NoError(t, err) - require.NoError(t, exp.Start(context.Background(), componenttest.NewNopHost())) - if !tt.createServer { - require.Error(t, exp.ConsumeMetrics(context.Background(), tt.md)) - assert.NoError(t, exp.Shutdown(context.Background())) - return + startCh := make(chan struct{}) + var writersWG sync.WaitGroup + writersWG.Add(tt.numProducers) + for i := 0; i < tt.numProducers; i++ { + go func() { + defer writersWG.Done() + <-startCh + for j := 0; j < tt.writesPerProducer; j++ { + require.NoError(t, exp.ConsumeMetrics(context.Background(), tt.md)) + } + }() } - if !tt.acceptClient { - // Due to differences between platforms is not certain if the call to ConsumeMetrics below will produce error or not. - // See comment about recvfrom at connPool.Write for detailed information. - _ = exp.ConsumeMetrics(context.Background(), tt.md) - assert.NoError(t, exp.Shutdown(context.Background())) - return - } + // Release all senders. + close(startCh) + // Wait for all senders to finish. + writersWG.Wait() - // Each metric point will generate one Carbon line, set up the wait - // for all of them. - var wg sync.WaitGroup - wg.Add(tt.md.DataPointCount()) - go func() { - assert.NoError(t, ln.SetDeadline(time.Now().Add(time.Second))) - conn, err := ln.AcceptTCP() - require.NoError(t, err) - defer conn.Close() + assert.NoError(t, exp.Shutdown(context.Background())) + cs.shutdownAndVerify(t) + }) + } +} - reader := bufio.NewReader(conn) - for { - // Actual metric validation is done by other tests, here it - // is just flow. - _, err := reader.ReadBytes(byte('\n')) - if err != nil && !errors.Is(err, io.EOF) { - assert.NoError(t, err) // Just to print any error - } +func TestNewConnectionPool(t *testing.T) { + assert.IsType(t, &nopConnPool{}, newConnPool(confignet.TCPAddrConfig{Endpoint: defaultEndpoint}, 10*time.Second, 0)) + assert.IsType(t, &connPoolWithIdle{}, newConnPool(confignet.TCPAddrConfig{Endpoint: defaultEndpoint}, 10*time.Second, 10)) +} - if errors.Is(err, io.EOF) { - break - } - wg.Done() - } - }() +func TestNopConnPool(t *testing.T) { + addr := testutil.GetAvailableLocalAddress(t) + cs := newCarbonServer(t, addr, "") + // Each metric point will generate one Carbon line, set up the wait + // for all of them. + cs.start(t, 2) - <-time.After(100 * time.Millisecond) + cp := &nopConnPool{ + timeout: 1 * time.Second, + tcpConfig: confignet.TCPAddrConfig{Endpoint: addr}, + } - require.NoError(t, exp.ConsumeMetrics(context.Background(), tt.md)) - assert.NoError(t, exp.Shutdown(context.Background())) + conn, err := cp.get() + require.NoError(t, err) + _, err = conn.Write([]byte(metricDataToPlaintext(generateSmallBatch()))) + assert.NoError(t, err) + cp.put(conn) - wg.Wait() - }) - } + // Get a new connection and confirm is not the same. + conn2, err2 := cp.get() + require.NoError(t, err2) + assert.NotSame(t, conn, conn2) + _, err = conn2.Write([]byte(metricDataToPlaintext(generateSmallBatch()))) + assert.NoError(t, err) + cp.put(conn2) + + require.NoError(t, cp.close()) + cs.shutdownAndVerify(t) } -// Other tests didn't for the concurrency aspect of connPool, this test -// is designed to force that. -func Test_connPool_Concurrency(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("skipping test on windows, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/10147") - } +func TestConnPoolWithIdle(t *testing.T) { addr := testutil.GetAvailableLocalAddress(t) - laddr, err := net.ResolveTCPAddr("tcp", addr) - require.NoError(t, err) - ln, err := net.ListenTCP("tcp", laddr) - require.NoError(t, err) - defer ln.Close() + cs := newCarbonServer(t, addr, "") + // Each metric point will generate one Carbon line, set up the wait + // for all of them. + cs.start(t, 2) - startCh := make(chan struct{}) + cp := &connPoolWithIdle{ + timeout: 1 * time.Second, + tcpConfig: confignet.TCPAddrConfig{Endpoint: addr}, + maxIdleConns: 4, + } - cp := newTCPConnPool(addr, 500*time.Millisecond) - sender := carbonSender{connPool: cp} - ctx := context.Background() - md := generateLargeBatch() - concurrentWriters := 3 - writesPerRoutine := 3 + conn, err := cp.get() + require.NoError(t, err) + _, err = conn.Write([]byte(metricDataToPlaintext(generateSmallBatch()))) + assert.NoError(t, err) + cp.put(conn) - doneFlag := &atomic.Bool{} - defer func() { - doneFlag.Store(true) - }() + // Get a new connection and confirm it is the same as the first one. + conn2, err2 := cp.get() + require.NoError(t, err2) + assert.Same(t, conn, conn2) + _, err = conn2.Write([]byte(metricDataToPlaintext(generateSmallBatch()))) + assert.NoError(t, err) + cp.put(conn2) - var recvWG sync.WaitGroup - recvWG.Add(concurrentWriters * writesPerRoutine * md.MetricCount()) - go func() { - for { - conn, err := ln.AcceptTCP() - if doneFlag.Load() { - // Close is expected to cause error. - return - } - require.NoError(t, err) - go func(conn *net.TCPConn) { - defer conn.Close() + require.NoError(t, cp.close()) + cs.shutdownAndVerify(t) +} - reader := bufio.NewReader(conn) - for { - // Actual metric validation is done by other tests, here it - // is just flow. - _, err := reader.ReadBytes(byte('\n')) - if err != nil && !errors.Is(err, io.EOF) { - assert.NoError(t, err) // Just to print any error - } +func TestConnPoolWithIdleMaxConnections(t *testing.T) { + addr := testutil.GetAvailableLocalAddress(t) + cs := newCarbonServer(t, addr, "") + const maxIdleConns = 4 + // Each metric point will generate one Carbon line, set up the wait + // for all of them. + cs.start(t, maxIdleConns+1) - if errors.Is(err, io.EOF) { - break - } - recvWG.Done() - } - }(conn) + cp := &connPoolWithIdle{ + timeout: 1 * time.Second, + tcpConfig: confignet.TCPAddrConfig{Endpoint: addr}, + maxIdleConns: maxIdleConns, + } + + // Create connections and + var conns []net.Conn + for i := 0; i < maxIdleConns; i++ { + conn, err := cp.get() + require.NoError(t, err) + conns = append(conns, conn) + if i != 0 { + assert.NotSame(t, conn, conns[i-1]) } - }() - var writersWG sync.WaitGroup - for i := 0; i < concurrentWriters; i++ { - writersWG.Add(1) - go func() { - <-startCh - for i := 0; i < writesPerRoutine; i++ { - assert.NoError(t, sender.pushMetricsData(ctx, md)) - } - writersWG.Done() - }() + } + for _, conn := range conns { + cp.put(conn) } - close(startCh) // Release all workers - writersWG.Wait() - assert.NoError(t, sender.Shutdown(context.Background())) + for i := 0; i < maxIdleConns+1; i++ { + conn, err := cp.get() + require.NoError(t, err) + _, err = conn.Write([]byte(metricDataToPlaintext(generateSmallBatch()))) + assert.NoError(t, err) + if i != maxIdleConns { + assert.Same(t, conn, conns[maxIdleConns-i-1]) + } else { + // this should be a new connection + for _, cachedConn := range conns { + assert.NotSame(t, conn, cachedConn) + } + cp.put(conn) + } + } + for _, conn := range conns { + cp.put(conn) + } + require.NoError(t, cp.close()) + cs.shutdownAndVerify(t) +} - recvWG.Wait() +func generateSmallBatch() pmetric.Metrics { + return generateMetricsBatch(1) } func generateLargeBatch() pmetric.Metrics { + return generateMetricsBatch(1024) +} + +func generateMetricsBatch(size int) pmetric.Metrics { ts := time.Now() metrics := pmetric.NewMetrics() rm := metrics.ResourceMetrics().AppendEmpty() - rm.Resource().Attributes().PutStr(conventions.AttributeServiceName, "test_carbon") + rm.Resource().Attributes().PutStr(conventions.AttributeServiceName, "carbon") ms := rm.ScopeMetrics().AppendEmpty().Metrics() - for i := 0; i < 65000; i++ { + for i := 0; i < size; i++ { m := ms.AppendEmpty() m.SetName("test_" + strconv.Itoa(i)) dp := m.SetEmptyGauge().DataPoints().AppendEmpty() - dp.Attributes().PutStr("k0", "v0") - dp.Attributes().PutStr("k1", "v1") + dp.Attributes().PutStr("key_0", "value_0") + dp.Attributes().PutStr("key_1", "value_1") + dp.Attributes().PutStr("key_2", "value_2") dp.SetTimestamp(pcommon.NewTimestampFromTime(ts)) dp.SetIntValue(int64(i)) } return metrics } + +type carbonServer struct { + ln *net.TCPListener + doneServer *atomic.Bool + wg sync.WaitGroup + expectedContainsValue string +} + +func newCarbonServer(t *testing.T, addr string, expectedContainsValue string) *carbonServer { + laddr, err := net.ResolveTCPAddr("tcp", addr) + require.NoError(t, err) + ln, err := net.ListenTCP("tcp", laddr) + require.NoError(t, err) + return &carbonServer{ + ln: ln, + doneServer: &atomic.Bool{}, + expectedContainsValue: expectedContainsValue, + } +} + +func (cs *carbonServer) start(t *testing.T, numExpectedReq int) { + cs.wg.Add(numExpectedReq) + go func() { + for { + conn, err := cs.ln.Accept() + if cs.doneServer.Load() { + // Close is expected to cause error. + return + } + require.NoError(t, err) + go func(conn net.Conn) { + defer func() { + require.NoError(t, conn.Close()) + }() + + reader := bufio.NewReader(conn) + for { + buf, err := reader.ReadBytes(byte('\n')) + if errors.Is(err, io.EOF) { + return + } + require.NoError(t, err) + + if cs.expectedContainsValue != "" { + assert.Contains(t, string(buf), cs.expectedContainsValue) + } + + cs.wg.Done() + } + }(conn) + } + }() + <-time.After(100 * time.Millisecond) +} + +func (cs *carbonServer) shutdownAndVerify(t *testing.T) { + cs.wg.Wait() + cs.doneServer.Store(true) + require.NoError(t, cs.ln.Close()) +} diff --git a/exporter/carbonexporter/factory.go b/exporter/carbonexporter/factory.go index 87d5666332e4..687d5dd6d707 100644 --- a/exporter/carbonexporter/factory.go +++ b/exporter/carbonexporter/factory.go @@ -7,11 +7,19 @@ import ( "context" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/confignet" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter/internal/metadata" ) +// Defaults for not specified configuration settings. +const ( + defaultEndpoint = "localhost:2003" +) + // NewFactory creates a factory for Carbon exporter. func NewFactory() exporter.Factory { return exporter.NewFactory( @@ -22,17 +30,22 @@ func NewFactory() exporter.Factory { func createDefaultConfig() component.Config { return &Config{ - Endpoint: DefaultEndpoint, - Timeout: DefaultSendTimeout, + TCPAddrConfig: confignet.TCPAddrConfig{ + Endpoint: defaultEndpoint, + }, + MaxIdleConns: 100, + TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), + QueueConfig: exporterhelper.NewDefaultQueueSettings(), + RetryConfig: configretry.NewDefaultBackOffConfig(), } } func createMetricsExporter( - _ context.Context, + ctx context.Context, params exporter.CreateSettings, config component.Config, ) (exporter.Metrics, error) { - exp, err := newCarbonExporter(config.(*Config), params) + exp, err := newCarbonExporter(ctx, config.(*Config), params) if err != nil { return nil, err diff --git a/exporter/carbonexporter/generated_component_test.go b/exporter/carbonexporter/generated_component_test.go new file mode 100644 index 000000000000..7a02d6c0c47e --- /dev/null +++ b/exporter/carbonexporter/generated_component_test.go @@ -0,0 +1,126 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package carbonexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/carbonexporter/go.mod b/exporter/carbonexporter/go.mod index 4d10d586d507..cd83a9095b80 100644 --- a/exporter/carbonexporter/go.mod +++ b/exporter/carbonexporter/go.mod @@ -1,51 +1,66 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confignet v0.98.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/multierr v1.11.0 ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // 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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -56,3 +71,13 @@ retract ( v0.76.1 v0.65.0 ) + +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry => ../../pkg/resourcetotelemetry + +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/exporter/carbonexporter/go.sum b/exporter/carbonexporter/go.sum index 792b863de05a..f49795c08ae1 100644 --- a/exporter/carbonexporter/go.sum +++ b/exporter/carbonexporter/go.sum @@ -1,52 +1,30 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -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/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -57,15 +35,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -75,103 +52,92 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -179,38 +145,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/carbonexporter/internal/metadata/generated_status.go b/exporter/carbonexporter/internal/metadata/generated_status.go index 6dbde87f829a..179008e092b6 100644 --- a/exporter/carbonexporter/internal/metadata/generated_status.go +++ b/exporter/carbonexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("carbon") ) const ( - Type = "carbon" MetricsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/carbon") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/carbon") +} diff --git a/exporter/carbonexporter/metadata.yaml b/exporter/carbonexporter/metadata.yaml index 2985110e616b..095bd468b687 100644 --- a/exporter/carbonexporter/metadata.yaml +++ b/exporter/carbonexporter/metadata.yaml @@ -1,9 +1,13 @@ type: carbon +scope_name: otelcol/carbon status: class: exporter stability: beta: [metrics] - distributions: [contrib, observiq, sumo] + distributions: [contrib] codeowners: active: [aboguszewski-sumo] + +tests: + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/carbonexporter/metricdata_to_plaintext.go b/exporter/carbonexporter/metricdata_to_plaintext.go index cf9694bd7f29..29d5f1d5b40e 100644 --- a/exporter/carbonexporter/metricdata_to_plaintext.go +++ b/exporter/carbonexporter/metricdata_to_plaintext.go @@ -4,8 +4,10 @@ package carbonexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter" import ( + "bytes" "strconv" "strings" + "sync" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" @@ -16,10 +18,11 @@ const ( sanitizedRune = '_' // Tag related constants per Carbon plaintext protocol. - tagPrefix = ";" - tagKeyValueSeparator = "=" - tagValueEmptyPlaceholder = "" - tagValueNotSetPlaceholder = "" + tagPrefix = ";" + tagKeyValueSeparator = "=" + tagValueEmptyPlaceholder = "" + tagLineEmptySpace = " " + tagLineNewLine = "\n" // Constants used when converting from distribution metrics to Carbon format. distributionBucketSuffix = ".bucket" @@ -40,6 +43,13 @@ const ( infinityCarbonValue = "inf" ) +var writerPool = sync.Pool{ + New: func() any { + // Start with a buffer of 1KB. + return bytes.NewBuffer(make([]byte, 0, 1024)) + }, +} + // metricDataToPlaintext converts internal metrics data to the Carbon plaintext // format as defined in https://graphite.readthedocs.io/en/latest/feeding-carbon.html#the-plaintext-protocol) // and https://graphite.readthedocs.io/en/latest/tags.html#carbon. See details @@ -74,7 +84,9 @@ func metricDataToPlaintext(md pmetric.Metrics) string { return "" } - var sb strings.Builder + buf := writerPool.Get().(*bytes.Buffer) + buf.Reset() + defer writerPool.Put(buf) for i := 0; i < md.ResourceMetrics().Len(); i++ { rm := md.ResourceMetrics().At(i) @@ -88,32 +100,38 @@ func metricDataToPlaintext(md pmetric.Metrics) string { } switch metric.Type() { case pmetric.MetricTypeGauge: - formatNumberDataPoints(&sb, metric.Name(), metric.Gauge().DataPoints()) + writeNumberDataPoints(buf, metric.Name(), metric.Gauge().DataPoints()) case pmetric.MetricTypeSum: - formatNumberDataPoints(&sb, metric.Name(), metric.Sum().DataPoints()) + writeNumberDataPoints(buf, metric.Name(), metric.Sum().DataPoints()) case pmetric.MetricTypeHistogram: - formatHistogramDataPoints(&sb, metric.Name(), metric.Histogram().DataPoints()) + formatHistogramDataPoints(buf, metric.Name(), metric.Histogram().DataPoints()) case pmetric.MetricTypeSummary: - formatSummaryDataPoints(&sb, metric.Name(), metric.Summary().DataPoints()) + formatSummaryDataPoints(buf, metric.Name(), metric.Summary().DataPoints()) } } } } - return sb.String() + return buf.String() } -func formatNumberDataPoints(sb *strings.Builder, metricName string, dps pmetric.NumberDataPointSlice) { +func writeNumberDataPoints(buf *bytes.Buffer, metricName string, dps pmetric.NumberDataPointSlice) { for i := 0; i < dps.Len(); i++ { dp := dps.At(i) var valueStr string switch dp.ValueType() { + case pmetric.NumberDataPointValueTypeEmpty: + continue // skip this data point - otherwise an empty string will be used as the value and the backend will use the timestamp as the metric value case pmetric.NumberDataPointValueTypeInt: valueStr = formatInt64(dp.IntValue()) case pmetric.NumberDataPointValueTypeDouble: valueStr = formatFloatForValue(dp.DoubleValue()) } - sb.WriteString(buildLine(buildPath(metricName, dp.Attributes()), valueStr, formatTimestamp(dp.Timestamp()))) + writeLine( + buf, + buildPath(metricName, dp.Attributes()), + valueStr, + formatTimestamp(dp.Timestamp())) } } @@ -132,7 +150,7 @@ func formatNumberDataPoints(sb *strings.Builder, metricName string, dps pmetric. // that bucket. This metric specifies the number of events with a value that is // less than or equal to the upper bound. func formatHistogramDataPoints( - sb *strings.Builder, + buf *bytes.Buffer, metricName string, dps pmetric.HistogramDataPointSlice, ) { @@ -140,7 +158,7 @@ func formatHistogramDataPoints( dp := dps.At(i) timestampStr := formatTimestamp(dp.Timestamp()) - formatCountAndSum(sb, metricName, dp.Attributes(), dp.Count(), dp.Sum(), timestampStr) + formatCountAndSum(buf, metricName, dp.Attributes(), dp.Count(), dp.Sum(), timestampStr) if dp.ExplicitBounds().Len() == 0 { continue } @@ -154,7 +172,11 @@ func formatHistogramDataPoints( bucketPath := buildPath(metricName+distributionBucketSuffix, dp.Attributes()) for j := 0; j < dp.BucketCounts().Len(); j++ { - sb.WriteString(buildLine(bucketPath+distributionUpperBoundTagBeforeValue+carbonBounds[j], formatUint64(dp.BucketCounts().At(j)), timestampStr)) + writeLine( + buf, + bucketPath+distributionUpperBoundTagBeforeValue+carbonBounds[j], + formatUint64(dp.BucketCounts().At(j)), + timestampStr) } } } @@ -172,7 +194,7 @@ func formatHistogramDataPoints( // 3. Each quantile is represented by a metric named ".quantile" // and will include a tag key "quantile" that specifies the quantile value. func formatSummaryDataPoints( - sb *strings.Builder, + buf *bytes.Buffer, metricName string, dps pmetric.SummaryDataPointSlice, ) { @@ -180,7 +202,7 @@ func formatSummaryDataPoints( dp := dps.At(i) timestampStr := formatTimestamp(dp.Timestamp()) - formatCountAndSum(sb, metricName, dp.Attributes(), dp.Count(), dp.Sum(), timestampStr) + formatCountAndSum(buf, metricName, dp.Attributes(), dp.Count(), dp.Sum(), timestampStr) if dp.QuantileValues().Len() == 0 { continue @@ -188,10 +210,11 @@ func formatSummaryDataPoints( quantilePath := buildPath(metricName+summaryQuantileSuffix, dp.Attributes()) for j := 0; j < dp.QuantileValues().Len(); j++ { - sb.WriteString(buildLine( + writeLine( + buf, quantilePath+summaryQuantileTagBeforeValue+formatFloatForLabel(dp.QuantileValues().At(j).Quantile()*100), formatFloatForValue(dp.QuantileValues().At(j).Value()), - timestampStr)) + timestampStr) } } } @@ -204,21 +227,25 @@ func formatSummaryDataPoints( // // 2. The total sum will be represented by a metruc with the original "". func formatCountAndSum( - sb *strings.Builder, + buf *bytes.Buffer, metricName string, attributes pcommon.Map, count uint64, sum float64, timestampStr string, ) { - // Build count and sum metrics. - countPath := buildPath(metricName+countSuffix, attributes) - valueStr := formatUint64(count) - sb.WriteString(buildLine(countPath, valueStr, timestampStr)) - - sumPath := buildPath(metricName, attributes) - valueStr = formatFloatForValue(sum) - sb.WriteString(buildLine(sumPath, valueStr, timestampStr)) + // Write count and sum metrics. + writeLine( + buf, + buildPath(metricName+countSuffix, attributes), + formatUint64(count), + timestampStr) + + writeLine( + buf, + buildPath(metricName, attributes), + formatFloatForValue(sum), + timestampStr) } // buildPath is used to build the per description above. @@ -227,25 +254,35 @@ func buildPath(name string, attributes pcommon.Map) string { return name } - var sb strings.Builder - sb.WriteString(name) + buf := writerPool.Get().(*bytes.Buffer) + buf.Reset() + defer writerPool.Put(buf) + buf.WriteString(name) attributes.Range(func(k string, v pcommon.Value) bool { value := v.AsString() if value == "" { value = tagValueEmptyPlaceholder } - sb.WriteString(tagPrefix + sanitizeTagKey(k) + tagKeyValueSeparator + value) + buf.WriteString(tagPrefix) + buf.WriteString(sanitizeTagKey(k)) + buf.WriteString(tagKeyValueSeparator) + buf.WriteString(value) return true }) - return sb.String() + return buf.String() } -// buildLine builds a single Carbon metric textual line, ie.: it already adds +// writeLine builds a single Carbon metric textual line, ie.: it already adds // a new-line character at the end of the string. -func buildLine(path, value, timestamp string) string { - return path + " " + value + " " + timestamp + "\n" +func writeLine(buf *bytes.Buffer, path, value, timestamp string) { + buf.WriteString(path) + buf.WriteString(tagLineEmptySpace) + buf.WriteString(value) + buf.WriteString(tagLineEmptySpace) + buf.WriteString(timestamp) + buf.WriteString(tagLineNewLine) } // sanitizeTagKey removes any invalid character from the tag key, the invalid diff --git a/exporter/carbonexporter/metricdata_to_plaintext_test.go b/exporter/carbonexporter/metricdata_to_plaintext_test.go index 1fb08ccd9637..b1910334c3aa 100644 --- a/exporter/carbonexporter/metricdata_to_plaintext_test.go +++ b/exporter/carbonexporter/metricdata_to_plaintext_test.go @@ -113,8 +113,6 @@ func TestBuildPath(t *testing.T) { } func TestToPlaintext(t *testing.T) { - expectedTagsCombinations := []string{";k0=v0;k1=v1", ";k1=v1;k0=v0"} - unixSecs := int64(1574092046) expectedUnixSecsStr := strconv.FormatInt(unixSecs, 10) unixNSecs := int64(11 * time.Millisecond) @@ -135,13 +133,13 @@ func TestToPlaintext(t *testing.T) { summaryQuantiles := []float64{90, 95, 99, 99.9} summaryQuantileValues := []float64{100, 6, 4, 1} tests := []struct { - name string - metricsDataFn func() pmetric.Metrics - wantLines []string - wantLinesCount int + name string + metricsDataFn func() pmetric.Metrics + wantLines []string + wantExtraLinesCount int }{ { - name: "no_dims", + name: "gauge", metricsDataFn: func() pmetric.Metrics { md := pmetric.NewMetrics() ms := md.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics() @@ -153,46 +151,45 @@ func TestToPlaintext(t *testing.T) { dps2 := ms.At(1).SetEmptyGauge().DataPoints() dps2.AppendEmpty().SetTimestamp(pcommon.NewTimestampFromTime(tsUnix)) dps2.At(0).SetIntValue(int64Val) - - ms.AppendEmpty().SetName("cumulative_double_no_dims") - ms.At(2).SetEmptySum().SetIsMonotonic(true) - dps3 := ms.At(2).Sum().DataPoints() + ms.AppendEmpty().SetName("gauge_double_with_dims") + dps3 := ms.At(2).SetEmptyGauge().DataPoints() dps3.AppendEmpty().SetTimestamp(pcommon.NewTimestampFromTime(tsUnix)) + dps3.At(0).Attributes().PutStr("k0", "v0") + dps3.At(0).Attributes().PutStr("k1", "v1") dps3.At(0).SetDoubleValue(doubleVal) - ms.AppendEmpty().SetName("cumulative_int_no_dims") - ms.At(3).SetEmptySum().SetIsMonotonic(true) - dps4 := ms.At(3).Sum().DataPoints() + ms.AppendEmpty().SetName("gauge_int_with_dims") + dps4 := ms.At(3).SetEmptyGauge().DataPoints() dps4.AppendEmpty().SetTimestamp(pcommon.NewTimestampFromTime(tsUnix)) + dps4.At(0).Attributes().PutStr("k0", "v0") + dps4.At(0).Attributes().PutStr("k1", "v1") dps4.At(0).SetIntValue(int64Val) + ms.AppendEmpty().SetName("gauge_no_value") + dps5 := ms.At(4).SetEmptyGauge().DataPoints() + dps5.AppendEmpty().SetTimestamp(pcommon.NewTimestampFromTime(tsUnix)) return md - }, wantLines: []string{ "gauge_double_no_dims " + expectedDobuleValStr + " " + expectedUnixSecsStr, "gauge_int_no_dims " + expectedInt64ValStr + " " + expectedUnixSecsStr, - "cumulative_double_no_dims " + expectedDobuleValStr + " " + expectedUnixSecsStr, - "cumulative_int_no_dims " + expectedInt64ValStr + " " + expectedUnixSecsStr, + "gauge_double_with_dims;k0=v0;k1=v1 " + expectedDobuleValStr + " " + expectedUnixSecsStr, + "gauge_int_with_dims;k0=v0;k1=v1 " + expectedInt64ValStr + " " + expectedUnixSecsStr, }, - wantLinesCount: 4, }, { - name: "with_dims", + name: "cumulative_monotonic_sum", metricsDataFn: func() pmetric.Metrics { md := pmetric.NewMetrics() ms := md.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics() - ms.AppendEmpty().SetName("gauge_double_with_dims") - dps1 := ms.At(0).SetEmptyGauge().DataPoints() + ms.AppendEmpty().SetName("cumulative_double_no_dims") + ms.At(0).SetEmptySum().SetIsMonotonic(true) + dps1 := ms.At(0).Sum().DataPoints() dps1.AppendEmpty().SetTimestamp(pcommon.NewTimestampFromTime(tsUnix)) - dps1.At(0).Attributes().PutStr("k1", "v1") - dps1.At(0).Attributes().PutStr("k0", "v0") dps1.At(0).SetDoubleValue(doubleVal) - ms.AppendEmpty().SetName("gauge_int_with_dims") - dps2 := ms.At(1).SetEmptyGauge().DataPoints() + ms.AppendEmpty().SetName("cumulative_int_no_dims") + ms.At(1).SetEmptySum().SetIsMonotonic(true) + dps2 := ms.At(1).Sum().DataPoints() dps2.AppendEmpty().SetTimestamp(pcommon.NewTimestampFromTime(tsUnix)) - dps2.At(0).Attributes().PutStr("k0", "v0") - dps2.At(0).Attributes().PutStr("k1", "v1") dps2.At(0).SetIntValue(int64Val) - ms.AppendEmpty().SetName("cumulative_double_with_dims") ms.At(2).SetEmptySum().SetIsMonotonic(true) dps3 := ms.At(2).Sum().DataPoints() @@ -207,24 +204,21 @@ func TestToPlaintext(t *testing.T) { dps4.At(0).Attributes().PutStr("k0", "v0") dps4.At(0).Attributes().PutStr("k1", "v1") dps4.At(0).SetIntValue(int64Val) + ms.AppendEmpty().SetName("cumulative_no_value") + ms.At(4).SetEmptySum().SetIsMonotonic(true) + dps5 := ms.At(4).Sum().DataPoints() + dps5.AppendEmpty().SetTimestamp(pcommon.NewTimestampFromTime(tsUnix)) return md }, - wantLines: func() []string { - combinations := make([]string, 0, 4*len(expectedTagsCombinations)) - for _, tags := range expectedTagsCombinations { - combinations = append(combinations, - "gauge_double_with_dims"+tags+" "+expectedDobuleValStr+" "+expectedUnixSecsStr, - "gauge_int_with_dims"+tags+" "+expectedInt64ValStr+" "+expectedUnixSecsStr, - "cumulative_double_with_dims"+tags+" "+expectedDobuleValStr+" "+expectedUnixSecsStr, - "cumulative_int_with_dims"+tags+" "+expectedInt64ValStr+" "+expectedUnixSecsStr, - ) - } - return combinations - }(), - wantLinesCount: 4, + wantLines: []string{ + "cumulative_double_no_dims " + expectedDobuleValStr + " " + expectedUnixSecsStr, + "cumulative_int_no_dims " + expectedInt64ValStr + " " + expectedUnixSecsStr, + "cumulative_double_with_dims;k0=v0;k1=v1 " + expectedDobuleValStr + " " + expectedUnixSecsStr, + "cumulative_int_with_dims;k0=v0;k1=v1 " + expectedInt64ValStr + " " + expectedUnixSecsStr, + }, }, { - name: "distributions", + name: "histogram", metricsDataFn: func() pmetric.Metrics { md := pmetric.NewMetrics() ms := md.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics() @@ -232,7 +226,8 @@ func TestToPlaintext(t *testing.T) { ms.At(0).SetEmptyHistogram().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) dp := ms.At(0).SetEmptyHistogram().DataPoints().AppendEmpty() dp.SetTimestamp(pcommon.NewTimestampFromTime(tsUnix)) - assert.NoError(t, dp.Attributes().FromRaw(map[string]any{"k0": "v0", "k1": "v1"})) + dp.Attributes().PutStr("k0", "v0") + dp.Attributes().PutStr("k1", "v1") dp.SetCount(distributionCount) dp.SetSum(distributionSum) dp.ExplicitBounds().FromRaw(distributionBounds) @@ -240,12 +235,11 @@ func TestToPlaintext(t *testing.T) { return md }, wantLines: expectedDistributionLines( - "distrib", expectedTagsCombinations, expectedUnixSecsStr, + "distrib", ";k0=v0;k1=v1", expectedUnixSecsStr, distributionSum, distributionCount, distributionBounds, distributionCounts), - wantLinesCount: 6, }, { name: "summary", @@ -255,7 +249,8 @@ func TestToPlaintext(t *testing.T) { ms.AppendEmpty().SetName("summary") dp := ms.At(0).SetEmptySummary().DataPoints().AppendEmpty() dp.SetTimestamp(pcommon.NewTimestampFromTime(tsUnix)) - assert.NoError(t, dp.Attributes().FromRaw(map[string]any{"k0": "v0", "k1": "v1"})) + dp.Attributes().PutStr("k0", "v0") + dp.Attributes().PutStr("k1", "v1") dp.SetCount(summaryCount) dp.SetSum(summarySum) for i := range summaryQuantiles { @@ -266,12 +261,11 @@ func TestToPlaintext(t *testing.T) { return md }, wantLines: expectedSummaryLines( - "summary", expectedTagsCombinations, expectedUnixSecsStr, + "summary", ";k0=v0;k1=v1", expectedUnixSecsStr, summarySum, summaryCount, summaryQuantiles, summaryQuantileValues), - wantLinesCount: 6, }, } for _, tt := range tests { @@ -279,7 +273,7 @@ func TestToPlaintext(t *testing.T) { gotLines := metricDataToPlaintext(tt.metricsDataFn()) got := strings.Split(gotLines, "\n") got = got[:len(got)-1] - assert.Equal(t, tt.wantLinesCount, len(got)) + assert.Len(t, got, len(tt.wantLines)+tt.wantExtraLinesCount) assert.Subset(t, tt.wantLines, got) }) } @@ -287,7 +281,7 @@ func TestToPlaintext(t *testing.T) { func expectedDistributionLines( metricName string, - tagsCombinations []string, + tags string, timestampStr string, sum float64, count uint64, @@ -295,23 +289,22 @@ func expectedDistributionLines( counts []uint64, ) []string { var lines []string - for _, tags := range tagsCombinations { + lines = append(lines, + metricName+".count"+tags+" "+formatInt64(int64(count))+" "+timestampStr, + metricName+tags+" "+formatFloatForLabel(sum)+" "+timestampStr, + metricName+".bucket"+tags+";upper_bound=inf "+formatInt64(int64(counts[len(bounds)]))+" "+timestampStr, + ) + for i, bound := range bounds { lines = append(lines, - metricName+".count"+tags+" "+formatInt64(int64(count))+" "+timestampStr, - metricName+tags+" "+formatFloatForLabel(sum)+" "+timestampStr, - metricName+".bucket"+tags+";upper_bound=inf "+formatInt64(int64(counts[len(bounds)]))+" "+timestampStr, - ) - for i, bound := range bounds { - lines = append(lines, - metricName+".bucket"+tags+";upper_bound="+formatFloatForLabel(bound)+" "+formatInt64(int64(counts[i]))+" "+timestampStr) - } + metricName+".bucket"+tags+";upper_bound="+formatFloatForLabel(bound)+" "+formatInt64(int64(counts[i]))+" "+timestampStr) } + return lines } func expectedSummaryLines( metricName string, - tagsCombinations []string, + tags string, timestampStr string, sum float64, count uint64, @@ -319,15 +312,22 @@ func expectedSummaryLines( summaryQuantileValues []float64, ) []string { var lines []string - for _, tags := range tagsCombinations { + lines = append(lines, + metricName+".count"+tags+" "+formatInt64(int64(count))+" "+timestampStr, + metricName+tags+" "+formatFloatForValue(sum)+" "+timestampStr, + ) + for i := range summaryQuantiles { lines = append(lines, - metricName+".count"+tags+" "+formatInt64(int64(count))+" "+timestampStr, - metricName+tags+" "+formatFloatForValue(sum)+" "+timestampStr, - ) - for i := range summaryQuantiles { - lines = append(lines, - metricName+".quantile"+tags+";quantile="+formatFloatForLabel(summaryQuantiles[i])+" "+formatFloatForValue(summaryQuantileValues[i])+" "+timestampStr) - } + metricName+".quantile"+tags+";quantile="+formatFloatForLabel(summaryQuantiles[i])+" "+formatFloatForValue(summaryQuantileValues[i])+" "+timestampStr) } return lines } + +func BenchmarkConsumeMetricsDefault(b *testing.B) { + md := generateSmallBatch() + b.ResetTimer() + b.ReportAllocs() + for n := 0; n < b.N; n++ { + assert.Len(b, metricDataToPlaintext(md), 62) + } +} diff --git a/exporter/carbonexporter/package_test.go b/exporter/carbonexporter/package_test.go new file mode 100644 index 000000000000..0dcd0a5f369d --- /dev/null +++ b/exporter/carbonexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package carbonexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/carbonexporter/testdata/config.yaml b/exporter/carbonexporter/testdata/config.yaml index 991b655ea415..a0d330fbf595 100644 --- a/exporter/carbonexporter/testdata/config.yaml +++ b/exporter/carbonexporter/testdata/config.yaml @@ -4,7 +4,21 @@ carbon/allsettings: # use endpoint to specify alternative destinations for the exporter, # the default is localhost:2003 endpoint: localhost:8080 + max_idle_conns: 15 # timeout is the maximum duration allowed to connecting and sending the # data to the Carbon/Graphite backend. # The default is 5 seconds. timeout: 10s + sending_queue: + enabled: true + num_consumers: 2 + queue_size: 10 + retry_on_failure: + enabled: true + initial_interval: 10s + randomization_factor: 0.7 + multiplier: 3.14 + max_interval: 60s + max_elapsed_time: 10m + resource_to_telemetry_conversion: + enabled: true diff --git a/exporter/cassandraexporter/README.md b/exporter/cassandraexporter/README.md index 1efd9cd72805..3795554f2874 100644 --- a/exporter/cassandraexporter/README.md +++ b/exporter/cassandraexporter/README.md @@ -18,12 +18,14 @@ The following settings can be optionally configured: - `dsn` The Cassandra server DSN (Data Source Name), for example `127.0.0.1`. reference: [https://pkg.go.dev/github.com/gocql/gocql](https://pkg.go.dev/github.com/gocql/gocql) -- `port` (default = 9042) The Cassandra server Port +- `port` (default = 9042): The Cassandra server port +- `timeout` (default = 10s): The Cassandra server connection timeout - `keyspace` (default = otel): The keyspace name. - `trace_table` (default = otel_spans): The table name for traces. -- `replication` (default = class: SimpleStrategy, replication_factor: 1) The strategy of +- `replication` (default = class: SimpleStrategy, replication_factor: 1): The strategy of replication. https://cassandra.apache.org/doc/4.1/cassandra/architecture/dynamo.html#replication-strategy -- `compression` (default = LZ4Compressor) https://cassandra.apache.org/doc/latest/cassandra/operating/compression.html +- `compression` (default = LZ4Compressor): https://cassandra.apache.org/doc/latest/cassandra/operating/compression.html +- `auth` (default = username: "", password: "") Authorization for the Cassandra. ## Example @@ -32,6 +34,7 @@ exporters: cassandra: dsn: 127.0.0.1 port: 9042 + timeout: 10s keyspace: "otel" trace_table: "otel_spans" replication: @@ -39,4 +42,7 @@ exporters: replication_factor: 1 compression: algorithm: "ZstdCompressor" + auth: + username: "your-username" + password: "your-password" ``` diff --git a/exporter/cassandraexporter/config.go b/exporter/cassandraexporter/config.go index b9b6bd769437..97885c9c19a4 100644 --- a/exporter/cassandraexporter/config.go +++ b/exporter/cassandraexporter/config.go @@ -2,15 +2,22 @@ // SPDX-License-Identifier: Apache-2.0 package cassandraexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter" +import ( + "time" + + "go.opentelemetry.io/collector/config/configopaque" +) type Config struct { - DSN string `mapstructure:"dsn"` - Port int `mapstructure:"port"` - Keyspace string `mapstructure:"keyspace"` - TraceTable string `mapstructure:"trace_table"` - LogsTable string `mapstructure:"logs_table"` - Replication Replication `mapstructure:"replication"` - Compression Compression `mapstructure:"compression"` + DSN string `mapstructure:"dsn"` + Port int `mapstructure:"port"` + Timeout time.Duration `mapstructure:"timeout"` + Keyspace string `mapstructure:"keyspace"` + TraceTable string `mapstructure:"trace_table"` + LogsTable string `mapstructure:"logs_table"` + Replication Replication `mapstructure:"replication"` + Compression Compression `mapstructure:"compression"` + Auth Auth `mapstructure:"auth"` } type Replication struct { @@ -21,3 +28,8 @@ type Replication struct { type Compression struct { Algorithm string `mapstructure:"algorithm"` } + +type Auth struct { + UserName string `mapstructure:"username"` + Password configopaque.String `mapstructure:"password"` +} diff --git a/exporter/cassandraexporter/constants.go b/exporter/cassandraexporter/constants.go index 75c78908c7e8..66dca7310b5a 100644 --- a/exporter/cassandraexporter/constants.go +++ b/exporter/cassandraexporter/constants.go @@ -5,7 +5,7 @@ package cassandraexporter // import "github.com/open-telemetry/opentelemetry-col const ( // language=SQL - createDatabaseSQL = `CREATE KEYSPACE %s WITH REPLICATION = { 'class' : '%s', 'replication_factor' : %d };` + createDatabaseSQL = `CREATE KEYSPACE IF NOT EXISTS %s WITH REPLICATION = { 'class' : '%s', 'replication_factor' : %d };` // language=SQL createEventTypeSQL = `CREATE TYPE IF NOT EXISTS %s.Events (Timestamp Date, Name text, Attributes map);` // language=SQL diff --git a/exporter/cassandraexporter/example/otel-collector-config.yml b/exporter/cassandraexporter/example/otel-collector-config.yml index 2f674a11d282..df8253017467 100644 --- a/exporter/cassandraexporter/example/otel-collector-config.yml +++ b/exporter/cassandraexporter/example/otel-collector-config.yml @@ -6,6 +6,8 @@ receivers: exporters: cassandra: dsn: 127.0.0.1 + port: 9042 + timeout: 10s keyspace: "otel" trace_table: "otel_spans" logs_table: "otel_logs" @@ -14,7 +16,6 @@ exporters: replication_factor: 1 compression: algorithm: "ZstdCompressor" - service: pipelines: traces: diff --git a/exporter/cassandraexporter/exporter_logs.go b/exporter/cassandraexporter/exporter_logs.go index 8b824829358a..dd4b97ae98b6 100644 --- a/exporter/cassandraexporter/exporter_logs.go +++ b/exporter/cassandraexporter/exporter_logs.go @@ -6,6 +6,7 @@ package cassandraexporter // import "github.com/open-telemetry/opentelemetry-col import ( "context" "encoding/json" + "errors" "fmt" "time" @@ -23,25 +24,20 @@ type logsExporter struct { cfg *Config } -func newLogsExporter(logger *zap.Logger, cfg *Config) (*logsExporter, error) { - cluster := gocql.NewCluster(cfg.DSN) - session, err := cluster.CreateSession() - cluster.Keyspace = cfg.Keyspace - cluster.Consistency = gocql.Quorum - cluster.Port = cfg.Port +func newLogsExporter(logger *zap.Logger, cfg *Config) *logsExporter { - if err != nil { - return nil, err - } - - return &logsExporter{logger: logger, client: session, cfg: cfg}, nil + return &logsExporter{logger: logger, cfg: cfg} } func initializeLogKernel(cfg *Config) error { ctx := context.Background() - cluster := gocql.NewCluster(cfg.DSN) + cluster, err := newCluster(cfg) + if err != nil { + return err + } cluster.Consistency = gocql.Quorum cluster.Port = cfg.Port + cluster.Timeout = cfg.Timeout session, err := cluster.CreateSession() if err != nil { @@ -62,7 +58,40 @@ func initializeLogKernel(cfg *Config) error { return nil } +func newCluster(cfg *Config) (*gocql.ClusterConfig, error) { + cluster := gocql.NewCluster(cfg.DSN) + if cfg.Auth.UserName != "" && cfg.Auth.Password == "" { + return nil, errors.New("empty auth.password") + } + if cfg.Auth.Password != "" && cfg.Auth.UserName == "" { + return nil, errors.New("empty auth.username") + } + if cfg.Auth.UserName != "" && cfg.Auth.Password != "" { + cluster.Authenticator = gocql.PasswordAuthenticator{ + Username: cfg.Auth.UserName, + Password: string(cfg.Auth.Password), + } + } + cluster.Consistency = gocql.Quorum + cluster.Port = cfg.Port + return cluster, nil +} + func (e *logsExporter) Start(_ context.Context, _ component.Host) error { + cluster, err := newCluster(e.cfg) + if err != nil { + return err + } + cluster.Keyspace = e.cfg.Keyspace + cluster.Consistency = gocql.Quorum + cluster.Port = e.cfg.Port + cluster.Timeout = e.cfg.Timeout + + session, err := cluster.CreateSession() + if err != nil { + return err + } + e.client = session initializeErr := initializeLogKernel(e.cfg) return initializeErr } diff --git a/exporter/cassandraexporter/exporter_logs_test.go b/exporter/cassandraexporter/exporter_logs_test.go new file mode 100644 index 000000000000..017b14fc2346 --- /dev/null +++ b/exporter/cassandraexporter/exporter_logs_test.go @@ -0,0 +1,66 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package cassandraexporter + +import ( + "errors" + "testing" + + "github.com/gocql/gocql" + "github.com/stretchr/testify/require" +) + +func TestNewCluster(t *testing.T) { + testCases := map[string]struct { + cfg *Config + expectedAuthenticator gocql.Authenticator + expectedErr error + }{ + "empty_auth": { + cfg: withDefaultConfig(), + expectedAuthenticator: nil, + }, + "empty_username": { + cfg: withDefaultConfig(func(config *Config) { + config.Auth.Password = "pass" + }), + expectedAuthenticator: nil, + expectedErr: errors.New("empty auth.username"), + }, + "empty_password": { + cfg: withDefaultConfig(func(config *Config) { + config.Auth.UserName = "user" + }), + expectedAuthenticator: nil, + expectedErr: errors.New("empty auth.password"), + }, + "success_auth": { + cfg: withDefaultConfig(func(config *Config) { + config.Auth.UserName = "user" + config.Auth.Password = "pass" + }), + expectedAuthenticator: gocql.PasswordAuthenticator{ + Username: "user", + Password: "pass", + }, + }, + } + for name, test := range testCases { + t.Run(name, func(t *testing.T) { + c, err := newCluster(test.cfg) + if err == nil { + require.Equal(t, test.expectedAuthenticator, c.Authenticator) + } + require.Equal(t, test.expectedErr, err) + }) + } +} + +func withDefaultConfig(fns ...func(*Config)) *Config { + cfg := createDefaultConfig().(*Config) + for _, fn := range fns { + fn(cfg) + } + return cfg +} diff --git a/exporter/cassandraexporter/exporter_traces.go b/exporter/cassandraexporter/exporter_traces.go index f8f72e342d92..9e39ba347df4 100644 --- a/exporter/cassandraexporter/exporter_traces.go +++ b/exporter/cassandraexporter/exporter_traces.go @@ -22,25 +22,19 @@ type tracesExporter struct { cfg *Config } -func newTracesExporter(logger *zap.Logger, cfg *Config) (*tracesExporter, error) { - cluster := gocql.NewCluster(cfg.DSN) - session, err := cluster.CreateSession() - cluster.Keyspace = cfg.Keyspace - cluster.Consistency = gocql.Quorum - cluster.Port = cfg.Port - - if err != nil { - return nil, err - } - - return &tracesExporter{logger: logger, client: session, cfg: cfg}, nil +func newTracesExporter(logger *zap.Logger, cfg *Config) *tracesExporter { + return &tracesExporter{logger: logger, cfg: cfg} } func initializeTraceKernel(cfg *Config) error { ctx := context.Background() - cluster := gocql.NewCluster(cfg.DSN) + cluster, err := newCluster(cfg) + if err != nil { + return err + } cluster.Consistency = gocql.Quorum cluster.Port = cfg.Port + cluster.Timeout = cfg.Timeout session, err := cluster.CreateSession() if err != nil { @@ -86,6 +80,20 @@ func parseCreateDatabaseSQL(cfg *Config) string { } func (e *tracesExporter) Start(_ context.Context, _ component.Host) error { + cluster, err := newCluster(e.cfg) + if err != nil { + return err + } + cluster.Keyspace = e.cfg.Keyspace + cluster.Consistency = gocql.Quorum + cluster.Port = e.cfg.Port + cluster.Timeout = e.cfg.Timeout + + session, err := cluster.CreateSession() + if err != nil { + return err + } + e.client = session initializeErr := initializeTraceKernel(e.cfg) return initializeErr } diff --git a/exporter/cassandraexporter/factory.go b/exporter/cassandraexporter/factory.go index 6b81592338be..1ecee18dd7f7 100644 --- a/exporter/cassandraexporter/factory.go +++ b/exporter/cassandraexporter/factory.go @@ -5,7 +5,7 @@ package cassandraexporter // import "github.com/open-telemetry/opentelemetry-col import ( "context" - "fmt" + "time" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/exporter" @@ -26,6 +26,7 @@ func createDefaultConfig() component.Config { return &Config{ DSN: "127.0.0.1", Port: 9042, + Timeout: 10 * time.Second, Keyspace: "otel", TraceTable: "otel_spans", LogsTable: "otel_logs", @@ -41,22 +42,14 @@ func createDefaultConfig() component.Config { func createTracesExporter(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (exporter.Traces, error) { c := cfg.(*Config) - exp, err := newTracesExporter(set.Logger, c) - - if err != nil { - return nil, fmt.Errorf("cannot configure cassandra traces exporter: %w", err) - } + exp := newTracesExporter(set.Logger, c) return exporterhelper.NewTracesExporter(ctx, set, cfg, exp.pushTraceData, exporterhelper.WithShutdown(exp.Shutdown), exporterhelper.WithStart(exp.Start)) } func createLogsExporter(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (exporter.Logs, error) { c := cfg.(*Config) - exp, err := newLogsExporter(set.Logger, c) - - if err != nil { - return nil, fmt.Errorf("cannot configure cassandra traces exporter: %w", err) - } + exp := newLogsExporter(set.Logger, c) return exporterhelper.NewLogsExporter(ctx, set, cfg, exp.pushLogsData, exporterhelper.WithShutdown(exp.Shutdown), exporterhelper.WithStart(exp.Start)) } diff --git a/exporter/cassandraexporter/generated_component_test.go b/exporter/cassandraexporter/generated_component_test.go new file mode 100644 index 000000000000..3dcb72b4763c --- /dev/null +++ b/exporter/cassandraexporter/generated_component_test.go @@ -0,0 +1,94 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package cassandraexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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 exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/cassandraexporter/go.mod b/exporter/cassandraexporter/go.mod index b1c5244d1c2f..adb53f4e17fa 100644 --- a/exporter/cassandraexporter/go.mod +++ b/exporter/cassandraexporter/go.mod @@ -1,52 +1,65 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter -go 1.18 +go 1.21 require ( - github.com/gocql/gocql v1.3.1 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/gocql/gocql v1.6.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.6.0 // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect - github.com/hashicorp/go-version v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/cassandraexporter/go.sum b/exporter/cassandraexporter/go.sum index f27f3a440dfb..10b66c9a628b 100644 --- a/exporter/cassandraexporter/go.sum +++ b/exporter/cassandraexporter/go.sum @@ -1,65 +1,41 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -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/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 h1:mXoPYz/Ul5HYEDvkta6I8/rnYM5gSdSV2tJ6XbZuEtY= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -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/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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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/gocql/gocql v1.3.1 h1:BTwM4rux+ah5G3oH6/MQa+tur/TDd/XAAOXDxBBs7rg= -github.com/gocql/gocql v1.3.1/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gocql/gocql v1.6.0 h1:IdFdOTbnpbd0pDhl4REKQDM+Q0SzKXQ1Yh+YZZ8T/qU= +github.com/gocql/gocql v1.6.0/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= -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/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -68,18 +44,17 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -89,100 +64,88 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -190,40 +153,18 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -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= -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/exporter/cassandraexporter/internal/metadata/generated_status.go b/exporter/cassandraexporter/internal/metadata/generated_status.go index 1cf5068630e7..d3e3e5d3b505 100644 --- a/exporter/cassandraexporter/internal/metadata/generated_status.go +++ b/exporter/cassandraexporter/internal/metadata/generated_status.go @@ -4,10 +4,23 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("cassandra") ) const ( - Type = "cassandra" TracesStability = component.StabilityLevelAlpha LogsStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/cassandra") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/cassandra") +} diff --git a/exporter/cassandraexporter/metadata.yaml b/exporter/cassandraexporter/metadata.yaml index 739ceaa6a0af..945c04a21e3d 100644 --- a/exporter/cassandraexporter/metadata.yaml +++ b/exporter/cassandraexporter/metadata.yaml @@ -1,4 +1,5 @@ type: cassandra +scope_name: otelcol/cassandra status: class: exporter @@ -8,3 +9,6 @@ status: codeowners: active: [atoulme, emreyalvac] +# TODO: Update the exporter to pass the tests +tests: + skip_lifecycle: true \ No newline at end of file diff --git a/exporter/cassandraexporter/package_test.go b/exporter/cassandraexporter/package_test.go new file mode 100644 index 000000000000..3ff28cf1d7cc --- /dev/null +++ b/exporter/cassandraexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package cassandraexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/cassandraexporter/testdata/config.yaml b/exporter/cassandraexporter/testdata/config.yaml index 73d964723cbf..0c85ea02fb9b 100644 --- a/exporter/cassandraexporter/testdata/config.yaml +++ b/exporter/cassandraexporter/testdata/config.yaml @@ -2,6 +2,7 @@ cassandra: dsn: 127.0.0.1 keyspace: "otel" trace_table: "otel_spans" + timeout: 10s logs_table: "otel_logs" replication: class: "SimpleStrategy" diff --git a/exporter/clickhouseexporter/Makefile b/exporter/clickhouseexporter/Makefile index b25a796464ef..f462514a2d6c 100644 --- a/exporter/clickhouseexporter/Makefile +++ b/exporter/clickhouseexporter/Makefile @@ -1,8 +1,8 @@ include ../../Makefile.Common local-run-example: - cd ../../ && GOOS=linux go build -o ./local/otelcontribcol ./cmd/otelcontribcol + cd ../../cmd/otelcontribcol && GOOS=linux go build -o ../../local/otelcontribcol cd example && docker-compose up -d recreate-otel-collector: - cd ../../ && GOOS=linux go build -o ./local/otelcontribcol ./cmd/otelcontribcol + cd ../../ && make otelcontribcol cd example && docker-compose up --build otelcollector diff --git a/exporter/clickhouseexporter/README.md b/exporter/clickhouseexporter/README.md index a351eebd12f2..881a83571039 100644 --- a/exporter/clickhouseexporter/README.md +++ b/exporter/clickhouseexporter/README.md @@ -6,14 +6,14 @@ | Stability | [alpha]: traces, metrics, logs | | Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fclickhouse%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fclickhouse) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fclickhouse%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fclickhouse) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@hanjm](https://www.github.com/hanjm), [@dmitryax](https://www.github.com/dmitryax), [@Frapschen](https://www.github.com/Frapschen) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@hanjm](https://www.github.com/hanjm), [@dmitryax](https://www.github.com/dmitryax), [@Frapschen](https://www.github.com/Frapschen), [@SpencerTorres](https://www.github.com/SpencerTorres) | [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -This exporter supports sending OpenTelemetry data to [ClickHouse](https://clickhouse.com/). +This exporter supports sending OpenTelemetry data to [ClickHouse](https://clickhouse.com/). > ClickHouse is an open-source, high performance columnar OLAP database management system for real-time analytics using > SQL. > Throughput can be measured in rows per second or megabytes per second. @@ -140,7 +140,7 @@ SELECT Timestamp as log_time, toString(Links.TraceId) FROM otel_traces WHERE ServiceName = 'clickhouse-exporter' - AND SpanAttributes['peer.service'] = 'tracegen-server' + AND SpanAttributes['peer.service'] = 'telemetrygen-server' AND Timestamp >= NOW() - INTERVAL 1 HOUR Limit 100; ``` @@ -279,7 +279,8 @@ Connection options: - `username` (default = ): The authentication username. - `password` (default = ): The authentication password. -- `ttl_days` (default = 0): The data time-to-live in days, 0 means no ttl. +- `ttl_days` (default = 0): **Deprecated: Use 'ttl' instead.** The data time-to-live in days, 0 means no ttl. +- `ttl` (default = 0): The data time-to-live example 30m, 48h. Also, 0 means no ttl. - `database` (default = otel): The database name. - `connection_params` (default = {}). Params is the extra connection parameters with map format. @@ -289,6 +290,19 @@ ClickHouse tables: - `traces_table_name` (default = otel_traces): The table name for traces. - `metrics_table_name` (default = otel_metrics): The table name for metrics. +Cluster definition: + +- `cluster_name` (default = ): Optional. If present, will include `ON CLUSTER cluster_name` when creating tables. + +Table engine: + +- `table_engine` + - `name` (default = MergeTree) + - `params` (default = ) + +Modifies `ENGINE` definition when table is created. If not set then `ENGINE` defaults to `MergeTree()`. +Can be combined with `cluster_name` to enable [replication for fault tolerance](https://clickhouse.com/docs/en/architecture/replication). + Processing: - `timeout` (default = 5s): The timeout for every attempt to send data to the backend. @@ -311,7 +325,7 @@ use the `https` scheme. This example shows how to configure the exporter to send data to a ClickHouse server. It uses the native protocol without TLS. The exporter will create the database and tables if they don't exist. -The data is stored for 3 days. +The data is stored for 72 hours (3 days). ```yaml receivers: @@ -324,7 +338,7 @@ exporters: clickhouse: endpoint: tcp://127.0.0.1:9000?dial_timeout=10s&compress=lz4 database: otel - ttl_days: 3 + ttl: 72h logs_table_name: otel_logs traces_table_name: otel_traces metrics_table_name: otel_metrics @@ -334,6 +348,10 @@ exporters: initial_interval: 5s max_interval: 30s max_elapsed_time: 300s + # cluster_name: my_cluster + # table_engine: + # name: ReplicatedMergeTree + # params: service: pipelines: logs: @@ -341,3 +359,15 @@ service: processors: [ batch ] exporters: [ clickhouse ] ``` + +## Contributing + +Before contributing, review the contribution guidelines in [CONTRIBUTING.md](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md). + +#### Integration tests + +Integration tests can be run with the following command: +```sh +go test -tags integration -run=TestIntegration +``` +*Note: Make sure integration tests pass after making changes to SQL.* diff --git a/exporter/clickhouseexporter/config.go b/exporter/clickhouseexporter/config.go index 3986b244f0bd..41b639a78823 100644 --- a/exporter/clickhouseexporter/config.go +++ b/exporter/clickhouseexporter/config.go @@ -8,23 +8,25 @@ import ( "errors" "fmt" "net/url" + "time" "github.com/ClickHouse/clickhouse-go/v2" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) // Config defines configuration for Elastic exporter. type Config struct { exporterhelper.TimeoutSettings `mapstructure:",squash"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` exporterhelper.QueueSettings `mapstructure:"sending_queue"` // Endpoint is the clickhouse endpoint. Endpoint string `mapstructure:"endpoint"` // Username is the authentication username. Username string `mapstructure:"username"` - // Username is the authentication password. + // Password is the authentication password. Password configopaque.String `mapstructure:"password"` // Database is the database name to export. Database string `mapstructure:"database"` @@ -32,22 +34,37 @@ type Config struct { ConnectionParams map[string]string `mapstructure:"connection_params"` // LogsTableName is the table name for logs. default is `otel_logs`. LogsTableName string `mapstructure:"logs_table_name"` - // TracesTableName is the table name for logs. default is `otel_traces`. + // TracesTableName is the table name for traces. default is `otel_traces`. TracesTableName string `mapstructure:"traces_table_name"` // MetricsTableName is the table name for metrics. default is `otel_metrics`. MetricsTableName string `mapstructure:"metrics_table_name"` // TTLDays is The data time-to-live in days, 0 means no ttl. + // Deprecated: Use 'ttl' instead TTLDays uint `mapstructure:"ttl_days"` + // TTL is The data time-to-live example 30m, 48h. 0 means no ttl. + TTL time.Duration `mapstructure:"ttl"` + // TableEngine is the table engine to use. default is `MergeTree()`. + TableEngine TableEngine `mapstructure:"table_engine"` + // ClusterName if set will append `ON CLUSTER` with the provided name when creating tables. + ClusterName string `mapstructure:"cluster_name"` +} + +// TableEngine defines the ENGINE string value when creating the table. +type TableEngine struct { + Name string `mapstructure:"name"` + Params string `mapstructure:"params"` } const defaultDatabase = "default" +const defaultTableEngineName = "MergeTree" var ( errConfigNoEndpoint = errors.New("endpoint must be specified") errConfigInvalidEndpoint = errors.New("endpoint must be url format") + errConfigTTL = errors.New("both 'ttl_days' and 'ttl' can not be provided. 'ttl_days' is deprecated, use 'ttl' instead") ) -// Validate the clickhouse server configuration. +// Validate the ClickHouse server configuration. func (cfg *Config) Validate() (err error) { if cfg.Endpoint == "" { err = errors.Join(err, errConfigNoEndpoint) @@ -57,6 +74,10 @@ func (cfg *Config) Validate() (err error) { err = errors.Join(err, e) } + if cfg.TTL > 0 && cfg.TTLDays > 0 { + err = errors.Join(err, errConfigTTL) + } + // Validate DSN with clickhouse driver. // Last chance to catch invalid config. if _, e := clickhouse.ParseDSN(dsn); e != nil { @@ -124,5 +145,26 @@ func (cfg *Config) buildDB(database string) (*sql.DB, error) { } return conn, nil +} + +// TableEngineString generates the ENGINE string. +func (cfg *Config) TableEngineString() string { + engine := cfg.TableEngine.Name + params := cfg.TableEngine.Params + + if cfg.TableEngine.Name == "" { + engine = defaultTableEngineName + params = "" + } + + return fmt.Sprintf("%s(%s)", engine, params) +} + +// ClusterString generates the ON CLUSTER string. Returns empty string if not set. +func (cfg *Config) ClusterString() string { + if cfg.ClusterName == "" { + return "" + } + return fmt.Sprintf("ON CLUSTER %s", cfg.ClusterName) } diff --git a/exporter/clickhouseexporter/config_test.go b/exporter/clickhouseexporter/config_test.go index e0c171848f4c..3feceb439a3d 100644 --- a/exporter/clickhouseexporter/config_test.go +++ b/exporter/clickhouseexporter/config_test.go @@ -4,6 +4,7 @@ package clickhouseexporter import ( + "fmt" "path/filepath" "testing" "time" @@ -14,6 +15,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -31,7 +33,7 @@ func TestLoadConfig(t *testing.T) { defaultCfg := createDefaultConfig() defaultCfg.(*Config).Endpoint = defaultEndpoint - storageID := component.NewIDWithName(component.Type("file_storage"), "clickhouse") + storageID := component.MustNewIDWithName("file_storage", "clickhouse") tests := []struct { id component.ID @@ -49,14 +51,14 @@ func TestLoadConfig(t *testing.T) { Database: "otel", Username: "foo", Password: "bar", - TTLDays: 3, + TTL: 72 * time.Hour, LogsTableName: "otel_logs", TracesTableName: "otel_traces", MetricsTableName: "otel_metrics", TimeoutSettings: exporterhelper.TimeoutSettings{ Timeout: 5 * time.Second, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 5 * time.Second, MaxInterval: 30 * time.Second, @@ -260,7 +262,7 @@ func TestConfig_buildDSN(t *testing.T) { } else { // Validate DSN opts, err := clickhouse.ParseDSN(got) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equalf(t, tt.wantChOptions.Secure, opts.TLS != nil, "TLSConfig is not nil") assert.Equalf(t, tt.wantChOptions.DialTimeout, opts.DialTimeout, "DialTimeout is not nil") if tt.wantChOptions.Compress != 0 { @@ -272,3 +274,78 @@ func TestConfig_buildDSN(t *testing.T) { }) } } + +func TestTableEngineConfigParsing(t *testing.T) { + t.Parallel() + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + + tests := []struct { + id component.ID + expected string + }{ + { + id: component.NewIDWithName(metadata.Type, "table-engine-empty"), + expected: "MergeTree()", + }, + { + id: component.NewIDWithName(metadata.Type, "table-engine-name-only"), + expected: "ReplicatedReplacingMergeTree()", + }, + { + id: component.NewIDWithName(metadata.Type, "table-engine-full"), + expected: "ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/table_name', '{replica}', ver)", + }, + { + id: component.NewIDWithName(metadata.Type, "table-engine-params-only"), + expected: "MergeTree()", + }, + } + + for _, tt := range tests { + t.Run(tt.id.String(), func(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + + sub, err := cm.Sub(tt.id.String()) + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + assert.NoError(t, component.ValidateConfig(cfg)) + assert.Equal(t, tt.expected, cfg.(*Config).TableEngineString()) + }) + } +} + +func TestClusterString(t *testing.T) { + t.Parallel() + + tests := []struct { + input string + expected string + }{ + { + input: "", + expected: "", + }, + { + input: "cluster_a_b", + expected: "ON CLUSTER cluster_a_b", + }, + { + input: "cluster a b", + expected: "ON CLUSTER cluster a b", + }, + } + + for i, tt := range tests { + t.Run(fmt.Sprintf("ClusterString case %d", i), func(t *testing.T) { + cfg := createDefaultConfig() + cfg.(*Config).Endpoint = defaultEndpoint + cfg.(*Config).ClusterName = tt.input + + assert.NoError(t, component.ValidateConfig(cfg)) + assert.Equal(t, tt.expected, cfg.(*Config).ClusterString()) + }) + } +} diff --git a/exporter/clickhouseexporter/example/docker-compose.yml b/exporter/clickhouseexporter/example/docker-compose.yml index 3160a3b7404a..709d554f8679 100644 --- a/exporter/clickhouseexporter/example/docker-compose.yml +++ b/exporter/clickhouseexporter/example/docker-compose.yml @@ -69,10 +69,11 @@ services: stop_signal: SIGKILL # Traces generator - tracegen: + telemetrygen: build: - context: ../../../cmd/tracegen/ + context: ../../../cmd/telemetrygen/ command: + - traces - --otlp-endpoint=otelcollector:4317 - --otlp-insecure - --rate=100 diff --git a/exporter/clickhouseexporter/example/otel-collector-config.yml b/exporter/clickhouseexporter/example/otel-collector-config.yml index 5bf5e2856084..e6c13dd5d7b3 100644 --- a/exporter/clickhouseexporter/example/otel-collector-config.yml +++ b/exporter/clickhouseexporter/example/otel-collector-config.yml @@ -28,7 +28,7 @@ exporters: database: otel logs_table_name: otel_logs traces_table_name: otel_traces - ttl_days: 3 + ttl: 12h timeout: 10s sending_queue: queue_size: 100 diff --git a/exporter/clickhouseexporter/exporter_logs.go b/exporter/clickhouseexporter/exporter_logs.go index a970bdb26c96..b75ff39a0068 100644 --- a/exporter/clickhouseexporter/exporter_logs.go +++ b/exporter/clickhouseexporter/exporter_logs.go @@ -128,7 +128,7 @@ func attributesToMap(attributes pcommon.Map) map[string]string { const ( // language=ClickHouse SQL createLogsTableSQL = ` -CREATE TABLE IF NOT EXISTS %s ( +CREATE TABLE IF NOT EXISTS %s %s ( Timestamp DateTime64(9) CODEC(Delta, ZSTD(1)), TraceId String CODEC(ZSTD(1)), SpanId String CODEC(ZSTD(1)), @@ -152,7 +152,7 @@ CREATE TABLE IF NOT EXISTS %s ( INDEX idx_log_attr_key mapKeys(LogAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_log_attr_value mapValues(LogAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_body Body TYPE tokenbf_v1(32768, 3, 0) GRANULARITY 1 -) ENGINE MergeTree() +) ENGINE = %s %s PARTITION BY toDate(Timestamp) ORDER BY (ServiceName, SeverityText, toUnixTimestamp(Timestamp), TraceId) @@ -218,7 +218,7 @@ func createDatabase(ctx context.Context, cfg *Config) error { defer func() { _ = db.Close() }() - query := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s", cfg.Database) + query := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s %s", cfg.Database, cfg.ClusterString()) _, err = db.ExecContext(ctx, query) if err != nil { return fmt.Errorf("create database:%w", err) @@ -234,11 +234,8 @@ func createLogsTable(ctx context.Context, cfg *Config, db *sql.DB) error { } func renderCreateLogsTableSQL(cfg *Config) string { - var ttlExpr string - if cfg.TTLDays > 0 { - ttlExpr = fmt.Sprintf(`TTL toDateTime(Timestamp) + toIntervalDay(%d)`, cfg.TTLDays) - } - return fmt.Sprintf(createLogsTableSQL, cfg.LogsTableName, ttlExpr) + ttlExpr := generateTTLExpr(cfg.TTLDays, cfg.TTL, "Timestamp") + return fmt.Sprintf(createLogsTableSQL, cfg.LogsTableName, cfg.ClusterString(), cfg.TableEngineString(), ttlExpr) } func renderInsertLogsSQL(cfg *Config) string { diff --git a/exporter/clickhouseexporter/exporter_logs_test.go b/exporter/clickhouseexporter/exporter_logs_test.go index c2d2bc44f2d7..aa3ff11acded 100644 --- a/exporter/clickhouseexporter/exporter_logs_test.go +++ b/exporter/clickhouseexporter/exporter_logs_test.go @@ -24,14 +24,14 @@ func TestLogsExporter_New(t *testing.T) { type validate func(*testing.T, *logsExporter, error) _ = func(t *testing.T, exporter *logsExporter, err error) { - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, exporter) } _ = func(want error) validate { return func(t *testing.T, exporter *logsExporter, err error) { require.Nil(t, exporter) - require.NotNil(t, err) + require.Error(t, err) if !errors.Is(err, want) { t.Fatalf("Expected error '%v', but got '%v'", want, err) } @@ -39,8 +39,8 @@ func TestLogsExporter_New(t *testing.T) { } failWithMsg := func(msg string) validate { - return func(t *testing.T, exporter *logsExporter, err error) { - require.NotNil(t, err) + return func(t *testing.T, _ *logsExporter, err error) { + require.Error(t, err) require.Contains(t, err.Error(), msg) } } @@ -121,6 +121,20 @@ func TestExporter_pushLogsData(t *testing.T) { }) } +func TestLogsClusterConfig(t *testing.T) { + testClusterConfig(t, func(t *testing.T, dsn string, clusterTest clusterTestConfig, fns ...func(*Config)) { + exporter := newTestLogsExporter(t, dsn, fns...) + clusterTest.verifyConfig(t, exporter.cfg) + }) +} + +func TestLogsTableEngineConfig(t *testing.T) { + testTableEngineConfig(t, func(t *testing.T, dsn string, engineTest tableEngineTestConfig, fns ...func(*Config)) { + exporter := newTestLogsExporter(t, dsn, fns...) + engineTest.verifyConfig(t, exporter.cfg.TableEngine) + }) +} + func newTestLogsExporter(t *testing.T, dsn string, fns ...func(*Config)) *logsExporter { exporter, err := newLogsExporter(zaptest.NewLogger(t), withTestExporterConfig(fns...)(dsn)) require.NoError(t, err) @@ -151,10 +165,18 @@ func simpleLogs(count int) plog.Logs { sl.Scope().SetName("io.opentelemetry.contrib.clickhouse") sl.Scope().SetVersion("1.0.0") sl.Scope().Attributes().PutStr("lib", "clickhouse") + timestamp := time.Unix(1703498029, 0) for i := 0; i < count; i++ { r := sl.LogRecords().AppendEmpty() - r.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) - r.Attributes().PutStr(conventions.AttributeServiceName, "v") + r.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) + r.SetObservedTimestamp(pcommon.NewTimestampFromTime(timestamp)) + r.SetSeverityNumber(plog.SeverityNumberError2) + r.SetSeverityText("error") + r.Body().SetStr("error message") + r.Attributes().PutStr(conventions.AttributeServiceNamespace, "default") + r.SetFlags(plog.DefaultLogRecordFlags) + r.SetTraceID([16]byte{1, 2, 3, byte(i)}) + r.SetSpanID([8]byte{1, 2, 3, byte(i)}) } return logs } diff --git a/exporter/clickhouseexporter/exporter_metrics.go b/exporter/clickhouseexporter/exporter_metrics.go index 916b9381e201..f08040f01a63 100644 --- a/exporter/clickhouseexporter/exporter_metrics.go +++ b/exporter/clickhouseexporter/exporter_metrics.go @@ -42,7 +42,9 @@ func (e *metricsExporter) start(ctx context.Context, _ component.Host) error { } internal.SetLogger(e.logger) - return internal.NewMetricsTable(ctx, e.cfg.MetricsTableName, e.cfg.TTLDays, e.client) + + ttlExpr := generateTTLExpr(e.cfg.TTLDays, e.cfg.TTL, "TimeUnix") + return internal.NewMetricsTable(ctx, e.cfg.MetricsTableName, e.cfg.ClusterString(), e.cfg.TableEngineString(), ttlExpr, e.client) } // shutdown will shut down the exporter. diff --git a/exporter/clickhouseexporter/exporter_metrics_test.go b/exporter/clickhouseexporter/exporter_metrics_test.go index 4058a80bc8ac..5a705c3b6862 100644 --- a/exporter/clickhouseexporter/exporter_metrics_test.go +++ b/exporter/clickhouseexporter/exporter_metrics_test.go @@ -12,35 +12,50 @@ import ( "testing" "time" + "github.com/ClickHouse/clickhouse-go/v2" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" "go.uber.org/zap/zaptest" ) +func TestMetricsClusterConfig(t *testing.T) { + testClusterConfig(t, func(t *testing.T, dsn string, clusterTest clusterTestConfig, fns ...func(*Config)) { + exporter := newTestMetricsExporter(t, dsn, fns...) + clusterTest.verifyConfig(t, exporter.cfg) + }) +} + +func TestMetricsTableEngineConfig(t *testing.T) { + testTableEngineConfig(t, func(t *testing.T, dsn string, engineTest tableEngineTestConfig, fns ...func(*Config)) { + exporter := newTestMetricsExporter(t, dsn, fns...) + engineTest.verifyConfig(t, exporter.cfg.TableEngine) + }) +} + func TestExporter_pushMetricsData(t *testing.T) { t.Parallel() t.Run("push success", func(t *testing.T) { items := &atomic.Int32{} - initClickhouseTestServer(t, func(query string, values []driver.Value) error { + initClickhouseTestServer(t, func(query string, _ []driver.Value) error { if strings.HasPrefix(query, "INSERT") { items.Add(1) } return nil }) - exporter := newTestMetricsExporter(t) + exporter := newTestMetricsExporter(t, defaultEndpoint) mustPushMetricsData(t, exporter, simpleMetrics(1)) require.Equal(t, int32(15), items.Load()) }) t.Run("push failure", func(t *testing.T) { - initClickhouseTestServer(t, func(query string, values []driver.Value) error { + initClickhouseTestServer(t, func(query string, _ []driver.Value) error { if strings.HasPrefix(query, "INSERT") { return fmt.Errorf("mock insert error") } return nil }) - exporter := newTestMetricsExporter(t) + exporter := newTestMetricsExporter(t, defaultEndpoint) err := exporter.pushMetricsData(context.TODO(), simpleMetrics(2)) require.Error(t, err) }) @@ -92,16 +107,39 @@ func TestExporter_pushMetricsData(t *testing.T) { } return nil }) - exporter := newTestMetricsExporter(t) + exporter := newTestMetricsExporter(t, defaultEndpoint) mustPushMetricsData(t, exporter, simpleMetrics(1)) require.Equal(t, int32(15), items.Load()) }) + t.Run("check traceID and spanID", func(t *testing.T) { + initClickhouseTestServer(t, func(query string, values []driver.Value) error { + if strings.HasPrefix(query, "INSERT INTO otel_metrics_gauge") { + require.Equal(t, clickhouse.ArraySet{"0102030000000000"}, values[19]) + require.Equal(t, clickhouse.ArraySet{"01020300000000000000000000000000"}, values[20]) + } + if strings.HasPrefix(query, "INSERT INTO otel_metrics_histogram") { + require.Equal(t, clickhouse.ArraySet{"0102030000000000"}, values[21]) + require.Equal(t, clickhouse.ArraySet{"01020300000000000000000000000000"}, values[22]) + } + if strings.HasPrefix(query, "INSERT INTO otel_metrics_sum ") { + require.Equal(t, clickhouse.ArraySet{"0102030000000000"}, values[19]) + require.Equal(t, clickhouse.ArraySet{"01020300000000000000000000000000"}, values[20]) + } + if strings.HasPrefix(query, "INSERT INTO otel_metrics_exponential_histogram") { + require.Equal(t, clickhouse.ArraySet{"0102030000000000"}, values[25]) + require.Equal(t, clickhouse.ArraySet{"01020300000000000000000000000000"}, values[26]) + } + return nil + }) + exporter := newTestMetricsExporter(t, defaultEndpoint) + mustPushMetricsData(t, exporter, simpleMetrics(1)) + }) } func Benchmark_pushMetricsData(b *testing.B) { pm := simpleMetrics(1) - exporter := newTestMetricsExporter(&testing.T{}) + exporter := newTestMetricsExporter(&testing.T{}, defaultEndpoint) b.ReportAllocs() b.ResetTimer() for n := 0; n < b.N; n++ { @@ -124,6 +162,7 @@ func simpleMetrics(count int) pmetric.Metrics { sm.Scope().SetDroppedAttributesCount(10) sm.Scope().SetName("Scope name 1") sm.Scope().SetVersion("Scope version 1") + timestamp := time.Unix(1703498029, 0) for i := 0; i < count; i++ { // gauge m := sm.Metrics().AppendEmpty() @@ -132,10 +171,12 @@ func simpleMetrics(count int) pmetric.Metrics { m.SetDescription("This is a gauge metrics") dp := m.SetEmptyGauge().DataPoints().AppendEmpty() dp.SetIntValue(int64(i)) + dp.SetFlags(pmetric.DefaultDataPointFlags) dp.Attributes().PutStr("gauge_label_1", "1") - dp.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now())) - dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + dp.SetStartTimestamp(pcommon.NewTimestampFromTime(timestamp)) + dp.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) exemplars := dp.Exemplars().AppendEmpty() + exemplars.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) exemplars.SetIntValue(54) exemplars.FilteredAttributes().PutStr("key", "value") exemplars.FilteredAttributes().PutStr("key2", "value2") @@ -149,10 +190,12 @@ func simpleMetrics(count int) pmetric.Metrics { m.SetDescription("This is a sum metrics") dp = m.SetEmptySum().DataPoints().AppendEmpty() dp.SetDoubleValue(11.234) + dp.SetFlags(pmetric.DefaultDataPointFlags) dp.Attributes().PutStr("sum_label_1", "1") - dp.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now())) - dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + dp.SetStartTimestamp(pcommon.NewTimestampFromTime(timestamp)) + dp.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) exemplars = dp.Exemplars().AppendEmpty() + exemplars.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) exemplars.SetIntValue(54) exemplars.FilteredAttributes().PutStr("key", "value") exemplars.FilteredAttributes().PutStr("key2", "value2") @@ -165,17 +208,18 @@ func simpleMetrics(count int) pmetric.Metrics { m.SetUnit("ms") m.SetDescription("This is a histogram metrics") dpHisto := m.SetEmptyHistogram().DataPoints().AppendEmpty() - dpHisto.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now())) - dpHisto.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + dpHisto.SetStartTimestamp(pcommon.NewTimestampFromTime(timestamp)) + dpHisto.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) dpHisto.SetCount(1) dpHisto.SetSum(1) dpHisto.Attributes().PutStr("key", "value") - dpHisto.Attributes().PutStr("key", "value") + dpHisto.Attributes().PutStr("key2", "value") dpHisto.ExplicitBounds().FromRaw([]float64{0, 0, 0, 0, 0}) dpHisto.BucketCounts().FromRaw([]uint64{0, 0, 0, 1, 0}) dpHisto.SetMin(0) dpHisto.SetMax(1) exemplars = dpHisto.Exemplars().AppendEmpty() + exemplars.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) exemplars.SetDoubleValue(55.22) exemplars.FilteredAttributes().PutStr("key", "value") exemplars.FilteredAttributes().PutStr("key2", "value2") @@ -188,21 +232,22 @@ func simpleMetrics(count int) pmetric.Metrics { m.SetUnit("ms") m.SetDescription("This is a exp histogram metrics") dpExpHisto := m.SetEmptyExponentialHistogram().DataPoints().AppendEmpty() - dpExpHisto.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now())) - dpExpHisto.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + dpExpHisto.SetStartTimestamp(pcommon.NewTimestampFromTime(timestamp)) + dpExpHisto.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) dpExpHisto.SetSum(1) dpExpHisto.SetMin(0) dpExpHisto.SetMax(1) dpExpHisto.SetZeroCount(0) dpExpHisto.SetCount(1) dpExpHisto.Attributes().PutStr("key", "value") - dpExpHisto.Attributes().PutStr("key", "value") + dpExpHisto.Attributes().PutStr("key2", "value") dpExpHisto.Negative().SetOffset(1) dpExpHisto.Negative().BucketCounts().FromRaw([]uint64{0, 0, 0, 1, 0}) dpExpHisto.Positive().SetOffset(1) dpExpHisto.Positive().BucketCounts().FromRaw([]uint64{0, 0, 0, 1, 0}) exemplars = dpExpHisto.Exemplars().AppendEmpty() + exemplars.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) exemplars.SetIntValue(54) exemplars.FilteredAttributes().PutStr("key", "value") exemplars.FilteredAttributes().PutStr("key2", "value2") @@ -215,10 +260,10 @@ func simpleMetrics(count int) pmetric.Metrics { m.SetUnit("ms") m.SetDescription("This is a summary metrics") summary := m.SetEmptySummary().DataPoints().AppendEmpty() - summary.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now())) - summary.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + summary.SetStartTimestamp(pcommon.NewTimestampFromTime(timestamp)) + summary.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) summary.Attributes().PutStr("key", "value") - summary.Attributes().PutStr("key2", "value2") + summary.Attributes().PutStr("key2", "value") summary.SetCount(1) summary.SetSum(1) quantileValues := summary.QuantileValues().AppendEmpty() @@ -451,8 +496,9 @@ func mustPushMetricsData(t *testing.T, exporter *metricsExporter, md pmetric.Met require.NoError(t, err) } -func newTestMetricsExporter(t *testing.T) *metricsExporter { - exporter, err := newMetricsExporter(zaptest.NewLogger(t), withTestExporterConfig()(defaultEndpoint)) +// nolint:unparam // not need to check this func +func newTestMetricsExporter(t *testing.T, dsn string, fns ...func(*Config)) *metricsExporter { + exporter, err := newMetricsExporter(zaptest.NewLogger(t), withTestExporterConfig(fns...)(dsn)) require.NoError(t, err) require.NoError(t, exporter.start(context.TODO(), nil)) diff --git a/exporter/clickhouseexporter/exporter_sql_test.go b/exporter/clickhouseexporter/exporter_sql_test.go new file mode 100644 index 000000000000..17f52d4ba8be --- /dev/null +++ b/exporter/clickhouseexporter/exporter_sql_test.go @@ -0,0 +1,186 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package clickhouseexporter + +import ( + "database/sql/driver" + "fmt" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/require" +) + +type clusterTestCompletion func(t *testing.T, dsn string, clusterTest clusterTestConfig, fns ...func(*Config)) +type clusterTestConfig struct { + name string + cluster string + shouldPass bool +} + +func (test clusterTestConfig) verifyConfig(t *testing.T, cfg *Config) { + if test.cluster == "" { + require.Empty(t, cfg.ClusterString()) + } else { + require.NotEmpty(t, cfg.ClusterString()) + } +} + +func getQueryFirstLine(query string) string { + trimmed := strings.Trim(query, "\n") + line := strings.Split(trimmed, "\n")[0] + return strings.Trim(line, " (") +} + +func checkClusterQueryDefinition(query string, clusterName string) error { + line := getQueryFirstLine(query) + lowercasedLine := strings.ToLower(line) + suffix := fmt.Sprintf("ON CLUSTER %s", clusterName) + prefixes := []string{"create database", "create table", "create materialized view"} + for _, prefix := range prefixes { + if strings.HasPrefix(lowercasedLine, prefix) { + if strings.HasSuffix(line, suffix) { + return nil + } + } + } + + return fmt.Errorf("query does not contain cluster clause: %s", line) +} + +func testClusterConfig(t *testing.T, completion clusterTestCompletion) { + tests := []clusterTestConfig{ + { + name: "on", + cluster: "cluster_a_b", + shouldPass: true, + }, + { + name: "off", + cluster: "", + shouldPass: false, + }, + } + + for _, tt := range tests { + t.Run("test cluster config "+tt.name, func(t *testing.T) { + initClickhouseTestServer(t, func(query string, _ []driver.Value) error { + if tt.shouldPass { + require.NoError(t, checkClusterQueryDefinition(query, tt.cluster)) + } else { + require.Error(t, checkClusterQueryDefinition(query, tt.cluster)) + } + return nil + }) + + var configMods []func(*Config) + configMods = append(configMods, func(cfg *Config) { + cfg.ClusterName = tt.cluster + cfg.Database = "test_db_" + time.Now().Format("20060102150405") + }) + + completion(t, defaultEndpoint, tt, configMods...) + }) + } +} + +type tableEngineTestCompletion func(t *testing.T, dsn string, engineTest tableEngineTestConfig, fns ...func(*Config)) +type tableEngineTestConfig struct { + name string + engineName string + engineParams string + expectedTableName string + shouldPass bool +} + +func (engineTest tableEngineTestConfig) verifyConfig(t *testing.T, te TableEngine) { + if engineTest.engineName == "" { + require.Empty(t, te.Name) + } else { + require.NotEmpty(t, te.Name) + } +} + +func checkTableEngineQueryDefinition(query string, expectedEngineName string) error { + lines := strings.Split(query, "\n") + for _, line := range lines { + if strings.Contains(strings.ToLower(line), "engine = ") { + engine := strings.Split(line, " = ")[1] + engine = strings.Trim(engine, " ") + if engine == expectedEngineName { + return nil + } + + return fmt.Errorf("wrong engine name in query: %s, expected: %s", engine, expectedEngineName) + } + } + + return fmt.Errorf("query does not contain engine definition: %s", query) +} + +func testTableEngineConfig(t *testing.T, completion tableEngineTestCompletion) { + tests := []tableEngineTestConfig{ + { + name: "no params", + engineName: "CustomEngine", + engineParams: "", + expectedTableName: "CustomEngine", + shouldPass: true, + }, + { + name: "with params", + engineName: "CustomEngine", + engineParams: "'/x/y/z', 'some_param', another_param, last_param", + expectedTableName: "CustomEngine", + shouldPass: true, + }, + { + name: "with empty name", + engineName: "", + engineParams: "", + expectedTableName: defaultTableEngineName, + shouldPass: true, + }, + { + name: "fail", + engineName: "CustomEngine", + engineParams: "", + expectedTableName: defaultTableEngineName, + shouldPass: false, + }, + } + + for _, tt := range tests { + te := TableEngine{Name: tt.engineName, Params: tt.engineParams} + expectedEngineValue := fmt.Sprintf("%s(%s)", tt.expectedTableName, tt.engineParams) + + t.Run("test table engine config "+tt.name, func(t *testing.T) { + initClickhouseTestServer(t, func(query string, _ []driver.Value) error { + firstLine := getQueryFirstLine(query) + if !strings.HasPrefix(strings.ToLower(firstLine), "create table") { + return nil + } + + check := checkTableEngineQueryDefinition(query, expectedEngineValue) + if tt.shouldPass { + require.NoError(t, check) + } else { + require.Error(t, check) + } + + return nil + }) + + var configMods []func(*Config) + if te.Name != "" { + configMods = append(configMods, func(cfg *Config) { + cfg.TableEngine = te + }) + } + + completion(t, defaultEndpoint, tt, configMods...) + }) + } +} diff --git a/exporter/clickhouseexporter/exporter_traces.go b/exporter/clickhouseexporter/exporter_traces.go index 6f03ee295833..fed01b91e7a2 100644 --- a/exporter/clickhouseexporter/exporter_traces.go +++ b/exporter/clickhouseexporter/exporter_traces.go @@ -158,7 +158,7 @@ func convertLinks(links ptrace.SpanLinkSlice) ([]string, []string, []string, []m const ( // language=ClickHouse SQL createTracesTableSQL = ` -CREATE TABLE IF NOT EXISTS %s ( +CREATE TABLE IF NOT EXISTS %s %s ( Timestamp DateTime64(9) CODEC(Delta, ZSTD(1)), TraceId String CODEC(ZSTD(1)), SpanId String CODEC(ZSTD(1)), @@ -191,7 +191,7 @@ CREATE TABLE IF NOT EXISTS %s ( INDEX idx_span_attr_key mapKeys(SpanAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_span_attr_value mapValues(SpanAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_duration Duration TYPE minmax GRANULARITY 1 -) ENGINE MergeTree() +) ENGINE = %s %s PARTITION BY toDate(Timestamp) ORDER BY (ServiceName, SpanName, toUnixTimestamp(Timestamp), TraceId) @@ -249,18 +249,18 @@ SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; const ( createTraceIDTsTableSQL = ` -create table IF NOT EXISTS %s_trace_id_ts ( +create table IF NOT EXISTS %s_trace_id_ts %s ( TraceId String CODEC(ZSTD(1)), Start DateTime64(9) CODEC(Delta, ZSTD(1)), End DateTime64(9) CODEC(Delta, ZSTD(1)), INDEX idx_trace_id TraceId TYPE bloom_filter(0.01) GRANULARITY 1 -) ENGINE MergeTree() +) ENGINE = %s %s ORDER BY (TraceId, toUnixTimestamp(Start)) SETTINGS index_granularity=8192; ` createTraceIDTsMaterializedViewSQL = ` -CREATE MATERIALIZED VIEW IF NOT EXISTS %s_trace_id_ts_mv +CREATE MATERIALIZED VIEW IF NOT EXISTS %s_trace_id_ts_mv %s TO %s.%s_trace_id_ts AS SELECT TraceId, @@ -291,22 +291,16 @@ func renderInsertTracesSQL(cfg *Config) string { } func renderCreateTracesTableSQL(cfg *Config) string { - var ttlExpr string - if cfg.TTLDays > 0 { - ttlExpr = fmt.Sprintf(`TTL toDateTime(Timestamp) + toIntervalDay(%d)`, cfg.TTLDays) - } - return fmt.Sprintf(createTracesTableSQL, cfg.TracesTableName, ttlExpr) + ttlExpr := generateTTLExpr(cfg.TTLDays, cfg.TTL, "Timestamp") + return fmt.Sprintf(createTracesTableSQL, cfg.TracesTableName, cfg.ClusterString(), cfg.TableEngineString(), ttlExpr) } func renderCreateTraceIDTsTableSQL(cfg *Config) string { - var ttlExpr string - if cfg.TTLDays > 0 { - ttlExpr = fmt.Sprintf(`TTL toDateTime(Start) + toIntervalDay(%d)`, cfg.TTLDays) - } - return fmt.Sprintf(createTraceIDTsTableSQL, cfg.TracesTableName, ttlExpr) + ttlExpr := generateTTLExpr(cfg.TTLDays, cfg.TTL, "Start") + return fmt.Sprintf(createTraceIDTsTableSQL, cfg.TracesTableName, cfg.ClusterString(), cfg.TableEngineString(), ttlExpr) } func renderTraceIDTsMaterializedViewSQL(cfg *Config) string { return fmt.Sprintf(createTraceIDTsMaterializedViewSQL, cfg.TracesTableName, - cfg.Database, cfg.TracesTableName, cfg.Database, cfg.TracesTableName) + cfg.ClusterString(), cfg.Database, cfg.TracesTableName, cfg.Database, cfg.TracesTableName) } diff --git a/exporter/clickhouseexporter/exporter_traces_test.go b/exporter/clickhouseexporter/exporter_traces_test.go index 2bff1fcdc2b2..11391d86e430 100644 --- a/exporter/clickhouseexporter/exporter_traces_test.go +++ b/exporter/clickhouseexporter/exporter_traces_test.go @@ -69,15 +69,28 @@ func simpleTraces(count int) ptrace.Traces { ss.SetSchemaUrl("https://opentelemetry.io/schemas/1.7.0") ss.Scope().SetDroppedAttributesCount(20) ss.Scope().Attributes().PutStr("lib", "clickhouse") + timestamp := time.Unix(1703498029, 0) for i := 0; i < count; i++ { s := ss.Spans().AppendEmpty() - s.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now())) - s.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + s.SetTraceID([16]byte{1, 2, 3, byte(i)}) + s.SetSpanID([8]byte{1, 2, 3, byte(i)}) + s.TraceState().FromRaw("trace state") + s.SetParentSpanID([8]byte{1, 2, 4, byte(i)}) + s.SetName("call db") + s.SetKind(ptrace.SpanKindInternal) + s.SetStartTimestamp(pcommon.NewTimestampFromTime(timestamp)) + s.SetEndTimestamp(pcommon.NewTimestampFromTime(timestamp.Add(time.Minute))) s.Attributes().PutStr(conventions.AttributeServiceName, "v") + s.Status().SetMessage("error") + s.Status().SetCode(ptrace.StatusCodeError) event := s.Events().AppendEmpty() event.SetName("event1") - event.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + event.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) + event.Attributes().PutStr("level", "info") link := s.Links().AppendEmpty() + link.SetTraceID([16]byte{1, 2, 5, byte(i)}) + link.SetSpanID([8]byte{1, 2, 5, byte(i)}) + link.TraceState().FromRaw("error") link.Attributes().PutStr("k", "v") } return traces @@ -87,3 +100,17 @@ func mustPushTracesData(t *testing.T, exporter *tracesExporter, td ptrace.Traces err := exporter.pushTraceData(context.TODO(), td) require.NoError(t, err) } + +func TestTracesClusterConfig(t *testing.T) { + testClusterConfig(t, func(t *testing.T, dsn string, clusterTest clusterTestConfig, fns ...func(*Config)) { + exporter := newTestTracesExporter(t, dsn, fns...) + clusterTest.verifyConfig(t, exporter.cfg) + }) +} + +func TestTracesTableEngineConfig(t *testing.T) { + testTableEngineConfig(t, func(t *testing.T, dsn string, engineTest tableEngineTestConfig, fns ...func(*Config)) { + exporter := newTestTracesExporter(t, dsn, fns...) + engineTest.verifyConfig(t, exporter.cfg.TableEngine) + }) +} diff --git a/exporter/clickhouseexporter/factory.go b/exporter/clickhouseexporter/factory.go index 43009573cb6e..4855b7f3914d 100644 --- a/exporter/clickhouseexporter/factory.go +++ b/exporter/clickhouseexporter/factory.go @@ -8,15 +8,17 @@ package clickhouseexporter // import "github.com/open-telemetry/opentelemetry-co import ( "context" "fmt" + "time" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter/internal/metadata" ) -// NewFactory creates a factory for Elastic exporter. +// NewFactory creates a factory for ClickHouse exporter. func NewFactory() exporter.Factory { return exporter.NewFactory( metadata.Type, @@ -34,18 +36,18 @@ func createDefaultConfig() component.Config { return &Config{ TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), QueueSettings: queueSettings, - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), ConnectionParams: map[string]string{}, Database: defaultDatabase, LogsTableName: "otel_logs", TracesTableName: "otel_traces", MetricsTableName: "otel_metrics", - TTLDays: 0, + TTL: 0, } } // createLogsExporter creates a new exporter for logs. -// Logs are directly insert into clickhouse. +// Logs are directly inserted into ClickHouse. func createLogsExporter( ctx context.Context, set exporter.CreateSettings, @@ -66,12 +68,12 @@ func createLogsExporter( exporterhelper.WithShutdown(exporter.shutdown), exporterhelper.WithTimeout(c.TimeoutSettings), exporterhelper.WithQueue(c.QueueSettings), - exporterhelper.WithRetry(c.RetrySettings), + exporterhelper.WithRetry(c.BackOffConfig), ) } // createTracesExporter creates a new exporter for traces. -// Traces are directly insert into clickhouse. +// Traces are directly inserted into ClickHouse. func createTracesExporter( ctx context.Context, set exporter.CreateSettings, @@ -92,7 +94,7 @@ func createTracesExporter( exporterhelper.WithShutdown(exporter.shutdown), exporterhelper.WithTimeout(c.TimeoutSettings), exporterhelper.WithQueue(c.QueueSettings), - exporterhelper.WithRetry(c.RetrySettings), + exporterhelper.WithRetry(c.BackOffConfig), ) } @@ -116,6 +118,26 @@ func createMetricExporter( exporterhelper.WithShutdown(exporter.shutdown), exporterhelper.WithTimeout(c.TimeoutSettings), exporterhelper.WithQueue(c.QueueSettings), - exporterhelper.WithRetry(c.RetrySettings), + exporterhelper.WithRetry(c.BackOffConfig), ) } + +func generateTTLExpr(ttlDays uint, ttl time.Duration, timeField string) string { + if ttlDays > 0 { + return fmt.Sprintf(`TTL toDateTime(%s) + toIntervalDay(%d)`, timeField, ttlDays) + } + + if ttl > 0 { + switch { + case ttl%(24*time.Hour) == 0: + return fmt.Sprintf(`TTL toDateTime(%s) + toIntervalDay(%d)`, timeField, ttl/(24*time.Hour)) + case ttl%(time.Hour) == 0: + return fmt.Sprintf(`TTL toDateTime(%s) + toIntervalHour(%d)`, timeField, ttl/time.Hour) + case ttl%(time.Minute) == 0: + return fmt.Sprintf(`TTL toDateTime(%s) + toIntervalMinute(%d)`, timeField, ttl/time.Minute) + default: + return fmt.Sprintf(`TTL toDateTime(%s) + toIntervalSecond(%d)`, timeField, ttl/time.Second) + } + } + return "" +} diff --git a/exporter/clickhouseexporter/generated_component_test.go b/exporter/clickhouseexporter/generated_component_test.go new file mode 100644 index 000000000000..f251d2cf9264 --- /dev/null +++ b/exporter/clickhouseexporter/generated_component_test.go @@ -0,0 +1,101 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package clickhouseexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/clickhouseexporter/go.mod b/exporter/clickhouseexporter/go.mod index 248721133105..ea10a148da71 100644 --- a/exporter/clickhouseexporter/go.mod +++ b/exporter/clickhouseexporter/go.mod @@ -1,64 +1,109 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter -go 1.20 +go 1.21 require ( - github.com/ClickHouse/clickhouse-go/v2 v2.15.0 - github.com/cenkalti/backoff/v4 v4.2.1 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 + github.com/ClickHouse/clickhouse-go/v2 v2.23.0 + github.com/cenkalti/backoff/v4 v4.3.0 + github.com/jmoiron/sqlx v1.3.5 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/stretchr/testify v1.9.0 + github.com/testcontainers/testcontainers-go v0.29.1 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/ClickHouse/ch-go v0.58.2 // indirect - github.com/andybalholm/brotli v1.0.6 // indirect + dario.cat/mergo v1.0.0 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/ClickHouse/ch-go v0.61.5 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/Microsoft/hcsshim v0.11.4 // indirect + github.com/andybalholm/brotli v1.1.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/containerd/containerd v1.7.12 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/distribution/reference v0.5.0 // indirect + github.com/docker/docker v25.0.5+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/felixge/httpsnoop v1.0.3 // indirect github.com/go-faster/city v1.0.1 // indirect - github.com/go-faster/errors v0.6.1 // indirect + github.com/go-faster/errors v0.7.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/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.4.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.7 // 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/knadh/koanf/v2 v2.1.1 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/paulmach/orb v0.10.0 // indirect - github.com/pierrec/lz4/v4 v4.1.18 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect + github.com/paulmach/orb v0.11.1 // indirect + github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pkg/errors v0.9.1 // 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.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/segmentio/asm v1.2.0 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect + github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/shopspring/decimal v1.3.1 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/tools v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/clickhouseexporter/go.sum b/exporter/clickhouseexporter/go.sum index c758782b1f91..8be6de4a7ece 100644 --- a/exporter/clickhouseexporter/go.sum +++ b/exporter/clickhouseexporter/go.sum @@ -1,215 +1,283 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/ClickHouse/ch-go v0.58.2 h1:jSm2szHbT9MCAB1rJ3WuCJqmGLi5UTjlNu+f530UTS0= -github.com/ClickHouse/ch-go v0.58.2/go.mod h1:Ap/0bEmiLa14gYjCiRkYGbXvbe8vwdrfTYWhsuQ99aw= -github.com/ClickHouse/clickhouse-go/v2 v2.15.0 h1:G0hTKyO8fXXR1bGnZ0DY3vTG01xYfOGW76zgjg5tmC4= -github.com/ClickHouse/clickhouse-go/v2 v2.15.0/go.mod h1:kXt1SRq0PIRa6aKZD7TnFnY9PQKmc2b13sHtOYcK6cQ= -github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= -github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/ClickHouse/ch-go v0.61.5 h1:zwR8QbYI0tsMiEcze/uIMK+Tz1D3XZXLdNrlaOpeEI4= +github.com/ClickHouse/ch-go v0.61.5/go.mod h1:s1LJW/F/LcFs5HJnuogFMta50kKDO0lf9zzfrbl0RQg= +github.com/ClickHouse/clickhouse-go/v2 v2.23.0 h1:srmRrkS0BR8gEut87u8jpcZ7geOob6nGj9ifrb+aKmg= +github.com/ClickHouse/clickhouse-go/v2 v2.23.0/go.mod h1:tBhdF3f3RdP7sS59+oBAtTyhWpy0024ZxDMhgxra0QE= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= +github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= +github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= +github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= 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/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw= github.com/go-faster/city v1.0.1/go.mod h1:jKcUJId49qdW3L1qKHH/3wPeUstCVpVSXTM6vO3VcTw= -github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI= -github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-faster/errors v0.7.1 h1:MkJTnDoEdi9pDabt1dpWf7AA8/BaSYZqibYyhZ20AYg= +github.com/go-faster/errors v0.7.1/go.mod h1:5ySTjWFiphBs07IKuiL69nxdfd5+fzh1u7FPGZP2quo= +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/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= +github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= 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.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +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/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg= +github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= 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/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/paulmach/orb v0.10.0 h1:guVYVqzxHE/CQ1KpfGO077TR0ATHSNjp4s6XGLn3W9s= -github.com/paulmach/orb v0.10.0/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/paulmach/orb v0.11.1 h1:3koVegMC4X/WeiXYz9iswopaTwMem53NzTJuTF20JzU= +github.com/paulmach/orb v0.11.1/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY= -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/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= +github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= +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/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= 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/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/testcontainers/testcontainers-go v0.29.1 h1:z8kxdFlovA2y97RWx98v/TQ+tR+SXZm6p35M+xB92zk= +github.com/testcontainers/testcontainers-go v0.29.1/go.mod h1:SnKnKQav8UcgtKqjp/AD8bE1MqZm+3TDb/B8crE3XnI= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +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/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= +golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= 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/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.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-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.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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-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-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +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.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -217,52 +285,36 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-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/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= +golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= 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/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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= +gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= diff --git a/exporter/clickhouseexporter/integration_test.go b/exporter/clickhouseexporter/integration_test.go new file mode 100644 index 000000000000..1c1796251ccc --- /dev/null +++ b/exporter/clickhouseexporter/integration_test.go @@ -0,0 +1,607 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build integration +// +build integration + +package clickhouseexporter + +import ( + "context" + "fmt" + "math/rand" + "strconv" + "testing" + "time" + + "github.com/jmoiron/sqlx" + "github.com/stretchr/testify/require" + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/wait" + "go.opentelemetry.io/collector/pdata/pmetric" +) + +func TestIntegration(t *testing.T) { + testCase := []struct { + name string + image string + }{ + { + name: "test clickhouse 24-alpine", + image: "clickhouse/clickhouse-server:24-alpine", + }, + { + name: "test clickhouse 23-alpine", + image: "clickhouse/clickhouse-server:23-alpine", + }, + { + name: "test clickhouse 22-alpine", + image: "clickhouse/clickhouse-server:22-alpine", + }, + } + + for _, c := range testCase { + t.Run(c.name, func(t *testing.T) { + port := randPort() + req := testcontainers.ContainerRequest{ + Image: c.image, + ExposedPorts: []string{fmt.Sprintf("%s:9000", port)}, + WaitingFor: wait.ForListeningPort("9000"). + WithStartupTimeout(2 * time.Minute), + } + c := getContainer(t, req) + defer func() { + err := c.Terminate(context.Background()) + require.NoError(t, err) + }() + + host, err := c.Host(context.Background()) + require.NoError(t, err) + endpoint := fmt.Sprintf("tcp://%s:%s", host, port) + + logExporter := newTestLogsExporter(t, endpoint) + verifyExportLog(t, logExporter) + + traceExporter := newTestTracesExporter(t, endpoint) + require.NoError(t, err) + verifyExporterTrace(t, traceExporter) + + metricExporter := newTestMetricsExporter(t, endpoint) + require.NoError(t, err) + verifyExporterMetric(t, metricExporter) + }) + } +} + +func getContainer(t *testing.T, req testcontainers.ContainerRequest) testcontainers.Container { + require.NoError(t, req.Validate()) + container, err := testcontainers.GenericContainer( + context.Background(), + testcontainers.GenericContainerRequest{ + ContainerRequest: req, + Started: true, + }) + require.NoError(t, err) + + err = container.Start(context.Background()) + require.NoError(t, err) + return container +} + +func verifyExportLog(t *testing.T, logExporter *logsExporter) { + mustPushLogsData(t, logExporter, simpleLogs(1)) + db := sqlx.NewDb(logExporter.client, driverName) + + type log struct { + Timestamp string `db:"Timestamp"` + TraceID string `db:"TraceId"` + SpanID string `db:"SpanId"` + TraceFlags uint32 `db:"TraceFlags"` + SeverityText string `db:"SeverityText"` + SeverityNumber int32 `db:"SeverityNumber"` + ServiceName string `db:"ServiceName"` + Body string `db:"Body"` + ResourceSchemaURL string `db:"ResourceSchemaUrl"` + ResourceAttributes map[string]string `db:"ResourceAttributes"` + ScopeSchemaURL string `db:"ScopeSchemaUrl"` + ScopeName string `db:"ScopeName"` + ScopeVersion string `db:"ScopeVersion"` + ScopeAttributes map[string]string `db:"ScopeAttributes"` + LogAttributes map[string]string `db:"LogAttributes"` + } + + var actualLog log + + expectLog := log{ + Timestamp: "2023-12-25T09:53:49Z", + TraceID: "01020300000000000000000000000000", + SpanID: "0102030000000000", + SeverityText: "error", + SeverityNumber: 18, + ServiceName: "test-service", + Body: "error message", + ResourceSchemaURL: "https://opentelemetry.io/schemas/1.4.0", + ResourceAttributes: map[string]string{ + "service.name": "test-service", + }, + ScopeSchemaURL: "https://opentelemetry.io/schemas/1.7.0", + ScopeName: "io.opentelemetry.contrib.clickhouse", + ScopeVersion: "1.0.0", + ScopeAttributes: map[string]string{ + "lib": "clickhouse", + }, + LogAttributes: map[string]string{ + "service.namespace": "default", + }, + } + + err := db.Get(&actualLog, "select * from default.otel_logs") + require.NoError(t, err) + require.Equal(t, expectLog, actualLog) +} + +func verifyExporterTrace(t *testing.T, traceExporter *tracesExporter) { + mustPushTracesData(t, traceExporter, simpleTraces(1)) + db := sqlx.NewDb(traceExporter.client, driverName) + + type trace struct { + Timestamp string `db:"Timestamp"` + TraceID string `db:"TraceId"` + SpanID string `db:"SpanId"` + ParentSpanID string `db:"ParentSpanId"` + TraceState string `db:"TraceState"` + SpanName string `db:"SpanName"` + SpanKind string `db:"SpanKind"` + ServiceName string `db:"ServiceName"` + ResourceAttributes map[string]string `db:"ResourceAttributes"` + ScopeName string `db:"ScopeName"` + ScopeVersion string `db:"ScopeVersion"` + SpanAttributes map[string]string `db:"SpanAttributes"` + Duration int64 `db:"Duration"` + StatusCode string `db:"StatusCode"` + StatusMessage string `db:"StatusMessage"` + EventsTimestamp []time.Time `db:"Events.Timestamp"` + EventsName []string `db:"Events.Name"` + EventsAttributes []map[string]string `db:"Events.Attributes"` + LinksTraceID []string `db:"Links.TraceId"` + LinksSpanID []string `db:"Links.SpanId"` + LinksTraceState []string `db:"Links.TraceState"` + LinksAttributes []map[string]string `db:"Links.Attributes"` + } + + var actualTrace trace + + expectTrace := trace{ + Timestamp: "2023-12-25T09:53:49Z", + TraceID: "01020300000000000000000000000000", + SpanID: "0102030000000000", + ParentSpanID: "0102040000000000", + TraceState: "trace state", + SpanName: "call db", + SpanKind: "SPAN_KIND_INTERNAL", + ServiceName: "test-service", + ResourceAttributes: map[string]string{ + "service.name": "test-service", + }, + ScopeName: "io.opentelemetry.contrib.clickhouse", + ScopeVersion: "1.0.0", + SpanAttributes: map[string]string{ + "service.name": "v", + }, + Duration: 60000000000, + StatusCode: "STATUS_CODE_ERROR", + StatusMessage: "error", + EventsTimestamp: []time.Time{ + time.Unix(1703498029, 0).UTC(), + }, + EventsName: []string{"event1"}, + EventsAttributes: []map[string]string{ + { + "level": "info", + }, + }, + LinksTraceID: []string{ + "01020500000000000000000000000000", + }, + LinksSpanID: []string{ + "0102050000000000", + }, + LinksTraceState: []string{ + "error", + }, + LinksAttributes: []map[string]string{ + { + "k": "v", + }, + }, + } + + err := db.Get(&actualTrace, "select * from default.otel_traces") + require.NoError(t, err) + require.Equal(t, expectTrace, actualTrace) +} + +func verifyExporterMetric(t *testing.T, metricExporter *metricsExporter) { + metric := pmetric.NewMetrics() + rm := metric.ResourceMetrics().AppendEmpty() + simpleMetrics(1).ResourceMetrics().At(0).CopyTo(rm) + + mustPushMetricsData(t, metricExporter, metric) + db := sqlx.NewDb(metricExporter.client, driverName) + + verifyGaugeMetric(t, db) + verifySumMetric(t, db) + verifyHistogramMetric(t, db) + verifyExphistogramMetric(t, db) + verifySummaryMetric(t, db) +} + +func verifyGaugeMetric(t *testing.T, db *sqlx.DB) { + type gauge struct { + ResourceAttributes map[string]string `db:"ResourceAttributes"` + ResourceSchemaURL string `db:"ResourceSchemaUrl"` + ScopeName string `db:"ScopeName"` + ScopeVersion string `db:"ScopeVersion"` + ScopeAttributes map[string]string `db:"ScopeAttributes"` + ScopeDroppedAttrCount uint32 `db:"ScopeDroppedAttrCount"` + ScopeSchemaURL string `db:"ScopeSchemaUrl"` + ServiceName string `db:"ServiceName"` + MetricName string `db:"MetricName"` + MetricDescription string `db:"MetricDescription"` + MetricUnit string `db:"MetricUnit"` + Attributes map[string]string `db:"Attributes"` + StartTimeUnix string `db:"StartTimeUnix"` + TimeUnix string `db:"TimeUnix"` + Value float64 `db:"Value"` + Flags uint32 `db:"Flags"` + ExemplarsFilteredAttributes []map[string]string `db:"Exemplars.FilteredAttributes"` + ExemplarsTimeUnix []time.Time `db:"Exemplars.TimeUnix"` + ExemplarsValue []float64 `db:"Exemplars.Value"` + ExemplarsSpanID []string `db:"Exemplars.SpanId"` + ExemplarsTraceID []string `db:"Exemplars.TraceId"` + } + + var actualGauge gauge + + expectGauge := gauge{ + ResourceAttributes: map[string]string{ + "service.name": "demo 1", + "Resource Attributes 1": "value1", + }, + ResourceSchemaURL: "Resource SchemaUrl 1", + ScopeName: "Scope name 1", + ScopeVersion: "Scope version 1", + ScopeDroppedAttrCount: 10, + ScopeSchemaURL: "Scope SchemaUrl 1", + ScopeAttributes: map[string]string{ + "Scope Attributes 1": "value1", + }, + ServiceName: "demo 1", + MetricName: "gauge metrics", + MetricDescription: "This is a gauge metrics", + MetricUnit: "count", + Attributes: map[string]string{ + "gauge_label_1": "1", + }, + StartTimeUnix: "2023-12-25T09:53:49Z", + TimeUnix: "2023-12-25T09:53:49Z", + Value: 0, + Flags: 0, + ExemplarsFilteredAttributes: []map[string]string{ + { + "key": "value", + "key2": "value2", + }, + }, + ExemplarsTimeUnix: []time.Time{time.Unix(1703498029, 0).UTC()}, + ExemplarsTraceID: []string{"01020300000000000000000000000000"}, + ExemplarsSpanID: []string{"0102030000000000"}, + ExemplarsValue: []float64{54}, + } + + err := db.Get(&actualGauge, "select * from default.otel_metrics_gauge") + require.NoError(t, err) + require.Equal(t, expectGauge, actualGauge) +} + +func verifySumMetric(t *testing.T, db *sqlx.DB) { + type sum struct { + ResourceAttributes map[string]string `db:"ResourceAttributes"` + ResourceSchemaURL string `db:"ResourceSchemaUrl"` + ScopeName string `db:"ScopeName"` + ScopeVersion string `db:"ScopeVersion"` + ScopeAttributes map[string]string `db:"ScopeAttributes"` + ScopeDroppedAttrCount uint32 `db:"ScopeDroppedAttrCount"` + ScopeSchemaURL string `db:"ScopeSchemaUrl"` + ServiceName string `db:"ServiceName"` + MetricName string `db:"MetricName"` + MetricDescription string `db:"MetricDescription"` + MetricUnit string `db:"MetricUnit"` + Attributes map[string]string `db:"Attributes"` + StartTimeUnix string `db:"StartTimeUnix"` + TimeUnix string `db:"TimeUnix"` + Value float64 `db:"Value"` + Flags uint32 `db:"Flags"` + ExemplarsFilteredAttributes []map[string]string `db:"Exemplars.FilteredAttributes"` + ExemplarsTimeUnix []time.Time `db:"Exemplars.TimeUnix"` + ExemplarsValue []float64 `db:"Exemplars.Value"` + ExemplarsSpanID []string `db:"Exemplars.SpanId"` + ExemplarsTraceID []string `db:"Exemplars.TraceId"` + AggTemp int32 `db:"AggTemp"` + IsMonotonic bool `db:"IsMonotonic"` + } + + var actualSum sum + + expectSum := sum{ + ResourceAttributes: map[string]string{ + "service.name": "demo 1", + "Resource Attributes 1": "value1", + }, + ResourceSchemaURL: "Resource SchemaUrl 1", + ScopeName: "Scope name 1", + ScopeVersion: "Scope version 1", + ScopeDroppedAttrCount: 10, + ScopeSchemaURL: "Scope SchemaUrl 1", + ScopeAttributes: map[string]string{ + "Scope Attributes 1": "value1", + }, + ServiceName: "demo 1", + MetricName: "sum metrics", + MetricDescription: "This is a sum metrics", + MetricUnit: "count", + Attributes: map[string]string{ + "sum_label_1": "1", + }, + StartTimeUnix: "2023-12-25T09:53:49Z", + TimeUnix: "2023-12-25T09:53:49Z", + Value: 11.234, + Flags: 0, + ExemplarsFilteredAttributes: []map[string]string{ + { + "key": "value", + "key2": "value2", + }, + }, + ExemplarsTimeUnix: []time.Time{time.Unix(1703498029, 0).UTC()}, + ExemplarsTraceID: []string{"01020300000000000000000000000000"}, + ExemplarsSpanID: []string{"0102030000000000"}, + ExemplarsValue: []float64{54}, + } + + err := db.Get(&actualSum, "select * from default.otel_metrics_sum") + require.NoError(t, err) + require.Equal(t, expectSum, actualSum) +} + +func verifyHistogramMetric(t *testing.T, db *sqlx.DB) { + type sum struct { + ResourceAttributes map[string]string `db:"ResourceAttributes"` + ResourceSchemaURL string `db:"ResourceSchemaUrl"` + ScopeName string `db:"ScopeName"` + ScopeVersion string `db:"ScopeVersion"` + ScopeAttributes map[string]string `db:"ScopeAttributes"` + ScopeDroppedAttrCount uint32 `db:"ScopeDroppedAttrCount"` + ScopeSchemaURL string `db:"ScopeSchemaUrl"` + ServiceName string `db:"ServiceName"` + MetricName string `db:"MetricName"` + MetricDescription string `db:"MetricDescription"` + MetricUnit string `db:"MetricUnit"` + Attributes map[string]string `db:"Attributes"` + StartTimeUnix string `db:"StartTimeUnix"` + TimeUnix string `db:"TimeUnix"` + Count float64 `db:"Count"` + Sum float64 `db:"Sum"` + BucketCounts []uint64 `db:"BucketCounts"` + ExplicitBounds []float64 `db:"ExplicitBounds"` + ExemplarsFilteredAttributes []map[string]string `db:"Exemplars.FilteredAttributes"` + ExemplarsTimeUnix []time.Time `db:"Exemplars.TimeUnix"` + ExemplarsValue []float64 `db:"Exemplars.Value"` + ExemplarsSpanID []string `db:"Exemplars.SpanId"` + ExemplarsTraceID []string `db:"Exemplars.TraceId"` + Flags uint32 `db:"Flags"` + Min float64 `db:"Min"` + Max float64 `db:"Max"` + } + + var actualSum sum + + expectSum := sum{ + ResourceAttributes: map[string]string{ + "service.name": "demo 1", + "Resource Attributes 1": "value1", + }, + ResourceSchemaURL: "Resource SchemaUrl 1", + ScopeName: "Scope name 1", + ScopeVersion: "Scope version 1", + ScopeDroppedAttrCount: 10, + ScopeSchemaURL: "Scope SchemaUrl 1", + ScopeAttributes: map[string]string{ + "Scope Attributes 1": "value1", + }, + ServiceName: "demo 1", + MetricName: "histogram metrics", + MetricDescription: "This is a histogram metrics", + MetricUnit: "ms", + Attributes: map[string]string{ + "key": "value", + "key2": "value", + }, + StartTimeUnix: "2023-12-25T09:53:49Z", + TimeUnix: "2023-12-25T09:53:49Z", + Count: 1, + Sum: 1, + BucketCounts: []uint64{0, 0, 0, 1, 0}, + ExplicitBounds: []float64{0, 0, 0, 0, 0}, + Flags: 0, + Min: 0, + Max: 1, + ExemplarsFilteredAttributes: []map[string]string{ + { + "key": "value", + "key2": "value2", + }, + }, + ExemplarsTimeUnix: []time.Time{time.Unix(1703498029, 0).UTC()}, + ExemplarsTraceID: []string{"01020300000000000000000000000000"}, + ExemplarsSpanID: []string{"0102030000000000"}, + ExemplarsValue: []float64{55.22}, + } + + err := db.Get(&actualSum, "select * from default.otel_metrics_histogram") + require.NoError(t, err) + require.Equal(t, expectSum, actualSum) +} + +func verifyExphistogramMetric(t *testing.T, db *sqlx.DB) { + type sum struct { + ResourceAttributes map[string]string `db:"ResourceAttributes"` + ResourceSchemaURL string `db:"ResourceSchemaUrl"` + ScopeName string `db:"ScopeName"` + ScopeVersion string `db:"ScopeVersion"` + ScopeAttributes map[string]string `db:"ScopeAttributes"` + ScopeDroppedAttrCount uint32 `db:"ScopeDroppedAttrCount"` + ScopeSchemaURL string `db:"ScopeSchemaUrl"` + ServiceName string `db:"ServiceName"` + MetricName string `db:"MetricName"` + MetricDescription string `db:"MetricDescription"` + MetricUnit string `db:"MetricUnit"` + Attributes map[string]string `db:"Attributes"` + StartTimeUnix string `db:"StartTimeUnix"` + TimeUnix string `db:"TimeUnix"` + Count float64 `db:"Count"` + Sum float64 `db:"Sum"` + Scale int32 `db:"Scale"` + ZeroCount uint64 `db:"ZeroCount"` + PositiveOffset int32 `db:"PositiveOffset"` + PositiveBucketCounts []uint64 `db:"PositiveBucketCounts"` + NegativeOffset int32 `db:"NegativeOffset"` + NegativeBucketCounts []uint64 `db:"NegativeBucketCounts"` + ExemplarsFilteredAttributes []map[string]string `db:"Exemplars.FilteredAttributes"` + ExemplarsTimeUnix []time.Time `db:"Exemplars.TimeUnix"` + ExemplarsValue []float64 `db:"Exemplars.Value"` + ExemplarsSpanID []string `db:"Exemplars.SpanId"` + ExemplarsTraceID []string `db:"Exemplars.TraceId"` + Flags uint32 `db:"Flags"` + Min float64 `db:"Min"` + Max float64 `db:"Max"` + } + + var actualSum sum + + expectSum := sum{ + ResourceAttributes: map[string]string{ + "service.name": "demo 1", + "Resource Attributes 1": "value1", + }, + ResourceSchemaURL: "Resource SchemaUrl 1", + ScopeName: "Scope name 1", + ScopeVersion: "Scope version 1", + ScopeDroppedAttrCount: 10, + ScopeSchemaURL: "Scope SchemaUrl 1", + ScopeAttributes: map[string]string{ + "Scope Attributes 1": "value1", + }, + ServiceName: "demo 1", + MetricName: "exp histogram metrics", + MetricDescription: "This is a exp histogram metrics", + MetricUnit: "ms", + Attributes: map[string]string{ + "key": "value", + "key2": "value", + }, + StartTimeUnix: "2023-12-25T09:53:49Z", + TimeUnix: "2023-12-25T09:53:49Z", + Count: 1, + Sum: 1, + Scale: 0, + ZeroCount: 0, + PositiveOffset: 1, + PositiveBucketCounts: []uint64{0, 0, 0, 1, 0}, + NegativeOffset: 1, + NegativeBucketCounts: []uint64{0, 0, 0, 1, 0}, + Flags: 0, + Min: 0, + Max: 1, + ExemplarsFilteredAttributes: []map[string]string{ + { + "key": "value", + "key2": "value2", + }, + }, + ExemplarsTimeUnix: []time.Time{time.Unix(1703498029, 0).UTC()}, + ExemplarsTraceID: []string{"01020300000000000000000000000000"}, + ExemplarsSpanID: []string{"0102030000000000"}, + ExemplarsValue: []float64{54}, + } + + err := db.Get(&actualSum, "select * from default.otel_metrics_exponential_histogram") + require.NoError(t, err) + require.Equal(t, expectSum, actualSum) +} + +func verifySummaryMetric(t *testing.T, db *sqlx.DB) { + type sum struct { + ResourceAttributes map[string]string `db:"ResourceAttributes"` + ResourceSchemaURL string `db:"ResourceSchemaUrl"` + ScopeName string `db:"ScopeName"` + ScopeVersion string `db:"ScopeVersion"` + ScopeAttributes map[string]string `db:"ScopeAttributes"` + ScopeDroppedAttrCount uint32 `db:"ScopeDroppedAttrCount"` + ScopeSchemaURL string `db:"ScopeSchemaUrl"` + ServiceName string `db:"ServiceName"` + MetricName string `db:"MetricName"` + MetricDescription string `db:"MetricDescription"` + MetricUnit string `db:"MetricUnit"` + Attributes map[string]string `db:"Attributes"` + StartTimeUnix string `db:"StartTimeUnix"` + TimeUnix string `db:"TimeUnix"` + Count float64 `db:"Count"` + Sum float64 `db:"Sum"` + Quantile []float64 `db:"ValueAtQuantiles.Quantile"` + QuantilesValue []float64 `db:"ValueAtQuantiles.Value"` + Flags uint32 `db:"Flags"` + } + + var actualSum sum + + expectSum := sum{ + ResourceAttributes: map[string]string{ + "service.name": "demo 1", + "Resource Attributes 1": "value1", + }, + ResourceSchemaURL: "Resource SchemaUrl 1", + ScopeName: "Scope name 1", + ScopeVersion: "Scope version 1", + ScopeDroppedAttrCount: 10, + ScopeSchemaURL: "Scope SchemaUrl 1", + ScopeAttributes: map[string]string{ + "Scope Attributes 1": "value1", + }, + ServiceName: "demo 1", + MetricName: "summary metrics", + MetricDescription: "This is a summary metrics", + MetricUnit: "ms", + Attributes: map[string]string{ + "key": "value", + "key2": "value", + }, + StartTimeUnix: "2023-12-25T09:53:49Z", + TimeUnix: "2023-12-25T09:53:49Z", + Count: 1, + Sum: 1, + Quantile: []float64{1}, + QuantilesValue: []float64{1}, + Flags: 0, + } + + err := db.Get(&actualSum, "select * from default.otel_metrics_summary") + require.NoError(t, err) + require.Equal(t, expectSum, actualSum) +} + +func randPort() string { + rs := rand.NewSource(time.Now().Unix()) + r := rand.New(rs) + return strconv.Itoa(r.Intn(999) + 9000) +} diff --git a/exporter/clickhouseexporter/internal/exponential_histogram_metrics.go b/exporter/clickhouseexporter/internal/exponential_histogram_metrics.go index 421d967cd61c..f6212e4e0886 100644 --- a/exporter/clickhouseexporter/internal/exponential_histogram_metrics.go +++ b/exporter/clickhouseexporter/internal/exponential_histogram_metrics.go @@ -11,13 +11,14 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" + conventions "go.opentelemetry.io/collector/semconv/v1.18.0" "go.uber.org/zap" ) const ( // language=ClickHouse SQL createExpHistogramTableSQL = ` -CREATE TABLE IF NOT EXISTS %s_exponential_histogram ( +CREATE TABLE IF NOT EXISTS %s_exponential_histogram %s ( ResourceAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), ResourceSchemaUrl String CODEC(ZSTD(1)), ScopeName String CODEC(ZSTD(1)), @@ -25,6 +26,7 @@ CREATE TABLE IF NOT EXISTS %s_exponential_histogram ( ScopeAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), ScopeDroppedAttrCount UInt32 CODEC(ZSTD(1)), ScopeSchemaUrl String CODEC(ZSTD(1)), + ServiceName LowCardinality(String) CODEC(ZSTD(1)), MetricName String CODEC(ZSTD(1)), MetricDescription String CODEC(ZSTD(1)), MetricUnit String CODEC(ZSTD(1)), @@ -55,10 +57,10 @@ CREATE TABLE IF NOT EXISTS %s_exponential_histogram ( INDEX idx_scope_attr_value mapValues(ScopeAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_attr_key mapKeys(Attributes) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_attr_value mapValues(Attributes) TYPE bloom_filter(0.01) GRANULARITY 1 -) ENGINE MergeTree() +) ENGINE = %s %s PARTITION BY toDate(TimeUnix) -ORDER BY (MetricName, Attributes, toUnixTimestamp64Nano(TimeUnix)) +ORDER BY (ServiceName, MetricName, Attributes, toUnixTimestamp64Nano(TimeUnix)) SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; ` // language=ClickHouse SQL @@ -70,6 +72,7 @@ SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; ScopeAttributes, ScopeDroppedAttrCount, ScopeSchemaUrl, + ServiceName, MetricName, MetricDescription, MetricUnit, @@ -77,7 +80,7 @@ SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; StartTimeUnix, TimeUnix, Count, - Sum, + Sum, Scale, ZeroCount, PositiveOffset, @@ -91,7 +94,7 @@ SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; Exemplars.TraceId, Flags, Min, - Max) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)` + Max) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)` ) type expHistogramModel struct { @@ -125,6 +128,11 @@ func (e *expHistogramMetrics) insert(ctx context.Context, db *sql.DB) error { }() for _, model := range e.expHistogramModels { + var serviceName string + if v, ok := model.metadata.ResAttr[conventions.AttributeServiceName]; ok { + serviceName = v + } + for i := 0; i < model.expHistogram.DataPoints().Len(); i++ { dp := model.expHistogram.DataPoints().At(i) @@ -137,6 +145,7 @@ func (e *expHistogramMetrics) insert(ctx context.Context, db *sql.DB) error { attributesToMap(model.metadata.ScopeInstr.Attributes()), model.metadata.ScopeInstr.DroppedAttributesCount(), model.metadata.ScopeURL, + serviceName, model.metricName, model.metricDescription, model.metricUnit, @@ -154,8 +163,8 @@ func (e *expHistogramMetrics) insert(ctx context.Context, db *sql.DB) error { attrs, times, values, - traceIDs, spanIDs, + traceIDs, uint32(dp.Flags()), dp.Min(), dp.Max(), diff --git a/exporter/clickhouseexporter/internal/gauge_metrics.go b/exporter/clickhouseexporter/internal/gauge_metrics.go index d16caa78f56a..a45121ccaa95 100644 --- a/exporter/clickhouseexporter/internal/gauge_metrics.go +++ b/exporter/clickhouseexporter/internal/gauge_metrics.go @@ -11,13 +11,14 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" + conventions "go.opentelemetry.io/collector/semconv/v1.18.0" "go.uber.org/zap" ) const ( // language=ClickHouse SQL createGaugeTableSQL = ` -CREATE TABLE IF NOT EXISTS %s_gauge ( +CREATE TABLE IF NOT EXISTS %s_gauge %s ( ResourceAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), ResourceSchemaUrl String CODEC(ZSTD(1)), ScopeName String CODEC(ZSTD(1)), @@ -25,6 +26,7 @@ CREATE TABLE IF NOT EXISTS %s_gauge ( ScopeAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), ScopeDroppedAttrCount UInt32 CODEC(ZSTD(1)), ScopeSchemaUrl String CODEC(ZSTD(1)), + ServiceName LowCardinality(String) CODEC(ZSTD(1)), MetricName String CODEC(ZSTD(1)), MetricDescription String CODEC(ZSTD(1)), MetricUnit String CODEC(ZSTD(1)), @@ -46,10 +48,10 @@ CREATE TABLE IF NOT EXISTS %s_gauge ( INDEX idx_scope_attr_value mapValues(ScopeAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_attr_key mapKeys(Attributes) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_attr_value mapValues(Attributes) TYPE bloom_filter(0.01) GRANULARITY 1 -) ENGINE MergeTree() +) ENGINE = %s %s PARTITION BY toDate(TimeUnix) -ORDER BY (MetricName, Attributes, toUnixTimestamp64Nano(TimeUnix)) +ORDER BY (ServiceName, MetricName, Attributes, toUnixTimestamp64Nano(TimeUnix)) SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; ` // language=ClickHouse SQL @@ -61,6 +63,7 @@ SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; ScopeAttributes, ScopeDroppedAttrCount, ScopeSchemaUrl, + ServiceName, MetricName, MetricDescription, MetricUnit, @@ -73,7 +76,7 @@ SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; Exemplars.TimeUnix, Exemplars.Value, Exemplars.SpanId, - Exemplars.TraceId) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)` + Exemplars.TraceId) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)` ) type gaugeModel struct { @@ -106,6 +109,11 @@ func (g *gaugeMetrics) insert(ctx context.Context, db *sql.DB) error { }() for _, model := range g.gaugeModels { + var serviceName string + if v, ok := model.metadata.ResAttr[conventions.AttributeServiceName]; ok { + serviceName = v + } + for i := 0; i < model.gauge.DataPoints().Len(); i++ { dp := model.gauge.DataPoints().At(i) attrs, times, values, traceIDs, spanIDs := convertExemplars(dp.Exemplars()) @@ -117,6 +125,7 @@ func (g *gaugeMetrics) insert(ctx context.Context, db *sql.DB) error { attributesToMap(model.metadata.ScopeInstr.Attributes()), model.metadata.ScopeInstr.DroppedAttributesCount(), model.metadata.ScopeURL, + serviceName, model.metricName, model.metricDescription, model.metricUnit, @@ -128,8 +137,8 @@ func (g *gaugeMetrics) insert(ctx context.Context, db *sql.DB) error { attrs, times, values, - traceIDs, spanIDs, + traceIDs, ) if err != nil { return fmt.Errorf("ExecContext:%w", err) diff --git a/exporter/clickhouseexporter/internal/histogram_metrics.go b/exporter/clickhouseexporter/internal/histogram_metrics.go index 0ce19fe4d08b..905b571e5c9a 100644 --- a/exporter/clickhouseexporter/internal/histogram_metrics.go +++ b/exporter/clickhouseexporter/internal/histogram_metrics.go @@ -11,13 +11,14 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" + conventions "go.opentelemetry.io/collector/semconv/v1.18.0" "go.uber.org/zap" ) const ( // language=ClickHouse SQL createHistogramTableSQL = ` -CREATE TABLE IF NOT EXISTS %s_histogram ( +CREATE TABLE IF NOT EXISTS %s_histogram %s ( ResourceAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), ResourceSchemaUrl String CODEC(ZSTD(1)), ScopeName String CODEC(ZSTD(1)), @@ -25,6 +26,7 @@ CREATE TABLE IF NOT EXISTS %s_histogram ( ScopeAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), ScopeDroppedAttrCount UInt32 CODEC(ZSTD(1)), ScopeSchemaUrl String CODEC(ZSTD(1)), + ServiceName LowCardinality(String) CODEC(ZSTD(1)), MetricName String CODEC(ZSTD(1)), MetricDescription String CODEC(ZSTD(1)), MetricUnit String CODEC(ZSTD(1)), @@ -51,10 +53,10 @@ CREATE TABLE IF NOT EXISTS %s_histogram ( INDEX idx_scope_attr_value mapValues(ScopeAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_attr_key mapKeys(Attributes) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_attr_value mapValues(Attributes) TYPE bloom_filter(0.01) GRANULARITY 1 -) ENGINE MergeTree() +) ENGINE = %s %s PARTITION BY toDate(TimeUnix) -ORDER BY (MetricName, Attributes, toUnixTimestamp64Nano(TimeUnix)) +ORDER BY (ServiceName, MetricName, Attributes, toUnixTimestamp64Nano(TimeUnix)) SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; ` // language=ClickHouse SQL @@ -66,6 +68,7 @@ SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; ScopeAttributes, ScopeDroppedAttrCount, ScopeSchemaUrl, + ServiceName, MetricName, MetricDescription, MetricUnit, @@ -83,7 +86,7 @@ SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; Exemplars.TraceId, Flags, Min, - Max) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)` + Max) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)` ) type histogramModel struct { @@ -116,6 +119,11 @@ func (h *histogramMetrics) insert(ctx context.Context, db *sql.DB) error { }() for _, model := range h.histogramModel { + var serviceName string + if v, ok := model.metadata.ResAttr[conventions.AttributeServiceName]; ok { + serviceName = v + } + for i := 0; i < model.histogram.DataPoints().Len(); i++ { dp := model.histogram.DataPoints().At(i) attrs, times, values, traceIDs, spanIDs := convertExemplars(dp.Exemplars()) @@ -127,6 +135,7 @@ func (h *histogramMetrics) insert(ctx context.Context, db *sql.DB) error { attributesToMap(model.metadata.ScopeInstr.Attributes()), model.metadata.ScopeInstr.DroppedAttributesCount(), model.metadata.ScopeURL, + serviceName, model.metricName, model.metricDescription, model.metricUnit, @@ -140,8 +149,8 @@ func (h *histogramMetrics) insert(ctx context.Context, db *sql.DB) error { attrs, times, values, - traceIDs, spanIDs, + traceIDs, uint32(dp.Flags()), dp.Min(), dp.Max(), diff --git a/exporter/clickhouseexporter/internal/metadata/generated_status.go b/exporter/clickhouseexporter/internal/metadata/generated_status.go index 4e0bd1ba6553..75291bdd50e0 100644 --- a/exporter/clickhouseexporter/internal/metadata/generated_status.go +++ b/exporter/clickhouseexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("clickhouse") ) const ( - Type = "clickhouse" TracesStability = component.StabilityLevelAlpha MetricsStability = component.StabilityLevelAlpha LogsStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/clickhouse") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/clickhouse") +} diff --git a/exporter/clickhouseexporter/internal/metrics_model.go b/exporter/clickhouseexporter/internal/metrics_model.go index 52641aae7dd0..b4a1e6a3ab71 100644 --- a/exporter/clickhouseexporter/internal/metrics_model.go +++ b/exporter/clickhouseexporter/internal/metrics_model.go @@ -51,13 +51,9 @@ func SetLogger(l *zap.Logger) { } // NewMetricsTable create metric tables with an expiry time to storage metric telemetry data -func NewMetricsTable(ctx context.Context, tableName string, ttlDays uint, db *sql.DB) error { - var ttlExpr string - if ttlDays > 0 { - ttlExpr = fmt.Sprintf(`TTL toDateTime(TimeUnix) + toIntervalDay(%d)`, ttlDays) - } +func NewMetricsTable(ctx context.Context, tableName, cluster, engine, ttlExpr string, db *sql.DB) error { for table := range supportedMetricTypes { - query := fmt.Sprintf(table, tableName, ttlExpr) + query := fmt.Sprintf(table, tableName, cluster, engine, ttlExpr) if _, err := db.ExecContext(ctx, query); err != nil { return fmt.Errorf("exec create metrics table sql: %w", err) } diff --git a/exporter/clickhouseexporter/internal/package_test.go b/exporter/clickhouseexporter/internal/package_test.go new file mode 100644 index 000000000000..4486cdb28aa6 --- /dev/null +++ b/exporter/clickhouseexporter/internal/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/clickhouseexporter/internal/sum_metrics.go b/exporter/clickhouseexporter/internal/sum_metrics.go index 69f9a9d1d5d5..3276dae3a23a 100644 --- a/exporter/clickhouseexporter/internal/sum_metrics.go +++ b/exporter/clickhouseexporter/internal/sum_metrics.go @@ -11,13 +11,14 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" + conventions "go.opentelemetry.io/collector/semconv/v1.18.0" "go.uber.org/zap" ) const ( // language=ClickHouse SQL createSumTableSQL = ` -CREATE TABLE IF NOT EXISTS %s_sum ( +CREATE TABLE IF NOT EXISTS %s_sum %s ( ResourceAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), ResourceSchemaUrl String CODEC(ZSTD(1)), ScopeName String CODEC(ZSTD(1)), @@ -25,6 +26,7 @@ CREATE TABLE IF NOT EXISTS %s_sum ( ScopeAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), ScopeDroppedAttrCount UInt32 CODEC(ZSTD(1)), ScopeSchemaUrl String CODEC(ZSTD(1)), + ServiceName LowCardinality(String) CODEC(ZSTD(1)), MetricName String CODEC(ZSTD(1)), MetricDescription String CODEC(ZSTD(1)), MetricUnit String CODEC(ZSTD(1)), @@ -48,10 +50,10 @@ CREATE TABLE IF NOT EXISTS %s_sum ( INDEX idx_scope_attr_value mapValues(ScopeAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_attr_key mapKeys(Attributes) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_attr_value mapValues(Attributes) TYPE bloom_filter(0.01) GRANULARITY 1 -) ENGINE MergeTree() +) ENGINE = %s %s PARTITION BY toDate(TimeUnix) -ORDER BY (MetricName, Attributes, toUnixTimestamp64Nano(TimeUnix)) +ORDER BY (ServiceName, MetricName, Attributes, toUnixTimestamp64Nano(TimeUnix)) SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; ` // language=ClickHouse SQL @@ -63,6 +65,7 @@ SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; ScopeAttributes, ScopeDroppedAttrCount, ScopeSchemaUrl, + ServiceName, MetricName, MetricDescription, MetricUnit, @@ -77,7 +80,7 @@ SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; Exemplars.SpanId, Exemplars.TraceId, AggTemp, - IsMonotonic) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)` + IsMonotonic) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)` ) type sumModel struct { @@ -110,6 +113,11 @@ func (s *sumMetrics) insert(ctx context.Context, db *sql.DB) error { }() for _, model := range s.sumModel { + var serviceName string + if v, ok := model.metadata.ResAttr[conventions.AttributeServiceName]; ok { + serviceName = v + } + for i := 0; i < model.sum.DataPoints().Len(); i++ { dp := model.sum.DataPoints().At(i) attrs, times, values, traceIDs, spanIDs := convertExemplars(dp.Exemplars()) @@ -121,6 +129,7 @@ func (s *sumMetrics) insert(ctx context.Context, db *sql.DB) error { attributesToMap(model.metadata.ScopeInstr.Attributes()), model.metadata.ScopeInstr.DroppedAttributesCount(), model.metadata.ScopeURL, + serviceName, model.metricName, model.metricDescription, model.metricUnit, @@ -132,8 +141,8 @@ func (s *sumMetrics) insert(ctx context.Context, db *sql.DB) error { attrs, times, values, - traceIDs, spanIDs, + traceIDs, int32(model.sum.AggregationTemporality()), model.sum.IsMonotonic(), ) diff --git a/exporter/clickhouseexporter/internal/summary_metrics.go b/exporter/clickhouseexporter/internal/summary_metrics.go index a62c9cdb697f..5f3ca7beab8e 100644 --- a/exporter/clickhouseexporter/internal/summary_metrics.go +++ b/exporter/clickhouseexporter/internal/summary_metrics.go @@ -11,13 +11,14 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" + conventions "go.opentelemetry.io/collector/semconv/v1.18.0" "go.uber.org/zap" ) const ( // language=ClickHouse SQL createSummaryTableSQL = ` -CREATE TABLE IF NOT EXISTS %s_summary ( +CREATE TABLE IF NOT EXISTS %s_summary %s ( ResourceAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), ResourceSchemaUrl String CODEC(ZSTD(1)), ScopeName String CODEC(ZSTD(1)), @@ -25,6 +26,7 @@ CREATE TABLE IF NOT EXISTS %s_summary ( ScopeAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), ScopeDroppedAttrCount UInt32 CODEC(ZSTD(1)), ScopeSchemaUrl String CODEC(ZSTD(1)), + ServiceName LowCardinality(String) CODEC(ZSTD(1)), MetricName String CODEC(ZSTD(1)), MetricDescription String CODEC(ZSTD(1)), MetricUnit String CODEC(ZSTD(1)), @@ -44,10 +46,10 @@ CREATE TABLE IF NOT EXISTS %s_summary ( INDEX idx_scope_attr_value mapValues(ScopeAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_attr_key mapKeys(Attributes) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_attr_value mapValues(Attributes) TYPE bloom_filter(0.01) GRANULARITY 1 -) ENGINE MergeTree() +) ENGINE = %s %s PARTITION BY toDate(TimeUnix) -ORDER BY (MetricName, Attributes, toUnixTimestamp64Nano(TimeUnix)) +ORDER BY (ServiceName, MetricName, Attributes, toUnixTimestamp64Nano(TimeUnix)) SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; ` // language=ClickHouse SQL @@ -59,6 +61,7 @@ SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; ScopeAttributes, ScopeDroppedAttrCount, ScopeSchemaUrl, + ServiceName, MetricName, MetricDescription, MetricUnit, @@ -69,7 +72,7 @@ SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; Sum, ValueAtQuantiles.Quantile, ValueAtQuantiles.Value, - Flags) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)` + Flags) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)` ) type summaryModel struct { @@ -100,6 +103,11 @@ func (s *summaryMetrics) insert(ctx context.Context, db *sql.DB) error { _ = statement.Close() }() for _, model := range s.summaryModel { + var serviceName string + if v, ok := model.metadata.ResAttr[conventions.AttributeServiceName]; ok { + serviceName = v + } + for i := 0; i < model.summary.DataPoints().Len(); i++ { dp := model.summary.DataPoints().At(i) quantiles, values := convertValueAtQuantile(dp.QuantileValues()) @@ -112,6 +120,7 @@ func (s *summaryMetrics) insert(ctx context.Context, db *sql.DB) error { attributesToMap(model.metadata.ScopeInstr.Attributes()), model.metadata.ScopeInstr.DroppedAttributesCount(), model.metadata.ScopeURL, + serviceName, model.metricName, model.metricDescription, model.metricUnit, diff --git a/exporter/clickhouseexporter/metadata.yaml b/exporter/clickhouseexporter/metadata.yaml index 06a13bf01b99..51646315c0e9 100644 --- a/exporter/clickhouseexporter/metadata.yaml +++ b/exporter/clickhouseexporter/metadata.yaml @@ -1,4 +1,5 @@ type: clickhouse +scope_name: otelcol/clickhouse status: class: exporter @@ -6,4 +7,8 @@ status: alpha: [traces, metrics, logs] distributions: [contrib] codeowners: - active: [hanjm, dmitryax, Frapschen] + active: [hanjm, dmitryax, Frapschen, SpencerTorres] + +# TODO: Update the exporter to pass the tests +tests: + skip_lifecycle: true diff --git a/exporter/clickhouseexporter/package_test.go b/exporter/clickhouseexporter/package_test.go new file mode 100644 index 000000000000..29f6b7cbb77e --- /dev/null +++ b/exporter/clickhouseexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package clickhouseexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/clickhouseexporter/testdata/config.yaml b/exporter/clickhouseexporter/testdata/config.yaml index 573fbe923738..1531e4578782 100644 --- a/exporter/clickhouseexporter/testdata/config.yaml +++ b/exporter/clickhouseexporter/testdata/config.yaml @@ -5,7 +5,7 @@ clickhouse/full: username: foo password: bar database: otel - ttl_days: 3 + ttl: 72h logs_table_name: otel_logs traces_table_name: otel_traces timeout: 5s @@ -19,3 +19,19 @@ clickhouse/full: storage: file_storage/clickhouse clickhouse/invalid-endpoint: endpoint: 127.0.0.1:9000 + +clickhouse/table-engine-empty: + endpoint: clickhouse://127.0.0.1:9000 +clickhouse/table-engine-name-only: + endpoint: clickhouse://127.0.0.1:9000 + table_engine: + name: ReplicatedReplacingMergeTree +clickhouse/table-engine-full: + endpoint: clickhouse://127.0.0.1:9000 + table_engine: + name: ReplicatedReplacingMergeTree + params: "'/clickhouse/tables/{shard}/table_name', '{replica}', ver" +clickhouse/table-engine-params-only: + endpoint: clickhouse://127.0.0.1:9000 + table_engine: + params: "whatever" diff --git a/exporter/coralogixexporter/README.md b/exporter/coralogixexporter/README.md index aa421d3fe5bd..3c0e1e31d666 100644 --- a/exporter/coralogixexporter/README.md +++ b/exporter/coralogixexporter/README.md @@ -3,16 +3,13 @@ | Status | | | ------------- |-----------| -| Stability | [alpha]: logs | -| | [beta]: traces, metrics | -| Distributions | [contrib], [observiq] | +| Stability | [beta]: traces, metrics, logs | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fcoralogix%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fcoralogix) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fcoralogix%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fcoralogix) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@povilasv](https://www.github.com/povilasv), [@matej-g](https://www.github.com/matej-g) | -[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector The Coralogix exporter sends traces, metrics and logs to [Coralogix](https://coralogix.com/). diff --git a/exporter/coralogixexporter/config.go b/exporter/coralogixexporter/config.go index d1777366ceee..d37da458fea6 100644 --- a/exporter/coralogixexporter/config.go +++ b/exporter/coralogixexporter/config.go @@ -8,6 +8,7 @@ import ( "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -20,27 +21,27 @@ const ( // Config defines by Coralogix. type Config struct { exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` exporterhelper.TimeoutSettings `mapstructure:",squash"` // Coralogix domain Domain string `mapstructure:"domain"` // GRPC Settings used with Domain - DomainSettings configgrpc.GRPCClientSettings `mapstructure:"domain_settings"` + DomainSettings configgrpc.ClientConfig `mapstructure:"domain_settings"` // Deprecated: [v0.60.0] Coralogix jaeger based trace endpoint // will be removed in the next version // Please use OTLP endpoint using traces.endpoint - configgrpc.GRPCClientSettings `mapstructure:",squash"` + configgrpc.ClientConfig `mapstructure:",squash"` // Coralogix traces ingress endpoint - Traces configgrpc.GRPCClientSettings `mapstructure:"traces"` + Traces configgrpc.ClientConfig `mapstructure:"traces"` // The Coralogix metrics ingress endpoint - Metrics configgrpc.GRPCClientSettings `mapstructure:"metrics"` + Metrics configgrpc.ClientConfig `mapstructure:"metrics"` // The Coralogix logs ingress endpoint - Logs configgrpc.GRPCClientSettings `mapstructure:"logs"` + Logs configgrpc.ClientConfig `mapstructure:"logs"` // Your Coralogix private key (sensitive) for authentication PrivateKey configopaque.String `mapstructure:"private_key"` @@ -71,18 +72,18 @@ func (c *Config) Validate() error { return fmt.Errorf("`domain` or `traces.endpoint` or `metrics.endpoint` or `logs.endpoint` not specified, please fix the configuration") } if c.PrivateKey == "" { - return fmt.Errorf("`privateKey` not specified, please fix the configuration") + return fmt.Errorf("`private_key` not specified, please fix the configuration") } if c.AppName == "" { - return fmt.Errorf("`appName` not specified, please fix the configuration") + return fmt.Errorf("`application_name` not specified, please fix the configuration") } // check if headers exists - if len(c.GRPCClientSettings.Headers) == 0 { - c.GRPCClientSettings.Headers = make(map[string]configopaque.String) + if len(c.ClientConfig.Headers) == 0 { + c.ClientConfig.Headers = make(map[string]configopaque.String) } - c.GRPCClientSettings.Headers["ACCESS_TOKEN"] = c.PrivateKey - c.GRPCClientSettings.Headers["appName"] = configopaque.String(c.AppName) + c.ClientConfig.Headers["ACCESS_TOKEN"] = c.PrivateKey + c.ClientConfig.Headers["appName"] = configopaque.String(c.AppName) return nil } @@ -115,7 +116,7 @@ func (c *Config) getMetadataFromResource(res pcommon.Resource) (appName, subsyst return appName, subsystem } -func (c *Config) getDomainGrpcSettings() *configgrpc.GRPCClientSettings { +func (c *Config) getDomainGrpcSettings() *configgrpc.ClientConfig { settings := c.DomainSettings settings.Endpoint = fmt.Sprintf("ingress.%s:443", c.Domain) return &settings diff --git a/exporter/coralogixexporter/config_test.go b/exporter/coralogixexporter/config_test.go index 766a9a7790dd..139f88aa1022 100644 --- a/exporter/coralogixexporter/config_test.go +++ b/exporter/coralogixexporter/config_test.go @@ -15,6 +15,7 @@ import ( "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -38,29 +39,29 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, ""), expected: &Config{ QueueSettings: exporterhelper.NewDefaultQueueSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), PrivateKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", AppName: "APP_NAME", // Deprecated: [v0.47.0] SubSystem will remove in the next version SubSystem: "SUBSYSTEM_NAME", TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), - DomainSettings: configgrpc.GRPCClientSettings{ - Compression: configcompression.Gzip, + DomainSettings: configgrpc.ClientConfig{ + Compression: configcompression.TypeGzip, }, - Metrics: configgrpc.GRPCClientSettings{ + Metrics: configgrpc.ClientConfig{ Endpoint: "https://", - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, WriteBufferSize: 512 * 1024, }, - Logs: configgrpc.GRPCClientSettings{ + Logs: configgrpc.ClientConfig{ Endpoint: "https://", - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, }, - Traces: configgrpc.GRPCClientSettings{ + Traces: configgrpc.ClientConfig{ Endpoint: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - Compression: configcompression.Gzip, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{}, + Compression: configcompression.TypeGzip, + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{}, Insecure: false, InsecureSkipVerify: false, ServerName: "", @@ -70,10 +71,10 @@ func TestLoadConfig(t *testing.T) { WaitForReady: false, BalancerName: "", }, - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: "https://", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{}, + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{}, Insecure: false, InsecureSkipVerify: false, ServerName: "", @@ -93,29 +94,29 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, "all"), expected: &Config{ QueueSettings: exporterhelper.NewDefaultQueueSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), PrivateKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", AppName: "APP_NAME", // Deprecated: [v0.47.0] SubSystem will remove in the next version SubSystem: "SUBSYSTEM_NAME", TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), - DomainSettings: configgrpc.GRPCClientSettings{ - Compression: configcompression.Gzip, + DomainSettings: configgrpc.ClientConfig{ + Compression: configcompression.TypeGzip, }, - Metrics: configgrpc.GRPCClientSettings{ + Metrics: configgrpc.ClientConfig{ Endpoint: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, WriteBufferSize: 512 * 1024, }, - Logs: configgrpc.GRPCClientSettings{ + Logs: configgrpc.ClientConfig{ Endpoint: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, }, - Traces: configgrpc.GRPCClientSettings{ + Traces: configgrpc.ClientConfig{ Endpoint: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - Compression: configcompression.Gzip, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{}, + Compression: configcompression.TypeGzip, + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{}, Insecure: false, InsecureSkipVerify: false, ServerName: "", @@ -127,10 +128,10 @@ func TestLoadConfig(t *testing.T) { }, AppNameAttributes: []string{"service.namespace", "k8s.namespace.name"}, SubSystemAttributes: []string{"service.name", "k8s.deployment.name", "k8s.statefulset.name", "k8s.daemonset.name", "k8s.cronjob.name", "k8s.job.name", "k8s.container.name"}, - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: "https://", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{}, + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{}, Insecure: false, InsecureSkipVerify: false, ServerName: "", @@ -178,6 +179,7 @@ func TestTraceExporter(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, te, "failed to create trace exporter") assert.NoError(t, te.start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, te.shutdown(context.Background())) } func TestMetricsExporter(t *testing.T) { @@ -197,6 +199,7 @@ func TestMetricsExporter(t *testing.T) { require.NoError(t, err) require.NotNil(t, me, "failed to create metrics exporter") require.NoError(t, me.start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, me.shutdown(context.Background())) } func TestLogsExporter(t *testing.T) { @@ -212,10 +215,11 @@ func TestLogsExporter(t *testing.T) { params := exportertest.NewNopCreateSettings() - me, err := newLogsExporter(cfg, params) + le, err := newLogsExporter(cfg, params) require.NoError(t, err) - require.NotNil(t, me, "failed to create logs exporter") - require.NoError(t, me.start(context.Background(), componenttest.NewNopHost())) + require.NotNil(t, le, "failed to create logs exporter") + require.NoError(t, le.start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, le.shutdown(context.Background())) } func TestDomainWithAllExporters(t *testing.T) { @@ -233,16 +237,19 @@ func TestDomainWithAllExporters(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, te, "failed to create trace exporter") assert.NoError(t, te.start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, te.shutdown(context.Background())) me, err := newMetricsExporter(cfg, params) require.NoError(t, err) require.NotNil(t, me, "failed to create metrics exporter") require.NoError(t, me.start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, me.shutdown(context.Background())) le, err := newLogsExporter(cfg, params) require.NoError(t, err) require.NotNil(t, le, "failed to create logs exporter") require.NoError(t, le.start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, le.shutdown(context.Background())) } func TestEndpoindsAndDomainWithAllExporters(t *testing.T) { @@ -260,16 +267,19 @@ func TestEndpoindsAndDomainWithAllExporters(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, te, "failed to create trace exporter") assert.NoError(t, te.start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, te.shutdown(context.Background())) me, err := newMetricsExporter(cfg, params) require.NoError(t, err) require.NotNil(t, me, "failed to create metrics exporter") require.NoError(t, me.start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, me.shutdown(context.Background())) le, err := newLogsExporter(cfg, params) require.NoError(t, err) require.NotNil(t, le, "failed to create logs exporter") require.NoError(t, le.start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, le.shutdown(context.Background())) } func TestGetMetadataFromResource(t *testing.T) { diff --git a/exporter/coralogixexporter/factory.go b/exporter/coralogixexporter/factory.go index 7d9de6b677ea..961d93b91ba8 100644 --- a/exporter/coralogixexporter/factory.go +++ b/exporter/coralogixexporter/factory.go @@ -11,6 +11,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/configgrpc" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -32,28 +33,28 @@ func NewFactory() exporter.Factory { func createDefaultConfig() component.Config { return &Config{ QueueSettings: exporterhelper.NewDefaultQueueSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), - DomainSettings: configgrpc.GRPCClientSettings{ - Compression: configcompression.Gzip, + DomainSettings: configgrpc.ClientConfig{ + Compression: configcompression.TypeGzip, }, - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: "https://", }, // Traces GRPC client - Traces: configgrpc.GRPCClientSettings{ + Traces: configgrpc.ClientConfig{ Endpoint: "https://", - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, }, - Metrics: configgrpc.GRPCClientSettings{ + Metrics: configgrpc.ClientConfig{ Endpoint: "https://", // Default to gzip compression - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, WriteBufferSize: 512 * 1024, }, - Logs: configgrpc.GRPCClientSettings{ + Logs: configgrpc.ClientConfig{ Endpoint: "https://", - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, }, PrivateKey: "", AppName: "", @@ -75,7 +76,7 @@ func createTraceExporter(ctx context.Context, set exporter.CreateSettings, confi exporter.pushTraces, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: true}), exporterhelper.WithTimeout(cfg.TimeoutSettings), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithQueue(cfg.QueueSettings), exporterhelper.WithStart(exporter.start), exporterhelper.WithShutdown(exporter.shutdown), @@ -99,7 +100,7 @@ func createMetricsExporter( oce.pushMetrics, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: true}), exporterhelper.WithTimeout(oCfg.TimeoutSettings), - exporterhelper.WithRetry(oCfg.RetrySettings), + exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), exporterhelper.WithStart(oce.start), exporterhelper.WithShutdown(oce.shutdown), @@ -123,7 +124,7 @@ func createLogsExporter( oce.pushLogs, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: true}), exporterhelper.WithTimeout(oCfg.TimeoutSettings), - exporterhelper.WithRetry(oCfg.RetrySettings), + exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), exporterhelper.WithStart(oce.start), exporterhelper.WithShutdown(oce.shutdown), diff --git a/exporter/coralogixexporter/factory_test.go b/exporter/coralogixexporter/factory_test.go index 8cf8ad372b33..3b1858315f2c 100644 --- a/exporter/coralogixexporter/factory_test.go +++ b/exporter/coralogixexporter/factory_test.go @@ -14,6 +14,7 @@ import ( "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/exportertest" @@ -28,7 +29,7 @@ func TestCreateDefaultConfig(t *testing.T) { assert.NoError(t, componenttest.CheckConfigStruct(cfg)) ocfg, ok := factory.CreateDefaultConfig().(*Config) assert.True(t, ok) - assert.Equal(t, ocfg.RetrySettings, exporterhelper.NewDefaultRetrySettings()) + assert.Equal(t, ocfg.BackOffConfig, configretry.NewDefaultBackOffConfig()) assert.Equal(t, ocfg.QueueSettings, exporterhelper.NewDefaultQueueSettings()) assert.Equal(t, ocfg.TimeoutSettings, exporterhelper.NewDefaultTimeoutSettings()) } @@ -40,8 +41,9 @@ func TestCreateMetricsExporter(t *testing.T) { set := exportertest.NewNopCreateSettings() oexp, err := factory.CreateMetricsExporter(context.Background(), set, cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, oexp) + require.NoError(t, oexp.Shutdown(context.Background())) } func TestCreateMetricsExporterWithDomain(t *testing.T) { @@ -51,7 +53,7 @@ func TestCreateMetricsExporterWithDomain(t *testing.T) { set := exportertest.NewNopCreateSettings() oexp, err := factory.CreateMetricsExporter(context.Background(), set, cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, oexp) } @@ -62,8 +64,9 @@ func TestCreateLogsExporter(t *testing.T) { set := exportertest.NewNopCreateSettings() oexp, err := factory.CreateLogsExporter(context.Background(), set, cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, oexp) + require.NoError(t, oexp.Shutdown(context.Background())) } func TestCreateLogsExporterWithDomain(t *testing.T) { @@ -72,7 +75,7 @@ func TestCreateLogsExporterWithDomain(t *testing.T) { cfg.Domain = "localhost" set := exportertest.NewNopCreateSettings() oexp, err := factory.CreateLogsExporter(context.Background(), set, cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, oexp) } @@ -87,9 +90,9 @@ func TestCreateTracesExporter(t *testing.T) { { name: "UseSecure", config: &Config{ - Traces: configgrpc.GRPCClientSettings{ + Traces: configgrpc.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: false, }, }, @@ -98,7 +101,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "Keepalive", config: &Config{ - Traces: configgrpc.GRPCClientSettings{ + Traces: configgrpc.ClientConfig{ Endpoint: endpoint, Keepalive: &configgrpc.KeepaliveClientConfig{ Time: 30 * time.Second, @@ -111,7 +114,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "NoneCompression", config: &Config{ - Traces: configgrpc.GRPCClientSettings{ + Traces: configgrpc.ClientConfig{ Endpoint: endpoint, Compression: "none", }, @@ -120,34 +123,34 @@ func TestCreateTracesExporter(t *testing.T) { { name: "GzipCompression", config: &Config{ - Traces: configgrpc.GRPCClientSettings{ + Traces: configgrpc.ClientConfig{ Endpoint: endpoint, - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, }, }, }, { name: "SnappyCompression", config: &Config{ - Traces: configgrpc.GRPCClientSettings{ + Traces: configgrpc.ClientConfig{ Endpoint: endpoint, - Compression: configcompression.Snappy, + Compression: configcompression.TypeSnappy, }, }, }, { name: "ZstdCompression", config: &Config{ - Traces: configgrpc.GRPCClientSettings{ + Traces: configgrpc.ClientConfig{ Endpoint: endpoint, - Compression: configcompression.Zstd, + Compression: configcompression.TypeZstd, }, }, }, { name: "Headers", config: &Config{ - Traces: configgrpc.GRPCClientSettings{ + Traces: configgrpc.ClientConfig{ Endpoint: endpoint, Headers: map[string]configopaque.String{ "hdr1": "val1", @@ -159,7 +162,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "NumConsumers", config: &Config{ - Traces: configgrpc.GRPCClientSettings{ + Traces: configgrpc.ClientConfig{ Endpoint: endpoint, }, }, @@ -167,10 +170,10 @@ func TestCreateTracesExporter(t *testing.T) { { name: "CertPemFileError", config: &Config{ - Traces: configgrpc.GRPCClientSettings{ + Traces: configgrpc.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "nosuchfile", }, }, @@ -182,8 +185,8 @@ func TestCreateTracesExporter(t *testing.T) { name: "UseDomain", config: &Config{ Domain: "localhost", - DomainSettings: configgrpc.GRPCClientSettings{ - TLSSetting: configtls.TLSClientSetting{ + DomainSettings: configgrpc.ClientConfig{ + TLSSetting: configtls.ClientConfig{ Insecure: false, }, }, @@ -197,7 +200,7 @@ func TestCreateTracesExporter(t *testing.T) { set := exportertest.NewNopCreateSettings() consumer, err := factory.CreateTracesExporter(context.Background(), set, tt.config) if tt.mustFailOnCreate { - assert.NotNil(t, err) + assert.Error(t, err) return } assert.NoError(t, err) @@ -227,7 +230,7 @@ func TestCreateLogsExporterWithDomainAndEndpoint(t *testing.T) { set := exportertest.NewNopCreateSettings() consumer, err := factory.CreateLogsExporter(context.Background(), set, cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, consumer) err = consumer.Start(context.Background(), componenttest.NewNopHost()) diff --git a/exporter/coralogixexporter/generated_component_test.go b/exporter/coralogixexporter/generated_component_test.go new file mode 100644 index 000000000000..18f1b2036164 --- /dev/null +++ b/exporter/coralogixexporter/generated_component_test.go @@ -0,0 +1,140 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package coralogixexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/coralogixexporter/go.mod b/exporter/coralogixexporter/go.mod index dc0525ed5e15..ea0fafecedf4 100644 --- a/exporter/coralogixexporter/go.mod +++ b/exporter/coralogixexporter/go.mod @@ -1,70 +1,81 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configcompression v0.89.0 - go.opentelemetry.io/collector/config/configgrpc v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a - google.golang.org/grpc v1.59.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configcompression v1.5.0 + go.opentelemetry.io/collector/config/configgrpc v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de + google.golang.org/grpc v1.63.2 ) require ( - cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // 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.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.2 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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 - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) +// 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/common => ../../internal/common retract ( diff --git a/exporter/coralogixexporter/go.sum b/exporter/coralogixexporter/go.sum index 7de9e67b68df..f3629a3fdeea 100644 --- a/exporter/coralogixexporter/go.sum +++ b/exporter/coralogixexporter/go.sum @@ -1,65 +1,30 @@ -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.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -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= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -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-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -72,15 +37,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -92,121 +56,106 @@ github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0b 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/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/configgrpc v0.89.0/go.mod h1:2GuAxpU34a1X19kCZ8Kw3FUsxOIiFcWHiYorRCyhnCc= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -214,39 +163,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -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/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a h1:a2MQQVoTo96JC9PMGtGBymLp7+/RzpFc2yX/9WfFg1c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/coralogixexporter/internal/metadata/generated_status.go b/exporter/coralogixexporter/internal/metadata/generated_status.go index c2a79b2fa509..0bd2c6c880ae 100644 --- a/exporter/coralogixexporter/internal/metadata/generated_status.go +++ b/exporter/coralogixexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("coralogix") ) const ( - Type = "coralogix" - LogsStability = component.StabilityLevelAlpha TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta + LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/coralogix") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/coralogix") +} diff --git a/exporter/coralogixexporter/metadata.yaml b/exporter/coralogixexporter/metadata.yaml index 4ef001565b1f..0ab4c2ccd759 100644 --- a/exporter/coralogixexporter/metadata.yaml +++ b/exporter/coralogixexporter/metadata.yaml @@ -1,10 +1,16 @@ type: coralogix +scope_name: otelcol/coralogix status: class: exporter stability: - beta: [traces, metrics] - alpha: [logs] - distributions: [contrib, observiq] + beta: [traces, metrics, logs] + distributions: [contrib] codeowners: active: [povilasv, matej-g] + +tests: + config: + domain: "coralogix.com" + private_key: "xxx" + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/coralogixexporter/package_test.go b/exporter/coralogixexporter/package_test.go new file mode 100644 index 000000000000..5c3305c1c0e1 --- /dev/null +++ b/exporter/coralogixexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package coralogixexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/datadogexporter/README.md b/exporter/datadogexporter/README.md index 30db65c73601..c4ae28bdec32 100644 --- a/exporter/datadogexporter/README.md +++ b/exporter/datadogexporter/README.md @@ -5,19 +5,21 @@ | ------------- |-----------| | Stability | [alpha]: logs | | | [beta]: traces, metrics | -| Distributions | [contrib], [aws], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fdatadog%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fdatadog) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fdatadog%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fdatadog) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@mx-psi](https://www.github.com/mx-psi), [@gbbr](https://www.github.com/gbbr), [@dineshg13](https://www.github.com/dineshg13), [@liustanley](https://www.github.com/liustanley), [@songy23](https://www.github.com/songy23), [@mackjmr](https://www.github.com/mackjmr) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@mx-psi](https://www.github.com/mx-psi), [@dineshg13](https://www.github.com/dineshg13), [@liustanley](https://www.github.com/liustanley), [@songy23](https://www.github.com/songy23), [@mackjmr](https://www.github.com/mackjmr) | +| Emeritus | [@gbbr](https://www.github.com/gbbr) | [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector > Please review the Collector's [security documentation](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md), which contains recommendations on securing sensitive information such as the API key required by this exporter. +> The Datadog Exporter now skips APM stats computation by default. It is recommended to only use the [Datadog Connector](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/datadogconnector) in order to compute APM stats. +> To temporarily revert to the previous behavior, disable the `exporter.datadogexporter.DisableAPMStats` feature gate. Example: `otelcol --config=config.yaml --feature-gates=-exporter.datadogexporter.DisableAPMStats` + Visit the [official documentation](https://docs.datadoghq.com/tracing/trace_collection/open_standards/otel_collector_datadog_exporter/) for usage instructions. ## FAQs @@ -58,6 +60,12 @@ otelcol --config=config.yaml --feature-gates=-exporter.datadogexporter.metricexp ``` Note that we are currently migrating the Datadog metrics exporter to use the metrics serializer instead. The feature flag `exporter.datadogexporter.metricexportnativeclient` will be deprecated and eventually removed in the future, following the [feature lifecycle](https://github.com/open-telemetry/opentelemetry-collector/tree/main/featuregate#feature-lifecycle). +### Remap OTel’s service.name attribute to service for logs + +For Datadog Exporter versions 0.83.0 and later, the `service` field of OTel logs is populated as [OTel semantic convention](https://opentelemetry.io/docs/specs/semconv/resource/#service) `service.name`. However, `service.name` is not one of the default [service attributes](https://docs.datadoghq.com/logs/log_configuration/pipelines/?tab=service#service-attribute) in Datadog’s log preprocessing. + +To get the service field correctly populated in your logs, you can specify service.name to be the source of a log’s service by setting a [log service remapper processor](https://docs.datadoghq.com/logs/log_configuration/pipelines/?tab=service#service-attribute). + [beta]:https://github.com/open-telemetry/opentelemetry-collector#beta [alpha]:https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/exporter/datadogexporter/config.go b/exporter/datadogexporter/config.go index 87a3c0cf55e3..9ebd11698016 100644 --- a/exporter/datadogexporter/config.go +++ b/exporter/datadogexporter/config.go @@ -11,8 +11,10 @@ import ( "strings" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" @@ -54,7 +56,7 @@ type MetricsConfig struct { // TCPAddr.Endpoint is the host of the Datadog intake server to send metrics to. // If unset, the value is obtained from the Site. - confignet.TCPAddr `mapstructure:",squash"` + confignet.TCPAddrConfig `mapstructure:",squash"` ExporterConfig MetricsExporterConfig `mapstructure:",squash"` @@ -247,7 +249,7 @@ type MetricsExporterConfig struct { type TracesConfig struct { // TCPAddr.Endpoint is the host of the Datadog intake server to send traces to. // If unset, the value is obtained from the Site. - confignet.TCPAddr `mapstructure:",squash"` + confignet.TCPAddrConfig `mapstructure:",squash"` // ignored resources // A blacklist of regular expressions can be provided to disable certain traces based on their resource name @@ -291,6 +293,11 @@ type TracesConfig struct { // The default list of peer tags can be found in https://github.com/DataDog/datadog-agent/blob/main/pkg/trace/stats/concentrator.go. PeerTagsAggregation bool `mapstructure:"peer_tags_aggregation"` + // [BETA] Optional list of supplementary peer tags that go beyond the defaults. The Datadog backend validates all tags + // and will drop ones that are unapproved. The default set of peer tags can be found at + // https://github.com/DataDog/datadog-agent/blob/505170c4ac8c3cbff1a61cf5f84b28d835c91058/pkg/trace/stats/concentrator.go#L55. + PeerTags []string `mapstructure:"peer_tags"` + // TraceBuffer specifies the number of Datadog Agent TracerPayloads to buffer before dropping. // The default value is 0, meaning the Datadog Agent TracerPayloads are unbuffered. TraceBuffer int `mapstructure:"trace_buffer"` @@ -304,7 +311,7 @@ type TracesConfig struct { type LogsConfig struct { // TCPAddr.Endpoint is the host of the Datadog intake server to send logs to. // If unset, the value is obtained from the Site. - confignet.TCPAddr `mapstructure:",squash"` + confignet.TCPAddrConfig `mapstructure:",squash"` // DumpPayloads report whether payloads should be dumped when logging level is debug. DumpPayloads bool `mapstructure:"dump_payloads"` @@ -313,8 +320,12 @@ type LogsConfig struct { // TagsConfig defines the tag-related configuration // It is embedded in the configuration type TagsConfig struct { - // Hostname is the host name for unified service tagging. - // If unset, it is determined automatically. + // Hostname is the fallback hostname used for payloads without hostname-identifying attributes. + // This option will NOT change the hostname applied to your metrics, traces and logs if they already have hostname-identifying attributes. + // If unset, the hostname will be determined automatically. See https://docs.datadoghq.com/opentelemetry/schema_semantics/hostname/?tab=datadogexporter#fallback-hostname-logic for details. + // + // Prefer using the `datadog.host.name` resource attribute over using this setting. + // See https://docs.datadoghq.com/opentelemetry/schema_semantics/hostname/?tab=datadogexporter#general-hostname-semantic-conventions for details. Hostname string `mapstructure:"hostname"` } @@ -359,11 +370,15 @@ type HostMetadataConfig struct { Enabled bool `mapstructure:"enabled"` // HostnameSource is the source for the hostname of host metadata. + // This hostname is used for identifying the infrastructure list, host map and host tag information related to the host where the Datadog exporter is running. + // Changing this setting will not change the host used to tag your metrics, traces and logs in any way. + // For remote hosts, see https://docs.datadoghq.com/opentelemetry/schema_semantics/host_metadata/. + // // Valid values are 'first_resource' and 'config_or_system': // - 'first_resource' picks the host metadata hostname from the resource // attributes on the first OTLP payload that gets to the exporter. // If the first payload lacks hostname-like attributes, it will fallback to 'config_or_system'. - // Do not use this hostname source if receiving data from multiple hosts. + // **Do not use this hostname source if receiving data from multiple hosts**. // - 'config_or_system' picks the host metadata hostname from the 'hostname' setting, // If this is empty it will use available system APIs and cloud provider endpoints. // @@ -376,24 +391,11 @@ type HostMetadataConfig struct { Tags []string `mapstructure:"tags"` } -// LimitedTLSClientSetting is a subset of TLSClientSetting, see LimitedHTTPClientSettings for more details -type LimitedTLSClientSettings struct { - // InsecureSkipVerify controls whether a client verifies the server's - // certificate chain and host name. - InsecureSkipVerify bool `mapstructure:"insecure_skip_verify"` -} - -type LimitedHTTPClientSettings struct { - TLSSetting LimitedTLSClientSettings `mapstructure:"tls,omitempty"` -} - // Config defines configuration for the Datadog exporter. type Config struct { - exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` - - LimitedHTTPClientSettings `mapstructure:",squash"` + confighttp.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + exporterhelper.QueueSettings `mapstructure:"sending_queue"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` TagsConfig `mapstructure:",squash"` @@ -436,6 +438,10 @@ var _ component.Config = (*Config)(nil) // Validate the configuration for errors. This is required by component.Config. func (c *Config) Validate() error { + if err := validateClientConfig(c.ClientConfig); err != nil { + return err + } + if c.OnlyMetadata && (!c.HostMetadata.Enabled || c.HostMetadata.HostnameSource != HostnameSourceFirstResource) { return errNoMetadata } @@ -476,6 +482,36 @@ func (c *Config) Validate() error { return nil } +func validateClientConfig(cfg confighttp.ClientConfig) error { + var unsupported []string + if cfg.Auth != nil { + unsupported = append(unsupported, "auth") + } + if cfg.Endpoint != "" { + unsupported = append(unsupported, "endpoint") + } + if cfg.Compression != "" { + unsupported = append(unsupported, "compression") + } + if cfg.ProxyURL != "" { + unsupported = append(unsupported, "proxy_url") + } + if cfg.Headers != nil { + unsupported = append(unsupported, "headers") + } + if cfg.HTTP2ReadIdleTimeout != 0 { + unsupported = append(unsupported, "http2_read_idle_timeout") + } + if cfg.HTTP2PingTimeout != 0 { + unsupported = append(unsupported, "http2_ping_timeout") + } + + if len(unsupported) > 0 { + return fmt.Errorf("these confighttp client configs are currently not respected by Datadog exporter: %s", strings.Join(unsupported, ", ")) + } + return nil +} + var _ error = (*renameError)(nil) // renameError is an error related to a renamed setting. @@ -551,7 +587,7 @@ func (c *Config) Unmarshal(configMap *confmap.Conf) error { return err } - err := configMap.Unmarshal(c, confmap.WithErrorUnused()) + err := configMap.Unmarshal(c) if err != nil { return err } @@ -567,17 +603,17 @@ func (c *Config) Unmarshal(configMap *confmap.Conf) error { // If an endpoint is not explicitly set, override it based on the site. if !configMap.IsSet("metrics::endpoint") { - c.Metrics.TCPAddr.Endpoint = fmt.Sprintf("https://api.%s", c.API.Site) + c.Metrics.TCPAddrConfig.Endpoint = fmt.Sprintf("https://api.%s", c.API.Site) } if !configMap.IsSet("traces::endpoint") { - c.Traces.TCPAddr.Endpoint = fmt.Sprintf("https://trace.agent.%s", c.API.Site) + c.Traces.TCPAddrConfig.Endpoint = fmt.Sprintf("https://trace.agent.%s", c.API.Site) } if !configMap.IsSet("logs::endpoint") { - c.Logs.TCPAddr.Endpoint = fmt.Sprintf("https://http-intake.logs.%s", c.API.Site) + c.Logs.TCPAddrConfig.Endpoint = fmt.Sprintf("https://http-intake.logs.%s", c.API.Site) } // Return an error if an endpoint is explicitly set to "" - if c.Metrics.TCPAddr.Endpoint == "" || c.Traces.TCPAddr.Endpoint == "" || c.Logs.TCPAddr.Endpoint == "" { + if c.Metrics.TCPAddrConfig.Endpoint == "" || c.Traces.TCPAddrConfig.Endpoint == "" || c.Logs.TCPAddrConfig.Endpoint == "" { return errEmptyEndpoint } diff --git a/exporter/datadogexporter/config_test.go b/exporter/datadogexporter/config_test.go index 2d6ae5005230..62d244f7ca03 100644 --- a/exporter/datadogexporter/config_test.go +++ b/exporter/datadogexporter/config_test.go @@ -5,12 +5,25 @@ package datadogexporter import ( "testing" + "time" "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configauth" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/confmap" ) func TestValidate(t *testing.T) { + idleConnTimeout := 30 * time.Second + maxIdleConn := 300 + maxIdleConnPerHost := 150 + maxConnPerHost := 250 + ty, err := component.NewType("ty") + assert.NoError(t, err) + auth := configauth.Authentication{AuthenticatorID: component.NewID(ty)} tests := []struct { name string @@ -94,8 +107,8 @@ func TestValidate(t *testing.T) { name: "TLS settings are valid", cfg: &Config{ API: APIConfig{Key: "notnull"}, - LimitedHTTPClientSettings: LimitedHTTPClientSettings{ - TLSSetting: LimitedTLSClientSettings{ + ClientConfig: confighttp.ClientConfig{ + TLSSetting: configtls.ClientConfig{ InsecureSkipVerify: true, }, }, @@ -108,6 +121,47 @@ func TestValidate(t *testing.T) { Traces: TracesConfig{TraceBuffer: 10}, }, }, + { + name: "With peer_tags", + cfg: &Config{ + API: APIConfig{Key: "notnull"}, + Traces: TracesConfig{PeerTags: []string{"tag1", "tag2"}}, + }, + }, + { + name: "With confighttp client configs", + cfg: &Config{ + API: APIConfig{Key: "notnull"}, + ClientConfig: confighttp.ClientConfig{ + ReadBufferSize: 100, + WriteBufferSize: 200, + Timeout: 10 * time.Second, + IdleConnTimeout: &idleConnTimeout, + MaxIdleConns: &maxIdleConn, + MaxIdleConnsPerHost: &maxIdleConnPerHost, + MaxConnsPerHost: &maxConnPerHost, + DisableKeepAlives: true, + TLSSetting: configtls.ClientConfig{InsecureSkipVerify: true}, + }, + }, + }, + + { + name: "unsupported confighttp client configs", + cfg: &Config{ + API: APIConfig{Key: "notnull"}, + ClientConfig: confighttp.ClientConfig{ + Endpoint: "endpoint", + Compression: "gzip", + ProxyURL: "proxy", + Auth: &auth, + Headers: map[string]configopaque.String{"key": "val"}, + HTTP2ReadIdleTimeout: 250, + HTTP2PingTimeout: 200, + }, + }, + err: "these confighttp client configs are currently not respected by Datadog exporter: auth, endpoint, compression, proxy_url, headers, http2_read_idle_timeout, http2_ping_timeout", + }, } for _, testInstance := range tests { t.Run(testInstance.name, func(t *testing.T) { @@ -122,10 +176,26 @@ func TestValidate(t *testing.T) { } func TestUnmarshal(t *testing.T) { + cfgWithHTTPConfigs := NewFactory().CreateDefaultConfig().(*Config) + idleConnTimeout := 30 * time.Second + maxIdleConn := 300 + maxIdleConnPerHost := 150 + maxConnPerHost := 250 + cfgWithHTTPConfigs.ReadBufferSize = 100 + cfgWithHTTPConfigs.WriteBufferSize = 200 + cfgWithHTTPConfigs.Timeout = 10 * time.Second + cfgWithHTTPConfigs.MaxIdleConns = &maxIdleConn + cfgWithHTTPConfigs.MaxIdleConnsPerHost = &maxIdleConnPerHost + cfgWithHTTPConfigs.MaxConnsPerHost = &maxConnPerHost + cfgWithHTTPConfigs.IdleConnTimeout = &idleConnTimeout + cfgWithHTTPConfigs.DisableKeepAlives = true + cfgWithHTTPConfigs.TLSSetting.InsecureSkipVerify = true + cfgWithHTTPConfigs.warnings = nil + tests := []struct { name string configMap *confmap.Conf - cfg Config + cfg *Config err string }{ { @@ -257,6 +327,21 @@ func TestUnmarshal(t *testing.T) { }), err: "\"metrics::sums::initial_cumulative_monotonic_value\" can only be configured when \"metrics::sums::cumulative_monotonic_mode\" is set to \"to_delta\"", }, + { + name: "unmarshall confighttp client configs", + configMap: confmap.NewFromStringMap(map[string]any{ + "read_buffer_size": 100, + "write_buffer_size": 200, + "timeout": "10s", + "max_idle_conns": 300, + "max_idle_conns_per_host": 150, + "max_conns_per_host": 250, + "disable_keep_alives": true, + "idle_conn_timeout": "30s", + "tls": map[string]any{"insecure_skip_verify": true}, + }), + cfg: cfgWithHTTPConfigs, + }, } f := NewFactory() diff --git a/exporter/datadogexporter/config_warnings_test.go b/exporter/datadogexporter/config_warnings_test.go index ea2220d1fdd2..ab98a6e010d6 100644 --- a/exporter/datadogexporter/config_warnings_test.go +++ b/exporter/datadogexporter/config_warnings_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" ) @@ -79,7 +80,7 @@ func TestSendAggregations(t *testing.T) { t.Run(testInstance.name, func(t *testing.T) { f := NewFactory() cfg := f.CreateDefaultConfig().(*Config) - err := cfg.Unmarshal(testInstance.cfgMap) + err := component.UnmarshalConfig(testInstance.cfgMap, cfg) if err != nil || testInstance.err != "" { assert.EqualError(t, err, testInstance.err) } else { @@ -156,7 +157,7 @@ func TestPeerTags(t *testing.T) { t.Run(testInstance.name, func(t *testing.T) { f := NewFactory() cfg := f.CreateDefaultConfig().(*Config) - err := cfg.Unmarshal(testInstance.cfgMap) + err := component.UnmarshalConfig(testInstance.cfgMap, cfg) if err != nil || testInstance.err != "" { assert.EqualError(t, err, testInstance.err) } else { diff --git a/exporter/datadogexporter/examples/batch-memory.yaml b/exporter/datadogexporter/examples/batch-memory.yaml new file mode 100644 index 000000000000..109e7811e058 --- /dev/null +++ b/exporter/datadogexporter/examples/batch-memory.yaml @@ -0,0 +1,36 @@ +receivers: + otlp: + protocols: + http: + endpoint: "localhost:4318" + grpc: + endpoint: "localhost:4317" + +processors: + batch: + send_batch_max_size: 1000 + send_batch_size: 100 + timeout: 10s + memory_limiter: + check_interval: 1s + limit_mib: 1000 + +exporters: + datadog: + api: + key: ${env:DD_API_KEY} + +service: + pipelines: + traces: + receivers: [otlp] + processors: [batch, memory_limiter] + exporters: [datadog] + metrics: + receivers: [otlp] + processors: [batch, memory_limiter] + exporters: [datadog] + logs: + receivers: [otlp] + processors: [batch, memory_limiter] + exporters: [datadog] diff --git a/exporter/datadogexporter/examples/collector-metrics.yaml b/exporter/datadogexporter/examples/collector-metrics.yaml new file mode 100644 index 000000000000..4a68e51caa19 --- /dev/null +++ b/exporter/datadogexporter/examples/collector-metrics.yaml @@ -0,0 +1,27 @@ +receivers: + prometheus: + config: + scrape_configs: + - job_name: 'otelcol' + scrape_interval: 10s + static_configs: + - targets: ['0.0.0.0:8888'] + +processors: + batch: + send_batch_max_size: 1000 + send_batch_size: 100 + timeout: 10s + +exporters: + datadog: + api: + site: ${env:DD_SITE} + key: ${env:DD_API_KEY} + +service: + pipelines: + metrics: + receivers: [prometheus] + processors: [batch] + exporters: [datadog] diff --git a/exporter/datadogexporter/examples/collector.yaml b/exporter/datadogexporter/examples/collector.yaml index 829c1775bd92..ec0ae11ae1bb 100644 --- a/exporter/datadogexporter/examples/collector.yaml +++ b/exporter/datadogexporter/examples/collector.yaml @@ -171,8 +171,12 @@ exporters: # The Datadog exporter is necessary for exporting telemetry signals to Datadog. datadog: ## @param hostname - string - optional - ## A custom hostname. - ## If unset, this will be determined automatically if possible. + ## The fallback hostname used for payloads without hostname-identifying attributes. + ## This option will NOT change the hostname applied to your metrics, traces and logs if they already have hostname-identifying attributes. + ## If unset, the hostname will be determined automatically. See https://docs.datadoghq.com/opentelemetry/schema_semantics/hostname/?tab=datadogexporter#fallback-hostname-logic for details. + ## + ## Prefer using the `datadog.host.name` resource attribute over using this setting. + ## See https://docs.datadoghq.com/opentelemetry/schema_semantics/hostname/?tab=datadogexporter#general-hostname-semantic-conventions for details. # # hostname: customhostname @@ -210,6 +214,27 @@ exporters: ## @param tls - boolean - optional - default: false # insecure_skip_verify: false + ## @param read_buffer_size - integer - optional + ## @param write_buffer_size - integer - optional + ## @param timeout - duration - optional + ## @param max_idle_conns - integer - optional + ## @param max_idle_conns_per_host - integer - optional + ## @param max_conns_per_host - integer - optional + ## @param idle_conn_timeout - duration - optional + ## @param disable_keep_alives - boolean - optional + ## + ## Below are a subset of configs in confighttp that are respected by Datadog exporter. + ## See https://pkg.go.dev/go.opentelemetry.io/collector/config/confighttp for details on these configs. + ## + # read_buffer_size: 0 + # write_buffer_size: 0 + # timeout: 15s + # max_idle_conns: 100 + # max_idle_conns_per_host: 0 + # max_conns_per_host: 0 + # idle_conn_timeout: 0s + # disable_keep_alives: false + ## @param metrics - custom object - optional ## Metric exporter specific configuration. # @@ -227,9 +252,11 @@ exporters: # endpoint: https://api.datadoghq.com ## @param resource_attributes_as_tags - string - optional - default: false - ## Set to true to add all resource attributes of a metric to its metric tags. - ## When set to false, only a small predefined subset of resource attributes is converted - ## to metric tags. + ## Set to true to add resource attributes of a metric to its metric tags. + ## Please note that any of the subset of resource attributes in this + ## list https://docs.datadoghq.com/opentelemetry/guide/semantic_mapping/ are + ## converted to datadog conventions and set to to metric tags whether this option + ## is enabled or not. # # resource_attributes_as_tags: false @@ -299,10 +326,10 @@ exporters: ## The host of the Datadog intake server to send traces to. ## If unset, the value is obtained through the `site` parameter in the `api` section. # - # endpoint: https://api.datadoghq.com + # endpoint: https://trace.agent.datadoghq.com ## @param ignore_resources - list of strings - optional - ## A blacklist of regular expressions can be provided to disable certain traces based on their resource name + ## A blocklist of regular expressions can be provided to disable certain traces based on their resource name ## all entries must be surrounded by double quotes and separated by commas. # # ignore_resources: ["(GET|POST) /healthcheck"] @@ -354,6 +381,12 @@ exporters: # # peer_tags_aggregation: false + ## @param peer_tags - [BETA] Optional list of supplementary peer tags that go beyond the defaults. The Datadog backend validates all tags + ## and will drop ones that are unapproved. The default set of peer tags can be found at + ## https://github.com/DataDog/datadog-agent/blob/505170c4ac8c3cbff1a61cf5f84b28d835c91058/pkg/trace/stats/concentrator.go#L55. + # + # peer_tags: ["tag"] + ## @param trace_buffer - specifies the number of outgoing trace payloads to buffer before dropping - optional ## If unset, the default value is 0, meaning the outgoing trace payloads are unbuffered. ## If you start seeing log messages like `Payload in channel full. Dropped 1 payload.` in the datadog exporter, consider @@ -365,8 +398,9 @@ exporters: ## Host metadata specific configuration. ## Host metadata is the information used for populating the infrastructure list, the host map and providing host tags functionality within the Datadog app. ## - ## The exporter will only send host metadata for a single host, whose name is chosen + ## By default, the exporter will only send host metadata for a single host, whose name is chosen ## according to `host_metadata::hostname_source`. + ## See https://docs.datadoghq.com/opentelemetry/schema_semantics/host_metadata/ to send host metadata about more hosts. # # host_metadata: ## @param enabled - boolean - optional - default: true @@ -376,10 +410,14 @@ exporters: ## @param hostname_source - enum - optional - default: config_or_system ## Source for the hostname of host metadata. + ## This hostname is used for identifying the infrastructure list, host map and host tag information related to the host where the Datadog exporter is running. + ## Changing this setting will not change the host used to tag your metrics, traces and logs in any way. + ## For remote hosts, see https://docs.datadoghq.com/opentelemetry/schema_semantics/host_metadata/. + ## ## Valid values are 'first_resource' and 'config_or_system': ## - 'first_resource' picks the host metadata hostname from the resource attributes on the first OTLP payload that gets to the exporter. ## If the first payload lacks hostname-like attributes, it will fallback to 'config_or_system' behavior. - ## Do not use this hostname source if receiving data from multiple hosts. + ## **Do not use this hostname source if receiving data from multiple hosts**. ## ## - 'config_or_system' picks the host metadata hostname from the 'hostname' setting, falling back to system and cloud provider APIs. ## diff --git a/exporter/datadogexporter/examples/docker-stats.yaml b/exporter/datadogexporter/examples/docker-stats.yaml new file mode 100644 index 000000000000..7505275717ed --- /dev/null +++ b/exporter/datadogexporter/examples/docker-stats.yaml @@ -0,0 +1,37 @@ +receivers: + docker_stats: + endpoint: unix:///var/run/docker.sock # (default) + metrics: + container.network.io.usage.rx_packets: + enabled: true + container.network.io.usage.tx_packets: + enabled: true + container.cpu.usage.system: + enabled: true + container.memory.rss: + enabled: true + container.blockio.io_serviced_recursive: + enabled: true + container.uptime: + enabled: true + container.memory.hierarchical_memory_limit: + enabled: true + +processors: + batch: + send_batch_max_size: 1000 + send_batch_size: 100 + timeout: 10s + +exporters: + datadog: + api: + site: ${env:DD_SITE} + key: ${env:DD_API_KEY} + +service: + pipelines: + metrics: + receivers: [docker_stats] + processors: [batch] + exporters: [datadog] diff --git a/exporter/datadogexporter/examples/host-metadata.yaml b/exporter/datadogexporter/examples/host-metadata.yaml new file mode 100644 index 000000000000..4f9ac655329e --- /dev/null +++ b/exporter/datadogexporter/examples/host-metadata.yaml @@ -0,0 +1,43 @@ +receivers: + otlp: + protocols: + http: + endpoint: "localhost:4318" + grpc: + endpoint: "localhost:4317" +processors: + probabilistic_sampler: + sampling_percentage: 20 + batch: + send_batch_max_size: 1000 + send_batch_size: 100 + timeout: 10s + transform: + metric_statements: + - context: resource + statements: + - set(attributes["datadog.host.use_as_metadata"], true) + trace_statements: + - context: resource + statements: + - set(attributes["datadog.host.use_as_metadata"], true) +connectors: + datadog/connector: +exporters: + datadog: + api: + key: ${env:DD_API_KEY} +service: + pipelines: + traces: + receivers: [otlp] + processors: [batch, transform] + exporters: [datadog/connector] + traces/2: + receivers: [datadog/connector] + processors: [batch, probabilistic_sampler] + exporters: [datadog] + metrics: + receivers: [datadog/connector] + processors: [batch, transform] + exporters: [datadog] diff --git a/exporter/datadogexporter/examples/host-metrics.yaml b/exporter/datadogexporter/examples/host-metrics.yaml new file mode 100644 index 000000000000..125fef154363 --- /dev/null +++ b/exporter/datadogexporter/examples/host-metrics.yaml @@ -0,0 +1,46 @@ +receivers: + hostmetrics: + collection_interval: 10s + scrapers: + paging: + metrics: + system.paging.utilization: + enabled: true + cpu: + metrics: + system.cpu.utilization: + enabled: true + system.cpu.physical.count: + enabled: true + system.cpu.logical.count: + enabled: true + system.cpu.frequency: + enabled: true + disk: + filesystem: + metrics: + system.filesystem.utilization: + enabled: true + load: + memory: + network: + processes: + +processors: + batch: + send_batch_max_size: 1000 + send_batch_size: 100 + timeout: 10s + +exporters: + datadog: + api: + site: ${env:DD_SITE} + key: ${env:DD_API_KEY} + +service: + pipelines: + metrics: + receivers: [hostmetrics] + processors: [batch] + exporters: [datadog] diff --git a/exporter/datadogexporter/examples/k8s-chart/configmap.yaml b/exporter/datadogexporter/examples/k8s-chart/configmap.yaml index 15461930f6f4..494673be5ad4 100644 --- a/exporter/datadogexporter/examples/k8s-chart/configmap.yaml +++ b/exporter/datadogexporter/examples/k8s-chart/configmap.yaml @@ -40,7 +40,7 @@ data: include: # This will ensure that logs from the following path are collected. - /var/log/**/*otel-collector*/*.log - # # Comment out this block below to get access to system metrics regarding + # # Uncomment this block below to get access to system metrics regarding # # the OpenTelemetry Collector and its environment, such as spans or metrics # # processed, running and sent, queue sizes, uptime, k8s information # # and much more. diff --git a/exporter/datadogexporter/examples/k8s-chart/k8s-values.yaml b/exporter/datadogexporter/examples/k8s-chart/k8s-values.yaml new file mode 100644 index 000000000000..2115f684a5ca --- /dev/null +++ b/exporter/datadogexporter/examples/k8s-chart/k8s-values.yaml @@ -0,0 +1,92 @@ +mode: daemonset +presets: + kubernetesAttributes: + enabled: true +extraEnvs: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: OTEL_RESOURCE_ATTRIBUTES + value: "k8s.pod.ip=$(POD_IP)" +config: + processors: + k8sattributes: + passthrough: false + auth_type: "serviceAccount" + pod_association: + - sources: + - from: resource_attribute + name: k8s.pod.ip + extract: + metadata: + - k8s.pod.name + - k8s.pod.uid + - k8s.deployment.name + - k8s.node.name + - k8s.namespace.name + - k8s.pod.start_time + - k8s.replicaset.name + - k8s.replicaset.uid + - k8s.daemonset.name + - k8s.daemonset.uid + - k8s.job.name + - k8s.job.uid + - k8s.cronjob.name + - k8s.statefulset.name + - k8s.statefulset.uid + - container.image.name + - container.image.tag + - container.id + - k8s.container.name + - container.image.name + - container.image.tag + - container.id + labels: + - tag_name: kube_app_name + key: app.kubernetes.io/name + from: pod + - tag_name: kube_app_instance + key: app.kubernetes.io/instance + from: pod + - tag_name: kube_app_version + key: app.kubernetes.io/version + from: pod + - tag_name: kube_app_component + key: app.kubernetes.io/component + from: pod + - tag_name: kube_app_part_of + key: app.kubernetes.io/part-of + from: pod + - tag_name: kube_app_managed_by + key: app.kubernetes.io/managed-by + from: pod + resourcedetection: + detectors: [env, eks, ec2, system] + timeout: 2s + override: false + batch: + send_batch_max_size: 1000 + send_batch_size: 100 + timeout: 10s + exporters: + datadog: + api: + site: ${env:DD_SITE} + key: ${env:DD_API_KEY} + traces: + trace_buffer: 500 + service: + pipelines: + metrics: + receivers: [otlp] + processors: [batch, resourcedetection, k8sattributes] + exporters: [datadog] + traces: + receivers: [otlp] + processors: [batch, resourcedetection, k8sattributes] + exporters: [datadog] + logs: + receivers: [otlp] + processors: [batch, resourcedetection, k8sattributes] + exporters: [datadog] diff --git a/exporter/datadogexporter/examples/kafka.yaml b/exporter/datadogexporter/examples/kafka.yaml new file mode 100644 index 000000000000..0055c79e704a --- /dev/null +++ b/exporter/datadogexporter/examples/kafka.yaml @@ -0,0 +1,61 @@ +receivers: + otlp: + protocols: + http: + endpoint: "localhost:4318" + grpc: + endpoint: "localhost:4317" + filelog: + include_file_path: true + poll_interval: 500ms + include: + - /var/log/kafka/server.log + operators: + - type: json_parser + kafkametrics: + brokers: "${env:KAFKA_BROKER_ADDRESS}" + protocol_version: 2.0.0 + scrapers: + - brokers + - topics + - consumers + jmx: + jar_path: /path/to/opentelemetry-jmx-metrics.jar + endpoint: ${env:KAFKA_BROKER_JMX_ADDRESS} + target_system: kafka,jvm + jmx/consumer: + jar_path: /path/to/opentelemetry-jmx-metrics.jar + endpoint: ${env:KAFKA_CONSUMER_JMX_ADDRESS} + target_system: kafka-consumer + jmx/producer: + jar_path: /path/to/opentelemetry-jmx-metrics.jar + endpoint: ${env:KAFKA_PRODUCER_JMX_ADDRESS} + target_system: kafka-producer + +processors: + batch: + send_batch_max_size: 1000 + send_batch_size: 100 + timeout: 10s + attributes: + actions: + - key: ddtags + value: "source:kafka" + action: insert + +exporters: + datadog: + api: + site: ${env:DD_SITE} + key: ${env:DD_API_KEY} + +service: + pipelines: + metrics: + receivers: [otlp, kafkametrics, jmx, jmx/consumer, jmx/producer] + processors: [batch] + exporters: [datadog] + logs: + receivers: [otlp, filelog] + processors: [batch, attributes] + exporters: [datadog] diff --git a/exporter/datadogexporter/examples/logs.yaml b/exporter/datadogexporter/examples/logs.yaml new file mode 100644 index 000000000000..15d9ba66c001 --- /dev/null +++ b/exporter/datadogexporter/examples/logs.yaml @@ -0,0 +1,36 @@ +receivers: + filelog: + include_file_path: true + poll_interval: 500ms + include: + - /var/log/*/app.log + operators: + - type: json_parser + # If your logs are not json, please make sure that you are using the regex_parser to parse out the timestamp into attributes.time. + # - type: regex_parser + # id: parser-timestamp + # ... + # Layout needs to match log timestamp format. If this section is removed, timestamp will correspond to time log was intake by DD. + - type: time_parser + parse_from: attributes.time + layout: '%Y-%m-%dT%H:%M:%S%z' + +processors: + batch: + send_batch_max_size: 1000 + send_batch_size: 100 + timeout: 10s + +exporters: + datadog: + idle_conn_timeout: 10s + api: + site: ${env:DD_SITE} + key: ${env:DD_API_KEY} + +service: + pipelines: + logs: + receivers: [filelog] + processors: [batch] + exporters: [datadog] diff --git a/exporter/datadogexporter/examples/ootb-ec2.yaml b/exporter/datadogexporter/examples/ootb-ec2.yaml new file mode 100644 index 000000000000..69be7f66deb3 --- /dev/null +++ b/exporter/datadogexporter/examples/ootb-ec2.yaml @@ -0,0 +1,113 @@ +receivers: + otlp: + protocols: + http: + endpoint: "localhost:4318" + grpc: + endpoint: "localhost:4317" + + + hostmetrics: + collection_interval: 10s + scrapers: + paging: + metrics: + system.paging.utilization: + enabled: true + cpu: + metrics: + system.cpu.utilization: + enabled: true + system.cpu.physical.count: + enabled: true + system.cpu.logical.count: + enabled: true + system.cpu.frequency: + enabled: true + disk: + filesystem: + metrics: + system.filesystem.utilization: + enabled: true + load: + memory: + network: + processes: + + prometheus: + config: + scrape_configs: + - job_name: 'otelcol' + scrape_interval: 10s + static_configs: + - targets: ['0.0.0.0:8888'] + + filelog: + include_file_path: true + poll_interval: 500ms + include: + - /var/log/*/app.log + operators: + - type: json_parser + # If your logs are not json, please make sure that you are using the regex_parser to parse out the timestamp into attributes.time. + # - type: regex_parser + # id: parser-timestamp + # ... + # Layout needs to match log timestamp format. If this section is removed, timestamp will correspond to time log was intake by DD. + - type: time_parser + parse_from: attributes.time + layout: '%Y-%m-%dT%H:%M:%S%z' + + +processors: + batch: + send_batch_max_size: 1000 + send_batch_size: 100 + timeout: 10s + memory_limiter: + check_interval: 1s + limit_mib: 4000 + spike_limit_mib: 800 + resourcedetection: + detectors: [env, ec2, system] + system: + resource_attributes: + os.description: + enabled: true + host.arch: + enabled: true + host.cpu.vendor.id: + enabled: true + host.cpu.family: + enabled: true + host.cpu.model.id: + enabled: true + host.cpu.model.name: + enabled: true + host.cpu.stepping: + enabled: true + host.cpu.cache.l2.size: + enabled: true + +exporters: + datadog: + api: + site: ${env:DD_SITE} + key: ${env:DD_API_KEY} + traces: + trace_buffer: 500 + +service: + pipelines: + metrics: + receivers: [otlp, hostmetrics] + processors: [batch, resourcedetection, memory_limiter] + exporters: [datadog] + traces: + receivers: [otlp] + processors: [batch, resourcedetection, memory_limiter] + exporters: [datadog] + logs: + receivers: [otlp, filelog] + processors: [batch, resourcedetection, memory_limiter] + exporters: [datadog] diff --git a/exporter/datadogexporter/examples/otlp.yaml b/exporter/datadogexporter/examples/otlp.yaml new file mode 100644 index 000000000000..a251246c7fc1 --- /dev/null +++ b/exporter/datadogexporter/examples/otlp.yaml @@ -0,0 +1,35 @@ +receivers: + otlp: + protocols: + http: + endpoint: "localhost:4318" + grpc: + endpoint: "localhost:4317" + + +processors: + batch: + send_batch_max_size: 1000 + send_batch_size: 100 + timeout: 10s + +exporters: + datadog: + api: + site: ${env:DD_SITE} + key: ${env:DD_API_KEY} + +service: + pipelines: + metrics: + receivers: [otlp] + processors: [batch] + exporters: [datadog] + traces: + receivers: [otlp] + processors: [batch] + exporters: [datadog] + logs: + receivers: [otlp] + processors: [batch] + exporters: [datadog] diff --git a/exporter/datadogexporter/examples/trace-metrics.yaml b/exporter/datadogexporter/examples/trace-metrics.yaml new file mode 100644 index 000000000000..ef83f5fe8570 --- /dev/null +++ b/exporter/datadogexporter/examples/trace-metrics.yaml @@ -0,0 +1,34 @@ +receivers: + otlp: + protocols: + http: + endpoint: "localhost:4318" + grpc: + endpoint: "localhost:4317" +processors: + probabilistic_sampler: + sampling_percentage: 20 + batch: + send_batch_max_size: 1000 + send_batch_size: 100 + timeout: 10s +connectors: + datadog/connector: +exporters: + datadog: + api: + key: ${env:DD_API_KEY} +service: + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [datadog/connector] + traces/2: + receivers: [datadog/connector] + processors: [batch, probabilistic_sampler] + exporters: [datadog] + metrics: + receivers: [datadog/connector] + processors: [batch] + exporters: [datadog] diff --git a/exporter/datadogexporter/examples_test.go b/exporter/datadogexporter/examples_test.go index 8cf771cff15c..0da3f50a693d 100644 --- a/exporter/datadogexporter/examples_test.go +++ b/exporter/datadogexporter/examples_test.go @@ -10,20 +10,26 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/otelcol" "go.opentelemetry.io/collector/otelcol/otelcoltest" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/batchprocessor" + "go.opentelemetry.io/collector/processor/memorylimiterprocessor" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/otlpreceiver" "gopkg.in/yaml.v2" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver" ) // TestExamples ensures that the configuration in the YAML files can be loaded by the collector. It checks: @@ -36,6 +42,10 @@ func TestExamples(t *testing.T) { files, err := os.ReadDir(folder) require.NoError(t, err) for _, f := range files { + if f.Name() == "kafka.yaml" { + // skip validation, as it requires jar file. + continue + } if f.IsDir() { continue } @@ -92,14 +102,24 @@ func newTestComponents(t *testing.T) otelcol.Factories { hostmetricsreceiver.NewFactory(), dockerstatsreceiver.NewFactory(), filelogreceiver.NewFactory(), + prometheusreceiver.NewFactory(), }..., ) require.NoError(t, err) factories.Processors, err = processor.MakeFactoryMap( []processor.Factory{ batchprocessor.NewFactory(), + memorylimiterprocessor.NewFactory(), k8sattributesprocessor.NewFactory(), resourcedetectionprocessor.NewFactory(), + probabilisticsamplerprocessor.NewFactory(), + transformprocessor.NewFactory(), + }..., + ) + require.NoError(t, err) + factories.Connectors, err = connector.MakeFactoryMap( + []connector.Factory{ + datadogconnector.NewFactory(), }..., ) require.NoError(t, err) diff --git a/exporter/datadogexporter/factory.go b/exporter/datadogexporter/factory.go index 017e9fd0512a..a630cfc9246b 100644 --- a/exporter/datadogexporter/factory.go +++ b/exporter/datadogexporter/factory.go @@ -6,14 +6,22 @@ package datadogexporter // import "github.com/open-telemetry/opentelemetry-colle import ( "context" "fmt" + "runtime" "sync" "time" + pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" "github.com/DataDog/datadog-agent/pkg/trace/agent" + "github.com/DataDog/datadog-agent/pkg/trace/telemetry" + "github.com/DataDog/datadog-agent/pkg/trace/timing" + "github.com/DataDog/datadog-agent/pkg/trace/writer" "github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata" + "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes" "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/confignet" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -23,13 +31,15 @@ import ( "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" "go.uber.org/zap" + "google.golang.org/protobuf/proto" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry" ) -var mertricExportNativeClientFeatureGate = featuregate.GlobalRegistry().MustRegister( +var metricExportNativeClientFeatureGate = featuregate.GlobalRegistry().MustRegister( "exporter.datadogexporter.metricexportnativeclient", featuregate.StageBeta, featuregate.WithRegisterDescription("When enabled, metric export in datadogexporter uses native Datadog client APIs instead of Zorkian APIs."), @@ -38,23 +48,23 @@ var mertricExportNativeClientFeatureGate = featuregate.GlobalRegistry().MustRegi // noAPMStatsFeatureGate causes the trace consumer to skip APM stats computation. var noAPMStatsFeatureGate = featuregate.GlobalRegistry().MustRegister( "exporter.datadogexporter.DisableAPMStats", - featuregate.StageAlpha, + featuregate.StageBeta, featuregate.WithRegisterDescription("Datadog Exporter will not compute APM Stats"), ) // isMetricExportV2Enabled returns true if metric export in datadogexporter uses native Datadog client APIs, false if it uses Zorkian APIs func isMetricExportV2Enabled() bool { - return mertricExportNativeClientFeatureGate.IsEnabled() + return metricExportNativeClientFeatureGate.IsEnabled() } // enableNativeMetricExport switches metric export to call native Datadog APIs instead of Zorkian APIs. func enableNativeMetricExport() error { - return featuregate.GlobalRegistry().Set(mertricExportNativeClientFeatureGate.ID(), true) + return featuregate.GlobalRegistry().Set(metricExportNativeClientFeatureGate.ID(), true) } // enableZorkianMetricExport switches metric export to call Zorkian APIs instead of native Datadog APIs. func enableZorkianMetricExport() error { - return featuregate.GlobalRegistry().Set(mertricExportNativeClientFeatureGate.ID(), false) + return featuregate.GlobalRegistry().Set(metricExportNativeClientFeatureGate.ID(), false) } const metadataReporterPeriod = 30 * time.Minute @@ -77,6 +87,10 @@ type factory struct { reporter *inframetadata.Reporter reporterErr error + onceAttributesTranslator sync.Once + attributesTranslator *attributes.Translator + attributesErr error + wg sync.WaitGroup // waits for agent to exit registry *featuregate.Registry @@ -89,6 +103,13 @@ func (f *factory) SourceProvider(set component.TelemetrySettings, configHostname return f.sourceProvider, f.providerErr } +func (f *factory) AttributesTranslator(set component.TelemetrySettings) (*attributes.Translator, error) { + f.onceAttributesTranslator.Do(func() { + f.attributesTranslator, f.attributesErr = attributes.NewTranslator(set) + }) + return f.attributesTranslator, f.attributesErr +} + // Reporter builds and returns an *inframetadata.Reporter. func (f *factory) Reporter(params exporter.CreateSettings, pcfg hostmetadata.PusherConfig) (*inframetadata.Reporter, error) { f.onceReporter.Do(func() { @@ -117,8 +138,8 @@ func (f *factory) StopReporter() { }) } -func (f *factory) TraceAgent(ctx context.Context, params exporter.CreateSettings, cfg *Config, sourceProvider source.Provider) (*agent.Agent, error) { - agnt, err := newTraceAgent(ctx, params, cfg, sourceProvider) +func (f *factory) TraceAgent(ctx context.Context, params exporter.CreateSettings, cfg *Config, sourceProvider source.Provider, attrsTranslator *attributes.Translator) (*agent.Agent, error) { + agnt, err := newTraceAgent(ctx, params, cfg, sourceProvider, datadog.InitializeMetricClient(params.MeterProvider, datadog.ExporterSourceTag), attrsTranslator) if err != nil { return nil, err } @@ -146,8 +167,9 @@ func NewFactory() exporter.Factory { return newFactoryWithRegistry(featuregate.GlobalRegistry()) } -func defaulttimeoutSettings() exporterhelper.TimeoutSettings { - return exporterhelper.TimeoutSettings{ +func defaultClientConfig() confighttp.ClientConfig { + // do not use NewDefaultClientConfig for backwards-compatibility + return confighttp.ClientConfig{ Timeout: 15 * time.Second, } } @@ -155,16 +177,16 @@ func defaulttimeoutSettings() exporterhelper.TimeoutSettings { // createDefaultConfig creates the default exporter configuration func (f *factory) createDefaultConfig() component.Config { return &Config{ - TimeoutSettings: defaulttimeoutSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), + ClientConfig: defaultClientConfig(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), + QueueSettings: exporterhelper.NewDefaultQueueSettings(), API: APIConfig{ Site: "datadoghq.com", }, Metrics: MetricsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://api.datadoghq.com", }, DeltaTTL: 3600, @@ -186,14 +208,14 @@ func (f *factory) createDefaultConfig() component.Config { }, Traces: TracesConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://trace.agent.datadoghq.com", }, IgnoreResources: []string{}, }, Logs: LogsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://http-intake.logs.datadoghq.com", }, }, @@ -216,6 +238,37 @@ func checkAndCastConfig(c component.Config, logger *zap.Logger) *Config { return cfg } +func (f *factory) consumeStatsPayload(ctx context.Context, statsIn <-chan []byte, statsToAgent chan<- *pb.StatsPayload, tracerVersion string, agentVersion string, logger *zap.Logger) { + for i := 0; i < runtime.NumCPU(); i++ { + f.wg.Add(1) + go func() { + defer f.wg.Done() + for { + select { + case <-ctx.Done(): + return + case msg := <-statsIn: + sp := &pb.StatsPayload{} + + err := proto.Unmarshal(msg, sp) + if err != nil { + logger.Error("failed to unmarshal stats payload", zap.Error(err)) + continue + } + for _, csp := range sp.Stats { + if csp.TracerVersion == "" { + csp.TracerVersion = tracerVersion + } + } + // The DD Connector doesn't set the agent version, so we'll set it here + sp.AgentVersion = agentVersion + statsToAgent <- sp + } + } + }() + } +} + // createMetricsExporter creates a metrics exporter based on this config. func (f *factory) createMetricsExporter( ctx context.Context, @@ -223,7 +276,6 @@ func (f *factory) createMetricsExporter( c component.Config, ) (exporter.Metrics, error) { cfg := checkAndCastConfig(c, set.TelemetrySettings.Logger) - hostProvider, err := f.SourceProvider(set.TelemetrySettings, cfg.Hostname) if err != nil { return nil, fmt.Errorf("failed to build hostname provider: %w", err) @@ -231,13 +283,30 @@ func (f *factory) createMetricsExporter( ctx, cancel := context.WithCancel(ctx) // cancel() runs on shutdown + + attrsTranslator, err := f.AttributesTranslator(set.TelemetrySettings) + if err != nil { + cancel() + return nil, fmt.Errorf("failed to build attributes translator: %w", err) + } + var pushMetricsFn consumer.ConsumeMetricsFunc - traceagent, err := f.TraceAgent(ctx, set, cfg, hostProvider) + acfg, err := newTraceAgentConfig(ctx, set, cfg, hostProvider, attrsTranslator) if err != nil { cancel() - return nil, fmt.Errorf("failed to start trace-agent: %w", err) + return nil, err } + statsToAgent := make(chan *pb.StatsPayload) + metricsClient := datadog.InitializeMetricClient(set.MeterProvider, datadog.ExporterSourceTag) + timingReporter := timing.New(metricsClient) + statsWriter := writer.NewStatsWriter(acfg, statsToAgent, telemetry.NewNoopCollector(), metricsClient, timingReporter) + + set.Logger.Debug("Starting Datadog Trace-Agent StatsWriter") + go statsWriter.Run() + statsIn := make(chan []byte, 1000) + statsv := set.BuildInfo.Command + set.BuildInfo.Version + f.consumeStatsPayload(ctx, statsIn, statsToAgent, statsv, acfg.AgentVersion, set.Logger) pcfg := newMetadataConfigfromConfig(cfg) metadataReporter, err := f.Reporter(set, pcfg) if err != nil { @@ -264,7 +333,7 @@ func (f *factory) createMetricsExporter( return nil } } else { - exp, metricsErr := newMetricsExporter(ctx, set, cfg, &f.onceMetadata, hostProvider, traceagent, metadataReporter) + exp, metricsErr := newMetricsExporter(ctx, set, cfg, acfg, &f.onceMetadata, attrsTranslator, hostProvider, statsToAgent, metadataReporter, statsIn) if metricsErr != nil { cancel() // first cancel context f.wg.Wait() // then wait for shutdown @@ -281,13 +350,21 @@ func (f *factory) createMetricsExporter( // explicitly disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0 * time.Second}), // We use our own custom mechanism for retries, since we hit several endpoints. - exporterhelper.WithRetry(exporterhelper.RetrySettings{Enabled: false}), + exporterhelper.WithRetry(configretry.BackOffConfig{Enabled: false}), // The metrics remapping code mutates data exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: true}), exporterhelper.WithQueue(cfg.QueueSettings), exporterhelper.WithShutdown(func(context.Context) error { - cancel() + cancel() // first cancel context + f.wg.Wait() // then wait for shutdown f.StopReporter() + statsWriter.Stop() + if statsIn != nil { + close(statsIn) + } + if statsToAgent != nil { + close(statsToAgent) + } return nil }), ) @@ -305,6 +382,13 @@ func (f *factory) createTracesExporter( c component.Config, ) (exporter.Traces, error) { cfg := checkAndCastConfig(c, set.TelemetrySettings.Logger) + if noAPMStatsFeatureGate.IsEnabled() { + set.Logger.Info( + "Trace metrics are now disabled in the Datadog Exporter by default. To continue receiving Trace Metrics, configure the Datadog Connector or disable the feature gate.", + zap.String("documentation", "https://docs.datadoghq.com/opentelemetry/guide/migration/"), + zap.String("feature gate ID", noAPMStatsFeatureGate.ID()), + ) + } var ( pusher consumer.ConsumeTracesFunc @@ -317,7 +401,14 @@ func (f *factory) createTracesExporter( } ctx, cancel := context.WithCancel(ctx) // cancel() runs on shutdown - traceagent, err := f.TraceAgent(ctx, set, cfg, hostProvider) + + attrsTranslator, err := f.AttributesTranslator(set.TelemetrySettings) + if err != nil { + cancel() + return nil, fmt.Errorf("failed to build attributes translator: %w", err) + } + + traceagent, err := f.TraceAgent(ctx, set, cfg, hostProvider, attrsTranslator) if err != nil { cancel() return nil, fmt.Errorf("failed to start trace-agent: %w", err) @@ -375,7 +466,7 @@ func (f *factory) createTracesExporter( // explicitly disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0 * time.Second}), // We don't do retries on traces because of deduping concerns on APM Events. - exporterhelper.WithRetry(exporterhelper.RetrySettings{Enabled: false}), + exporterhelper.WithRetry(configretry.BackOffConfig{Enabled: false}), exporterhelper.WithQueue(cfg.QueueSettings), exporterhelper.WithShutdown(stop), ) @@ -404,6 +495,12 @@ func (f *factory) createLogsExporter( return nil, fmt.Errorf("failed to build host metadata reporter: %w", err) } + attributesTranslator, err := f.AttributesTranslator(set.TelemetrySettings) + if err != nil { + cancel() + return nil, fmt.Errorf("failed to build attributes translator: %w", err) + } + if cfg.OnlyMetadata { // only host metadata needs to be sent, once. pusher = func(_ context.Context, td plog.Logs) error { @@ -418,7 +515,7 @@ func (f *factory) createLogsExporter( return nil } } else { - exp, err := newLogsExporter(ctx, set, cfg, &f.onceMetadata, hostProvider, metadataReporter) + exp, err := newLogsExporter(ctx, set, cfg, &f.onceMetadata, attributesTranslator, hostProvider, metadataReporter) if err != nil { cancel() f.wg.Wait() // then wait for shutdown @@ -433,7 +530,7 @@ func (f *factory) createLogsExporter( pusher, // explicitly disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0 * time.Second}), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithQueue(cfg.QueueSettings), exporterhelper.WithShutdown(func(context.Context) error { cancel() diff --git a/exporter/datadogexporter/factory_test.go b/exporter/datadogexporter/factory_test.go index 4f440810414a..5e65c366a279 100644 --- a/exporter/datadogexporter/factory_test.go +++ b/exporter/datadogexporter/factory_test.go @@ -17,6 +17,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/confignet" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/exportertest" @@ -70,16 +71,16 @@ func TestCreateDefaultConfig(t *testing.T) { cfg := factory.CreateDefaultConfig() assert.Equal(t, &Config{ - TimeoutSettings: defaulttimeoutSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), + ClientConfig: defaultClientConfig(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), + QueueSettings: exporterhelper.NewDefaultQueueSettings(), API: APIConfig{ Site: "datadoghq.com", }, Metrics: MetricsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://api.datadoghq.com", }, DeltaTTL: 3600, @@ -97,13 +98,13 @@ func TestCreateDefaultConfig(t *testing.T) { }, Traces: TracesConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://trace.agent.datadoghq.com", }, IgnoreResources: []string{}, }, Logs: LogsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://http-intake.logs.datadoghq.com", }, }, @@ -131,9 +132,9 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "default"), expected: &Config{ - TimeoutSettings: defaulttimeoutSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), + ClientConfig: defaultClientConfig(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), + QueueSettings: exporterhelper.NewDefaultQueueSettings(), API: APIConfig{ Key: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", Site: "datadoghq.com", @@ -141,7 +142,7 @@ func TestLoadConfig(t *testing.T) { }, Metrics: MetricsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://api.datadoghq.com", }, DeltaTTL: 3600, @@ -159,13 +160,13 @@ func TestLoadConfig(t *testing.T) { }, Traces: TracesConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://trace.agent.datadoghq.com", }, IgnoreResources: []string{}, }, Logs: LogsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://http-intake.logs.datadoghq.com", }, }, @@ -179,9 +180,9 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "api"), expected: &Config{ - TimeoutSettings: defaulttimeoutSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), + ClientConfig: defaultClientConfig(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), + QueueSettings: exporterhelper.NewDefaultQueueSettings(), TagsConfig: TagsConfig{ Hostname: "customhostname", }, @@ -191,7 +192,7 @@ func TestLoadConfig(t *testing.T) { FailOnInvalidKey: true, }, Metrics: MetricsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://api.datadoghq.eu", }, DeltaTTL: 3600, @@ -208,7 +209,7 @@ func TestLoadConfig(t *testing.T) { }, }, Traces: TracesConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://trace.agent.datadoghq.eu", }, SpanNameRemappings: map[string]string{ @@ -220,7 +221,7 @@ func TestLoadConfig(t *testing.T) { TraceBuffer: 10, }, Logs: LogsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://http-intake.logs.datadoghq.eu", }, }, @@ -234,9 +235,9 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "api2"), expected: &Config{ - TimeoutSettings: defaulttimeoutSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), + ClientConfig: defaultClientConfig(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), + QueueSettings: exporterhelper.NewDefaultQueueSettings(), TagsConfig: TagsConfig{ Hostname: "customhostname", }, @@ -246,7 +247,7 @@ func TestLoadConfig(t *testing.T) { FailOnInvalidKey: false, }, Metrics: MetricsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://api.datadoghq.test", }, DeltaTTL: 3600, @@ -263,7 +264,7 @@ func TestLoadConfig(t *testing.T) { }, }, Traces: TracesConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://trace.agent.datadoghq.test", }, SpanNameRemappings: map[string]string{ @@ -273,7 +274,7 @@ func TestLoadConfig(t *testing.T) { IgnoreResources: []string{}, }, Logs: LogsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "https://http-intake.logs.datadoghq.test", }, }, @@ -410,7 +411,7 @@ func TestCreateAPIMetricsExporter(t *testing.T) { require.NoError(t, component.UnmarshalConfig(sub, cfg)) c := cfg.(*Config) - c.Metrics.TCPAddr.Endpoint = server.URL + c.Metrics.TCPAddrConfig.Endpoint = server.URL c.HostMetadata.Enabled = false ctx := context.Background() @@ -444,7 +445,7 @@ func TestCreateAPIExporterFailOnInvalidKey_Zorkian(t *testing.T) { // Use the mock server for API key validation c := cfg.(*Config) - c.Metrics.TCPAddr.Endpoint = server.URL + c.Metrics.TCPAddrConfig.Endpoint = server.URL c.HostMetadata.Enabled = false t.Run("true", func(t *testing.T) { @@ -483,7 +484,7 @@ func TestCreateAPIExporterFailOnInvalidKey_Zorkian(t *testing.T) { exportertest.NewNopCreateSettings(), cfg, ) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exp) texp, err := factory.CreateTracesExporter( @@ -491,7 +492,7 @@ func TestCreateAPIExporterFailOnInvalidKey_Zorkian(t *testing.T) { exportertest.NewNopCreateSettings(), cfg, ) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, texp) lexp, err := factory.CreateLogsExporter( @@ -499,7 +500,7 @@ func TestCreateAPIExporterFailOnInvalidKey_Zorkian(t *testing.T) { exportertest.NewNopCreateSettings(), cfg, ) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, lexp) }) } @@ -524,7 +525,7 @@ func TestCreateAPIExporterFailOnInvalidKey(t *testing.T) { // Use the mock server for API key validation c := cfg.(*Config) - c.Metrics.TCPAddr.Endpoint = server.URL + c.Metrics.TCPAddrConfig.Endpoint = server.URL c.HostMetadata.Enabled = false t.Run("true", func(t *testing.T) { @@ -563,7 +564,7 @@ func TestCreateAPIExporterFailOnInvalidKey(t *testing.T) { exportertest.NewNopCreateSettings(), cfg, ) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exp) texp, err := factory.CreateTracesExporter( @@ -571,7 +572,7 @@ func TestCreateAPIExporterFailOnInvalidKey(t *testing.T) { exportertest.NewNopCreateSettings(), cfg, ) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, texp) lexp, err := factory.CreateLogsExporter( @@ -579,7 +580,7 @@ func TestCreateAPIExporterFailOnInvalidKey(t *testing.T) { exportertest.NewNopCreateSettings(), cfg, ) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, lexp) }) } @@ -598,7 +599,7 @@ func TestCreateAPILogsExporter(t *testing.T) { require.NoError(t, component.UnmarshalConfig(sub, cfg)) c := cfg.(*Config) - c.Metrics.TCPAddr.Endpoint = server.URL + c.Metrics.TCPAddrConfig.Endpoint = server.URL c.HostMetadata.Enabled = false ctx := context.Background() @@ -619,13 +620,13 @@ func TestOnlyMetadata(t *testing.T) { factory := NewFactory() ctx := context.Background() cfg := &Config{ - TimeoutSettings: defaulttimeoutSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), + ClientConfig: defaultClientConfig(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), + QueueSettings: exporterhelper.NewDefaultQueueSettings(), API: APIConfig{Key: "notnull"}, - Metrics: MetricsConfig{TCPAddr: confignet.TCPAddr{Endpoint: server.URL}}, - Traces: TracesConfig{TCPAddr: confignet.TCPAddr{Endpoint: server.URL}}, + Metrics: MetricsConfig{TCPAddrConfig: confignet.TCPAddrConfig{Endpoint: server.URL}}, + Traces: TracesConfig{TCPAddrConfig: confignet.TCPAddrConfig{Endpoint: server.URL}}, OnlyMetadata: true, HostMetadata: HostMetadataConfig{ diff --git a/exporter/datadogexporter/generated_component_test.go b/exporter/datadogexporter/generated_component_test.go new file mode 100644 index 000000000000..067e8b463c87 --- /dev/null +++ b/exporter/datadogexporter/generated_component_test.go @@ -0,0 +1,140 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package datadogexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/datadogexporter/go.mod b/exporter/datadogexporter/go.mod index a9a249989920..27d530f64cba 100644 --- a/exporter/datadogexporter/go.mod +++ b/exporter/datadogexporter/go.mod @@ -1,235 +1,300 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter -go 1.20 +go 1.21 require ( - github.com/DataDog/agent-payload/v5 v5.0.89 - github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1 - github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1 - github.com/DataDog/datadog-api-client-go/v2 v2.18.0 - github.com/DataDog/gohai v0.0.0-20220718130825-1776f9beb9cc - github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1 - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1 - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 - github.com/DataDog/sketches-go v1.4.3 - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0 - github.com/aws/aws-sdk-go v1.47.10 - github.com/cenkalti/backoff/v4 v4.2.1 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confignet v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 - go.opentelemetry.io/collector/otelcol v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/processor v0.89.0 - go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 - go.opentelemetry.io/collector/receiver v0.89.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 - google.golang.org/protobuf v1.31.0 + github.com/DataDog/agent-payload/v5 v5.0.111 + github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae + github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae + github.com/DataDog/datadog-api-client-go/v2 v2.24.0 + github.com/DataDog/datadog-go/v5 v5.5.0 + github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee + github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.4 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4 + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4 + github.com/DataDog/sketches-go v1.4.4 + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0 + github.com/aws/aws-sdk-go v1.51.17 + github.com/cenkalti/backoff/v4 v4.3.0 + github.com/google/go-cmp v0.6.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configauth v0.98.0 + go.opentelemetry.io/collector/config/configcompression v1.5.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/confignet v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/connector v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/featuregate v1.5.0 + go.opentelemetry.io/collector/otelcol v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0 + go.opentelemetry.io/collector/receiver v0.98.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + google.golang.org/protobuf v1.33.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 - k8s.io/apimachinery v0.28.4 - k8s.io/client-go v0.28.4 + k8s.io/apimachinery v0.29.3 + k8s.io/client-go v0.29.3 ) require ( - cloud.google.com/go/compute v1.23.0 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect - github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-go/v5 v5.1.1 // indirect - github.com/DataDog/go-sqllexer v0.0.8 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 // indirect + github.com/Code-Hex/go-generics-cache v1.3.1 // indirect + github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/go-sqllexer v0.0.9 // indirect github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect - github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-00010101000000-000000000000 // indirect - github.com/antonmedv/expr v1.15.3 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect + github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20240415183253-230331014d2c // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect - github.com/containerd/cgroups/v3 v3.0.2 // indirect + github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa // indirect + github.com/containerd/cgroups/v3 v3.0.3 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.7+incompatible // indirect - github.com/docker/go-connections v0.4.0 // indirect + github.com/dennwc/varint v1.0.0 // indirect + github.com/digitalocean/godo v1.109.0 // indirect + github.com/distribution/reference v0.5.0 // indirect + github.com/docker/docker v25.0.5+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect - github.com/fatih/color v1.14.1 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/envoyproxy/go-control-plane v0.12.0 // indirect + github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect + github.com/expr-lang/expr v1.16.3 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logfmt/logfmt v0.6.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/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.20.4 // indirect + github.com/go-openapi/swag v0.22.9 // indirect + github.com/go-resty/resty/v2 v2.11.0 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/go-zookeeper/zk v1.0.3 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/godbus/dbus/v5 v5.0.6 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-jwt/jwt/v5 v5.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.6.0 // indirect + github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.4.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect - github.com/hashicorp/consul/api v1.25.1 // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.2 // indirect + github.com/gophercloud/gophercloud v1.8.0 // indirect + github.com/gorilla/websocket v1.5.0 // indirect + github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/hashicorp/consul/api v1.28.2 // indirect + github.com/hashicorp/cronexpr v1.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-retryablehttp v0.7.4 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702 // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/imdario/mergo v0.3.15 // indirect + github.com/hetznercloud/hcloud-go/v2 v2.6.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 // indirect + github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.11 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect + github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/karrick/godirwalk v1.17.0 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect + github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect + github.com/kylelemons/godebug v1.1.0 // indirect github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 // indirect github.com/leoluk/perflib_exporter v0.2.1 // indirect + github.com/linode/linodego v1.30.0 // indirect github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/miekg/dns v1.1.58 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect + github.com/mitchellh/hashstructure/v2 v2.0.2 // 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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.89.0 // indirect + github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.98.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/runtime-spec v1.1.0-rc.3 // indirect github.com/openshift/api v3.9.0+incompatible // indirect github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect github.com/outcaste-io/ristretto v0.2.1 // indirect + github.com/ovh/go-ovh v1.4.3 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/philhofer/fwd v1.1.2 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.52.2 // indirect + github.com/prometheus/common/sigv4 v0.1.0 // indirect + github.com/prometheus/procfs v0.13.0 // indirect + github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e // indirect github.com/rs/cors v1.10.1 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 // indirect github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // 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/stretchr/objx v0.5.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect github.com/tinylib/msgp v1.1.9 // 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 + github.com/valyala/fastjson v1.6.4 // indirect + github.com/vultr/govultr/v2 v2.17.2 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zorkian/go-datadog-api v2.30.0+incompatible // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.89.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/connector v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/service v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk v1.20.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/collector/service v0.98.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.25.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.15.0 // indirect - gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/grpc v1.59.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.19.0 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/api v0.168.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.28.4 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect + k8s.io/api v0.29.3 // indirect + k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) @@ -255,8 +320,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filel replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza => ../../pkg/stanza -replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage => ../../extension/storage - replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil => ../../pkg/pdatautil replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter => ../../internal/filter @@ -288,4 +351,24 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/docke replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => ../../pkg/golden +replace github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector => ../../connector/datadogconnector + +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus => ../../pkg/translator/prometheus + +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter => ../prometheusremotewriteexporter + +replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor => ../../processor/probabilisticsamplerprocessor + +replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver => ../../receiver/prometheusreceiver + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog => ../../internal/datadog + +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite => ../../pkg/translator/prometheusremotewrite + +replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor => ../../processor/tailsamplingprocessor + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage => ../../extension/storage + +replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor => ../../processor/transformprocessor + replace github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws => ../../override/aws diff --git a/exporter/datadogexporter/go.sum b/exporter/datadogexporter/go.sum index aa7ae13fda12..13efcd6f98b9 100644 --- a/exporter/datadogexporter/go.sum +++ b/exporter/datadogexporter/go.sum @@ -19,8 +19,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= 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= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= @@ -34,11 +34,25 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 h1:n1DH8TPV4qqPTje2RcUBYwtrTWlabVp4n46+74X2pn4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0/go.mod h1:HDcZnuGbiyppErN6lB+idp4CKhjbc8gwjto6OPpyggM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 h1:MxA59PGoCFb+vCwRQi3PhQEwHj4+r2dhuv9HG+vM7iM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0/go.mod h1:uYt4CfhkJA9o0FN7jfE5minm/i4nUE4MjGUJkzB6Zs8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 h1:PTFGRSlMKCQelWwxUyYVEUqseBJVemLyqWJjvMyt0do= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0/go.mod h1:LRr2FzBTQlONPPa5HREE5+RjSCTXl7BwOvYOaWTqCaI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 h1:bXwSugBiSbgtz7rOtbfGf+woewp4f06orW9OP5BjHLA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0/go.mod h1:Y/HgrePTmGy9HjdSGTqZNa+apUpTVIEVKXJyARP2lrk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1 h1:7CBQ+Ei8SP2c6ydQTGCCrS35bDxgTMfoP2miAwK++OU= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1/go.mod h1:c/wcGeGx5FUPbM/JltUYHZcKmigwyVLJlDq+4HdtXaw= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= @@ -46,71 +60,82 @@ github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSY github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/agent-payload/v5 v5.0.89 h1:uuLWf/exyNYBnheG9OH2dOWZpCJvaEHX3W9CAd8KarU= -github.com/DataDog/agent-payload/v5 v5.0.89/go.mod h1:oQZi1VZp1e3QvlSUX4iphZCpJaFepUxWq0hNXxihKBM= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1 h1:W6IVI3zWwoJGcFagJ/kwltFL1IIErBZzcBy994PQsQE= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1/go.mod h1:A4nLJvxlg6BO/8/zg81til9yT0uRPuXDFMAzDMpmgn4= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1 h1:zDhs0MnT72cZOxxbPjkGI00NMYgsydOanBX3GZHuS1I= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1/go.mod h1:HvK26YCxg6MfYvPJgpHC7nSjw6DTpNhd75Wlb0GAvis= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1 h1:EywptZStgHbDWLScnHfaCj6QNb698DY68pCnPEQrsts= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1/go.mod h1:Vc+snp0Bey4MrrJyiV2tVxxJb6BmLomPvN1RgAvjGaQ= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1 h1:A1uj4IMFs4rWp5LRalsqqnoC1f7QuYuN/b6/L7k4KCc= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1/go.mod h1:Q84EzSKpY/HtasusZM4ZPuYqbPQEbmIcAGzd7tXUX1I= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1 h1:iJSVz+YsndcMA/yYNih/qmuvwD1AR7IYX0cXXePpeys= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1/go.mod h1:JUOECuM5XcoxjEPs30C568vGBWtqScjnsC2KXY1OQ7Y= -github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1 h1:NK2kcRdv/r0WycAlGD2JFSmOcNvazzilPvZzk3l105g= -github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1/go.mod h1:RMBDVajNx78CpFHnbat0aIGcwVQZp8s+smRlcJkvZGg= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1 h1:SgaCKuX9e3O5eLRIr+zqW1dlIw/TP3RDKQZUa2FfF8c= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1/go.mod h1:eTXti9mx7qhkoi+Qg3mMmvVY5McghUUgsf4Hrk9zY8k= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1 h1:aCDYC/AkDS/EOm4GV1bFmiev6pTt+Qjj1yGBJv8U7+k= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1/go.mod h1:EOGgNrSPskIxY3+KgCl+yEggMjrGqrA2oL5va+/p2jM= -github.com/DataDog/datadog-api-client-go/v2 v2.18.0 h1:QkX1vY1JtvDeF6N6EarPrJMHlerVGdTvGQOUWqfeVDs= -github.com/DataDog/datadog-api-client-go/v2 v2.18.0/go.mod h1:lHlfhsNQ2qZclvpVQTfrGowUDIdIzAao38A05f9EQpc= +github.com/Code-Hex/go-generics-cache v1.3.1 h1:i8rLwyhoyhaerr7JpjtYjJZUcCbWOdiYO3fZXLiEC4g= +github.com/Code-Hex/go-generics-cache v1.3.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= +github.com/DataDog/agent-payload/v5 v5.0.111 h1:mM+4OBkXF9tjKV0VjwnNO5As9aKcNAEsagvKDSBaTyc= +github.com/DataDog/agent-payload/v5 v5.0.111/go.mod h1:COngtbYYCncpIPiE5D93QlXDH/3VAKk10jDNwGHcMRE= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae h1:aVo1Uh2WQ8TvgbjqlbDvfP5AcUtnqXUUrc9pVP8MvKc= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:AVPQWekk3h9AOC7+plBlNB68Sy6UIGFoMMVUDeSoNoI= +github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae h1:b6lU79trCyadhkxhb51jXiqmZaHs1Z0fwWlWKFVCqJ4= +github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:s6zD4ZvPBta68SBCsCnnbn3VJzoQk5wNd0VJOpB84Ug= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae h1:/vfuF60+5qeGM62IDG1F6Asfa1VGAohiQVivRo9TWoo= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:JhAilx32dkIgoDkFXquCTfaWDsAOfe+vfBaxbiZoPI0= +github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae h1:B1E9jVLpw+Hrcv9ggzCridX3YMeUmZBE3zHghdwfTSc= +github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:1FTu8gSg8Pd8DVgRfxlcPN4F+d8K7A3lbMCT84FX44Y= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae h1:GL9JPEUyKDH2brURt09llrqWBmExCuqbHeWucezZ6sY= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:OnkC+HYj+NU9dmowWVtFpmnA4wVVibejbzID7TNm7jA= +github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae h1:sUEteYos3JjJJB1+A9inYJ3uzM18t9cygjSs0cik8x4= +github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:z4lpju3fhDa8JcbXxU0Bc6A6ci8xoQMuxDXbBdf4gHw= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae h1:qveAzof7ZZXvm93FL7h5mRM8B4q9w14g2fx6wcZt88k= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:HgJEYNmnFTKIuBhWxYe1coqmzoJXMxQTfK+4wIG5G1Q= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae h1:YZz6I8ym9P4MLytAdAJlafF3tgItgAGZrDqe4otbVUk= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:EVETfdJCkqy0YEvSpQd9LZdcYQ7vrUomCm+bQ6h3lc4= +github.com/DataDog/datadog-api-client-go/v2 v2.24.0 h1:7G+eyezFM8gHq5dOHcrQcGVxrXnwPqX2yYHxsLiq3iM= +github.com/DataDog/datadog-api-client-go/v2 v2.24.0/go.mod h1:QKOu6vscsh87fMY1lHfLEmNSunyXImj8BUaUWJXOehc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/datadog-go/v5 v5.1.1 h1:JLZ6s2K1pG2h9GkvEvMdEGqMDyVLEAccdX5TltWcLMU= -github.com/DataDog/datadog-go/v5 v5.1.1/go.mod h1:KhiYb2Badlv9/rofz+OznKoEF5XKTonWyhx5K83AP8E= -github.com/DataDog/go-sqllexer v0.0.8 h1:vfC8R9PhmJfeOKcFYAX9UOd890A3wu3KrjU9Kr7nM0E= -github.com/DataDog/go-sqllexer v0.0.8/go.mod h1:nB4Ea2YNsqMwtbWMc4Fm/oP98IIrSPapqwOwPioMspY= +github.com/DataDog/datadog-go/v5 v5.5.0 h1:G5KHeB8pWBNXT4Jtw0zAkhdxEAWSpWH00geHI6LDrKU= +github.com/DataDog/datadog-go/v5 v5.5.0/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= +github.com/DataDog/go-sqllexer v0.0.9 h1:Cx2Cu1S0hfj4coCCA8hzjM9+UNFRkcu1avIV//RU5Qw= +github.com/DataDog/go-sqllexer v0.0.9/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/gohai v0.0.0-20220718130825-1776f9beb9cc h1:gtlKB6B50/UEuFm1LeMn0R5a+tubx69OecPqxfXJDmU= -github.com/DataDog/gohai v0.0.0-20220718130825-1776f9beb9cc/go.mod h1:oyPC4jWHHjVVNjslDAKp8EqfQBaSmODjHt4HCX+C+9Q= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1 h1:16YkGLmeJH830m3dG0owtdSMXDkmTZdRd1EWZ1XIO6M= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1/go.mod h1:re1FCVuKWovntr4bODIUe+iYT2Al0gbS0WK726XLz7w= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.8.1 h1:0GyngySyxePf1RozAdm8p51uxT/kDsxqhzWPZGNrqVg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 h1:ly/egks++IqejMVPcp0OWV1fcL+Nsq4EHF48AAQPKu4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1/go.mod h1:8jOAAH5PrNN6zICpu65M7mNPAeOQsW5Wk/sq80txutA= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1 h1:UizDxaGWPDNzR2orQTE9poYyP09B2OhlaeiY5vdr+EU= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1/go.mod h1:2043mFAA2cD68ilZ93/5zZfL9BxWwj8z9sleaw3rtiY= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 h1:TbZDzUrW8iahevDY5Xw+j1EfrX8XZdeg/M6UYBl9mxg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1/go.mod h1:nVIKiAwP/Zd8IFxeHhEAiirJRH1kOOoZ315HQeSEkng= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 h1:4cyzwoXrnjElTIlsFbpyXQkAJs3+6ly9HExOu9lrup4= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1/go.mod h1:3AEt8/uCtbpzjPOPPxIBDcR1qcUq2hBbrkrdE/qNfb0= -github.com/DataDog/sketches-go v1.4.3 h1:ZB9nijteJRFUQixkQfatCqASartGNfiolIlMiEv3u/w= -github.com/DataDog/sketches-go v1.4.3/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= +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.4 h1:PTIZJAsfnr2XLB3V3duL+mSbZvYV8G3XQ9e57KyOuOA= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.4/go.mod h1:5yS6i90MEZS3NG+o7PrQQ8i7OaEMzwQvn4bCZ9h9Rao= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.4 h1:B2R7Wh791uphpltmorbvvdKk0rJOhoExwM4NnE7hXTg= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.4/go.mod h1:Tk2wwdBgWeSvDPtrGGyym8CdVWSuphiToGc/tRvFoNQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0 h1:10TPqpTlIkmDPFWVIEZ4ZX3rWrCrx3rEoeoAooZr6LM= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0/go.mod h1:dvIWN9pA2zWNTw5rhDWZgzZnhcfpH++d+8d1SWW6xkY= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4 h1:dU9oPMbAr/wYMNdzhu0pxIhAJOn1Btj1T3ZSyY6RvY0= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4/go.mod h1:ud/Xr5TWUopcaGHdkh9RN8lhnCAFa95X16Rb5mrkE18= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4 h1:ZuYc5Ql/GSyAEMgpKkbQiHOtIHkEpYujITW1wIVFgLE= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4/go.mod h1:YSntkplFoUM1mepnPeJFsoblqD0Wdi+Avg1/d1upgZQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4 h1:t/Zh8ztLDBOMRMiuVNFthWMMG5F4POgc5M6+Y3DTX9g= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4/go.mod h1:JfdBBDreQfbIN5FYrAtZV3VmQMXnf9o4tMbaMxWqe40= +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= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0 h1:tk85AYGwOf6VNtoOQi8w/kVDi2vmPxp3/OU2FsUpdcA= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0/go.mod h1:Xx0VKh7GJ4si3rmElbh19Mejxz68ibWg/J30ZOMrqzU= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0 h1:PWcDbDjrcT/ZHLn4Bc/FuglaZZVPP8bWO/YRmJBbe38= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0/go.mod h1:XEK/YHYsi+Wk2Bk1+zi/he+gjRfDWtoIZEZwuwcYjhk= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/hcsshim v0.11.1 h1:hJ3s7GbWlGK4YVV92sO88BQSyF4ZLVy7/awqOlPxFbA= +github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= +github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Showmax/go-fqdn v1.0.0 h1:0rG5IbmVliNT5O19Mfuvna9LL7zlHyRfsSvBPZmF9tM= github.com/Showmax/go-fqdn v1.0.0/go.mod h1:SfrFBzmDCtCGrnHhoDjuvFnKsWjEQX/Q9ARZvOrJAko= +github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= @@ -118,8 +143,11 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -129,13 +157,12 @@ github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwN github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -146,28 +173,39 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0= -github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE= -github.com/containerd/containerd v1.7.7 h1:QOC2K4A42RQpcrZyptP6z9EJZnlHfHJUfZrAAHe15q4= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= +github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= +github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= +github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= +github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= +github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= +github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/digitalocean/godo v1.109.0 h1:4W97RJLJSUQ3veRZDNbp1Ol3Rbn6Lmt9bKGvfqYI5SU= +github.com/digitalocean/godo v1.109.0/go.mod h1:R6EmmWI8CT1+fCtjWY9UCB+L5uufuZH13wk3YhxycCs= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= @@ -177,20 +215,26 @@ github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+m github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI= +github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= 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/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/expr-lang/expr v1.16.3 h1:NLldf786GffptcXNxxJx5dQ+FzeWDKChBDqOOwyK8to= +github.com/expr-lang/expr v1.16.3/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= -github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -203,41 +247,46 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= +github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= +github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= +github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= +github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= +github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= @@ -248,6 +297,8 @@ github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= +github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -279,13 +330,14 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -300,11 +352,11 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= @@ -318,28 +370,45 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ZWj6lSlDF3F74SfKwfTCer72Q= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= +github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gophercloud/gophercloud v1.8.0 h1:TM3Jawprb2NrdOnvcHhWJalmKmAmOGgfZElM/3oBYCk= +github.com/gophercloud/gophercloud v1.8.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= +github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/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/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= -github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= -github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/hashicorp/consul/api v1.28.2 h1:mXfkRHrpHN4YY3RqL09nXU1eHKLNiuAN4kHvDQ16k/8= +github.com/hashicorp/consul/api v1.28.2/go.mod h1:KyzqzgMEya+IZPcD65YFoOVAgPpbfERu4I/tzG6/ueE= +github.com/hashicorp/consul/sdk v0.16.0 h1:SE9m0W6DEfgIVCJX7xU+iv/hUl4m/nxqMTnCdMxDpJ8= +github.com/hashicorp/consul/sdk v0.16.0/go.mod h1:7pxqqhqoaPqnBnzXD1StKed62LqJeClzVsUEy85Zr0A= +github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= +github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -347,46 +416,66 @@ github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= +github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702 h1:fI1LXuBaS1d9z1kmb++Og6YD8uMRwadXorCwE+xgOFA= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702/go.mod h1:z71gkJdrkAt/Rl6C7Q79VE7AwJ5lUF+M+fzFTyIHYB0= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= +github.com/hetznercloud/hcloud-go/v2 v2.6.0 h1:RJOA2hHZ7rD1pScA4O1NF6qhkHyUdbbxjHgFNot8928= +github.com/hetznercloud/hcloud-go/v2 v2.6.0/go.mod h1:4J1cSE57+g0WS93IiHLV7ubTHItcp+awzeBp5bM9mfA= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= -github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 h1:s9ZL6ZhFF8y6ebnm1FLvobkzoIu5xwDQUcRPk/IEhpM= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6/go.mod h1:aXdIdfn2OcGnMhOTojXmwZqXKgC3MU5riiNvzwwG9OY= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 h1:2r2WiFeAwiJ/uyx1qIKnV1L4C9w/2V8ehlbJY4gjFaM= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4/go.mod h1:1yEQhaLb/cETXCqQmdh7lDjupNAReO7c83AHyK2dJ48= +github.com/ionos-cloud/sdk-go/v6 v6.1.11 h1:J/uRN4UWO3wCyGOeDdMKv8LWRzKu6UIkLEaes38Kzh8= +github.com/ionos-cloud/sdk-go/v6 v6.1.11/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= +github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= 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/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -402,35 +491,43 @@ github.com/karrick/godirwalk v1.17.0 h1:b4kY7nqDdioR/6qnbHQyDvmA17u5G1cZ6J+CZXwS github.com/karrick/godirwalk v1.17.0/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= 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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 h1:bCiVCRCs1Heq84lurVinUPy19keqGEe4jh5vtK37jcg= github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= github.com/leoluk/perflib_exporter v0.2.1 h1:/3/ut1k/jFt5p4ypjLZKDHDqlXAK6ERZPVWtwdI389I= github.com/leoluk/perflib_exporter v0.2.1/go.mod h1:MinSWm88jguXFFrGsP56PtleUb4Qtm4tNRH/wXNXRTI= github.com/lightstep/go-expohisto v1.0.0 h1:UPtTS1rGdtehbbAF7o/dhkWLTDI73UifG8LbfQI7cA4= +github.com/lightstep/go-expohisto v1.0.0/go.mod h1:xDXD0++Mu2FOaItXtdDfksfgxfV0z1TMPa+e/EUd0cs= +github.com/linode/linodego v1.30.0 h1:6HJli+LX7NGu+Sne2G+ux790EkVOWOV/SR4mK3jcs6k= +github.com/linode/linodego v1.30.0/go.mod h1:/46h/XpmWi//oSA92GX2p3FIxb8HbX7grslPPQalR2o= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c h1:VtwQ41oftZwlMnOEbMWQtSEUgU64U4s+GHk7hZK+jtY= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= @@ -449,29 +546,39 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= +github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4= +github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= +github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +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/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= 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= @@ -480,29 +587,33 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= 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/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/observiq/nanojack v0.0.0-20201106172433-343928847ebc h1:49ewVBwLcy+eYqI4R0ICilCI4dPjddpFXWv3liXzUxM= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= 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/openshift/api v0.0.0-20180801171038-322a19404e37 h1:05irGU4HK4IauGGDbsk+ZHrm1wOzMLYjMlfaiqMrBYc= @@ -513,6 +624,8 @@ github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 h1:ZHRIMCFIJN1 github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142/go.mod h1:fjS8r9mqDVsPb5td3NehsNOAWa4uiFkYEfVZioQ2gH0= github.com/outcaste-io/ristretto v0.2.1 h1:KCItuNIGJZcursqHr3ghO7fc5ddZLEHspL9UR0cQM64= github.com/outcaste-io/ristretto v0.2.1/go.mod h1:W8HywhmtlopSB1jeMg3JtdIhf+DYkLAr0VN/s4+MHac= +github.com/ovh/go-ovh v1.4.3 h1:Gs3V823zwTFpzgGLZNI6ILS4rmxZgJwJCz54Er9LwD0= +github.com/ovh/go-ovh v1.4.3/go.mod h1:AkPXVtgwB6xlKblMjRKJJmjRp+ogrE7fz2lVgcQY8SY= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -521,6 +634,8 @@ github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTK github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -538,60 +653,60 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.31.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= +github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= +github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= +github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= +github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e h1:UmqAuY2OyDoog8+l5FybViJE5B2r+UxVGCUwFTsY5AA= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e/go.mod h1:+0ld+ozir7zWFcHA2vVpWAKxXakIioEjPPNOqH+J3ZA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 h1:/8rfZAdFfafRXOgz+ZpMZZWZ5pYggCY9t7e/BvjaBHM= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= -github.com/shirou/gopsutil/v3 v3.22.2/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/shirou/gopsutil/v3 v3.22.12/go.mod h1:Xd7P1kwZcp5VW52+9XsirIKd/BROzbb2wdX3Kqlz9uI= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= +github.com/shoenig/test v1.7.1/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= @@ -602,8 +717,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -613,29 +729,48 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= 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.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= -github.com/testcontainers/testcontainers-go v0.26.0 h1:uqcYdoOHBy1ca7gKODfBd9uTHVK3a7UL848z09MVZ0c= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/testcontainers/testcontainers-go v0.29.1 h1:z8kxdFlovA2y97RWx98v/TQ+tR+SXZm6p35M+xB92zk= +github.com/testcontainers/testcontainers-go v0.29.1/go.mod h1:SnKnKQav8UcgtKqjp/AD8bE1MqZm+3TDb/B8crE3XnI= +github.com/tidwall/gjson v1.10.2 h1:APbLGOM0rrEkd8WBw9C24nllro4ajFuJu0Sc9hRz8Bo= +github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/tinylru v1.1.0 h1:XY6IUfzVTU9rpwdhKUF6nQdChgCdGjkMfLzbWyiau6I= +github.com/tidwall/tinylru v1.1.0/go.mod h1:3+bX+TJ2baOLMWTnlyNWHh4QMnFyARg2TLTQ6OFbzw8= +github.com/tidwall/wal v1.1.7 h1:emc1TRjIVsdKKSnpwGBAcsAGg0767SvUk8+ygx7Bb+4= +github.com/tidwall/wal v1.1.7/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU= github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k= -github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= +github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= 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.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= +github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= +github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= +github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= +github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= +github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zorkian/go-datadog-api v2.30.0+incompatible h1:R4ryGocppDqZZbnNc5EDR8xGWF/z/MxzWnqTUijDQes= github.com/zorkian/go-datadog-api v2.30.0+incompatible/go.mod h1:PkXwHX9CUQa/FpB9ZwAD45N1uhCW4MT/Wj7m36PbKss= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -643,107 +778,131 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/configgrpc v0.89.0/go.mod h1:2GuAxpU34a1X19kCZ8Kw3FUsxOIiFcWHiYorRCyhnCc= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 h1:opvHcGANx+dS4HJwGTPtRMd6dZdOmmGn6c3PfW/bihQ= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/otelcol v0.89.0 h1:b3kC0zM9T6GxjhTcNEHIzXDd4zTIc7cBpexCPZ9nPzg= -go.opentelemetry.io/collector/otelcol v0.89.0/go.mod h1:BILxDcJe32wK+paX7ssnt4jyjOmTkIHvXe9JNjlHUk8= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 h1:oTEOHs2t00f9LfRwZGzKSXJPR3FHjPDDhjt05iWXYZM= -go.opentelemetry.io/collector/processor/batchprocessor v0.89.0/go.mod h1:xaTfwrIbnsUpvaUCIecvlH8wTH500U7LtczdaEPXmmk= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 h1:ayqzWyj56xyc0tcBpaYjWtxvj5pfZNhYC8LrwvlLAeE= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0/go.mod h1:7p2oZ09hP+h6WpTv67PgEJx+azViVqLBE4IfrnDOWOc= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/collector/service v0.89.0/go.mod h1:6IAr9Asn6t6YxSw6Qv5LwA+ilVUtP0nQsu1xzc9+mZA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0 h1:Yty9Vs4F3D6/liF1o6FNt0PvN85h/BJJ6DQKJ3nrcM0= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0/go.mod h1:On4VgbkqYL18kbJlWsa18+cMNe6rYpBnPi1ARI/BrsU= -go.opentelemetry.io/contrib/zpages v0.45.0 h1:jIwHHGoWzJoZdbIUtWdErjL85Gni6BignnAFqDtMRL4= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0 h1:E/sf+2slCUb7wqh5FHwhdwKWTA+VXyMMAcFNlKVf4yw= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0/go.mod h1:2xuXI78Xp9cttLsJMF/Y08cJUqckLt0kLasn+vcHR5w= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0/go.mod h1:hbzqqcIxyywu6UQ5J1wb4ntla8nCwCfNBZnMo2Dgh48= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0/go.mod h1:qmFtGlXhoa9qPt5RrZgMp4f5RfRagucrdriI+hb3yWQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0/go.mod h1:CMJYNAfooOwSZSAmAeMUV1M+TXld3BiK++z9fqIm2xk= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0/go.mod h1:nZStMoc1H/YJpRjSx9IEX4abBMekORTLQcTUT1CgLkg= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 h1:vcSjcjn/BTeM6abI5CDymZdtd1m24quD1Mx4VE3N3fM= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0/go.mod h1:HblEnlZQNsVuuDpszdKTWcrHBI09OjBn2pWSzBx1goM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 h1:4s9HxB4azeeQkhY0GE5wZlMj4/pz8tE5gx2OQpGUw58= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0/go.mod h1:djVA3TUJ2fSdMX0JE5XxFBOaZzprElJoP7fD4vnV2SU= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -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.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 h1:lRhfcLr3gK5S/zn92h3clyOPnCvvNKs1WTMbtH4UvO0= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0/go.mod h1:vNMFTWe4dF05LsodUOc84OfxdlYVp1kCMuZzb41WfAk= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 h1:x/VsGlBj+DtJCXIucwzwcxiwnwAU8a6ALK6UN8fPdKQ= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0/go.mod h1:BapTGXu7CYrQGNohbapPwTSt2Ty/k/c6Oemx9mSSiK4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 h1:SxDS+Yr8qE+ID58ELR5n0D+SUlqHKOZ72pK3YPFAelA= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0/go.mod h1:DEoB0d0k1iGt4KEABntL8AW9xYQ6E7fmgkM2/s8aXvM= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 h1:C02SPbRPvrtmZ9TvsHWpz2TvHzqY5mNyEAlDdhax/a4= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0/go.mod h1:dzZKtykJio3Rm+G+Cmr15VV3xKp0PmFuh9Q9b3c1K7A= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 h1:04zGXVQZ8D6nvoPX8AaqxWxGHNNVsGR78E+tY+2VQr8= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0/go.mod h1:+UrRiugWaQPssz4mgEgQQo640f2bDUCFlo2Xr0/5ulc= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 h1:JYpDN0OnMsu0awk0rjaYEIko9hFzzBJ6+2U5W2iVvUE= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0/go.mod h1:xrXL804nBum1PgbvmJQ4I+hyW+DU4xBGO3MKMiYFX6E= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 h1:zAFCXYzpxDh64BIVujqntlN5RE4jDahbPfJBy/Wq7D0= +go.opentelemetry.io/collector/exporter/debugexporter v0.98.0/go.mod h1:S15ELDQFoP5da3NHzXJR2I8FGUnM2C1Hp6e/OhaCtw0= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 h1:JfvsDpTwAhA9au8/4vmONRh0OBVU6n36seb41JD/mTQ= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0/go.mod h1:t1zDwy6kYp4w1JgcGHMvdGbKYHqWpK00bB1AEQ0Oqlc= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/otelcol v0.98.0 h1:sUk49Wqw+VBYeDynEA+GSeVEusFvzFW3KuF2vfDbyo0= +go.opentelemetry.io/collector/otelcol v0.98.0/go.mod h1:dW3UzuaiaNTddjKajk3Tp2Y7muDvYJdQz2yGUOE53gs= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 h1:iM4fMLGig3GKmz5XNtOPKDsnCnvbi0+UHYaWsx/aSRc= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0/go.mod h1:ROnuUkZJgpKEIDf3AIVjgRGNI7KPqCKPXsw8whL6Hzs= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0 h1:1jjiC3POfIluGLVM+6y8nolKEI95/vlHAvDmIOatags= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0/go.mod h1:VQDDrhQbIoelGF+fKzy6vCQM3hWDCH2YFaZKqgTDmGk= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 h1:j7lfLwc5o1dtXIPXU8LjmxadejmJVRHN57ZYGH33Wq4= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0/go.mod h1:uWDBDxaWuzF1U5S2UIhstO0+Q8aUiwiUu8uO1IYN2XQ= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/collector/service v0.98.0 h1:lLJ7VXPXcV62fSISh4GuNd5ti6WvKje76NSgezc3ydo= +go.opentelemetry.io/collector/service v0.98.0/go.mod h1:wB7ozvZTHtMefb5KTYy5nyrVYWpGk8teq8jWFs4blIU= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0 h1:QU8UEKyPqgr/8vCC9LlDmkPnfFmiWAUF9GtJdcLz+BU= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0/go.mod h1:qonC7wyvtX1E6cEpAR+bJmhcGr6IVRGc/f6ZTpvi7jA= +go.opentelemetry.io/contrib/zpages v0.50.0 h1:hKC5asr83xDN4ErwSHVdk3gv053pZiF8SZKmS86IPEw= +go.opentelemetry.io/contrib/zpages v0.50.0/go.mod h1:8WovRn95fZdaX/dr3e4h7D8IqiVsnZ+WxY0Yn4LyU3k= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0 h1:0o/9KwAgxjK+3pMV0pwIF5toYHqDsPmQhfrBvKaG6mU= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0/go.mod h1:rZyTdpmRqoV+PpUn6QlruxJp/kE4765rPy0pP6mRDk8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 h1:hDKnobznDpcdTlNzO0S/owRB8tyVr1OoeZZhDoqY+Cs= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0/go.mod h1:kUDQaUs1h8iTIHbQTk+iJRiUvSfJYMMKTtMCaiVu7B0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 h1:Wc4hZuYXhVqq+TfRXLXlmNIL/awOanGx8ssq3ciDQxc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0/go.mod h1:BydOvapRqVEc0DVz27qWBX2jq45Ca5TI9mhZBDIdweY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 h1:vOL89uRfOCCNIjkisd0r7SEdJF3ZJFyCNY34fdZs8eU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0/go.mod h1:8GlBGcDk8KKi7n+2S4BT/CPZQYH3erLu0/k64r1MYgo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 h1:d7nHbdzU84STOiszaOxQ3kw5IwkSmHsU5Muol5/vL4I= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0/go.mod h1:yiPA1iZbb/EHYnODXOxvtKuB0I2hV8ehfLTEWpl7BJU= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 h1:0vZZdECYzhTt9MKQZ5qQ0V+J3MFu4MQaQ3COfugF+FQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0/go.mod h1:e7iXx3HjaSSBXfy9ykVUlupS2Vp7LBIBuT21ousM2Hk= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= 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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -754,7 +913,11 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -765,8 +928,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +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/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -789,8 +952,10 @@ 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.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -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/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -829,19 +994,21 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +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.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -853,8 +1020,10 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/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-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -908,28 +1077,33 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/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-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -938,14 +1112,19 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= @@ -993,14 +1172,16 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= 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= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1017,14 +1198,16 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.168.0 h1:MBRe+Ki4mMN93jhDDbpuRLjRddooArz4FeSObvUMmjY= +google.golang.org/api v0.168.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1054,11 +1237,10 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -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-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1072,8 +1254,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= +google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -1087,9 +1269,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba 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.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1101,6 +1282,8 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1116,6 +1299,7 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 h1:umQdVO0Ytx+kYadhuJNjFtDgIsIEBnKrOTvNuu8ClKI= gopkg.in/zorkian/go-datadog-api.v2 v2.30.0/go.mod h1:kx0CSMRpzEZfx/nFH62GLU4stZjparh/BRpM89t4XCQ= gotest.tools/v3 v3.2.0 h1:I0DwBVMGAx26dttAj1BtJLAkVGncrkkUXfJLC4Flt/I= +gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1124,28 +1308,28 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= -k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= -k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= -k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= @@ -1153,8 +1337,8 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/exporter/datadogexporter/hostmetadata.go b/exporter/datadogexporter/hostmetadata.go index 05fe73da7dc5..1338bed2fb54 100644 --- a/exporter/datadogexporter/hostmetadata.go +++ b/exporter/datadogexporter/hostmetadata.go @@ -16,7 +16,7 @@ func newMetadataConfigfromConfig(cfg *Config) hostmetadata.PusherConfig { APIKey: string(cfg.API.Key), UseResourceMetadata: cfg.HostMetadata.HostnameSource == HostnameSourceFirstResource, InsecureSkipVerify: cfg.TLSSetting.InsecureSkipVerify, - TimeoutSettings: cfg.TimeoutSettings, - RetrySettings: cfg.RetrySettings, + ClientConfig: cfg.ClientConfig, + RetrySettings: cfg.BackOffConfig, } } diff --git a/exporter/datadogexporter/integrationtest/go.mod b/exporter/datadogexporter/integrationtest/go.mod index 485b67b56e19..c9799c3f3c8c 100644 --- a/exporter/datadogexporter/integrationtest/go.mod +++ b/exporter/datadogexporter/integrationtest/go.mod @@ -1,126 +1,122 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/integrationtest -go 1.20 +go 1.21 require ( - github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1 - github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.89.0 - github.com/stretchr/testify v1.8.4 + github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae + github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.98.0 + github.com/stretchr/testify v1.9.0 github.com/tinylib/msgp v1.1.9 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/connector v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/exporter/debugexporter v0.89.0 - go.opentelemetry.io/collector/otelcol v0.89.0 - go.opentelemetry.io/collector/processor v0.89.0 - go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 - go.opentelemetry.io/collector/receiver v0.89.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 - go.opentelemetry.io/otel v1.20.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 - go.opentelemetry.io/otel/sdk v1.20.0 - google.golang.org/protobuf v1.31.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 + go.opentelemetry.io/collector/connector v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 + go.opentelemetry.io/collector/otelcol v0.98.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 + go.opentelemetry.io/collector/receiver v0.98.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 + go.opentelemetry.io/otel v1.25.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 + go.opentelemetry.io/otel/sdk v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + google.golang.org/protobuf v1.33.0 ) require ( - cloud.google.com/go/compute v1.23.0 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect - github.com/DataDog/agent-payload/v5 v5.0.89 // indirect - github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-api-client-go/v2 v2.18.0 // indirect - github.com/DataDog/datadog-go/v5 v5.1.1 // indirect - github.com/DataDog/go-sqllexer v0.0.8 // indirect + github.com/DataDog/agent-payload/v5 v5.0.111 // indirect + github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-api-client-go/v2 v2.24.0 // indirect + github.com/DataDog/datadog-go/v5 v5.5.0 // indirect + github.com/DataDog/go-sqllexer v0.0.9 // indirect github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect - github.com/DataDog/gohai v0.0.0-20220718130825-1776f9beb9cc // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 // indirect - github.com/DataDog/sketches-go v1.4.3 // indirect + github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.4 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4 // 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.20.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/alecthomas/participle/v2 v2.1.0 // indirect - github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-00010101000000-000000000000 // indirect - github.com/aws/aws-sdk-go v1.47.10 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20240415183253-230331014d2c // indirect + github.com/aws/aws-sdk-go v1.51.17 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect - github.com/containerd/cgroups/v3 v3.0.2 // indirect + github.com/containerd/cgroups/v3 v3.0.3 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.3.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/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.20.4 // indirect + github.com/go-openapi/swag v0.22.9 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/godbus/dbus/v5 v5.0.6 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.4.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/iancoleman/strcase v0.3.0 // indirect - github.com/imdario/mergo v0.3.15 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/karrick/godirwalk v1.17.0 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.98.0 // indirect github.com/opencontainers/runtime-spec v1.1.0-rc.3 // indirect github.com/openshift/api v3.9.0+incompatible // indirect github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect @@ -130,83 +126,89 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.52.2 // indirect + github.com/prometheus/procfs v0.13.0 // indirect github.com/rs/cors v1.10.1 // indirect github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // 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/stretchr/objx v0.5.0 // indirect + github.com/stretchr/objx v0.5.2 // 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 + github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.89.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.89.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/collector/service v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.98.0 // indirect + go.opentelemetry.io/collector/config/confighttp v0.98.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.98.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/collector/service v0.98.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.25.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.15.0 // indirect - gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/grpc v1.59.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.19.0 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 // indirect - k8s.io/api v0.28.4 // indirect - k8s.io/apimachinery v0.28.4 // indirect - k8s.io/client-go v0.28.4 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect + k8s.io/api v0.29.3 // indirect + k8s.io/apimachinery v0.29.3 // indirect + k8s.io/client-go v0.29.3 // indirect + k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) @@ -267,4 +269,16 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/docke replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => ../../../pkg/golden +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus => ../../../pkg/translator/prometheus + +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter => ../../prometheusremotewriteexporter + +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite => ../../../pkg/translator/prometheusremotewrite + +replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor => ../../../processor/probabilisticsamplerprocessor + +replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver => ../../../receiver/prometheusreceiver + +replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor => ../../../processor/transformprocessor + replace github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws => ../../../override/aws diff --git a/exporter/datadogexporter/integrationtest/go.sum b/exporter/datadogexporter/integrationtest/go.sum index 23ff22a3c739..328bb474e45f 100644 --- a/exporter/datadogexporter/integrationtest/go.sum +++ b/exporter/datadogexporter/integrationtest/go.sum @@ -9,18 +9,11 @@ cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6T cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= 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= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= @@ -28,15 +21,20 @@ cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1 cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 h1:n1DH8TPV4qqPTje2RcUBYwtrTWlabVp4n46+74X2pn4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0/go.mod h1:HDcZnuGbiyppErN6lB+idp4CKhjbc8gwjto6OPpyggM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 h1:MxA59PGoCFb+vCwRQi3PhQEwHj4+r2dhuv9HG+vM7iM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0/go.mod h1:uYt4CfhkJA9o0FN7jfE5minm/i4nUE4MjGUJkzB6Zs8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 h1:bXwSugBiSbgtz7rOtbfGf+woewp4f06orW9OP5BjHLA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0/go.mod h1:Y/HgrePTmGy9HjdSGTqZNa+apUpTVIEVKXJyARP2lrk= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= @@ -44,53 +42,58 @@ github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSY github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/agent-payload/v5 v5.0.89 h1:uuLWf/exyNYBnheG9OH2dOWZpCJvaEHX3W9CAd8KarU= -github.com/DataDog/agent-payload/v5 v5.0.89/go.mod h1:oQZi1VZp1e3QvlSUX4iphZCpJaFepUxWq0hNXxihKBM= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1 h1:W6IVI3zWwoJGcFagJ/kwltFL1IIErBZzcBy994PQsQE= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1/go.mod h1:A4nLJvxlg6BO/8/zg81til9yT0uRPuXDFMAzDMpmgn4= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1 h1:zDhs0MnT72cZOxxbPjkGI00NMYgsydOanBX3GZHuS1I= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1/go.mod h1:HvK26YCxg6MfYvPJgpHC7nSjw6DTpNhd75Wlb0GAvis= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1 h1:EywptZStgHbDWLScnHfaCj6QNb698DY68pCnPEQrsts= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1/go.mod h1:Vc+snp0Bey4MrrJyiV2tVxxJb6BmLomPvN1RgAvjGaQ= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1 h1:A1uj4IMFs4rWp5LRalsqqnoC1f7QuYuN/b6/L7k4KCc= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1/go.mod h1:Q84EzSKpY/HtasusZM4ZPuYqbPQEbmIcAGzd7tXUX1I= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1 h1:iJSVz+YsndcMA/yYNih/qmuvwD1AR7IYX0cXXePpeys= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1/go.mod h1:JUOECuM5XcoxjEPs30C568vGBWtqScjnsC2KXY1OQ7Y= -github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1 h1:NK2kcRdv/r0WycAlGD2JFSmOcNvazzilPvZzk3l105g= -github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1/go.mod h1:RMBDVajNx78CpFHnbat0aIGcwVQZp8s+smRlcJkvZGg= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1 h1:SgaCKuX9e3O5eLRIr+zqW1dlIw/TP3RDKQZUa2FfF8c= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1/go.mod h1:eTXti9mx7qhkoi+Qg3mMmvVY5McghUUgsf4Hrk9zY8k= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1 h1:aCDYC/AkDS/EOm4GV1bFmiev6pTt+Qjj1yGBJv8U7+k= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1/go.mod h1:EOGgNrSPskIxY3+KgCl+yEggMjrGqrA2oL5va+/p2jM= -github.com/DataDog/datadog-api-client-go/v2 v2.18.0 h1:QkX1vY1JtvDeF6N6EarPrJMHlerVGdTvGQOUWqfeVDs= -github.com/DataDog/datadog-api-client-go/v2 v2.18.0/go.mod h1:lHlfhsNQ2qZclvpVQTfrGowUDIdIzAao38A05f9EQpc= -github.com/DataDog/datadog-go/v5 v5.1.1 h1:JLZ6s2K1pG2h9GkvEvMdEGqMDyVLEAccdX5TltWcLMU= -github.com/DataDog/datadog-go/v5 v5.1.1/go.mod h1:KhiYb2Badlv9/rofz+OznKoEF5XKTonWyhx5K83AP8E= -github.com/DataDog/go-sqllexer v0.0.8 h1:vfC8R9PhmJfeOKcFYAX9UOd890A3wu3KrjU9Kr7nM0E= -github.com/DataDog/go-sqllexer v0.0.8/go.mod h1:nB4Ea2YNsqMwtbWMc4Fm/oP98IIrSPapqwOwPioMspY= +github.com/Code-Hex/go-generics-cache v1.3.1 h1:i8rLwyhoyhaerr7JpjtYjJZUcCbWOdiYO3fZXLiEC4g= +github.com/Code-Hex/go-generics-cache v1.3.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= +github.com/DataDog/agent-payload/v5 v5.0.111 h1:mM+4OBkXF9tjKV0VjwnNO5As9aKcNAEsagvKDSBaTyc= +github.com/DataDog/agent-payload/v5 v5.0.111/go.mod h1:COngtbYYCncpIPiE5D93QlXDH/3VAKk10jDNwGHcMRE= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae h1:aVo1Uh2WQ8TvgbjqlbDvfP5AcUtnqXUUrc9pVP8MvKc= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:AVPQWekk3h9AOC7+plBlNB68Sy6UIGFoMMVUDeSoNoI= +github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae h1:b6lU79trCyadhkxhb51jXiqmZaHs1Z0fwWlWKFVCqJ4= +github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:s6zD4ZvPBta68SBCsCnnbn3VJzoQk5wNd0VJOpB84Ug= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae h1:/vfuF60+5qeGM62IDG1F6Asfa1VGAohiQVivRo9TWoo= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:JhAilx32dkIgoDkFXquCTfaWDsAOfe+vfBaxbiZoPI0= +github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae h1:B1E9jVLpw+Hrcv9ggzCridX3YMeUmZBE3zHghdwfTSc= +github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:1FTu8gSg8Pd8DVgRfxlcPN4F+d8K7A3lbMCT84FX44Y= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae h1:GL9JPEUyKDH2brURt09llrqWBmExCuqbHeWucezZ6sY= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:OnkC+HYj+NU9dmowWVtFpmnA4wVVibejbzID7TNm7jA= +github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae h1:sUEteYos3JjJJB1+A9inYJ3uzM18t9cygjSs0cik8x4= +github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:z4lpju3fhDa8JcbXxU0Bc6A6ci8xoQMuxDXbBdf4gHw= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae h1:qveAzof7ZZXvm93FL7h5mRM8B4q9w14g2fx6wcZt88k= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:HgJEYNmnFTKIuBhWxYe1coqmzoJXMxQTfK+4wIG5G1Q= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae h1:YZz6I8ym9P4MLytAdAJlafF3tgItgAGZrDqe4otbVUk= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:EVETfdJCkqy0YEvSpQd9LZdcYQ7vrUomCm+bQ6h3lc4= +github.com/DataDog/datadog-api-client-go/v2 v2.24.0 h1:7G+eyezFM8gHq5dOHcrQcGVxrXnwPqX2yYHxsLiq3iM= +github.com/DataDog/datadog-api-client-go/v2 v2.24.0/go.mod h1:QKOu6vscsh87fMY1lHfLEmNSunyXImj8BUaUWJXOehc= +github.com/DataDog/datadog-go/v5 v5.5.0 h1:G5KHeB8pWBNXT4Jtw0zAkhdxEAWSpWH00geHI6LDrKU= +github.com/DataDog/datadog-go/v5 v5.5.0/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= +github.com/DataDog/go-sqllexer v0.0.9 h1:Cx2Cu1S0hfj4coCCA8hzjM9+UNFRkcu1avIV//RU5Qw= +github.com/DataDog/go-sqllexer v0.0.9/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/gohai v0.0.0-20220718130825-1776f9beb9cc h1:gtlKB6B50/UEuFm1LeMn0R5a+tubx69OecPqxfXJDmU= -github.com/DataDog/gohai v0.0.0-20220718130825-1776f9beb9cc/go.mod h1:oyPC4jWHHjVVNjslDAKp8EqfQBaSmODjHt4HCX+C+9Q= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1 h1:16YkGLmeJH830m3dG0owtdSMXDkmTZdRd1EWZ1XIO6M= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1/go.mod h1:re1FCVuKWovntr4bODIUe+iYT2Al0gbS0WK726XLz7w= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.8.1 h1:0GyngySyxePf1RozAdm8p51uxT/kDsxqhzWPZGNrqVg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 h1:ly/egks++IqejMVPcp0OWV1fcL+Nsq4EHF48AAQPKu4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1/go.mod h1:8jOAAH5PrNN6zICpu65M7mNPAeOQsW5Wk/sq80txutA= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1 h1:UizDxaGWPDNzR2orQTE9poYyP09B2OhlaeiY5vdr+EU= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1/go.mod h1:2043mFAA2cD68ilZ93/5zZfL9BxWwj8z9sleaw3rtiY= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 h1:TbZDzUrW8iahevDY5Xw+j1EfrX8XZdeg/M6UYBl9mxg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1/go.mod h1:nVIKiAwP/Zd8IFxeHhEAiirJRH1kOOoZ315HQeSEkng= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 h1:4cyzwoXrnjElTIlsFbpyXQkAJs3+6ly9HExOu9lrup4= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1/go.mod h1:3AEt8/uCtbpzjPOPPxIBDcR1qcUq2hBbrkrdE/qNfb0= -github.com/DataDog/sketches-go v1.4.3 h1:ZB9nijteJRFUQixkQfatCqASartGNfiolIlMiEv3u/w= -github.com/DataDog/sketches-go v1.4.3/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= +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.4 h1:PTIZJAsfnr2XLB3V3duL+mSbZvYV8G3XQ9e57KyOuOA= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.4/go.mod h1:5yS6i90MEZS3NG+o7PrQQ8i7OaEMzwQvn4bCZ9h9Rao= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.4 h1:B2R7Wh791uphpltmorbvvdKk0rJOhoExwM4NnE7hXTg= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.4/go.mod h1:Tk2wwdBgWeSvDPtrGGyym8CdVWSuphiToGc/tRvFoNQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0 h1:10TPqpTlIkmDPFWVIEZ4ZX3rWrCrx3rEoeoAooZr6LM= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0/go.mod h1:dvIWN9pA2zWNTw5rhDWZgzZnhcfpH++d+8d1SWW6xkY= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4 h1:dU9oPMbAr/wYMNdzhu0pxIhAJOn1Btj1T3ZSyY6RvY0= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4/go.mod h1:ud/Xr5TWUopcaGHdkh9RN8lhnCAFa95X16Rb5mrkE18= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4 h1:ZuYc5Ql/GSyAEMgpKkbQiHOtIHkEpYujITW1wIVFgLE= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4/go.mod h1:YSntkplFoUM1mepnPeJFsoblqD0Wdi+Avg1/d1upgZQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4 h1:t/Zh8ztLDBOMRMiuVNFthWMMG5F4POgc5M6+Y3DTX9g= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4/go.mod h1:JfdBBDreQfbIN5FYrAtZV3VmQMXnf9o4tMbaMxWqe40= +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= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0 h1:tk85AYGwOf6VNtoOQi8w/kVDi2vmPxp3/OU2FsUpdcA= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0/go.mod h1:Xx0VKh7GJ4si3rmElbh19Mejxz68ibWg/J30ZOMrqzU= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0 h1:PWcDbDjrcT/ZHLn4Bc/FuglaZZVPP8bWO/YRmJBbe38= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0/go.mod h1:XEK/YHYsi+Wk2Bk1+zi/he+gjRfDWtoIZEZwuwcYjhk= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -98,35 +101,32 @@ github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb0 github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Showmax/go-fqdn v1.0.0 h1:0rG5IbmVliNT5O19Mfuvna9LL7zlHyRfsSvBPZmF9tM= +github.com/Showmax/go-fqdn v1.0.0/go.mod h1:SfrFBzmDCtCGrnHhoDjuvFnKsWjEQX/Q9ARZvOrJAko= github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= -github.com/alecthomas/participle/v2 v2.1.0 h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4= -github.com/alecthomas/participle/v2 v2.1.0/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= 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/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= +github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -135,9 +135,10 @@ github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1 github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= 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-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0= -github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= +github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= +github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -146,11 +147,19 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= +github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/digitalocean/godo v1.109.0 h1:4W97RJLJSUQ3veRZDNbp1Ol3Rbn6Lmt9bKGvfqYI5SU= +github.com/digitalocean/godo v1.109.0/go.mod h1:R6EmmWI8CT1+fCtjWY9UCB+L5uufuZH13wk3YhxycCs= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= @@ -160,15 +169,21 @@ github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+m github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI= +github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= 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/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= +github.com/expr-lang/expr v1.16.3 h1:NLldf786GffptcXNxxJx5dQ+FzeWDKChBDqOOwyK8to= +github.com/expr-lang/expr v1.16.3/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -178,44 +193,42 @@ github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyT github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= +github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= +github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= +github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= +github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= +github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= @@ -223,9 +236,10 @@ github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MG github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= +github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -237,8 +251,6 @@ github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -246,19 +258,17 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -269,115 +279,146 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ZWj6lSlDF3F74SfKwfTCer72Q= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= +github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gophercloud/gophercloud v1.8.0 h1:TM3Jawprb2NrdOnvcHhWJalmKmAmOGgfZElM/3oBYCk= +github.com/gophercloud/gophercloud v1.8.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= +github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/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/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/hashicorp/consul/api v1.28.2 h1:mXfkRHrpHN4YY3RqL09nXU1eHKLNiuAN4kHvDQ16k/8= +github.com/hashicorp/consul/api v1.28.2/go.mod h1:KyzqzgMEya+IZPcD65YFoOVAgPpbfERu4I/tzG6/ueE= +github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= +github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= +github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= 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/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702 h1:fI1LXuBaS1d9z1kmb++Og6YD8uMRwadXorCwE+xgOFA= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702/go.mod h1:z71gkJdrkAt/Rl6C7Q79VE7AwJ5lUF+M+fzFTyIHYB0= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= +github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= +github.com/hetznercloud/hcloud-go/v2 v2.6.0 h1:RJOA2hHZ7rD1pScA4O1NF6qhkHyUdbbxjHgFNot8928= +github.com/hetznercloud/hcloud-go/v2 v2.6.0/go.mod h1:4J1cSE57+g0WS93IiHLV7ubTHItcp+awzeBp5bM9mfA= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= -github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 h1:s9ZL6ZhFF8y6ebnm1FLvobkzoIu5xwDQUcRPk/IEhpM= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 h1:2r2WiFeAwiJ/uyx1qIKnV1L4C9w/2V8ehlbJY4gjFaM= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4/go.mod h1:1yEQhaLb/cETXCqQmdh7lDjupNAReO7c83AHyK2dJ48= +github.com/ionos-cloud/sdk-go/v6 v6.1.11 h1:J/uRN4UWO3wCyGOeDdMKv8LWRzKu6UIkLEaes38Kzh8= +github.com/ionos-cloud/sdk-go/v6 v6.1.11/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= 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/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/karrick/godirwalk v1.17.0 h1:b4kY7nqDdioR/6qnbHQyDvmA17u5G1cZ6J+CZXwSWoI= github.com/karrick/godirwalk v1.17.0/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= 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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 h1:bCiVCRCs1Heq84lurVinUPy19keqGEe4jh5vtK37jcg= +github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= github.com/leoluk/perflib_exporter v0.2.1 h1:/3/ut1k/jFt5p4ypjLZKDHDqlXAK6ERZPVWtwdI389I= +github.com/leoluk/perflib_exporter v0.2.1/go.mod h1:MinSWm88jguXFFrGsP56PtleUb4Qtm4tNRH/wXNXRTI= github.com/lightstep/go-expohisto v1.0.0 h1:UPtTS1rGdtehbbAF7o/dhkWLTDI73UifG8LbfQI7cA4= +github.com/lightstep/go-expohisto v1.0.0/go.mod h1:xDXD0++Mu2FOaItXtdDfksfgxfV0z1TMPa+e/EUd0cs= +github.com/linode/linodego v1.30.0 h1:6HJli+LX7NGu+Sne2G+ux790EkVOWOV/SR4mK3jcs6k= +github.com/linode/linodego v1.30.0/go.mod h1:/46h/XpmWi//oSA92GX2p3FIxb8HbX7grslPPQalR2o= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c h1:VtwQ41oftZwlMnOEbMWQtSEUgU64U4s+GHk7hZK+jtY= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE= @@ -387,16 +428,20 @@ github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7 github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4= +github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= +github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +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/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= @@ -412,7 +457,7 @@ github.com/mostynb/go-grpc-compression v1.2.2/go.mod h1:GOCr2KBxXcblCuczg3YdLQlc github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -420,12 +465,16 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= 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/openshift/api v0.0.0-20180801171038-322a19404e37 h1:05irGU4HK4IauGGDbsk+ZHrm1wOzMLYjMlfaiqMrBYc= @@ -436,13 +485,15 @@ github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 h1:ZHRIMCFIJN1 github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142/go.mod h1:fjS8r9mqDVsPb5td3NehsNOAWa4uiFkYEfVZioQ2gH0= github.com/outcaste-io/ristretto v0.2.1 h1:KCItuNIGJZcursqHr3ghO7fc5ddZLEHspL9UR0cQM64= github.com/outcaste-io/ristretto v0.2.1/go.mod h1:W8HywhmtlopSB1jeMg3JtdIhf+DYkLAr0VN/s4+MHac= +github.com/ovh/go-ovh v1.4.3 h1:Gs3V823zwTFpzgGLZNI6ILS4rmxZgJwJCz54Er9LwD0= +github.com/ovh/go-ovh v1.4.3/go.mod h1:AkPXVtgwB6xlKblMjRKJJmjRp+ogrE7fz2lVgcQY8SY= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -451,56 +502,36 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c h1:NRoLoZvkBTKvR5gQLgA3e0hqjkY9u1wm+iOL45VN/qI= github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/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.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= +github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= +github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= +github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= +github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e h1:UmqAuY2OyDoog8+l5FybViJE5B2r+UxVGCUwFTsY5AA= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e/go.mod h1:+0ld+ozir7zWFcHA2vVpWAKxXakIioEjPPNOqH+J3ZA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 h1:/8rfZAdFfafRXOgz+ZpMZZWZ5pYggCY9t7e/BvjaBHM= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= -github.com/shirou/gopsutil/v3 v3.22.2/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/shirou/gopsutil/v3 v3.22.12/go.mod h1:Xd7P1kwZcp5VW52+9XsirIKd/BROzbb2wdX3Kqlz9uI= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= @@ -509,11 +540,11 @@ github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzu github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= 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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -522,137 +553,164 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.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.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU= github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k= -github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= +github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= 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.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= +github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= +github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= +github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= +github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zorkian/go-datadog-api v2.30.0+incompatible h1:R4ryGocppDqZZbnNc5EDR8xGWF/z/MxzWnqTUijDQes= +github.com/zorkian/go-datadog-api v2.30.0+incompatible/go.mod h1:PkXwHX9CUQa/FpB9ZwAD45N1uhCW4MT/Wj7m36PbKss= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/configgrpc v0.89.0/go.mod h1:2GuAxpU34a1X19kCZ8Kw3FUsxOIiFcWHiYorRCyhnCc= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/exporter/debugexporter v0.89.0 h1:MQUEX4OWszJQqQMqtYERiiw02Ta9QMWPe/hHWoD4YBU= -go.opentelemetry.io/collector/exporter/debugexporter v0.89.0/go.mod h1:eLoVrKOjgPvAmg0XJuellJ03zEpEol26l8i48Rhv53Q= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 h1:opvHcGANx+dS4HJwGTPtRMd6dZdOmmGn6c3PfW/bihQ= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/otelcol v0.89.0 h1:b3kC0zM9T6GxjhTcNEHIzXDd4zTIc7cBpexCPZ9nPzg= -go.opentelemetry.io/collector/otelcol v0.89.0/go.mod h1:BILxDcJe32wK+paX7ssnt4jyjOmTkIHvXe9JNjlHUk8= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 h1:oTEOHs2t00f9LfRwZGzKSXJPR3FHjPDDhjt05iWXYZM= -go.opentelemetry.io/collector/processor/batchprocessor v0.89.0/go.mod h1:xaTfwrIbnsUpvaUCIecvlH8wTH500U7LtczdaEPXmmk= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 h1:ayqzWyj56xyc0tcBpaYjWtxvj5pfZNhYC8LrwvlLAeE= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0/go.mod h1:7p2oZ09hP+h6WpTv67PgEJx+azViVqLBE4IfrnDOWOc= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/collector/service v0.89.0/go.mod h1:6IAr9Asn6t6YxSw6Qv5LwA+ilVUtP0nQsu1xzc9+mZA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0 h1:Yty9Vs4F3D6/liF1o6FNt0PvN85h/BJJ6DQKJ3nrcM0= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0/go.mod h1:On4VgbkqYL18kbJlWsa18+cMNe6rYpBnPi1ARI/BrsU= -go.opentelemetry.io/contrib/zpages v0.45.0 h1:jIwHHGoWzJoZdbIUtWdErjL85Gni6BignnAFqDtMRL4= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0 h1:E/sf+2slCUb7wqh5FHwhdwKWTA+VXyMMAcFNlKVf4yw= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0/go.mod h1:2xuXI78Xp9cttLsJMF/Y08cJUqckLt0kLasn+vcHR5w= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0/go.mod h1:hbzqqcIxyywu6UQ5J1wb4ntla8nCwCfNBZnMo2Dgh48= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0/go.mod h1:qmFtGlXhoa9qPt5RrZgMp4f5RfRagucrdriI+hb3yWQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0/go.mod h1:CMJYNAfooOwSZSAmAeMUV1M+TXld3BiK++z9fqIm2xk= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0/go.mod h1:nZStMoc1H/YJpRjSx9IEX4abBMekORTLQcTUT1CgLkg= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 h1:vcSjcjn/BTeM6abI5CDymZdtd1m24quD1Mx4VE3N3fM= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0/go.mod h1:HblEnlZQNsVuuDpszdKTWcrHBI09OjBn2pWSzBx1goM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 h1:4s9HxB4azeeQkhY0GE5wZlMj4/pz8tE5gx2OQpGUw58= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0/go.mod h1:djVA3TUJ2fSdMX0JE5XxFBOaZzprElJoP7fD4vnV2SU= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -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.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 h1:lRhfcLr3gK5S/zn92h3clyOPnCvvNKs1WTMbtH4UvO0= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0/go.mod h1:vNMFTWe4dF05LsodUOc84OfxdlYVp1kCMuZzb41WfAk= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 h1:x/VsGlBj+DtJCXIucwzwcxiwnwAU8a6ALK6UN8fPdKQ= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0/go.mod h1:BapTGXu7CYrQGNohbapPwTSt2Ty/k/c6Oemx9mSSiK4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 h1:SxDS+Yr8qE+ID58ELR5n0D+SUlqHKOZ72pK3YPFAelA= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0/go.mod h1:DEoB0d0k1iGt4KEABntL8AW9xYQ6E7fmgkM2/s8aXvM= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 h1:C02SPbRPvrtmZ9TvsHWpz2TvHzqY5mNyEAlDdhax/a4= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0/go.mod h1:dzZKtykJio3Rm+G+Cmr15VV3xKp0PmFuh9Q9b3c1K7A= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 h1:04zGXVQZ8D6nvoPX8AaqxWxGHNNVsGR78E+tY+2VQr8= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0/go.mod h1:+UrRiugWaQPssz4mgEgQQo640f2bDUCFlo2Xr0/5ulc= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 h1:JYpDN0OnMsu0awk0rjaYEIko9hFzzBJ6+2U5W2iVvUE= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0/go.mod h1:xrXL804nBum1PgbvmJQ4I+hyW+DU4xBGO3MKMiYFX6E= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 h1:zAFCXYzpxDh64BIVujqntlN5RE4jDahbPfJBy/Wq7D0= +go.opentelemetry.io/collector/exporter/debugexporter v0.98.0/go.mod h1:S15ELDQFoP5da3NHzXJR2I8FGUnM2C1Hp6e/OhaCtw0= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 h1:JfvsDpTwAhA9au8/4vmONRh0OBVU6n36seb41JD/mTQ= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0/go.mod h1:t1zDwy6kYp4w1JgcGHMvdGbKYHqWpK00bB1AEQ0Oqlc= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/otelcol v0.98.0 h1:sUk49Wqw+VBYeDynEA+GSeVEusFvzFW3KuF2vfDbyo0= +go.opentelemetry.io/collector/otelcol v0.98.0/go.mod h1:dW3UzuaiaNTddjKajk3Tp2Y7muDvYJdQz2yGUOE53gs= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 h1:iM4fMLGig3GKmz5XNtOPKDsnCnvbi0+UHYaWsx/aSRc= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0/go.mod h1:ROnuUkZJgpKEIDf3AIVjgRGNI7KPqCKPXsw8whL6Hzs= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0 h1:1jjiC3POfIluGLVM+6y8nolKEI95/vlHAvDmIOatags= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0/go.mod h1:VQDDrhQbIoelGF+fKzy6vCQM3hWDCH2YFaZKqgTDmGk= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 h1:j7lfLwc5o1dtXIPXU8LjmxadejmJVRHN57ZYGH33Wq4= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0/go.mod h1:uWDBDxaWuzF1U5S2UIhstO0+Q8aUiwiUu8uO1IYN2XQ= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/collector/service v0.98.0 h1:lLJ7VXPXcV62fSISh4GuNd5ti6WvKje76NSgezc3ydo= +go.opentelemetry.io/collector/service v0.98.0/go.mod h1:wB7ozvZTHtMefb5KTYy5nyrVYWpGk8teq8jWFs4blIU= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0 h1:QU8UEKyPqgr/8vCC9LlDmkPnfFmiWAUF9GtJdcLz+BU= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0/go.mod h1:qonC7wyvtX1E6cEpAR+bJmhcGr6IVRGc/f6ZTpvi7jA= +go.opentelemetry.io/contrib/zpages v0.50.0 h1:hKC5asr83xDN4ErwSHVdk3gv053pZiF8SZKmS86IPEw= +go.opentelemetry.io/contrib/zpages v0.50.0/go.mod h1:8WovRn95fZdaX/dr3e4h7D8IqiVsnZ+WxY0Yn4LyU3k= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0 h1:0o/9KwAgxjK+3pMV0pwIF5toYHqDsPmQhfrBvKaG6mU= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0/go.mod h1:rZyTdpmRqoV+PpUn6QlruxJp/kE4765rPy0pP6mRDk8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 h1:hDKnobznDpcdTlNzO0S/owRB8tyVr1OoeZZhDoqY+Cs= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0/go.mod h1:kUDQaUs1h8iTIHbQTk+iJRiUvSfJYMMKTtMCaiVu7B0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 h1:Wc4hZuYXhVqq+TfRXLXlmNIL/awOanGx8ssq3ciDQxc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0/go.mod h1:BydOvapRqVEc0DVz27qWBX2jq45Ca5TI9mhZBDIdweY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 h1:vOL89uRfOCCNIjkisd0r7SEdJF3ZJFyCNY34fdZs8eU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0/go.mod h1:8GlBGcDk8KKi7n+2S4BT/CPZQYH3erLu0/k64r1MYgo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 h1:d7nHbdzU84STOiszaOxQ3kw5IwkSmHsU5Muol5/vL4I= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0/go.mod h1:yiPA1iZbb/EHYnODXOxvtKuB0I2hV8ehfLTEWpl7BJU= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 h1:0vZZdECYzhTt9MKQZ5qQ0V+J3MFu4MQaQ3COfugF+FQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0/go.mod h1:e7iXx3HjaSSBXfy9ykVUlupS2Vp7LBIBuT21ousM2Hk= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= 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-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -661,7 +719,9 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -672,8 +732,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +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/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -696,12 +756,12 @@ 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.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -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/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -711,7 +771,6 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -721,52 +780,37 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +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-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -778,7 +822,6 @@ golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -786,14 +829,6 @@ golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -801,44 +836,40 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= @@ -869,30 +900,21 @@ golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= 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= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -902,21 +924,16 @@ google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.168.0 h1:MBRe+Ki4mMN93jhDDbpuRLjRddooArz4FeSObvUMmjY= +google.golang.org/api v0.168.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -934,23 +951,12 @@ google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -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-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -959,13 +965,9 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= +google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -974,15 +976,12 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -993,13 +992,13 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -1013,30 +1012,29 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= -k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= -k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= -k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= @@ -1044,8 +1042,8 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/exporter/datadogexporter/integrationtest/integration_test.go b/exporter/datadogexporter/integrationtest/integration_test.go index 12b9199d2ae7..738709d5e76d 100644 --- a/exporter/datadogexporter/integrationtest/integration_test.go +++ b/exporter/datadogexporter/integrationtest/integration_test.go @@ -33,7 +33,9 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" + "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" + apitrace "go.opentelemetry.io/otel/trace" "google.golang.org/protobuf/proto" "github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector" @@ -79,9 +81,6 @@ func TestIntegration(t *testing.T) { for _, tps := range traces.TracerPayloads { for _, chunks := range tps.Chunks { spans = append(spans, chunks.Spans...) - for _, span := range chunks.Spans { - assert.Equal(t, span.Meta["_dd.stats_computed"], "true") - } } } @@ -90,12 +89,15 @@ func TestIntegration(t *testing.T) { var spl pb.StatsPayload require.NoError(t, msgp.Decode(gz, &spl)) for _, csps := range spl.Stats { + assert.Equal(t, "datadogexporter-otelcol-tests", spl.AgentVersion) for _, csbs := range csps.Stats { stats = append(stats, csbs.Stats...) for _, stat := range csbs.Stats { assert.True(t, strings.HasPrefix(stat.Resource, "TestSpan")) - assert.Equal(t, stat.Hits, uint64(1)) - assert.Equal(t, stat.TopLevelHits, uint64(1)) + assert.Equal(t, uint64(1), stat.Hits) + assert.Equal(t, uint64(1), stat.TopLevelHits) + assert.Equal(t, "client", stat.SpanKind) + assert.Equal(t, []string{"extra_peer_tag:tag_val", "peer.service:svc"}, stat.PeerTags) } } } @@ -167,6 +169,10 @@ processors: connectors: datadog/connector: + traces: + compute_stats_by_span_kind: true + peer_tags_aggregation: true + peer_tags: ["extra_peer_tag"] exporters: debug: @@ -185,6 +191,9 @@ exporters: endpoint: %q service: + telemetry: + metrics: + level: none pipelines: traces: receivers: [otlp] @@ -206,7 +215,7 @@ service: _, err = otelcoltest.LoadConfigAndValidate(confFile.Name(), factories) require.NoError(t, err, "All yaml config must be valid.") - fmp := fileprovider.New() + fmp := fileprovider.NewWithSettings(confmap.ProviderSettings{}) configProvider, err := otelcol.NewConfigProvider( otelcol.ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ @@ -250,22 +259,40 @@ func sendTraces(t *testing.T) { traceExporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure()) require.NoError(t, err) bsp := sdktrace.NewBatchSpanProcessor(traceExporter) + r1, _ := resource.New(ctx, resource.WithAttributes(attribute.String("k8s.node.name", "aaaa"))) + r2, _ := resource.New(ctx, resource.WithAttributes(attribute.String("k8s.node.name", "bbbb"))) tracerProvider := sdktrace.NewTracerProvider( sdktrace.WithSampler(sdktrace.AlwaysSample()), sdktrace.WithSpanProcessor(bsp), + sdktrace.WithResource(r1), + ) + tracerProvider2 := sdktrace.NewTracerProvider( + sdktrace.WithSampler(sdktrace.AlwaysSample()), + sdktrace.WithSpanProcessor(bsp), + sdktrace.WithResource(r2), ) otel.SetTracerProvider(tracerProvider) defer func() { require.NoError(t, tracerProvider.Shutdown(ctx)) + require.NoError(t, tracerProvider2.Shutdown(ctx)) }() tracer := otel.Tracer("test-tracer") for i := 0; i < 10; i++ { - _, span := tracer.Start(ctx, fmt.Sprintf("TestSpan%d", i)) + _, span := tracer.Start(ctx, fmt.Sprintf("TestSpan%d", i), apitrace.WithSpanKind(apitrace.SpanKindClient)) + + if i == 3 { + // Send some traces from a different resource + // This verifies that stats from different hosts don't accidentally create extraneous empty stats buckets + otel.SetTracerProvider(tracerProvider2) + tracer = otel.Tracer("test-tracer2") + } // Only sample 5 out of the 10 spans if i < 5 { span.SetAttributes(attribute.Bool("sampled", true)) } + span.SetAttributes(attribute.String("peer.service", "svc")) + span.SetAttributes(attribute.String("extra_peer_tag", "tag_val")) span.End() } time.Sleep(1 * time.Second) diff --git a/exporter/datadogexporter/internal/clientutil/api.go b/exporter/datadogexporter/internal/clientutil/api.go index 616627d9b9f0..60bbaeb36dec 100644 --- a/exporter/datadogexporter/internal/clientutil/api.go +++ b/exporter/datadogexporter/internal/clientutil/api.go @@ -11,7 +11,7 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadogV1" "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/config/confighttp" "go.uber.org/zap" zorkian "gopkg.in/zorkian/go-datadog-api.v2" ) @@ -20,10 +20,10 @@ import ( var GZipSubmitMetricsOptionalParameters = datadogV2.NewSubmitMetricsOptionalParameters().WithContentEncoding(datadogV2.METRICCONTENTENCODING_GZIP) // CreateAPIClient creates a new Datadog API client -func CreateAPIClient(buildInfo component.BuildInfo, endpoint string, settings exporterhelper.TimeoutSettings, insecureSkipVerify bool) *datadog.APIClient { +func CreateAPIClient(buildInfo component.BuildInfo, endpoint string, hcs confighttp.ClientConfig) *datadog.APIClient { configuration := datadog.NewConfiguration() configuration.UserAgent = UserAgent(buildInfo) - configuration.HTTPClient = NewHTTPClient(settings, insecureSkipVerify) + configuration.HTTPClient = NewHTTPClient(hcs) configuration.Compress = true configuration.Servers = datadog.ServerConfigurations{ { diff --git a/exporter/datadogexporter/internal/clientutil/http.go b/exporter/datadogexporter/internal/clientutil/http.go index 2b19d3c22d67..4b69ebdef6e3 100644 --- a/exporter/datadogexporter/internal/clientutil/http.go +++ b/exporter/datadogexporter/internal/clientutil/http.go @@ -11,7 +11,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/config/confighttp" ) var ( @@ -27,21 +27,50 @@ var ( } ) -// NewHTTPClient returns a http.Client configured with the Agent options. -func NewHTTPClient(settings exporterhelper.TimeoutSettings, insecureSkipVerify bool) *http.Client { +// NewHTTPClient returns a http.Client configured with a subset of the confighttp.ClientConfig options. +func NewHTTPClient(hcs confighttp.ClientConfig) *http.Client { + transport := http.Transport{ + Proxy: http.ProxyFromEnvironment, + // Default values consistent with https://github.com/DataDog/datadog-agent/blob/f9ae7f4b842f83b23b2dfe3f15d31f9e6b12e857/pkg/util/http/transport.go#L91-L106 + DialContext: (&net.Dialer{ + Timeout: 30 * time.Second, + // Enables TCP keepalives to detect broken connections + KeepAlive: 30 * time.Second, + // Disable RFC 6555 Fast Fallback ("Happy Eyeballs") + FallbackDelay: -1 * time.Nanosecond, + }).DialContext, + MaxIdleConns: 100, + MaxIdleConnsPerHost: 5, + // This parameter is set to avoid connections sitting idle in the pool indefinitely + IdleConnTimeout: 45 * time.Second, + TLSHandshakeTimeout: 10 * time.Second, + ExpectContinueTimeout: 1 * time.Second, + // Not supported by intake + ForceAttemptHTTP2: false, + TLSClientConfig: &tls.Config{InsecureSkipVerify: hcs.TLSSetting.InsecureSkipVerify}, + } + if hcs.ReadBufferSize > 0 { + transport.ReadBufferSize = hcs.ReadBufferSize + } + if hcs.WriteBufferSize > 0 { + transport.WriteBufferSize = hcs.WriteBufferSize + } + if hcs.MaxIdleConns != nil { + transport.MaxIdleConns = *hcs.MaxIdleConns + } + if hcs.MaxIdleConnsPerHost != nil { + transport.MaxIdleConnsPerHost = *hcs.MaxIdleConnsPerHost + } + if hcs.MaxConnsPerHost != nil { + transport.MaxConnsPerHost = *hcs.MaxConnsPerHost + } + if hcs.IdleConnTimeout != nil { + transport.IdleConnTimeout = *hcs.IdleConnTimeout + } + transport.DisableKeepAlives = hcs.DisableKeepAlives return &http.Client{ - Timeout: settings.Timeout, - Transport: &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - // Disable RFC 6555 Fast Fallback ("Happy Eyeballs") - FallbackDelay: -1 * time.Nanosecond, - }).DialContext, - MaxIdleConns: 100, - // Not supported by intake - ForceAttemptHTTP2: false, - TLSClientConfig: &tls.Config{InsecureSkipVerify: insecureSkipVerify}, - }, + Timeout: hcs.Timeout, + Transport: &transport, } } diff --git a/exporter/datadogexporter/internal/clientutil/http_test.go b/exporter/datadogexporter/internal/clientutil/http_test.go index db6e02360a46..db2eea93cb50 100644 --- a/exporter/datadogexporter/internal/clientutil/http_test.go +++ b/exporter/datadogexporter/internal/clientutil/http_test.go @@ -4,11 +4,18 @@ package clientutil // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/clientutil" import ( + "crypto/tls" "net/http" "testing" + "time" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configcompression" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configtls" ) var ( @@ -18,6 +25,73 @@ var ( } ) +func TestNewHTTPClient(t *testing.T) { + hcsEmpty := confighttp.ClientConfig{} + client1 := NewHTTPClient(hcsEmpty) + defaultTransport := &http.Transport{ + MaxIdleConns: 100, + MaxIdleConnsPerHost: 5, + IdleConnTimeout: 45 * time.Second, + TLSHandshakeTimeout: 10 * time.Second, + ExpectContinueTimeout: 1 * time.Second, + ForceAttemptHTTP2: false, + TLSClientConfig: &tls.Config{InsecureSkipVerify: false}, + } + if diff := cmp.Diff( + defaultTransport, + client1.Transport.(*http.Transport), + cmpopts.IgnoreUnexported(http.Transport{}, tls.Config{}), + cmpopts.IgnoreFields(http.Transport{}, "Proxy", "DialContext")); diff != "" { + t.Errorf("Mismatched transports -want +got %s", diff) + } + assert.Equal(t, time.Duration(0), client1.Timeout) + + idleConnTimeout := 30 * time.Second + maxIdleConn := 300 + maxIdleConnPerHost := 150 + maxConnPerHost := 250 + hcs := confighttp.ClientConfig{ + ReadBufferSize: 100, + WriteBufferSize: 200, + Timeout: 10 * time.Second, + IdleConnTimeout: &idleConnTimeout, + MaxIdleConns: &maxIdleConn, + MaxIdleConnsPerHost: &maxIdleConnPerHost, + MaxConnsPerHost: &maxConnPerHost, + DisableKeepAlives: true, + TLSSetting: configtls.ClientConfig{InsecureSkipVerify: true}, + + // The rest are ignored + Endpoint: "endpoint", + ProxyURL: "proxy", + Compression: configcompression.TypeSnappy, + HTTP2ReadIdleTimeout: 15 * time.Second, + HTTP2PingTimeout: 20 * time.Second, + } + client2 := NewHTTPClient(hcs) + expectedTransport := &http.Transport{ + TLSHandshakeTimeout: 10 * time.Second, + ExpectContinueTimeout: 1 * time.Second, + ReadBufferSize: 100, + WriteBufferSize: 200, + MaxIdleConns: maxIdleConn, + MaxIdleConnsPerHost: maxIdleConnPerHost, + MaxConnsPerHost: maxConnPerHost, + IdleConnTimeout: idleConnTimeout, + DisableKeepAlives: true, + ForceAttemptHTTP2: false, + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + } + if diff := cmp.Diff( + expectedTransport, + client2.Transport.(*http.Transport), + cmpopts.IgnoreUnexported(http.Transport{}, tls.Config{}), + cmpopts.IgnoreFields(http.Transport{}, "Proxy", "DialContext")); diff != "" { + t.Errorf("Mismatched transports -want +got %s", diff) + } + assert.Equal(t, 10*time.Second, client2.Timeout) +} + func TestUserAgent(t *testing.T) { assert.Equal(t, UserAgent(buildInfo), "otelcontribcol/1.0") diff --git a/exporter/datadogexporter/internal/clientutil/package_test.go b/exporter/datadogexporter/internal/clientutil/package_test.go new file mode 100644 index 000000000000..5f1943db73b8 --- /dev/null +++ b/exporter/datadogexporter/internal/clientutil/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package clientutil + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/datadogexporter/internal/clientutil/retrier.go b/exporter/datadogexporter/internal/clientutil/retrier.go index 56dafe2b67bc..da7d75946ba3 100644 --- a/exporter/datadogexporter/internal/clientutil/retrier.go +++ b/exporter/datadogexporter/internal/clientutil/retrier.go @@ -9,20 +9,20 @@ import ( "time" "github.com/cenkalti/backoff/v4" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer/consumererror" - "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/scrub" ) type Retrier struct { - cfg exporterhelper.RetrySettings + cfg configretry.BackOffConfig logger *zap.Logger scrubber scrub.Scrubber } -func NewRetrier(logger *zap.Logger, settings exporterhelper.RetrySettings, scrubber scrub.Scrubber) *Retrier { +func NewRetrier(logger *zap.Logger, settings configretry.BackOffConfig, scrubber scrub.Scrubber) *Retrier { return &Retrier{ cfg: settings, logger: logger, diff --git a/exporter/datadogexporter/internal/clientutil/retrier_test.go b/exporter/datadogexporter/internal/clientutil/retrier_test.go index 61f3cdc13306..a52ec759d56b 100644 --- a/exporter/datadogexporter/internal/clientutil/retrier_test.go +++ b/exporter/datadogexporter/internal/clientutil/retrier_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/config/configretry" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/scrub" @@ -21,7 +21,7 @@ import ( func TestDoWithRetries(t *testing.T) { scrubber := scrub.NewScrubber() - retrier := NewRetrier(zap.NewNop(), exporterhelper.NewDefaultRetrySettings(), scrubber) + retrier := NewRetrier(zap.NewNop(), configretry.NewDefaultBackOffConfig(), scrubber) ctx := context.Background() retryNum, err := retrier.DoWithRetries(ctx, func(context.Context) error { return nil }) @@ -29,7 +29,7 @@ func TestDoWithRetries(t *testing.T) { assert.Equal(t, retryNum, int64(0)) retrier = NewRetrier(zap.NewNop(), - exporterhelper.RetrySettings{ + configretry.BackOffConfig{ Enabled: true, InitialInterval: 5 * time.Millisecond, MaxInterval: 30 * time.Millisecond, @@ -44,7 +44,7 @@ func TestDoWithRetries(t *testing.T) { func TestNoRetriesOnPermanentError(t *testing.T) { scrubber := scrub.NewScrubber() - retrier := NewRetrier(zap.NewNop(), exporterhelper.NewDefaultRetrySettings(), scrubber) + retrier := NewRetrier(zap.NewNop(), configretry.NewDefaultBackOffConfig(), scrubber) ctx := context.Background() respNonRetriable := http.Response{StatusCode: 404} diff --git a/exporter/datadogexporter/internal/hostmetadata/config.go b/exporter/datadogexporter/internal/hostmetadata/config.go index 5b7be16b7865..d5c4a3e34160 100644 --- a/exporter/datadogexporter/internal/hostmetadata/config.go +++ b/exporter/datadogexporter/internal/hostmetadata/config.go @@ -4,7 +4,8 @@ package hostmetadata // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata" import ( - "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" ) // PusherConfig is the configuration for the metadata pusher goroutine. @@ -21,8 +22,8 @@ type PusherConfig struct { UseResourceMetadata bool // InsecureSkipVerify is the value of `tls.insecure_skip_verify` on the configuration. InsecureSkipVerify bool - // TimeoutSettings of exporter. - TimeoutSettings exporterhelper.TimeoutSettings + // ClientConfig of exporter. + ClientConfig confighttp.ClientConfig // RetrySettings of exporter. - RetrySettings exporterhelper.RetrySettings + RetrySettings configretry.BackOffConfig } diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/azure/package_test.go b/exporter/datadogexporter/internal/hostmetadata/internal/azure/package_test.go new file mode 100644 index 000000000000..c7b9e1e8dda9 --- /dev/null +++ b/exporter/datadogexporter/internal/hostmetadata/internal/azure/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package azure + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/ec2/package_test.go b/exporter/datadogexporter/internal/hostmetadata/internal/ec2/package_test.go new file mode 100644 index 000000000000..84becb4326f7 --- /dev/null +++ b/exporter/datadogexporter/internal/hostmetadata/internal/ec2/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ec2 + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/ecs/package_test.go b/exporter/datadogexporter/internal/hostmetadata/internal/ecs/package_test.go new file mode 100644 index 000000000000..d53a4a4d11c2 --- /dev/null +++ b/exporter/datadogexporter/internal/hostmetadata/internal/ecs/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ecs + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/gcp/package_test.go b/exporter/datadogexporter/internal/hostmetadata/internal/gcp/package_test.go new file mode 100644 index 000000000000..3f4c7e378e6d --- /dev/null +++ b/exporter/datadogexporter/internal/hostmetadata/internal/gcp/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package gcp + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/gohai/gohai.go b/exporter/datadogexporter/internal/hostmetadata/internal/gohai/gohai.go index d3c3a8dddda2..344ae0746a1a 100644 --- a/exporter/datadogexporter/internal/hostmetadata/internal/gohai/gohai.go +++ b/exporter/datadogexporter/internal/hostmetadata/internal/gohai/gohai.go @@ -26,34 +26,44 @@ func newGohai(logger *zap.Logger) *gohai.Gohai { res := new(gohai.Gohai) if p, err := new(cpu.Cpu).Collect(); err != nil { - logger.Info("Failed to retrieve cpu metadata", zap.Error(err)) + logger.Debug("Failed to retrieve cpu metadata", zap.Error(err)) + } else if cpu, ok := p.(map[string]string); !ok { + logger.Warn("Internal error: Failed to cast cpu metadata to map[string]string", zap.Any("cpu", p)) } else { - res.CPU = p + res.CPU = cpu } if p, err := new(filesystem.FileSystem).Collect(); err != nil { - logger.Info("Failed to retrieve filesystem metadata", zap.Error(err)) + logger.Debug("Failed to retrieve filesystem metadata", zap.Error(err)) + } else if fs, ok := p.([]any); !ok { + logger.Warn("Internal error: Failed to cast filesystem metadata to []any", zap.Any("filesystem", p)) } else { - res.FileSystem = p + res.FileSystem = fs } if p, err := new(memory.Memory).Collect(); err != nil { - logger.Info("Failed to retrieve memory metadata", zap.Error(err)) + logger.Debug("Failed to retrieve memory metadata", zap.Error(err)) + } else if mem, ok := p.(map[string]string); !ok { + logger.Warn("Internal error: Failed to cast memory metadata to map[string]string", zap.Any("memory", p)) } else { - res.Memory = p + res.Memory = mem } // in case of containerized environment, this would return pod id not node's ip if p, err := new(network.Network).Collect(); err != nil { - logger.Info("Failed to retrieve network metadata", zap.Error(err)) + logger.Debug("Failed to retrieve network metadata", zap.Error(err)) + } else if net, ok := p.(map[string]any); !ok { + logger.Warn("Internal error: Failed to cast network metadata to map[string]any", zap.Any("network", p)) } else { - res.Network = p + res.Network = net } if p, err := new(platform.Platform).Collect(); err != nil { - logger.Info("Failed to retrieve platform metadata", zap.Error(err)) + logger.Debug("Failed to retrieve platform metadata", zap.Error(err)) + } else if platform, ok := p.(map[string]string); !ok { + logger.Warn("Internal error: Failed to cast platform metadata to map[string]string", zap.Any("platform", p)) } else { - res.Platform = p + res.Platform = platform } return res diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/gohai/gohai_test.go b/exporter/datadogexporter/internal/hostmetadata/internal/gohai/gohai_test.go index 773d8147ae92..cf0e72fe3817 100644 --- a/exporter/datadogexporter/internal/hostmetadata/internal/gohai/gohai_test.go +++ b/exporter/datadogexporter/internal/hostmetadata/internal/gohai/gohai_test.go @@ -19,8 +19,11 @@ func TestGetPayload(t *testing.T) { logger := zap.NewNop() gohai := NewPayload(logger) assert.NotNil(t, gohai.Gohai.Gohai.CPU) + assert.NotPanics(t, func() { gohai.CPU() }) assert.NotNil(t, gohai.Gohai.Gohai.FileSystem) assert.NotNil(t, gohai.Gohai.Gohai.Memory) assert.NotNil(t, gohai.Gohai.Gohai.Network) + assert.NotPanics(t, func() { gohai.Network() }) assert.NotNil(t, gohai.Gohai.Gohai.Platform) + assert.NotPanics(t, func() { gohai.Platform() }) } diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/gohai/processes.go b/exporter/datadogexporter/internal/hostmetadata/internal/gohai/processes.go index 2d2fb9803179..2003b4f70b1e 100644 --- a/exporter/datadogexporter/internal/hostmetadata/internal/gohai/processes.go +++ b/exporter/datadogexporter/internal/hostmetadata/internal/gohai/processes.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 + //go:build linux || darwin -// +build linux darwin package gohai // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/gohai" diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/gohai/processes_other.go b/exporter/datadogexporter/internal/hostmetadata/internal/gohai/processes_other.go index 0c7c0403979f..e0dfc7176d7d 100644 --- a/exporter/datadogexporter/internal/hostmetadata/internal/gohai/processes_other.go +++ b/exporter/datadogexporter/internal/hostmetadata/internal/gohai/processes_other.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 + //go:build !linux && !darwin -// +build !linux,!darwin package gohai // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/gohai" diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/k8s/package_test.go b/exporter/datadogexporter/internal/hostmetadata/internal/k8s/package_test.go new file mode 100644 index 000000000000..eef8bf585d82 --- /dev/null +++ b/exporter/datadogexporter/internal/hostmetadata/internal/k8s/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package k8s + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/system/host_unix.go b/exporter/datadogexporter/internal/hostmetadata/internal/system/host_unix.go index 30d2137282cf..ca55c518a905 100644 --- a/exporter/datadogexporter/internal/hostmetadata/internal/system/host_unix.go +++ b/exporter/datadogexporter/internal/hostmetadata/internal/system/host_unix.go @@ -1,7 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 //go:build !windows -// +build !windows package system // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/system" diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/system/host_unix_test.go b/exporter/datadogexporter/internal/hostmetadata/internal/system/host_unix_test.go index 2d752048b8b1..805a0db5cae7 100644 --- a/exporter/datadogexporter/internal/hostmetadata/internal/system/host_unix_test.go +++ b/exporter/datadogexporter/internal/hostmetadata/internal/system/host_unix_test.go @@ -1,7 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 //go:build !windows -// +build !windows package system diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/system/host_windows.go b/exporter/datadogexporter/internal/hostmetadata/internal/system/host_windows.go index 9b59eef6aef9..306742f8a28d 100644 --- a/exporter/datadogexporter/internal/hostmetadata/internal/system/host_windows.go +++ b/exporter/datadogexporter/internal/hostmetadata/internal/system/host_windows.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package system // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/system" diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/system/package_test.go b/exporter/datadogexporter/internal/hostmetadata/internal/system/package_test.go new file mode 100644 index 000000000000..641255b7bf5e --- /dev/null +++ b/exporter/datadogexporter/internal/hostmetadata/internal/system/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package system + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/datadogexporter/internal/hostmetadata/metadata.go b/exporter/datadogexporter/internal/hostmetadata/metadata.go index ed4ea8626c77..700f20269127 100644 --- a/exporter/datadogexporter/internal/hostmetadata/metadata.go +++ b/exporter/datadogexporter/internal/hostmetadata/metadata.go @@ -144,7 +144,7 @@ func NewPusher(params exporter.CreateSettings, pcfg PusherConfig) inframetadata. params: params, pcfg: pcfg, retrier: clientutil.NewRetrier(params.Logger, pcfg.RetrySettings, scrub.NewScrubber()), - httpClient: clientutil.NewHTTPClient(pcfg.TimeoutSettings, pcfg.InsecureSkipVerify), + httpClient: clientutil.NewHTTPClient(pcfg.ClientConfig), } } diff --git a/exporter/datadogexporter/internal/hostmetadata/metadata_test.go b/exporter/datadogexporter/internal/hostmetadata/metadata_test.go index fb6dca6597cb..9c434ee40b76 100644 --- a/exporter/datadogexporter/internal/hostmetadata/metadata_test.go +++ b/exporter/datadogexporter/internal/hostmetadata/metadata_test.go @@ -186,7 +186,7 @@ func TestPushMetadata(t *testing.T) { } handler := http.NewServeMux() - handler.HandleFunc("/intake", func(w http.ResponseWriter, r *http.Request) { + handler.HandleFunc("/intake", func(_ http.ResponseWriter, r *http.Request) { assert.Equal(t, r.Header.Get("DD-Api-Key"), "apikey") assert.Equal(t, r.Header.Get("User-Agent"), "otelcontribcol/1.0") diff --git a/exporter/datadogexporter/internal/hostmetadata/valid/package_test.go b/exporter/datadogexporter/internal/hostmetadata/valid/package_test.go new file mode 100644 index 000000000000..af34af695cd4 --- /dev/null +++ b/exporter/datadogexporter/internal/hostmetadata/valid/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package valid + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/datadogexporter/internal/logs/package_test.go b/exporter/datadogexporter/internal/logs/package_test.go new file mode 100644 index 000000000000..1158f120b289 --- /dev/null +++ b/exporter/datadogexporter/internal/logs/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package logs + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/datadogexporter/internal/logs/sender.go b/exporter/datadogexporter/internal/logs/sender.go index 016bc68da510..7aa6d26cec4d 100644 --- a/exporter/datadogexporter/internal/logs/sender.go +++ b/exporter/datadogexporter/internal/logs/sender.go @@ -8,7 +8,7 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadog" "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" - "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/config/confighttp" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/clientutil" @@ -27,7 +27,7 @@ type Sender struct { const logsV2 = "v2.LogsApi.SubmitLog" // NewSender creates a new Sender -func NewSender(endpoint string, logger *zap.Logger, s exporterhelper.TimeoutSettings, insecureSkipVerify, verbose bool, apiKey string) *Sender { +func NewSender(endpoint string, logger *zap.Logger, hcs confighttp.ClientConfig, verbose bool, apiKey string) *Sender { cfg := datadog.NewConfiguration() logger.Info("Logs sender initialized", zap.String("endpoint", endpoint)) cfg.OperationServers[logsV2] = datadog.ServerConfigurations{ @@ -35,7 +35,7 @@ func NewSender(endpoint string, logger *zap.Logger, s exporterhelper.TimeoutSett URL: endpoint, }, } - cfg.HTTPClient = clientutil.NewHTTPClient(s, insecureSkipVerify) + cfg.HTTPClient = clientutil.NewHTTPClient(hcs) cfg.AddDefaultHeader("DD-API-KEY", apiKey) apiClient := datadog.NewAPIClient(cfg) return &Sender{ diff --git a/exporter/datadogexporter/internal/logs/sender_test.go b/exporter/datadogexporter/internal/logs/sender_test.go index fe95e1360162..cb74c4abf785 100644 --- a/exporter/datadogexporter/internal/logs/sender_test.go +++ b/exporter/datadogexporter/internal/logs/sender_test.go @@ -12,7 +12,8 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadog" "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configtls" "go.uber.org/zap/zaptest" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/testutil" @@ -191,7 +192,7 @@ func TestSubmitLogs(t *testing.T) { } }) defer server.Close() - s := NewSender(server.URL, logger, exporterhelper.TimeoutSettings{Timeout: time.Second * 10}, true, true, "") + s := NewSender(server.URL, logger, confighttp.ClientConfig{Timeout: time.Second * 10, TLSSetting: configtls.ClientConfig{InsecureSkipVerify: true}}, true, "") if err := s.SubmitLogs(context.Background(), tt.payload); err != nil { t.Fatal(err) } diff --git a/exporter/datadogexporter/internal/metadata/generated_status.go b/exporter/datadogexporter/internal/metadata/generated_status.go index 0c8a1b30a60b..0aaf59990097 100644 --- a/exporter/datadogexporter/internal/metadata/generated_status.go +++ b/exporter/datadogexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("datadog") ) const ( - Type = "datadog" LogsStability = component.StabilityLevelAlpha TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/datadog") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/datadog") +} diff --git a/exporter/datadogexporter/internal/metrics/consumer_test.go b/exporter/datadogexporter/internal/metrics/consumer_test.go index 37bceedf1861..eefe38964830 100644 --- a/exporter/datadogexporter/internal/metrics/consumer_test.go +++ b/exporter/datadogexporter/internal/metrics/consumer_test.go @@ -14,6 +14,7 @@ import ( "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/pdata/pmetric" conventions "go.opentelemetry.io/collector/semconv/v1.6.1" "go.uber.org/zap" @@ -28,7 +29,12 @@ func (t testProvider) Source(context.Context) (source.Source, error) { } func newTranslator(t *testing.T, logger *zap.Logger) *metrics.Translator { - tr, err := metrics.NewTranslator(logger, + set := componenttest.NewNopTelemetrySettings() + set.Logger = logger + attributesTranslator, err := attributes.NewTranslator(set) + require.NoError(t, err) + tr, err := metrics.NewTranslator(set, + attributesTranslator, metrics.WithHistogramMode(metrics.HistogramModeDistributions), metrics.WithNumberMode(metrics.NumberModeCumulativeToDelta), metrics.WithFallbackSourceProvider(testProvider("fallbackHostname")), diff --git a/exporter/datadogexporter/internal/metrics/sketches/package_test.go b/exporter/datadogexporter/internal/metrics/sketches/package_test.go new file mode 100644 index 000000000000..5d296837beea --- /dev/null +++ b/exporter/datadogexporter/internal/metrics/sketches/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sketches + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/datadogexporter/internal/scrub/package_test.go b/exporter/datadogexporter/internal/scrub/package_test.go new file mode 100644 index 000000000000..7f10499845b8 --- /dev/null +++ b/exporter/datadogexporter/internal/scrub/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package scrub + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/datadogexporter/internal/testutil/test_utils.go b/exporter/datadogexporter/internal/testutil/test_utils.go index 25abd1cd99ef..20fad52506cd 100644 --- a/exporter/datadogexporter/internal/testutil/test_utils.go +++ b/exporter/datadogexporter/internal/testutil/test_utils.go @@ -55,7 +55,7 @@ func DatadogServerMock(overwriteHandlerFuncs ...OverwriteHandleFunc) *DatadogSer MetricV1Endpoint: metricsEndpoint, MetricV2Endpoint: metricsV2Endpoint, MetadataEndpoint: newMetadataEndpoint(metadataChan), - "/": func(w http.ResponseWriter, r *http.Request) {}, + "/": func(_ http.ResponseWriter, _ *http.Request) {}, } for _, f := range overwriteHandlerFuncs { p, hf := f() @@ -84,7 +84,7 @@ type HTTPRequestRecorder struct { } func (rec *HTTPRequestRecorder) HandlerFunc() (string, http.HandlerFunc) { - return rec.Pattern, func(w http.ResponseWriter, r *http.Request) { + return rec.Pattern, func(_ http.ResponseWriter, r *http.Request) { rec.Header = r.Header rec.ByteBody, _ = io.ReadAll(r.Body) } @@ -97,7 +97,7 @@ type HTTPRequestRecorderWithChan struct { } func (rec *HTTPRequestRecorderWithChan) HandlerFunc() (string, http.HandlerFunc) { - return rec.Pattern, func(w http.ResponseWriter, r *http.Request) { + return rec.Pattern, func(_ http.ResponseWriter, r *http.Request) { bytesBody, _ := io.ReadAll(r.Body) rec.ReqChan <- bytesBody } @@ -163,7 +163,7 @@ func metricsV2Endpoint(w http.ResponseWriter, _ *http.Request) { } func newMetadataEndpoint(c chan []byte) func(http.ResponseWriter, *http.Request) { - return func(w http.ResponseWriter, r *http.Request) { + return func(_ http.ResponseWriter, r *http.Request) { body, _ := io.ReadAll(r.Body) c <- body } diff --git a/exporter/datadogexporter/logs_exporter.go b/exporter/datadogexporter/logs_exporter.go index 92f5e50d20a6..37d0a52b1675 100644 --- a/exporter/datadogexporter/logs_exporter.go +++ b/exporter/datadogexporter/logs_exporter.go @@ -5,10 +5,11 @@ package datadogexporter // import "github.com/open-telemetry/opentelemetry-colle import ( "context" + "fmt" "sync" - "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" "github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata" + "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes" "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source" logsmapping "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs" "go.opentelemetry.io/collector/consumer" @@ -22,14 +23,16 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/scrub" ) -// otelTag specifies a tag to be added to all logs sent from the Datadog exporter -const otelTag = "otel_source:datadog_exporter" +// otelSource specifies a source to be added to all logs sent from the Datadog exporter +// The tag has key `otel_source` and the value specified on this constant. +const otelSource = "datadog_exporter" type logsExporter struct { params exporter.CreateSettings cfg *Config ctx context.Context // ctx triggers shutdown upon cancellation scrubber scrub.Scrubber // scrubber scrubs sensitive information from error messages + translator *logsmapping.Translator sender *logs.Sender onceMetadata *sync.Once sourceProvider source.Provider @@ -42,6 +45,7 @@ func newLogsExporter( params exporter.CreateSettings, cfg *Config, onceMetadata *sync.Once, + attributesTranslator *attributes.Translator, sourceProvider source.Provider, metadataReporter *inframetadata.Reporter, ) (*logsExporter, error) { @@ -51,12 +55,11 @@ func newLogsExporter( if isMetricExportV2Enabled() { apiClient := clientutil.CreateAPIClient( params.BuildInfo, - cfg.Metrics.TCPAddr.Endpoint, - cfg.TimeoutSettings, - cfg.LimitedHTTPClientSettings.TLSSetting.InsecureSkipVerify) + cfg.Metrics.TCPAddrConfig.Endpoint, + cfg.ClientConfig) go func() { errchan <- clientutil.ValidateAPIKey(ctx, string(cfg.API.Key), params.Logger, apiClient) }() } else { - client := clientutil.CreateZorkianClient(string(cfg.API.Key), cfg.Metrics.TCPAddr.Endpoint) + client := clientutil.CreateZorkianClient(string(cfg.API.Key), cfg.Metrics.TCPAddrConfig.Endpoint) go func() { errchan <- clientutil.ValidateAPIKeyZorkian(params.Logger, client) }() } // validate the apiKey @@ -66,12 +69,17 @@ func newLogsExporter( } } - s := logs.NewSender(cfg.Logs.TCPAddr.Endpoint, params.Logger, cfg.TimeoutSettings, cfg.LimitedHTTPClientSettings.TLSSetting.InsecureSkipVerify, cfg.Logs.DumpPayloads, string(cfg.API.Key)) + translator, err := logsmapping.NewTranslator(params.TelemetrySettings, attributesTranslator, otelSource) + if err != nil { + return nil, fmt.Errorf("failed to create logs translator: %w", err) + } + s := logs.NewSender(cfg.Logs.TCPAddrConfig.Endpoint, params.Logger, cfg.ClientConfig, cfg.Logs.DumpPayloads, string(cfg.API.Key)) return &logsExporter{ params: params, cfg: cfg, ctx: ctx, + translator: translator, sender: s, onceMetadata: onceMetadata, scrubber: scrub.NewScrubber(), @@ -83,7 +91,7 @@ func newLogsExporter( var _ consumer.ConsumeLogsFunc = (*logsExporter)(nil).consumeLogs // consumeLogs is implementation of cosumer.ConsumeLogsFunc -func (exp *logsExporter) consumeLogs(_ context.Context, ld plog.Logs) (err error) { +func (exp *logsExporter) consumeLogs(ctx context.Context, ld plog.Logs) (err error) { defer func() { err = exp.scrubber.Scrub(err) }() if exp.cfg.HostMetadata.Enabled { // start host metadata with resource attributes from @@ -103,29 +111,6 @@ func (exp *logsExporter) consumeLogs(_ context.Context, ld plog.Logs) (err error } } - rsl := ld.ResourceLogs() - var payloads []datadogV2.HTTPLogItem - // Iterate over resource logs - for i := 0; i < rsl.Len(); i++ { - rl := rsl.At(i) - sls := rl.ScopeLogs() - res := rl.Resource() - for j := 0; j < sls.Len(); j++ { - sl := sls.At(j) - lsl := sl.LogRecords() - // iterate over Logs - for k := 0; k < lsl.Len(); k++ { - log := lsl.At(k) - payload := logsmapping.Transform(log, res, exp.params.Logger) - ddtags := payload.GetDdtags() - if ddtags != "" { - payload.SetDdtags(ddtags + "," + otelTag) - } else { - payload.SetDdtags(otelTag) - } - payloads = append(payloads, payload) - } - } - } + payloads := exp.translator.MapLogs(ctx, ld) return exp.sender.SubmitLogs(exp.ctx, payloads) } diff --git a/exporter/datadogexporter/logs_exporter_test.go b/exporter/datadogexporter/logs_exporter_test.go index 7f01c3629af9..3f858f71f903 100644 --- a/exporter/datadogexporter/logs_exporter_test.go +++ b/exporter/datadogexporter/logs_exporter_test.go @@ -8,7 +8,6 @@ import ( "encoding/binary" "fmt" "testing" - "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -21,6 +20,8 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/traceutil" ) +const timeFormatString = "2006-01-02T15:04:05.000Z07:00" + func TestLogsExporter(t *testing.T) { lr := testdata.GenerateLogsOneLogRecord() ld := lr.ResourceLogs().At(0).ScopeLogs().At(0).LogRecords().At(0) @@ -44,7 +45,7 @@ func TestLogsExporter(t *testing.T) { "message": ld.Body().AsString(), "app": "server", "instance_num": "1", - "@timestamp": testdata.TestLogTime.Format(time.RFC3339), + "@timestamp": testdata.TestLogTime.Format(timeFormatString), "status": "Info", "dd.span_id": fmt.Sprintf("%d", spanIDToUint64(ld.SpanID())), "dd.trace_id": fmt.Sprintf("%d", traceIDToUint64(ld.TraceID())), @@ -74,7 +75,7 @@ func TestLogsExporter(t *testing.T) { "message": "hello", "app": "server", "instance_num": "1", - "@timestamp": testdata.TestLogTime.Format(time.RFC3339), + "@timestamp": testdata.TestLogTime.Format(timeFormatString), "status": "Info", "dd.span_id": fmt.Sprintf("%d", spanIDToUint64(ld.SpanID())), "dd.trace_id": fmt.Sprintf("%d", traceIDToUint64(ld.TraceID())), @@ -104,7 +105,7 @@ func TestLogsExporter(t *testing.T) { "message": ld.Body().AsString(), "app": "server", "instance_num": "1", - "@timestamp": testdata.TestLogTime.Format(time.RFC3339), + "@timestamp": testdata.TestLogTime.Format(timeFormatString), "status": "Info", "dd.span_id": fmt.Sprintf("%d", spanIDToUint64(ld.SpanID())), "dd.trace_id": fmt.Sprintf("%d", traceIDToUint64(ld.TraceID())), @@ -136,7 +137,7 @@ func TestLogsExporter(t *testing.T) { "message": ld.Body().AsString(), "app": "server", "instance_num": "1", - "@timestamp": testdata.TestLogTime.Format(time.RFC3339), + "@timestamp": testdata.TestLogTime.Format(timeFormatString), "status": "Info", "dd.span_id": fmt.Sprintf("%d", spanIDToUint64(ld.SpanID())), "dd.trace_id": fmt.Sprintf("%d", traceIDToUint64(ld.TraceID())), @@ -152,7 +153,7 @@ func TestLogsExporter(t *testing.T) { "message": "something happened", "env": "dev", "customer": "acme", - "@timestamp": testdata.TestLogTime.Format(time.RFC3339), + "@timestamp": testdata.TestLogTime.Format(timeFormatString), "status": "Info", "ddtags": "tag1:true,otel_source:datadog_exporter", "otel.severity_text": "Info", @@ -180,7 +181,7 @@ func TestLogsExporter(t *testing.T) { "message": ld.Body().AsString(), "app": "server", "instance_num": "1", - "@timestamp": testdata.TestLogTime.Format(time.RFC3339), + "@timestamp": testdata.TestLogTime.Format(timeFormatString), "status": "Info", "dd.span_id": fmt.Sprintf("%d", spanIDToUint64(ld.SpanID())), "dd.trace_id": fmt.Sprintf("%d", traceIDToUint64(ld.TraceID())), @@ -196,7 +197,7 @@ func TestLogsExporter(t *testing.T) { "message": "something happened", "env": "dev", "customer": "acme", - "@timestamp": testdata.TestLogTime.Format(time.RFC3339), + "@timestamp": testdata.TestLogTime.Format(timeFormatString), "status": "Info", "ddtags": "tag2:true,otel_source:datadog_exporter", "otel.severity_text": "Info", @@ -213,12 +214,12 @@ func TestLogsExporter(t *testing.T) { defer server.Close() cfg := &Config{ Metrics: MetricsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: server.URL, }, }, Logs: LogsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: server.URL, }, }, diff --git a/exporter/datadogexporter/metadata.yaml b/exporter/datadogexporter/metadata.yaml index 474bdcade49a..eb1992ca1401 100644 --- a/exporter/datadogexporter/metadata.yaml +++ b/exporter/datadogexporter/metadata.yaml @@ -1,10 +1,24 @@ type: datadog +scope_name: otelcol/datadog status: class: exporter stability: alpha: [logs] beta: [traces, metrics] - distributions: [contrib, aws, observiq] + distributions: [contrib] codeowners: - active: [mx-psi, gbbr, dineshg13, liustanley, songy23, mackjmr] + active: [mx-psi, dineshg13, liustanley, songy23, mackjmr] + emeritus: [gbbr] + +tests: + config: + hostname: customhostname + api: + key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + site: datadoghq.eu + sending_queue: + enabled: false + retry_on_failure: + enabled: false + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/datadogexporter/metrics_exporter.go b/exporter/datadogexporter/metrics_exporter.go index 7dccdf16d194..94709256d1b5 100644 --- a/exporter/datadogexporter/metrics_exporter.go +++ b/exporter/datadogexporter/metrics_exporter.go @@ -13,11 +13,13 @@ import ( "time" pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/api" + "github.com/DataDog/datadog-agent/pkg/trace/config" "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" "github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata" + "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes" "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source" otlpmetrics "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" @@ -34,6 +36,7 @@ import ( type metricsExporter struct { params exporter.CreateSettings cfg *Config + agntConfig *config.AgentConfig ctx context.Context client *zorkian.Client metricsAPI *datadogV2.MetricsApi @@ -45,12 +48,12 @@ type metricsExporter struct { metadataReporter *inframetadata.Reporter // getPushTime returns a Unix time in nanoseconds, representing the time pushing metrics. // It will be overwritten in tests. - getPushTime func() uint64 - apmStatsProcessor api.StatsProcessor + getPushTime func() uint64 + statsToAgent chan<- *pb.StatsPayload } // translatorFromConfig creates a new metrics translator from the exporter -func translatorFromConfig(logger *zap.Logger, cfg *Config, sourceProvider source.Provider) (*otlpmetrics.Translator, error) { +func translatorFromConfig(set component.TelemetrySettings, cfg *Config, attrsTranslator *attributes.Translator, sourceProvider source.Provider, statsOut chan []byte) (*otlpmetrics.Translator, error) { options := []otlpmetrics.TranslatorOption{ otlpmetrics.WithDeltaTTL(cfg.Metrics.DeltaTTL), otlpmetrics.WithFallbackSourceProvider(sourceProvider), @@ -65,10 +68,6 @@ func translatorFromConfig(logger *zap.Logger, cfg *Config, sourceProvider source options = append(options, otlpmetrics.WithQuantiles()) } - if cfg.Metrics.ExporterConfig.ResourceAttributesAsTags { - options = append(options, otlpmetrics.WithResourceAttributesAsTags()) - } - if cfg.Metrics.ExporterConfig.InstrumentationScopeMetadataAsTags { options = append(options, otlpmetrics.WithInstrumentationScopeMetadataAsTags()) } @@ -86,50 +85,54 @@ func translatorFromConfig(logger *zap.Logger, cfg *Config, sourceProvider source options = append(options, otlpmetrics.WithInitialCumulMonoValueMode( otlpmetrics.InitialCumulMonoValueMode(cfg.Metrics.SumConfig.InitialCumulativeMonotonicMode))) - return otlpmetrics.NewTranslator(logger, options...) + options = append(options, otlpmetrics.WithStatsOut(statsOut)) + return otlpmetrics.NewTranslator(set, attrsTranslator, options...) } func newMetricsExporter( ctx context.Context, params exporter.CreateSettings, cfg *Config, + agntConfig *config.AgentConfig, onceMetadata *sync.Once, + attrsTranslator *attributes.Translator, sourceProvider source.Provider, - apmStatsProcessor api.StatsProcessor, + statsToAgent chan<- *pb.StatsPayload, metadataReporter *inframetadata.Reporter, + statsOut chan []byte, ) (*metricsExporter, error) { - tr, err := translatorFromConfig(params.Logger, cfg, sourceProvider) + tr, err := translatorFromConfig(params.TelemetrySettings, cfg, attrsTranslator, sourceProvider, statsOut) if err != nil { return nil, err } scrubber := scrub.NewScrubber() exporter := &metricsExporter{ - params: params, - cfg: cfg, - ctx: ctx, - tr: tr, - scrubber: scrubber, - retrier: clientutil.NewRetrier(params.Logger, cfg.RetrySettings, scrubber), - onceMetadata: onceMetadata, - sourceProvider: sourceProvider, - getPushTime: func() uint64 { return uint64(time.Now().UTC().UnixNano()) }, - apmStatsProcessor: apmStatsProcessor, - metadataReporter: metadataReporter, + params: params, + cfg: cfg, + ctx: ctx, + agntConfig: agntConfig, + tr: tr, + scrubber: scrubber, + retrier: clientutil.NewRetrier(params.Logger, cfg.BackOffConfig, scrubber), + onceMetadata: onceMetadata, + sourceProvider: sourceProvider, + getPushTime: func() uint64 { return uint64(time.Now().UTC().UnixNano()) }, + statsToAgent: statsToAgent, + metadataReporter: metadataReporter, } errchan := make(chan error) if isMetricExportV2Enabled() { apiClient := clientutil.CreateAPIClient( params.BuildInfo, - cfg.Metrics.TCPAddr.Endpoint, - cfg.TimeoutSettings, - cfg.LimitedHTTPClientSettings.TLSSetting.InsecureSkipVerify) + cfg.Metrics.TCPAddrConfig.Endpoint, + cfg.ClientConfig) go func() { errchan <- clientutil.ValidateAPIKey(ctx, string(cfg.API.Key), params.Logger, apiClient) }() exporter.metricsAPI = datadogV2.NewMetricsApi(apiClient) } else { - client := clientutil.CreateZorkianClient(string(cfg.API.Key), cfg.Metrics.TCPAddr.Endpoint) + client := clientutil.CreateZorkianClient(string(cfg.API.Key), cfg.Metrics.TCPAddrConfig.Endpoint) client.ExtraHeader["User-Agent"] = clientutil.UserAgent(params.BuildInfo) - client.HttpClient = clientutil.NewHTTPClient(cfg.TimeoutSettings, cfg.LimitedHTTPClientSettings.TLSSetting.InsecureSkipVerify) + client.HttpClient = clientutil.NewHTTPClient(cfg.ClientConfig) go func() { errchan <- clientutil.ValidateAPIKeyZorkian(params.Logger, client) }() exporter.client = client } @@ -150,7 +153,7 @@ func (exp *metricsExporter) pushSketches(ctx context.Context, sl sketches.Sketch req, err := http.NewRequestWithContext(ctx, http.MethodPost, - exp.cfg.Metrics.TCPAddr.Endpoint+sketches.SketchSeriesEndpoint, + exp.cfg.Metrics.TCPAddrConfig.Endpoint+sketches.SketchSeriesEndpoint, bytes.NewBuffer(payload), ) if err != nil { @@ -256,8 +259,18 @@ func (exp *metricsExporter) PushMetricsData(ctx context.Context, md pmetric.Metr if len(sp) > 0 { exp.params.Logger.Debug("exporting APM stats payloads", zap.Any("stats_payloads", sp)) statsv := exp.params.BuildInfo.Command + exp.params.BuildInfo.Version - for _, p := range sp { - exp.apmStatsProcessor.ProcessStats(p, "", statsv) + for _, csp := range sp { + if csp.TracerVersion == "" { + csp.TracerVersion = statsv + } + } + exp.statsToAgent <- &pb.StatsPayload{ + AgentHostname: exp.agntConfig.Hostname, // This is "dead-code". We will be removing this code path entirely + AgentEnv: exp.agntConfig.DefaultEnv, + Stats: sp, + AgentVersion: exp.agntConfig.AgentVersion, + ClientComputed: false, + SplitPayload: false, } } diff --git a/exporter/datadogexporter/metrics_exporter_test.go b/exporter/datadogexporter/metrics_exporter_test.go index 8dcf3d792a47..23e1401e8b65 100644 --- a/exporter/datadogexporter/metrics_exporter_test.go +++ b/exporter/datadogexporter/metrics_exporter_test.go @@ -16,13 +16,16 @@ import ( "github.com/DataDog/agent-payload/v5/gogen" pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" + traceconfig "github.com/DataDog/datadog-agent/pkg/trace/config" "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" "github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata" "github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata/payload" + "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes" "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source" "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/pdata/pcommon" @@ -46,7 +49,7 @@ func TestNewExporter(t *testing.T) { Key: "ddog_32_characters_long_api_key1", }, Metrics: MetricsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: server.URL, }, DeltaTTL: 3600, @@ -295,22 +298,26 @@ func Test_metricsExporter_PushMetricsData(t *testing.T) { defer server.Close() var ( - once sync.Once - statsRecorder testutil.MockStatsProcessor + once sync.Once ) - + statsToAgent := make(chan *pb.StatsPayload, 1000) // Buffer the channel to allow test to pass without go-routines pusher := newTestPusher(t) reporter, err := inframetadata.NewReporter(zap.NewNop(), pusher, 1*time.Second) require.NoError(t, err) - + attributesTranslator, err := attributes.NewTranslator(componenttest.NewNopTelemetrySettings()) + require.NoError(t, err) + acfg := traceconfig.New() exp, err := newMetricsExporter( context.Background(), exportertest.NewNopCreateSettings(), newTestConfig(t, server.URL, tt.hostTags, tt.histogramMode), + acfg, &once, + attributesTranslator, &testutil.MockSourceProvider{Src: tt.source}, - &statsRecorder, + statsToAgent, reporter, + nil, ) if tt.expectedErr == nil { assert.NoError(t, err, "unexpected error") @@ -352,10 +359,18 @@ func Test_metricsExporter_PushMetricsData(t *testing.T) { assert.NoError(t, err) assert.Equal(t, expected, sketchRecorder.ByteBody) } - if tt.expectedStats == nil { - assert.Len(t, statsRecorder.In, 0) - } else { - assert.ElementsMatch(t, statsRecorder.In, tt.expectedStats) + if tt.expectedStats != nil { + var actualStats []*pb.ClientStatsPayload + pullStats: + for len(actualStats) < len(tt.expectedStats) { + select { + case <-time.After(10 * time.Second): + break pullStats + case sp := <-statsToAgent: + actualStats = append(actualStats, sp.Stats...) + } + } + assert.ElementsMatch(t, actualStats, tt.expectedStats) } }) } @@ -374,7 +389,7 @@ func TestNewExporter_Zorkian(t *testing.T) { Key: "ddog_32_characters_long_api_key1", }, Metrics: MetricsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: server.URL, }, DeltaTTL: 3600, @@ -614,7 +629,7 @@ func Test_metricsExporter_PushMetricsData_Zorkian(t *testing.T) { expectedErr: nil, }, { - metrics: createTestMetricsWithStats(), + metrics: createTestMetricsWithStats(t), source: source.Source{ Kind: source.HostnameKind, Identifier: "test-host", @@ -685,20 +700,26 @@ func Test_metricsExporter_PushMetricsData_Zorkian(t *testing.T) { defer server.Close() var ( - once sync.Once - statsRecorder testutil.MockStatsProcessor + once sync.Once ) + statsToAgent := make(chan *pb.StatsPayload, 1000) pusher := newTestPusher(t) reporter, err := inframetadata.NewReporter(zap.NewNop(), pusher, 1*time.Second) require.NoError(t, err) + attributesTranslator, err := attributes.NewTranslator(componenttest.NewNopTelemetrySettings()) + require.NoError(t, err) + acfg := traceconfig.New() exp, err := newMetricsExporter( context.Background(), exportertest.NewNopCreateSettings(), newTestConfig(t, server.URL, tt.hostTags, tt.histogramMode), + acfg, &once, + attributesTranslator, &testutil.MockSourceProvider{Src: tt.source}, - &statsRecorder, + statsToAgent, reporter, + nil, ) if tt.expectedErr == nil { assert.NoError(t, err, "unexpected error") @@ -735,26 +756,37 @@ func Test_metricsExporter_PushMetricsData_Zorkian(t *testing.T) { assert.NoError(t, err) assert.Equal(t, expected, sketchRecorder.ByteBody) } - if tt.expectedStats == nil { - assert.Len(t, statsRecorder.In, 0) - } else { - assert.ElementsMatch(t, statsRecorder.In, tt.expectedStats) + if tt.expectedStats != nil { + var actualStats []*pb.ClientStatsPayload + pullStats: + for len(actualStats) < len(tt.expectedStats) { + select { + case <-time.After(10 * time.Second): + break pullStats + case sp := <-statsToAgent: + actualStats = append(actualStats, sp.Stats...) + } + } + assert.ElementsMatch(t, actualStats, tt.expectedStats) } }) } } -func createTestMetricsWithStats() pmetric.Metrics { +func createTestMetricsWithStats(t *testing.T) pmetric.Metrics { md := createTestMetrics(map[string]string{ conventions.AttributeDeploymentEnvironment: "dev", "custom_attribute": "custom_value", }) dest := md.ResourceMetrics() - logger, _ := zap.NewDevelopment() - trans, err := metrics.NewTranslator(logger) - if err != nil { - panic(err) - } + set := componenttest.NewNopTelemetrySettings() + var err error + set.Logger, err = zap.NewDevelopment() + require.NoError(t, err) + attributesTranslator, err := attributes.NewTranslator(set) + require.NoError(t, err) + trans, err := metrics.NewTranslator(set, attributesTranslator) + require.NoError(t, err) src := trans. StatsPayloadToMetrics(&pb.StatsPayload{Stats: testutil.StatsPayloads}). ResourceMetrics() @@ -827,7 +859,7 @@ func newTestConfig(t *testing.T, endpoint string, hostTags []string, histogramMo Tags: hostTags, }, Metrics: MetricsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: endpoint, }, HistConfig: HistogramConfig{ diff --git a/exporter/datadogexporter/traces_exporter.go b/exporter/datadogexporter/traces_exporter.go index 71a02caf1b0c..05088b2f3db9 100644 --- a/exporter/datadogexporter/traces_exporter.go +++ b/exporter/datadogexporter/traces_exporter.go @@ -15,7 +15,9 @@ import ( tracelog "github.com/DataDog/datadog-agent/pkg/trace/log" "github.com/DataDog/datadog-agent/pkg/trace/telemetry" "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" + "github.com/DataDog/datadog-go/v5/statsd" "github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata" + "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes" "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" @@ -62,7 +64,7 @@ func newTracesExporter( onceMetadata: onceMetadata, scrubber: scrubber, sourceProvider: sourceProvider, - retrier: clientutil.NewRetrier(params.Logger, cfg.RetrySettings, scrubber), + retrier: clientutil.NewRetrier(params.Logger, cfg.BackOffConfig, scrubber), metadataReporter: metadataReporter, } // client to send running metric to the backend & perform API key validation @@ -70,13 +72,12 @@ func newTracesExporter( if isMetricExportV2Enabled() { apiClient := clientutil.CreateAPIClient( params.BuildInfo, - cfg.Metrics.TCPAddr.Endpoint, - cfg.TimeoutSettings, - cfg.LimitedHTTPClientSettings.TLSSetting.InsecureSkipVerify) + cfg.Metrics.TCPAddrConfig.Endpoint, + cfg.ClientConfig) go func() { errchan <- clientutil.ValidateAPIKey(ctx, string(cfg.API.Key), params.Logger, apiClient) }() exp.metricsAPI = datadogV2.NewMetricsApi(apiClient) } else { - client := clientutil.CreateZorkianClient(string(cfg.API.Key), cfg.Metrics.TCPAddr.Endpoint) + client := clientutil.CreateZorkianClient(string(cfg.API.Key), cfg.Metrics.TCPAddrConfig.Endpoint) go func() { errchan <- clientutil.ValidateAPIKeyZorkian(params.Logger, client) }() exp.client = client } @@ -181,7 +182,15 @@ func (exp *traceExporter) exportUsageMetrics(ctx context.Context, hosts map[stri } } -func newTraceAgent(ctx context.Context, params exporter.CreateSettings, cfg *Config, sourceProvider source.Provider) (*agent.Agent, error) { +func newTraceAgent(ctx context.Context, params exporter.CreateSettings, cfg *Config, sourceProvider source.Provider, metricsClient statsd.ClientInterface, attrsTranslator *attributes.Translator) (*agent.Agent, error) { + acfg, err := newTraceAgentConfig(ctx, params, cfg, sourceProvider, attrsTranslator) + if err != nil { + return nil, err + } + return agent.NewAgent(ctx, acfg, telemetry.NewNoopCollector(), metricsClient), nil +} + +func newTraceAgentConfig(ctx context.Context, params exporter.CreateSettings, cfg *Config, sourceProvider source.Provider, attrsTranslator *attributes.Translator) (*traceconfig.AgentConfig, error) { acfg := traceconfig.New() src, err := sourceProvider.Source(ctx) if err != nil { @@ -190,16 +199,18 @@ func newTraceAgent(ctx context.Context, params exporter.CreateSettings, cfg *Con if src.Kind == source.HostnameKind { acfg.Hostname = src.Identifier } + acfg.OTLPReceiver.AttributesTranslator = attrsTranslator acfg.OTLPReceiver.SpanNameRemappings = cfg.Traces.SpanNameRemappings acfg.OTLPReceiver.SpanNameAsResourceName = cfg.Traces.SpanNameAsResourceName acfg.Endpoints[0].APIKey = string(cfg.API.Key) acfg.Ignore["resource"] = cfg.Traces.IgnoreResources acfg.ReceiverPort = 0 // disable HTTP receiver acfg.AgentVersion = fmt.Sprintf("datadogexporter-%s-%s", params.BuildInfo.Command, params.BuildInfo.Version) - acfg.SkipSSLValidation = cfg.LimitedHTTPClientSettings.TLSSetting.InsecureSkipVerify + acfg.SkipSSLValidation = cfg.ClientConfig.TLSSetting.InsecureSkipVerify acfg.ComputeStatsBySpanKind = cfg.Traces.ComputeStatsBySpanKind acfg.PeerServiceAggregation = cfg.Traces.PeerServiceAggregation acfg.PeerTagsAggregation = cfg.Traces.PeerTagsAggregation + acfg.PeerTags = cfg.Traces.PeerTags if v := cfg.Traces.flushInterval; v > 0 { acfg.TraceWriter.FlushPeriodSeconds = v } @@ -209,6 +220,6 @@ func newTraceAgent(ctx context.Context, params exporter.CreateSettings, cfg *Con if addr := cfg.Traces.Endpoint; addr != "" { acfg.Endpoints[0].Host = addr } - tracelog.SetLogger(&zaplogger{params.Logger}) - return agent.NewAgent(ctx, acfg, telemetry.NewNoopCollector()), nil + tracelog.SetLogger(&zaplogger{params.Logger}) //TODO: This shouldn't be a singleton + return acfg, nil } diff --git a/exporter/datadogexporter/traces_exporter_test.go b/exporter/datadogexporter/traces_exporter_test.go index 4d177a0f34cf..531044cbe14b 100644 --- a/exporter/datadogexporter/traces_exporter_test.go +++ b/exporter/datadogexporter/traces_exporter_test.go @@ -120,7 +120,7 @@ func TestTracesSource(t *testing.T) { assert.NoError(t, err) })) defer metricsServer.Close() - tracesServer := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { + tracesServer := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) { rw.WriteHeader(http.StatusAccepted) })) defer tracesServer.Close() @@ -133,10 +133,10 @@ func TestTracesSource(t *testing.T) { Hostname: "fallbackHostname", }, Metrics: MetricsConfig{ - TCPAddr: confignet.TCPAddr{Endpoint: metricsServer.URL}, + TCPAddrConfig: confignet.TCPAddrConfig{Endpoint: metricsServer.URL}, }, Traces: TracesConfig{ - TCPAddr: confignet.TCPAddr{Endpoint: tracesServer.URL}, + TCPAddrConfig: confignet.TCPAddrConfig{Endpoint: tracesServer.URL}, IgnoreResources: []string{}, }, } @@ -248,12 +248,12 @@ func TestTraceExporter(t *testing.T) { Hostname: "test-host", }, Metrics: MetricsConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: metricsServer.URL, }, }, Traces: TracesConfig{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: server.URL, }, IgnoreResources: []string{}, @@ -286,7 +286,7 @@ func TestNewTracesExporter(t *testing.T) { cfg := &Config{} cfg.API.Key = "ddog_32_characters_long_api_key1" - cfg.Metrics.TCPAddr.Endpoint = metricsServer.URL + cfg.Metrics.TCPAddrConfig.Endpoint = metricsServer.URL params := exportertest.NewNopCreateSettings() // The client should have been created correctly @@ -307,10 +307,10 @@ func TestPushTraceData(t *testing.T) { Hostname: "test-host", }, Metrics: MetricsConfig{ - TCPAddr: confignet.TCPAddr{Endpoint: server.URL}, + TCPAddrConfig: confignet.TCPAddrConfig{Endpoint: server.URL}, }, Traces: TracesConfig{ - TCPAddr: confignet.TCPAddr{Endpoint: server.URL}, + TCPAddrConfig: confignet.TCPAddrConfig{Endpoint: server.URL}, }, HostMetadata: HostMetadataConfig{ diff --git a/exporter/datasetexporter/README.md b/exporter/datasetexporter/README.md index 8ac481490d15..05720c9645df 100644 --- a/exporter/datasetexporter/README.md +++ b/exporter/datasetexporter/README.md @@ -6,7 +6,7 @@ | Stability | [alpha]: logs, traces | | Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fdataset%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fdataset) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fdataset%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fdataset) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@atoulme](https://www.github.com/atoulme), [@martin-majlis-s1](https://www.github.com/martin-majlis-s1), [@zdaratom](https://www.github.com/zdaratom), [@tomaz-s1](https://www.github.com/tomaz-s1) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@atoulme](https://www.github.com/atoulme), [@martin-majlis-s1](https://www.github.com/martin-majlis-s1), [@zdaratom-s1](https://www.github.com/zdaratom-s1), [@tomaz-s1](https://www.github.com/tomaz-s1) | [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib @@ -45,9 +45,11 @@ Make sure to provide the appropriate server host value in the `serverHost` attri ### Optional Settings +- `debug` (default = false): Adds `session_key` to the server fields. It's useful for debugging throughput issues. - `buffer`: - - `max_lifetime` (default = 5s): The maximum delay between sending batches from the same source. - - `group_by` (default = []): The list of attributes based on which events should be grouped. + - `max_lifetime` (default = 5s): The maximum delay between sending batches from the same session. + - `purge_older_than` (default = 30s): The maximum delay between receiving data for the same session after which resources associated with it are purged. + - `group_by` (default = []): The list of attributes based on which events should be grouped. They are moved from the event attributes to the session info and shown as server fields in the UI. - `retry_initial_interval` (default = 5s): Time to wait after the first failure before retrying. - `retry_max_interval` (default = 30s): Is the upper bound on backoff. - `retry_max_elapsed_time` (default = 300s): Is the maximum amount of time spent trying to send a buffer. @@ -259,8 +261,6 @@ service: exporters: [dataset/traces] ``` -## Examples - ### Handling `serverHost` Attribute Based on the given configuration and scenarios, here's the expected behavior: @@ -280,3 +280,41 @@ Based on the given configuration and scenarios, here's the expected behavior: 5. Resource: `{}`, Log: `{'attribute.foo': 'Bar'}`, Env: `SERVER_HOST=''`, Hostname: `ip-172-31-27-19` * Since the attribute `container_id` is not set and the environmental variable `SERVER_HOST` is empty, the `hostname` of the node (`ip-172-31-27-19`) will be used as the fallback value for `serverHost`. * Used `serverHost` will be `ip-172-31-27-19`. + +## Metrics + +To enable metrics you have to: +1. Run collector with enabled feature gate `telemetry.useOtelForInternalMetrics`. This can be done by executing it with one additional parameter - `--feature-gates=telemetry.useOtelForInternalMetrics`. +2. Enable metrics scraping as part of the configuration and add receiver into services: + ```yaml + receivers: + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 5s + static_configs: + - targets: ['0.0.0.0:8888'] + ... + service: + pipelines: + metrics: + # add prometheus among metrics receivers + receivers: [prometheus] + processors: [batch] + exporters: [otlphttp/prometheus, debug] + ``` + +### Available Metrics + +Available metrics contain `dataset` in their name. There are counters related to the +number of processed events (`events`), buffers (`buffer`), sessions (`sessions`), and transferred bytes (`bytes`). +There are also histograms related to response times (`responseTime`) and payload size (`payloadSize`). + +There are several counters related to events/buffers: +* `enqueued` - the number of received entities +* `processed` - the number of entities that were accepted by the next layer +* `dropped` - the number of entities that were not accepted by the next layer +* `broken` - the number of entities that were somehow corrupted during processing (should be 0) + +The number of entities, that are still in the queue can be computed as `enqueued - (processed + dropped + broken)`. diff --git a/exporter/datasetexporter/config.go b/exporter/datasetexporter/config.go index c497086434be..22734ba4719a 100644 --- a/exporter/datasetexporter/config.go +++ b/exporter/datasetexporter/config.go @@ -13,6 +13,7 @@ import ( datasetConfig "github.com/scalyr/dataset-go/pkg/config" "github.com/scalyr/dataset-go/pkg/server_host_config" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -105,6 +106,7 @@ func newDefaultLogsSettings() LogsSettings { } const bufferMaxLifetime = 5 * time.Second +const bufferPurgeOlderThan = 30 * time.Second const bufferRetryInitialInterval = 5 * time.Second const bufferRetryMaxInterval = 30 * time.Second const bufferRetryMaxElapsedTime = 300 * time.Second @@ -112,6 +114,7 @@ const bufferRetryShutdownTimeout = 30 * time.Second type BufferSettings struct { MaxLifetime time.Duration `mapstructure:"max_lifetime"` + PurgeOlderThan time.Duration `mapstructure:"purge_older_than"` GroupBy []string `mapstructure:"group_by"` RetryInitialInterval time.Duration `mapstructure:"retry_initial_interval"` RetryMaxInterval time.Duration `mapstructure:"retry_max_interval"` @@ -123,6 +126,7 @@ type BufferSettings struct { func newDefaultBufferSettings() BufferSettings { return BufferSettings{ MaxLifetime: bufferMaxLifetime, + PurgeOlderThan: bufferPurgeOlderThan, GroupBy: []string{}, RetryInitialInterval: bufferRetryInitialInterval, RetryMaxInterval: bufferRetryMaxInterval, @@ -144,20 +148,23 @@ func newDefaultServerHostSettings() ServerHostSettings { } } +const debugDefault = false + type Config struct { DatasetURL string `mapstructure:"dataset_url"` APIKey configopaque.String `mapstructure:"api_key"` + Debug bool `mapstructure:"debug"` BufferSettings `mapstructure:"buffer"` TracesSettings `mapstructure:"traces"` LogsSettings `mapstructure:"logs"` ServerHostSettings `mapstructure:"server_host"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` exporterhelper.QueueSettings `mapstructure:"sending_queue"` exporterhelper.TimeoutSettings `mapstructure:"timeout"` } func (c *Config) Unmarshal(conf *confmap.Conf) error { - if err := conf.Unmarshal(c, confmap.WithErrorUnused()); err != nil { + if err := conf.Unmarshal(c); err != nil { return fmt.Errorf("cannot unmarshal config: %w", err) } @@ -180,16 +187,18 @@ func (c *Config) Validate() error { // String returns a string representation of the Config object. // It includes all the fields and their values in the format "field_name: field_value". func (c *Config) String() string { + apiKey, _ := c.APIKey.MarshalText() s := "" s += fmt.Sprintf("%s: %s; ", "DatasetURL", c.DatasetURL) + s += fmt.Sprintf("%s: %s (%d); ", "APIKey", apiKey, len(c.APIKey)) + s += fmt.Sprintf("%s: %t; ", "Debug", c.Debug) s += fmt.Sprintf("%s: %+v; ", "BufferSettings", c.BufferSettings) s += fmt.Sprintf("%s: %+v; ", "LogsSettings", c.LogsSettings) s += fmt.Sprintf("%s: %+v; ", "TracesSettings", c.TracesSettings) s += fmt.Sprintf("%s: %+v; ", "ServerHostSettings", c.ServerHostSettings) - s += fmt.Sprintf("%s: %+v; ", "RetrySettings", c.RetrySettings) + s += fmt.Sprintf("%s: %+v; ", "BackOffConfig", c.BackOffConfig) s += fmt.Sprintf("%s: %+v; ", "QueueSettings", c.QueueSettings) s += fmt.Sprintf("%s: %+v", "TimeoutSettings", c.TimeoutSettings) - return s } @@ -205,6 +214,7 @@ func (c *Config) convert() (*ExporterConfig, error) { Tokens: datasetConfig.DataSetTokens{WriteLog: string(c.APIKey)}, BufferSettings: buffer_config.DataSetBufferSettings{ MaxLifetime: c.BufferSettings.MaxLifetime, + PurgeOlderThan: c.BufferSettings.PurgeOlderThan, MaxSize: buffer.LimitBufferSize, GroupBy: c.BufferSettings.GroupBy, RetryInitialInterval: c.BufferSettings.RetryInitialInterval, @@ -218,6 +228,7 @@ func (c *Config) convert() (*ExporterConfig, error) { UseHostName: c.ServerHostSettings.UseHostName, ServerHost: c.ServerHostSettings.ServerHost, }, + Debug: c.Debug, }, tracesSettings: c.TracesSettings, logsSettings: c.LogsSettings, diff --git a/exporter/datasetexporter/config_test.go b/exporter/datasetexporter/config_test.go index af99f0cf7f93..07db7361c4d2 100644 --- a/exporter/datasetexporter/config_test.go +++ b/exporter/datasetexporter/config_test.go @@ -9,6 +9,8 @@ import ( "time" "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -21,7 +23,7 @@ func TestConfigUnmarshalUnknownAttributes(t *testing.T) { "api_key": "secret", "unknown_attribute": "some value", }) - err := config.Unmarshal(configMap) + err := component.UnmarshalConfig(configMap, config) unmarshalErr := fmt.Errorf("1 error(s) decoding:\n\n* '' has invalid keys: unknown_attribute") expectedError := fmt.Errorf("cannot unmarshal config: %w", unmarshalErr) @@ -37,7 +39,7 @@ func TestConfigUseDefaults(t *testing.T) { "api_key": "secret", }) err := config.Unmarshal(configMap) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, "https://example.com", config.DatasetURL) assert.Equal(t, "secret", string(config.APIKey)) @@ -108,9 +110,11 @@ func TestConfigString(t *testing.T) { config := Config{ DatasetURL: "https://example.com", APIKey: "secret", + Debug: true, BufferSettings: BufferSettings{ - MaxLifetime: 123, - GroupBy: []string{"field1", "field2"}, + MaxLifetime: 123, + PurgeOlderThan: 567, + GroupBy: []string{"field1", "field2"}, }, TracesSettings: TracesSettings{ exportSettings: exportSettings{ @@ -134,13 +138,13 @@ func TestConfigString(t *testing.T) { ServerHost: "foo-bar", UseHostName: false, }, - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), } assert.Equal(t, - "DatasetURL: https://example.com; BufferSettings: {MaxLifetime:123ns GroupBy:[field1 field2] RetryInitialInterval:0s RetryMaxInterval:0s RetryMaxElapsedTime:0s RetryShutdownTimeout:0s}; LogsSettings: {ExportResourceInfo:true ExportResourcePrefix:AAA ExportScopeInfo:true ExportScopePrefix:BBB DecomposeComplexMessageField:true DecomposedComplexMessagePrefix:EEE exportSettings:{ExportSeparator:CCC ExportDistinguishingSuffix:DDD}}; TracesSettings: {exportSettings:{ExportSeparator:TTT ExportDistinguishingSuffix:UUU}}; ServerHostSettings: {UseHostName:false ServerHost:foo-bar}; RetrySettings: {Enabled:true InitialInterval:5s RandomizationFactor:0.5 Multiplier:1.5 MaxInterval:30s MaxElapsedTime:5m0s}; QueueSettings: {Enabled:true NumConsumers:10 QueueSize:1000 StorageID:}; TimeoutSettings: {Timeout:5s}", + "DatasetURL: https://example.com; APIKey: [REDACTED] (6); Debug: true; BufferSettings: {MaxLifetime:123ns PurgeOlderThan:567ns GroupBy:[field1 field2] RetryInitialInterval:0s RetryMaxInterval:0s RetryMaxElapsedTime:0s RetryShutdownTimeout:0s}; LogsSettings: {ExportResourceInfo:true ExportResourcePrefix:AAA ExportScopeInfo:true ExportScopePrefix:BBB DecomposeComplexMessageField:true DecomposedComplexMessagePrefix:EEE exportSettings:{ExportSeparator:CCC ExportDistinguishingSuffix:DDD}}; TracesSettings: {exportSettings:{ExportSeparator:TTT ExportDistinguishingSuffix:UUU}}; ServerHostSettings: {UseHostName:false ServerHost:foo-bar}; BackOffConfig: {Enabled:true InitialInterval:5s RandomizationFactor:0.5 Multiplier:1.5 MaxInterval:30s MaxElapsedTime:5m0s}; QueueSettings: {Enabled:true NumConsumers:10 QueueSize:1000 StorageID:}; TimeoutSettings: {Timeout:5s}", config.String(), ) } @@ -156,7 +160,7 @@ func TestConfigUseProvidedExportResourceInfoValue(t *testing.T) { }, }) err := config.Unmarshal(configMap) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, true, config.LogsSettings.ExportResourceInfo) } @@ -171,6 +175,6 @@ func TestConfigUseProvidedExportScopeInfoValue(t *testing.T) { }, }) err := config.Unmarshal(configMap) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, false, config.LogsSettings.ExportScopeInfo) } diff --git a/exporter/datasetexporter/datasetexporter.go b/exporter/datasetexporter/datasetexporter.go index 4767c588d4c4..70c962730b14 100644 --- a/exporter/datasetexporter/datasetexporter.go +++ b/exporter/datasetexporter/datasetexporter.go @@ -14,15 +14,14 @@ import ( "github.com/google/uuid" "github.com/scalyr/dataset-go/pkg/api/add_events" "github.com/scalyr/dataset-go/pkg/client" + "github.com/scalyr/dataset-go/pkg/meter_config" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/pdata/pcommon" "go.uber.org/zap" - "golang.org/x/time/rate" ) type DatasetExporter struct { client *client.DataSetClient - limiter *rate.Limiter logger *zap.Logger session string exporterCfg *ExporterConfig @@ -34,6 +33,8 @@ func newDatasetExporter(entity string, config *Config, set exporter.CreateSettin logger.Info("Creating new DataSetExporter", zap.String("config", config.String()), zap.String("entity", entity), + zap.String("id.string", set.ID.String()), + zap.String("id.name", set.ID.Name()), ) exporterCfg, err := config.convert() if err != nil { @@ -48,11 +49,20 @@ func newDatasetExporter(entity string, config *Config, set exporter.CreateSettin set.BuildInfo.Version, entity, ) + + meter := set.MeterProvider.Meter("datasetexporter") + meterConfig := meter_config.NewMeterConfig( + &meter, + entity, + set.ID.Name(), + ) + client, err := client.NewClient( exporterCfg.datasetConfig, &http.Client{Timeout: time.Second * 60}, logger, &userAgent, + meterConfig, ) if err != nil { logger.Error("Cannot create DataSetClient: ", zap.Error(err)) @@ -61,7 +71,6 @@ func newDatasetExporter(entity string, config *Config, set exporter.CreateSettin return &DatasetExporter{ client: client, - limiter: rate.NewLimiter(100*rate.Every(1*time.Minute), 100), // 100 requests / minute session: uuid.New().String(), logger: logger, exporterCfg: exporterCfg, diff --git a/exporter/datasetexporter/factory.go b/exporter/datasetexporter/factory.go index 600cc0f1fa83..b631aae6527e 100644 --- a/exporter/datasetexporter/factory.go +++ b/exporter/datasetexporter/factory.go @@ -7,6 +7,7 @@ package datasetexporter // import "github.com/open-telemetry/opentelemetry-colle import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -29,9 +30,10 @@ func createDefaultConfig() component.Config { TracesSettings: newDefaultTracesSettings(), LogsSettings: newDefaultLogsSettings(), ServerHostSettings: newDefaultServerHostSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), + Debug: debugDefault, } } diff --git a/exporter/datasetexporter/factory_test.go b/exporter/datasetexporter/factory_test.go index 2e3d3f0dab65..3168a0efb47a 100644 --- a/exporter/datasetexporter/factory_test.go +++ b/exporter/datasetexporter/factory_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -28,7 +29,7 @@ func TestCreateDefaultConfig(t *testing.T) { TracesSettings: newDefaultTracesSettings(), LogsSettings: newDefaultLogsSettings(), ServerHostSettings: newDefaultServerHostSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), }, cfg, "failed to create default config") @@ -38,7 +39,7 @@ func TestCreateDefaultConfig(t *testing.T) { func TestLoadConfig(t *testing.T) { cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) - assert.Nil(t, err) + assert.NoError(t, err) tests := []struct { id component.ID @@ -53,7 +54,7 @@ func TestLoadConfig(t *testing.T) { TracesSettings: newDefaultTracesSettings(), LogsSettings: newDefaultLogsSettings(), ServerHostSettings: newDefaultServerHostSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), }, @@ -65,6 +66,7 @@ func TestLoadConfig(t *testing.T) { APIKey: "key-lib", BufferSettings: BufferSettings{ MaxLifetime: 345 * time.Millisecond, + PurgeOlderThan: bufferPurgeOlderThan, GroupBy: []string{"attributes.container_id", "attributes.log.file.path"}, RetryInitialInterval: bufferRetryInitialInterval, RetryMaxInterval: bufferRetryMaxInterval, @@ -74,7 +76,7 @@ func TestLoadConfig(t *testing.T) { TracesSettings: newDefaultTracesSettings(), LogsSettings: newDefaultLogsSettings(), ServerHostSettings: newDefaultServerHostSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), }, @@ -84,8 +86,10 @@ func TestLoadConfig(t *testing.T) { expected: &Config{ DatasetURL: "https://app.scalyr.com", APIKey: "key-full", + Debug: true, BufferSettings: BufferSettings{ MaxLifetime: 3456 * time.Millisecond, + PurgeOlderThan: 78 * time.Second, GroupBy: []string{"body.map.kubernetes.pod_id", "body.map.kubernetes.docker_id", "body.map.stream"}, RetryInitialInterval: 21 * time.Second, RetryMaxInterval: 22 * time.Second, @@ -114,10 +118,10 @@ func TestLoadConfig(t *testing.T) { UseHostName: false, ServerHost: "server-host", }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 11 * time.Nanosecond, - RandomizationFactor: 11.3, + RandomizationFactor: 0.113, Multiplier: 11.6, MaxInterval: 12 * time.Nanosecond, MaxElapsedTime: 13 * time.Nanosecond, @@ -140,7 +144,7 @@ func TestLoadConfig(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub(tt.id.String()) - require.Nil(t, err) + require.NoError(t, err) require.Nil(t, component.UnmarshalConfig(sub, cfg)) if assert.Nil(t, component.ValidateConfig(cfg)) { assert.Equal(t, tt.expected, cfg) @@ -156,11 +160,16 @@ type CreateTest struct { } func createExporterTests() []CreateTest { + factory := NewFactory() + defaultCfg := factory.CreateDefaultConfig().(*Config) + defaultCfg.APIKey = "default-api-key" + defaultCfg.DatasetURL = "https://app.eu.scalyr.com" + return []CreateTest{ { name: "broken", config: &Config{}, - expectedError: fmt.Errorf("cannot get DataSetExpoter: cannot convert config: DatasetURL: ; BufferSettings: {MaxLifetime:0s GroupBy:[] RetryInitialInterval:0s RetryMaxInterval:0s RetryMaxElapsedTime:0s RetryShutdownTimeout:0s}; LogsSettings: {ExportResourceInfo:false ExportResourcePrefix: ExportScopeInfo:false ExportScopePrefix: DecomposeComplexMessageField:false DecomposedComplexMessagePrefix: exportSettings:{ExportSeparator: ExportDistinguishingSuffix:}}; TracesSettings: {exportSettings:{ExportSeparator: ExportDistinguishingSuffix:}}; ServerHostSettings: {UseHostName:false ServerHost:}; RetrySettings: {Enabled:false InitialInterval:0s RandomizationFactor:0 Multiplier:0 MaxInterval:0s MaxElapsedTime:0s}; QueueSettings: {Enabled:false NumConsumers:0 QueueSize:0 StorageID:}; TimeoutSettings: {Timeout:0s}; config is not valid: api_key is required"), + expectedError: fmt.Errorf("cannot get DataSetExporter: cannot convert config: DatasetURL: ; APIKey: [REDACTED] (0); Debug: false; BufferSettings: {MaxLifetime:0s PurgeOlderThan:0s GroupBy:[] RetryInitialInterval:0s RetryMaxInterval:0s RetryMaxElapsedTime:0s RetryShutdownTimeout:0s}; LogsSettings: {ExportResourceInfo:false ExportResourcePrefix: ExportScopeInfo:false ExportScopePrefix: DecomposeComplexMessageField:false DecomposedComplexMessagePrefix: exportSettings:{ExportSeparator: ExportDistinguishingSuffix:}}; TracesSettings: {exportSettings:{ExportSeparator: ExportDistinguishingSuffix:}}; ServerHostSettings: {UseHostName:false ServerHost:}; BackOffConfig: {Enabled:false InitialInterval:0s RandomizationFactor:0 Multiplier:0 MaxInterval:0s MaxElapsedTime:0s}; QueueSettings: {Enabled:false NumConsumers:0 QueueSize:0 StorageID:}; TimeoutSettings: {Timeout:0s}; config is not valid: api_key is required"), }, { name: "valid", @@ -169,6 +178,7 @@ func createExporterTests() []CreateTest { APIKey: "key-lib", BufferSettings: BufferSettings{ MaxLifetime: 12345, + PurgeOlderThan: 78901, GroupBy: []string{"attributes.container_id"}, RetryInitialInterval: time.Second, RetryMaxInterval: time.Minute, @@ -180,11 +190,16 @@ func createExporterTests() []CreateTest { ServerHostSettings: ServerHostSettings{ UseHostName: true, }, - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), }, expectedError: nil, }, + { + name: "default", + config: defaultCfg, + expectedError: nil, + }, } } diff --git a/exporter/datasetexporter/generated_component_test.go b/exporter/datasetexporter/generated_component_test.go new file mode 100644 index 000000000000..e80c4b9f3f51 --- /dev/null +++ b/exporter/datasetexporter/generated_component_test.go @@ -0,0 +1,94 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package datasetexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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 exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/datasetexporter/go.mod b/exporter/datasetexporter/go.mod index 0223c6542c8b..62b9e86c4d12 100644 --- a/exporter/datasetexporter/go.mod +++ b/exporter/datasetexporter/go.mod @@ -1,62 +1,69 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter -go 1.20 +go 1.21 require ( - github.com/google/uuid v1.4.0 - // github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.77.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/scalyr/dataset-go v0.14.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 - golang.org/x/time v0.4.0 + github.com/google/uuid v1.6.0 + // github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/scalyr/dataset-go v0.18.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 - go.opentelemetry.io/collector/config/configopaque v0.89.0 + github.com/cenkalti/backoff/v4 v4.3.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cskr/pubsub v1.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/datasetexporter/go.sum b/exporter/datasetexporter/go.sum index 380c4e2db0a7..92d3025943e2 100644 --- a/exporter/datasetexporter/go.sum +++ b/exporter/datasetexporter/go.sum @@ -1,59 +1,32 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= -github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -62,15 +35,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -80,109 +52,92 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/scalyr/dataset-go v0.14.0 h1:uRkoUt6LcMcH3VUTjOakQ4aq+1ooJB2t47oqYRUkV/k= -github.com/scalyr/dataset-go v0.14.0/go.mod h1:+a4BvVyS7mKquK7ySuWh4vygyDBREQrdikdcnABYKFw= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/scalyr/dataset-go v0.18.0 h1:CTv7kk/FGdiicTWo3h1brFusHD1yjhVGINFamP8uukw= +github.com/scalyr/dataset-go v0.18.0/go.mod h1:4x0JK5X0UdhZ2TEO3kHu9pTELDRc3WsrBBwQfkOPZKc= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= @@ -190,38 +145,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/datasetexporter/internal/metadata/generated_status.go b/exporter/datasetexporter/internal/metadata/generated_status.go index 8b046b1fbb8a..749593d9f20b 100644 --- a/exporter/datasetexporter/internal/metadata/generated_status.go +++ b/exporter/datasetexporter/internal/metadata/generated_status.go @@ -4,10 +4,23 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("dataset") ) const ( - Type = "dataset" LogsStability = component.StabilityLevelAlpha TracesStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/dataset") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/dataset") +} diff --git a/exporter/datasetexporter/logs_exporter.go b/exporter/datasetexporter/logs_exporter.go index 8ff1a98892e1..9ddba874f7f2 100644 --- a/exporter/datasetexporter/logs_exporter.go +++ b/exporter/datasetexporter/logs_exporter.go @@ -43,7 +43,7 @@ func createLogsExporter(ctx context.Context, set exporter.CreateSettings, config cfg := castConfig(config) e, err := newDatasetExporter("logs", cfg, set) if err != nil { - return nil, fmt.Errorf("cannot get DataSetExpoter: %w", err) + return nil, fmt.Errorf("cannot get DataSetExporter: %w", err) } return exporterhelper.NewLogsExporter( @@ -52,7 +52,7 @@ func createLogsExporter(ctx context.Context, set exporter.CreateSettings, config config, e.consumeLogs, exporterhelper.WithQueue(cfg.QueueSettings), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithTimeout(cfg.TimeoutSettings), exporterhelper.WithShutdown(e.shutdown), ) diff --git a/exporter/datasetexporter/logs_exporter_stress_test.go b/exporter/datasetexporter/logs_exporter_stress_test.go index 60384308e380..f023cdb02a99 100644 --- a/exporter/datasetexporter/logs_exporter_stress_test.go +++ b/exporter/datasetexporter/logs_exporter_stress_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build integration -// +build integration package datasetexporter @@ -21,6 +20,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/pdata/pcommon" @@ -82,7 +82,7 @@ func TestConsumeLogsManyLogsShouldSucceed(t *testing.T) { GroupBy: []string{"attributes.container_id"}, RetryShutdownTimeout: time.Minute, }, - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), } @@ -107,7 +107,7 @@ func TestConsumeLogsManyLogsShouldSucceed(t *testing.T) { expectedKeys[key] = 1 } err = logs.ConsumeLogs(context.Background(), batch) - assert.Nil(t, err) + assert.NoError(t, err) time.Sleep(time.Duration(float64(maxDelay.Nanoseconds()) * 0.7)) } @@ -115,7 +115,7 @@ func TestConsumeLogsManyLogsShouldSucceed(t *testing.T) { time.Sleep(time.Second) err = logs.Shutdown(context.Background()) - assert.Nil(t, err) + assert.NoError(t, err) lastProcessed := uint64(0) sameNumber := 0 for { diff --git a/exporter/datasetexporter/logs_exporter_test.go b/exporter/datasetexporter/logs_exporter_test.go index 49eb45b47740..7e63516c6378 100644 --- a/exporter/datasetexporter/logs_exporter_test.go +++ b/exporter/datasetexporter/logs_exporter_test.go @@ -11,7 +11,9 @@ import ( "io" "net/http" "net/http/httptest" + "sort" "strconv" + "sync" "sync/atomic" "testing" "time" @@ -20,6 +22,7 @@ import ( "github.com/scalyr/dataset-go/pkg/api/request" "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/pdata/pcommon" @@ -780,12 +783,15 @@ func TestConsumeLogsShouldSucceed(t *testing.T) { attempt := atomic.Uint64{} wasSuccessful := atomic.Bool{} - addRequest := add_events.AddEventsRequest{} + addRequests := []add_events.AddEventsRequest{} + lock := sync.Mutex{} server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { attempt.Add(1) cer, err := extract(req) - addRequest = cer + lock.Lock() + addRequests = append(addRequests, cer) + lock.Unlock() assert.NoError(t, err, "Error reading request: %v", err) @@ -804,8 +810,10 @@ func TestConsumeLogsShouldSucceed(t *testing.T) { config := &Config{ DatasetURL: server.URL, APIKey: "key-lib", + Debug: true, BufferSettings: BufferSettings{ - MaxLifetime: 500 * time.Millisecond, + MaxLifetime: 2 * time.Second, + PurgeOlderThan: 10 * time.Second, GroupBy: []string{"attributes.container_id"}, RetryInitialInterval: time.Second, RetryMaxInterval: time.Minute, @@ -831,7 +839,7 @@ func TestConsumeLogsShouldSucceed(t *testing.T) { ServerHostSettings: ServerHostSettings{ ServerHost: testServerHost, }, - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), } @@ -874,158 +882,211 @@ func TestConsumeLogsShouldSucceed(t *testing.T) { assert.NotNil(t, logs) err = logs.ConsumeLogs(context.Background(), ld) - assert.Nil(t, err) + assert.NoError(t, err) time.Sleep(time.Second) err = logs.Shutdown(context.Background()) - assert.Nil(t, err) + assert.NoError(t, err) } assert.True(t, wasSuccessful.Load()) + assert.Equal(t, uint64(4), attempt.Load()) + + sort.SliceStable(addRequests, func(i, j int) bool { + if addRequests[i].Session == addRequests[j].Session { + return len(addRequests[i].Events) < len(addRequests[j].Events) + } + return addRequests[i].Session < addRequests[j].Session + }) + assert.Equal(t, - add_events.AddEventsRequest{ - AuthParams: request.AuthParams{ - Token: "key-lib", - }, - AddEventsRequestParams: add_events.AddEventsRequestParams{ - Session: addRequest.Session, - SessionInfo: addRequest.SessionInfo, - Events: []*add_events.Event{ - { - Thread: testLEventReq.Thread, - Log: testLEventReq.Log, - Sev: testLEventReq.Sev, - Ts: testLEventReq.Ts, - Attrs: map[string]any{ - add_events.AttrOrigServerHost: testServerHost, - "app": "server", - "instance_num": float64(1), - "dropped_attributes_count": float64(1), - "message": "This is a log message", - "span_id": "0102040800000000", - "trace_id": "08040201000000000000000000000000", - "bundle_key": "d41d8cd98f00b204e9800998ecf8427e", - - "R#resource-attr": "resource-attr-val-1", - }, + []add_events.AddEventsRequest{ + { + AuthParams: request.AuthParams{ + Token: "key-lib", + }, + AddEventsRequestParams: add_events.AddEventsRequestParams{ + Session: addRequests[0].Session, + SessionInfo: &add_events.SessionInfo{ + add_events.AttrServerHost: "serverHostFromAttribute", + add_events.AttrSessionKey: "0296b9a57cb379df0f35aaf2d23500d3", }, - { - Thread: testLEventReq.Thread, - Log: testLEventReq.Log, - Sev: testLEventReq.Sev, - Ts: testLEventReq.Ts, - Attrs: map[string]any{ - add_events.AttrOrigServerHost: "serverHostFromAttribute", - "app": "server", - "instance_num": float64(1), - "dropped_attributes_count": float64(1), - "message": "This is a log message", - "span_id": "0102040800000000", - "trace_id": "08040201000000000000000000000000", - "bundle_key": "d41d8cd98f00b204e9800998ecf8427e", - - "R#resource-attr": "resource-attr-val-1", - "R#serverHost": "serverHostFromResource", + Events: []*add_events.Event{ + { + Thread: testLEventReq.Thread, + Log: testLEventReq.Log, + Sev: testLEventReq.Sev, + Ts: testLEventReq.Ts, + Attrs: map[string]any{ + "app": "server", + "instance_num": float64(1), + "dropped_attributes_count": float64(1), + "message": "This is a log message", + "span_id": "0102040800000000", + "trace_id": "08040201000000000000000000000000", + + "R#resource-attr": "resource-attr-val-1", + "R#serverHost": "serverHostFromResource", + }, + ServerHost: "", }, }, - { - Thread: testLEventReq.Thread, - Log: testLEventReq.Log, - Sev: testLEventReq.Sev, - Ts: testLEventReq.Ts, - Attrs: map[string]any{ - add_events.AttrOrigServerHost: "serverHostFromResourceServer", - "app": "server", - "instance_num": float64(1), - "dropped_attributes_count": float64(1), - "message": "This is a log message", - "span_id": "0102040800000000", - "trace_id": "08040201000000000000000000000000", - "bundle_key": "d41d8cd98f00b204e9800998ecf8427e", - - "R#resource-attr": "resource-attr-val-1", - "R#host.name": "serverHostFromResourceHost", - "R#serverHost": "serverHostFromResourceServer", + Threads: []*add_events.Thread{testLThread}, + Logs: []*add_events.Log{testLLog}, + }, + }, + { + AuthParams: request.AuthParams{ + Token: "key-lib", + }, + AddEventsRequestParams: add_events.AddEventsRequestParams{ + Session: addRequests[1].Session, + SessionInfo: &add_events.SessionInfo{ + add_events.AttrServerHost: "serverHostFromResourceHost", + add_events.AttrSessionKey: "73b97897d80d89c9a09a3ee6ed178650", + }, + Events: []*add_events.Event{ + { + Thread: testLEventReq.Thread, + Log: testLEventReq.Log, + Sev: testLEventReq.Sev, + Ts: testLEventReq.Ts, + Attrs: map[string]any{ + "app": "server", + "instance_num": float64(1), + "dropped_attributes_count": float64(1), + "message": "This is a log message", + "span_id": "0102040800000000", + "trace_id": "08040201000000000000000000000000", + + "R#resource-attr": "resource-attr-val-1", + "R#host.name": "serverHostFromResourceHost", + }, }, }, - { - Thread: testLEventReq.Thread, - Log: testLEventReq.Log, - Sev: testLEventReq.Sev, - Ts: testLEventReq.Ts, - Attrs: map[string]any{ - add_events.AttrOrigServerHost: "serverHostFromResourceHost", - "app": "server", - "instance_num": float64(1), - "dropped_attributes_count": float64(1), - "message": "This is a log message", - "span_id": "0102040800000000", - "trace_id": "08040201000000000000000000000000", - "bundle_key": "d41d8cd98f00b204e9800998ecf8427e", - - "R#resource-attr": "resource-attr-val-1", - "R#host.name": "serverHostFromResourceHost", + Threads: []*add_events.Thread{testLThread}, + Logs: []*add_events.Log{testLLog}, + }, + }, + { + AuthParams: request.AuthParams{ + Token: "key-lib", + }, + AddEventsRequestParams: add_events.AddEventsRequestParams{ + Session: addRequests[2].Session, + SessionInfo: &add_events.SessionInfo{ + add_events.AttrServerHost: "serverHostFromResourceServer", + add_events.AttrSessionKey: "770e22b433d2e9a31fa9a81abf3b9b87", + }, + Events: []*add_events.Event{ + { + Thread: testLEventReq.Thread, + Log: testLEventReq.Log, + Sev: testLEventReq.Sev, + Ts: testLEventReq.Ts, + Attrs: map[string]any{ + "app": "server", + "instance_num": float64(1), + "dropped_attributes_count": float64(1), + "message": "This is a log message", + "span_id": "0102040800000000", + "trace_id": "08040201000000000000000000000000", + + "R#resource-attr": "resource-attr-val-1", + "R#host.name": "serverHostFromResourceHost", + "R#serverHost": "serverHostFromResourceServer", + }, }, }, - { - Thread: testLEventReq.Thread, - Log: testLEventReq.Log, - Sev: testLEventReq.Sev, - Ts: testLEventReq.Ts, - Attrs: map[string]any{ - add_events.AttrOrigServerHost: testServerHost, - "app": "server", - "instance_num": float64(1), - "dropped_attributes_count": float64(1), - "message": "This is a log message", - "span_id": "0102040800000000", - "trace_id": "08040201000000000000000000000000", - "bundle_key": "d41d8cd98f00b204e9800998ecf8427e", - - "string": "stringA", - "double": 2.0, - "bool": true, - "empty": nil, - "int": float64(3), - "map#map_empty": nil, - "map#map_string": "map_stringA", - "map#map_map#map_map_string": "map_map_stringA", - "slice#0": "slice_stringA", - "name": "filled_nameA", - "span_id_": "filled_span_idA", - - "S#string": "stringS", - "S#double": 2.0, - "S#bool": true, - "S#empty": nil, - "S#int": float64(3), - "S#map#map_empty": nil, - "S#map#map_string": "map_stringS", - "S#map#map_map#map_map_string": "map_map_stringS", - "S#slice#0": "slice_stringS", - "S#name": "filled_nameS", - "S#span_id": "filled_span_idS", - - "R#string": "stringR", - "R#double": 2.0, - "R#bool": true, - "R#empty": nil, - "R#int": float64(3), - "R#map#map_empty": nil, - "R#map#map_string": "map_stringR", - "R#map#map_map#map_map_string": "map_map_stringR", - "R#slice#0": "slice_stringR", - "R#name": "filled_nameR", - "R#span_id": "filled_span_idR", - - "R#resource-attr": "resource-attr-val-1", + Threads: []*add_events.Thread{testLThread}, + Logs: []*add_events.Log{testLLog}, + }, + }, + { + AuthParams: request.AuthParams{ + Token: "key-lib", + }, + AddEventsRequestParams: add_events.AddEventsRequestParams{ + Session: addRequests[3].Session, + SessionInfo: &add_events.SessionInfo{ + add_events.AttrServerHost: "foo", + add_events.AttrSessionKey: "caedd419dc354c24a69aac7508890ec1", + }, + Events: []*add_events.Event{ + { + Thread: testLEventReq.Thread, + Log: testLEventReq.Log, + Sev: testLEventReq.Sev, + Ts: testLEventReq.Ts, + Attrs: map[string]any{ + "app": "server", + "instance_num": float64(1), + "dropped_attributes_count": float64(1), + "message": "This is a log message", + "span_id": "0102040800000000", + "trace_id": "08040201000000000000000000000000", + + "R#resource-attr": "resource-attr-val-1", + }, + }, + { + Thread: testLEventReq.Thread, + Log: testLEventReq.Log, + Sev: testLEventReq.Sev, + Ts: testLEventReq.Ts, + Attrs: map[string]any{ + "app": "server", + "instance_num": float64(1), + "dropped_attributes_count": float64(1), + "message": "This is a log message", + "span_id": "0102040800000000", + "trace_id": "08040201000000000000000000000000", + + "string": "stringA", + "double": 2.0, + "bool": true, + "empty": nil, + "int": float64(3), + "map#map_empty": nil, + "map#map_string": "map_stringA", + "map#map_map#map_map_string": "map_map_stringA", + "slice#0": "slice_stringA", + "name": "filled_nameA", + "span_id_": "filled_span_idA", + + "S#string": "stringS", + "S#double": 2.0, + "S#bool": true, + "S#empty": nil, + "S#int": float64(3), + "S#map#map_empty": nil, + "S#map#map_string": "map_stringS", + "S#map#map_map#map_map_string": "map_map_stringS", + "S#slice#0": "slice_stringS", + "S#name": "filled_nameS", + "S#span_id": "filled_span_idS", + + "R#string": "stringR", + "R#double": 2.0, + "R#bool": true, + "R#empty": nil, + "R#int": float64(3), + "R#map#map_empty": nil, + "R#map#map_string": "map_stringR", + "R#map#map_map#map_map_string": "map_map_stringR", + "R#slice#0": "slice_stringR", + "R#name": "filled_nameR", + "R#span_id": "filled_span_idR", + + "R#resource-attr": "resource-attr-val-1", + }, }, }, + Threads: []*add_events.Thread{testLThread}, + Logs: []*add_events.Log{testLLog}, }, - Threads: []*add_events.Thread{testLThread}, - Logs: []*add_events.Log{testLLog}, }, }, - addRequest, + addRequests, ) } diff --git a/exporter/datasetexporter/metadata.yaml b/exporter/datasetexporter/metadata.yaml index 98819460e5cc..5ae4c32e1238 100644 --- a/exporter/datasetexporter/metadata.yaml +++ b/exporter/datasetexporter/metadata.yaml @@ -1,4 +1,5 @@ type: dataset +scope_name: otelcol/dataset status: class: exporter @@ -6,4 +7,11 @@ status: alpha: [logs, traces] distributions: [contrib] codeowners: - active: [atoulme, martin-majlis-s1, zdaratom, tomaz-s1] + active: [atoulme, martin-majlis-s1, zdaratom-s1, tomaz-s1] + +# TODO: Update the exporter to pass the tests +tests: + config: + dataset_url: https://app.scalyr.com + api_key: key-minimal + skip_lifecycle: true diff --git a/exporter/datasetexporter/testdata/config.yaml b/exporter/datasetexporter/testdata/config.yaml index 9ffe4d29a733..1338aec01753 100644 --- a/exporter/datasetexporter/testdata/config.yaml +++ b/exporter/datasetexporter/testdata/config.yaml @@ -14,8 +14,10 @@ dataset/lib: dataset/full: dataset_url: https://app.scalyr.com api_key: key-full + debug: true buffer: max_lifetime: 3456ms + purge_older_than: 78s group_by: - body.map.kubernetes.pod_id - body.map.kubernetes.docker_id @@ -42,7 +44,7 @@ dataset/full: retry_on_failure: enabled: true initial_interval: 11 - randomization_factor: 11.3 + randomization_factor: 0.113 multiplier: 11.6 max_interval: 12 max_elapsed_time: 13 diff --git a/exporter/datasetexporter/traces_exporter.go b/exporter/datasetexporter/traces_exporter.go index 5ee1024e591c..613775384206 100644 --- a/exporter/datasetexporter/traces_exporter.go +++ b/exporter/datasetexporter/traces_exporter.go @@ -21,9 +21,9 @@ const ServiceNameKey = "service.name" func createTracesExporter(ctx context.Context, set exporter.CreateSettings, config component.Config) (exporter.Traces, error) { cfg := castConfig(config) - e, err := newDatasetExporter("logs", cfg, set) + e, err := newDatasetExporter("traces", cfg, set) if err != nil { - return nil, fmt.Errorf("cannot get DataSetExpoter: %w", err) + return nil, fmt.Errorf("cannot get DataSetExporter: %w", err) } return exporterhelper.NewTracesExporter( @@ -32,7 +32,7 @@ func createTracesExporter(ctx context.Context, set exporter.CreateSettings, conf config, e.consumeTraces, exporterhelper.WithQueue(cfg.QueueSettings), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithTimeout(cfg.TimeoutSettings), exporterhelper.WithShutdown(e.shutdown), ) diff --git a/exporter/dynatraceexporter/README.md b/exporter/dynatraceexporter/README.md index 8abaef4579fc..fa02ea5f4e71 100644 --- a/exporter/dynatraceexporter/README.md +++ b/exporter/dynatraceexporter/README.md @@ -21,14 +21,12 @@ More information on using the collector with Dynatrace can be found in the | Status | | | ------------- |-----------| | Stability | [deprecated]: metrics | -| Distributions | [contrib], [aws], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fdynatrace%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fdynatrace) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fdynatrace%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fdynatrace) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dyladan](https://www.github.com/dyladan), [@arminru](https://www.github.com/arminru), [@evan-bradley](https://www.github.com/evan-bradley) | [deprecated]: https://github.com/open-telemetry/opentelemetry-collector#deprecated [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector The Dynatrace metrics exporter exports metrics to the [Metrics API v2](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/post-ingest-metrics/) diff --git a/exporter/dynatraceexporter/config/config.go b/exporter/dynatraceexporter/config/config.go index c5e58ef09635..5d9df8ac11b3 100644 --- a/exporter/dynatraceexporter/config/config.go +++ b/exporter/dynatraceexporter/config/config.go @@ -11,6 +11,7 @@ import ( "github.com/dynatrace-oss/dynatrace-metric-utils-go/metric/apiconstants" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry" @@ -18,10 +19,10 @@ import ( // Config defines configuration for the Dynatrace exporter. type Config struct { - confighttp.HTTPClientSettings `mapstructure:",squash"` + confighttp.ClientConfig `mapstructure:",squash"` exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` ResourceToTelemetrySettings resourcetotelemetry.Settings `mapstructure:"resource_to_telemetry_conversion"` // Dynatrace API token with metrics ingest permission @@ -43,8 +44,8 @@ func (c *Config) Validate() error { return fmt.Errorf("queue settings has invalid configuration: %w", err) } - if c.HTTPClientSettings.Headers == nil { - c.HTTPClientSettings.Headers = make(map[string]configopaque.String) + if c.ClientConfig.Headers == nil { + c.ClientConfig.Headers = make(map[string]configopaque.String) } c.APIToken = strings.TrimSpace(c.APIToken) @@ -55,15 +56,15 @@ func (c *Config) Validate() error { return errors.New("api_token is required if Endpoint is provided") } - c.HTTPClientSettings.Headers["Authorization"] = configopaque.String(fmt.Sprintf("Api-Token %s", c.APIToken)) + c.ClientConfig.Headers["Authorization"] = configopaque.String(fmt.Sprintf("Api-Token %s", c.APIToken)) } if !(strings.HasPrefix(c.Endpoint, "http://") || strings.HasPrefix(c.Endpoint, "https://")) { return errors.New("endpoint must start with https:// or http://") } - c.HTTPClientSettings.Headers["Content-Type"] = "text/plain; charset=UTF-8" - c.HTTPClientSettings.Headers["User-Agent"] = "opentelemetry-collector" + c.ClientConfig.Headers["Content-Type"] = "text/plain; charset=UTF-8" + c.ClientConfig.Headers["User-Agent"] = "opentelemetry-collector" return nil } diff --git a/exporter/dynatraceexporter/config/config_test.go b/exporter/dynatraceexporter/config/config_test.go index 9da37d10c739..6ac082b9b642 100644 --- a/exporter/dynatraceexporter/config/config_test.go +++ b/exporter/dynatraceexporter/config/config_test.go @@ -22,7 +22,7 @@ func TestConfig_Validate(t *testing.T) { }) t.Run("Valid configuration", func(t *testing.T) { - c := &Config{HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: "http://example.com/"}, APIToken: "token"} + c := &Config{ClientConfig: confighttp.ClientConfig{Endpoint: "http://example.com/"}, APIToken: "token"} err := c.Validate() assert.NoError(t, err) @@ -30,7 +30,7 @@ func TestConfig_Validate(t *testing.T) { }) t.Run("Invalid Endpoint", func(t *testing.T) { - c := &Config{HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: "example.com"}} + c := &Config{ClientConfig: confighttp.ClientConfig{Endpoint: "example.com"}} err := c.Validate() assert.Error(t, err) }) diff --git a/exporter/dynatraceexporter/config/package_test.go b/exporter/dynatraceexporter/config/package_test.go new file mode 100644 index 000000000000..cac5be666ad9 --- /dev/null +++ b/exporter/dynatraceexporter/config/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package config + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/dynatraceexporter/factory.go b/exporter/dynatraceexporter/factory.go index 9692345c554c..c01baa8ef51e 100644 --- a/exporter/dynatraceexporter/factory.go +++ b/exporter/dynatraceexporter/factory.go @@ -8,6 +8,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -28,14 +29,14 @@ func NewFactory() exporter.Factory { // createDefaultConfig creates the default exporter configuration func createDefaultConfig() component.Config { return &dtconfig.Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), ResourceToTelemetrySettings: resourcetotelemetry.Settings{ Enabled: false, }, - APIToken: "", - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ""}, + APIToken: "", + ClientConfig: confighttp.ClientConfig{Endpoint: ""}, Tags: []string{}, DefaultDimensions: make(map[string]string), @@ -59,7 +60,7 @@ func createMetricsExporter( cfg, exp.PushMetricsData, exporterhelper.WithQueue(cfg.QueueSettings), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithStart(exp.start), ) if err != nil { diff --git a/exporter/dynatraceexporter/factory_test.go b/exporter/dynatraceexporter/factory_test.go index 7cc366b37c03..a4bccad37aed 100644 --- a/exporter/dynatraceexporter/factory_test.go +++ b/exporter/dynatraceexporter/factory_test.go @@ -14,6 +14,7 @@ import ( "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -28,7 +29,7 @@ func TestCreateDefaultConfig(t *testing.T) { cfg := factory.CreateDefaultConfig() assert.Equal(t, &dtconfig.Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), ResourceToTelemetrySettings: resourcetotelemetry.Settings{ Enabled: false, @@ -55,10 +56,10 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "defaults"), expected: &dtconfig.Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: apiconstants.GetDefaultOneAgentEndpoint(), Headers: map[string]configopaque.String{ "Content-Type": "text/plain; charset=UTF-8", @@ -71,10 +72,10 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "valid"), expected: &dtconfig.Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "http://example.com/api/v2/metrics/ingest", Headers: map[string]configopaque.String{ "Authorization": "Api-Token token", @@ -94,10 +95,10 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "valid_tags"), expected: &dtconfig.Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "http://example.com/api/v2/metrics/ingest", Headers: map[string]configopaque.String{ "Authorization": "Api-Token token", diff --git a/exporter/dynatraceexporter/generated_component_test.go b/exporter/dynatraceexporter/generated_component_test.go new file mode 100644 index 000000000000..cf9af9d2bc5f --- /dev/null +++ b/exporter/dynatraceexporter/generated_component_test.go @@ -0,0 +1,126 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package dynatraceexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/dynatraceexporter/go.mod b/exporter/dynatraceexporter/go.mod index a906a86be4c8..ecaf3758b02e 100644 --- a/exporter/dynatraceexporter/go.mod +++ b/exporter/dynatraceexporter/go.mod @@ -1,68 +1,79 @@ // Deprecated: The Dynatrace metrics exporter is deprecated. After the end of 2023, no support, updates, or compatibility with newer OTel versions will be provided/guaranteed. See https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/23992 for more details. module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter -go 1.20 +go 1.21 require ( github.com/dynatrace-oss/dynatrace-metric-utils-go v0.5.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/dynatraceexporter/go.sum b/exporter/dynatraceexporter/go.sum index 616848df2edf..485dc436fc15 100644 --- a/exporter/dynatraceexporter/go.sum +++ b/exporter/dynatraceexporter/go.sum @@ -1,84 +1,58 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -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/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dynatrace-oss/dynatrace-metric-utils-go v0.5.0 h1:wHGPJSXvwKQVf/XfhjUPyrhpcPKWNy8F3ikH+eiwoBg= github.com/dynatrace-oss/dynatrace-metric-utils-go v0.5.0/go.mod h1:PseHFo8Leko7J4A/TfZ6kkHdkzKBLUta6hRZR/OEbbc= -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/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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -88,119 +62,106 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -208,38 +169,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/dynatraceexporter/internal/metadata/generated_status.go b/exporter/dynatraceexporter/internal/metadata/generated_status.go index c7553b5d7b66..b1e9fa13d455 100644 --- a/exporter/dynatraceexporter/internal/metadata/generated_status.go +++ b/exporter/dynatraceexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("dynatrace") ) const ( - Type = "dynatrace" MetricsStability = component.StabilityLevelDeprecated ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/dynatrace") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/dynatrace") +} diff --git a/exporter/dynatraceexporter/internal/serialization/package_test.go b/exporter/dynatraceexporter/internal/serialization/package_test.go new file mode 100644 index 000000000000..5be5ed5b2865 --- /dev/null +++ b/exporter/dynatraceexporter/internal/serialization/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package serialization + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/dynatraceexporter/metadata.yaml b/exporter/dynatraceexporter/metadata.yaml index f7d20149eca5..0c217894827a 100644 --- a/exporter/dynatraceexporter/metadata.yaml +++ b/exporter/dynatraceexporter/metadata.yaml @@ -1,9 +1,13 @@ type: dynatrace +scope_name: otelcol/dynatrace status: class: exporter stability: deprecated: [metrics] - distributions: [contrib, aws, observiq] + distributions: [contrib] codeowners: active: [dyladan, arminru, evan-bradley] + +tests: + expect_consumer_error: true diff --git a/exporter/dynatraceexporter/metrics_exporter.go b/exporter/dynatraceexporter/metrics_exporter.go index a4576778e996..6b4d1a26befa 100644 --- a/exporter/dynatraceexporter/metrics_exporter.go +++ b/exporter/dynatraceexporter/metrics_exporter.go @@ -278,8 +278,8 @@ func (e *metricsExporter) sendBatch(ctx context.Context, lines []string) error { } // start starts the exporter -func (e *metricsExporter) start(_ context.Context, host component.Host) (err error) { - client, err := e.cfg.HTTPClientSettings.ToClient(host, e.settings) +func (e *metricsExporter) start(ctx context.Context, host component.Host) (err error) { + client, err := e.cfg.ClientConfig.ToClientContext(ctx, host, e.settings) if err != nil { e.settings.Logger.Error("Failed to construct HTTP client", zap.Error(err)) return fmt.Errorf("start: %w", err) diff --git a/exporter/dynatraceexporter/metrics_exporter_test.go b/exporter/dynatraceexporter/metrics_exporter_test.go index be468800c6e8..7aaa66a7dad8 100644 --- a/exporter/dynatraceexporter/metrics_exporter_test.go +++ b/exporter/dynatraceexporter/metrics_exporter_test.go @@ -144,10 +144,10 @@ func Test_exporter_PushMetricsData(t *testing.T) { fields: fields{ settings: componenttest.NewNopTelemetrySettings(), cfg: &config.Config{ - APIToken: "token", - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ts.URL}, - Prefix: "prefix", - DefaultDimensions: map[string]string{}, + APIToken: "token", + ClientConfig: confighttp.ClientConfig{Endpoint: ts.URL}, + Prefix: "prefix", + DefaultDimensions: map[string]string{}, }, client: ts.Client(), }, @@ -308,9 +308,9 @@ func Test_SumMetrics(t *testing.T) { exp := &metricsExporter{ settings: componenttest.NewNopTelemetrySettings(), cfg: &config.Config{ - APIToken: "token", - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ts.URL}, - Prefix: "prefix", + APIToken: "token", + ClientConfig: confighttp.ClientConfig{Endpoint: ts.URL}, + Prefix: "prefix", }, client: ts.Client(), prevPts: prevPts, @@ -351,7 +351,7 @@ func Test_SumMetrics(t *testing.T) { } func Test_exporter_PushMetricsData_EmptyPayload(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, _ *http.Request) { t.Fatal("Server should not be called") })) defer ts.Close() @@ -371,7 +371,7 @@ func Test_exporter_PushMetricsData_EmptyPayload(t *testing.T) { e := &metricsExporter{ settings: componenttest.NewNopTelemetrySettings(), cfg: &config.Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ts.URL}, + ClientConfig: confighttp.ClientConfig{Endpoint: ts.URL}, }, client: ts.Client(), } @@ -383,7 +383,7 @@ func Test_exporter_PushMetricsData_EmptyPayload(t *testing.T) { } func Test_exporter_PushMetricsData_isDisabled(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, _ *http.Request) { t.Fatal("Server should not be called") })) defer ts.Close() @@ -408,7 +408,7 @@ func Test_exporter_PushMetricsData_isDisabled(t *testing.T) { e := &metricsExporter{ settings: componenttest.NewNopTelemetrySettings(), cfg: &config.Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ts.URL}, + ClientConfig: confighttp.ClientConfig{Endpoint: ts.URL}, }, client: ts.Client(), isDisabled: true, @@ -421,7 +421,7 @@ func Test_exporter_PushMetricsData_isDisabled(t *testing.T) { } func Test_exporter_send_BadRequest(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusBadRequest) body, _ := json.Marshal(metricsResponse{ Ok: 0, @@ -434,7 +434,7 @@ func Test_exporter_send_BadRequest(t *testing.T) { e := &metricsExporter{ settings: componenttest.NewNopTelemetrySettings(), cfg: &config.Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ts.URL}, + ClientConfig: confighttp.ClientConfig{Endpoint: ts.URL}, }, client: ts.Client(), } @@ -450,7 +450,7 @@ func Test_exporter_send_BadRequest(t *testing.T) { } func Test_exporter_send_Unauthorized(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusUnauthorized) _, _ = w.Write([]byte{}) })) @@ -459,7 +459,7 @@ func Test_exporter_send_Unauthorized(t *testing.T) { e := &metricsExporter{ settings: componenttest.NewNopTelemetrySettings(), cfg: &config.Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ts.URL}, + ClientConfig: confighttp.ClientConfig{Endpoint: ts.URL}, }, client: ts.Client(), } @@ -475,7 +475,7 @@ func Test_exporter_send_Unauthorized(t *testing.T) { } func Test_exporter_send_TooLarge(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusRequestEntityTooLarge) _, _ = w.Write([]byte{}) })) @@ -484,7 +484,7 @@ func Test_exporter_send_TooLarge(t *testing.T) { e := &metricsExporter{ settings: componenttest.NewNopTelemetrySettings(), cfg: &config.Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ts.URL}, + ClientConfig: confighttp.ClientConfig{Endpoint: ts.URL}, }, client: ts.Client(), } @@ -500,7 +500,7 @@ func Test_exporter_send_TooLarge(t *testing.T) { } func Test_exporter_send_NotFound(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(404) _, _ = w.Write([]byte{}) })) @@ -509,10 +509,10 @@ func Test_exporter_send_NotFound(t *testing.T) { e := &metricsExporter{ settings: componenttest.NewNopTelemetrySettings(), cfg: &config.Config{ - APIToken: "token", - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ts.URL}, - Prefix: "prefix", - DefaultDimensions: map[string]string{}, + APIToken: "token", + ClientConfig: confighttp.ClientConfig{Endpoint: ts.URL}, + Prefix: "prefix", + DefaultDimensions: map[string]string{}, }, client: ts.Client(), } @@ -528,7 +528,7 @@ func Test_exporter_send_NotFound(t *testing.T) { } func Test_exporter_send_TooManyRequests(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusTooManyRequests) _, _ = w.Write([]byte{}) })) @@ -537,10 +537,10 @@ func Test_exporter_send_TooManyRequests(t *testing.T) { e := &metricsExporter{ settings: componenttest.NewNopTelemetrySettings(), cfg: &config.Config{ - APIToken: "token", - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ts.URL}, - Prefix: "prefix", - DefaultDimensions: map[string]string{}, + APIToken: "token", + ClientConfig: confighttp.ClientConfig{Endpoint: ts.URL}, + Prefix: "prefix", + DefaultDimensions: map[string]string{}, }, client: ts.Client(), } @@ -551,7 +551,7 @@ func Test_exporter_send_TooManyRequests(t *testing.T) { } func Test_exporter_send_MiscellaneousErrorCode(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusExpectationFailed) _, _ = w.Write([]byte{}) })) @@ -560,10 +560,10 @@ func Test_exporter_send_MiscellaneousErrorCode(t *testing.T) { e := &metricsExporter{ settings: componenttest.NewNopTelemetrySettings(), cfg: &config.Config{ - APIToken: "token", - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ts.URL}, - Prefix: "prefix", - DefaultDimensions: map[string]string{}, + APIToken: "token", + ClientConfig: confighttp.ClientConfig{Endpoint: ts.URL}, + Prefix: "prefix", + DefaultDimensions: map[string]string{}, }, client: ts.Client(), } @@ -577,7 +577,7 @@ func Test_exporter_send_MiscellaneousErrorCode(t *testing.T) { func Test_exporter_send_chunking(t *testing.T) { sentChunks := 0 - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusBadRequest) body, _ := json.Marshal(metricsResponse{ Ok: 0, @@ -591,7 +591,7 @@ func Test_exporter_send_chunking(t *testing.T) { e := &metricsExporter{ settings: componenttest.NewNopTelemetrySettings(), cfg: &config.Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ts.URL}, + ClientConfig: confighttp.ClientConfig{Endpoint: ts.URL}, }, client: ts.Client(), } @@ -617,7 +617,7 @@ func Test_exporter_send_chunking(t *testing.T) { } func Test_exporter_PushMetricsData_Error(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) })) ts.Close() @@ -657,10 +657,10 @@ func Test_exporter_PushMetricsData_Error(t *testing.T) { fields: fields{ logger: zap.NewNop(), cfg: &config.Config{ - APIToken: "token", - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ts.URL}, - Prefix: "prefix", - DefaultDimensions: map[string]string{}, + APIToken: "token", + ClientConfig: confighttp.ClientConfig{Endpoint: ts.URL}, + Prefix: "prefix", + DefaultDimensions: map[string]string{}, }, client: ts.Client(), }, @@ -685,12 +685,12 @@ func Test_exporter_PushMetricsData_Error(t *testing.T) { }) } -func Test_exporter_start_InvalidHTTPClientSettings(t *testing.T) { +func Test_exporter_start_InvalidClientConfig(t *testing.T) { cfg := &config.Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "localhost:9090", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "/non/existent", }, }, diff --git a/exporter/elasticsearchexporter/README.md b/exporter/elasticsearchexporter/README.md index 1a5d2e0f02c8..51f038139cac 100644 --- a/exporter/elasticsearchexporter/README.md +++ b/exporter/elasticsearchexporter/README.md @@ -4,13 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces, logs | -| Distributions | [contrib], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Felasticsearch%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Felasticsearch) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Felasticsearch%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Felasticsearch) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@JaredTan95](https://www.github.com/JaredTan95) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@JaredTan95](https://www.github.com/JaredTan95), [@ycombinator](https://www.github.com/ycombinator) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector This exporter supports sending OpenTelemetry logs to [Elasticsearch](https://www.elastic.co/elasticsearch). @@ -32,7 +31,7 @@ This exporter supports sending OpenTelemetry logs to [Elasticsearch](https://www [index](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices.html) or [datastream](https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html) name to publish events to. The default value is `logs-generic-default` -- `logs_dynamic_index` (optional): +- `logs_dynamic_index` (optional): takes resource or log record attribute named `elasticsearch.index.prefix` and `elasticsearch.index.suffix` resulting dynamically prefixed / suffixed indexing based on `logs_index`. (priority: resource attribute > log record attribute) - `enabled`(default=false): Enable/Disable dynamic index for log records @@ -44,6 +43,12 @@ This exporter supports sending OpenTelemetry logs to [Elasticsearch](https://www takes resource or span attribute named `elasticsearch.index.prefix` and `elasticsearch.index.suffix` resulting dynamically prefixed / suffixed indexing based on `traces_index`. (priority: resource attribute > span attribute) - `enabled`(default=false): Enable/Disable dynamic index for trace spans +- `logstash_format` (optional): Logstash format compatibility. Traces or Logs data can be written into an index in logstash format. + - `enabled`(default=false): Enable/Disable Logstash format compatibility. When `logstash_format.enabled` is `true`, the index name is composed using `traces/logs_index` or `traces/logs_dynamic_index` as prefix and the date, + e.g: If `traces/logs_index` or `traces/logs_dynamic_index` is equals to `otlp-generic-default` your index will become `otlp-generic-default-YYYY.MM.DD`. + The last string appended belongs to the date when the data is being generated. + - `prefix_separator`(default=`-`): Set a separator between logstash_prefix and date. + - `date_format`(default=`%Y.%m.%d`): Time format (based on strftime) to generate the second part of the Index name. - `pipeline` (optional): Optional [Ingest Node](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html) pipeline ID used for processing documents published by the exporter. - `flush`: Event bulk buffer flush settings @@ -57,11 +62,14 @@ This exporter supports sending OpenTelemetry logs to [Elasticsearch](https://www - `max_interval` (default=1m): Max waiting time if a HTTP request failed. - `mapping`: Events are encoded to JSON. The `mapping` allows users to configure additional mapping rules. - - `mode` (default=ecs): The fields naming mode. valid modes are: + - `mode` (default=none): The fields naming mode. valid modes are: - `none`: Use original fields and event structure from the OTLP event. - `ecs`: Try to map fields defined in the [OpenTelemetry Semantic Conventions](https://github.com/open-telemetry/semantic-conventions) - to [Elastic Common Schema (ECS)](https://www.elastic.co/guide/en/ecs/current/index.html). + to [Elastic Common Schema (ECS)](https://www.elastic.co/guide/en/ecs/current/index.html). :warning: This mode's behavior is unstable, it is currently undergoing changes + - `raw`: Omit the `Attributes.` string prefixed to field names for log and + span attributes as well as omit the `Events.` string prefixed to + field names for span events. - `fields` (optional): Configure additional fields mappings. - `file` (optional): Read additional field mappings from the provided YAML file. - `dedup` (default=true): Try to find and remove duplicate fields/attributes diff --git a/exporter/elasticsearchexporter/attribute.go b/exporter/elasticsearchexporter/attribute.go index 115cd1930f03..c2c187899b77 100644 --- a/exporter/elasticsearchexporter/attribute.go +++ b/exporter/elasticsearchexporter/attribute.go @@ -18,12 +18,21 @@ type attrGetter interface { Attributes() pcommon.Map } -// retrieve attribute out of resource and record (span or log, if not found in resource) -func getFromBothResourceAndAttribute(name string, resource attrGetter, record attrGetter) string { +// retrieve attribute out of resource, scope, and record (span or log, if not found in resource) +func getFromAttributes(name string, resource, scope, record attrGetter) string { var str string val, exist := resource.Attributes().Get(name) if !exist { - val, exist = record.Attributes().Get(name) + val, exist = scope.Attributes().Get(name) + if !exist { + val, exist = record.Attributes().Get(name) + if exist { + str = val.AsString() + } + } + if exist { + str = val.AsString() + } } if exist { str = val.AsString() diff --git a/exporter/elasticsearchexporter/config.go b/exporter/elasticsearchexporter/config.go index 460d605fe92c..63dfe75dde89 100644 --- a/exporter/elasticsearchexporter/config.go +++ b/exporter/elasticsearchexporter/config.go @@ -56,18 +56,25 @@ type Config struct { // https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html Pipeline string `mapstructure:"pipeline"` - HTTPClientSettings `mapstructure:",squash"` - Discovery DiscoverySettings `mapstructure:"discover"` - Retry RetrySettings `mapstructure:"retry"` - Flush FlushSettings `mapstructure:"flush"` - Mapping MappingsSettings `mapstructure:"mapping"` + ClientConfig `mapstructure:",squash"` + Discovery DiscoverySettings `mapstructure:"discover"` + Retry RetrySettings `mapstructure:"retry"` + Flush FlushSettings `mapstructure:"flush"` + Mapping MappingsSettings `mapstructure:"mapping"` + LogstashFormat LogstashFormatSettings `mapstructure:"logstash_format"` +} + +type LogstashFormatSettings struct { + Enabled bool `mapstructure:"enabled"` + PrefixSeparator string `mapstructure:"prefix_separator"` + DateFormat string `mapstructure:"date_format"` } type DynamicIndexSetting struct { Enabled bool `mapstructure:"enabled"` } -type HTTPClientSettings struct { +type ClientConfig struct { Authentication AuthenticationSettings `mapstructure:",squash"` // ReadBufferSize for HTTP client. See http.Transport.ReadBufferSize. @@ -83,7 +90,7 @@ type HTTPClientSettings struct { // will be send with each HTTP request. Headers map[string]string `mapstructure:"headers,omitempty"` - configtls.TLSClientSetting `mapstructure:"tls,omitempty"` + configtls.ClientConfig `mapstructure:"tls,omitempty"` } // AuthenticationSettings defines user authentication related settings. @@ -168,6 +175,7 @@ type MappingMode int const ( MappingNone MappingMode = iota MappingECS + MappingRaw ) var ( @@ -181,6 +189,8 @@ func (m MappingMode) String() string { return "" case MappingECS: return "ecs" + case MappingRaw: + return "raw" default: return "" } @@ -191,6 +201,7 @@ var mappingModes = func() map[string]MappingMode { for _, m := range []MappingMode{ MappingNone, MappingECS, + MappingRaw, } { table[strings.ToLower(m.String())] = m } @@ -224,3 +235,10 @@ func (cfg *Config) Validate() error { return nil } + +// MappingMode returns the mapping.mode defined in the given cfg +// object. This method must be called after cfg.Validate() has been +// called without returning an error. +func (cfg *Config) MappingMode() MappingMode { + return mappingModes[cfg.Mapping.Mode] +} diff --git a/exporter/elasticsearchexporter/config_test.go b/exporter/elasticsearchexporter/config_test.go index bfe9e638e8e6..265d199638de 100644 --- a/exporter/elasticsearchexporter/config_test.go +++ b/exporter/elasticsearchexporter/config_test.go @@ -39,7 +39,7 @@ func TestLoad_DeprecatedIndexConfigOption(t *testing.T) { LogsIndex: "logs-generic-default", TracesIndex: "traces-generic-default", Pipeline: "mypipeline", - HTTPClientSettings: HTTPClientSettings{ + ClientConfig: ClientConfig{ Authentication: AuthenticationSettings{ User: "elastic", Password: "search", @@ -63,10 +63,15 @@ func TestLoad_DeprecatedIndexConfigOption(t *testing.T) { MaxInterval: 1 * time.Minute, }, Mapping: MappingsSettings{ - Mode: "ecs", + Mode: "none", Dedup: true, Dedot: true, }, + LogstashFormat: LogstashFormatSettings{ + Enabled: false, + PrefixSeparator: "-", + DateFormat: "%Y.%m.%d", + }, }) } @@ -76,6 +81,14 @@ func TestLoadConfig(t *testing.T) { defaultCfg := createDefaultConfig() defaultCfg.(*Config).Endpoints = []string{"https://elastic.example.com:9200"} + defaultLogstashFormatCfg := createDefaultConfig() + defaultLogstashFormatCfg.(*Config).Endpoints = []string{"http://localhost:9200"} + defaultLogstashFormatCfg.(*Config).LogstashFormat.Enabled = true + + defaultRawCfg := createDefaultConfig() + defaultRawCfg.(*Config).Endpoints = []string{"http://localhost:9200"} + defaultRawCfg.(*Config).Mapping.Mode = "raw" + tests := []struct { configFile string id component.ID @@ -101,7 +114,7 @@ func TestLoadConfig(t *testing.T) { LogsIndex: "logs-generic-default", TracesIndex: "trace_index", Pipeline: "mypipeline", - HTTPClientSettings: HTTPClientSettings{ + ClientConfig: ClientConfig{ Authentication: AuthenticationSettings{ User: "elastic", Password: "search", @@ -125,10 +138,15 @@ func TestLoadConfig(t *testing.T) { MaxInterval: 1 * time.Minute, }, Mapping: MappingsSettings{ - Mode: "ecs", + Mode: "none", Dedup: true, Dedot: true, }, + LogstashFormat: LogstashFormatSettings{ + Enabled: false, + PrefixSeparator: "-", + DateFormat: "%Y.%m.%d", + }, }, }, { @@ -146,7 +164,7 @@ func TestLoadConfig(t *testing.T) { LogsIndex: "my_log_index", TracesIndex: "traces-generic-default", Pipeline: "mypipeline", - HTTPClientSettings: HTTPClientSettings{ + ClientConfig: ClientConfig{ Authentication: AuthenticationSettings{ User: "elastic", Password: "search", @@ -170,12 +188,27 @@ func TestLoadConfig(t *testing.T) { MaxInterval: 1 * time.Minute, }, Mapping: MappingsSettings{ - Mode: "ecs", + Mode: "none", Dedup: true, Dedot: true, }, + LogstashFormat: LogstashFormatSettings{ + Enabled: false, + PrefixSeparator: "-", + DateFormat: "%Y.%m.%d", + }, }, }, + { + id: component.NewIDWithName(metadata.Type, "logstash_format"), + configFile: "config.yaml", + expected: defaultLogstashFormatCfg, + }, + { + id: component.NewIDWithName(metadata.Type, "raw"), + configFile: "config.yaml", + expected: defaultRawCfg, + }, } for _, tt := range tests { diff --git a/exporter/elasticsearchexporter/elasticsearch_bulk.go b/exporter/elasticsearchexporter/elasticsearch_bulk.go index d3c96af69496..9885b70a4127 100644 --- a/exporter/elasticsearchexporter/elasticsearch_bulk.go +++ b/exporter/elasticsearchexporter/elasticsearch_bulk.go @@ -65,7 +65,7 @@ func (*clientLogger) ResponseBodyEnabled() bool { } func newElasticsearchClient(logger *zap.Logger, config *Config) (*esClientCurrent, error) { - tlsCfg, err := config.TLSClientSetting.LoadTLSConfig() + tlsCfg, err := config.ClientConfig.LoadTLSConfig() if err != nil { return nil, err } @@ -216,7 +216,7 @@ func pushDocuments(ctx context.Context, logger *zap.Logger, index string, docume zap.NamedError("reason", err)) default: - logger.Error(fmt.Sprintf("Drop dcos: failed to index: %#v", resp.Error), + logger.Error(fmt.Sprintf("Drop docs: failed to index: %#v", resp.Error), zap.Int("attempt", attempts), zap.Int("status", resp.Status)) } diff --git a/exporter/elasticsearchexporter/factory.go b/exporter/elasticsearchexporter/factory.go index 1f951700d51b..44bc0e0a29a6 100644 --- a/exporter/elasticsearchexporter/factory.go +++ b/exporter/elasticsearchexporter/factory.go @@ -8,6 +8,7 @@ package elasticsearchexporter // import "github.com/open-telemetry/opentelemetry import ( "context" "fmt" + "runtime" "time" "go.opentelemetry.io/collector/component" @@ -21,6 +22,7 @@ const ( // The value of "type" key in configuration. defaultLogsIndex = "logs-generic-default" defaultTracesIndex = "traces-generic-default" + userAgentHeaderKey = "User-Agent" ) // NewFactory creates a factory for Elastic exporter. @@ -38,7 +40,7 @@ func createDefaultConfig() component.Config { qs.Enabled = false return &Config{ QueueSettings: qs, - HTTPClientSettings: HTTPClientSettings{ + ClientConfig: ClientConfig{ Timeout: 90 * time.Second, }, Index: "", @@ -51,10 +53,15 @@ func createDefaultConfig() component.Config { MaxInterval: 1 * time.Minute, }, Mapping: MappingsSettings{ - Mode: "ecs", + Mode: "none", Dedup: true, Dedot: true, }, + LogstashFormat: LogstashFormatSettings{ + Enabled: false, + PrefixSeparator: "-", + DateFormat: "%Y.%m.%d", + }, } } @@ -71,17 +78,19 @@ func createLogsExporter( set.Logger.Warn("index option are deprecated and replaced with logs_index and traces_index.") } - exporter, err := newLogsExporter(set.Logger, cf) + setDefaultUserAgentHeader(cf, set.BuildInfo) + + logsExporter, err := newLogsExporter(set.Logger, cf) if err != nil { - return nil, fmt.Errorf("cannot configure Elasticsearch logs exporter: %w", err) + return nil, fmt.Errorf("cannot configure Elasticsearch logsExporter: %w", err) } return exporterhelper.NewLogsExporter( ctx, set, cfg, - exporter.pushLogsData, - exporterhelper.WithShutdown(exporter.Shutdown), + logsExporter.pushLogsData, + exporterhelper.WithShutdown(logsExporter.Shutdown), exporterhelper.WithQueue(cf.QueueSettings), ) } @@ -91,15 +100,29 @@ func createTracesExporter(ctx context.Context, cfg component.Config) (exporter.Traces, error) { cf := cfg.(*Config) - exporter, err := newTracesExporter(set.Logger, cf) + + setDefaultUserAgentHeader(cf, set.BuildInfo) + + tracesExporter, err := newTracesExporter(set.Logger, cf) if err != nil { - return nil, fmt.Errorf("cannot configure Elasticsearch traces exporter: %w", err) + return nil, fmt.Errorf("cannot configure Elasticsearch tracesExporter: %w", err) } return exporterhelper.NewTracesExporter( ctx, set, cfg, - exporter.pushTraceData, - exporterhelper.WithShutdown(exporter.Shutdown), + tracesExporter.pushTraceData, + exporterhelper.WithShutdown(tracesExporter.Shutdown), exporterhelper.WithQueue(cf.QueueSettings)) } + +// set default User-Agent header with BuildInfo if User-Agent is empty +func setDefaultUserAgentHeader(cf *Config, info component.BuildInfo) { + if _, found := cf.Headers[userAgentHeaderKey]; found { + return + } + if cf.Headers == nil { + cf.Headers = make(map[string]string) + } + cf.Headers[userAgentHeaderKey] = fmt.Sprintf("%s/%s (%s/%s)", info.Description, info.Version, runtime.GOOS, runtime.GOARCH) +} diff --git a/exporter/elasticsearchexporter/factory_test.go b/exporter/elasticsearchexporter/factory_test.go index 477aeabd8b3c..86557365b09b 100644 --- a/exporter/elasticsearchexporter/factory_test.go +++ b/exporter/elasticsearchexporter/factory_test.go @@ -5,10 +5,12 @@ package elasticsearchexporter import ( "context" + "strings" "testing" "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/exporter/exportertest" ) @@ -66,3 +68,24 @@ func TestFactory_CreateLogsAndTracesExporterWithDeprecatedIndexOption(t *testing require.NotNil(t, tracesExporter) require.NoError(t, tracesExporter.Shutdown(context.TODO())) } + +func TestSetDefaultUserAgentHeader(t *testing.T) { + t.Run("insert default user agent header into empty", func(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + setDefaultUserAgentHeader(cfg, component.BuildInfo{Description: "mock OpenTelemetry Collector", Version: "latest"}) + assert.Equal(t, len(cfg.Headers), 1) + assert.Equal(t, strings.Contains(cfg.Headers[userAgentHeaderKey], "OpenTelemetry Collector"), true) + }) + + t.Run("ignore user agent header if configured", func(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.Headers = map[string]string{ + userAgentHeaderKey: "mock user agent header", + } + setDefaultUserAgentHeader(cfg, component.BuildInfo{Description: "mock OpenTelemetry Collector", Version: "latest"}) + assert.Equal(t, len(cfg.Headers), 1) + assert.Equal(t, cfg.Headers[userAgentHeaderKey], "mock user agent header") + }) +} diff --git a/exporter/elasticsearchexporter/generated_component_test.go b/exporter/elasticsearchexporter/generated_component_test.go new file mode 100644 index 000000000000..57761a699ae0 --- /dev/null +++ b/exporter/elasticsearchexporter/generated_component_test.go @@ -0,0 +1,135 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package elasticsearchexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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 exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + require.NoError(t, err) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/elasticsearchexporter/go.mod b/exporter/elasticsearchexporter/go.mod index 54943cce4eb0..d223e4850b81 100644 --- a/exporter/elasticsearchexporter/go.mod +++ b/exporter/elasticsearchexporter/go.mod @@ -1,57 +1,70 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter -go 1.20 +go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.1 + github.com/cenkalti/backoff/v4 v4.3.0 github.com/elastic/go-elasticsearch/v7 v7.17.10 github.com/elastic/go-structform v0.0.10 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 + github.com/lestrrat-go/strftime v1.0.6 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/elasticsearchexporter/go.sum b/exporter/elasticsearchexporter/go.sum index f01da52ca6bf..5a605f7281d8 100644 --- a/exporter/elasticsearchexporter/go.sum +++ b/exporter/elasticsearchexporter/go.sum @@ -1,13 +1,9 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -15,46 +11,26 @@ github.com/elastic/go-elasticsearch/v7 v7.17.10 h1:TCQ8i4PmIJuBunvBS6bwT2ybzVFxx github.com/elastic/go-elasticsearch/v7 v7.17.10/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4= github.com/elastic/go-structform v0.0.10 h1:oy08o/Ih2hHTkNcRY/1HhaYvIp5z6t8si8gnCJPDo1w= github.com/elastic/go-structform v0.0.10/go.mod h1:CZWf9aIRYY5SuKSmOhtXScE5uQiLZNqAFnwKR4OrIM4= -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/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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -63,15 +39,18 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= +github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= +github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ= +github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -79,110 +58,97 @@ 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/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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.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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -190,38 +156,17 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/elasticsearchexporter/internal/metadata/generated_status.go b/exporter/elasticsearchexporter/internal/metadata/generated_status.go index 68d85c28d943..dae9c61cf4e9 100644 --- a/exporter/elasticsearchexporter/internal/metadata/generated_status.go +++ b/exporter/elasticsearchexporter/internal/metadata/generated_status.go @@ -4,10 +4,23 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("elasticsearch") ) const ( - Type = "elasticsearch" TracesStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/elasticsearch") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/elasticsearch") +} diff --git a/exporter/elasticsearchexporter/internal/objmodel/package_test.go b/exporter/elasticsearchexporter/internal/objmodel/package_test.go new file mode 100644 index 000000000000..1828b58a7ea3 --- /dev/null +++ b/exporter/elasticsearchexporter/internal/objmodel/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package objmodel + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/elasticsearchexporter/logs_exporter.go b/exporter/elasticsearchexporter/logs_exporter.go index 7511988bc2ba..dfc7fd5eee9a 100644 --- a/exporter/elasticsearchexporter/logs_exporter.go +++ b/exporter/elasticsearchexporter/logs_exporter.go @@ -9,6 +9,7 @@ import ( "context" "errors" "fmt" + "time" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" @@ -18,9 +19,10 @@ import ( type elasticsearchLogsExporter struct { logger *zap.Logger - index string - dynamicIndex bool - maxAttempts int + index string + logstashFormat LogstashFormatSettings + dynamicIndex bool + maxAttempts int client *esClientCurrent bulkIndexer esBulkIndexerCurrent @@ -51,7 +53,11 @@ func newLogsExporter(logger *zap.Logger, cfg *Config) (*elasticsearchLogsExporte maxAttempts = cfg.Retry.MaxRequests } - model := &encodeModel{dedup: cfg.Mapping.Dedup, dedot: cfg.Mapping.Dedot} + model := &encodeModel{ + dedup: cfg.Mapping.Dedup, + dedot: cfg.Mapping.Dedot, + mode: cfg.MappingMode(), + } indexStr := cfg.LogsIndex if cfg.Index != "" { @@ -62,10 +68,11 @@ func newLogsExporter(logger *zap.Logger, cfg *Config) (*elasticsearchLogsExporte client: client, bulkIndexer: bulkIndexer, - index: indexStr, - dynamicIndex: cfg.LogsDynamicIndex.Enabled, - maxAttempts: maxAttempts, - model: model, + index: indexStr, + dynamicIndex: cfg.LogsDynamicIndex.Enabled, + maxAttempts: maxAttempts, + model: model, + logstashFormat: cfg.LogstashFormat, } return esLogsExp, nil } @@ -83,8 +90,9 @@ func (e *elasticsearchLogsExporter) pushLogsData(ctx context.Context, ld plog.Lo resource := rl.Resource() ills := rl.ScopeLogs() for j := 0; j < ills.Len(); j++ { - scope := ills.At(j).Scope() - logs := ills.At(j).LogRecords() + ill := ills.At(j) + scope := ill.Scope() + logs := ill.LogRecords() for k := 0; k < logs.Len(); k++ { if err := e.pushLogRecord(ctx, resource, logs.At(k), scope); err != nil { if cerr := ctx.Err(); cerr != nil { @@ -103,12 +111,20 @@ func (e *elasticsearchLogsExporter) pushLogsData(ctx context.Context, ld plog.Lo func (e *elasticsearchLogsExporter) pushLogRecord(ctx context.Context, resource pcommon.Resource, record plog.LogRecord, scope pcommon.InstrumentationScope) error { fIndex := e.index if e.dynamicIndex { - prefix := getFromBothResourceAndAttribute(indexPrefix, resource, record) - suffix := getFromBothResourceAndAttribute(indexSuffix, resource, record) + prefix := getFromAttributes(indexPrefix, resource, scope, record) + suffix := getFromAttributes(indexSuffix, resource, scope, record) fIndex = fmt.Sprintf("%s%s%s", prefix, fIndex, suffix) } + if e.logstashFormat.Enabled { + formattedIndex, err := generateIndexWithLogstashFormat(fIndex, &e.logstashFormat, time.Now()) + if err != nil { + return err + } + fIndex = formattedIndex + } + document, err := e.model.encodeLog(resource, record, scope) if err != nil { return fmt.Errorf("Failed to encode log event: %w", err) diff --git a/exporter/elasticsearchexporter/logs_exporter_test.go b/exporter/elasticsearchexporter/logs_exporter_test.go index 48fa8a06cc0b..51870ee17295 100644 --- a/exporter/elasticsearchexporter/logs_exporter_test.go +++ b/exporter/elasticsearchexporter/logs_exporter_test.go @@ -10,6 +10,7 @@ import ( "fmt" "net/http" "runtime" + "strings" "sync" "sync/atomic" "testing" @@ -25,18 +26,18 @@ func TestExporter_New(t *testing.T) { type validate func(*testing.T, *elasticsearchLogsExporter, error) success := func(t *testing.T, exporter *elasticsearchLogsExporter, err error) { - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, exporter) } successWithInternalModel := func(expectedModel *encodeModel) validate { return func(t *testing.T, exporter *elasticsearchLogsExporter, err error) { - assert.Nil(t, err) + assert.NoError(t, err) assert.EqualValues(t, expectedModel, exporter.model) } } successWithDeprecatedIndexOption := func(index string) validate { return func(t *testing.T, exporter *elasticsearchLogsExporter, err error) { - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, exporter) require.EqualValues(t, index, exporter.index) } @@ -45,7 +46,7 @@ func TestExporter_New(t *testing.T) { failWith := func(want error) validate { return func(t *testing.T, exporter *elasticsearchLogsExporter, err error) { require.Nil(t, exporter) - require.NotNil(t, err) + require.Error(t, err) if !errors.Is(err, want) { t.Fatalf("Expected error '%v', but got '%v'", want, err) } @@ -55,7 +56,7 @@ func TestExporter_New(t *testing.T) { failWithMessage := func(msg string) validate { return func(t *testing.T, exporter *elasticsearchLogsExporter, err error) { require.Nil(t, exporter) - require.NotNil(t, err) + require.Error(t, err) require.Contains(t, err.Error(), msg) } } @@ -121,7 +122,7 @@ func TestExporter_New(t *testing.T) { cfg.Mapping.Dedot = false cfg.Mapping.Dedup = true }), - want: successWithInternalModel(&encodeModel{dedot: false, dedup: true}), + want: successWithInternalModel(&encodeModel{dedot: false, dedup: true, mode: MappingNone}), }, } @@ -152,6 +153,7 @@ func TestExporter_PushEvent(t *testing.T) { if runtime.GOOS == "windows" { t.Skip("skipping test on Windows, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/10178") } + t.Run("publish with success", func(t *testing.T) { rec := newBulkRecorder() server := newESTestServer(t, func(docs []itemRequest) ([]itemResponse, error) { @@ -166,6 +168,40 @@ func TestExporter_PushEvent(t *testing.T) { rec.WaitItems(2) }) + t.Run("publish with ecs encoding", func(t *testing.T) { + rec := newBulkRecorder() + server := newESTestServer(t, func(docs []itemRequest) ([]itemResponse, error) { + rec.Record(docs) + + expected := `{"@timestamp":"1970-01-01T00:00:00.000000000Z","application":"myapp","attrKey1":"abc","attrKey2":"def","error":{"stack_trace":"no no no no"},"message":"hello world","service":{"name":"myservice"}}` + actual := string(docs[0].Document) + assert.Equal(t, expected, actual) + + return itemsAllOK(docs) + }) + + testConfig := withTestExporterConfig(func(cfg *Config) { + cfg.Mapping.Mode = "ecs" + })(server.URL) + exporter := newTestExporter(t, server.URL, func(cfg *Config) { *cfg = *testConfig }) + mustSendLogsWithAttributes(t, exporter, + // record attrs + map[string]string{ + "application": "myapp", + "service.name": "myservice", + }, + // resource attrs + map[string]string{ + "attrKey1": "abc", + "attrKey2": "def", + "exception.stacktrace": "no no no no", + }, + // record body + "hello world", + ) + rec.WaitItems(1) + }) + t.Run("publish with dynamic index", func(t *testing.T) { rec := newBulkRecorder() @@ -179,11 +215,11 @@ func TestExporter_PushEvent(t *testing.T) { rec.Record(docs) data, err := docs[0].Action.MarshalJSON() - assert.Nil(t, err) + assert.NoError(t, err) jsonVal := map[string]any{} err = json.Unmarshal(data, &jsonVal) - assert.Nil(t, err) + assert.NoError(t, err) create := jsonVal["create"].(map[string]any) expected := fmt.Sprintf("%s%s%s", prefix, index, suffix) @@ -205,8 +241,84 @@ func TestExporter_PushEvent(t *testing.T) { map[string]string{ indexPrefix: prefix, }, + "hello world", + ) + + rec.WaitItems(1) + }) + + t.Run("publish with logstash index format enabled and dynamic index disabled", func(t *testing.T) { + var defaultCfg Config + rec := newBulkRecorder() + server := newESTestServer(t, func(docs []itemRequest) ([]itemResponse, error) { + rec.Record(docs) + + data, err := docs[0].Action.MarshalJSON() + assert.NoError(t, err) + + jsonVal := map[string]any{} + err = json.Unmarshal(data, &jsonVal) + assert.NoError(t, err) + + create := jsonVal["create"].(map[string]any) + + assert.Equal(t, strings.Contains(create["_index"].(string), defaultCfg.LogsIndex), true) + + return itemsAllOK(docs) + }) + + exporter := newTestLogsExporter(t, server.URL, func(cfg *Config) { + cfg.LogstashFormat.Enabled = true + cfg.LogsIndex = "not-used-index" + defaultCfg = *cfg + }) + + mustSendLogsWithAttributes(t, exporter, nil, nil, "") + + rec.WaitItems(1) + }) + + t.Run("publish with logstash index format enabled and dynamic index enabled", func(t *testing.T) { + var ( + prefix = "resprefix-" + suffix = "-attrsuffix" + index = "someindex" ) + rec := newBulkRecorder() + server := newESTestServer(t, func(docs []itemRequest) ([]itemResponse, error) { + rec.Record(docs) + + data, err := docs[0].Action.MarshalJSON() + assert.NoError(t, err) + + jsonVal := map[string]any{} + err = json.Unmarshal(data, &jsonVal) + assert.NoError(t, err) + + create := jsonVal["create"].(map[string]any) + expected := fmt.Sprintf("%s%s%s", prefix, index, suffix) + assert.Equal(t, strings.Contains(create["_index"].(string), expected), true) + + return itemsAllOK(docs) + }) + + exporter := newTestLogsExporter(t, server.URL, func(cfg *Config) { + cfg.LogsIndex = index + cfg.LogsDynamicIndex.Enabled = true + cfg.LogstashFormat.Enabled = true + }) + + mustSendLogsWithAttributes(t, exporter, + map[string]string{ + indexPrefix: "attrprefix-", + indexSuffix: suffix, + }, + map[string]string{ + indexPrefix: prefix, + }, + "", + ) rec.WaitItems(1) }) @@ -282,7 +394,7 @@ func TestExporter_PushEvent(t *testing.T) { t.Run("do not retry invalid request", func(t *testing.T) { attempts := &atomic.Int64{} - server := newESTestServer(t, func(docs []itemRequest) ([]itemResponse, error) { + server := newESTestServer(t, func(_ []itemRequest) ([]itemResponse, error) { attempts.Add(1) return nil, &httpTestError{message: "oops", status: http.StatusBadRequest} }) @@ -401,14 +513,13 @@ func mustSend(t *testing.T, exporter *elasticsearchLogsExporter, contents string } // send trace with span & resource attributes -func mustSendLogsWithAttributes(t *testing.T, exporter *elasticsearchLogsExporter, attrMp map[string]string, resMp map[string]string) { +func mustSendLogsWithAttributes(t *testing.T, exporter *elasticsearchLogsExporter, attrMp map[string]string, resMp map[string]string, body string) { logs := newLogsWithAttributeAndResourceMap(attrMp, resMp) - resLogs := logs.ResourceLogs().At(0) - logRecords := resLogs.ScopeLogs().At(0).LogRecords().At(0) - - scopeLogs := resLogs.ScopeLogs().AppendEmpty() - scope := scopeLogs.Scope() + resSpans := logs.ResourceLogs().At(0) + scopeLog := resSpans.ScopeLogs().At(0) + logRecords := scopeLog.LogRecords().At(0) + logRecords.Body().SetStr(body) - err := exporter.pushLogRecord(context.TODO(), resLogs.Resource(), logRecords, scope) + err := exporter.pushLogRecord(context.TODO(), resSpans.Resource(), logRecords, scopeLog.Scope()) require.NoError(t, err) } diff --git a/exporter/elasticsearchexporter/metadata.yaml b/exporter/elasticsearchexporter/metadata.yaml index 345ac0dbd94b..954e1bc58506 100644 --- a/exporter/elasticsearchexporter/metadata.yaml +++ b/exporter/elasticsearchexporter/metadata.yaml @@ -1,9 +1,14 @@ type: elasticsearch +scope_name: otelcol/elasticsearch status: class: exporter stability: beta: [traces, logs] - distributions: [contrib, observiq] + distributions: [contrib] codeowners: - active: [JaredTan95] + active: [JaredTan95, ycombinator] + +tests: + config: + endpoints: [http://localhost:9200] \ No newline at end of file diff --git a/exporter/elasticsearchexporter/model.go b/exporter/elasticsearchexporter/model.go index 74737b7d1b32..cccdfa386923 100644 --- a/exporter/elasticsearchexporter/model.go +++ b/exporter/elasticsearchexporter/model.go @@ -30,6 +30,7 @@ type mappingModel interface { type encodeModel struct { dedup bool dedot bool + mode MappingMode } const ( @@ -40,16 +41,72 @@ const ( func (m *encodeModel) encodeLog(resource pcommon.Resource, record plog.LogRecord, scope pcommon.InstrumentationScope) ([]byte, error) { var document objmodel.Document - document.AddTimestamp("@timestamp", record.Timestamp()) // We use @timestamp in order to ensure that we can index if the default data stream logs template is used. - document.AddTraceID("TraceId", record.TraceID()) - document.AddSpanID("SpanId", record.SpanID()) - document.AddInt("TraceFlags", int64(record.Flags())) - document.AddString("SeverityText", record.SeverityText()) - document.AddInt("SeverityNumber", int64(record.SeverityNumber())) - document.AddAttribute("Body", record.Body()) - document.AddAttributes("Attributes", record.Attributes()) - document.AddAttributes("Resource", resource.Attributes()) - document.AddAttributes("Scope", scopeToAttributes(scope)) + + switch m.mode { + case MappingECS: + if record.Timestamp() != 0 { + document.AddTimestamp("@timestamp", record.Timestamp()) + } else { + document.AddTimestamp("@timestamp", record.ObservedTimestamp()) + } + + document.AddTraceID("trace.id", record.TraceID()) + document.AddSpanID("span.id", record.SpanID()) + + if n := record.SeverityNumber(); n != plog.SeverityNumberUnspecified { + document.AddInt("event.severity", int64(record.SeverityNumber())) + } + + document.AddString("log.level", record.SeverityText()) + + if record.Body().Type() == pcommon.ValueTypeStr { + document.AddAttribute("message", record.Body()) + } + + fieldMapper := func(k string) string { + switch k { + case "exception.type": + return "error.type" + case "exception.message": + return "error.message" + case "exception.stacktrace": + return "error.stack_trace" + default: + return k + } + } + + resource.Attributes().Range(func(k string, v pcommon.Value) bool { + k = fieldMapper(k) + document.AddAttribute(k, v) + return true + }) + scope.Attributes().Range(func(k string, v pcommon.Value) bool { + k = fieldMapper(k) + document.AddAttribute(k, v) + return true + }) + record.Attributes().Range(func(k string, v pcommon.Value) bool { + k = fieldMapper(k) + document.AddAttribute(k, v) + return true + }) + default: + docTimeStamp := record.Timestamp() + if docTimeStamp.AsTime().UnixNano() == 0 { + docTimeStamp = record.ObservedTimestamp() + } + document.AddTimestamp("@timestamp", docTimeStamp) // We use @timestamp in order to ensure that we can index if the default data stream logs template is used. + document.AddTraceID("TraceId", record.TraceID()) + document.AddSpanID("SpanId", record.SpanID()) + document.AddInt("TraceFlags", int64(record.Flags())) + document.AddString("SeverityText", record.SeverityText()) + document.AddInt("SeverityNumber", int64(record.SeverityNumber())) + document.AddAttribute("Body", record.Body()) + m.encodeAttributes(&document, record.Attributes()) + document.AddAttributes("Resource", resource.Attributes()) + document.AddAttributes("Scope", scopeToAttributes(scope)) + } if m.dedup { document.Dedup() @@ -72,10 +129,11 @@ func (m *encodeModel) encodeSpan(resource pcommon.Resource, span ptrace.Span, sc document.AddString("Name", span.Name()) document.AddString("Kind", traceutil.SpanKindStr(span.Kind())) document.AddInt("TraceStatus", int64(span.Status().Code())) + document.AddString("TraceStatusDescription", span.Status().Message()) document.AddString("Link", spanLinksToString(span.Links())) - document.AddAttributes("Attributes", span.Attributes()) + m.encodeAttributes(&document, span.Attributes()) document.AddAttributes("Resource", resource.Attributes()) - document.AddEvents("Events", span.Events()) + m.encodeEvents(&document, span.Events()) document.AddInt("Duration", durationAsMicroseconds(span.StartTimestamp().AsTime(), span.EndTimestamp().AsTime())) // unit is microseconds document.AddAttributes("Scope", scopeToAttributes(scope)) @@ -90,6 +148,22 @@ func (m *encodeModel) encodeSpan(resource pcommon.Resource, span ptrace.Span, sc return buf.Bytes(), err } +func (m *encodeModel) encodeAttributes(document *objmodel.Document, attributes pcommon.Map) { + key := "Attributes" + if m.mode == MappingRaw { + key = "" + } + document.AddAttributes(key, attributes) +} + +func (m *encodeModel) encodeEvents(document *objmodel.Document, events ptrace.SpanEventSlice) { + key := "Events" + if m.mode == MappingRaw { + key = "" + } + document.AddEvents(key, events) +} + func spanLinksToString(spanLinkSlice ptrace.SpanLinkSlice) string { linkArray := make([]map[string]any, 0, spanLinkSlice.Len()) for i := 0; i < spanLinkSlice.Len(); i++ { diff --git a/exporter/elasticsearchexporter/model_test.go b/exporter/elasticsearchexporter/model_test.go index 4ee35f74e819..fc6bff486f85 100644 --- a/exporter/elasticsearchexporter/model_test.go +++ b/exporter/elasticsearchexporter/model_test.go @@ -4,16 +4,26 @@ package elasticsearchexporter import ( + "fmt" "testing" "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/ptrace" semconv "go.opentelemetry.io/collector/semconv/v1.18.0" + + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter/internal/objmodel" ) -var expectedSpanBody = `{"@timestamp":"2023-04-19T03:04:05.000000006Z","Attributes.service.instance.id":"23","Duration":1000000,"EndTimestamp":"2023-04-19T03:04:06.000000006Z","Events.fooEvent.evnetMockBar":"bar","Events.fooEvent.evnetMockFoo":"foo","Events.fooEvent.time":"2023-04-19T03:04:05.000000006Z","Kind":"SPAN_KIND_CLIENT","Link":"[{\"attribute\":{},\"spanID\":\"\",\"traceID\":\"01020304050607080807060504030200\"}]","Name":"client span","Resource.cloud.platform":"aws_elastic_beanstalk","Resource.cloud.provider":"aws","Resource.deployment.environment":"BETA","Resource.service.instance.id":"23","Resource.service.name":"some-service","Resource.service.version":"env-version-1234","Scope.lib-foo":"lib-bar","Scope.name":"io.opentelemetry.rabbitmq-2.7","Scope.version":"1.30.0-alpha","SpanId":"1920212223242526","TraceId":"01020304050607080807060504030201","TraceStatus":0}` +var expectedSpanBody = `{"@timestamp":"2023-04-19T03:04:05.000000006Z","Attributes.service.instance.id":"23","Duration":1000000,"EndTimestamp":"2023-04-19T03:04:06.000000006Z","Events.fooEvent.evnetMockBar":"bar","Events.fooEvent.evnetMockFoo":"foo","Events.fooEvent.time":"2023-04-19T03:04:05.000000006Z","Kind":"SPAN_KIND_CLIENT","Link":"[{\"attribute\":{},\"spanID\":\"\",\"traceID\":\"01020304050607080807060504030200\"}]","Name":"client span","Resource.cloud.platform":"aws_elastic_beanstalk","Resource.cloud.provider":"aws","Resource.deployment.environment":"BETA","Resource.service.instance.id":"23","Resource.service.name":"some-service","Resource.service.version":"env-version-1234","Scope.lib-foo":"lib-bar","Scope.name":"io.opentelemetry.rabbitmq-2.7","Scope.version":"1.30.0-alpha","SpanId":"1920212223242526","TraceId":"01020304050607080807060504030201","TraceStatus":2,"TraceStatusDescription":"Test"}` + +var expectedLogBody = `{"@timestamp":"2023-04-19T03:04:05.000000006Z","Attributes.log-attr1":"value1","Body":"log-body","Resource.key1":"value1","Scope.name":"","Scope.version":"","SeverityNumber":0,"TraceFlags":0}` + +var expectedLogBodyWithEmptyTimestamp = `{"@timestamp":"1970-01-01T00:00:00.000000000Z","Attributes.log-attr1":"value1","Body":"log-body","Resource.key1":"value1","Scope.name":"","Scope.version":"","SeverityNumber":0,"TraceFlags":0}` +var expectedLogBodyDeDottedWithEmptyTimestamp = `{"@timestamp":"1970-01-01T00:00:00.000000000Z","Attributes":{"log-attr1":"value1"},"Body":"log-body","Resource":{"foo":{"bar":"baz"},"key1":"value1"},"Scope":{"name":"","version":""},"SeverityNumber":0,"TraceFlags":0}` func TestEncodeSpan(t *testing.T) { model := &encodeModel{dedup: true, dedot: false} @@ -23,6 +33,34 @@ func TestEncodeSpan(t *testing.T) { assert.Equal(t, expectedSpanBody, string(spanByte)) } +func TestEncodeLog(t *testing.T) { + t.Run("empty timestamp with observedTimestamp override", func(t *testing.T) { + model := &encodeModel{dedup: true, dedot: false} + td := mockResourceLogs() + td.ScopeLogs().At(0).LogRecords().At(0).SetObservedTimestamp(pcommon.NewTimestampFromTime(time.Date(2023, 4, 19, 3, 4, 5, 6, time.UTC))) + logByte, err := model.encodeLog(td.Resource(), td.ScopeLogs().At(0).LogRecords().At(0), td.ScopeLogs().At(0).Scope()) + assert.NoError(t, err) + assert.Equal(t, expectedLogBody, string(logByte)) + }) + + t.Run("both timestamp and observedTimestamp empty", func(t *testing.T) { + model := &encodeModel{dedup: true, dedot: false} + td := mockResourceLogs() + logByte, err := model.encodeLog(td.Resource(), td.ScopeLogs().At(0).LogRecords().At(0), td.ScopeLogs().At(0).Scope()) + assert.NoError(t, err) + assert.Equal(t, expectedLogBodyWithEmptyTimestamp, string(logByte)) + }) + + t.Run("dedot true", func(t *testing.T) { + model := &encodeModel{dedup: true, dedot: true} + td := mockResourceLogs() + td.Resource().Attributes().PutStr("foo.bar", "baz") + logByte, err := model.encodeLog(td.Resource(), td.ScopeLogs().At(0).LogRecords().At(0), td.ScopeLogs().At(0).Scope()) + require.NoError(t, err) + require.Equal(t, expectedLogBodyDeDottedWithEmptyTimestamp, string(logByte)) + }) +} + func mockResourceSpans() ptrace.Traces { traces := ptrace.NewTraces() @@ -51,6 +89,8 @@ func mockResourceSpans() ptrace.Traces { span.SetKind(ptrace.SpanKindClient) span.SetStartTimestamp(pcommon.NewTimestampFromTime(tStart)) span.SetEndTimestamp(pcommon.NewTimestampFromTime(tEnd)) + span.Status().SetCode(2) + span.Status().SetMessage("Test") span.Attributes().PutStr("service.instance.id", "23") span.Links().AppendEmpty().SetTraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 0}) @@ -61,3 +101,119 @@ func mockResourceSpans() ptrace.Traces { event.Attributes().PutStr("evnetMockBar", "bar") return traces } + +func mockResourceLogs() plog.ResourceLogs { + rl := plog.NewResourceLogs() + rl.Resource().Attributes().PutStr("key1", "value1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Attributes().PutStr("log-attr1", "value1") + l.Body().SetStr("log-body") + return rl +} + +func TestEncodeAttributes(t *testing.T) { + t.Parallel() + + attributes := pcommon.NewMap() + err := attributes.FromRaw(map[string]any{ + "s": "baz", + "o": map[string]any{ + "sub_i": 19, + }, + }) + require.NoError(t, err) + + tests := map[string]struct { + mappingMode MappingMode + want func() objmodel.Document + }{ + "raw": { + mappingMode: MappingRaw, + want: func() objmodel.Document { + return objmodel.DocumentFromAttributes(attributes) + }, + }, + "none": { + mappingMode: MappingNone, + want: func() objmodel.Document { + doc := objmodel.Document{} + doc.AddAttributes("Attributes", attributes) + return doc + }, + }, + "ecs": { + mappingMode: MappingECS, + want: func() objmodel.Document { + doc := objmodel.Document{} + doc.AddAttributes("Attributes", attributes) + return doc + }, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + m := encodeModel{ + mode: test.mappingMode, + } + + doc := objmodel.Document{} + m.encodeAttributes(&doc, attributes) + require.Equal(t, test.want(), doc) + }) + } +} + +func TestEncodeEvents(t *testing.T) { + t.Parallel() + + events := ptrace.NewSpanEventSlice() + events.EnsureCapacity(4) + for i := 0; i < 4; i++ { + event := events.AppendEmpty() + event.SetTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(time.Duration(i) * time.Minute))) + event.SetName(fmt.Sprintf("event_%d", i)) + } + + tests := map[string]struct { + mappingMode MappingMode + want func() objmodel.Document + }{ + "raw": { + mappingMode: MappingRaw, + want: func() objmodel.Document { + doc := objmodel.Document{} + doc.AddEvents("", events) + return doc + }, + }, + "none": { + mappingMode: MappingNone, + want: func() objmodel.Document { + doc := objmodel.Document{} + doc.AddEvents("Events", events) + return doc + }, + }, + "ecs": { + mappingMode: MappingECS, + want: func() objmodel.Document { + doc := objmodel.Document{} + doc.AddEvents("Events", events) + return doc + }, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + m := encodeModel{ + mode: test.mappingMode, + } + + doc := objmodel.Document{} + m.encodeEvents(&doc, events) + require.Equal(t, test.want(), doc) + }) + } +} diff --git a/exporter/elasticsearchexporter/package_test.go b/exporter/elasticsearchexporter/package_test.go new file mode 100644 index 000000000000..da727a30bfa0 --- /dev/null +++ b/exporter/elasticsearchexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package elasticsearchexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/elasticsearchexporter/testdata/config.yaml b/exporter/elasticsearchexporter/testdata/config.yaml index 60ba25ebb476..3054df30355c 100644 --- a/exporter/elasticsearchexporter/testdata/config.yaml +++ b/exporter/elasticsearchexporter/testdata/config.yaml @@ -40,3 +40,11 @@ elasticsearch/log: max_requests: 5 sending_queue: enabled: true +elasticsearch/logstash_format: + endpoints: [http://localhost:9200] + logstash_format: + enabled: true +elasticsearch/raw: + endpoints: [http://localhost:9200] + mapping: + mode: raw diff --git a/exporter/elasticsearchexporter/trace_exporter.go b/exporter/elasticsearchexporter/trace_exporter.go index ef421951ed4c..4f313f0d5546 100644 --- a/exporter/elasticsearchexporter/trace_exporter.go +++ b/exporter/elasticsearchexporter/trace_exporter.go @@ -9,6 +9,7 @@ import ( "context" "errors" "fmt" + "time" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" @@ -18,9 +19,10 @@ import ( type elasticsearchTracesExporter struct { logger *zap.Logger - index string - dynamicIndex bool - maxAttempts int + index string + logstashFormat LogstashFormatSettings + dynamicIndex bool + maxAttempts int client *esClientCurrent bulkIndexer esBulkIndexerCurrent @@ -47,17 +49,22 @@ func newTracesExporter(logger *zap.Logger, cfg *Config) (*elasticsearchTracesExp maxAttempts = cfg.Retry.MaxRequests } - model := &encodeModel{dedup: cfg.Mapping.Dedup, dedot: cfg.Mapping.Dedot} + model := &encodeModel{ + dedup: cfg.Mapping.Dedup, + dedot: cfg.Mapping.Dedot, + mode: cfg.MappingMode(), + } return &elasticsearchTracesExporter{ logger: logger, client: client, bulkIndexer: bulkIndexer, - index: cfg.TracesIndex, - dynamicIndex: cfg.TracesDynamicIndex.Enabled, - maxAttempts: maxAttempts, - model: model, + index: cfg.TracesIndex, + dynamicIndex: cfg.TracesDynamicIndex.Enabled, + maxAttempts: maxAttempts, + model: model, + logstashFormat: cfg.LogstashFormat, }, nil } @@ -76,10 +83,12 @@ func (e *elasticsearchTracesExporter) pushTraceData( resource := il.Resource() scopeSpans := il.ScopeSpans() for j := 0; j < scopeSpans.Len(); j++ { - scope := scopeSpans.At(j).Scope() - spans := scopeSpans.At(j).Spans() + scopeSpan := scopeSpans.At(j) + scope := scopeSpan.Scope() + spans := scopeSpan.Spans() for k := 0; k < spans.Len(); k++ { - if err := e.pushTraceRecord(ctx, resource, spans.At(k), scope); err != nil { + span := spans.At(k) + if err := e.pushTraceRecord(ctx, resource, span, scope); err != nil { if cerr := ctx.Err(); cerr != nil { return cerr } @@ -95,12 +104,20 @@ func (e *elasticsearchTracesExporter) pushTraceData( func (e *elasticsearchTracesExporter) pushTraceRecord(ctx context.Context, resource pcommon.Resource, span ptrace.Span, scope pcommon.InstrumentationScope) error { fIndex := e.index if e.dynamicIndex { - prefix := getFromBothResourceAndAttribute(indexPrefix, resource, span) - suffix := getFromBothResourceAndAttribute(indexSuffix, resource, span) + prefix := getFromAttributes(indexPrefix, resource, scope, span) + suffix := getFromAttributes(indexSuffix, resource, scope, span) fIndex = fmt.Sprintf("%s%s%s", prefix, fIndex, suffix) } + if e.logstashFormat.Enabled { + formattedIndex, err := generateIndexWithLogstashFormat(fIndex, &e.logstashFormat, time.Now()) + if err != nil { + return err + } + fIndex = formattedIndex + } + document, err := e.model.encodeSpan(resource, span, scope) if err != nil { return fmt.Errorf("Failed to encode trace record: %w", err) diff --git a/exporter/elasticsearchexporter/traces_exporter_test.go b/exporter/elasticsearchexporter/traces_exporter_test.go index 7c40be6b4d61..b34354bdb0fb 100644 --- a/exporter/elasticsearchexporter/traces_exporter_test.go +++ b/exporter/elasticsearchexporter/traces_exporter_test.go @@ -9,8 +9,8 @@ import ( "errors" "fmt" "net/http" - "os" "runtime" + "strings" "sync" "sync/atomic" "testing" @@ -26,12 +26,12 @@ func TestTracesExporter_New(t *testing.T) { type validate func(*testing.T, *elasticsearchTracesExporter, error) success := func(t *testing.T, exporter *elasticsearchTracesExporter, err error) { - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, exporter) } successWithInternalModel := func(expectedModel *encodeModel) validate { return func(t *testing.T, exporter *elasticsearchTracesExporter, err error) { - assert.Nil(t, err) + assert.NoError(t, err) assert.EqualValues(t, expectedModel, exporter.model) } } @@ -39,7 +39,7 @@ func TestTracesExporter_New(t *testing.T) { failWith := func(want error) validate { return func(t *testing.T, exporter *elasticsearchTracesExporter, err error) { require.Nil(t, exporter) - require.NotNil(t, err) + require.Error(t, err) if !errors.Is(err, want) { t.Fatalf("Expected error '%v', but got '%v'", want, err) } @@ -49,7 +49,7 @@ func TestTracesExporter_New(t *testing.T) { failWithMessage := func(msg string) validate { return func(t *testing.T, exporter *elasticsearchTracesExporter, err error) { require.Nil(t, exporter) - require.NotNil(t, err) + require.Error(t, err) require.Contains(t, err.Error(), msg) } } @@ -99,7 +99,7 @@ func TestTracesExporter_New(t *testing.T) { cfg.Mapping.Dedot = false cfg.Mapping.Dedup = true }), - want: successWithInternalModel(&encodeModel{dedot: false, dedup: true}), + want: successWithInternalModel(&encodeModel{dedot: false, dedup: true, mode: MappingNone}), }, } @@ -110,18 +110,8 @@ func TestTracesExporter_New(t *testing.T) { env = map[string]string{defaultElasticsearchEnvName: ""} } - oldEnv := make(map[string]string, len(env)) - defer func() { - for k, v := range oldEnv { - os.Setenv(k, v) - } - }() - - for k := range env { - oldEnv[k] = os.Getenv(k) - } for k, v := range env { - os.Setenv(k, v) + t.Setenv(k, v) } exporter, err := newTracesExporter(zap.NewNop(), test.config) @@ -168,11 +158,11 @@ func TestExporter_PushTraceRecord(t *testing.T) { rec.Record(docs) data, err := docs[0].Action.MarshalJSON() - assert.Nil(t, err) + assert.NoError(t, err) jsonVal := map[string]any{} err = json.Unmarshal(data, &jsonVal) - assert.Nil(t, err) + assert.NoError(t, err) create := jsonVal["create"].(map[string]any) @@ -200,6 +190,82 @@ func TestExporter_PushTraceRecord(t *testing.T) { rec.WaitItems(1) }) + t.Run("publish with logstash format index", func(t *testing.T) { + var defaultCfg Config + + rec := newBulkRecorder() + server := newESTestServer(t, func(docs []itemRequest) ([]itemResponse, error) { + rec.Record(docs) + + data, err := docs[0].Action.MarshalJSON() + assert.NoError(t, err) + + jsonVal := map[string]any{} + err = json.Unmarshal(data, &jsonVal) + assert.NoError(t, err) + + create := jsonVal["create"].(map[string]any) + + assert.Equal(t, strings.Contains(create["_index"].(string), defaultCfg.TracesIndex), true) + + return itemsAllOK(docs) + }) + + exporter := newTestTracesExporter(t, server.URL, func(cfg *Config) { + cfg.LogstashFormat.Enabled = true + cfg.TracesIndex = "not-used-index" + defaultCfg = *cfg + }) + + mustSendTracesWithAttributes(t, exporter, nil, nil) + + rec.WaitItems(1) + }) + + t.Run("publish with logstash format index and dynamic index enabled ", func(t *testing.T) { + var ( + prefix = "resprefix-" + suffix = "-attrsuffix" + index = "someindex" + ) + + rec := newBulkRecorder() + server := newESTestServer(t, func(docs []itemRequest) ([]itemResponse, error) { + rec.Record(docs) + + data, err := docs[0].Action.MarshalJSON() + assert.NoError(t, err) + + jsonVal := map[string]any{} + err = json.Unmarshal(data, &jsonVal) + assert.NoError(t, err) + + create := jsonVal["create"].(map[string]any) + expected := fmt.Sprintf("%s%s%s", prefix, index, suffix) + + assert.Equal(t, strings.Contains(create["_index"].(string), expected), true) + + return itemsAllOK(docs) + }) + + exporter := newTestTracesExporter(t, server.URL, func(cfg *Config) { + cfg.TracesIndex = index + cfg.TracesDynamicIndex.Enabled = true + cfg.LogstashFormat.Enabled = true + }) + + mustSendTracesWithAttributes(t, exporter, + map[string]string{ + indexPrefix: "attrprefix-", + indexSuffix: suffix, + }, + map[string]string{ + indexPrefix: prefix, + }, + ) + rec.WaitItems(1) + }) + t.Run("retry http request", func(t *testing.T) { failures := 0 rec := newBulkRecorder() @@ -272,7 +338,7 @@ func TestExporter_PushTraceRecord(t *testing.T) { t.Run("do not retry invalid request", func(t *testing.T) { attempts := &atomic.Int64{} - server := newESTestServer(t, func(docs []itemRequest) ([]itemResponse, error) { + server := newESTestServer(t, func(_ []itemRequest) ([]itemResponse, error) { attempts.Add(1) return nil, &httpTestError{message: "oops", status: http.StatusBadRequest} }) diff --git a/exporter/elasticsearchexporter/util.go b/exporter/elasticsearchexporter/util.go new file mode 100644 index 000000000000..e5b398082b3b --- /dev/null +++ b/exporter/elasticsearchexporter/util.go @@ -0,0 +1,28 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package elasticsearchexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter" + +import ( + "bytes" + "fmt" + "time" + + "github.com/lestrrat-go/strftime" +) + +func generateIndexWithLogstashFormat(index string, conf *LogstashFormatSettings, t time.Time) (string, error) { + if conf.Enabled { + partIndex := fmt.Sprintf("%s%s", index, conf.PrefixSeparator) + var buf bytes.Buffer + p, err := strftime.New(fmt.Sprintf("%s%s", partIndex, conf.DateFormat)) + if err != nil { + return partIndex, err + } + if err = p.Format(&buf, t); err != nil { + return partIndex, err + } + index = buf.String() + } + return index, nil +} diff --git a/exporter/elasticsearchexporter/utils_test.go b/exporter/elasticsearchexporter/utils_test.go index 3309d9fb9a26..e53fedfbdd89 100644 --- a/exporter/elasticsearchexporter/utils_test.go +++ b/exporter/elasticsearchexporter/utils_test.go @@ -15,6 +15,7 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/ptrace" @@ -126,7 +127,7 @@ func (r *bulkRecorder) countItems() (count int) { func newESTestServer(t *testing.T, bulkHandler bulkHandler) *httptest.Server { mux := http.NewServeMux() - mux.HandleFunc("/", handleErr(func(w http.ResponseWriter, req *http.Request) error { + mux.HandleFunc("/", handleErr(func(w http.ResponseWriter, _ *http.Request) error { w.Header().Add("X-Elastic-Product", "Elasticsearch") enc := json.NewEncoder(w) @@ -251,3 +252,28 @@ func fillResourceAttributeMap(attrs pcommon.Map, mp map[string]string) { attrs.PutStr(k, v) } } + +func TestGetSuffixTime(t *testing.T) { + defaultCfg := createDefaultConfig().(*Config) + defaultCfg.LogstashFormat.Enabled = true + testTime := time.Date(2023, 12, 2, 10, 10, 10, 1, time.UTC) + index, err := generateIndexWithLogstashFormat(defaultCfg.LogsIndex, &defaultCfg.LogstashFormat, testTime) + assert.NoError(t, err) + assert.Equal(t, index, "logs-generic-default-2023.12.02") + + defaultCfg.LogsIndex = "logstash" + defaultCfg.LogstashFormat.PrefixSeparator = "." + otelLogsIndex, err := generateIndexWithLogstashFormat(defaultCfg.LogsIndex, &defaultCfg.LogstashFormat, testTime) + assert.NoError(t, err) + assert.Equal(t, otelLogsIndex, "logstash.2023.12.02") + + defaultCfg.LogstashFormat.DateFormat = "%Y-%m-%d" + newOtelLogsIndex, err := generateIndexWithLogstashFormat(defaultCfg.LogsIndex, &defaultCfg.LogstashFormat, testTime) + assert.NoError(t, err) + assert.Equal(t, newOtelLogsIndex, "logstash.2023-12-02") + + defaultCfg.LogstashFormat.DateFormat = "%d/%m/%Y" + newOtelLogsIndexWithSpecDataFormat, err := generateIndexWithLogstashFormat(defaultCfg.LogsIndex, &defaultCfg.LogstashFormat, testTime) + assert.NoError(t, err) + assert.Equal(t, newOtelLogsIndexWithSpecDataFormat, "logstash.02/12/2023") +} diff --git a/exporter/f5cloudexporter/README.md b/exporter/f5cloudexporter/README.md deleted file mode 100644 index 63c4d0de2258..000000000000 --- a/exporter/f5cloudexporter/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# F5 Cloud Exporter - - -| Status | | -| ------------- |-----------| -| Stability | [beta]: traces, metrics, logs | -| Distributions | [contrib], [observiq] | -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Ff5cloud%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Ff5cloud) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Ff5cloud%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Ff5cloud) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@gramidt](https://www.github.com/gramidt) | - -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector - - -Exports data via HTTP to F5 Cloud. - -## Getting Started - -The following settings are required: - -- `endpoint` (no default): The URL to send data to. See your F5 Cloud account for details. -- `source` (no default): A unique identifier that is used to distinguish where this data is coming from (e.g. dev_cluster). This is in - addition to the pipeline attributes and resources. -- `f5cloud_auth.credential_file` (no default): Path to the credential file used to authenticate this client. See your F5 - Cloud account for details. - -The following settings can be optionally configured: - -- `f5cloud_auth.audience` (no default): Identifies the recipient that the authentication JWT is intended for. See your F5 Cloud - account for details. - -- `timeout` (default = 30s): HTTP request time limit. For details see https://golang.org/pkg/net/http/#Client -- `read_buffer_size` (default = 0): ReadBufferSize for HTTP client. -- `write_buffer_size` (default = 512 * 1024): WriteBufferSize for HTTP client. - -Example: - -```yaml -f5cloud: - endpoint: https:// - source: prod - f5cloud_auth: - credential_file: "/etc/creds/key.json" -``` - -The full list of settings exposed for this exporter are documented [here](./config.go) with detailed sample -configurations [here](./testdata/config.yaml). - -This exporter also offers proxy support as documented -[here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter#proxy-support). diff --git a/exporter/f5cloudexporter/auth.go b/exporter/f5cloudexporter/auth.go deleted file mode 100644 index de59939a31ad..000000000000 --- a/exporter/f5cloudexporter/auth.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package f5cloudexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter" - -import ( - "fmt" - "net/http" - - "golang.org/x/oauth2" -) - -const ( - sourceHeader = "X-F5-Source" -) - -type f5CloudAuthRoundTripper struct { - transport http.RoundTripper - tokenSource oauth2.TokenSource - source string -} - -func (rt *f5CloudAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - // Clone request to ensure thread safety - req2 := req.Clone(req.Context()) - - // Add authorization header - tkn, err := rt.tokenSource.Token() - if err != nil { - return nil, err - } - tkn.SetAuthHeader(req2) - - // Add F5 specific headers - req2.Header.Add(sourceHeader, rt.source) - - resp, err := rt.transport.RoundTrip(req2) - if err != nil { - return nil, err - } - - return resp, nil -} - -func newF5CloudAuthRoundTripper(ts oauth2.TokenSource, source string, next http.RoundTripper) (http.RoundTripper, error) { - if ts == nil { - return nil, fmt.Errorf("no TokenSource exists") - } - - if len(source) == 0 { - return nil, fmt.Errorf("no source provided") - } - - rt := f5CloudAuthRoundTripper{ - transport: next, - tokenSource: ts, - source: source, - } - - return &rt, nil -} diff --git a/exporter/f5cloudexporter/auth_test.go b/exporter/f5cloudexporter/auth_test.go deleted file mode 100644 index 44daca066c01..000000000000 --- a/exporter/f5cloudexporter/auth_test.go +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package f5cloudexporter - -import ( - "fmt" - "net/http" - "net/http/httptest" - "strings" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "golang.org/x/oauth2" -) - -type ErrorRoundTripper struct{} - -func (ert *ErrorRoundTripper) RoundTrip(_ *http.Request) (*http.Response, error) { - return nil, fmt.Errorf("error") -} - -func TestF5CloudAuthRoundTripper_RoundTrip(t *testing.T) { - validTokenSource := createMockTokenSource() - source := "tests" - - defaultRoundTripper := (http.RoundTripper)(http.DefaultTransport.(*http.Transport).Clone()) - errorRoundTripper := &ErrorRoundTripper{} - - tests := []struct { - name string - rt http.RoundTripper - token oauth2.TokenSource - shouldError bool - }{ - { - name: "Test valid token source", - rt: defaultRoundTripper, - token: validTokenSource, - shouldError: false, - }, - { - name: "Test invalid token source", - rt: defaultRoundTripper, - token: &InvalidTokenSource{}, - shouldError: true, - }, - { - name: "Test error in next round tripper", - rt: errorRoundTripper, - token: validTokenSource, - shouldError: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - assert.Equal(t, "Bearer test_access_token", r.Header.Get("Authorization")) - assert.Equal(t, "tests", r.Header.Get(sourceHeader)) - })) - defer server.Close() - rt, err := newF5CloudAuthRoundTripper(tt.token, source, tt.rt) - assert.NoError(t, err) - req, err := http.NewRequest("POST", server.URL, strings.NewReader("")) - assert.NoError(t, err) - res, err := rt.RoundTrip(req) - if tt.shouldError { - assert.Nil(t, res) - assert.Error(t, err) - return - } - assert.NoError(t, err) - assert.Equal(t, res.StatusCode, 200) - }) - } -} - -func TestCreateF5CloudAuthRoundTripperWithToken(t *testing.T) { - defaultRoundTripper := (http.RoundTripper)(http.DefaultTransport.(*http.Transport).Clone()) - - token := createMockTokenSource() - source := "test" - - tests := []struct { - name string - token oauth2.TokenSource - source string - rt http.RoundTripper - shouldError bool - }{ - { - name: "success_case", - token: token, - source: source, - rt: defaultRoundTripper, - shouldError: false, - }, - { - name: "no_token_provided_error", - token: nil, - source: source, - rt: defaultRoundTripper, - shouldError: true, - }, - { - name: "no_source_provided_error", - token: token, - source: "", - rt: defaultRoundTripper, - shouldError: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - _, err := newF5CloudAuthRoundTripper(tt.token, tt.source, tt.rt) - if tt.shouldError { - assert.Error(t, err) - return - } - assert.NoError(t, err) - }) - } -} - -func createMockTokenSource() oauth2.TokenSource { - tkn := &oauth2.Token{ - AccessToken: "test_access_token", - TokenType: "", - RefreshToken: "", - Expiry: time.Time{}, - } - - return oauth2.StaticTokenSource(tkn) -} - -type InvalidTokenSource struct{} - -func (ts *InvalidTokenSource) Token() (*oauth2.Token, error) { - return nil, fmt.Errorf("bad TokenSource for testing") -} diff --git a/exporter/f5cloudexporter/config.go b/exporter/f5cloudexporter/config.go deleted file mode 100644 index a8147587a17e..000000000000 --- a/exporter/f5cloudexporter/config.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package f5cloudexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter" - -import ( - "fmt" - "net/url" - "os" - - otlphttp "go.opentelemetry.io/collector/exporter/otlphttpexporter" -) - -// Config defines configuration for F5 Cloud exporter. -type Config struct { - // Config represents the OTLP HTTP Exporter configuration. - otlphttp.Config `mapstructure:",squash"` - - // Source represents a unique identifier that is used to distinguish where this data is coming from. - Source string `mapstructure:"source"` - - // AuthConfig represents the F5 Cloud authentication configuration options. - AuthConfig AuthConfig `mapstructure:"f5cloud_auth"` -} - -func (c *Config) sanitize() error { - if len(c.Endpoint) == 0 { - return fmt.Errorf("missing required \"endpoint\" setting") - } - - endpointURL, err := url.Parse(c.Endpoint) - if err != nil { - return err - } - - if len(c.Source) == 0 { - return fmt.Errorf("missing required \"source\" setting") - } - - if len(c.AuthConfig.CredentialFile) == 0 { - return fmt.Errorf("missing required \"f5cloud_auth.credential_file\" setting") - } - - if _, err := os.Stat(c.AuthConfig.CredentialFile); os.IsNotExist(err) { - return fmt.Errorf("the provided \"f5cloud_auth.credential_file\" does not exist") - } - - if len(c.AuthConfig.Audience) == 0 { - c.AuthConfig.Audience = fmt.Sprintf("%s://%s", endpointURL.Scheme, endpointURL.Hostname()) - } - - return nil -} - -// AuthConfig defines F5 Cloud authentication configurations for F5CloudAuthRoundTripper -type AuthConfig struct { - // CredentialFile is the F5 Cloud credentials for your designated account. - CredentialFile string `mapstructure:"credential_file"` - - // Audience is the F5 Cloud audience for your designated account. - Audience string `mapstructure:"audience"` -} diff --git a/exporter/f5cloudexporter/config_test.go b/exporter/f5cloudexporter/config_test.go deleted file mode 100644 index 972bf730f115..000000000000 --- a/exporter/f5cloudexporter/config_test.go +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package f5cloudexporter - -import ( - "path/filepath" - "testing" - "time" - - "github.com/cenkalti/backoff/v4" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configopaque" - "go.opentelemetry.io/collector/confmap/confmaptest" - "go.opentelemetry.io/collector/exporter/exporterhelper" - otlphttp "go.opentelemetry.io/collector/exporter/otlphttpexporter" - - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter/internal/metadata" -) - -func TestLoadConfig(t *testing.T) { - cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) - require.NoError(t, err) - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - - sub, err := cm.Sub(component.NewIDWithName(metadata.Type, "allsettings").String()) - require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) - - actualCfg := cfg.(*Config) - expectedCfg := &Config{ - Config: otlphttp.Config{ - RetrySettings: exporterhelper.RetrySettings{ - Enabled: true, - InitialInterval: 10 * time.Second, - MaxInterval: 1 * time.Minute, - MaxElapsedTime: 10 * time.Minute, - RandomizationFactor: backoff.DefaultRandomizationFactor, - Multiplier: backoff.DefaultMultiplier, - }, - QueueSettings: exporterhelper.QueueSettings{ - Enabled: true, - NumConsumers: 2, - QueueSize: 10, - }, - HTTPClientSettings: confighttp.HTTPClientSettings{ - Endpoint: "https://f5cloud", - ReadBufferSize: 123, - WriteBufferSize: 345, - Timeout: time.Second * 10, - Headers: map[string]configopaque.String{ - "User-Agent": "opentelemetry-collector-contrib {{version}}", - }, - Compression: "gzip", - }, - }, - Source: "dev", - AuthConfig: AuthConfig{ - CredentialFile: "/etc/creds/key.json", - Audience: "exampleaudience", - }, - } - // testing function equality is not supported in Go hence these will be ignored for this test - expectedCfg.HTTPClientSettings.CustomRoundTripper = nil - actualCfg.HTTPClientSettings.CustomRoundTripper = nil - assert.Equal(t, expectedCfg, actualCfg) -} - -func TestConfig_sanitize(t *testing.T) { - const validEndpoint = "https://validendpoint.local" - const validSource = "tests" - - type fields struct { - Endpoint string - Source string - CredentialFile string - Audience string - } - tests := []struct { - name string - fields fields - errorMessage string - shouldError bool - }{ - { - name: "Test missing endpoint", - fields: fields{ - Endpoint: "", - }, - errorMessage: "missing required \"endpoint\" setting", - shouldError: true, - }, - { - name: "Test invalid endpoint", - fields: fields{ - Endpoint: "this://is:an:invalid:endpoint.com", - }, - errorMessage: "", - shouldError: true, - }, - { - name: "Test credential file not provided", - fields: fields{ - Endpoint: validEndpoint, - Source: validSource, - CredentialFile: "", - }, - errorMessage: "missing required \"f5cloud_auth.credential_file\" setting", - shouldError: true, - }, - { - name: "Test non-existent credential file", - fields: fields{ - Endpoint: validEndpoint, - Source: validSource, - CredentialFile: "non-existent cred file", - }, - errorMessage: "the provided \"f5cloud_auth.credential_file\" does not exist", - shouldError: true, - }, - { - name: "Test missing source", - fields: fields{ - Endpoint: validEndpoint, - Source: "", - }, - errorMessage: "missing required \"source\" setting", - shouldError: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig().(*Config) - cfg.Endpoint = tt.fields.Endpoint - cfg.Source = tt.fields.Source - cfg.AuthConfig = AuthConfig{ - CredentialFile: tt.fields.CredentialFile, - Audience: tt.fields.Audience, - } - - err := cfg.sanitize() - if (err != nil) != tt.shouldError { - t.Errorf("sanitize() error = %v, shouldError %v", err, tt.shouldError) - return - } - - if tt.shouldError { - assert.Error(t, err) - if len(tt.errorMessage) != 0 { - assert.Equal(t, tt.errorMessage, err.Error()) - } - } - }) - } - - t.Run("Test audience is set from endpoint when not provided", func(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig().(*Config) - cfg.Endpoint = validEndpoint - cfg.Source = validSource - cfg.AuthConfig = AuthConfig{ - CredentialFile: "testdata/empty_credential_file.json", - Audience: "", - } - - err := cfg.sanitize() - assert.NoError(t, err) - assert.Equal(t, validEndpoint, cfg.AuthConfig.Audience) - }) - - t.Run("Test audience is not set from endpoint when provided", func(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig().(*Config) - cfg.Endpoint = validEndpoint - cfg.Source = validSource - cfg.AuthConfig = AuthConfig{ - CredentialFile: "testdata/empty_credential_file.json", - Audience: "tests", - } - - err := cfg.sanitize() - assert.NoError(t, err) - assert.Equal(t, "tests", cfg.AuthConfig.Audience) - }) -} diff --git a/exporter/f5cloudexporter/doc.go b/exporter/f5cloudexporter/doc.go deleted file mode 100644 index be24ef8d2294..000000000000 --- a/exporter/f5cloudexporter/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:generate mdatagen metadata.yaml - -// Package f5cloudexporter implements an OpenTelemetry Collector exporter that sends trace, metric, and log data to F5 Cloud. -package f5cloudexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter" diff --git a/exporter/f5cloudexporter/factory.go b/exporter/f5cloudexporter/factory.go deleted file mode 100644 index 6aacdacc1f1a..000000000000 --- a/exporter/f5cloudexporter/factory.go +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package f5cloudexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter" - -import ( - "context" - "net/http" - "strings" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configopaque" - "go.opentelemetry.io/collector/exporter" - otlphttp "go.opentelemetry.io/collector/exporter/otlphttpexporter" - "golang.org/x/oauth2" - "google.golang.org/api/idtoken" - - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter/internal/metadata" -) - -type TokenSourceGetter func(config *Config) (oauth2.TokenSource, error) - -type f5cloudFactory struct { - exporter.Factory - getTokenSource TokenSourceGetter -} - -// NewFactory returns a factory of the F5 Cloud exporter that can be registered to the Collector. -func NewFactory() exporter.Factory { - return newFactoryWithTokenSourceGetter(getTokenSourceFromConfig) -} - -func newFactoryWithTokenSourceGetter(tsg TokenSourceGetter) exporter.Factory { - return &f5cloudFactory{Factory: otlphttp.NewFactory(), getTokenSource: tsg} -} - -func (f *f5cloudFactory) Type() component.Type { - return metadata.Type -} - -func (f *f5cloudFactory) CreateMetricsExporter( - ctx context.Context, - params exporter.CreateSettings, - config component.Config) (exporter.Metrics, error) { - - cfg := config.(*Config) - - if err := cfg.sanitize(); err != nil { - return nil, err - } - - fillUserAgent(cfg, params.BuildInfo.Version) - - return f.Factory.CreateMetricsExporter(ctx, params, &cfg.Config) -} - -func (f *f5cloudFactory) CreateTracesExporter( - ctx context.Context, - params exporter.CreateSettings, - config component.Config) (exporter.Traces, error) { - - cfg := config.(*Config) - - if err := cfg.sanitize(); err != nil { - return nil, err - } - - fillUserAgent(cfg, params.BuildInfo.Version) - - return f.Factory.CreateTracesExporter(ctx, params, &cfg.Config) -} - -func (f *f5cloudFactory) CreateLogsExporter( - ctx context.Context, - params exporter.CreateSettings, - config component.Config) (exporter.Logs, error) { - - cfg := config.(*Config) - - if err := cfg.sanitize(); err != nil { - return nil, err - } - - fillUserAgent(cfg, params.BuildInfo.Version) - - return f.Factory.CreateLogsExporter(ctx, params, &cfg.Config) -} - -func (f *f5cloudFactory) CreateDefaultConfig() component.Config { - cfg := &Config{ - Config: *f.Factory.CreateDefaultConfig().(*otlphttp.Config), - AuthConfig: AuthConfig{ - CredentialFile: "", - Audience: "", - }, - } - - cfg.Headers["User-Agent"] = "opentelemetry-collector-contrib {{version}}" - - cfg.HTTPClientSettings.CustomRoundTripper = func(next http.RoundTripper) (http.RoundTripper, error) { - ts, err := f.getTokenSource(cfg) - if err != nil { - return nil, err - } - - return newF5CloudAuthRoundTripper(ts, cfg.Source, next) - } - - return cfg -} - -// getTokenSourceFromConfig gets a TokenSource based on the configuration. -func getTokenSourceFromConfig(config *Config) (oauth2.TokenSource, error) { - ts, err := idtoken.NewTokenSource(context.Background(), config.AuthConfig.Audience, idtoken.WithCredentialsFile(config.AuthConfig.CredentialFile)) - if err != nil { - return nil, err - } - - return ts, nil -} - -func fillUserAgent(cfg *Config, version string) { - cfg.Headers["User-Agent"] = configopaque.String(strings.ReplaceAll(string(cfg.Headers["User-Agent"]), "{{version}}", version)) -} diff --git a/exporter/f5cloudexporter/factory_test.go b/exporter/f5cloudexporter/factory_test.go deleted file mode 100644 index 90717ffdec85..000000000000 --- a/exporter/f5cloudexporter/factory_test.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package f5cloudexporter - -import ( - "context" - "testing" - "time" - - "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/config/configopaque" - "go.opentelemetry.io/collector/exporter/exportertest" - "golang.org/x/oauth2" - - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter/internal/metadata" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" -) - -func TestFactory_TestType(t *testing.T) { - f := NewFactory() - assert.Equal(t, f.Type(), component.Type(metadata.Type)) -} - -func TestFactory_CreateDefaultConfig(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - assert.NotNil(t, cfg, "failed to create default config") - assert.NoError(t, componenttest.CheckConfigStruct(cfg)) - ocfg, ok := factory.CreateDefaultConfig().(*Config) - assert.True(t, ok) - assert.Equal(t, ocfg.HTTPClientSettings.Endpoint, "") - assert.Equal(t, ocfg.HTTPClientSettings.Timeout, 30*time.Second, "default timeout is 30 seconds") - assert.Equal(t, ocfg.RetrySettings.Enabled, true, "default retry is enabled") - assert.Equal(t, ocfg.RetrySettings.MaxElapsedTime, 300*time.Second, "default retry MaxElapsedTime") - assert.Equal(t, ocfg.RetrySettings.InitialInterval, 5*time.Second, "default retry InitialInterval") - assert.Equal(t, ocfg.RetrySettings.MaxInterval, 30*time.Second, "default retry MaxInterval") - assert.Equal(t, ocfg.QueueSettings.Enabled, true, "default sending queue is enabled") -} - -func TestFactory_CreateMetricsExporter(t *testing.T) { - factory := newFactoryWithTokenSourceGetter(mockTokenSourceGetter) - cfg := factory.CreateDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "https://" + testutil.GetAvailableLocalAddress(t) - cfg.Source = "tests" - cfg.AuthConfig = AuthConfig{ - CredentialFile: "testdata/empty_credential_file.json", - Audience: "tests", - } - - creationParams := exportertest.NewNopCreateSettings() - creationParams.BuildInfo = component.BuildInfo{ - Version: "0.0.0", - } - oexp, err := factory.CreateMetricsExporter(context.Background(), creationParams, cfg) - require.Nil(t, err) - require.NotNil(t, oexp) - - require.Equal(t, configopaque.String("opentelemetry-collector-contrib 0.0.0"), cfg.Headers["User-Agent"]) -} - -func TestFactory_CreateMetricsExporterInvalidConfig(t *testing.T) { - factory := newFactoryWithTokenSourceGetter(mockTokenSourceGetter) - cfg := factory.CreateDefaultConfig().(*Config) - - creationParams := exportertest.NewNopCreateSettings() - oexp, err := factory.CreateMetricsExporter(context.Background(), creationParams, cfg) - require.Error(t, err) - require.Nil(t, oexp) -} - -func TestFactory_CreateTracesExporter(t *testing.T) { - factory := newFactoryWithTokenSourceGetter(mockTokenSourceGetter) - cfg := factory.CreateDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "https://" + testutil.GetAvailableLocalAddress(t) - cfg.Source = "tests" - cfg.AuthConfig = AuthConfig{ - CredentialFile: "testdata/empty_credential_file.json", - Audience: "tests", - } - - creationParams := exportertest.NewNopCreateSettings() - creationParams.BuildInfo = component.BuildInfo{ - Version: "0.0.0", - } - oexp, err := factory.CreateTracesExporter(context.Background(), creationParams, cfg) - require.Nil(t, err) - require.NotNil(t, oexp) - - require.Equal(t, configopaque.String("opentelemetry-collector-contrib 0.0.0"), cfg.Headers["User-Agent"]) -} - -func Test_Factory_CreateTracesExporterInvalidConfig(t *testing.T) { - factory := newFactoryWithTokenSourceGetter(mockTokenSourceGetter) - cfg := factory.CreateDefaultConfig().(*Config) - - creationParams := exportertest.NewNopCreateSettings() - oexp, err := factory.CreateTracesExporter(context.Background(), creationParams, cfg) - require.Error(t, err) - require.Nil(t, oexp) -} - -func TestFactory_CreateLogsExporter(t *testing.T) { - factory := newFactoryWithTokenSourceGetter(mockTokenSourceGetter) - cfg := factory.CreateDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "https://" + testutil.GetAvailableLocalAddress(t) - cfg.Source = "tests" - cfg.AuthConfig = AuthConfig{ - CredentialFile: "testdata/empty_credential_file.json", - Audience: "tests", - } - - creationParams := exportertest.NewNopCreateSettings() - creationParams.BuildInfo = component.BuildInfo{ - Version: "0.0.0", - } - oexp, err := factory.CreateLogsExporter(context.Background(), creationParams, cfg) - require.Nil(t, err) - require.NotNil(t, oexp) - - require.Equal(t, configopaque.String("opentelemetry-collector-contrib 0.0.0"), cfg.Headers["User-Agent"]) -} - -func TestFactory_CreateLogsExporterInvalidConfig(t *testing.T) { - factory := newFactoryWithTokenSourceGetter(mockTokenSourceGetter) - cfg := factory.CreateDefaultConfig().(*Config) - - creationParams := exportertest.NewNopCreateSettings() - oexp, err := factory.CreateLogsExporter(context.Background(), creationParams, cfg) - require.Error(t, err) - require.Nil(t, oexp) -} - -func TestFactory_getTokenSourceFromConfig(t *testing.T) { - factory := newFactoryWithTokenSourceGetter(mockTokenSourceGetter) - cfg := factory.CreateDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "https://" + testutil.GetAvailableLocalAddress(t) - cfg.Source = "tests" - cfg.AuthConfig = AuthConfig{ - CredentialFile: "testdata/empty_credential_file.json", - Audience: "tests", - } - - ts, err := getTokenSourceFromConfig(cfg) - assert.Error(t, err) - assert.Nil(t, ts) -} - -func mockTokenSourceGetter(_ *Config) (oauth2.TokenSource, error) { - tkn := &oauth2.Token{ - AccessToken: "", - TokenType: "", - RefreshToken: "", - Expiry: time.Time{}, - } - - return oauth2.StaticTokenSource(tkn), nil -} diff --git a/exporter/f5cloudexporter/go.mod b/exporter/f5cloudexporter/go.mod deleted file mode 100644 index ffcd4ed6f062..000000000000 --- a/exporter/f5cloudexporter/go.mod +++ /dev/null @@ -1,82 +0,0 @@ -module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter - -go 1.20 - -require ( - github.com/cenkalti/backoff/v4 v4.2.1 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0 - golang.org/x/oauth2 v0.14.0 - google.golang.org/api v0.150.0 -) - -require ( - cloud.google.com/go/compute v1.23.1 // indirect - cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/google/s2a-go v0.1.7 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // 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.20220423185008-bf980b35cac4 // 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/rs/cors v1.10.1 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) - -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => ../../internal/common - -retract ( - v0.76.2 - v0.76.1 - v0.65.0 -) diff --git a/exporter/f5cloudexporter/go.sum b/exporter/f5cloudexporter/go.sum deleted file mode 100644 index 6667d7cad36d..000000000000 --- a/exporter/f5cloudexporter/go.sum +++ /dev/null @@ -1,275 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0= -cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= -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= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/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/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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/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/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.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.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.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= -github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -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/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -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/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/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0 h1:HzEVN0r94lkymm9D+NlB/UUlLqZqC5rnHUBN0Kj/ZYs= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0/go.mod h1:2AhkhO9YDcbfZ5X5gwN+k51FYFW8qfOWIrCEASp13qI= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 h1:ayqzWyj56xyc0tcBpaYjWtxvj5pfZNhYC8LrwvlLAeE= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -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.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/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-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= -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/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.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.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -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= -google.golang.org/api v0.150.0 h1:Z9k22qD289SZ8gCJrk4DrWXkNjtfvKAUo/l1ma8eBYE= -google.golang.org/api v0.150.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= -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.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -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.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= -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/exporter/f5cloudexporter/internal/metadata/generated_status.go b/exporter/f5cloudexporter/internal/metadata/generated_status.go deleted file mode 100644 index 7b47f7437e60..000000000000 --- a/exporter/f5cloudexporter/internal/metadata/generated_status.go +++ /dev/null @@ -1,14 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/collector/component" -) - -const ( - Type = "f5cloud" - TracesStability = component.StabilityLevelBeta - MetricsStability = component.StabilityLevelBeta - LogsStability = component.StabilityLevelBeta -) diff --git a/exporter/f5cloudexporter/metadata.yaml b/exporter/f5cloudexporter/metadata.yaml deleted file mode 100644 index 1c59a86d4f37..000000000000 --- a/exporter/f5cloudexporter/metadata.yaml +++ /dev/null @@ -1,9 +0,0 @@ -type: f5cloud - -status: - class: exporter - stability: - beta: [traces, metrics, logs] - distributions: [contrib, observiq] - codeowners: - active: [gramidt] diff --git a/exporter/f5cloudexporter/testdata/config.yaml b/exporter/f5cloudexporter/testdata/config.yaml deleted file mode 100644 index c89dbf147b7b..000000000000 --- a/exporter/f5cloudexporter/testdata/config.yaml +++ /dev/null @@ -1,23 +0,0 @@ -f5cloud: - endpoint: "https://f5cloud" - source: "dev" - f5cloud_auth: - credential_file: "/etc/creds/key.json" -f5cloud/allsettings: - endpoint: "https://f5cloud" - source: "dev" - f5cloud_auth: - credential_file: "/etc/creds/key.json" - audience: "exampleaudience" - timeout: 10s - read_buffer_size: 123 - write_buffer_size: 345 - sending_queue: - enabled: true - num_consumers: 2 - queue_size: 10 - retry_on_failure: - enabled: true - initial_interval: 10s - max_interval: 60s - max_elapsed_time: 10m diff --git a/exporter/f5cloudexporter/testdata/empty_credential_file.json b/exporter/f5cloudexporter/testdata/empty_credential_file.json deleted file mode 100644 index 9e26dfeeb6e6..000000000000 --- a/exporter/f5cloudexporter/testdata/empty_credential_file.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/exporter/fileexporter/README.md b/exporter/fileexporter/README.md index c5cebb2ac942..fb4a31590eb5 100644 --- a/exporter/fileexporter/README.md +++ b/exporter/fileexporter/README.md @@ -4,17 +4,13 @@ | Status | | | ------------- |-----------| | Stability | [alpha]: traces, metrics, logs | -| Distributions | [core], [contrib], [aws], [observiq], [splunk], [sumo] | +| Distributions | [core], [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Ffile%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Ffile) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Ffile%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Ffile) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@atingchen](https://www.github.com/atingchen) | [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector Exporter supports the following features: @@ -25,9 +21,9 @@ Exporter supports the following features: + Support for compressing the telemetry data before exporting. ++ Support for writing into multiple files, where the file path is determined by a resource attribute. Please note that there is no guarantee that exact field names will remain stable. -This intended for primarily for debugging Collector without setting up backends. The official [opentelemetry-collector-contrib container](https://hub.docker.com/r/otel/opentelemetry-collector-contrib/tags#!) does not have a writable filesystem by default since it's built on the `scratch` layer. As such, you will need to create a writable directory for the path, potentially by mounting writable volumes or creating a custom image. @@ -47,10 +43,17 @@ The following settings are optional: - localtime : [default: false (use UTC)] whether or not the timestamps in backup files is formatted according to the host's local time. - `format`[default: json]: define the data format of encoded telemetry data. The setting can be overridden with `proto`. +- `encoding`[default: none]: if specified, uses an encoding extension to encode telemetry data. Overrides `format`. +- `append`[default: `false`] defines whether append to the file (`true`) or truncate (`false`). If `append: true` is set then setting `rotation` or `compression` is currently not supported. - `compression`[no default]: the compression algorithm used when exporting telemetry data to file. Supported compression algorithms:`zstd` - `flush_interval`[default: 1s]: `time.Duration` interval between flushes. See [time.ParseDuration](https://pkg.go.dev/time#ParseDuration) for valid formats. NOTE: a value without unit is in nanoseconds and `flush_interval` is ignored and writes are not buffered if `rotation` is set. +- `group_by` enables writing to separate files based on a resource attribute. + - enabled: [default: false] enables group_by. When group_by is enabled, rotation setting is ignored. + - resource_attribute: [default: fileexporter.path_segment]: specifies the name of the resource attribute that contains the path segment of the file to write to. The final path will be the `path` config value, with the `*` replaced with the value of this resource attribute. + - max_open_files: [default: 100]: specifies the maximum number of open file descriptors for the output files. + ## File Rotation Telemetry data is exported to a single file by default. `fileexporter` only enables file rotation when the user specifies `rotation:` in the config. However, if specified, related default settings would apply. @@ -78,6 +81,15 @@ When `format` is json and `compression` is none , telemetry data is written to f Otherwise, when using `proto` format or any kind of encoding, each encoded object is preceded by 4 bytes (an unsigned 32 bit integer) which represent the number of bytes contained in the encoded object.When we need read the messages back in, we read the size, then read the bytes into a separate buffer, then parse from that buffer. +## Group by attribute + +By specifying `group_by.resource_attribute` in the config, the exporter will determine a filepath for each telemetry record, by substituting the value of the resource attribute into the `path` configuration value. + +The final path is guaranteed to start with the prefix part of the `path` config value (the part before the `*` character). For example if `path` is "/data/*.json", and the resource attribute value is "../etc/my_config", then the final path will be sanitized to "/data/etc/my_config.json". + +The final path can contain path separators (`/`). The exporter will create missing directories recursively (similarly to `mkdir -p`). + +Grouping by attribute currently only supports a **single** **resource** attribute. If you would like to use multiple attributes, please use [Transform processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/transformprocessor) create a routing key. If you would like to use a non-resource level (eg: Log/Metric/DataPoint) attribute, please use [Group by Attributes processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/groupbyattrsprocessor) first. ## Example: diff --git a/exporter/fileexporter/config.go b/exporter/fileexporter/config.go index 587055a9f274..bdd05dd278b5 100644 --- a/exporter/fileexporter/config.go +++ b/exporter/fileexporter/config.go @@ -5,6 +5,8 @@ package fileexporter // import "github.com/open-telemetry/opentelemetry-collecto import ( "errors" + "fmt" + "strings" "time" "go.opentelemetry.io/collector/component" @@ -22,7 +24,14 @@ type Config struct { // Path of the file to write to. Path is relative to current directory. Path string `mapstructure:"path"` - // Rotation defines an option about rotation of telemetry files + // Mode defines whether the exporter should append to the file. + // Options: + // - false[default]: truncates the file + // - true: appends to the file. + Append bool `mapstructure:"append"` + + // Rotation defines an option about rotation of telemetry files. Ignored + // when GroupByAttribute is used. Rotation *Rotation `mapstructure:"rotation"` // FormatType define the data format of encoded telemetry data @@ -31,6 +40,10 @@ type Config struct { // - proto: OTLP binary protobuf bytes. FormatType string `mapstructure:"format"` + // Encoding defines the encoding of the telemetry data. + // If specified, it overrides `FormatType` and applies an encoding extension. + Encoding *component.ID `mapstructure:"encoding"` + // Compression Codec used to export telemetry data // Supported compression algorithms:`zstd` Compression string `mapstructure:"compression"` @@ -38,6 +51,9 @@ type Config struct { // FlushInterval is the duration between flushes. // See time.ParseDuration for valid values. FlushInterval time.Duration `mapstructure:"flush_interval"` + + // GroupBy enables writing to separate files based on a resource attribute. + GroupBy *GroupBy `mapstructure:"group_by"` } // Rotation an option to rolling log files @@ -63,6 +79,21 @@ type Rotation struct { LocalTime bool `mapstructure:"localtime"` } +type GroupBy struct { + // Enables group_by. When group_by is enabled, rotation setting is ignored. Default is false. + Enabled bool `mapstructure:"enabled"` + + // ResourceAttribute specifies the name of the resource attribute that + // contains the path segment of the file to write to. The final path will be + // the Path config value, with the * replaced with the value of this resource + // attribute. Default is "fileexporter.path_segment". + ResourceAttribute string `mapstructure:"resource_attribute"` + + // MaxOpenFiles specifies the maximum number of open file descriptors for the output files. + // The default is 100. + MaxOpenFiles int `mapstructure:"max_open_files"` +} + var _ component.Config = (*Config)(nil) // Validate checks if the exporter configuration is valid @@ -70,6 +101,12 @@ func (cfg *Config) Validate() error { if cfg.Path == "" { return errors.New("path must be non-empty") } + if cfg.Append && cfg.Compression != "" { + return fmt.Errorf("append and compression enabled at the same time is not supported") + } + if cfg.Append && cfg.Rotation != nil { + return fmt.Errorf("append and rotation enabled at the same time is not supported") + } if cfg.FormatType != formatTypeJSON && cfg.FormatType != formatTypeProto { return errors.New("format type is not supported") } @@ -79,6 +116,22 @@ func (cfg *Config) Validate() error { if cfg.FlushInterval < 0 { return errors.New("flush_interval must be larger than zero") } + + if cfg.GroupBy != nil && cfg.GroupBy.Enabled { + pathParts := strings.Split(cfg.Path, "*") + if len(pathParts) != 2 { + return errors.New("path must contain exatcly one * when group_by is enabled") + } + + if len(pathParts[0]) == 0 { + return errors.New("path must not start with * when group_by is enabled") + } + + if cfg.GroupBy.ResourceAttribute == "" { + return errors.New("resource_attribute must not be empty when group_by is enabled") + } + } + return nil } @@ -88,7 +141,7 @@ func (cfg *Config) Unmarshal(componentParser *confmap.Conf) error { return errors.New("empty config for file exporter") } // first load the config normally - err := componentParser.Unmarshal(cfg, confmap.WithErrorUnused()) + err := componentParser.Unmarshal(cfg) if err != nil { return err } diff --git a/exporter/fileexporter/config_test.go b/exporter/fileexporter/config_test.go index c2bfdb17822b..2e588047406e 100644 --- a/exporter/fileexporter/config_test.go +++ b/exporter/fileexporter/config_test.go @@ -39,6 +39,10 @@ func TestLoadConfig(t *testing.T) { }, FormatType: formatTypeJSON, FlushInterval: time.Second, + GroupBy: &GroupBy{ + MaxOpenFiles: defaultMaxOpenFiles, + ResourceAttribute: defaultResourceAttribute, + }, }, }, { @@ -54,6 +58,10 @@ func TestLoadConfig(t *testing.T) { FormatType: formatTypeProto, Compression: compressionZSTD, FlushInterval: time.Second, + GroupBy: &GroupBy{ + MaxOpenFiles: defaultMaxOpenFiles, + ResourceAttribute: defaultResourceAttribute, + }, }, }, { @@ -65,6 +73,10 @@ func TestLoadConfig(t *testing.T) { MaxBackups: defaultMaxBackups, }, FlushInterval: time.Second, + GroupBy: &GroupBy{ + MaxOpenFiles: defaultMaxOpenFiles, + ResourceAttribute: defaultResourceAttribute, + }, }, }, { @@ -77,6 +89,10 @@ func TestLoadConfig(t *testing.T) { }, FormatType: formatTypeJSON, FlushInterval: time.Second, + GroupBy: &GroupBy{ + MaxOpenFiles: defaultMaxOpenFiles, + ResourceAttribute: defaultResourceAttribute, + }, }, }, { @@ -93,6 +109,10 @@ func TestLoadConfig(t *testing.T) { Path: "./flushed", FlushInterval: 5, FormatType: formatTypeJSON, + GroupBy: &GroupBy{ + MaxOpenFiles: defaultMaxOpenFiles, + ResourceAttribute: defaultResourceAttribute, + }, }, }, { @@ -101,6 +121,10 @@ func TestLoadConfig(t *testing.T) { Path: "./flushed", FlushInterval: 5 * time.Second, FormatType: formatTypeJSON, + GroupBy: &GroupBy{ + MaxOpenFiles: defaultMaxOpenFiles, + ResourceAttribute: defaultResourceAttribute, + }, }, }, { @@ -109,6 +133,10 @@ func TestLoadConfig(t *testing.T) { Path: "./flushed", FlushInterval: 500 * time.Millisecond, FormatType: formatTypeJSON, + GroupBy: &GroupBy{ + MaxOpenFiles: defaultMaxOpenFiles, + ResourceAttribute: defaultResourceAttribute, + }, }, }, { @@ -119,6 +147,44 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, ""), errorMessage: "path must be non-empty", }, + { + id: component.NewIDWithName(metadata.Type, "group_by"), + expected: &Config{ + Path: "./group_by/*.json", + FlushInterval: time.Second, + FormatType: formatTypeJSON, + GroupBy: &GroupBy{ + Enabled: true, + MaxOpenFiles: 10, + ResourceAttribute: "dummy", + }, + }, + }, + { + id: component.NewIDWithName(metadata.Type, "group_by_defaults"), + expected: &Config{ + Path: "./group_by/*.json", + FlushInterval: time.Second, + FormatType: formatTypeJSON, + GroupBy: &GroupBy{ + Enabled: true, + MaxOpenFiles: defaultMaxOpenFiles, + ResourceAttribute: defaultResourceAttribute, + }, + }, + }, + { + id: component.NewIDWithName(metadata.Type, "group_by_invalid_path"), + errorMessage: "path must contain exatcly one * when group_by is enabled", + }, + { + id: component.NewIDWithName(metadata.Type, "group_by_invalid_path2"), + errorMessage: "path must not start with * when group_by is enabled", + }, + { + id: component.NewIDWithName(metadata.Type, "group_by_empty_resource_attribute"), + errorMessage: "resource_attribute must not be empty when group_by is enabled", + }, } for _, tt := range tests { diff --git a/exporter/fileexporter/encoding_test.go b/exporter/fileexporter/encoding_test.go new file mode 100644 index 000000000000..fbcf35415879 --- /dev/null +++ b/exporter/fileexporter/encoding_test.go @@ -0,0 +1,120 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package fileexporter + +import ( + "context" + "os" + "path/filepath" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/extension/extensiontest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension" +) + +type hostWithEncoding struct { + encodings map[component.ID]component.Component +} + +func (h hostWithEncoding) GetFactory(_ component.Kind, _ component.Type) component.Factory { + panic("unsupported") +} + +func (h hostWithEncoding) GetExtensions() map[component.ID]component.Component { + return h.encodings +} + +func (h hostWithEncoding) GetExporters() map[component.DataType]map[component.ID]component.Component { + panic("unsupported") +} + +func TestEncoding(t *testing.T) { + f := NewFactory() + cfg := f.CreateDefaultConfig().(*Config) + cfg.Path = filepath.Join(t.TempDir(), "encoding.txt") + id := component.MustNewID("otlpjson") + cfg.Encoding = &id + + ef := otlpencodingextension.NewFactory() + efCfg := ef.CreateDefaultConfig().(*otlpencodingextension.Config) + efCfg.Protocol = "otlp_json" + ext, err := ef.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), efCfg) + require.NoError(t, err) + require.NoError(t, ext.Start(context.Background(), componenttest.NewNopHost())) + + me, err := f.CreateMetricsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + te, err := f.CreateTracesExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + le, err := f.CreateLogsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := hostWithEncoding{ + map[component.ID]component.Component{id: ext}, + } + require.NoError(t, me.Start(context.Background(), host)) + require.NoError(t, te.Start(context.Background(), host)) + require.NoError(t, le.Start(context.Background(), host)) + t.Cleanup(func() { + + }) + + require.NoError(t, me.ConsumeMetrics(context.Background(), generateMetrics())) + require.NoError(t, te.ConsumeTraces(context.Background(), generateTraces())) + require.NoError(t, le.ConsumeLogs(context.Background(), generateLogs())) + + require.NoError(t, me.Shutdown(context.Background())) + require.NoError(t, te.Shutdown(context.Background())) + require.NoError(t, le.Shutdown(context.Background())) + + b, err := os.ReadFile(cfg.Path) + require.NoError(t, err) + require.Contains(t, string(b), `{"resourceMetrics":`) + require.Contains(t, string(b), `{"resourceSpans":`) + require.Contains(t, string(b), `{"resourceLogs":`) +} + +func generateLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/fileexporter/factory.go b/exporter/fileexporter/factory.go index 246a61f5f00f..6c05220697bf 100644 --- a/exporter/fileexporter/factory.go +++ b/exporter/fileexporter/factory.go @@ -7,11 +7,16 @@ import ( "context" "io" "os" + "time" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.uber.org/zap" "gopkg.in/natefinch/lumberjack.v2" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/internal/metadata" @@ -28,8 +33,19 @@ const ( // the type of compression codec compressionZSTD = "zstd" + + defaultMaxOpenFiles = 100 + + defaultResourceAttribute = "fileexporter.path_segment" ) +type FileExporter interface { + component.Component + consumeTraces(_ context.Context, td ptrace.Traces) error + consumeMetrics(_ context.Context, md pmetric.Metrics) error + consumeLogs(_ context.Context, ld plog.Logs) error +} + // NewFactory creates a factory for OTLP exporter. func NewFactory() exporter.Factory { return exporter.NewFactory( @@ -44,6 +60,10 @@ func createDefaultConfig() component.Config { return &Config{ FormatType: formatTypeJSON, Rotation: &Rotation{MaxBackups: defaultMaxBackups}, + GroupBy: &GroupBy{ + ResourceAttribute: defaultResourceAttribute, + MaxOpenFiles: defaultMaxOpenFiles, + }, } } @@ -52,19 +72,12 @@ func createTracesExporter( set exporter.CreateSettings, cfg component.Config, ) (exporter.Traces, error) { - conf := cfg.(*Config) - writer, err := buildFileWriter(conf) - if err != nil { - return nil, err - } - fe := exporters.GetOrAdd(cfg, func() component.Component { - return newFileExporter(conf, writer) - }) + fe := getOrCreateFileExporter(cfg, set.Logger) return exporterhelper.NewTracesExporter( ctx, set, cfg, - fe.Unwrap().(*fileExporter).consumeTraces, + fe.consumeTraces, exporterhelper.WithStart(fe.Start), exporterhelper.WithShutdown(fe.Shutdown), exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), @@ -76,19 +89,12 @@ func createMetricsExporter( set exporter.CreateSettings, cfg component.Config, ) (exporter.Metrics, error) { - conf := cfg.(*Config) - writer, err := buildFileWriter(conf) - if err != nil { - return nil, err - } - fe := exporters.GetOrAdd(cfg, func() component.Component { - return newFileExporter(conf, writer) - }) + fe := getOrCreateFileExporter(cfg, set.Logger) return exporterhelper.NewMetricsExporter( ctx, set, cfg, - fe.Unwrap().(*fileExporter).consumeMetrics, + fe.consumeMetrics, exporterhelper.WithStart(fe.Start), exporterhelper.WithShutdown(fe.Shutdown), exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), @@ -100,59 +106,80 @@ func createLogsExporter( set exporter.CreateSettings, cfg component.Config, ) (exporter.Logs, error) { - conf := cfg.(*Config) - writer, err := buildFileWriter(conf) - if err != nil { - return nil, err - } - fe := exporters.GetOrAdd(cfg, func() component.Component { - return newFileExporter(conf, writer) - }) + fe := getOrCreateFileExporter(cfg, set.Logger) return exporterhelper.NewLogsExporter( ctx, set, cfg, - fe.Unwrap().(*fileExporter).consumeLogs, + fe.consumeLogs, exporterhelper.WithStart(fe.Start), exporterhelper.WithShutdown(fe.Shutdown), exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), ) } -func newFileExporter(conf *Config, writer io.WriteCloser) *fileExporter { - return &fileExporter{ - path: conf.Path, - formatType: conf.FormatType, - file: writer, - tracesMarshaler: tracesMarshalers[conf.FormatType], - metricsMarshaler: metricsMarshalers[conf.FormatType], - logsMarshaler: logsMarshalers[conf.FormatType], - exporter: buildExportFunc(conf), - compression: conf.Compression, - compressor: buildCompressor(conf.Compression), - flushInterval: conf.FlushInterval, +// getOrCreateFileExporter creates a FileExporter and caches it for a particular configuration, +// or returns the already cached one. Caching is required because the factory is asked trace and +// metric receivers separately when it gets CreateTracesReceiver() and CreateMetricsReceiver() +// but they must not create separate objects, they must use one Exporter object per configuration. +func getOrCreateFileExporter(cfg component.Config, logger *zap.Logger) FileExporter { + conf := cfg.(*Config) + fe := exporters.GetOrAdd(cfg, func() component.Component { + return newFileExporter(conf, logger) + }) + + c := fe.Unwrap() + return c.(FileExporter) +} + +func newFileExporter(conf *Config, logger *zap.Logger) FileExporter { + if conf.GroupBy == nil || !conf.GroupBy.Enabled { + return &fileExporter{ + conf: conf, + } + } + + return &groupingFileExporter{ + conf: conf, + logger: logger, } + } -func buildFileWriter(cfg *Config) (io.WriteCloser, error) { - if cfg.Rotation == nil { - f, err := os.OpenFile(cfg.Path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600) +func newFileWriter(path string, shouldAppend bool, rotation *Rotation, flushInterval time.Duration, export exportFunc) (*fileWriter, error) { + var wc io.WriteCloser + if rotation == nil { + fileFlags := os.O_RDWR | os.O_CREATE + if shouldAppend { + fileFlags |= os.O_APPEND + } else { + fileFlags |= os.O_TRUNC + } + f, err := os.OpenFile(path, fileFlags, 0644) if err != nil { return nil, err } - return newBufferedWriteCloser(f), nil + wc = newBufferedWriteCloser(f) + } else { + wc = &lumberjack.Logger{ + Filename: path, + MaxSize: rotation.MaxMegabytes, + MaxAge: rotation.MaxDays, + MaxBackups: rotation.MaxBackups, + LocalTime: rotation.LocalTime, + } } - return &lumberjack.Logger{ - Filename: cfg.Path, - MaxSize: cfg.Rotation.MaxMegabytes, - MaxAge: cfg.Rotation.MaxDays, - MaxBackups: cfg.Rotation.MaxBackups, - LocalTime: cfg.Rotation.LocalTime, + + return &fileWriter{ + path: path, + file: wc, + exporter: export, + flushInterval: flushInterval, }, nil } // This is the map of already created File exporters for particular configurations. // We maintain this map because the Factory is asked trace and metric receivers separately // when it gets CreateTracesReceiver() and CreateMetricsReceiver() but they must not -// create separate objects, they must use one Receiver object per configuration. +// create separate objects, they must use one Exporter object per configuration. var exporters = sharedcomponent.NewSharedComponents() diff --git a/exporter/fileexporter/factory_test.go b/exporter/fileexporter/factory_test.go index dfc6712c8a02..950bd4cce82c 100644 --- a/exporter/fileexporter/factory_test.go +++ b/exporter/fileexporter/factory_test.go @@ -7,6 +7,7 @@ import ( "context" "io" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -25,10 +26,12 @@ func TestCreateMetricsExporterError(t *testing.T) { cfg := &Config{ FormatType: formatTypeJSON, } - _, err := createMetricsExporter( + e, err := createMetricsExporter( context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Start(context.Background(), componenttest.NewNopHost()) assert.Error(t, err) } @@ -43,6 +46,7 @@ func TestCreateMetricsExporter(t *testing.T) { cfg) assert.NoError(t, err) require.NotNil(t, exp) + assert.NoError(t, exp.Shutdown(context.Background())) } func TestCreateTracesExporter(t *testing.T) { @@ -56,16 +60,19 @@ func TestCreateTracesExporter(t *testing.T) { cfg) assert.NoError(t, err) require.NotNil(t, exp) + assert.NoError(t, exp.Shutdown(context.Background())) } func TestCreateTracesExporterError(t *testing.T) { cfg := &Config{ FormatType: formatTypeJSON, } - _, err := createTracesExporter( + e, err := createTracesExporter( context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Start(context.Background(), componenttest.NewNopHost()) assert.Error(t, err) } @@ -80,20 +87,23 @@ func TestCreateLogsExporter(t *testing.T) { cfg) assert.NoError(t, err) require.NotNil(t, exp) + assert.NoError(t, exp.Shutdown(context.Background())) } func TestCreateLogsExporterError(t *testing.T) { cfg := &Config{ FormatType: formatTypeJSON, } - _, err := createLogsExporter( + e, err := createLogsExporter( context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Start(context.Background(), componenttest.NewNopHost()) assert.Error(t, err) } -func TestBuildFileWriter(t *testing.T) { +func TestNewFileWriter(t *testing.T) { type args struct { cfg *Config } @@ -101,17 +111,19 @@ func TestBuildFileWriter(t *testing.T) { name string args args want io.WriteCloser - validate func(*testing.T, io.WriteCloser) + validate func(*testing.T, *fileWriter) }{ { name: "single file", args: args{ cfg: &Config{ - Path: tempFileName(t), + Path: tempFileName(t), + FlushInterval: 5 * time.Second, }, }, - validate: func(t *testing.T, closer io.WriteCloser) { - _, ok := closer.(*bufferedWriteCloser) + validate: func(t *testing.T, writer *fileWriter) { + assert.Equal(t, 5*time.Second, writer.flushInterval) + _, ok := writer.file.(*bufferedWriteCloser) assert.Equal(t, true, ok) }, }, @@ -125,10 +137,10 @@ func TestBuildFileWriter(t *testing.T) { }, }, }, - validate: func(t *testing.T, closer io.WriteCloser) { - writer, ok := closer.(*lumberjack.Logger) + validate: func(t *testing.T, writer *fileWriter) { + logger, ok := writer.file.(*lumberjack.Logger) assert.Equal(t, true, ok) - assert.Equal(t, defaultMaxBackups, writer.MaxBackups) + assert.Equal(t, defaultMaxBackups, logger.MaxBackups) }, }, { @@ -144,19 +156,22 @@ func TestBuildFileWriter(t *testing.T) { }, }, }, - validate: func(t *testing.T, closer io.WriteCloser) { - writer, ok := closer.(*lumberjack.Logger) + validate: func(t *testing.T, writer *fileWriter) { + logger, ok := writer.file.(*lumberjack.Logger) assert.Equal(t, true, ok) - assert.Equal(t, 3, writer.MaxBackups) - assert.Equal(t, 30, writer.MaxSize) - assert.Equal(t, 100, writer.MaxAge) - assert.Equal(t, true, writer.LocalTime) + assert.Equal(t, 3, logger.MaxBackups) + assert.Equal(t, 30, logger.MaxSize) + assert.Equal(t, 100, logger.MaxAge) + assert.Equal(t, true, logger.LocalTime) }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := buildFileWriter(tt.args.cfg) + got, err := newFileWriter(tt.args.cfg.Path, tt.args.cfg.Append, tt.args.cfg.Rotation, tt.args.cfg.FlushInterval, nil) + defer func() { + assert.NoError(t, got.file.Close()) + }() assert.NoError(t, err) tt.validate(t, got) }) diff --git a/exporter/fileexporter/file_exporter.go b/exporter/fileexporter/file_exporter.go index 2765fb3787dd..c7a090f28c6c 100644 --- a/exporter/fileexporter/file_exporter.go +++ b/exporter/fileexporter/file_exporter.go @@ -5,10 +5,6 @@ package fileexporter // import "github.com/open-telemetry/opentelemetry-collecto import ( "context" - "encoding/binary" - "io" - "sync" - "time" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/pdata/plog" @@ -16,154 +12,61 @@ import ( "go.opentelemetry.io/collector/pdata/ptrace" ) -// Marshaler configuration used for marhsaling Protobuf -var tracesMarshalers = map[string]ptrace.Marshaler{ - formatTypeJSON: &ptrace.JSONMarshaler{}, - formatTypeProto: &ptrace.ProtoMarshaler{}, -} -var metricsMarshalers = map[string]pmetric.Marshaler{ - formatTypeJSON: &pmetric.JSONMarshaler{}, - formatTypeProto: &pmetric.ProtoMarshaler{}, -} -var logsMarshalers = map[string]plog.Marshaler{ - formatTypeJSON: &plog.JSONMarshaler{}, - formatTypeProto: &plog.ProtoMarshaler{}, -} - -// exportFunc defines how to export encoded telemetry data. -type exportFunc func(e *fileExporter, buf []byte) error - // fileExporter is the implementation of file exporter that writes telemetry data to a file type fileExporter struct { - path string - file io.WriteCloser - mutex sync.Mutex - - tracesMarshaler ptrace.Marshaler - metricsMarshaler pmetric.Marshaler - logsMarshaler plog.Marshaler - - compression string - compressor compressFunc - - formatType string - exporter exportFunc - - flushInterval time.Duration - flushTicker *time.Ticker - stopTicker chan struct{} + conf *Config + marshaller *marshaller + writer *fileWriter } func (e *fileExporter) consumeTraces(_ context.Context, td ptrace.Traces) error { - buf, err := e.tracesMarshaler.MarshalTraces(td) + buf, err := e.marshaller.marshalTraces(td) if err != nil { return err } - buf = e.compressor(buf) - return e.exporter(e, buf) + return e.writer.export(buf) } func (e *fileExporter) consumeMetrics(_ context.Context, md pmetric.Metrics) error { - buf, err := e.metricsMarshaler.MarshalMetrics(md) + buf, err := e.marshaller.marshalMetrics(md) if err != nil { return err } - buf = e.compressor(buf) - return e.exporter(e, buf) + return e.writer.export(buf) } func (e *fileExporter) consumeLogs(_ context.Context, ld plog.Logs) error { - buf, err := e.logsMarshaler.MarshalLogs(ld) + buf, err := e.marshaller.marshalLogs(ld) if err != nil { return err } - buf = e.compressor(buf) - return e.exporter(e, buf) + return e.writer.export(buf) } -func exportMessageAsLine(e *fileExporter, buf []byte) error { - // Ensure only one write operation happens at a time. - e.mutex.Lock() - defer e.mutex.Unlock() - if _, err := e.file.Write(buf); err != nil { - return err - } - if _, err := io.WriteString(e.file, "\n"); err != nil { +// Start starts the flush timer if set. +func (e *fileExporter) Start(_ context.Context, host component.Host) error { + var err error + e.marshaller, err = newMarshaller(e.conf, host) + if err != nil { return err } - return nil -} + export := buildExportFunc(e.conf) -func exportMessageAsBuffer(e *fileExporter, buf []byte) error { - // Ensure only one write operation happens at a time. - e.mutex.Lock() - defer e.mutex.Unlock() - // write the size of each message before writing the message itself. https://developers.google.com/protocol-buffers/docs/techniques - // each encoded object is preceded by 4 bytes (an unsigned 32 bit integer) - data := make([]byte, 4, 4+len(buf)) - binary.BigEndian.PutUint32(data, uint32(len(buf))) - - return binary.Write(e.file, binary.BigEndian, append(data, buf...)) -} - -// startFlusher starts the flusher. -// It does not check the flushInterval -func (e *fileExporter) startFlusher() { - e.mutex.Lock() - defer e.mutex.Unlock() - ff, ok := e.file.(interface{ flush() error }) - if !ok { - // Just in case. - return - } - - // Create the stop channel. - e.stopTicker = make(chan struct{}) - // Start the ticker. - e.flushTicker = time.NewTicker(e.flushInterval) - go func() { - for { - select { - case <-e.flushTicker.C: - e.mutex.Lock() - ff.flush() - e.mutex.Unlock() - case <-e.stopTicker: - return - } - } - }() -} - -// Start starts the flush timer if set. -func (e *fileExporter) Start(context.Context, component.Host) error { - if e.flushInterval > 0 { - e.startFlusher() + e.writer, err = newFileWriter(e.conf.Path, e.conf.Append, e.conf.Rotation, e.conf.FlushInterval, export) + if err != nil { + return err } + e.writer.start() return nil } // Shutdown stops the exporter and is invoked during shutdown. // It stops the flush ticker if set. func (e *fileExporter) Shutdown(context.Context) error { - e.mutex.Lock() - defer e.mutex.Unlock() - // Stop the flush ticker. - if e.flushTicker != nil { - e.flushTicker.Stop() - // Stop the go routine. - close(e.stopTicker) - } - return e.file.Close() -} - -func buildExportFunc(cfg *Config) func(e *fileExporter, buf []byte) error { - if cfg.FormatType == formatTypeProto { - return exportMessageAsBuffer - } - // if the data format is JSON and needs to be compressed, telemetry data can't be written to file in JSON format. - if cfg.FormatType == formatTypeJSON && cfg.Compression != "" { - return exportMessageAsBuffer + if e.writer == nil { + return nil } - return exportMessageAsLine + w := e.writer + e.writer = nil + return w.shutdown() } diff --git a/exporter/fileexporter/file_exporter_test.go b/exporter/fileexporter/file_exporter_test.go index 2b076ec18f23..cefc5747f775 100644 --- a/exporter/fileexporter/file_exporter_test.go +++ b/exporter/fileexporter/file_exporter_test.go @@ -10,6 +10,8 @@ import ( "errors" "io" "os" + "path/filepath" + "slices" "sync" "testing" "time" @@ -21,6 +23,7 @@ import ( "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + "go.uber.org/zap" "gopkg.in/natefinch/lumberjack.v2" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" @@ -125,33 +128,25 @@ func TestFileTracesExporter(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { conf := tt.args.conf - writer, err := buildFileWriter(conf) - assert.NoError(t, err) - fe := &fileExporter{ - path: conf.Path, - formatType: conf.FormatType, - file: writer, - tracesMarshaler: tracesMarshalers[conf.FormatType], - exporter: buildExportFunc(conf), - compression: conf.Compression, - compressor: buildCompressor(conf.Compression), - flushInterval: conf.FlushInterval, - } - require.NotNil(t, fe) + feI := newFileExporter(conf, zap.NewNop()) + require.IsType(t, &fileExporter{}, feI) + fe := feI.(*fileExporter) td := testdata.GenerateTracesTwoSpansSameResource() assert.NoError(t, fe.Start(context.Background(), componenttest.NewNopHost())) assert.NoError(t, fe.consumeTraces(context.Background(), td)) assert.NoError(t, fe.consumeTraces(context.Background(), td)) - assert.NoError(t, fe.Shutdown(context.Background())) + defer func() { + assert.NoError(t, fe.Shutdown(context.Background())) + }() - fi, err := os.Open(fe.path) + fi, err := os.Open(fe.writer.path) assert.NoError(t, err) defer fi.Close() br := bufio.NewReader(fi) for { buf, isEnd, err := func() ([]byte, bool, error) { - if fe.formatType == formatTypeJSON && fe.compression == "" { + if fe.marshaller.formatType == formatTypeJSON && fe.marshaller.compression == "" { return readJSONMessage(br) } return readMessageFromStream(br) @@ -160,7 +155,7 @@ func TestFileTracesExporter(t *testing.T) { if isEnd { break } - decoder := buildUnCompressor(fe.compression) + decoder := buildUnCompressor(fe.marshaller.compression) buf, err = decoder(buf) assert.NoError(t, err) got, err := tt.args.unmarshaler.UnmarshalTraces(buf) @@ -174,11 +169,15 @@ func TestFileTracesExporter(t *testing.T) { func TestFileTracesExporterError(t *testing.T) { mf := &errorWriter{} fe := &fileExporter{ - file: mf, - formatType: formatTypeJSON, - exporter: exportMessageAsLine, - tracesMarshaler: tracesMarshalers[formatTypeJSON], - compressor: noneCompress, + marshaller: &marshaller{ + formatType: formatTypeJSON, + tracesMarshaler: tracesMarshalers[formatTypeJSON], + compressor: noneCompress, + }, + writer: &fileWriter{ + file: mf, + exporter: exportMessageAsLine, + }, } require.NotNil(t, fe) @@ -260,17 +259,8 @@ func TestFileMetricsExporter(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { conf := tt.args.conf - writer, err := buildFileWriter(conf) - assert.NoError(t, err) fe := &fileExporter{ - path: conf.Path, - formatType: conf.FormatType, - file: writer, - metricsMarshaler: metricsMarshalers[conf.FormatType], - exporter: buildExportFunc(conf), - compression: conf.Compression, - compressor: buildCompressor(conf.Compression), - flushInterval: conf.FlushInterval, + conf: conf, } require.NotNil(t, fe) @@ -278,16 +268,18 @@ func TestFileMetricsExporter(t *testing.T) { assert.NoError(t, fe.Start(context.Background(), componenttest.NewNopHost())) assert.NoError(t, fe.consumeMetrics(context.Background(), md)) assert.NoError(t, fe.consumeMetrics(context.Background(), md)) - assert.NoError(t, fe.Shutdown(context.Background())) + defer func() { + assert.NoError(t, fe.Shutdown(context.Background())) + }() - fi, err := os.Open(fe.path) + fi, err := os.Open(fe.writer.path) assert.NoError(t, err) defer fi.Close() br := bufio.NewReader(fi) for { buf, isEnd, err := func() ([]byte, bool, error) { - if fe.formatType == formatTypeJSON && - fe.compression == "" { + if fe.marshaller.formatType == formatTypeJSON && + fe.marshaller.compression == "" { return readJSONMessage(br) } return readMessageFromStream(br) @@ -296,7 +288,7 @@ func TestFileMetricsExporter(t *testing.T) { if isEnd { break } - decoder := buildUnCompressor(fe.compression) + decoder := buildUnCompressor(fe.marshaller.compression) buf, err = decoder(buf) assert.NoError(t, err) got, err := tt.args.unmarshaler.UnmarshalMetrics(buf) @@ -311,11 +303,15 @@ func TestFileMetricsExporter(t *testing.T) { func TestFileMetricsExporterError(t *testing.T) { mf := &errorWriter{} fe := &fileExporter{ - file: mf, - formatType: formatTypeJSON, - exporter: exportMessageAsLine, - metricsMarshaler: metricsMarshalers[formatTypeJSON], - compressor: noneCompress, + marshaller: &marshaller{ + formatType: formatTypeJSON, + metricsMarshaler: metricsMarshalers[formatTypeJSON], + compressor: noneCompress, + }, + writer: &fileWriter{ + file: mf, + exporter: exportMessageAsLine, + }, } require.NotNil(t, fe) @@ -397,17 +393,8 @@ func TestFileLogsExporter(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { conf := tt.args.conf - writer, err := buildFileWriter(conf) - assert.NoError(t, err) fe := &fileExporter{ - path: conf.Path, - formatType: conf.FormatType, - file: writer, - logsMarshaler: logsMarshalers[conf.FormatType], - exporter: buildExportFunc(conf), - compression: conf.Compression, - compressor: buildCompressor(conf.Compression), - flushInterval: conf.FlushInterval, + conf: conf, } require.NotNil(t, fe) @@ -415,15 +402,17 @@ func TestFileLogsExporter(t *testing.T) { assert.NoError(t, fe.Start(context.Background(), componenttest.NewNopHost())) assert.NoError(t, fe.consumeLogs(context.Background(), ld)) assert.NoError(t, fe.consumeLogs(context.Background(), ld)) - assert.NoError(t, fe.Shutdown(context.Background())) + defer func() { + assert.NoError(t, fe.Shutdown(context.Background())) + }() - fi, err := os.Open(fe.path) + fi, err := os.Open(fe.writer.path) assert.NoError(t, err) defer fi.Close() br := bufio.NewReader(fi) for { buf, isEnd, err := func() ([]byte, bool, error) { - if fe.formatType == formatTypeJSON && fe.compression == "" { + if fe.marshaller.formatType == formatTypeJSON && fe.marshaller.compression == "" { return readJSONMessage(br) } return readMessageFromStream(br) @@ -432,7 +421,7 @@ func TestFileLogsExporter(t *testing.T) { if isEnd { break } - decoder := buildUnCompressor(fe.compression) + decoder := buildUnCompressor(fe.marshaller.compression) buf, err = decoder(buf) assert.NoError(t, err) got, err := tt.args.unmarshaler.UnmarshalLogs(buf) @@ -446,11 +435,15 @@ func TestFileLogsExporter(t *testing.T) { func TestFileLogsExporterErrors(t *testing.T) { mf := &errorWriter{} fe := &fileExporter{ - file: mf, - formatType: formatTypeJSON, - exporter: exportMessageAsLine, - logsMarshaler: logsMarshalers[formatTypeJSON], - compressor: noneCompress, + marshaller: &marshaller{ + formatType: formatTypeJSON, + logsMarshaler: logsMarshalers[formatTypeJSON], + compressor: noneCompress, + }, + writer: &fileWriter{ + file: mf, + exporter: exportMessageAsLine, + }, } require.NotNil(t, fe) @@ -463,14 +456,18 @@ func TestFileLogsExporterErrors(t *testing.T) { func TestExportMessageAsBuffer(t *testing.T) { path := tempFileName(t) fe := &fileExporter{ - path: path, - formatType: formatTypeProto, - file: &lumberjack.Logger{ - Filename: path, - MaxSize: 1, + marshaller: &marshaller{ + formatType: formatTypeProto, + logsMarshaler: logsMarshalers[formatTypeProto], + }, + writer: &fileWriter{ + path: path, + file: &lumberjack.Logger{ + Filename: path, + MaxSize: 1, + }, + exporter: exportMessageAsBuffer, }, - logsMarshaler: logsMarshalers[formatTypeProto], - exporter: exportMessageAsBuffer, } require.NotNil(t, fe) // @@ -478,18 +475,13 @@ func TestExportMessageAsBuffer(t *testing.T) { marshaler := &plog.ProtoMarshaler{} buf, err := marshaler.MarshalLogs(ld) assert.NoError(t, err) - assert.Error(t, exportMessageAsBuffer(fe, buf)) + assert.Error(t, exportMessageAsBuffer(fe.writer, buf)) assert.NoError(t, fe.Shutdown(context.Background())) } // tempFileName provides a temporary file name for testing. -func tempFileName(t *testing.T) string { - tmpfile, err := os.CreateTemp("", "*") - require.NoError(t, err) - require.NoError(t, tmpfile.Close()) - socket := tmpfile.Name() - require.NoError(t, os.Remove(socket)) - return socket +func tempFileName(t testing.TB) string { + return filepath.Join(t.TempDir(), "fileexporter_test.tmp") } // errorWriter is an io.Writer that will return an error all ways @@ -625,14 +617,14 @@ func (b *tsBuffer) Bytes() []byte { } func safeFileExporterWrite(e *fileExporter, d []byte) (int, error) { - e.mutex.Lock() - defer e.mutex.Unlock() - return e.file.Write(d) + e.writer.mutex.Lock() + defer e.writer.mutex.Unlock() + return e.writer.file.Write(d) } func TestFlushing(t *testing.T) { cfg := &Config{ - Path: "", + Path: tempFileName(t), FlushInterval: time.Second, } @@ -642,11 +634,28 @@ func TestFlushing(t *testing.T) { // Wrap the buffer with the buffered writer closer that implements flush() method. bwc := newBufferedWriteCloser(buf) // Create a file exporter with flushing enabled. - fe := newFileExporter(cfg, bwc) + feI := newFileExporter(cfg, zap.NewNop()) + assert.IsType(t, &fileExporter{}, feI) + fe := feI.(*fileExporter) // Start the flusher. ctx := context.Background() - assert.NoError(t, fe.Start(ctx, nil)) + fe.marshaller = &marshaller{ + formatType: fe.conf.FormatType, + tracesMarshaler: tracesMarshalers[fe.conf.FormatType], + metricsMarshaler: metricsMarshalers[fe.conf.FormatType], + logsMarshaler: logsMarshalers[fe.conf.FormatType], + compression: fe.conf.Compression, + compressor: buildCompressor(fe.conf.Compression), + } + export := buildExportFunc(fe.conf) + var err error + fe.writer, err = newFileWriter(fe.conf.Path, fe.conf.Append, fe.conf.Rotation, fe.conf.FlushInterval, export) + assert.NoError(t, err) + err = fe.writer.file.Close() + assert.NoError(t, err) + fe.writer.file = bwc + fe.writer.start() // Write 10 bytes. b := []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10} @@ -666,3 +675,86 @@ func TestFlushing(t *testing.T) { assert.EqualValues(t, b, bbuf.Bytes()) assert.NoError(t, fe.Shutdown(ctx)) } + +func TestAppend(t *testing.T) { + cfg := &Config{ + Path: tempFileName(t), + FlushInterval: time.Second, + Append: true, + } + + // Create a buffer to capture the output. + bbuf := &tsBuffer{b: &bytes.Buffer{}} + buf := &NopWriteCloser{bbuf} + // Wrap the buffer with the buffered writer closer that implements flush() method. + bwc := newBufferedWriteCloser(buf) + // Create a file exporter with flushing enabled. + feI := newFileExporter(cfg, zap.NewNop()) + assert.IsType(t, &fileExporter{}, feI) + fe := feI.(*fileExporter) + + // Start the flusher. + ctx := context.Background() + fe.marshaller = &marshaller{ + formatType: fe.conf.FormatType, + tracesMarshaler: tracesMarshalers[fe.conf.FormatType], + metricsMarshaler: metricsMarshalers[fe.conf.FormatType], + logsMarshaler: logsMarshalers[fe.conf.FormatType], + compression: fe.conf.Compression, + compressor: buildCompressor(fe.conf.Compression), + } + export := buildExportFunc(fe.conf) + var err error + fe.writer, err = newFileWriter(fe.conf.Path, fe.conf.Append, fe.conf.Rotation, fe.conf.FlushInterval, export) + assert.NoError(t, err) + err = fe.writer.file.Close() + assert.NoError(t, err) + fe.writer.file = bwc + fe.writer.start() + + // Write 10 bytes. + b1 := []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10} + i, err := safeFileExporterWrite(fe, b1) + assert.NoError(t, err) + assert.EqualValues(t, len(b1), i, "bytes written") + + // Assert buf contains 0 bytes before flush is called. + assert.EqualValues(t, 0, bbuf.Len(), "before flush") + + // Wait 1.5 sec + time.Sleep(1500 * time.Millisecond) + + // Assert buf contains 10 bytes after flush is called. + assert.EqualValues(t, 10, bbuf.Len(), "after flush") + // Compare the content. + assert.EqualValues(t, b1, bbuf.Bytes()) + assert.NoError(t, fe.Shutdown(ctx)) + + // Restart the exporter + fe.writer, err = newFileWriter(fe.conf.Path, fe.conf.Append, fe.conf.Rotation, fe.conf.FlushInterval, export) + assert.NoError(t, err) + err = fe.writer.file.Close() + assert.NoError(t, err) + fe.writer.file = bwc + fe.writer.start() + + // Write 10 bytes - again + b2 := []byte{11, 12, 13, 14, 15, 16, 17, 18, 19, 20} + i, err = safeFileExporterWrite(fe, b2) + assert.NoError(t, err) + assert.EqualValues(t, len(b2), i, "bytes written") + + // Assert buf contains 10 bytes before flush is called. + assert.EqualValues(t, 10, bbuf.Len(), "after restart - before flush") + + // Wait 1.5 sec + time.Sleep(1500 * time.Millisecond) + + // Assert buf contains 20 bytes after flush is called. + assert.EqualValues(t, 20, bbuf.Len(), "after restart - after flush") + // Compare the content. + bComplete := slices.Clone(b1) + bComplete = append(bComplete, b2...) + assert.EqualValues(t, bComplete, bbuf.Bytes()) + assert.NoError(t, fe.Shutdown(ctx)) +} diff --git a/exporter/fileexporter/file_writer.go b/exporter/fileexporter/file_writer.go new file mode 100644 index 000000000000..fc4c34e25425 --- /dev/null +++ b/exporter/fileexporter/file_writer.go @@ -0,0 +1,118 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package fileexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter" + +import ( + "encoding/binary" + "io" + "sync" + "time" +) + +// exportFunc defines how to export encoded telemetry data. +type exportFunc func(e *fileWriter, buf []byte) error + +type fileWriter struct { + path string + file io.WriteCloser + mutex sync.Mutex + + exporter exportFunc + + flushInterval time.Duration + flushTicker *time.Ticker + stopTicker chan struct{} +} + +func exportMessageAsLine(w *fileWriter, buf []byte) error { + // Ensure only one write operation happens at a time. + w.mutex.Lock() + defer w.mutex.Unlock() + if _, err := w.file.Write(buf); err != nil { + return err + } + if _, err := io.WriteString(w.file, "\n"); err != nil { + return err + } + return nil +} + +func exportMessageAsBuffer(w *fileWriter, buf []byte) error { + // Ensure only one write operation happens at a time. + w.mutex.Lock() + defer w.mutex.Unlock() + // write the size of each message before writing the message itself. https://developers.google.com/protocol-buffers/docs/techniques + // each encoded object is preceded by 4 bytes (an unsigned 32 bit integer) + data := make([]byte, 4, 4+len(buf)) + binary.BigEndian.PutUint32(data, uint32(len(buf))) + + return binary.Write(w.file, binary.BigEndian, append(data, buf...)) +} + +func (w *fileWriter) export(buf []byte) error { + return w.exporter(w, buf) +} + +// startFlusher starts the flusher. +// It does not check the flushInterval +func (w *fileWriter) startFlusher() { + w.mutex.Lock() + defer w.mutex.Unlock() + ff, ok := w.file.(interface{ flush() error }) + if !ok { + // Just in case. + return + } + + // Create the stop channel. + w.stopTicker = make(chan struct{}) + // Start the ticker. + w.flushTicker = time.NewTicker(w.flushInterval) + go func() { + for { + select { + case <-w.flushTicker.C: + w.mutex.Lock() + ff.flush() + w.mutex.Unlock() + case <-w.stopTicker: + w.flushTicker.Stop() + w.flushTicker = nil + return + } + } + }() +} + +// Start starts the flush timer if set. +func (w *fileWriter) start() { + if w.flushInterval > 0 { + w.startFlusher() + } +} + +// Shutdown stops the exporter and is invoked during shutdown. +// It stops the flush ticker if set. +func (w *fileWriter) shutdown() error { + + // Stop the flush ticker. + if w.flushTicker != nil { + // Stop the go routine. + w.mutex.Lock() + close(w.stopTicker) + w.mutex.Unlock() + } + return w.file.Close() +} + +func buildExportFunc(cfg *Config) func(w *fileWriter, buf []byte) error { + if cfg.FormatType == formatTypeProto { + return exportMessageAsBuffer + } + // if the data format is JSON and needs to be compressed, telemetry data can't be written to file in JSON format. + if cfg.FormatType == formatTypeJSON && cfg.Compression != "" { + return exportMessageAsBuffer + } + return exportMessageAsLine +} diff --git a/exporter/fileexporter/generated_component_test.go b/exporter/fileexporter/generated_component_test.go new file mode 100644 index 000000000000..338d3e841ea2 --- /dev/null +++ b/exporter/fileexporter/generated_component_test.go @@ -0,0 +1,140 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package fileexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/fileexporter/go.mod b/exporter/fileexporter/go.mod index 43cd15029c64..8f5526529824 100644 --- a/exporter/fileexporter/go.mod +++ b/exporter/fileexporter/go.mod @@ -1,53 +1,67 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter -go 1.20 +go 1.21 require ( - github.com/klauspost/compress v1.17.2 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/hashicorp/golang-lru/v2 v2.0.7 + github.com/klauspost/compress v1.17.8 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.98.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -66,3 +80,7 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/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 + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension => ../../extension/encoding/otlpencodingextension + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding => ../../extension/encoding diff --git a/exporter/fileexporter/go.sum b/exporter/fileexporter/go.sum index 1c3d19632fa0..80cc3f1c823c 100644 --- a/exporter/fileexporter/go.sum +++ b/exporter/fileexporter/go.sum @@ -1,73 +1,51 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= 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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -75,103 +53,89 @@ 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/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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -179,40 +143,18 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= -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= -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/exporter/fileexporter/grouping_file_exporter.go b/exporter/fileexporter/grouping_file_exporter.go new file mode 100644 index 000000000000..329c61878577 --- /dev/null +++ b/exporter/fileexporter/grouping_file_exporter.go @@ -0,0 +1,289 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package fileexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter" + +import ( + "context" + "errors" + "fmt" + "os" + "path" + "strings" + "sync" + + "github.com/hashicorp/golang-lru/v2/simplelru" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer/consumererror" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.uber.org/zap" +) + +type groupingFileExporter struct { + conf *Config + logger *zap.Logger + marshaller *marshaller + pathPrefix string + pathSuffix string + attribute string + maxOpenFiles int + newFileWriter func(path string) (*fileWriter, error) + + mutex sync.Mutex + writers *simplelru.LRU[string, *fileWriter] +} + +func (e *groupingFileExporter) consumeTraces(ctx context.Context, td ptrace.Traces) error { + if td.ResourceSpans().Len() == 0 { + return nil + } + + groups := make(map[string][]ptrace.ResourceSpans) + + for i := 0; i < td.ResourceSpans().Len(); i++ { + rSpans := td.ResourceSpans().At(i) + group(e, groups, rSpans.Resource(), rSpans) + } + + var errs error + for pathSegment, rSpansSlice := range groups { + traces := ptrace.NewTraces() + for _, rSpans := range rSpansSlice { + rSpans.CopyTo(traces.ResourceSpans().AppendEmpty()) + } + + buf, err := e.marshaller.marshalTraces(traces) + if err != nil { + errs = errors.Join(errs, err) + continue + } + + err = e.write(ctx, pathSegment, buf) + if err != nil { + errs = errors.Join(errs, err) + } + } + + if errs != nil { + return consumererror.NewPermanent(errs) + } + + return nil +} + +func (e *groupingFileExporter) consumeMetrics(ctx context.Context, md pmetric.Metrics) error { + if md.ResourceMetrics().Len() == 0 { + return nil + } + + groups := make(map[string][]pmetric.ResourceMetrics) + + for i := 0; i < md.ResourceMetrics().Len(); i++ { + rMetrics := md.ResourceMetrics().At(i) + group(e, groups, rMetrics.Resource(), rMetrics) + } + + var errs error + for pathSegment, rMetricsSlice := range groups { + metrics := pmetric.NewMetrics() + for _, rMetrics := range rMetricsSlice { + rMetrics.CopyTo(metrics.ResourceMetrics().AppendEmpty()) + } + + buf, err := e.marshaller.marshalMetrics(metrics) + if err != nil { + errs = errors.Join(errs, err) + continue + } + + err = e.write(ctx, pathSegment, buf) + if err != nil { + errs = errors.Join(errs, err) + } + } + + if errs != nil { + return consumererror.NewPermanent(errs) + } + + return nil +} + +func (e *groupingFileExporter) consumeLogs(ctx context.Context, ld plog.Logs) error { + if ld.ResourceLogs().Len() == 0 { + return nil + } + + groups := make(map[string][]plog.ResourceLogs) + + for i := 0; i < ld.ResourceLogs().Len(); i++ { + rLogs := ld.ResourceLogs().At(i) + group(e, groups, rLogs.Resource(), rLogs) + } + + var errs error + for pathSegment, rLogsSlice := range groups { + logs := plog.NewLogs() + for _, rlogs := range rLogsSlice { + rlogs.CopyTo(logs.ResourceLogs().AppendEmpty()) + } + + buf, err := e.marshaller.marshalLogs(logs) + if err != nil { + errs = errors.Join(errs, err) + continue + } + + err = e.write(ctx, pathSegment, buf) + if err != nil { + errs = errors.Join(errs, err) + } + } + + if errs != nil { + return consumererror.NewPermanent(errs) + } + + return nil +} + +func (e *groupingFileExporter) write(_ context.Context, pathSegment string, buf []byte) error { + writer, err := e.getWriter(pathSegment) + if err != nil { + return err + } + + err = writer.export(buf) + if err != nil { + return err + } + + return nil +} + +func (e *groupingFileExporter) getWriter(pathSegment string) (*fileWriter, error) { + fullPath := e.fullPath(pathSegment) + + e.mutex.Lock() + defer e.mutex.Unlock() + + writer, ok := e.writers.Get(fullPath) + if ok { + return writer, nil + } + + err := os.MkdirAll(path.Dir(fullPath), 0755) + if err != nil { + return nil, err + } + + writer, err = e.newFileWriter(fullPath) + if err != nil { + return nil, err + } + + e.writers.Add(fullPath, writer) + + writer.start() + + return writer, nil +} + +func cleanPathPrefix(pathPrefix string) string { + cleaned := path.Clean(pathPrefix) + if strings.HasSuffix(pathPrefix, "/") && !strings.HasSuffix(cleaned, "/") { + return cleaned + "/" + } + + return cleaned +} + +func (e *groupingFileExporter) fullPath(pathSegment string) string { + if strings.HasPrefix(pathSegment, "./") { + pathSegment = pathSegment[1:] + } else if strings.HasPrefix(pathSegment, "../") { + pathSegment = pathSegment[2:] + } + + fullPath := path.Clean(e.pathPrefix + pathSegment + e.pathSuffix) + if strings.HasPrefix(fullPath, e.pathPrefix) { + return fullPath + } + + // avoid path traversal vulnerability + return path.Join(e.pathPrefix, path.Join("/", pathSegment+e.pathSuffix)) +} + +func (e *groupingFileExporter) onEvict(_ string, writer *fileWriter) { + err := writer.shutdown() + if err != nil { + e.logger.Warn("Failed to close file", zap.Error(err), zap.String("path", writer.path)) + } +} + +func group[T any](e *groupingFileExporter, groups map[string][]T, resource pcommon.Resource, resourceEntries T) { + var pathSegment string + v, ok := resource.Attributes().Get(e.attribute) + if ok { + if v.Type() == pcommon.ValueTypeStr { + pathSegment = v.Str() + } else { + ok = false + } + } + + if !ok { + e.logger.Debug(fmt.Sprintf("Resource does not contain %s attribute, dropping it", e.attribute)) + return + } + + groups[pathSegment] = append(groups[pathSegment], resourceEntries) +} + +// Start initializes and starts the exporter. +func (e *groupingFileExporter) Start(_ context.Context, host component.Host) error { + var err error + e.marshaller, err = newMarshaller(e.conf, host) + if err != nil { + return err + } + export := buildExportFunc(e.conf) + + pathParts := strings.Split(e.conf.Path, "*") + + e.pathPrefix = cleanPathPrefix(pathParts[0]) + e.attribute = e.conf.GroupBy.ResourceAttribute + e.pathSuffix = pathParts[1] + e.maxOpenFiles = e.conf.GroupBy.MaxOpenFiles + e.newFileWriter = func(path string) (*fileWriter, error) { + return newFileWriter(path, e.conf.Append, nil, e.conf.FlushInterval, export) + } + + writers, err := simplelru.NewLRU(e.conf.GroupBy.MaxOpenFiles, e.onEvict) + if err != nil { + return err + } + + e.writers = writers + + return nil +} + +// Shutdown stops the exporter and is invoked during shutdown. +// It stops flushes and closes all underlying writers. +func (e *groupingFileExporter) Shutdown(context.Context) error { + e.mutex.Lock() + defer e.mutex.Unlock() + + if e.writers == nil { + return nil + } + + e.writers.Purge() + e.writers = nil + + return nil +} diff --git a/exporter/fileexporter/grouping_file_exporter_test.go b/exporter/fileexporter/grouping_file_exporter_test.go new file mode 100644 index 000000000000..53f1b06a7382 --- /dev/null +++ b/exporter/fileexporter/grouping_file_exporter_test.go @@ -0,0 +1,499 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package fileexporter + +import ( + "bufio" + "bytes" + "context" + "fmt" + "os" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.uber.org/zap" + "go.uber.org/zap/zaptest/observer" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" +) + +type testMarshaller struct { + content []byte +} + +func (m *testMarshaller) MarshalTraces(ptrace.Traces) ([]byte, error) { + return m.content, nil +} + +func (m *testMarshaller) MarshalLogs(plog.Logs) ([]byte, error) { + return m.content, nil +} + +func (m *testMarshaller) MarshalMetrics(pmetric.Metrics) ([]byte, error) { + return m.content, nil +} + +type groupingExporterTestCase struct { + name string + conf *Config + traceUnmarshaler ptrace.Unmarshaler + logUnmarshaler plog.Unmarshaler + metricUnmarshaler pmetric.Unmarshaler +} + +func groupingExporterTestCases() []groupingExporterTestCase { + return []groupingExporterTestCase{ + { + name: "json: default configuration", + conf: &Config{ + FormatType: formatTypeJSON, + Rotation: &Rotation{MaxBackups: defaultMaxBackups}, + GroupBy: &GroupBy{ + Enabled: true, + // defaults: + ResourceAttribute: defaultResourceAttribute, + MaxOpenFiles: defaultMaxOpenFiles, + }, + }, + traceUnmarshaler: &ptrace.JSONUnmarshaler{}, + logUnmarshaler: &plog.JSONUnmarshaler{}, + metricUnmarshaler: &pmetric.JSONUnmarshaler{}, + }, + { + name: "json: compression configuration", + conf: &Config{ + FormatType: formatTypeJSON, + Compression: compressionZSTD, + Rotation: &Rotation{MaxBackups: defaultMaxBackups}, + GroupBy: &GroupBy{ + Enabled: true, + // defaults: + ResourceAttribute: defaultResourceAttribute, + MaxOpenFiles: defaultMaxOpenFiles, + }, + }, + traceUnmarshaler: &ptrace.JSONUnmarshaler{}, + logUnmarshaler: &plog.JSONUnmarshaler{}, + metricUnmarshaler: &pmetric.JSONUnmarshaler{}, + }, + { + name: "Proto: default configuration", + conf: &Config{ + FormatType: formatTypeProto, + GroupBy: &GroupBy{ + Enabled: true, + // defaults: + ResourceAttribute: defaultResourceAttribute, + MaxOpenFiles: defaultMaxOpenFiles, + }, + }, + traceUnmarshaler: &ptrace.ProtoUnmarshaler{}, + logUnmarshaler: &plog.ProtoUnmarshaler{}, + metricUnmarshaler: &pmetric.ProtoUnmarshaler{}, + }, + { + name: "Proto: compression configuration", + conf: &Config{ + FormatType: formatTypeProto, + Compression: compressionZSTD, + Rotation: &Rotation{MaxBackups: defaultMaxBackups}, + GroupBy: &GroupBy{ + Enabled: true, + // defaults: + ResourceAttribute: defaultResourceAttribute, + MaxOpenFiles: defaultMaxOpenFiles, + }, + }, + traceUnmarshaler: &ptrace.ProtoUnmarshaler{}, + logUnmarshaler: &plog.ProtoUnmarshaler{}, + metricUnmarshaler: &pmetric.ProtoUnmarshaler{}, + }, + { + name: "json: max_open_files=1", + conf: &Config{ + FormatType: formatTypeJSON, + Rotation: &Rotation{MaxBackups: defaultMaxBackups}, + GroupBy: &GroupBy{ + Enabled: true, + MaxOpenFiles: 1, + // defaults: + ResourceAttribute: defaultResourceAttribute, + }, + }, + traceUnmarshaler: &ptrace.JSONUnmarshaler{}, + logUnmarshaler: &plog.JSONUnmarshaler{}, + metricUnmarshaler: &pmetric.JSONUnmarshaler{}, + }, + } +} + +func TestGroupingFileTracesExporter(t *testing.T) { + for _, tt := range groupingExporterTestCases() { + t.Run(tt.name, func(t *testing.T) { + conf := tt.conf + tmpDir := t.TempDir() + conf.Path = tmpDir + "/*.log" + zapCore, logs := observer.New(zap.DebugLevel) + feI := newFileExporter(conf, zap.New(zapCore)) + require.IsType(t, &groupingFileExporter{}, feI) + gfe := feI.(*groupingFileExporter) + + testSpans := func() ptrace.Traces { + td := testdata.GenerateTracesTwoSpansSameResourceOneDifferent() + testdata.GenerateTracesOneSpan().ResourceSpans().At(0).CopyTo(td.ResourceSpans().AppendEmpty()) + td.ResourceSpans().At(0).Resource().Attributes().PutStr("fileexporter.path_segment", "one") + td.ResourceSpans().At(1).Resource().Attributes().PutStr("fileexporter.path_segment", ".././two/two") + return td + } + td := testSpans() + + assert.NoError(t, gfe.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, gfe.consumeTraces(context.Background(), td)) + assert.LessOrEqual(t, gfe.writers.Len(), conf.GroupBy.MaxOpenFiles) + + assert.NoError(t, gfe.Shutdown(context.Background())) + + // make sure the exporter did not modify any data + assert.Equal(t, testSpans(), td) + + debugLogs := logs.FilterLevelExact(zap.DebugLevel) + assert.Equal(t, 1, debugLogs.Len()) + assert.Equal(t, 0, logs.Len()-debugLogs.Len()) + + pathResourceSpans := map[string][]ptrace.ResourceSpans{ + tmpDir + "/one.log": {td.ResourceSpans().At(0)}, + tmpDir + "/two/two.log": {td.ResourceSpans().At(1)}, + } + + for path, wantResourceSpans := range pathResourceSpans { + fi, err := os.Open(path) + if len(wantResourceSpans) == 0 { + assert.Error(t, err) + continue + } + assert.NoError(t, err) + br := bufio.NewReader(fi) + for { + buf, isEnd, err := func() ([]byte, bool, error) { + if gfe.marshaller.formatType == formatTypeJSON && gfe.marshaller.compression == "" { + return readJSONMessage(br) + } + return readMessageFromStream(br) + }() + assert.NoError(t, err) + if isEnd { + break + } + decoder := buildUnCompressor(gfe.marshaller.compression) + buf, err = decoder(buf) + assert.NoError(t, err) + got, err := tt.traceUnmarshaler.UnmarshalTraces(buf) + assert.NoError(t, err) + + gotResourceSpans := make([]ptrace.ResourceSpans, 0) + for i := 0; i < got.ResourceSpans().Len(); i++ { + gotResourceSpans = append(gotResourceSpans, got.ResourceSpans().At(i)) + } + + assert.EqualValues(t, wantResourceSpans, gotResourceSpans) + } + fi.Close() + } + }) + } +} + +func TestGroupingFileLogsExporter(t *testing.T) { + for _, tt := range groupingExporterTestCases() { + t.Run(tt.name, func(t *testing.T) { + conf := tt.conf + tmpDir := t.TempDir() + conf.Path = tmpDir + "/*.log" + zapCore, logs := observer.New(zap.DebugLevel) + feI := newFileExporter(conf, zap.New(zapCore)) + require.IsType(t, &groupingFileExporter{}, feI) + gfe := feI.(*groupingFileExporter) + + testLogs := func() plog.Logs { + td := testdata.GenerateLogsTwoLogRecordsSameResource() + testdata.GenerateLogsOneLogRecord().ResourceLogs().At(0).CopyTo(td.ResourceLogs().AppendEmpty()) + testdata.GenerateLogsOneLogRecord().ResourceLogs().At(0).CopyTo(td.ResourceLogs().AppendEmpty()) + td.ResourceLogs().At(0).Resource().Attributes().PutStr("fileexporter.path_segment", "one") + td.ResourceLogs().At(1).Resource().Attributes().PutStr("fileexporter.path_segment", ".././two/two") + return td + } + td := testLogs() + + assert.NoError(t, gfe.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, gfe.consumeLogs(context.Background(), td)) + assert.LessOrEqual(t, gfe.writers.Len(), conf.GroupBy.MaxOpenFiles) + + assert.NoError(t, gfe.Shutdown(context.Background())) + + // make sure the exporter did not modify any data + assert.Equal(t, testLogs(), td) + + debugLogs := logs.FilterLevelExact(zap.DebugLevel) + assert.Equal(t, 1, debugLogs.Len()) + assert.Equal(t, 0, logs.Len()-debugLogs.Len()) + + pathResourceLogs := map[string][]plog.ResourceLogs{ + tmpDir + "/one.log": {td.ResourceLogs().At(0)}, + tmpDir + "/two/two.log": {td.ResourceLogs().At(1)}, + } + + for path, wantResourceLogs := range pathResourceLogs { + fi, err := os.Open(path) + if len(wantResourceLogs) == 0 { + assert.Error(t, err) + continue + } + assert.NoError(t, err) + br := bufio.NewReader(fi) + for { + buf, isEnd, err := func() ([]byte, bool, error) { + if gfe.marshaller.formatType == formatTypeJSON && gfe.marshaller.compression == "" { + return readJSONMessage(br) + } + return readMessageFromStream(br) + }() + assert.NoError(t, err) + if isEnd { + break + } + decoder := buildUnCompressor(gfe.marshaller.compression) + buf, err = decoder(buf) + assert.NoError(t, err) + got, err := tt.logUnmarshaler.UnmarshalLogs(buf) + assert.NoError(t, err) + + gotResourceLogs := make([]plog.ResourceLogs, 0) + for i := 0; i < got.ResourceLogs().Len(); i++ { + gotResourceLogs = append(gotResourceLogs, got.ResourceLogs().At(i)) + } + + assert.EqualValues(t, wantResourceLogs, gotResourceLogs) + } + fi.Close() + } + }) + } +} + +func TestGroupingFileMetricsExporter(t *testing.T) { + for _, tt := range groupingExporterTestCases() { + t.Run(tt.name, func(t *testing.T) { + conf := tt.conf + tmpDir := t.TempDir() + conf.Path = tmpDir + "/*.log" + + zapCore, logs := observer.New(zap.DebugLevel) + feI := newFileExporter(conf, zap.New(zapCore)) + require.IsType(t, &groupingFileExporter{}, feI) + gfe := feI.(*groupingFileExporter) + + testMetrics := func() pmetric.Metrics { + td := testdata.GenerateMetricsTwoMetrics() + testdata.GenerateMetricsOneCounterOneSummaryMetrics().ResourceMetrics().At(0).CopyTo(td.ResourceMetrics().AppendEmpty()) + testdata.GenerateMetricsOneMetricNoAttributes().ResourceMetrics().At(0).CopyTo(td.ResourceMetrics().AppendEmpty()) + td.ResourceMetrics().At(0).Resource().Attributes().PutStr("fileexporter.path_segment", "one") + td.ResourceMetrics().At(1).Resource().Attributes().PutStr("fileexporter.path_segment", ".././two/two") + return td + } + td := testMetrics() + + assert.NoError(t, gfe.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, gfe.consumeMetrics(context.Background(), td)) + assert.LessOrEqual(t, gfe.writers.Len(), conf.GroupBy.MaxOpenFiles) + + assert.NoError(t, gfe.Shutdown(context.Background())) + + // make sure the exporter did not modify any data + assert.Equal(t, testMetrics(), td) + + debugLogs := logs.FilterLevelExact(zap.DebugLevel) + assert.Equal(t, 1, debugLogs.Len()) + assert.Equal(t, 0, logs.Len()-debugLogs.Len()) + + pathResourceMetrics := map[string][]pmetric.ResourceMetrics{ + tmpDir + "/one.log": {td.ResourceMetrics().At(0)}, + tmpDir + "/two/two.log": {td.ResourceMetrics().At(1)}, + } + + for path, wantResourceMetrics := range pathResourceMetrics { + fi, err := os.Open(path) + if len(wantResourceMetrics) == 0 { + assert.Error(t, err) + continue + } + assert.NoError(t, err) + br := bufio.NewReader(fi) + for { + buf, isEnd, err := func() ([]byte, bool, error) { + if gfe.marshaller.formatType == formatTypeJSON && gfe.marshaller.compression == "" { + return readJSONMessage(br) + } + return readMessageFromStream(br) + }() + assert.NoError(t, err) + if isEnd { + break + } + decoder := buildUnCompressor(gfe.marshaller.compression) + buf, err = decoder(buf) + assert.NoError(t, err) + got, err := tt.metricUnmarshaler.UnmarshalMetrics(buf) + assert.NoError(t, err) + + gotResourceMetrics := make([]pmetric.ResourceMetrics, 0) + for i := 0; i < got.ResourceMetrics().Len(); i++ { + gotResourceMetrics = append(gotResourceMetrics, got.ResourceMetrics().At(i)) + } + + assert.EqualValues(t, wantResourceMetrics, gotResourceMetrics) + } + fi.Close() + } + }) + } +} + +func TestFullPath(t *testing.T) { + tests := []struct { + prefix string + pathSegment string + suffix string + want string + }{ + // good actor + {prefix: "/", pathSegment: "filename", suffix: ".json", want: "/filename.json"}, + {prefix: "/", pathSegment: "/dir/filename", suffix: ".json", want: "/dir/filename.json"}, + {prefix: "/dir", pathSegment: "dirsuffix/filename", suffix: ".json", want: "/dirdirsuffix/filename.json"}, + {prefix: "/dir", pathSegment: "/subdir/filename", suffix: ".json", want: "/dir/subdir/filename.json"}, + {prefix: "/dir", pathSegment: "./filename", suffix: ".json", want: "/dir/filename.json"}, + {prefix: "/dir", pathSegment: "/subdir/", suffix: "filename.json", want: "/dir/subdir/filename.json"}, + {prefix: "/dir/", pathSegment: "subdir", suffix: "/filename.json", want: "/dir/subdir/filename.json"}, + {prefix: "/dir", pathSegment: "", suffix: "filename.json", want: "/dirfilename.json"}, + {prefix: "/dir/", pathSegment: "", suffix: "filename.json", want: "/dir/filename.json"}, + {prefix: "/dir/", pathSegment: "subdir/strangebutok/../", suffix: "filename.json", want: "/dir/subdir/filename.json"}, + {prefix: "/dir", pathSegment: "dirsuffix/strangebutok/../", suffix: "filename.json", want: "/dirdirsuffix/filename.json"}, + + // bad actor + {prefix: "/dir", pathSegment: "../etc/attack", suffix: ".json", want: "/dir/etc/attack.json"}, + {prefix: "/dir", pathSegment: "../etc/attack", suffix: "/filename.json", want: "/dir/etc/attack/filename.json"}, + {prefix: "/dir", pathSegment: "dirsuffix/../etc/attack", suffix: ".json", want: "/dir/etc/attack.json"}, + {prefix: "/dir", pathSegment: "dirsuffix/../../etc/attack", suffix: ".json", want: "/dir/etc/attack.json"}, + {prefix: "/dir", pathSegment: "dirsuffix/../../etc/attack", suffix: ".json", want: "/dir/etc/attack.json"}, + } + + for _, tc := range tests { + t.Run(fmt.Sprintf("%s + %s + %s", tc.prefix, tc.pathSegment, tc.suffix), func(t *testing.T) { + e := &groupingFileExporter{ + pathPrefix: cleanPathPrefix(tc.prefix), + pathSuffix: tc.suffix, + } + + assert.Equal(t, tc.want, e.fullPath(tc.pathSegment)) + }) + } +} + +func BenchmarkExporters(b *testing.B) { + tests := []struct { + name string + conf *Config + }{ + { + name: "default", + conf: &Config{ + Path: tempFileName(b), + FormatType: formatTypeJSON, + }, + }, + { + name: "grouping, 100 writers", + conf: &Config{ + Path: b.TempDir() + "/*", + FormatType: formatTypeJSON, + GroupBy: &GroupBy{ + Enabled: true, + MaxOpenFiles: 100, + }, + }, + }, + { + name: "grouping, 99 writers", + conf: &Config{ + Path: b.TempDir() + "/*", + FormatType: formatTypeJSON, + GroupBy: &GroupBy{ + Enabled: true, + MaxOpenFiles: 99, + }, + }, + }, + { + name: "grouping, 1 writer", + conf: &Config{ + Path: b.TempDir() + "/*", + FormatType: formatTypeJSON, + GroupBy: &GroupBy{ + Enabled: true, + MaxOpenFiles: 1, + }, + }, + }, + } + + var traces []ptrace.Traces + var logs []plog.Logs + for i := 0; i < 100; i++ { + td := testdata.GenerateTracesTwoSpansSameResource() + td.ResourceSpans().At(0).Resource().Attributes().PutStr("fileexporter.path_segment", fmt.Sprintf("file%d", i)) + traces = append(traces, td) + + ld := testdata.GenerateLogsTwoLogRecordsSameResource() + ld.ResourceLogs().At(0).Resource().Attributes().PutStr("fileexporter.path_segment", fmt.Sprintf("file%d", i)) + logs = append(logs, ld) + } + for _, tc := range tests { + fe := newFileExporter(tc.conf, zap.NewNop()) + + // remove marshaling time from the benchmark + tm := &testMarshaller{content: bytes.Repeat([]byte{'a'}, 512)} + marshaller := &marshaller{ + tracesMarshaler: tm, + metricsMarshaler: tm, + logsMarshaler: tm, + compression: "", + compressor: noneCompress, + formatType: "test", + } + switch fExp := fe.(type) { + case *fileExporter: + fExp.marshaller = marshaller + case *groupingFileExporter: + fExp.marshaller = marshaller + } + + require.NoError(b, fe.Start(context.Background(), componenttest.NewNopHost())) + + b.Run(tc.name, func(b *testing.B) { + b.ReportAllocs() + b.ResetTimer() + + ctx := context.Background() + for i := 0; i < b.N; i++ { + require.NoError(b, fe.consumeTraces(ctx, traces[i%len(traces)])) + require.NoError(b, fe.consumeLogs(ctx, logs[i%len(logs)])) + } + }) + + assert.NoError(b, fe.Shutdown(context.Background())) + } +} diff --git a/exporter/fileexporter/internal/metadata/generated_status.go b/exporter/fileexporter/internal/metadata/generated_status.go index 3ca3f1406dd1..aa9a33eaeb7a 100644 --- a/exporter/fileexporter/internal/metadata/generated_status.go +++ b/exporter/fileexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("file") ) const ( - Type = "file" TracesStability = component.StabilityLevelAlpha MetricsStability = component.StabilityLevelAlpha LogsStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/file") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/file") +} diff --git a/exporter/fileexporter/marshaller.go b/exporter/fileexporter/marshaller.go new file mode 100644 index 000000000000..e3452b93ee64 --- /dev/null +++ b/exporter/fileexporter/marshaller.go @@ -0,0 +1,103 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package fileexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter" + +import ( + "errors" + "fmt" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +// Marshaler configuration used for marhsaling Protobuf +var tracesMarshalers = map[string]ptrace.Marshaler{ + formatTypeJSON: &ptrace.JSONMarshaler{}, + formatTypeProto: &ptrace.ProtoMarshaler{}, +} +var metricsMarshalers = map[string]pmetric.Marshaler{ + formatTypeJSON: &pmetric.JSONMarshaler{}, + formatTypeProto: &pmetric.ProtoMarshaler{}, +} +var logsMarshalers = map[string]plog.Marshaler{ + formatTypeJSON: &plog.JSONMarshaler{}, + formatTypeProto: &plog.ProtoMarshaler{}, +} + +type marshaller struct { + tracesMarshaler ptrace.Marshaler + metricsMarshaler pmetric.Marshaler + logsMarshaler plog.Marshaler + + compression string + compressor compressFunc + + formatType string +} + +func newMarshaller(conf *Config, host component.Host) (*marshaller, error) { + if conf.Encoding != nil { + encoding := host.GetExtensions()[*conf.Encoding] + if encoding == nil { + return nil, fmt.Errorf("unknown encoding %q", conf.Encoding) + } + // cast with ok to avoid panics. + tm, _ := encoding.(ptrace.Marshaler) + pm, _ := encoding.(pmetric.Marshaler) + lm, _ := encoding.(plog.Marshaler) + return &marshaller{ + tracesMarshaler: tm, + metricsMarshaler: pm, + logsMarshaler: lm, + compression: conf.Compression, + compressor: buildCompressor(conf.Compression), + }, nil + } + return &marshaller{ + formatType: conf.FormatType, + tracesMarshaler: tracesMarshalers[conf.FormatType], + metricsMarshaler: metricsMarshalers[conf.FormatType], + logsMarshaler: logsMarshalers[conf.FormatType], + compression: conf.Compression, + compressor: buildCompressor(conf.Compression), + }, nil +} + +func (m *marshaller) marshalTraces(td ptrace.Traces) ([]byte, error) { + if m.tracesMarshaler == nil { + return nil, errors.New("traces are not supported by encoding") + } + buf, err := m.tracesMarshaler.MarshalTraces(td) + if err != nil { + return nil, err + } + buf = m.compressor(buf) + return buf, nil +} + +func (m *marshaller) marshalMetrics(md pmetric.Metrics) ([]byte, error) { + if m.metricsMarshaler == nil { + return nil, errors.New("metrics are not supported by encoding") + } + buf, err := m.metricsMarshaler.MarshalMetrics(md) + if err != nil { + return nil, err + } + buf = m.compressor(buf) + return buf, nil +} + +func (m *marshaller) marshalLogs(ld plog.Logs) ([]byte, error) { + if m.logsMarshaler == nil { + return nil, errors.New("logs are not supported by encoding") + } + buf, err := m.logsMarshaler.MarshalLogs(ld) + if err != nil { + return nil, err + } + buf = m.compressor(buf) + return buf, nil +} diff --git a/exporter/fileexporter/metadata.yaml b/exporter/fileexporter/metadata.yaml index 7610d9a67c61..fd61213f8bed 100644 --- a/exporter/fileexporter/metadata.yaml +++ b/exporter/fileexporter/metadata.yaml @@ -1,9 +1,15 @@ type: file +scope_name: otelcol/file status: class: exporter stability: alpha: [traces, metrics, logs] - distributions: [core, contrib, observiq, splunk, sumo, aws] + distributions: [core, contrib] codeowners: active: [atingchen] + +tests: + config: + path: testdata/log.json + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/fileexporter/package_test.go b/exporter/fileexporter/package_test.go new file mode 100644 index 000000000000..dbd651260316 --- /dev/null +++ b/exporter/fileexporter/package_test.go @@ -0,0 +1,16 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package fileexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +// The IgnoreTopFunction call prevents catching the leak generated by the natefinch/lumberjack package. +// Existing issue for leak: https://github.com/natefinch/lumberjack/issues/56 +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("gopkg.in/natefinch/lumberjack%2ev2.(*Logger).millRun")) +} diff --git a/exporter/fileexporter/testdata/.gitignore b/exporter/fileexporter/testdata/.gitignore new file mode 100644 index 000000000000..71aba6f8f5a7 --- /dev/null +++ b/exporter/fileexporter/testdata/.gitignore @@ -0,0 +1,2 @@ +# File generated by lifecycle tests +log.json \ No newline at end of file diff --git a/exporter/fileexporter/testdata/config.yaml b/exporter/fileexporter/testdata/config.yaml index cac55b48ae83..fd7b6445ad4f 100644 --- a/exporter/fileexporter/testdata/config.yaml +++ b/exporter/fileexporter/testdata/config.yaml @@ -55,3 +55,31 @@ file/flush_interval_500ms: file/flush_interval_negative_value: path: ./flushed flush_interval: "-1s" + +file/group_by: + path: ./group_by/*.json + group_by: + enabled: true + resource_attribute: dummy + max_open_files: 10 + +file/group_by_defaults: + path: ./group_by/*.json + group_by: + enabled: true + +file/group_by_invalid_path: + path: ./group_by_no_star + group_by: + enabled: true + +file/group_by_invalid_path2: + path: '*/./group_by' + group_by: + enabled: true + +file/group_by_empty_resource_attribute: + path: ./group_by/*.json + group_by: + enabled: true + resource_attribute: "" diff --git a/exporter/googlecloudexporter/README.md b/exporter/googlecloudexporter/README.md index ae7aeba91406..78c7b96d9900 100644 --- a/exporter/googlecloudexporter/README.md +++ b/exporter/googlecloudexporter/README.md @@ -4,13 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces, metrics, logs | -| Distributions | [contrib], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fgooglecloud%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fgooglecloud) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fgooglecloud%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fgooglecloud) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@aabmass](https://www.github.com/aabmass), [@dashpole](https://www.github.com/dashpole), [@jsuereth](https://www.github.com/jsuereth), [@punya](https://www.github.com/punya), [@damemi](https://www.github.com/damemi), [@psx95](https://www.github.com/psx95) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector This exporter can be used to send metrics to [Google Cloud Monitoring](https://cloud.google.com/monitoring) @@ -56,9 +55,9 @@ When running the Collector in a Docker container, a credentials file can be pass ``` docker run \ - --volume ~/service-account-key.json:/etc/otel/key.json \ - --volume $(pwd)/config.yaml:/etc/otel/config.yaml \ - --env GOOGLE_APPLICATION_CREDENTIALS=/etc/otel/key.json \ + --volume ~/service-account-key.json:/etc/otelcol-contrib/key.json \ + --volume $(pwd)/config.yaml:/etc/otelcol-contrib/config.yaml \ + --env GOOGLE_APPLICATION_CREDENTIALS=/etc/otelcol-contrib/key.json \ --expose 4317 \ --expose 55681 \ --rm \ @@ -199,7 +198,6 @@ The following configuration options are supported: errors (`UNAVAILABLE` or `DEADLINE_EXCEEDED`). - `trace` (optional): Configuration for sending traces to Cloud Trace. - `endpoint` (default = cloudtrace.googleapis.com): Endpoint where trace data is going to be sent to. - - `compression` (optional): Compression format for Metrics gRPC requests. Supported values: [`gzip`]. Defaults to no compression. - `grpc_pool_size` (optional): Sets the size of the connection pool in the GCP client. Defaults to a single connection. - `use_insecure` (default = false): If true, disables gRPC client transport security. Only has effect if Endpoint is not "". - `attribute_mappings` (optional): AttributeMappings determines how to map from OpenTelemetry attribute keys to Google Cloud Trace keys. By default, it changes http and service keys so that they appear more prominently in the UI. @@ -236,6 +234,34 @@ following proxy environment variables: If set at Collector start time then exporters, regardless of protocol, will or will not proxy traffic as defined by these environment variables. +### Monitored Resources + +For metrics and logs, this exporter maps the OpenTelemetry Resource to a Google +Cloud [Logging](https://cloud.google.com/logging/docs/api/v2/resource-list) or +[Monitoring](https://cloud.google.com/monitoring/api/resources) Monitored Resource. + +The complete mapping logic can be found [here](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/blob/main/internal/resourcemapping/resourcemapping.go). +That may be the most helpful reference if you want to map to a specific monitored +resource. + +#### On GCP + +If running on GCP, using the GCP resource detector, as shown above, will populate +the resource attributes required to map to the appropriate monitored resource. + +#### Off GCP + +If you are not running on GCP, you still need to choose a [GCP zone or +region](https://cloud.google.com/compute/docs/regions-zones) to send telemetry to +by setting `cloud.availability_zone` or `cloud.region`. In addition, you should use the detector associated with other cloud providers, if applicable. + +If running on Kubernetes, it is recommended to additionally set `k8s.pod.name`, +`k8s.namespace.name`, and `k8s.container.name` using the `k8sattributes` processor. + +If you are getting "duplicate timeseries encountered" errors, it is likely because +you are missing a required resource attribute, causing a metric from two different +instances of an application to end up with the same monitored resource. + ### Preventing metric label collisions The metrics exporter can add metric labels to timeseries, such as when setting @@ -275,6 +301,9 @@ processors: - delete_key(attributes, "instrumentation_version") ``` +**Note** It is not recommended to use these transformations with the googlecloud +exporter in a logging or trace pipeline. + The same method can be used for any resource attributes being filtered to metric labels, or metric labels which might collide with the GCP monitored resource used with resource detection. diff --git a/exporter/googlecloudexporter/factory.go b/exporter/googlecloudexporter/factory.go index 1ca70a165504..25f681a3bad2 100644 --- a/exporter/googlecloudexporter/factory.go +++ b/exporter/googlecloudexporter/factory.go @@ -64,6 +64,7 @@ func createLogsExporter( params, cfg, logsExporter.PushLogs, + exporterhelper.WithStart(logsExporter.Start), exporterhelper.WithShutdown(logsExporter.Shutdown), // Disable exporterhelper Timeout, since we are using a custom mechanism // within exporter itself @@ -86,6 +87,7 @@ func createTracesExporter( params, cfg, tExp.PushTraces, + exporterhelper.WithStart(tExp.Start), exporterhelper.WithShutdown(tExp.Shutdown), // Disable exporterhelper Timeout, since we are using a custom mechanism // within exporter itself @@ -108,6 +110,7 @@ func createMetricsExporter( params, cfg, mExp.PushMetrics, + exporterhelper.WithStart(mExp.Start), exporterhelper.WithShutdown(mExp.Shutdown), // Disable exporterhelper Timeout, since we are using a custom mechanism // within exporter itself diff --git a/exporter/googlecloudexporter/generated_component_test.go b/exporter/googlecloudexporter/generated_component_test.go new file mode 100644 index 000000000000..f7c2631c048f --- /dev/null +++ b/exporter/googlecloudexporter/generated_component_test.go @@ -0,0 +1,101 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package googlecloudexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/googlecloudexporter/go.mod b/exporter/googlecloudexporter/go.mod index 296eaac7052f..5aba81167f2e 100644 --- a/exporter/googlecloudexporter/go.mod +++ b/exporter/googlecloudexporter/go.mod @@ -1,82 +1,96 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter -go 1.20 +go 1.21 require ( - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.44.1-0.20231113185509-337c81d87781 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/featuregate v1.5.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 ) require ( - cloud.google.com/go v0.110.10 // indirect - cloud.google.com/go/compute v1.23.1 // indirect + cloud.google.com/go v0.112.0 // indirect + cloud.google.com/go/compute v1.23.3 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/logging v1.8.1 // indirect - cloud.google.com/go/longrunning v0.5.2 // indirect - cloud.google.com/go/monitoring v1.16.1 // indirect - cloud.google.com/go/trace v1.10.2 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.20.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.44.0 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + cloud.google.com/go/logging v1.9.0 // indirect + cloud.google.com/go/longrunning v0.5.4 // indirect + cloud.google.com/go/monitoring v1.17.0 // indirect + cloud.google.com/go/trace v1.10.4 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/s2a-go v0.1.7 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/go-version v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/tidwall/gjson v1.10.2 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/tinylru v1.1.0 // indirect github.com/tidwall/wal v1.1.7 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.3.0 // indirect - google.golang.org/api v0.150.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/time v0.5.0 // indirect + google.golang.org/api v0.155.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/googlecloudexporter/go.sum b/exporter/googlecloudexporter/go.sum index 7261afc871cb..f36b1bf3edec 100644 --- a/exporter/googlecloudexporter/go.sum +++ b/exporter/googlecloudexporter/go.sum @@ -1,34 +1,38 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= -cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= -cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0= -cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= +cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= +cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/logging v1.8.1 h1:26skQWPeYhvIasWKm48+Eq7oUqdcdbwsCVwz5Ys0FvU= -cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= -cloud.google.com/go/longrunning v0.5.2 h1:u+oFqfEwwU7F9dIELigxbe0XVnBAo9wqMuQLA50CZ5k= -cloud.google.com/go/longrunning v0.5.2/go.mod h1:nqo6DQbNV2pXhGDbDMoN2bWz68MjZUzqv2YttZiveCs= -cloud.google.com/go/monitoring v1.16.1 h1:CTklIuUkS5nCricGojPwdkSgPsCTX2HmYTxFDg+UvpU= -cloud.google.com/go/monitoring v1.16.1/go.mod h1:6HsxddR+3y9j+o/cMJH6q/KJ/CBTvM/38L/1m7bTRJ4= -cloud.google.com/go/trace v1.10.2 h1:80Rh4JSqJLfe/xGNrpyO4MQxiFDXcHG1XrsevfmrIRQ= -cloud.google.com/go/trace v1.10.2/go.mod h1:NPXemMi6MToRFcSxRl2uDnu/qAlAQ3oULUphcHGh1vA= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= +cloud.google.com/go/logging v1.9.0 h1:iEIOXFO9EmSiTjDmfpbRjOxECO7R8C7b8IXUGOj7xZw= +cloud.google.com/go/logging v1.9.0/go.mod h1:1Io0vnZv4onoUnsVUQY3HZ3Igb1nBchky0A0y7BBBhE= +cloud.google.com/go/longrunning v0.5.4 h1:w8xEcbZodnA2BbW6sVirkkoC+1gP8wS57EUUgGS0GVg= +cloud.google.com/go/longrunning v0.5.4/go.mod h1:zqNVncI0BOP8ST6XQD1+VcvuShMmq7+xFSzOL++V0dI= +cloud.google.com/go/monitoring v1.17.0 h1:blrdvF0MkPPivSO041ihul7rFMhXdVp8Uq7F59DKXTU= +cloud.google.com/go/monitoring v1.17.0/go.mod h1:KwSsX5+8PnXv5NJnICZzW2R8pWTis8ypC4zmdRD63Tw= +cloud.google.com/go/trace v1.10.4 h1:2qOAuAzNezwW3QN+t41BtkDJOG42HywL73q8x/f6fnM= +cloud.google.com/go/trace v1.10.4/go.mod h1:Nso99EDIK8Mj5/zmB+iGr9dosS/bzWCJ8wGmE6TXNWY= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.44.1-0.20231113185509-337c81d87781 h1:tI/JgbDUBFpVCgawBboIxIV4OCcXsXSQDx5IvA7rsag= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.44.1-0.20231113185509-337c81d87781/go.mod h1:Y8A+tRfM4DfIY2ODAyzSrxHmaxL3wWERfLy6PAthDpI= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.20.0 h1:uY/4lpbbFG73TgzmJoB7XMyFIheII95hlfH62uC+oS0= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.20.0/go.mod h1:qaUEgkhkSlCNIu9/XD4y19vnbwKskfz2ep6Utf2A57c= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.44.0 h1:ew7SfeajMJ3I4iXA1LERYY62fGCKO4TjVPw5QTPt47k= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.44.0 h1:GjWPDY9PUlNWwTI95L/lktUp35BLtzBoBElH314eafM= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.44.0/go.mod h1:qkFPtMouQjW5ugdHIOthiTbweVHUTqbS0Qsu55KqXks= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0 h1:7jymiL7lvmjgG8hMfvZ6qqA39VuiGEmCmFLd0N0tMKY= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0/go.mod h1:w3gKj9vyvd9n8jh2jpOMVLGy87QqB/AxDek2CoRwpt0= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0 h1:xl4IRfBXPZxwu7dIza8n6wdX5zEJpi0boF5dX22MbYE= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0/go.mod h1:P69hhmQh4zwnU5iEdGVowFWg1DiP9x2KsCYBOIaP4us= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.46.0 h1:vaXjFX09ygxNxAiHwByzPBVKltYFVZR8HN4U3TR4vn8= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.46.0/go.mod h1:V28hx+cUCZC9e3qcqszMb+Sbt8cQZtHTiXOmyDzoDOg= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0 h1:xlfPHZ5QFvHad9KmrVDoaPpJUT/XluwNDMNHn+k7z/s= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0/go.mod h1:mzI44HpPp75Z8/a1sJP1asdHdu7Wui7t10SZ9EEPPnM= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= 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= @@ -36,15 +40,19 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF 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.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -53,7 +61,6 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l 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.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.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= @@ -63,6 +70,7 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq 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.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 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/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -73,11 +81,13 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ 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.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/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= @@ -92,15 +102,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -110,13 +119,17 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= 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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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= @@ -124,8 +137,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/gjson v1.10.2 h1:APbLGOM0rrEkd8WBw9C24nllro4ajFuJu0Sc9hRz8Bo= github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= @@ -138,93 +151,116 @@ github.com/tidwall/wal v1.1.7 h1:emc1TRjIVsdKKSnpwGBAcsAGg0767SvUk8+ygx7Bb+4= github.com/tidwall/wal v1.1.7/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= 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= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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/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-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= 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/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +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-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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= 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/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= @@ -233,32 +269,33 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn 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/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.150.0 h1:Z9k22qD289SZ8gCJrk4DrWXkNjtfvKAUo/l1ma8eBYE= -google.golang.org/api v0.150.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= +google.golang.org/api v0.155.0 h1:vBmGhCYs0djJttDNynWo44zosHlPvHmA0XiN2zP2DtA= +google.golang.org/api v0.155.0/go.mod h1:GI5qK5f40kCpHfPn6+YzGAByIKWv8ujFnmoWm7Igduk= 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.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= 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-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= -google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= 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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -270,11 +307,11 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/googlecloudexporter/internal/metadata/generated_status.go b/exporter/googlecloudexporter/internal/metadata/generated_status.go index b4520b594593..846a6056ec42 100644 --- a/exporter/googlecloudexporter/internal/metadata/generated_status.go +++ b/exporter/googlecloudexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("googlecloud") ) const ( - Type = "googlecloud" TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/googlecloud") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/googlecloud") +} diff --git a/exporter/googlecloudexporter/metadata.yaml b/exporter/googlecloudexporter/metadata.yaml index 5b551dc0f188..f3c607924728 100644 --- a/exporter/googlecloudexporter/metadata.yaml +++ b/exporter/googlecloudexporter/metadata.yaml @@ -1,9 +1,13 @@ type: googlecloud +scope_name: otelcol/googlecloud status: class: exporter stability: beta: [traces, metrics, logs] - distributions: [contrib, observiq] + distributions: [contrib] codeowners: active: [aabmass, dashpole, jsuereth, punya, damemi, psx95] + +tests: + skip_lifecycle: true diff --git a/exporter/googlecloudexporter/package_test.go b/exporter/googlecloudexporter/package_test.go new file mode 100644 index 000000000000..78016f9340ae --- /dev/null +++ b/exporter/googlecloudexporter/package_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package googlecloudexporter + +import ( + "testing" + + "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")) +} diff --git a/exporter/googlecloudpubsubexporter/README.md b/exporter/googlecloudpubsubexporter/README.md index 9b061451029b..ef247ff7962e 100644 --- a/exporter/googlecloudpubsubexporter/README.md +++ b/exporter/googlecloudpubsubexporter/README.md @@ -4,13 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces, metrics, logs | -| Distributions | [contrib], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fgooglecloudpubsub%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fgooglecloudpubsub) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fgooglecloudpubsub%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fgooglecloudpubsub) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@alexvanboxel](https://www.github.com/alexvanboxel) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector > ⚠️ This is a community-provided module. It has been developed and extensively tested at Collibra, but it is not officially supported by GCP. @@ -28,6 +27,11 @@ The following configuration options are supported: the smallest timestamp of all the messages. * `allow_drift` (Optional): The maximum difference the `ce-time` attribute can be set from the system clock. When the drift is set to 0, the maximum drift from the clock is allowed (only applicable to `earliest`). +* `endpoint` (Optional): Override the default Pubsub Endpoint, useful when connecting to the PubSub emulator instance + or switching between [global and regional service endpoints](https://cloud.google.com/pubsub/docs/reference/service_apis_overview#service_endpoints). +* `insecure` (Optional): allows performing “insecure” SSL connections and transfers, useful when connecting to a local + emulator instance. Only has effect if Endpoint is not "" + ```yaml exporters: googlecloudpubsub: diff --git a/exporter/googlecloudpubsubexporter/config.go b/exporter/googlecloudpubsubexporter/config.go index a87ee88872cd..4b2979a7d9b1 100644 --- a/exporter/googlecloudpubsubexporter/config.go +++ b/exporter/googlecloudpubsubexporter/config.go @@ -8,6 +8,7 @@ import ( "regexp" "time" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -17,15 +18,15 @@ type Config struct { // Timeout for all API calls. If not set, defaults to 12 seconds. exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // Google Cloud Project ID where the Pubsub client will connect to ProjectID string `mapstructure:"project"` // User agent that will be used by the Pubsub client to connect to the service UserAgent string `mapstructure:"user_agent"` - // Override of the Pubsub endpoint, for testing only - endpoint string + // Override of the Pubsub Endpoint, leave empty for the default endpoint + Endpoint string `mapstructure:"endpoint"` // Only has effect if Endpoint is not "" - insecure bool + Insecure bool `mapstructure:"insecure"` // The fully qualified resource name of the Pubsub topic Topic string `mapstructure:"topic"` diff --git a/exporter/googlecloudpubsubexporter/exporter.go b/exporter/googlecloudpubsubexporter/exporter.go index 357b915111bc..7a93980d22dc 100644 --- a/exporter/googlecloudpubsubexporter/exporter.go +++ b/exporter/googlecloudpubsubexporter/exporter.go @@ -94,16 +94,16 @@ func (ex *pubsubExporter) generateClientOptions() (copts []option.ClientOption) if ex.userAgent != "" { copts = append(copts, option.WithUserAgent(ex.userAgent)) } - if ex.config.endpoint != "" { - if ex.config.insecure { + if ex.config.Endpoint != "" { + if ex.config.Insecure { var dialOpts []grpc.DialOption if ex.userAgent != "" { dialOpts = append(dialOpts, grpc.WithUserAgent(ex.userAgent)) } - conn, _ := grpc.Dial(ex.config.endpoint, append(dialOpts, grpc.WithTransportCredentials(insecure.NewCredentials()))...) + conn, _ := grpc.Dial(ex.config.Endpoint, append(dialOpts, grpc.WithTransportCredentials(insecure.NewCredentials()))...) copts = append(copts, option.WithGRPCConn(conn)) } else { - copts = append(copts, option.WithEndpoint(ex.config.endpoint)) + copts = append(copts, option.WithEndpoint(ex.config.Endpoint)) } } return copts diff --git a/exporter/googlecloudpubsubexporter/exporter_test.go b/exporter/googlecloudpubsubexporter/exporter_test.go index a698f8aeb057..099af678bcfd 100644 --- a/exporter/googlecloudpubsubexporter/exporter_test.go +++ b/exporter/googlecloudpubsubexporter/exporter_test.go @@ -31,9 +31,9 @@ func TestGenerateClientOptions(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() exporterConfig := cfg.(*Config) - exporterConfig.endpoint = srv.Addr + exporterConfig.Endpoint = srv.Addr exporterConfig.UserAgent = "test-user-agent" - exporterConfig.insecure = true + exporterConfig.Insecure = true exporterConfig.ProjectID = "my-project" exporterConfig.Topic = "projects/my-project/topics/otlp" exporterConfig.TimeoutSettings = exporterhelper.TimeoutSettings{ @@ -44,7 +44,7 @@ func TestGenerateClientOptions(t *testing.T) { options := exporter.generateClientOptions() assert.Equal(t, option.WithUserAgent("test-user-agent"), options[0]) - exporter.config.insecure = false + exporter.config.Insecure = false options = exporter.generateClientOptions() assert.Equal(t, option.WithUserAgent("test-user-agent"), options[0]) assert.Equal(t, option.WithEndpoint(srv.Addr), options[1]) @@ -63,8 +63,8 @@ func TestExporterDefaultSettings(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() exporterConfig := cfg.(*Config) - exporterConfig.endpoint = srv.Addr - exporterConfig.insecure = true + exporterConfig.Endpoint = srv.Addr + exporterConfig.Insecure = true exporterConfig.ProjectID = "my-project" exporterConfig.Topic = "projects/my-project/topics/otlp" exporterConfig.TimeoutSettings = exporterhelper.TimeoutSettings{ @@ -91,9 +91,9 @@ func TestExporterCompression(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() exporterConfig := cfg.(*Config) - exporterConfig.endpoint = srv.Addr + exporterConfig.Endpoint = srv.Addr exporterConfig.UserAgent = "test-user-agent" - exporterConfig.insecure = true + exporterConfig.Insecure = true exporterConfig.ProjectID = "my-project" exporterConfig.Topic = "projects/my-project/topics/otlp" exporterConfig.TimeoutSettings = exporterhelper.TimeoutSettings{ diff --git a/exporter/googlecloudpubsubexporter/factory.go b/exporter/googlecloudpubsubexporter/factory.go index 1cd69e70cd10..147bb8cf7207 100644 --- a/exporter/googlecloudpubsubexporter/factory.go +++ b/exporter/googlecloudpubsubexporter/factory.go @@ -96,7 +96,7 @@ func createTracesExporter( pubsubExporter.consumeTraces, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), exporterhelper.WithTimeout(pCfg.TimeoutSettings), - exporterhelper.WithRetry(pCfg.RetrySettings), + exporterhelper.WithRetry(pCfg.BackOffConfig), exporterhelper.WithQueue(pCfg.QueueSettings), exporterhelper.WithStart(pubsubExporter.start), exporterhelper.WithShutdown(pubsubExporter.shutdown), @@ -117,7 +117,7 @@ func createMetricsExporter( pubsubExporter.consumeMetrics, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), exporterhelper.WithTimeout(pCfg.TimeoutSettings), - exporterhelper.WithRetry(pCfg.RetrySettings), + exporterhelper.WithRetry(pCfg.BackOffConfig), exporterhelper.WithQueue(pCfg.QueueSettings), exporterhelper.WithStart(pubsubExporter.start), exporterhelper.WithShutdown(pubsubExporter.shutdown), @@ -139,7 +139,7 @@ func createLogsExporter( pubsubExporter.consumeLogs, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), exporterhelper.WithTimeout(pCfg.TimeoutSettings), - exporterhelper.WithRetry(pCfg.RetrySettings), + exporterhelper.WithRetry(pCfg.BackOffConfig), exporterhelper.WithQueue(pCfg.QueueSettings), exporterhelper.WithStart(pubsubExporter.start), exporterhelper.WithShutdown(pubsubExporter.shutdown), diff --git a/exporter/googlecloudpubsubexporter/factory_test.go b/exporter/googlecloudpubsubexporter/factory_test.go index a5c4cdeda2ab..399e17291606 100644 --- a/exporter/googlecloudpubsubexporter/factory_test.go +++ b/exporter/googlecloudpubsubexporter/factory_test.go @@ -8,7 +8,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/exporter/exportertest" @@ -24,14 +23,14 @@ func TestCreateDefaultConfig(t *testing.T) { func TestType(t *testing.T) { factory := NewFactory() - assert.Equal(t, component.Type(metadata.Type), factory.Type()) + assert.Equal(t, metadata.Type, factory.Type()) } func TestCreateTracesExporter(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() eCfg := cfg.(*Config) - eCfg.endpoint = "http://testing.invalid" + eCfg.Endpoint = "http://testing.invalid" te, err := factory.CreateTracesExporter( context.Background(), @@ -46,7 +45,7 @@ func TestCreateMetricsExporter(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() eCfg := cfg.(*Config) - eCfg.endpoint = "http://testing.invalid" + eCfg.Endpoint = "http://testing.invalid" me, err := factory.CreateMetricsExporter( context.Background(), @@ -61,7 +60,7 @@ func TestLogsCreateExporter(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() eCfg := cfg.(*Config) - eCfg.endpoint = "http://testing.invalid" + eCfg.Endpoint = "http://testing.invalid" me, err := factory.CreateLogsExporter( context.Background(), @@ -76,7 +75,7 @@ func TestEnsureExporter(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() eCfg := cfg.(*Config) - eCfg.endpoint = "http://testing.invalid" + eCfg.Endpoint = "http://testing.invalid" exporter1 := ensureExporter(exportertest.NewNopCreateSettings(), eCfg) exporter2 := ensureExporter(exportertest.NewNopCreateSettings(), eCfg) diff --git a/exporter/googlecloudpubsubexporter/generated_component_test.go b/exporter/googlecloudpubsubexporter/generated_component_test.go new file mode 100644 index 000000000000..bbe9f0c7a3be --- /dev/null +++ b/exporter/googlecloudpubsubexporter/generated_component_test.go @@ -0,0 +1,101 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package googlecloudpubsubexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/googlecloudpubsubexporter/go.mod b/exporter/googlecloudpubsubexporter/go.mod index 053357e28c90..0629dfbbbb57 100644 --- a/exporter/googlecloudpubsubexporter/go.mod +++ b/exporter/googlecloudpubsubexporter/go.mod @@ -1,68 +1,82 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter -go 1.20 +go 1.21 require ( - cloud.google.com/go/pubsub v1.33.0 - github.com/google/uuid v1.4.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 - google.golang.org/api v0.150.0 - google.golang.org/grpc v1.59.0 + cloud.google.com/go/pubsub v1.37.0 + github.com/google/uuid v1.6.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/zap v1.27.0 + google.golang.org/api v0.172.0 + google.golang.org/grpc v1.63.2 ) require ( - cloud.google.com/go v0.110.10 // indirect - cloud.google.com/go/compute v1.23.1 // indirect + cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.3 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.einride.tech/aip v0.66.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.3.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/time v0.5.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/googlecloudpubsubexporter/go.sum b/exporter/googlecloudpubsubexporter/go.sum index 7647e7db8a19..a51cfe25b1af 100644 --- a/exporter/googlecloudpubsubexporter/go.sum +++ b/exporter/googlecloudpubsubexporter/go.sum @@ -1,21 +1,22 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= -cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= -cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0= -cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/iam v1.1.3 h1:18tKG7DzydKWUnLjonWcJO6wjSCAtzh4GcRKlH/Hrzc= -cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= -cloud.google.com/go/pubsub v1.33.0 h1:6SPCPvWav64tj0sVX/+npCBKhUi/UjJehy9op/V3p2g= -cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= +cloud.google.com/go/pubsub v1.37.0 h1:0uEEfaB1VIJzabPpwpZf44zWAKAme3zwKKxHk7vJQxQ= +cloud.google.com/go/pubsub v1.37.0/go.mod h1:YQOQr1uiUM092EXwKs56OPT650nwnawc+8/IjoUeGzQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -25,10 +26,15 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF 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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -37,7 +43,6 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l 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.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.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= @@ -47,8 +52,9 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq 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/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 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= @@ -62,14 +68,12 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -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/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= 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= @@ -78,15 +82,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -96,13 +99,17 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= 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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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= @@ -110,92 +117,116 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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= +go.einride.tech/aip v0.66.0 h1:XfV+NQX6L7EOYK11yoHHFtndeaWh3KbD9/cN/6iWEt8= +go.einride.tech/aip v0.66.0/go.mod h1:qAhMsfT7plxBX+Oy7Huol6YUvZ0ZzdUz26yZsQwfl1M= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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/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-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= 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/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +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-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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= 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/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= @@ -204,32 +235,33 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn 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/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.150.0 h1:Z9k22qD289SZ8gCJrk4DrWXkNjtfvKAUo/l1ma8eBYE= -google.golang.org/api v0.150.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= +google.golang.org/api v0.172.0 h1:/1OcMZGPmW1rX2LCu2CmGUD1KXK1+pfzxotxyRUCCdk= +google.golang.org/api v0.172.0/go.mod h1:+fJZq6QXWfa9pXhnIzsjx4yI22d4aI9ZpLb58gvXjis= 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.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= 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-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= -google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 h1:rIo7ocm2roD9DcFIX67Ym8icoGCKSARAiPljFhh5suQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= 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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -241,13 +273,15 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= 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/exporter/googlecloudpubsubexporter/internal/metadata/generated_status.go b/exporter/googlecloudpubsubexporter/internal/metadata/generated_status.go index 48d4414d0182..952059865005 100644 --- a/exporter/googlecloudpubsubexporter/internal/metadata/generated_status.go +++ b/exporter/googlecloudpubsubexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("googlecloudpubsub") ) const ( - Type = "googlecloudpubsub" TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/googlecloudpubsub") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/googlecloudpubsub") +} diff --git a/exporter/googlecloudpubsubexporter/metadata.yaml b/exporter/googlecloudpubsubexporter/metadata.yaml index f38f9ae8a2ad..1768c6ec6d57 100644 --- a/exporter/googlecloudpubsubexporter/metadata.yaml +++ b/exporter/googlecloudpubsubexporter/metadata.yaml @@ -1,9 +1,14 @@ type: googlecloudpubsub +scope_name: otelcol/googlecloudpubsub status: class: exporter stability: beta: [traces, metrics, logs] - distributions: [contrib, observiq] + distributions: [contrib] codeowners: active: [alexvanboxel] + +# TODO: Update the exporter to pass the tests +tests: + skip_lifecycle: true diff --git a/exporter/googlemanagedprometheusexporter/README.md b/exporter/googlemanagedprometheusexporter/README.md index 40f2b5d70458..44d33445853b 100644 --- a/exporter/googlemanagedprometheusexporter/README.md +++ b/exporter/googlemanagedprometheusexporter/README.md @@ -4,13 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: metrics | -| Distributions | [contrib], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fgooglemanagedprometheus%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fgooglemanagedprometheus) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fgooglemanagedprometheus%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fgooglemanagedprometheus) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@aabmass](https://www.github.com/aabmass), [@dashpole](https://www.github.com/dashpole), [@jsuereth](https://www.github.com/jsuereth), [@punya](https://www.github.com/punya), [@damemi](https://www.github.com/damemi), [@psx95](https://www.github.com/psx95) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector This exporter can be used to send metrics (including trace exemplars) to [Google Cloud Managed Service for Prometheus](https://cloud.google.com/stackdriver/docs/managed-prometheus). It is one of [several supported approaches for sending metrics to Google Cloud Managed Service for Prometheus](https://cloud.google.com/stackdriver/docs/managed-prometheus#gmp-data-collection). diff --git a/exporter/googlemanagedprometheusexporter/config_test.go b/exporter/googlemanagedprometheusexporter/config_test.go index deca503ecf01..8e784c25392e 100644 --- a/exporter/googlemanagedprometheusexporter/config_test.go +++ b/exporter/googlemanagedprometheusexporter/config_test.go @@ -20,7 +20,7 @@ import ( func TestLoadConfig(t *testing.T) { factories, err := otelcoltest.NopFactories() - assert.Nil(t, err) + assert.NoError(t, err) factory := NewFactory() factories.Exporters[metadata.Type] = factory diff --git a/exporter/googlemanagedprometheusexporter/factory.go b/exporter/googlemanagedprometheusexporter/factory.go index 27e254c854b9..548e144b2fab 100644 --- a/exporter/googlemanagedprometheusexporter/factory.go +++ b/exporter/googlemanagedprometheusexporter/factory.go @@ -59,6 +59,7 @@ func createMetricsExporter( params, cfg, mExp.PushMetrics, + exporterhelper.WithStart(mExp.Start), exporterhelper.WithShutdown(mExp.Shutdown), // Disable exporterhelper Timeout, since we are using a custom mechanism // within exporter itself diff --git a/exporter/googlemanagedprometheusexporter/generated_component_test.go b/exporter/googlemanagedprometheusexporter/generated_component_test.go new file mode 100644 index 000000000000..3b2347a22313 --- /dev/null +++ b/exporter/googlemanagedprometheusexporter/generated_component_test.go @@ -0,0 +1,87 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package googlemanagedprometheusexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/googlemanagedprometheusexporter/go.mod b/exporter/googlemanagedprometheusexporter/go.mod index 85443368b934..431c38c94093 100644 --- a/exporter/googlemanagedprometheusexporter/go.mod +++ b/exporter/googlemanagedprometheusexporter/go.mod @@ -1,67 +1,68 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter -go 1.20 +go 1.21 require ( - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.45.0 - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.45.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/otelcol v0.89.0 + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0 + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.46.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/otelcol v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 ) require ( - cloud.google.com/go v0.110.10 // indirect - cloud.google.com/go/compute v1.23.2 // indirect + cloud.google.com/go v0.112.0 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/logging v1.8.1 // indirect - cloud.google.com/go/longrunning v0.5.3 // indirect - cloud.google.com/go/monitoring v1.16.2 // indirect - cloud.google.com/go/trace v1.10.3 // indirect - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.21.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.45.0 // indirect + cloud.google.com/go/logging v1.9.0 // indirect + cloud.google.com/go/longrunning v0.5.5 // indirect + cloud.google.com/go/monitoring v1.18.0 // indirect + cloud.google.com/go/trace v1.10.5 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.3.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/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/protobuf v1.5.4 // indirect github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.98.0 // 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.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // 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 @@ -72,55 +73,62 @@ require ( github.com/tidwall/wal v1.1.7 // 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 + github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/connector v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/processor v0.89.0 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/collector/service v0.89.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk v1.20.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 // indirect + go.opentelemetry.io/collector/connector v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/collector/processor v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/collector/service v0.98.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.25.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.3.0 // indirect - gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/api v0.150.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + golang.org/x/time v0.5.0 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/api v0.162.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/googlemanagedprometheusexporter/go.sum b/exporter/googlemanagedprometheusexporter/go.sum index 2864e545a673..47de749901ef 100644 --- a/exporter/googlemanagedprometheusexporter/go.sum +++ b/exporter/googlemanagedprometheusexporter/go.sum @@ -1,85 +1,40 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= -cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.2 h1:nWEMDhgbBkBJjfpVySqU4jgWdc22PLR0o4vEexZHers= -cloud.google.com/go/compute v1.23.2/go.mod h1:JJ0atRC0J/oWYiiVBmsSsrRnh92DhZPG4hFDcR04Rns= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= +cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/logging v1.8.1 h1:26skQWPeYhvIasWKm48+Eq7oUqdcdbwsCVwz5Ys0FvU= -cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= -cloud.google.com/go/longrunning v0.5.3 h1:maKa7O9YTzmVzwdlRKr981U1Ys2auup6rpeMt8y3+RU= -cloud.google.com/go/longrunning v0.5.3/go.mod h1:y/0ga59EYu58J6SHmmQOvekvND2qODbu8ywBBW7EK7Y= -cloud.google.com/go/monitoring v1.16.2 h1:gx7BDZcoRqX5DfuJzw9LdhVjEkqCLmDXScdnrmIy9ik= -cloud.google.com/go/monitoring v1.16.2/go.mod h1:B44KGwi4ZCF8Rk/5n+FWeispDXoKSk9oss2QNlXJBgc= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/trace v1.10.3 h1:yiQ2EdegdiZDPwNPoUqGYAMd0wNValT/NRsC1XGyBJ0= -cloud.google.com/go/trace v1.10.3/go.mod h1:Ke1bgfc73RV3wUFml+uQp7EsDw4dGaETLxB7Iq/r4CY= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +cloud.google.com/go/logging v1.9.0 h1:iEIOXFO9EmSiTjDmfpbRjOxECO7R8C7b8IXUGOj7xZw= +cloud.google.com/go/logging v1.9.0/go.mod h1:1Io0vnZv4onoUnsVUQY3HZ3Igb1nBchky0A0y7BBBhE= +cloud.google.com/go/longrunning v0.5.5 h1:GOE6pZFdSrTb4KAiKnXsJBtlE6mEyaW44oKyMILWnOg= +cloud.google.com/go/longrunning v0.5.5/go.mod h1:WV2LAxD8/rg5Z1cNW6FJ/ZpX4E4VnDnoTk0yawPBB7s= +cloud.google.com/go/monitoring v1.18.0 h1:NfkDLQDG2UR3WYZVQE8kwSbUIEyIqJUPl+aOQdFH1T4= +cloud.google.com/go/monitoring v1.18.0/go.mod h1:c92vVBCeq/OB4Ioyo+NbN2U7tlg5ZH41PZcdvfc+Lcg= +cloud.google.com/go/trace v1.10.5 h1:0pr4lIKJ5XZFYD9GtxXEWr0KkVeigc3wlGpZco0X1oA= +cloud.google.com/go/trace v1.10.5/go.mod h1:9hjCV1nGBCtXbAE4YK7OqJ8pmPYSxPA0I67JwRd5s3M= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.45.0 h1:jYuZ3VSmHtR/OE4ZNlhgaWefopMKh8kxHMITQ7hXB0s= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.45.0/go.mod h1:b8EPYWl+yGWfPDP2P1slOiJkimNOQMD34szyZt1G0+s= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.45.0 h1:Kim3EFONcbm78LF3B/EPFegmsKtFYBNcoJ89ubBPblw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.45.0/go.mod h1:wyhLy43DJk49NlzxNhoqF0ueRjS3oBMJc1bjTmyYxiQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.21.0 h1:OEgjQy1rH4Fbn5IpuI9d0uhLl+j6DkDvh9Q2Ucd6GK8= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.21.0/go.mod h1:EUfJ8lb3pjD8VasPPwqIvG2XVCE6DOT8tY5tcwbWA+A= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.45.0 h1:/BF7rO6PYcmFoyJrq6HA3LqQpFSQei9aNuO1fvV3OqU= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.45.0 h1:o/Nf55GfyLwGDaHkVAkRGgBXeExce73L6N9w2PZTB3k= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.45.0/go.mod h1:qkFPtMouQjW5ugdHIOthiTbweVHUTqbS0Qsu55KqXks= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0 h1:7jymiL7lvmjgG8hMfvZ6qqA39VuiGEmCmFLd0N0tMKY= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0/go.mod h1:w3gKj9vyvd9n8jh2jpOMVLGy87QqB/AxDek2CoRwpt0= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.46.0 h1:kitScZTE4xINfkp7W3duwPe18Jp8OPjm14Ybxgjrp3E= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.46.0/go.mod h1:r+z/vuDdIelQGGJHiVMvNPCW3NiRNpFaeA9OT4L/K/c= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0 h1:xl4IRfBXPZxwu7dIza8n6wdX5zEJpi0boF5dX22MbYE= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0/go.mod h1:P69hhmQh4zwnU5iEdGVowFWg1DiP9x2KsCYBOIaP4us= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.46.0 h1:vaXjFX09ygxNxAiHwByzPBVKltYFVZR8HN4U3TR4vn8= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.46.0/go.mod h1:V28hx+cUCZC9e3qcqszMb+Sbt8cQZtHTiXOmyDzoDOg= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0 h1:xlfPHZ5QFvHad9KmrVDoaPpJUT/XluwNDMNHn+k7z/s= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0/go.mod h1:mzI44HpPp75Z8/a1sJP1asdHdu7Wui7t10SZ9EEPPnM= 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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= 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= @@ -88,228 +43,130 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF 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.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +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-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/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.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/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -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/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= 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/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/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/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/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 v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/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.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/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.1.1/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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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.6.1/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/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/gjson v1.10.2 h1:APbLGOM0rrEkd8WBw9C24nllro4ajFuJu0Sc9hRz8Bo= github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= @@ -324,376 +181,212 @@ github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFA 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.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 h1:opvHcGANx+dS4HJwGTPtRMd6dZdOmmGn6c3PfW/bihQ= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/otelcol v0.89.0 h1:b3kC0zM9T6GxjhTcNEHIzXDd4zTIc7cBpexCPZ9nPzg= -go.opentelemetry.io/collector/otelcol v0.89.0/go.mod h1:BILxDcJe32wK+paX7ssnt4jyjOmTkIHvXe9JNjlHUk8= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/collector/service v0.89.0/go.mod h1:6IAr9Asn6t6YxSw6Qv5LwA+ilVUtP0nQsu1xzc9+mZA= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0 h1:Yty9Vs4F3D6/liF1o6FNt0PvN85h/BJJ6DQKJ3nrcM0= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0/go.mod h1:On4VgbkqYL18kbJlWsa18+cMNe6rYpBnPi1ARI/BrsU= -go.opentelemetry.io/contrib/zpages v0.45.0 h1:jIwHHGoWzJoZdbIUtWdErjL85Gni6BignnAFqDtMRL4= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0 h1:E/sf+2slCUb7wqh5FHwhdwKWTA+VXyMMAcFNlKVf4yw= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0/go.mod h1:2xuXI78Xp9cttLsJMF/Y08cJUqckLt0kLasn+vcHR5w= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0/go.mod h1:hbzqqcIxyywu6UQ5J1wb4ntla8nCwCfNBZnMo2Dgh48= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0/go.mod h1:qmFtGlXhoa9qPt5RrZgMp4f5RfRagucrdriI+hb3yWQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0/go.mod h1:CMJYNAfooOwSZSAmAeMUV1M+TXld3BiK++z9fqIm2xk= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0/go.mod h1:nZStMoc1H/YJpRjSx9IEX4abBMekORTLQcTUT1CgLkg= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 h1:vcSjcjn/BTeM6abI5CDymZdtd1m24quD1Mx4VE3N3fM= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0/go.mod h1:HblEnlZQNsVuuDpszdKTWcrHBI09OjBn2pWSzBx1goM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 h1:4s9HxB4azeeQkhY0GE5wZlMj4/pz8tE5gx2OQpGUw58= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0/go.mod h1:djVA3TUJ2fSdMX0JE5XxFBOaZzprElJoP7fD4vnV2SU= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -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.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 h1:lRhfcLr3gK5S/zn92h3clyOPnCvvNKs1WTMbtH4UvO0= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0/go.mod h1:vNMFTWe4dF05LsodUOc84OfxdlYVp1kCMuZzb41WfAk= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 h1:x/VsGlBj+DtJCXIucwzwcxiwnwAU8a6ALK6UN8fPdKQ= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0/go.mod h1:BapTGXu7CYrQGNohbapPwTSt2Ty/k/c6Oemx9mSSiK4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 h1:SxDS+Yr8qE+ID58ELR5n0D+SUlqHKOZ72pK3YPFAelA= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0/go.mod h1:DEoB0d0k1iGt4KEABntL8AW9xYQ6E7fmgkM2/s8aXvM= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 h1:C02SPbRPvrtmZ9TvsHWpz2TvHzqY5mNyEAlDdhax/a4= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0/go.mod h1:dzZKtykJio3Rm+G+Cmr15VV3xKp0PmFuh9Q9b3c1K7A= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 h1:04zGXVQZ8D6nvoPX8AaqxWxGHNNVsGR78E+tY+2VQr8= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0/go.mod h1:+UrRiugWaQPssz4mgEgQQo640f2bDUCFlo2Xr0/5ulc= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 h1:JYpDN0OnMsu0awk0rjaYEIko9hFzzBJ6+2U5W2iVvUE= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0/go.mod h1:xrXL804nBum1PgbvmJQ4I+hyW+DU4xBGO3MKMiYFX6E= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 h1:JfvsDpTwAhA9au8/4vmONRh0OBVU6n36seb41JD/mTQ= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0/go.mod h1:t1zDwy6kYp4w1JgcGHMvdGbKYHqWpK00bB1AEQ0Oqlc= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/otelcol v0.98.0 h1:sUk49Wqw+VBYeDynEA+GSeVEusFvzFW3KuF2vfDbyo0= +go.opentelemetry.io/collector/otelcol v0.98.0/go.mod h1:dW3UzuaiaNTddjKajk3Tp2Y7muDvYJdQz2yGUOE53gs= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/collector/service v0.98.0 h1:lLJ7VXPXcV62fSISh4GuNd5ti6WvKje76NSgezc3ydo= +go.opentelemetry.io/collector/service v0.98.0/go.mod h1:wB7ozvZTHtMefb5KTYy5nyrVYWpGk8teq8jWFs4blIU= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +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/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0 h1:QU8UEKyPqgr/8vCC9LlDmkPnfFmiWAUF9GtJdcLz+BU= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0/go.mod h1:qonC7wyvtX1E6cEpAR+bJmhcGr6IVRGc/f6ZTpvi7jA= +go.opentelemetry.io/contrib/zpages v0.50.0 h1:hKC5asr83xDN4ErwSHVdk3gv053pZiF8SZKmS86IPEw= +go.opentelemetry.io/contrib/zpages v0.50.0/go.mod h1:8WovRn95fZdaX/dr3e4h7D8IqiVsnZ+WxY0Yn4LyU3k= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0 h1:0o/9KwAgxjK+3pMV0pwIF5toYHqDsPmQhfrBvKaG6mU= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0/go.mod h1:rZyTdpmRqoV+PpUn6QlruxJp/kE4765rPy0pP6mRDk8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 h1:hDKnobznDpcdTlNzO0S/owRB8tyVr1OoeZZhDoqY+Cs= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0/go.mod h1:kUDQaUs1h8iTIHbQTk+iJRiUvSfJYMMKTtMCaiVu7B0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 h1:Wc4hZuYXhVqq+TfRXLXlmNIL/awOanGx8ssq3ciDQxc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0/go.mod h1:BydOvapRqVEc0DVz27qWBX2jq45Ca5TI9mhZBDIdweY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 h1:vOL89uRfOCCNIjkisd0r7SEdJF3ZJFyCNY34fdZs8eU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0/go.mod h1:8GlBGcDk8KKi7n+2S4BT/CPZQYH3erLu0/k64r1MYgo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 h1:d7nHbdzU84STOiszaOxQ3kw5IwkSmHsU5Muol5/vL4I= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0/go.mod h1:yiPA1iZbb/EHYnODXOxvtKuB0I2hV8ehfLTEWpl7BJU= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 h1:0vZZdECYzhTt9MKQZ5qQ0V+J3MFu4MQaQ3COfugF+FQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0/go.mod h1:e7iXx3HjaSSBXfy9ykVUlupS2Vp7LBIBuT21ousM2Hk= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= 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-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +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-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 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/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.150.0 h1:Z9k22qD289SZ8gCJrk4DrWXkNjtfvKAUo/l1ma8eBYE= -google.golang.org/api v0.150.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= +google.golang.org/api v0.162.0 h1:Vhs54HkaEpkMBdgGdOT2P6F0csGG/vxDS0hWHJzmmps= +google.golang.org/api v0.162.0/go.mod h1:6SulDkfoBIg4NFmCuZ39XeeAgSHCPecfSUuDyYlAHs0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -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-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= +google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -702,37 +395,16 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/exporter/googlemanagedprometheusexporter/internal/metadata/generated_status.go b/exporter/googlemanagedprometheusexporter/internal/metadata/generated_status.go index fe5ab47c090a..a496aa57d873 100644 --- a/exporter/googlemanagedprometheusexporter/internal/metadata/generated_status.go +++ b/exporter/googlemanagedprometheusexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("googlemanagedprometheus") ) const ( - Type = "googlemanagedprometheus" MetricsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/googlemanagedprometheus") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/googlemanagedprometheus") +} diff --git a/exporter/googlemanagedprometheusexporter/metadata.yaml b/exporter/googlemanagedprometheusexporter/metadata.yaml index 6b3d0c326f7e..9193ad05d265 100644 --- a/exporter/googlemanagedprometheusexporter/metadata.yaml +++ b/exporter/googlemanagedprometheusexporter/metadata.yaml @@ -1,9 +1,13 @@ type: googlemanagedprometheus +scope_name: otelcol/googlemanagedprometheus status: class: exporter stability: beta: [metrics] - distributions: [contrib, observiq] + distributions: [contrib] codeowners: active: [aabmass, dashpole, jsuereth, punya, damemi, psx95] + +tests: + skip_lifecycle: true diff --git a/exporter/googlemanagedprometheusexporter/package_test.go b/exporter/googlemanagedprometheusexporter/package_test.go new file mode 100644 index 000000000000..d62378e469eb --- /dev/null +++ b/exporter/googlemanagedprometheusexporter/package_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package googlemanagedprometheusexporter + +import ( + "testing" + + "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")) +} diff --git a/exporter/honeycombmarkerexporter/README.md b/exporter/honeycombmarkerexporter/README.md index c11819579877..0f036d0b62e2 100644 --- a/exporter/honeycombmarkerexporter/README.md +++ b/exporter/honeycombmarkerexporter/README.md @@ -1,42 +1,39 @@ -@@ -0,0 +1,18 @@ # Honeycomb Marker Exporter + +| Status | | +| ------------- |-----------| +| Stability | [alpha]: logs | +| Distributions | [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fhoneycombmarker%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fhoneycombmarker) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fhoneycombmarker%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fhoneycombmarker) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@TylerHelmuth](https://www.github.com/TylerHelmuth), [@fchikwekwe](https://www.github.com/fchikwekwe) | -This exporter allows creating markers, via the Honeycomb Markers API, based on the look of incoming telemetry. +[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + + +This exporter allows creating [markers](https://docs.honeycomb.io/working-with-your-data/markers/), via the [Honeycomb Markers API](https://docs.honeycomb.io/api/tag/Markers#operation/createMarker), based on the look of incoming telemetry. The following configuration options are supported: -* `api_key` (Required): This is the API key (also called Write Key) for your Honeycomb account. -* `api_url` (Required): You can set the hostname to send marker data to. -* `markers` (Required): This specifies the exact configuration to create an event marker. - * `type`: Specifies the marker type. Markers with the same type will appear in the same color in Honeycomb. MarkerType or MarkerColor should be set. - * `color`: Specifies the marker color. Will only be used if MarkerType is not set. - * `messagefield`: This is the attribute that will be used as the message. If necessary the value will be converted to a string. - * `urlfield`: This is the attribute that will be used as the url. If necessary the value will be converted to a string. - * `rules`: This is a list of OTTL rules that determine when to create an event marker. - * `resourceconditions`: A list of ottlresource conditions that determine a match - * `logconditions`: A list of ottllog conditions that determine a match - Example: +* `api_key` (Required): This is the API key for your Honeycomb account. +* `api_url` (Optional): This sets the hostname to send marker data to. If not set, will default to `https://api.honeycomb.io/` +* `markers` (Required): This is a list of configurations to create an event marker. + * `type` (Required): Specifies the marker type. + * `rules` (Required): This is a list of [OTTL](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl) rules that determine when to create an event marker. + * `log_conditions` (Required): A list of [OTTL log](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottllog) conditions that determine a match. The marker will be created if **ANY** condition matches. + * `dataset_slug` (Optional): The dataset in which to create the marker. If not set, will default to `__all__`. + * `message_key` (Optional): The key of the attribute whose value will be used as the marker's message. If necessary the value will be converted to a string. + * `url_key` (Optional): The key of the attribute whose value will be used as the marker's url. If necessary the value will be converted to a string. +Example: ```yaml exporters: - honeycomb: - api_key: "my-api-key" - api_url: "https://api.testhost.io" + honeycombmarker: + api_key: {{env:HONEYCOMB_API_KEY}} markers: - - type: "fooType", - messagefield: "test message", - urlfield: "https://api.testhost.io", - rules: - - resourceconditions: - - IsMatch(attributes["test"], ".*") - - logconditions: - - body == "test" - - color: "green", - messagefield: "another test message", - urlfield: "https://api.testhost.io", + # Creates a new marker anytime the exporter sees a k8s event with a reason of Backoff + - type: k8s-backoff-events rules: - - resourceconditions: - - IsMatch(attributes["test"], ".*") - - logconditions: - - body == "test" -``` \ No newline at end of file + log_conditions: + - IsMap(body) and IsMap(body["object"]) and body["object"]["reason"] == "Backoff" +``` diff --git a/exporter/honeycombmarkerexporter/config.go b/exporter/honeycombmarkerexporter/config.go index bc9bf7d2987c..47b739f36120 100644 --- a/exporter/honeycombmarkerexporter/config.go +++ b/exporter/honeycombmarkerexporter/config.go @@ -7,7 +7,10 @@ import ( "fmt" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterottl" @@ -24,58 +27,54 @@ type Config struct { // Markers is the list of markers to create Markers []Marker `mapstructure:"markers"` + + confighttp.ClientConfig `mapstructure:",squash"` + exporterhelper.QueueSettings `mapstructure:"sending_queue"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` } type Marker struct { - // Type defines the type of Marker. Markers with the same type appear in Honeycomb with the same color + // Type defines the type of Marker. Type string `mapstructure:"type"` - // Color is the color of the Marker. Will only be used if the Type does not already exist. - Color string `mapstructure:"color"` - - // MessageField is the attribute that will be used as the message. + // MessageKey is the attribute that will be used as the message. // If necessary the value will be converted to a string. - MessageField string `mapstructure:"message_field"` + MessageKey string `mapstructure:"message_key"` - // URLField is the attribute that will be used as the url. + // URLKey is the attribute that will be used as the url. // If necessary the value will be converted to a string. - URLField string `mapstructure:"url_field"` + URLKey string `mapstructure:"url_key"` // Rules are the OTTL rules that determine when a piece of telemetry should be turned into a Marker Rules Rules `mapstructure:"rules"` + + // DatasetSlug is the endpoint that specifies the Honeycomb environment + DatasetSlug string `mapstructure:"dataset_slug"` } type Rules struct { - // ResourceConditions is the list of ottlresource conditions that determine a match - ResourceConditions []string `mapstructure:"resource_conditions"` - // LogConditions is the list of ottllog conditions that determine a match LogConditions []string `mapstructure:"log_conditions"` } -var defaultCfg = createDefaultConfig().(*Config) +var _ component.Config = (*Config)(nil) func (cfg *Config) Validate() error { - if cfg == nil { - cfg = defaultCfg - } - if cfg.APIKey == "" { return fmt.Errorf("invalid API Key") } if len(cfg.Markers) != 0 { for _, m := range cfg.Markers { - if len(m.Rules.ResourceConditions) == 0 && len(m.Rules.LogConditions) == 0 { - return fmt.Errorf("no rules supplied for Marker %v", m) + if m.Type == "" { + return fmt.Errorf("marker must have a type %v", m) } - _, err := filterottl.NewBoolExprForResource(m.Rules.ResourceConditions, filterottl.StandardResourceFuncs(), ottl.PropagateError, component.TelemetrySettings{Logger: zap.NewNop()}) - if err != nil { - return err + if len(m.Rules.LogConditions) == 0 { + return fmt.Errorf("marker must have rules %v", m) } - _, err = filterottl.NewBoolExprForLog(m.Rules.LogConditions, filterottl.StandardLogFuncs(), ottl.PropagateError, component.TelemetrySettings{Logger: zap.NewNop()}) + _, err := filterottl.NewBoolExprForLog(m.Rules.LogConditions, filterottl.StandardLogFuncs(), ottl.PropagateError, component.TelemetrySettings{Logger: zap.NewNop()}) if err != nil { return err } diff --git a/exporter/honeycombmarkerexporter/config_test.go b/exporter/honeycombmarkerexporter/config_test.go index 9fbdc724db56..df0298fb98eb 100644 --- a/exporter/honeycombmarkerexporter/config_test.go +++ b/exporter/honeycombmarkerexporter/config_test.go @@ -10,7 +10,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter/internal/metadata" ) @@ -26,19 +28,14 @@ func TestLoadConfig(t *testing.T) { expected component.Config }{ { - id: component.NewIDWithName("honeycomb", ""), + id: component.NewIDWithName(metadata.Type, ""), expected: &Config{ APIKey: "test-apikey", - APIURL: "https://api.testhost.io", + APIURL: "https://api.honeycomb.io", Markers: []Marker{ { - Type: "fooType", - MessageField: "test message", - URLField: "https://api.testhost.io", + Type: "fooType", Rules: Rules{ - ResourceConditions: []string{ - `IsMatch(attributes["test"], ".*")`, - }, LogConditions: []string{ `body == "test"`, }, @@ -48,23 +45,23 @@ func TestLoadConfig(t *testing.T) { }, }, { - id: component.NewIDWithName("honeycomb", "color_no_type"), + id: component.NewIDWithName(metadata.Type, "all_fields"), expected: &Config{ - APIKey: "test-apikey", - APIURL: "https://api.testhost.io", + QueueSettings: exporterhelper.NewDefaultQueueSettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), + APIKey: "test-apikey", + APIURL: "https://api.testhost.io", Markers: []Marker{ { - Color: "green", - MessageField: "test message", - URLField: "https://api.testhost.io", + Type: "fooType", + MessageKey: "test message", + URLKey: "https://api.testhost.io", Rules: Rules{ - ResourceConditions: []string{ - `IsMatch(attributes["test"], ".*")`, - }, LogConditions: []string{ `body == "test"`, }, }, + DatasetSlug: "testing", }, }, }, diff --git a/exporter/honeycombmarkerexporter/factory.go b/exporter/honeycombmarkerexporter/factory.go index 36e26f4d7e7f..0008f05fe028 100644 --- a/exporter/honeycombmarkerexporter/factory.go +++ b/exporter/honeycombmarkerexporter/factory.go @@ -23,9 +23,7 @@ func NewFactory() exporter.Factory { func createDefaultConfig() component.Config { return &Config{ - APIKey: "", - APIURL: "api.honeycomb.io:443", - Markers: []Marker{}, + APIURL: "https://api.honeycomb.io", } } @@ -36,12 +34,19 @@ func createLogsExporter( ) (exporter.Logs, error) { cf := cfg.(*Config) - exporter := newLogsExporter(set.Logger, cf) + logsExp, err := newHoneycombLogsExporter(set, cf) + if err != nil { + return nil, err + } return exporterhelper.NewLogsExporter( ctx, set, cfg, - exporter.exportLogs, + logsExp.exportMarkers, + exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), + exporterhelper.WithRetry(cf.BackOffConfig), + exporterhelper.WithQueue(cf.QueueSettings), + exporterhelper.WithStart(logsExp.start), ) } diff --git a/exporter/honeycombmarkerexporter/generated_component_test.go b/exporter/honeycombmarkerexporter/generated_component_test.go new file mode 100644 index 000000000000..688be75d6f16 --- /dev/null +++ b/exporter/honeycombmarkerexporter/generated_component_test.go @@ -0,0 +1,126 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package honeycombmarkerexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/honeycombmarkerexporter/go.mod b/exporter/honeycombmarkerexporter/go.mod index 71db80799c9d..370778741495 100644 --- a/exporter/honeycombmarkerexporter/go.mod +++ b/exporter/honeycombmarkerexporter/go.mod @@ -1,59 +1,83 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/alecthomas/participle/v2 v2.1.0 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // 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/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gobwas/glob v0.2.3 // 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.4.0 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/iancoleman/strcase v0.3.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rs/cors v1.10.1 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/honeycombmarkerexporter/go.sum b/exporter/honeycombmarkerexporter/go.sum index b95c66eb5230..9aaa3c135f31 100644 --- a/exporter/honeycombmarkerexporter/go.sum +++ b/exporter/honeycombmarkerexporter/go.sum @@ -1,83 +1,70 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= -github.com/alecthomas/participle/v2 v2.1.0 h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4= -github.com/alecthomas/participle/v2 v2.1.0/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= 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/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/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/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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= 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.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -87,105 +74,108 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -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/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -193,38 +183,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/honeycombmarkerexporter/internal/metadata/generated_status.go b/exporter/honeycombmarkerexporter/internal/metadata/generated_status.go index e475b1c0f3b6..b4384d4b2340 100644 --- a/exporter/honeycombmarkerexporter/internal/metadata/generated_status.go +++ b/exporter/honeycombmarkerexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("honeycombmarker") ) const ( - Type = "honeycombmarker" - LogsStability = component.StabilityLevelDevelopment + LogsStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/honeycombmarker") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/honeycombmarker") +} diff --git a/exporter/honeycombmarkerexporter/logs_exporter.go b/exporter/honeycombmarkerexporter/logs_exporter.go index 3dfe36d5d9bc..297eddbec852 100644 --- a/exporter/honeycombmarkerexporter/logs_exporter.go +++ b/exporter/honeycombmarkerexporter/logs_exporter.go @@ -4,25 +4,168 @@ package honeycombmarkerexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter" import ( + "bytes" "context" + "encoding/json" + "fmt" + "io" + "net/http" + "runtime" + "strings" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/pdata/plog" - "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/expr" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterottl" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottllog" +) + +const ( + defaultDatasetSlug = "__all__" + userAgentHeaderKey = "User-Agent" + contentType = "Content-Type" + honeycombTeam = "X-Honeycomb-Team" ) +type marker struct { + Marker + logBoolExpr expr.BoolExpr[ottllog.TransformContext] +} + type honeycombLogsExporter struct { - logger *zap.Logger - markers []Marker + set component.TelemetrySettings + client *http.Client + httpClientSettings confighttp.ClientConfig + apiURL string + apiKey configopaque.String + markers []marker + userAgentHeader string } -func newLogsExporter(logger *zap.Logger, config *Config) *honeycombLogsExporter { +func newHoneycombLogsExporter(set exporter.CreateSettings, config *Config) (*honeycombLogsExporter, error) { + if config == nil { + return nil, fmt.Errorf("unable to create honeycombLogsExporter without config") + } + + telemetrySettings := set.TelemetrySettings + markers := make([]marker, len(config.Markers)) + for i, m := range config.Markers { + matchLogConditions, err := filterottl.NewBoolExprForLog(m.Rules.LogConditions, filterottl.StandardLogFuncs(), ottl.PropagateError, telemetrySettings) + if err != nil { + return nil, fmt.Errorf("failed to parse log conditions: %w", err) + } + markers[i] = marker{ + Marker: m, + logBoolExpr: matchLogConditions, + } + } logsExp := &honeycombLogsExporter{ - logger: logger, - markers: config.Markers, + set: telemetrySettings, + httpClientSettings: config.ClientConfig, + apiURL: config.APIURL, + apiKey: config.APIKey, + markers: markers, + userAgentHeader: fmt.Sprintf("%s/%s (%s/%s)", set.BuildInfo.Description, set.BuildInfo.Version, runtime.GOOS, runtime.GOARCH), + } + return logsExp, nil +} + +func (e *honeycombLogsExporter) exportMarkers(ctx context.Context, ld plog.Logs) error { + for i := 0; i < ld.ResourceLogs().Len(); i++ { + rlogs := ld.ResourceLogs().At(i) + for j := 0; j < rlogs.ScopeLogs().Len(); j++ { + slogs := rlogs.ScopeLogs().At(j) + logs := slogs.LogRecords() + for k := 0; k < logs.Len(); k++ { + logRecord := logs.At(k) + tCtx := ottllog.NewTransformContext(logRecord, slogs.Scope(), rlogs.Resource()) + for _, m := range e.markers { + match, err := m.logBoolExpr.Eval(ctx, tCtx) + if err != nil { + return err + } + if match { + err := e.sendMarker(ctx, m, logRecord) + if err != nil { + return err + } + } + } + + } + } + } + return nil +} + +func (e *honeycombLogsExporter) sendMarker(ctx context.Context, m marker, logRecord plog.LogRecord) error { + requestMap := map[string]string{ + "type": m.Type, + } + + messageValue, found := logRecord.Attributes().Get(m.MessageKey) + if found { + requestMap["message"] = messageValue.AsString() + } + + URLValue, found := logRecord.Attributes().Get(m.URLKey) + if found { + requestMap["url"] = URLValue.AsString() + } + + request, err := json.Marshal(requestMap) + if err != nil { + return err + } + + datasetSlug := m.DatasetSlug + if datasetSlug == "" { + datasetSlug = defaultDatasetSlug + } + + url := fmt.Sprintf("%s/1/markers/%s", strings.TrimRight(e.apiURL, "/"), datasetSlug) + req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewReader(request)) + if err != nil { + return err + } + + req.Header.Set(contentType, "application/json") + req.Header.Set(honeycombTeam, string(e.apiKey)) + req.Header.Set(userAgentHeaderKey, e.userAgentHeader) + + resp, err := e.client.Do(req) + if err != nil { + return fmt.Errorf("failed to send a request: %w", err) } - return logsExp + + defer func() { + _ = resp.Body.Close() + }() + + if resp.StatusCode < http.StatusOK || resp.StatusCode >= http.StatusBadRequest { + b, err := io.ReadAll(resp.Body) + if err != nil { + return fmt.Errorf("marker creation failed with %s and unable to read response body: %w", resp.Status, err) + } + return fmt.Errorf("marker creation failed with %s and message: %s", resp.Status, b) + } + + return nil } -func (e *honeycombLogsExporter) exportLogs(_ context.Context, _ plog.Logs) error { +func (e *honeycombLogsExporter) start(ctx context.Context, host component.Host) (err error) { + client, err := e.httpClientSettings.ToClientContext(ctx, host, e.set) + + if err != nil { + return err + } + + e.client = client + return nil } diff --git a/exporter/honeycombmarkerexporter/logs_exporter_test.go b/exporter/honeycombmarkerexporter/logs_exporter_test.go new file mode 100644 index 000000000000..d3daae01f66b --- /dev/null +++ b/exporter/honeycombmarkerexporter/logs_exporter_test.go @@ -0,0 +1,301 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package honeycombmarkerexporter + +import ( + "context" + "encoding/json" + "net/http" + "net/http/httptest" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/plog" +) + +func TestExportMarkers(t *testing.T) { + tests := []struct { + name string + config Config + attributeMap map[string]string + expectedURL string + }{ + { + name: "all fields", + config: Config{ + APIKey: "test-apikey", + Markers: []Marker{ + { + Type: "test-type", + MessageKey: "message", + URLKey: "url", + DatasetSlug: "test-dataset", + Rules: Rules{ + LogConditions: []string{ + `body == "test"`, + }, + }, + }, + }, + }, + attributeMap: map[string]string{ + "message": "this is a test message", + "url": "https://api.testhost.io", + "type": "test-type", + }, + expectedURL: "/1/markers/test-dataset", + }, + { + name: "no message key", + config: Config{ + APIKey: "test-apikey", + Markers: []Marker{ + { + Type: "test-type", + URLKey: "url", + DatasetSlug: "test-dataset", + Rules: Rules{ + LogConditions: []string{ + `body == "test"`, + }, + }, + }, + }, + }, + attributeMap: map[string]string{ + "url": "https://api.testhost.io", + "type": "test-type", + }, + expectedURL: "/1/markers/test-dataset", + }, + { + name: "no url", + config: Config{ + APIKey: "test-apikey", + Markers: []Marker{ + { + Type: "test-type", + MessageKey: "message", + DatasetSlug: "test-dataset", + Rules: Rules{ + LogConditions: []string{ + `body == "test"`, + }, + }, + }, + }, + }, + attributeMap: map[string]string{ + "message": "this is a test message", + "type": "test-type", + }, + expectedURL: "/1/markers/test-dataset", + }, + { + name: "no dataset_slug", + config: Config{ + APIKey: "test-apikey", + Markers: []Marker{ + { + Type: "test-type", + Rules: Rules{ + LogConditions: []string{ + `body == "test"`, + }, + }, + }, + }, + }, + attributeMap: map[string]string{ + "type": "test-type", + }, + expectedURL: "/1/markers/__all__", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + markerServer := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { + decodedBody := map[string]any{} + err := json.NewDecoder(req.Body).Decode(&decodedBody) + + require.NoError(t, err) + + assert.Equal(t, len(tt.attributeMap), len(decodedBody)) + + for attr := range tt.attributeMap { + assert.Equal(t, tt.attributeMap[attr], decodedBody[attr]) + } + assert.Contains(t, req.URL.Path, tt.expectedURL) + + apiKey := req.Header.Get(honeycombTeam) + assert.Equal(t, string(tt.config.APIKey), apiKey) + + userAgent := req.Header.Get(userAgentHeaderKey) + assert.NotEmpty(t, userAgent) + assert.Equal(t, strings.Contains(userAgent, "OpenTelemetry Collector"), true) + + rw.WriteHeader(http.StatusAccepted) + })) + defer markerServer.Close() + + config := tt.config + config.APIURL = markerServer.URL + + f := NewFactory() + exp, err := f.CreateLogsExporter(context.Background(), exportertest.NewNopCreateSettings(), &config) + require.NoError(t, err) + + err = exp.Start(context.Background(), componenttest.NewNopHost()) + assert.NoError(t, err) + + logs := constructLogs(tt.attributeMap) + err = exp.ConsumeLogs(context.Background(), logs) + assert.NoError(t, err) + }) + } +} + +func constructLogs(attributes map[string]string) plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + sl := rl.ScopeLogs().AppendEmpty() + l := sl.LogRecords().AppendEmpty() + + l.Body().SetStr("test") + for attr, attrVal := range attributes { + l.Attributes().PutStr(attr, attrVal) + } + return logs +} + +func TestExportMarkers_Error(t *testing.T) { + tests := []struct { + name string + config Config + responseCode int + errorMessage string + }{ + { + name: "unauthorized greater than 400", + config: Config{ + APIKey: "test-apikey", + Markers: []Marker{ + { + Type: "test-type", + MessageKey: "message", + URLKey: "https://api.testhost.io", + DatasetSlug: "test-dataset", + Rules: Rules{ + LogConditions: []string{ + `body == "test"`, + }, + }, + }, + }, + }, + responseCode: http.StatusUnauthorized, + errorMessage: "marker creation failed with 401", + }, + { + name: "continue less than 200", + config: Config{ + APIKey: "test-apikey", + Markers: []Marker{ + { + Type: "test-type", + MessageKey: "message", + URLKey: "https://api.testhost.io", + DatasetSlug: "test-dataset", + Rules: Rules{ + LogConditions: []string{ + `body == "test"`, + }, + }, + }, + }, + }, + responseCode: http.StatusSwitchingProtocols, + errorMessage: "marker creation failed with 101", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + markerServer := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) { + rw.WriteHeader(tt.responseCode) + })) + defer markerServer.Close() + + config := tt.config + config.APIURL = markerServer.URL + + f := NewFactory() + exp, err := f.CreateLogsExporter(context.Background(), exportertest.NewNopCreateSettings(), &config) + require.NoError(t, err) + + err = exp.Start(context.Background(), componenttest.NewNopHost()) + assert.NoError(t, err) + + logs := constructLogs(map[string]string{}) + err = exp.ConsumeLogs(context.Background(), logs) + assert.ErrorContains(t, err, tt.errorMessage) + }) + } +} + +func TestExportMarkers_NoAPICall(t *testing.T) { + tests := []struct { + name string + config Config + }{ + { + name: "all fields", + config: Config{ + APIKey: "test-apikey", + Markers: []Marker{ + { + Type: "test-type", + MessageKey: "message", + URLKey: "url", + DatasetSlug: "test-dataset", + Rules: Rules{ + LogConditions: []string{ + `body == "foo"`, + }, + }, + }, + }, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + markerServer := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) { + assert.Fail(t, "should not call the markers api") + rw.WriteHeader(http.StatusBadRequest) // 400 + })) + defer markerServer.Close() + + config := tt.config + config.APIURL = markerServer.URL + + f := NewFactory() + exp, err := f.CreateLogsExporter(context.Background(), exportertest.NewNopCreateSettings(), &config) + require.NoError(t, err) + + err = exp.Start(context.Background(), componenttest.NewNopHost()) + assert.NoError(t, err) + + logs := constructLogs(map[string]string{}) + err = exp.ConsumeLogs(context.Background(), logs) + assert.NoError(t, err) + }) + } +} diff --git a/exporter/honeycombmarkerexporter/metadata.yaml b/exporter/honeycombmarkerexporter/metadata.yaml index 51361e199f72..d609671d0fd1 100644 --- a/exporter/honeycombmarkerexporter/metadata.yaml +++ b/exporter/honeycombmarkerexporter/metadata.yaml @@ -1,9 +1,13 @@ type: honeycombmarker +scope_name: otelcol/honeycombmarker status: class: exporter stability: - development: [logs] - distributions: [] + alpha: [logs] + distributions: [contrib] codeowners: active: [TylerHelmuth, fchikwekwe] + +tests: + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/honeycombmarkerexporter/package_test.go b/exporter/honeycombmarkerexporter/package_test.go new file mode 100644 index 000000000000..5682ee1c3253 --- /dev/null +++ b/exporter/honeycombmarkerexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package honeycombmarkerexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/honeycombmarkerexporter/testdata/config.yaml b/exporter/honeycombmarkerexporter/testdata/config.yaml index 3ca6508c9ffb..7e348d40ee77 100644 --- a/exporter/honeycombmarkerexporter/testdata/config.yaml +++ b/exporter/honeycombmarkerexporter/testdata/config.yaml @@ -1,78 +1,81 @@ -honeycomb: +honeycombmarker: api_key: "test-apikey" - api_url: "https://api.testhost.io" markers: - type: "fooType" - message_field: "test message" - url_field: "https://api.testhost.io" rules: - resource_conditions: - - IsMatch(attributes["test"], ".*") log_conditions: - body == "test" - -honeycomb/color_no_type: +honeycombmarker/all_fields: api_key: "test-apikey" api_url: "https://api.testhost.io" + sending_queue: + enabled: true + num_consumers: 10 + queue_size: 1000 + retry_on_failure: + enabled: true + initial_interval: 5000000000 + randomization_factor: 0.5 + multiplier: 1.5 + max_interval: 30000000000 + max_elapsed_time: 300000000000 markers: - - color: "green" - message_field: "test message" - url_field: "https://api.testhost.io" + - type: "fooType" + message_key: "test message" + url_key: "https://api.testhost.io" + dataset_slug: "testing" rules: - resource_conditions: - - IsMatch(attributes["test"], ".*") log_conditions: - body == "test" -honeycomb/bad_syntax_log: +honeycombmarker/bad_syntax_log: api_key: "test-apikey" api_url: "https://api.testhost.io" markers: - type: "fooType" - message_field: "test message" - url_field: "https://api.testhost.io" + message_key: "test message" + url_key: "https://api.testhost.io" + dataset_slug: "__all__" rules: log_conditions: - body == "test" - set(attributes["body"], body) -honeycomb/no_conditions: +honeycombmarker/no_conditions: api_key: "test-apikey" api_url: "https://api.testhost.io" markers: - - color: "green" - message_field: "test message" - url_field: "https://api.testhost.io" + - type: "test-apikey" + message_key: "test message" + url_key: "https://api.testhost.io" + dataset_slug: "__all__" rules: -honeycomb/no_api_key: +honeycombmarker/no_api_key: api_key: "" api_url: "https://api.testhost.io" markers: - type: "fooType" - message_field: "test message" - url_field: "https://api.testhost.io" + message_key: "test message" + url_key: "https://api.testhost.io" + dataset_slug: "__all__" rules: - resource_conditions: - - IsMatch(attributes["test"], ".*") log_conditions: - body == "test" -honeycomb/no_api_url: +honeycombmarker/no_markers_supplied: api_key: "test-apikey" - api_url: "" + api_url: "https://api.testhost.io" markers: - - type: "fooType" - message_field: "test message" - url_field: "https://api.testhost.io" - rules: - resource_conditions: - - IsMatch(attributes["test"], ".*") - log_conditions: - - body == "test" -honeycomb/no_markers_supplied: +honeycombmarker/no_dataset_slug: api_key: "test-apikey" api_url: "https://api.testhost.io" markers: + - type: "fooType" + message_key: "test message" + url_key: "https://api.testhost.io" + rules: + log_conditions: + - body == "test" diff --git a/exporter/influxdbexporter/README.md b/exporter/influxdbexporter/README.md index 8513ca5fa1bc..d0585e781474 100644 --- a/exporter/influxdbexporter/README.md +++ b/exporter/influxdbexporter/README.md @@ -4,13 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces, metrics, logs | -| Distributions | [contrib], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Finfluxdb%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Finfluxdb) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Finfluxdb%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Finfluxdb) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jacobmarble](https://www.github.com/jacobmarble) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector This exporter supports sending tracing, metrics, and logging data to [InfluxDB](https://www.influxdata.com/products/). diff --git a/exporter/influxdbexporter/config.go b/exporter/influxdbexporter/config.go index 38885db43dc2..53103640489b 100644 --- a/exporter/influxdbexporter/config.go +++ b/exporter/influxdbexporter/config.go @@ -9,6 +9,7 @@ import ( "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "golang.org/x/exp/maps" ) @@ -27,9 +28,9 @@ type V1Compatibility struct { // Config defines configuration for the InfluxDB exporter. type Config struct { - confighttp.HTTPClientSettings `mapstructure:",squash"` - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + confighttp.ClientConfig `mapstructure:",squash"` + exporterhelper.QueueSettings `mapstructure:"sending_queue"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // Org is the InfluxDB organization name of the destination bucket. Org string `mapstructure:"org"` diff --git a/exporter/influxdbexporter/config_test.go b/exporter/influxdbexporter/config_test.go index 0ad0cb1f1e7b..ea8f355e69b5 100644 --- a/exporter/influxdbexporter/config_test.go +++ b/exporter/influxdbexporter/config_test.go @@ -14,6 +14,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -37,7 +38,7 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "override-config"), expected: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "http://localhost:8080", Timeout: 500 * time.Millisecond, Headers: map[string]configopaque.String{"User-Agent": "OpenTelemetry -> Influx"}, @@ -47,7 +48,7 @@ func TestLoadConfig(t *testing.T) { NumConsumers: 3, QueueSize: 10, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 1 * time.Second, MaxInterval: 3 * time.Second, diff --git a/exporter/influxdbexporter/factory.go b/exporter/influxdbexporter/factory.go index 7a2de86bb70e..2f8eb08c11f2 100644 --- a/exporter/influxdbexporter/factory.go +++ b/exporter/influxdbexporter/factory.go @@ -15,6 +15,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -34,14 +35,14 @@ func NewFactory() exporter.Factory { func createDefaultConfig() component.Config { return &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: 5 * time.Second, Headers: map[string]configopaque.String{ "User-Agent": "OpenTelemetry -> Influx", }, }, QueueSettings: exporterhelper.NewDefaultQueueSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), MetricsSchema: common.MetricsSchemaTelegrafPrometheusV1.String(), SpanDimensions: otel2influx.DefaultOtelTracesToLineProtocolConfig().SpanDimensions, LogRecordDimensions: otel2influx.DefaultOtelLogsToLineProtocolConfig().LogRecordDimensions, @@ -81,7 +82,7 @@ func createTraceExporter( cfg, exp.WriteTraces, exporterhelper.WithQueue(cfg.QueueSettings), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithStart(writer.Start), ) } @@ -116,7 +117,7 @@ func createMetricsExporter(ctx context.Context, set exporter.CreateSettings, con cfg, exp.WriteMetrics, exporterhelper.WithQueue(cfg.QueueSettings), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithStart(writer.Start), ) } @@ -146,7 +147,7 @@ func createLogsExporter(ctx context.Context, set exporter.CreateSettings, config cfg, exp.WriteLogs, exporterhelper.WithQueue(cfg.QueueSettings), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithStart(writer.Start), ) } diff --git a/exporter/influxdbexporter/generated_component_test.go b/exporter/influxdbexporter/generated_component_test.go new file mode 100644 index 000000000000..03b0dcab5a4f --- /dev/null +++ b/exporter/influxdbexporter/generated_component_test.go @@ -0,0 +1,140 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package influxdbexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/influxdbexporter/go.mod b/exporter/influxdbexporter/go.mod index 8dd2428c396a..3e02bc788b3a 100644 --- a/exporter/influxdbexporter/go.mod +++ b/exporter/influxdbexporter/go.mod @@ -1,69 +1,81 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter -go 1.20 +go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.1 + github.com/cenkalti/backoff/v4 v4.3.0 github.com/influxdata/influxdb-observability/common v0.5.8 github.com/influxdata/influxdb-observability/otel2influx v0.5.8 github.com/influxdata/line-protocol/v2 v2.2.1 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.uber.org/zap v1.26.0 - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc ) 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.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/frankban/quicktest v1.14.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/influxdbexporter/go.sum b/exporter/influxdbexporter/go.sum index 308e06fc2cec..cc0459734863 100644 --- a/exporter/influxdbexporter/go.sum +++ b/exporter/influxdbexporter/go.sum @@ -1,21 +1,13 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -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/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frankban/quicktest v1.11.0/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= @@ -25,45 +17,28 @@ github.com/frankban/quicktest v1.14.0 h1:+cqqvzZV87b4adx/5ayVOaYZ2CrvM4ejQvUdBzP github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= 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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/influxdata/influxdb-observability/common v0.5.8 h1:nyk4dqnKbPGIyr1vAs6oEsFQEHWi5jkSQ7PtP4v//lc= @@ -81,27 +56,25 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr 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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -112,123 +85,111 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -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/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -236,42 +197,20 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/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/exporter/influxdbexporter/internal/metadata/generated_status.go b/exporter/influxdbexporter/internal/metadata/generated_status.go index 05e0acae4912..a445c22df30c 100644 --- a/exporter/influxdbexporter/internal/metadata/generated_status.go +++ b/exporter/influxdbexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("influxdb") ) const ( - Type = "influxdb" TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/influxdb") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/influxdb") +} diff --git a/exporter/influxdbexporter/metadata.yaml b/exporter/influxdbexporter/metadata.yaml index 4d4363dff036..639b820cf2f6 100644 --- a/exporter/influxdbexporter/metadata.yaml +++ b/exporter/influxdbexporter/metadata.yaml @@ -1,9 +1,13 @@ type: influxdb +scope_name: otelcol/influxdb status: class: exporter stability: beta: [traces, metrics, logs] - distributions: [contrib, observiq] + distributions: [contrib] codeowners: active: [jacobmarble] + +tests: + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/influxdbexporter/package_test.go b/exporter/influxdbexporter/package_test.go new file mode 100644 index 000000000000..310587aed448 --- /dev/null +++ b/exporter/influxdbexporter/package_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package influxdbexporter + +import ( + "testing" + + "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")) +} diff --git a/exporter/influxdbexporter/writer.go b/exporter/influxdbexporter/writer.go index 5bd9df809d95..6899ea200b63 100644 --- a/exporter/influxdbexporter/writer.go +++ b/exporter/influxdbexporter/writer.go @@ -30,7 +30,7 @@ type influxHTTPWriter struct { encoderPool sync.Pool httpClient *http.Client - httpClientSettings confighttp.HTTPClientSettings + httpClientSettings confighttp.ClientConfig telemetrySettings component.TelemetrySettings writeURL string payloadMaxLines int @@ -54,7 +54,7 @@ func newInfluxHTTPWriter(logger common.Logger, config *Config, telemetrySettings return e }, }, - httpClientSettings: config.HTTPClientSettings, + httpClientSettings: config.ClientConfig, telemetrySettings: telemetrySettings, writeURL: writeURL, payloadMaxLines: config.PayloadMaxLines, @@ -64,7 +64,7 @@ func newInfluxHTTPWriter(logger common.Logger, config *Config, telemetrySettings } func composeWriteURL(config *Config) (string, error) { - writeURL, err := url.Parse(config.HTTPClientSettings.Endpoint) + writeURL, err := url.Parse(config.ClientConfig.Endpoint) if err != nil { return "", err } @@ -88,16 +88,22 @@ func composeWriteURL(config *Config) (string, error) { queryValues.Set("db", config.V1Compatibility.DB) if config.V1Compatibility.Username != "" && config.V1Compatibility.Password != "" { - var basicAuth []byte - base64.StdEncoding.Encode(basicAuth, []byte(config.V1Compatibility.Username+":"+string(config.V1Compatibility.Password))) - config.HTTPClientSettings.Headers["Authorization"] = configopaque.String("Basic " + string(basicAuth)) + basicAuth := base64.StdEncoding.EncodeToString( + []byte(config.V1Compatibility.Username + ":" + string(config.V1Compatibility.Password))) + if config.ClientConfig.Headers == nil { + config.ClientConfig.Headers = make(map[string]configopaque.String, 1) + } + config.ClientConfig.Headers["Authorization"] = configopaque.String("Basic " + basicAuth) } } else { queryValues.Set("org", config.Org) queryValues.Set("bucket", config.Bucket) if config.Token != "" { - config.HTTPClientSettings.Headers["Authorization"] = "Token " + config.Token + if config.ClientConfig.Headers == nil { + config.ClientConfig.Headers = make(map[string]configopaque.String, 1) + } + config.ClientConfig.Headers["Authorization"] = "Token " + config.Token } } @@ -107,8 +113,8 @@ func composeWriteURL(config *Config) (string, error) { } // Start implements component.StartFunc -func (w *influxHTTPWriter) Start(_ context.Context, host component.Host) error { - httpClient, err := w.httpClientSettings.ToClient(host, w.telemetrySettings) +func (w *influxHTTPWriter) Start(ctx context.Context, host component.Host) error { + httpClient, err := w.httpClientSettings.ToClientContext(ctx, host, w.telemetrySettings) if err != nil { return err } diff --git a/exporter/influxdbexporter/writer_test.go b/exporter/influxdbexporter/writer_test.go index 2cb240a25602..ed882ca9be71 100644 --- a/exporter/influxdbexporter/writer_test.go +++ b/exporter/influxdbexporter/writer_test.go @@ -107,7 +107,7 @@ func Test_influxHTTPWriterBatch_maxPayload(t *testing.T) { t.Run(testCase.name, func(t *testing.T) { var httpRequests []*http.Request - mockHTTPService := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + mockHTTPService := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { httpRequests = append(httpRequests, r) })) t.Cleanup(mockHTTPService.Close) @@ -149,7 +149,7 @@ func Test_influxHTTPWriterBatch_maxPayload(t *testing.T) { func Test_influxHTTPWriterBatch_EnqueuePoint_emptyTagValue(t *testing.T) { var recordedRequest *http.Request var recordedRequestBody []byte - noopHTTPServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + noopHTTPServer := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { if assert.Nil(t, recordedRequest) { recordedRequest = r recordedRequestBody, _ = io.ReadAll(r.Body) @@ -162,7 +162,7 @@ func Test_influxHTTPWriterBatch_EnqueuePoint_emptyTagValue(t *testing.T) { influxWriter, err := newInfluxHTTPWriter( new(common.NoopLogger), &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: noopHTTPServer.URL, }, }, @@ -186,3 +186,24 @@ func Test_influxHTTPWriterBatch_EnqueuePoint_emptyTagValue(t *testing.T) { assert.Equal(t, "m,k=v f=1i 1000000002000", strings.TrimSpace(string(recordedRequestBody))) } } + +func Test_composeWriteURL_doesNotPanic(t *testing.T) { + assert.NotPanics(t, func() { + cfg := &Config{} + _, err := composeWriteURL(cfg) + assert.NoError(t, err) + }) + + assert.NotPanics(t, func() { + cfg := &Config{ + V1Compatibility: V1Compatibility{ + Enabled: true, + DB: "my-db", + Username: "my-username", + Password: "my-password", + }, + } + _, err := composeWriteURL(cfg) + assert.NoError(t, err) + }) +} diff --git a/exporter/instanaexporter/README.md b/exporter/instanaexporter/README.md index fffe9350736f..90b19a8e2cb9 100644 --- a/exporter/instanaexporter/README.md +++ b/exporter/instanaexporter/README.md @@ -3,12 +3,12 @@ | Status | | | ------------- |-----------| -| Stability | [alpha]: traces | +| Stability | [deprecated]: traces | | Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Finstana%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Finstana) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Finstana%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Finstana) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling), [@hickeyma](https://www.github.com/hickeyma) | -[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha +[deprecated]: https://github.com/open-telemetry/opentelemetry-collector#deprecated [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/exporter/instanaexporter/config.go b/exporter/instanaexporter/config.go index fa95e685c8e4..7a7c6c95aba0 100644 --- a/exporter/instanaexporter/config.go +++ b/exporter/instanaexporter/config.go @@ -19,7 +19,7 @@ type Config struct { AgentKey configopaque.String `mapstructure:"agent_key"` - confighttp.HTTPClientSettings `mapstructure:",squash"` + confighttp.ClientConfig `mapstructure:",squash"` } var _ component.Config = (*Config)(nil) diff --git a/exporter/instanaexporter/config_test.go b/exporter/instanaexporter/config_test.go index fb1ca4f2278f..68074ccb8a2c 100644 --- a/exporter/instanaexporter/config_test.go +++ b/exporter/instanaexporter/config_test.go @@ -28,9 +28,9 @@ func TestConfigValidate(t *testing.T) { }) t.Run("Valid configuration with ca_file", func(t *testing.T) { - c := &Config{Endpoint: "https://example.com/", AgentKey: "key1", HTTPClientSettings: confighttp.HTTPClientSettings{ - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + c := &Config{Endpoint: "https://example.com/", AgentKey: "key1", ClientConfig: confighttp.ClientConfig{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "ca.crt", }, }, diff --git a/exporter/instanaexporter/exporter.go b/exporter/instanaexporter/exporter.go index 0cfc0127b17c..75f37441d094 100644 --- a/exporter/instanaexporter/exporter.go +++ b/exporter/instanaexporter/exporter.go @@ -29,8 +29,8 @@ type instanaExporter struct { userAgent string } -func (e *instanaExporter) start(_ context.Context, host component.Host) error { - client, err := e.config.HTTPClientSettings.ToClient(host, e.settings) +func (e *instanaExporter) start(ctx context.Context, host component.Host) error { + client, err := e.config.ClientConfig.ToClientContext(ctx, host, e.settings) if err != nil { return err } diff --git a/exporter/instanaexporter/exporter_test.go b/exporter/instanaexporter/exporter_test.go index 83b299ae4283..bc6b76c1057d 100644 --- a/exporter/instanaexporter/exporter_test.go +++ b/exporter/instanaexporter/exporter_test.go @@ -21,15 +21,15 @@ import ( ) func TestPushConvertedTraces(t *testing.T) { - traceServer := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { + traceServer := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) { rw.WriteHeader(http.StatusAccepted) })) defer traceServer.Close() cfg := Config{ - AgentKey: "key11", - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: traceServer.URL}, - Endpoint: traceServer.URL, + AgentKey: "key11", + ClientConfig: confighttp.ClientConfig{Endpoint: traceServer.URL}, + Endpoint: traceServer.URL, } instanaExporter := newInstanaExporter(&cfg, exportertest.NewNopCreateSettings()) @@ -55,7 +55,7 @@ func TestSelfSignedBackend(t *testing.T) { var err error caFile := "testdata/ca.crt" handler := http.NewServeMux() - handler.HandleFunc("/bundle", func(w http.ResponseWriter, r *http.Request) { + handler.HandleFunc("/bundle", func(w http.ResponseWriter, _ *http.Request) { _, err = io.WriteString(w, "Hello from CA self signed server") if err != nil { @@ -82,10 +82,10 @@ func TestSelfSignedBackend(t *testing.T) { cfg := Config{ AgentKey: "key11", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: server.URL, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: caFile, }, }, @@ -108,10 +108,10 @@ func TestSelfSignedBackend(t *testing.T) { func TestSelfSignedBackendCAFileNotFound(t *testing.T) { cfg := Config{ AgentKey: "key11", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "ca_file_not_found.pem", }, }, diff --git a/exporter/instanaexporter/factory.go b/exporter/instanaexporter/factory.go index 05fe8c60fbf5..df2749f014dd 100644 --- a/exporter/instanaexporter/factory.go +++ b/exporter/instanaexporter/factory.go @@ -12,6 +12,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -31,7 +32,7 @@ func NewFactory() exporter.Factory { // createDefaultConfig creates the default exporter configuration func createDefaultConfig() component.Config { return &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "", Timeout: 30 * time.Second, Headers: map[string]configopaque.String{}, @@ -57,7 +58,7 @@ func createTracesExporter(ctx context.Context, set exporter.CreateSettings, conf exporterhelper.WithStart(instanaExporter.start), // Disable Timeout/RetryOnFailure and SendingQueue exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(exporterhelper.RetrySettings{Enabled: false}), + exporterhelper.WithRetry(configretry.BackOffConfig{Enabled: false}), exporterhelper.WithQueue(exporterhelper.QueueSettings{Enabled: false}), exporterhelper.WithShutdown(func(context.Context) error { cancel() diff --git a/exporter/instanaexporter/factory_test.go b/exporter/instanaexporter/factory_test.go index dd3a8ea197c4..2829f93112e9 100644 --- a/exporter/instanaexporter/factory_test.go +++ b/exporter/instanaexporter/factory_test.go @@ -26,7 +26,7 @@ func TestCreateDefaultConfig(t *testing.T) { cfg := factory.CreateDefaultConfig() assert.Equal(t, &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "", Timeout: 30 * time.Second, Headers: map[string]configopaque.String{}, @@ -53,7 +53,7 @@ func TestLoadConfig(t *testing.T) { require.NoError(t, err) assert.Equal(t, &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "https://example.com/api/", Timeout: 30 * time.Second, Headers: map[string]configopaque.String{}, @@ -74,13 +74,13 @@ func TestLoadConfig(t *testing.T) { require.NoError(t, err) assert.Equal(t, &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "https://example.com/api/", Timeout: 30 * time.Second, Headers: map[string]configopaque.String{}, WriteBufferSize: 512 * 1024, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "ca.crt", }, }, @@ -100,7 +100,7 @@ func TestLoadConfig(t *testing.T) { require.NoError(t, err) assert.Equal(t, &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "https://example.com/api/", Timeout: 30 * time.Second, Headers: map[string]configopaque.String{}, diff --git a/exporter/instanaexporter/generated_component_test.go b/exporter/instanaexporter/generated_component_test.go new file mode 100644 index 000000000000..6de7f21420ad --- /dev/null +++ b/exporter/instanaexporter/generated_component_test.go @@ -0,0 +1,126 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package instanaexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/instanaexporter/go.mod b/exporter/instanaexporter/go.mod index a9a629efe273..851f4a2f66fc 100644 --- a/exporter/instanaexporter/go.mod +++ b/exporter/instanaexporter/go.mod @@ -1,66 +1,77 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/instanaexporter/go.sum b/exporter/instanaexporter/go.sum index dadc64deca8e..b2e1179f017a 100644 --- a/exporter/instanaexporter/go.sum +++ b/exporter/instanaexporter/go.sum @@ -1,82 +1,56 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -86,121 +60,108 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -208,38 +169,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/instanaexporter/internal/converter/model/package_test.go b/exporter/instanaexporter/internal/converter/model/package_test.go new file mode 100644 index 000000000000..078a3432d433 --- /dev/null +++ b/exporter/instanaexporter/internal/converter/model/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package model + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/instanaexporter/internal/converter/package_test.go b/exporter/instanaexporter/internal/converter/package_test.go new file mode 100644 index 000000000000..dd30fae768ab --- /dev/null +++ b/exporter/instanaexporter/internal/converter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package converter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/instanaexporter/internal/metadata/generated_status.go b/exporter/instanaexporter/internal/metadata/generated_status.go index 35003719e88e..b47133ad2c8e 100644 --- a/exporter/instanaexporter/internal/metadata/generated_status.go +++ b/exporter/instanaexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("instana") ) const ( - Type = "instana" - TracesStability = component.StabilityLevelAlpha + TracesStability = component.StabilityLevelDeprecated ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/instana") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/instana") +} diff --git a/exporter/instanaexporter/metadata.yaml b/exporter/instanaexporter/metadata.yaml index 572e8b9d9d62..95f3c88dd5f0 100644 --- a/exporter/instanaexporter/metadata.yaml +++ b/exporter/instanaexporter/metadata.yaml @@ -1,9 +1,13 @@ type: instana +scope_name: otelcol/instana status: class: exporter stability: - alpha: [traces] + deprecated: [traces] distributions: [contrib] codeowners: active: [jpkrohling, hickeyma] + +tests: + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/instanaexporter/package_test.go b/exporter/instanaexporter/package_test.go new file mode 100644 index 000000000000..613af54e9fa2 --- /dev/null +++ b/exporter/instanaexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package instanaexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/kafkaexporter/README.md b/exporter/kafkaexporter/README.md index d916a4246327..4788c7831b21 100644 --- a/exporter/kafkaexporter/README.md +++ b/exporter/kafkaexporter/README.md @@ -4,16 +4,13 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces, metrics, logs | -| Distributions | [contrib], [aws], [observiq], [splunk], [sumo] | +| Distributions | [core], [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fkafka%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fkafka) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fkafka%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fkafka) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@pavolloffay](https://www.github.com/pavolloffay), [@MovieStoreGuy](https://www.github.com/MovieStoreGuy) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector Kafka exporter exports logs, metrics, and traces to Kafka. This exporter uses a synchronous producer @@ -26,6 +23,7 @@ The following settings are required: The following settings can be optionally configured: - `brokers` (default = localhost:9092): The list of kafka brokers. - `resolve_canonical_bootstrap_servers_only` (default = false): Whether to resolve then reverse-lookup broker IPs during startup. +- `client_id` (default = "sarama"): The client ID to configure the Sarama Kafka client with. The client ID will be used for all produce requests. - `topic` (default = otlp_spans for traces, otlp_metrics for metrics, otlp_logs for logs): The name of the kafka topic to export to. - `encoding` (default = otlp_proto): The encoding of the traces sent to kafka. All available encodings: - `otlp_proto`: payload is Protobuf serialized from `ExportTraceServiceRequest` if set as a traces exporter or `ExportMetricsServiceRequest` for metrics or `ExportLogsServiceRequest` for logs. @@ -37,6 +35,7 @@ The following settings can be optionally configured: - `zipkin_json`: the payload is serialized to Zipkin v2 JSON Span. - The following encodings are valid *only* for **logs**. - `raw`: if the log record body is a byte array, it is sent as is. Otherwise, it is serialized to JSON. Resource and record attributes are discarded. +- `partition_traces_by_id` (default = false): configures the exporter to include the trace ID as the message key in trace messages sent to kafka. *Please note:* this setting does not have any effect on Jaeger encoding exporters since Jaeger exporters include trace ID as the message key by default. - `auth` - `plain_text` - `username`: The username to use. diff --git a/exporter/kafkaexporter/config.go b/exporter/kafkaexporter/config.go index 186441f33d7c..daa387bfb91f 100644 --- a/exporter/kafkaexporter/config.go +++ b/exporter/kafkaexporter/config.go @@ -9,6 +9,7 @@ import ( "github.com/IBM/sarama" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" @@ -18,7 +19,7 @@ import ( type Config struct { exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // The list of kafka brokers (default localhost:9092) Brokers []string `mapstructure:"brokers"` @@ -32,12 +33,21 @@ type Config struct { // Kafka protocol version ProtocolVersion string `mapstructure:"protocol_version"` + // ClientID to configure the Kafka client with. This can be leveraged by + // Kafka to enforce ACLs, throttling quotas, and more. + ClientID string `mapstructure:"client_id"` + // The name of the kafka topic to export to (default otlp_spans for traces, otlp_metrics for metrics) Topic string `mapstructure:"topic"` // Encoding of messages (default "otlp_proto") Encoding string `mapstructure:"encoding"` + // PartitionTracesByID sets the message key of outgoing trace messages to the trace ID. + // Please note: does not have any effect on Jaeger encoding exporters since Jaeger exporters include + // trace ID as the message key by default. + PartitionTracesByID bool `mapstructure:"partition_traces_by_id"` + // Metadata is the namespace for metadata management properties used by the // Client, and shared by the Producer/Consumer. Metadata Metadata `mapstructure:"metadata"` diff --git a/exporter/kafkaexporter/config_test.go b/exporter/kafkaexporter/config_test.go index ac080ae9ee9d..ba1dfd7bef91 100644 --- a/exporter/kafkaexporter/config_test.go +++ b/exporter/kafkaexporter/config_test.go @@ -14,6 +14,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -34,14 +35,14 @@ func TestLoadConfig(t *testing.T) { }{ { id: component.NewIDWithName(metadata.Type, ""), - option: func(conf *Config) { + option: func(_ *Config) { // intentionally left blank so we use default config }, expected: &Config{ TimeoutSettings: exporterhelper.TimeoutSettings{ Timeout: 10 * time.Second, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, MaxInterval: 1 * time.Minute, @@ -54,9 +55,11 @@ func TestLoadConfig(t *testing.T) { NumConsumers: 2, QueueSize: 10, }, - Topic: "spans", - Encoding: "otlp_proto", - Brokers: []string{"foo:123", "bar:456"}, + Topic: "spans", + Encoding: "otlp_proto", + PartitionTracesByID: true, + Brokers: []string{"foo:123", "bar:456"}, + ClientID: "test_client_id", Authentication: kafka.Authentication{ PlainText: &kafka.PlainTextConfig{ Username: "jdoe", @@ -93,7 +96,7 @@ func TestLoadConfig(t *testing.T) { TimeoutSettings: exporterhelper.TimeoutSettings{ Timeout: 10 * time.Second, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, MaxInterval: 1 * time.Minute, @@ -106,9 +109,11 @@ func TestLoadConfig(t *testing.T) { NumConsumers: 2, QueueSize: 10, }, - Topic: "spans", - Encoding: "otlp_proto", - Brokers: []string{"foo:123", "bar:456"}, + Topic: "spans", + Encoding: "otlp_proto", + PartitionTracesByID: true, + Brokers: []string{"foo:123", "bar:456"}, + ClientID: "test_client_id", Authentication: kafka.Authentication{ PlainText: &kafka.PlainTextConfig{ Username: "jdoe", @@ -144,7 +149,7 @@ func TestLoadConfig(t *testing.T) { TimeoutSettings: exporterhelper.TimeoutSettings{ Timeout: 10 * time.Second, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, MaxInterval: 1 * time.Minute, @@ -159,7 +164,9 @@ func TestLoadConfig(t *testing.T) { }, Topic: "spans", Encoding: "otlp_proto", + PartitionTracesByID: true, Brokers: []string{"foo:123", "bar:456"}, + ClientID: "test_client_id", ResolveCanonicalBootstrapServersOnly: true, Authentication: kafka.Authentication{ PlainText: &kafka.PlainTextConfig{ diff --git a/exporter/kafkaexporter/factory.go b/exporter/kafkaexporter/factory.go index 37f0bc074be8..e822b0a005f4 100644 --- a/exporter/kafkaexporter/factory.go +++ b/exporter/kafkaexporter/factory.go @@ -9,6 +9,7 @@ import ( "github.com/IBM/sarama" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -22,6 +23,7 @@ const ( defaultLogsTopic = "otlp_logs" defaultEncoding = "otlp_proto" defaultBroker = "localhost:9092" + defaultClientID = "sarama" // default from sarama.NewConfig() defaultMetadataRetryMax = 3 // default from sarama.NewConfig() @@ -90,9 +92,10 @@ func NewFactory(options ...FactoryOption) exporter.Factory { func createDefaultConfig() component.Config { return &Config{ TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), Brokers: []string{defaultBroker}, + ClientID: defaultClientID, // using an empty topic to track when it has not been set by user, default is based on traces or metrics. Topic: "", Encoding: defaultEncoding, @@ -143,8 +146,9 @@ func (f *kafkaExporterFactory) createTracesExporter( // Disable exporterhelper Timeout, because we cannot pass a Context to the Producer, // and will rely on the sarama Producer Timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(oCfg.RetrySettings), + exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), + exporterhelper.WithStart(exp.start), exporterhelper.WithShutdown(exp.Close)) } @@ -173,8 +177,9 @@ func (f *kafkaExporterFactory) createMetricsExporter( // Disable exporterhelper Timeout, because we cannot pass a Context to the Producer, // and will rely on the sarama Producer Timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(oCfg.RetrySettings), + exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), + exporterhelper.WithStart(exp.start), exporterhelper.WithShutdown(exp.Close)) } @@ -203,7 +208,8 @@ func (f *kafkaExporterFactory) createLogsExporter( // Disable exporterhelper Timeout, because we cannot pass a Context to the Producer, // and will rely on the sarama Producer Timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(oCfg.RetrySettings), + exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), + exporterhelper.WithStart(exp.start), exporterhelper.WithShutdown(exp.Close)) } diff --git a/exporter/kafkaexporter/factory_test.go b/exporter/kafkaexporter/factory_test.go index 74f11af33836..6760029478df 100644 --- a/exporter/kafkaexporter/factory_test.go +++ b/exporter/kafkaexporter/factory_test.go @@ -11,6 +11,7 @@ import ( "github.com/IBM/sarama" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/pdata/plog" @@ -58,6 +59,7 @@ func TestCreateDefaultConfig(t *testing.T) { assert.NoError(t, componenttest.CheckConfigStruct(cfg)) assert.Equal(t, []string{defaultBroker}, cfg.Brokers) assert.Equal(t, "", cfg.Topic) + assert.Equal(t, "sarama", cfg.ClientID) } func TestCreateMetricExporter(t *testing.T) { @@ -123,13 +125,16 @@ func TestCreateMetricExporter(t *testing.T) { exportertest.NewNopCreateSettings(), tc.conf, ) + require.NoError(t, err) + assert.NotNil(t, exporter, "Must return valid exporter") + err = exporter.Start(context.Background(), componenttest.NewNopHost()) if tc.err != nil { assert.ErrorAs(t, err, &tc.err, "Must match the expected error") - assert.Nil(t, exporter, "Must return nil value for invalid exporter") return } assert.NoError(t, err, "Must not error") assert.NotNil(t, exporter, "Must return valid exporter when no error is returned") + assert.NoError(t, exporter.Shutdown(context.Background())) }) } } @@ -197,13 +202,16 @@ func TestCreateLogExporter(t *testing.T) { exportertest.NewNopCreateSettings(), tc.conf, ) + require.NoError(t, err) + assert.NotNil(t, exporter, "Must return valid exporter") + err = exporter.Start(context.Background(), componenttest.NewNopHost()) if tc.err != nil { assert.ErrorAs(t, err, &tc.err, "Must match the expected error") - assert.Nil(t, exporter, "Must return nil value for invalid exporter") return } assert.NoError(t, err, "Must not error") assert.NotNil(t, exporter, "Must return valid exporter when no error is returned") + assert.NoError(t, exporter.Shutdown(context.Background())) }) } } @@ -271,13 +279,16 @@ func TestCreateTraceExporter(t *testing.T) { exportertest.NewNopCreateSettings(), tc.conf, ) + require.NoError(t, err) + assert.NotNil(t, exporter, "Must return valid exporter") + err = exporter.Start(context.Background(), componenttest.NewNopHost()) if tc.err != nil { assert.ErrorAs(t, err, &tc.err, "Must match the expected error") - assert.Nil(t, exporter, "Must return nil value for invalid exporter") return } assert.NoError(t, err, "Must not error") assert.NotNil(t, exporter, "Must return valid exporter when no error is returned") + assert.NoError(t, exporter.Shutdown(context.Background())) }) } } diff --git a/exporter/kafkaexporter/generated_component_test.go b/exporter/kafkaexporter/generated_component_test.go new file mode 100644 index 000000000000..06bd42403b25 --- /dev/null +++ b/exporter/kafkaexporter/generated_component_test.go @@ -0,0 +1,101 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package kafkaexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/kafkaexporter/go.mod b/exporter/kafkaexporter/go.mod index 3cb2bde45c9c..f18f3bca1c9a 100644 --- a/exporter/kafkaexporter/go.mod +++ b/exporter/kafkaexporter/go.mod @@ -1,43 +1,54 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter -go 1.20 +go 1.21 require ( - github.com/IBM/sarama v1.42.1 - github.com/cenkalti/backoff/v4 v4.2.1 + github.com/IBM/sarama v1.43.1 + github.com/cenkalti/backoff/v4 v4.3.0 github.com/gogo/protobuf v1.3.2 - github.com/jaegertracing/jaeger v1.48.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.89.0 + github.com/jaegertracing/jaeger v1.55.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.98.0 github.com/openzipkin/zipkin-go v0.4.2 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/pdata/testdata v0.98.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 ) require ( github.com/apache/thrift v0.19.0 // indirect - github.com/aws/aws-sdk-go v1.47.10 // indirect + github.com/aws/aws-sdk-go v1.51.17 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/eapache/go-resiliency v1.4.0 // indirect + github.com/eapache/go-resiliency v1.6.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect github.com/eapache/queue v1.1.0 // 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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect github.com/jcmturner/gofork v1.7.6 // indirect @@ -45,42 +56,40 @@ require ( 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.17.2 // indirect + github.com/klauspost/compress v1.17.7 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/opentracing/opentracing-go v1.2.0 // indirect - github.com/pierrec/lz4/v4 v4.1.18 // indirect + github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/atomic v1.11.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -88,6 +97,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/corei replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka => ../../internal/kafka +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal => ../../pkg/batchpersignal + replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger => ../../pkg/translator/jaeger retract ( diff --git a/exporter/kafkaexporter/go.sum b/exporter/kafkaexporter/go.sum index 914821a79f92..b13fa5b97f88 100644 --- a/exporter/kafkaexporter/go.sum +++ b/exporter/kafkaexporter/go.sum @@ -1,72 +1,49 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= -github.com/IBM/sarama v1.42.1 h1:wugyWa15TDEHh2kvq2gAy1IHLjEjuYOYgXz/ruC/OSQ= -github.com/IBM/sarama v1.42.1/go.mod h1:Xxho9HkHd4K/MDUo/T/sOqwtX/17D33++E9Wib6hUdQ= +github.com/IBM/sarama v1.43.1 h1:Z5uz65Px7f4DhI/jQqEm/tV9t8aU+JUdTyW/K/fCXpA= +github.com/IBM/sarama v1.43.1/go.mod h1:GG5q1RURtDNPz8xxJs3mgX6Ytak8Z9eLhAkJPObe2xE= github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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 v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/eapache/go-resiliency v1.4.0 h1:3OK9bWpPk5q6pbFAaYSEwD9CLUSHG8bnZuqX2yMt3B0= -github.com/eapache/go-resiliency v1.4.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= +github.com/eapache/go-resiliency v1.6.0 h1:CqGDTLtpwuWKn6Nj3uNUdflaq+/kIPsg0gfNzHton30= +github.com/eapache/go-resiliency v1.6.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4ALJ04o5Qqpdz8XLIpNA3WM/iSIXqxtqo7UGVws= github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/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/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= 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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -77,10 +54,8 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9 github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/jaegertracing/jaeger v1.48.0 h1:YuKooQ7qJsjgxws9xuf8C/BLNTPx8qTAJz4wv7IHhSc= -github.com/jaegertracing/jaeger v1.48.0/go.mod h1:BoAPkdCAIEuLsVz/EDhjXd+GSVpHtJhiGqWoFEvBCKg= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= 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= @@ -101,22 +76,20 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr 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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -124,39 +97,35 @@ 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/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDOCg/jA= github.com/openzipkin/zipkin-go v0.4.2/go.mod h1:ZeVkFjuuBiSy13y8vpSDCjMi9GoI3hPpCJSBx/EYFhY= -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/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= +github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= +github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= 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.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/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= @@ -166,89 +135,79 @@ github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gi 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= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= 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/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-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-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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= @@ -257,8 +216,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -270,10 +229,6 @@ 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-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= @@ -282,40 +237,21 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.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/exporter/kafkaexporter/internal/metadata/generated_status.go b/exporter/kafkaexporter/internal/metadata/generated_status.go index 73c17c03bbba..b8d45d135f4e 100644 --- a/exporter/kafkaexporter/internal/metadata/generated_status.go +++ b/exporter/kafkaexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("kafka") ) const ( - Type = "kafka" TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/kafka") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/kafka") +} diff --git a/exporter/kafkaexporter/kafka_exporter.go b/exporter/kafkaexporter/kafka_exporter.go index 52ef71c48be3..c98abdc674c0 100644 --- a/exporter/kafkaexporter/kafka_exporter.go +++ b/exporter/kafkaexporter/kafka_exporter.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/IBM/sarama" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/pdata/plog" @@ -23,6 +24,7 @@ var errUnrecognizedEncoding = fmt.Errorf("unrecognized encoding") // kafkaTracesProducer uses sarama to produce trace messages to Kafka. type kafkaTracesProducer struct { + cfg Config producer sarama.SyncProducer topic string marshaler TracesMarshaler @@ -57,11 +59,24 @@ func (e *kafkaTracesProducer) tracesPusher(_ context.Context, td ptrace.Traces) } func (e *kafkaTracesProducer) Close(context.Context) error { + if e.producer == nil { + return nil + } return e.producer.Close() } +func (e *kafkaTracesProducer) start(_ context.Context, _ component.Host) error { + producer, err := newSaramaProducer(e.cfg) + if err != nil { + return err + } + e.producer = producer + return nil +} + // kafkaMetricsProducer uses sarama to produce metrics messages to kafka type kafkaMetricsProducer struct { + cfg Config producer sarama.SyncProducer topic string marshaler MetricsMarshaler @@ -87,11 +102,24 @@ func (e *kafkaMetricsProducer) metricsDataPusher(_ context.Context, md pmetric.M } func (e *kafkaMetricsProducer) Close(context.Context) error { + if e.producer == nil { + return nil + } return e.producer.Close() } +func (e *kafkaMetricsProducer) start(_ context.Context, _ component.Host) error { + producer, err := newSaramaProducer(e.cfg) + if err != nil { + return err + } + e.producer = producer + return nil +} + // kafkaLogsProducer uses sarama to produce logs messages to kafka type kafkaLogsProducer struct { + cfg Config producer sarama.SyncProducer topic string marshaler LogsMarshaler @@ -117,11 +145,26 @@ func (e *kafkaLogsProducer) logsDataPusher(_ context.Context, ld plog.Logs) erro } func (e *kafkaLogsProducer) Close(context.Context) error { + if e.producer == nil { + return nil + } return e.producer.Close() } +func (e *kafkaLogsProducer) start(_ context.Context, _ component.Host) error { + producer, err := newSaramaProducer(e.cfg) + if err != nil { + return err + } + e.producer = producer + return nil +} + func newSaramaProducer(config Config) (sarama.SyncProducer, error) { c := sarama.NewConfig() + + c.ClientID = config.ClientID + // These setting are required by the sarama.SyncProducer implementation. c.Producer.Return.Successes = true c.Producer.Return.Errors = true @@ -168,13 +211,8 @@ func newMetricsExporter(config Config, set exporter.CreateSettings, marshalers m if marshaler == nil { return nil, errUnrecognizedEncoding } - producer, err := newSaramaProducer(config) - if err != nil { - return nil, err - } - return &kafkaMetricsProducer{ - producer: producer, + cfg: config, topic: config.Topic, marshaler: marshaler, logger: set.Logger, @@ -188,12 +226,14 @@ func newTracesExporter(config Config, set exporter.CreateSettings, marshalers ma if marshaler == nil { return nil, errUnrecognizedEncoding } - producer, err := newSaramaProducer(config) - if err != nil { - return nil, err + if config.PartitionTracesByID { + if keyableMarshaler, ok := marshaler.(KeyableTracesMarshaler); ok { + keyableMarshaler.Key() + } } + return &kafkaTracesProducer{ - producer: producer, + cfg: config, topic: config.Topic, marshaler: marshaler, logger: set.Logger, @@ -205,13 +245,9 @@ func newLogsExporter(config Config, set exporter.CreateSettings, marshalers map[ if marshaler == nil { return nil, errUnrecognizedEncoding } - producer, err := newSaramaProducer(config) - if err != nil { - return nil, err - } return &kafkaLogsProducer{ - producer: producer, + cfg: config, topic: config.Topic, marshaler: marshaler, logger: set.Logger, diff --git a/exporter/kafkaexporter/kafka_exporter_test.go b/exporter/kafkaexporter/kafka_exporter_test.go index ab8956ca5e2c..fe6eedf47163 100644 --- a/exporter/kafkaexporter/kafka_exporter_test.go +++ b/exporter/kafkaexporter/kafka_exporter_test.go @@ -12,22 +12,24 @@ import ( "github.com/IBM/sarama/mocks" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" "go.uber.org/zap" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" ) func TestNewExporter_err_version(t *testing.T) { c := Config{ProtocolVersion: "0.0.0", Encoding: defaultEncoding} texp, err := newTracesExporter(c, exportertest.NewNopCreateSettings(), tracesMarshalers()) + require.NoError(t, err) + err = texp.start(context.Background(), componenttest.NewNopHost()) assert.Error(t, err) - assert.Nil(t, texp) } func TestNewExporter_err_encoding(t *testing.T) { @@ -40,8 +42,9 @@ func TestNewExporter_err_encoding(t *testing.T) { func TestNewMetricsExporter_err_version(t *testing.T) { c := Config{ProtocolVersion: "0.0.0", Encoding: defaultEncoding} mexp, err := newMetricsExporter(c, exportertest.NewNopCreateSettings(), metricsMarshalers()) + require.NoError(t, err) + err = mexp.start(context.Background(), componenttest.NewNopHost()) assert.Error(t, err) - assert.Nil(t, mexp) } func TestNewMetricsExporter_err_encoding(t *testing.T) { @@ -60,9 +63,10 @@ func TestNewMetricsExporter_err_traces_encoding(t *testing.T) { func TestNewLogsExporter_err_version(t *testing.T) { c := Config{ProtocolVersion: "0.0.0", Encoding: defaultEncoding} - mexp, err := newLogsExporter(c, exportertest.NewNopCreateSettings(), logsMarshalers()) + lexp, err := newLogsExporter(c, exportertest.NewNopCreateSettings(), logsMarshalers()) + require.NoError(t, err) + err = lexp.start(context.Background(), componenttest.NewNopHost()) assert.Error(t, err) - assert.Nil(t, mexp) } func TestNewLogsExporter_err_encoding(t *testing.T) { @@ -83,8 +87,8 @@ func TestNewExporter_err_auth_type(t *testing.T) { c := Config{ ProtocolVersion: "2.0.0", Authentication: kafka.Authentication{ - TLS: &configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLS: &configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "/doesnotexist", }, }, @@ -98,17 +102,20 @@ func TestNewExporter_err_auth_type(t *testing.T) { }, } texp, err := newTracesExporter(c, exportertest.NewNopCreateSettings(), tracesMarshalers()) + require.NoError(t, err) + err = texp.start(context.Background(), componenttest.NewNopHost()) assert.Error(t, err) assert.Contains(t, err.Error(), "failed to load TLS config") - assert.Nil(t, texp) mexp, err := newMetricsExporter(c, exportertest.NewNopCreateSettings(), metricsMarshalers()) + require.NoError(t, err) + err = mexp.start(context.Background(), componenttest.NewNopHost()) assert.Error(t, err) assert.Contains(t, err.Error(), "failed to load TLS config") - assert.Nil(t, mexp) lexp, err := newLogsExporter(c, exportertest.NewNopCreateSettings(), logsMarshalers()) + require.NoError(t, err) + err = lexp.start(context.Background(), componenttest.NewNopHost()) assert.Error(t, err) assert.Contains(t, err.Error(), "failed to load TLS config") - assert.Nil(t, lexp) } @@ -120,9 +127,10 @@ func TestNewExporter_err_compression(t *testing.T) { }, } texp, err := newTracesExporter(c, exportertest.NewNopCreateSettings(), tracesMarshalers()) + require.NoError(t, err) + err = texp.start(context.Background(), componenttest.NewNopHost()) assert.Error(t, err) assert.Contains(t, err.Error(), "producer.compression should be one of 'none', 'gzip', 'snappy', 'lz4', or 'zstd'. configured value idk") - assert.Nil(t, texp) } func TestTracesPusher(t *testing.T) { @@ -137,7 +145,7 @@ func TestTracesPusher(t *testing.T) { t.Cleanup(func() { require.NoError(t, p.Close(context.Background())) }) - err := p.tracesPusher(context.Background(), testdata.GenerateTracesTwoSpansSameResource()) + err := p.tracesPusher(context.Background(), testdata.GenerateTraces(2)) require.NoError(t, err) } @@ -155,7 +163,7 @@ func TestTracesPusher_err(t *testing.T) { t.Cleanup(func() { require.NoError(t, p.Close(context.Background())) }) - td := testdata.GenerateTracesTwoSpansSameResource() + td := testdata.GenerateTraces(2) err := p.tracesPusher(context.Background(), td) assert.EqualError(t, err, expErr.Error()) } @@ -166,7 +174,7 @@ func TestTracesPusher_marshal_error(t *testing.T) { marshaler: &tracesErrorMarshaler{err: expErr}, logger: zap.NewNop(), } - td := testdata.GenerateTracesTwoSpansSameResource() + td := testdata.GenerateTraces(2) err := p.tracesPusher(context.Background(), td) require.Error(t, err) assert.Contains(t, err.Error(), expErr.Error()) @@ -184,7 +192,7 @@ func TestMetricsDataPusher(t *testing.T) { t.Cleanup(func() { require.NoError(t, p.Close(context.Background())) }) - err := p.metricsDataPusher(context.Background(), testdata.GenerateMetricsTwoMetrics()) + err := p.metricsDataPusher(context.Background(), testdata.GenerateMetrics(2)) require.NoError(t, err) } @@ -202,7 +210,7 @@ func TestMetricsDataPusher_err(t *testing.T) { t.Cleanup(func() { require.NoError(t, p.Close(context.Background())) }) - md := testdata.GenerateMetricsTwoMetrics() + md := testdata.GenerateMetrics(2) err := p.metricsDataPusher(context.Background(), md) assert.EqualError(t, err, expErr.Error()) } @@ -213,7 +221,7 @@ func TestMetricsDataPusher_marshal_error(t *testing.T) { marshaler: &metricsErrorMarshaler{err: expErr}, logger: zap.NewNop(), } - md := testdata.GenerateMetricsTwoMetrics() + md := testdata.GenerateMetrics(2) err := p.metricsDataPusher(context.Background(), md) require.Error(t, err) assert.Contains(t, err.Error(), expErr.Error()) @@ -231,7 +239,7 @@ func TestLogsDataPusher(t *testing.T) { t.Cleanup(func() { require.NoError(t, p.Close(context.Background())) }) - err := p.logsDataPusher(context.Background(), testdata.GenerateLogsOneLogRecord()) + err := p.logsDataPusher(context.Background(), testdata.GenerateLogs(1)) require.NoError(t, err) } @@ -249,7 +257,7 @@ func TestLogsDataPusher_err(t *testing.T) { t.Cleanup(func() { require.NoError(t, p.Close(context.Background())) }) - ld := testdata.GenerateLogsOneLogRecord() + ld := testdata.GenerateLogs(1) err := p.logsDataPusher(context.Background(), ld) assert.EqualError(t, err, expErr.Error()) } @@ -260,7 +268,7 @@ func TestLogsDataPusher_marshal_error(t *testing.T) { marshaler: &logsErrorMarshaler{err: expErr}, logger: zap.NewNop(), } - ld := testdata.GenerateLogsOneLogRecord() + ld := testdata.GenerateLogs(1) err := p.logsDataPusher(context.Background(), ld) require.Error(t, err) assert.Contains(t, err.Error(), expErr.Error()) diff --git a/exporter/kafkaexporter/marshaler_test.go b/exporter/kafkaexporter/marshaler_test.go index a94811c554cd..0d0cfba637f5 100644 --- a/exporter/kafkaexporter/marshaler_test.go +++ b/exporter/kafkaexporter/marshaler_test.go @@ -9,6 +9,7 @@ import ( "testing" "time" + "github.com/IBM/sarama" zipkin "github.com/openzipkin/zipkin-go/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -85,6 +86,8 @@ func TestOTLPTracesJsonMarshaling(t *testing.T) { ils := rs.ScopeSpans().At(0) ils.SetSchemaUrl(conventions.SchemaURL) ils.Spans().AppendEmpty() + ils.Spans().AppendEmpty() + ils.Spans().AppendEmpty() span := ils.Spans().At(0) span.SetKind(ptrace.SpanKindServer) @@ -95,9 +98,27 @@ func TestOTLPTracesJsonMarshaling(t *testing.T) { span.SetSpanID([8]byte{0, 1, 2, 3, 4, 5, 6, 7}) span.SetParentSpanID([8]byte{8, 9, 10, 11, 12, 13, 14}) + span = ils.Spans().At(1) + span.SetKind(ptrace.SpanKindClient) + span.SetName("bar") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(now)) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(now.Add(time.Second))) + span.SetTraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}) + span.SetSpanID([8]byte{15, 16, 17, 18, 19, 20, 21}) + span.SetParentSpanID([8]byte{0, 1, 2, 3, 4, 5, 6, 7}) + + span = ils.Spans().At(2) + span.SetKind(ptrace.SpanKindServer) + span.SetName("baz") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(now)) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(now.Add(time.Second))) + span.SetTraceID([16]byte{17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}) + span.SetSpanID([8]byte{22, 23, 24, 25, 26, 27, 28}) + span.SetParentSpanID([8]byte{29, 30, 31, 32, 33, 34, 35, 36}) + // Since marshaling json is not guaranteed to be in order // within a string, using a map to compare that the expected values are there - otlpJSON := map[string]any{ + unkeyedOtlpJSON := map[string]any{ "resourceSpans": []any{ map[string]any{ "resource": map[string]any{}, @@ -115,6 +136,95 @@ func TestOTLPTracesJsonMarshaling(t *testing.T) { "endTimeUnixNano": fmt.Sprint(now.Add(time.Second).UnixNano()), "status": map[string]any{}, }, + map[string]any{ + "traceId": "0102030405060708090a0b0c0d0e0f10", + "spanId": "0f10111213141500", + "parentSpanId": "0001020304050607", + "name": "bar", + "kind": float64(ptrace.SpanKindClient), + "startTimeUnixNano": fmt.Sprint(now.UnixNano()), + "endTimeUnixNano": fmt.Sprint(now.Add(time.Second).UnixNano()), + "status": map[string]any{}, + }, + map[string]any{ + "traceId": "1112131415161718191a1b1c1d1e1f20", + "spanId": "161718191a1b1c00", + "parentSpanId": "1d1e1f2021222324", + "name": "baz", + "kind": float64(ptrace.SpanKindServer), + "startTimeUnixNano": fmt.Sprint(now.UnixNano()), + "endTimeUnixNano": fmt.Sprint(now.Add(time.Second).UnixNano()), + "status": map[string]any{}, + }, + }, + "schemaUrl": conventions.SchemaURL, + }, + }, + "schemaUrl": conventions.SchemaURL, + }, + }, + } + + unkeyedOtlpJSONResult := make([]any, 1) + unkeyedOtlpJSONResult[0] = unkeyedOtlpJSON + + keyedOtlpJSON1 := map[string]any{ + "resourceSpans": []any{ + map[string]any{ + "resource": map[string]any{}, + "scopeSpans": []any{ + map[string]any{ + "scope": map[string]any{}, + "spans": []any{ + map[string]any{ + "traceId": "0102030405060708090a0b0c0d0e0f10", + "spanId": "0001020304050607", + "parentSpanId": "08090a0b0c0d0e00", + "name": "foo", + "kind": float64(ptrace.SpanKindServer), + "startTimeUnixNano": fmt.Sprint(now.UnixNano()), + "endTimeUnixNano": fmt.Sprint(now.Add(time.Second).UnixNano()), + "status": map[string]any{}, + }, + map[string]any{ + "traceId": "0102030405060708090a0b0c0d0e0f10", + "spanId": "0f10111213141500", + "parentSpanId": "0001020304050607", + "name": "bar", + "kind": float64(ptrace.SpanKindClient), + "startTimeUnixNano": fmt.Sprint(now.UnixNano()), + "endTimeUnixNano": fmt.Sprint(now.Add(time.Second).UnixNano()), + "status": map[string]any{}, + }, + }, + "schemaUrl": conventions.SchemaURL, + }, + }, + "schemaUrl": conventions.SchemaURL, + }, + }, + } + + unkeyedMessageKey := []sarama.Encoder{nil} + + keyedOtlpJSON2 := map[string]any{ + "resourceSpans": []any{ + map[string]any{ + "resource": map[string]any{}, + "scopeSpans": []any{ + map[string]any{ + "scope": map[string]any{}, + "spans": []any{ + map[string]any{ + "traceId": "1112131415161718191a1b1c1d1e1f20", + "spanId": "161718191a1b1c00", + "parentSpanId": "1d1e1f2021222324", + "name": "baz", + "kind": float64(ptrace.SpanKindServer), + "startTimeUnixNano": fmt.Sprint(now.UnixNano()), + "endTimeUnixNano": fmt.Sprint(now.Add(time.Second).UnixNano()), + "status": map[string]any{}, + }, }, "schemaUrl": conventions.SchemaURL, }, @@ -124,7 +234,13 @@ func TestOTLPTracesJsonMarshaling(t *testing.T) { }, } - zipkinJSON := []any{ + keyedOtlpJSONResult := make([]any, 2) + keyedOtlpJSONResult[0] = keyedOtlpJSON1 + keyedOtlpJSONResult[1] = keyedOtlpJSON2 + + keyedMessageKey := []sarama.Encoder{sarama.ByteEncoder("0102030405060708090a0b0c0d0e0f10"), sarama.ByteEncoder("1112131415161718191a1b1c1d1e1f20")} + + unkeyedZipkinJSON := []any{ map[string]any{ "traceId": "0102030405060708090a0b0c0d0e0f10", "id": "0001020304050607", @@ -135,15 +251,83 @@ func TestOTLPTracesJsonMarshaling(t *testing.T) { "kind": string(zipkin.Server), "localEndpoint": map[string]any{"serviceName": "otlpresourcenoservicename"}, }, + map[string]any{ + "traceId": "0102030405060708090a0b0c0d0e0f10", + "id": "0f10111213141500", + "parentId": "0001020304050607", + "name": "bar", + "timestamp": float64(time.Second.Microseconds()), + "duration": float64(time.Second.Microseconds()), + "kind": string(zipkin.Client), + "localEndpoint": map[string]any{"serviceName": "otlpresourcenoservicename"}, + }, + map[string]any{ + "traceId": "1112131415161718191a1b1c1d1e1f20", + "id": "161718191a1b1c00", + "parentId": "1d1e1f2021222324", + "name": "baz", + "timestamp": float64(time.Second.Microseconds()), + "duration": float64(time.Second.Microseconds()), + "kind": string(zipkin.Server), + "localEndpoint": map[string]any{"serviceName": "otlpresourcenoservicename"}, + }, } + unkeyedZipkinJSONResult := make([]any, 1) + unkeyedZipkinJSONResult[0] = unkeyedZipkinJSON + + keyedZipkinJSON1 := []any{ + map[string]any{ + "traceId": "0102030405060708090a0b0c0d0e0f10", + "id": "0001020304050607", + "parentId": "08090a0b0c0d0e00", + "name": "foo", + "timestamp": float64(time.Second.Microseconds()), + "duration": float64(time.Second.Microseconds()), + "kind": string(zipkin.Server), + "localEndpoint": map[string]any{"serviceName": "otlpresourcenoservicename"}, + }, + map[string]any{ + "traceId": "0102030405060708090a0b0c0d0e0f10", + "id": "0f10111213141500", + "parentId": "0001020304050607", + "name": "bar", + "timestamp": float64(time.Second.Microseconds()), + "duration": float64(time.Second.Microseconds()), + "kind": string(zipkin.Client), + "localEndpoint": map[string]any{"serviceName": "otlpresourcenoservicename"}, + }, + } + + keyedZipkinJSON2 := []any{ + map[string]any{ + "traceId": "1112131415161718191a1b1c1d1e1f20", + "id": "161718191a1b1c00", + "parentId": "1d1e1f2021222324", + "name": "baz", + "timestamp": float64(time.Second.Microseconds()), + "duration": float64(time.Second.Microseconds()), + "kind": string(zipkin.Server), + "localEndpoint": map[string]any{"serviceName": "otlpresourcenoservicename"}, + }, + } + + keyedZipkinJSONResult := make([]any, 2) + keyedZipkinJSONResult[0] = keyedZipkinJSON1 + keyedZipkinJSONResult[1] = keyedZipkinJSON2 + tests := []struct { - encoding string - expectedJSON any - unmarshaled any + encoding string + keyed bool + numExpectedMessages int + expectedJSON []any + expectedMessageKey []sarama.Encoder + unmarshaled any }{ - {encoding: "otlp_json", expectedJSON: otlpJSON, unmarshaled: map[string]any{}}, - {encoding: "zipkin_json", expectedJSON: zipkinJSON, unmarshaled: []map[string]any{}}, + {encoding: "otlp_json", numExpectedMessages: 1, expectedJSON: unkeyedOtlpJSONResult, expectedMessageKey: unkeyedMessageKey, unmarshaled: map[string]any{}}, + {encoding: "otlp_json", keyed: true, numExpectedMessages: 2, expectedJSON: keyedOtlpJSONResult, expectedMessageKey: keyedMessageKey, unmarshaled: map[string]any{}}, + {encoding: "zipkin_json", numExpectedMessages: 1, expectedJSON: unkeyedZipkinJSONResult, expectedMessageKey: unkeyedMessageKey, unmarshaled: []map[string]any{}}, + {encoding: "zipkin_json", keyed: true, numExpectedMessages: 2, expectedJSON: keyedZipkinJSONResult, expectedMessageKey: keyedMessageKey, unmarshaled: []map[string]any{}}, } for _, test := range tests { @@ -151,19 +335,27 @@ func TestOTLPTracesJsonMarshaling(t *testing.T) { marshaler, ok := tracesMarshalers()[test.encoding] require.True(t, ok, fmt.Sprintf("Must have %s marshaller", test.encoding)) + if test.keyed { + keyableMarshaler, ok := marshaler.(KeyableTracesMarshaler) + require.True(t, ok, "Must be a KeyableTracesMarshaler") + keyableMarshaler.Key() + } + msg, err := marshaler.Marshal(traces, t.Name()) require.NoError(t, err, "Must have marshaled the data without error") - require.Len(t, msg, 1, "Must have one entry in the message") - - data, err := msg[0].Value.Encode() - require.NoError(t, err, "Must not error when encoding value") - require.NotNil(t, data, "Must have valid data to test") + require.Len(t, msg, test.numExpectedMessages, "Expected number of messages in the message") - unmarshaled := test.unmarshaled - err = json.Unmarshal(data, &unmarshaled) - require.NoError(t, err, "Must not error marshaling expected data") + for idx, singleMsg := range msg { + data, err := singleMsg.Value.Encode() + require.NoError(t, err, "Must not error when encoding value") + require.NotNil(t, data, "Must have valid data to test") - assert.Equal(t, test.expectedJSON, unmarshaled, "Must match the expected value") + unmarshaled := test.unmarshaled + err = json.Unmarshal(data, &unmarshaled) + require.NoError(t, err, "Must not error marshaling expected data") + assert.Equal(t, test.expectedJSON[idx], unmarshaled, "Must match the expected value") + assert.Equal(t, test.expectedMessageKey[idx], singleMsg.Key) + } } } diff --git a/exporter/kafkaexporter/metadata.yaml b/exporter/kafkaexporter/metadata.yaml index 34b6d3869cfd..7c1683989506 100644 --- a/exporter/kafkaexporter/metadata.yaml +++ b/exporter/kafkaexporter/metadata.yaml @@ -1,9 +1,14 @@ type: kafka +scope_name: otelcol/kafka status: class: exporter stability: beta: [traces, metrics, logs] - distributions: [contrib, observiq, splunk, sumo, aws] + distributions: [core, contrib] codeowners: active: [pavolloffay, MovieStoreGuy] + +tests: + config: + skip_lifecycle: true diff --git a/exporter/kafkaexporter/package_test.go b/exporter/kafkaexporter/package_test.go new file mode 100644 index 000000000000..c43d258301ad --- /dev/null +++ b/exporter/kafkaexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package kafkaexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/kafkaexporter/pdata_marshaler.go b/exporter/kafkaexporter/pdata_marshaler.go index d4511946b3bc..d9e38dd52caf 100644 --- a/exporter/kafkaexporter/pdata_marshaler.go +++ b/exporter/kafkaexporter/pdata_marshaler.go @@ -8,6 +8,9 @@ import ( "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/traceutil" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal" ) type pdataLogsMarshaler struct { @@ -68,30 +71,59 @@ func newPdataMetricsMarshaler(marshaler pmetric.Marshaler, encoding string) Metr } } +// KeyableTracesMarshaler is an extension of the TracesMarshaler interface inteded to provide partition key capabilities +// for trace messages +type KeyableTracesMarshaler interface { + TracesMarshaler + Key() +} + type pdataTracesMarshaler struct { marshaler ptrace.Marshaler encoding string + keyed bool } -func (p pdataTracesMarshaler) Marshal(td ptrace.Traces, topic string) ([]*sarama.ProducerMessage, error) { - bts, err := p.marshaler.MarshalTraces(td) - if err != nil { - return nil, err - } - return []*sarama.ProducerMessage{ - { +func (p *pdataTracesMarshaler) Marshal(td ptrace.Traces, topic string) ([]*sarama.ProducerMessage, error) { + var msgs []*sarama.ProducerMessage + if p.keyed { + for _, trace := range batchpersignal.SplitTraces(td) { + bts, err := p.marshaler.MarshalTraces(trace) + if err != nil { + return nil, err + } + msgs = append(msgs, &sarama.ProducerMessage{ + Topic: topic, + Value: sarama.ByteEncoder(bts), + Key: sarama.ByteEncoder(traceutil.TraceIDToHexOrEmptyString(trace.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0).TraceID())), + }) + + } + } else { + bts, err := p.marshaler.MarshalTraces(td) + if err != nil { + return nil, err + } + msgs = append(msgs, &sarama.ProducerMessage{ Topic: topic, Value: sarama.ByteEncoder(bts), - }, - }, nil + }) + } + + return msgs, nil } -func (p pdataTracesMarshaler) Encoding() string { +func (p *pdataTracesMarshaler) Encoding() string { return p.encoding } +// Key configures the pdataTracesMarshaler to set the message key on the kafka messages +func (p *pdataTracesMarshaler) Key() { + p.keyed = true +} + func newPdataTracesMarshaler(marshaler ptrace.Marshaler, encoding string) TracesMarshaler { - return pdataTracesMarshaler{ + return &pdataTracesMarshaler{ marshaler: marshaler, encoding: encoding, } diff --git a/exporter/kafkaexporter/testdata/config.yaml b/exporter/kafkaexporter/testdata/config.yaml index 0f5ca49560b5..15624b521b10 100644 --- a/exporter/kafkaexporter/testdata/config.yaml +++ b/exporter/kafkaexporter/testdata/config.yaml @@ -3,6 +3,7 @@ kafka: brokers: - "foo:123" - "bar:456" + client_id: "test_client_id" metadata: full: false retry: @@ -11,6 +12,7 @@ kafka: max_message_bytes: 10000000 required_acks: -1 # WaitForAll timeout: 10s + partition_traces_by_id: true auth: plain_text: username: jdoe diff --git a/exporter/kineticaexporter/common.go b/exporter/kineticaexporter/common.go new file mode 100644 index 000000000000..902ff230e67c --- /dev/null +++ b/exporter/kineticaexporter/common.go @@ -0,0 +1,750 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package kineticaexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kineticaexporter" + +import ( + "encoding/json" + "fmt" + + "go.opentelemetry.io/collector/pdata/pcommon" +) + +const ( + MeasurementSpans = "spans" + MeasurementSpanLinks = "span-links" + MeasurementLogs = "logs" + + // These attribute key names are influenced by the proto message keys. + AttributeTime = "time" + AttributeStartTimeUnixNano = "start_time_unix_nano" + AttributeTraceID = "trace_id" + AttributeSpanID = "span_id" + AttributeTraceState = "trace_state" + AttributeParentSpanID = "parent_span_id" + AttributeParentServiceName = "parent_service_name" + AttributeChildServiceName = "child_service_name" + AttributeCallCount = "call_count" + AttributeSpansQueueDepth = "spans_queue_depth" + AttributeSpansDropped = "spans_dropped" + AttributeName = "name" + AttributeSpanKind = "kind" + AttributeEndTimeUnixNano = "end_time_unix_nano" + AttributeDurationNano = "duration_nano" + AttributeDroppedAttributesCount = "dropped_attributes_count" + AttributeDroppedEventsCount = "dropped_events_count" + AttributeDroppedLinksCount = "dropped_links_count" + AttributeAttributes = "attributes" + AttributeLinkedTraceID = "linked_trace_id" + AttributeLinkedSpanID = "linked_span_id" + AttributeSeverityNumber = "severity_number" + AttributeSeverityText = "severity_text" + AttributeBody = "body" + + LogTable = "log" + LogAttributeTable = "log_attribute" + LogResourceAttributeTable = "log_resource_attribute" + LogScopeAttributeTable = "log_scope_attribute" + + TraceSpanTable = "trace_span" + TraceSpanAttributeTable = "trace_span_attribute" + TraceResourceAttributeTable = "trace_resource_attribute" + TraceScopeAttributeTable = "trace_scope_attribute" + TraceEventAttributeTable = "trace_event_attribute" + TraceLinkAttributeTable = "trace_link_attribute" + + GaugeTable = "metric_gauge" + GaugeDatapointTable = "metric_gauge_datapoint" + GaugeDatapointAttributeTable = "metric_gauge_datapoint_attribute" + GaugeDatapointExemplarTable = "metric_gauge_datapoint_exemplar" + GaugeDatapointExemplarAttributeTable = "metric_gauge_datapoint_exemplar_attribute" + GaugeResourceAttributeTable = "metric_gauge_resource_attribute" + GaugeScopeAttributeTable = "metric_gauge_scope_attribute" + + SumTable = "metric_sum" + SumResourceAttributeTable = "metric_sum_resource_attribute" + SumScopeAttributeTable = "metric_sum_scope_attribute" + SumDatapointTable = "metric_sum_datapoint" + SumDatapointAttributeTable = "metric_sum_datapoint_attribute" + SumDatapointExemplarTable = "metric_sum_datapoint_exemplar" + SumDataPointExemplarAttributeTable = "metric_sum_datapoint_exemplar_attribute" + + HistogramTable = "metric_histogram" + HistogramResourceAttributeTable = "metric_histogram_resource_attribute" + HistogramScopeAttributeTable = "metric_histogram_scope_attribute" + HistogramDatapointTable = "metric_histogram_datapoint" + HistogramDatapointAttributeTable = "metric_histogram_datapoint_attribute" + HistogramBucketCountsTable = "metric_histogram_datapoint_bucket_count" + HistogramExplicitBoundsTable = "metric_histogram_datapoint_explicit_bound" + HistogramDatapointExemplarTable = "metric_histogram_datapoint_exemplar" + HistogramDataPointExemplarAttributeTable = "metric_histogram_datapoint_exemplar_attribute" + + ExpHistogramTable = "metric_exp_histogram" + ExpHistogramResourceAttributeTable = "metric_exp_histogram_resource_attribute" + ExpHistogramScopeAttributeTable = "metric_exp_histogram_scope_attribute" + ExpHistogramDatapointTable = "metric_exp_histogram_datapoint" + ExpHistogramDatapointAttributeTable = "metric_exp_histogram_datapoint_attribute" + ExpHistogramPositiveBucketCountsTable = "metric_exp_histogram_datapoint_bucket_positive_count" + ExpHistogramNegativeBucketCountsTable = "metric_exp_histogram_datapoint_bucket_negative_count" + ExpHistogramDatapointExemplarTable = "metric_exp_histogram_datapoint_exemplar" + ExpHistogramDataPointExemplarAttributeTable = "metric_exp_histogram_datapoint_exemplar_attribute" + + SummaryTable = "metric_summary" + SummaryResourceAttributeTable = "metric_summary_resource_attribute" + SummaryScopeAttributeTable = "metric_summary_scope_attribute" + SummaryDatapointTable = "metric_summary_datapoint" + SummaryDatapointAttributeTable = "metric_summary_datapoint_attribute" + SummaryDatapointQuantileValueTable = "metric_summary_datapoint_quantile_values" + + ChunkSize = 10000 +) + +const ( + CreateSchema string = "create schema if not exists %s;" + + HasTable string = "execute endpoint '/has/table' JSON '{\"table_name\":\"%s\"}'" + + // Metrics - DDLs + // Gauge + CreateGauge string = `CREATE TABLE %smetric_gauge + ( + gauge_id UUID (primary_key, shard_key) not null, + metric_name varchar(256) not null, + metric_description varchar (256), + metric_unit varchar (256) + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateGaugeDatapoint string = `CREATE TABLE %smetric_gauge_datapoint + ( + gauge_id UUID (primary_key, shard_key) not null, + id UUID (primary_key) not null, + start_time_unix TIMESTAMP NOT NULL, + time_unix TIMESTAMP NOT NULL, + gauge_value DOUBLE, + flags INT, + FOREIGN KEY (gauge_id) references %smetric_gauge(gauge_id) as fk_gauge_datapoint + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateGaugeDatapointAttribute string = `CREATE TABLE %smetric_gauge_datapoint_attribute + ( + "gauge_id" UUID (primary_key, shard_key) NOT NULL, + datapoint_id uuid (primary_key) not null, + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + FOREIGN KEY (gauge_id) references %smetric_gauge(gauge_id) as fk_gauge_datapoint_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateGaugeDatapointExemplar string = `CREATE TABLE %smetric_gauge_datapoint_exemplar + ( + "gauge_id" UUID (primary_key, shard_key) NOT NULL, + datapoint_id uuid (primary_key) not null, + exemplar_id UUID (primary_key) not null, + time_unix TIMESTAMP NOT NULL, + gauge_value DOUBLE, + "trace_id" VARCHAR (32), + "span_id" VARCHAR (16), + FOREIGN KEY (gauge_id) references %smetric_gauge(gauge_id) as fk_gauge_datapoint_exemplar + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateGaugeDatapointExemplarAttribute string = `CREATE TABLE %smetric_gauge_datapoint_exemplar_attribute + ( + "gauge_id" UUID (primary_key, shard_key) NOT NULL, + datapoint_id uuid (primary_key) not null, + exemplar_id UUID (primary_key) not null, + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + FOREIGN KEY (gauge_id) references %smetric_gauge(gauge_id) as fk_gauge_datapoint_exemplar_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateGaugeResourceAttribute string = `CREATE TABLE %smetric_gauge_resource_attribute + ( + "gauge_id" UUID (primary_key) NOT NULL, + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + SHARD KEY (gauge_id), + FOREIGN KEY (gauge_id) references %smetric_gauge(gauge_id) as fk_gauge_resource_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateGaugeScopeAttribute string = `CREATE TABLE %smetric_gauge_scope_attribute + ( + "gauge_id" UUID (primary_key) NOT NULL, + "name" VARCHAR (256), + "version" VARCHAR (256), + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + SHARD KEY (gauge_id), + FOREIGN KEY (gauge_id) references %smetric_gauge(gauge_id) as fk_gauge_scope_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + // Sum + + CreateSum string = `CREATE TABLE %smetric_sum + ( + sum_id UUID (primary_key, shard_key) not null, + metric_name varchar (256) not null, + metric_description varchar (256), + metric_unit varchar (256), + aggregation_temporality INTEGER, + is_monotonic BOOLEAN + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateSumDatapoint string = `CREATE TABLE %smetric_sum_datapoint + ( + sum_id UUID (primary_key, shard_key) not null, + id UUID (primary_key) not null, + start_time_unix TIMESTAMP NOT NULL, + time_unix TIMESTAMP NOT NULL, + sum_value DOUBLE, + flags INT, + FOREIGN KEY (sum_id) references %smetric_sum(sum_id) as fk_sum_datapoint + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateSumDatapointAttribute string = `CREATE TABLE %smetric_sum_datapoint_attribute + ( + "sum_id" UUID (primary_key, shard_key) NOT NULL, + datapoint_id uuid (primary_key) not null, + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + FOREIGN KEY (sum_id) references %smetric_sum(sum_id) as fk_sum_datapoint_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateSumDatapointExemplar string = `CREATE TABLE %smetric_sum_datapoint_exemplar + ( + "sum_id" UUID (primary_key, shard_key) NOT NULL, + datapoint_id uuid (primary_key) not null, + exemplar_id UUID (primary_key) not null, + time_unix TIMESTAMP NOT NULL, + sum_value DOUBLE, + "trace_id" VARCHAR (32), + "span_id" VARCHAR (16), + FOREIGN KEY (sum_id) references %smetric_sum(sum_id) as fk_sum_datapoint_exemplar + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateSumDatapointExemplarAttribute string = `CREATE TABLE %smetric_sum_datapoint_exemplar_attribute + ( + "sum_id" UUID (primary_key, shard_key) NOT NULL, + datapoint_id uuid (primary_key) not null, + exemplar_id UUID (primary_key) not null, + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + FOREIGN KEY (sum_id) references %smetric_sum(sum_id) as fk_sum_datapoint_exemplar_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateSumResourceAttribute string = `CREATE TABLE %smetric_sum_resource_attribute + ( + "sum_id" UUID (primary_key) NOT NULL, + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + SHARD KEY (sum_id), + FOREIGN KEY (sum_id) references %smetric_sum(sum_id) as fk_sum_resource_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateSumScopeAttribute string = `CREATE TABLE %smetric_sum_scope_attribute + ( + "sum_id" UUID (primary_key) NOT NULL, + "name" VARCHAR (256), + "version" VARCHAR (256), + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + SHARD KEY (sum_id), + FOREIGN KEY (sum_id) references %smetric_sum(sum_id) as fk_sum_scope_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + + // Histogram + + CreateHistogram string = `CREATE TABLE %smetric_histogram + ( + histogram_id UUID (primary_key, shard_key) not null, + metric_name varchar (256) not null, + metric_description varchar (256), + metric_unit varchar (256), + aggregation_temporality int8 + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + + CreateHistogramDatapoint string = `CREATE TABLE %smetric_histogram_datapoint + ( + histogram_id UUID (primary_key, shard_key) not null, + id UUID (primary_key) not null, + start_time_unix TIMESTAMP, + time_unix TIMESTAMP NOT NULL, + count LONG, + data_sum DOUBLE, + data_min DOUBLE, + data_max DOUBLE, + flags INT, + FOREIGN KEY (histogram_id) references %smetric_histogram(histogram_id) as fk_histogram_datapoint + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateHistogramDatapointBucketCount string = `CREATE TABLE %smetric_histogram_datapoint_bucket_count + ( + histogram_id UUID (primary_key, shard_key) not null, + datapoint_id UUID (primary_key) not null, + count_id UUID (primary_key) not null, + count LONG, + FOREIGN KEY (histogram_id) references %smetric_histogram(histogram_id) as fk_histogram_datapoint_bucket_count + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateHistogramDatapointExplicitBound string = `CREATE TABLE %smetric_histogram_datapoint_explicit_bound + ( + histogram_id UUID (primary_key, shard_key) not null, + datapoint_id UUID (primary_key) not null, + bound_id UUID (primary_key) not null, + explicit_bound DOUBLE, + FOREIGN KEY (histogram_id) references %smetric_histogram(histogram_id) as fk_histogram_datapoint_explicit_bound + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateHistogramDatapointAttribute string = `CREATE TABLE %smetric_histogram_datapoint_attribute + ( + "histogram_id" UUID (primary_key, shard_key) NOT NULL, + datapoint_id uuid (primary_key) not null, + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + FOREIGN KEY (histogram_id) references %smetric_histogram(histogram_id) as fk_histogram_datapoint_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateHistogramDatapointExemplar string = `CREATE TABLE %smetric_histogram_datapoint_exemplar + ( + "histogram_id" UUID (primary_key, shard_key) NOT NULL, + datapoint_id uuid (primary_key) not null, + exemplar_id UUID (primary_key) not null, + time_unix TIMESTAMP NOT NULL, + histogram_value DOUBLE, + "trace_id" VARCHAR (32), + "span_id" VARCHAR (16), + FOREIGN KEY (histogram_id) references %smetric_histogram(histogram_id) as fk_histogram_datapoint_exemplar + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateHistogramDatapointExemplarAttribute string = `CREATE TABLE %smetric_histogram_datapoint_exemplar_attribute + ( + "histogram_id" UUID (primary_key, shard_key) NOT NULL, + datapoint_id uuid (primary_key) not null, + exemplar_id UUID (primary_key) not null, + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + FOREIGN KEY (histogram_id) references %smetric_histogram(histogram_id) as fk_histogram_datapoint_exemplar_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateHistogramResourceAttribute string = `CREATE TABLE %smetric_histogram_resource_attribute + ( + "histogram_id" UUID (primary_key) NOT NULL, + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + SHARD KEY (histogram_id), + FOREIGN KEY (histogram_id) references %smetric_histogram(histogram_id) as fk_histogram_resource_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateHistogramScopeAttribute string = `CREATE TABLE %smetric_histogram_scope_attribute + ( + "histogram_id" UUID (primary_key) NOT NULL, + "name" VARCHAR (256), + "version" VARCHAR (256), + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + SHARD KEY (histogram_id), + FOREIGN KEY (histogram_id) references %smetric_histogram(histogram_id) as fk_histogram_scope_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + // exponential Histogram + CreateExpHistogram string = `CREATE TABLE %smetric_exp_histogram + ( + histogram_id UUID (primary_key, shard_key) not null, + metric_name varchar (256) not null, + metric_description varchar (256), + metric_unit varchar (256), + aggregation_temporality int8 + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateExpHistogramDatapoint string = `CREATE TABLE %smetric_exp_histogram_datapoint + ( + histogram_id UUID (primary_key, shard_key) not null, + id UUID (primary_key) not null, + start_time_unix TIMESTAMP, + time_unix TIMESTAMP NOT NULL, + count LONG, + data_sum DOUBLE, + scale INTEGER, + zero_count LONG, + buckets_positive_offset INTEGER, + buckets_negative_offset INTEGER, + data_min DOUBLE, + data_max DOUBLE, + flags INT, + FOREIGN KEY (histogram_id) references %smetric_exp_histogram(histogram_id) as fk_exp_histogram_datapoint + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateExpHistogramDatapointBucketPositiveCount string = `CREATE TABLE %smetric_exp_histogram_datapoint_bucket_positive_count + ( + histogram_id UUID (primary_key, shard_key) not null, + datapoint_id UUID (primary_key) not null, + count_id UUID (primary_key) not null, + count LONG, + FOREIGN KEY (histogram_id) references %smetric_exp_histogram(histogram_id) as fk_exp_histogram_datapoint_bucket_count + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateExpHistogramDatapointBucketNegativeCount string = `CREATE TABLE %smetric_exp_histogram_datapoint_bucket_negative_count + ( + histogram_id UUID (primary_key, shard_key) not null, + datapoint_id UUID (primary_key) not null, + count_id UUID (primary_key) not null, + count LONG, + FOREIGN KEY (histogram_id) references %smetric_exp_histogram(histogram_id) as fk_exp_histogram_datapoint_bucket_count + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateExpHistogramDatapointAttribute string = `CREATE TABLE %smetric_exp_histogram_datapoint_attribute + ( + "histogram_id" UUID (primary_key, shard_key) NOT NULL, + datapoint_id uuid (primary_key) not null, + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + FOREIGN KEY (histogram_id) references %smetric_exp_histogram(histogram_id) as fk_exp_histogram_datapoint_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateExpHistogramDatapointExemplar string = `CREATE TABLE %smetric_exp_histogram_datapoint_exemplar + ( + "histogram_id" UUID (primary_key, shard_key) NOT NULL, + datapoint_id uuid (primary_key) not null, + exemplar_id UUID (primary_key) not null, + time_unix TIMESTAMP NOT NULL, + sum_value DOUBLE, + "trace_id" VARCHAR (32), + "span_id" VARCHAR (16), + FOREIGN KEY (histogram_id) references %smetric_exp_histogram(histogram_id) as fk_exp_histogram_datapoint_exemplar + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateExpHistogramDatapointExemplarAttribute string = `CREATE TABLE %smetric_exp_histogram_datapoint_exemplar_attribute + ( + "histogram_id" UUID (primary_key, shard_key) NOT NULL, + datapoint_id uuid (primary_key) not null, + exemplar_id UUID (primary_key) not null, + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + FOREIGN KEY (histogram_id) references %smetric_exp_histogram(histogram_id) as fk_exp_histogram_datapoint_exemplar_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateExpHistogramResourceAttribute string = `CREATE TABLE %smetric_exp_histogram_resource_attribute + ( + "histogram_id" UUID (primary_key) NOT NULL, + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + SHARD KEY (histogram_id), + FOREIGN KEY (histogram_id) references %smetric_histogram(histogram_id) as fk_histogram_resource_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateExpHistogramScopeAttribute string = `CREATE TABLE %smetric_exp_histogram_scope_attribute + ( + "histogram_id" UUID (primary_key) NOT NULL, + "name" VARCHAR (256), + "version" VARCHAR (256), + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + SHARD KEY (histogram_id), + FOREIGN KEY (histogram_id) references %smetric_histogram(histogram_id) as fk_histogram_scope_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + // Summary + CreateSummary string = `CREATE TABLE %smetric_summary + ( + summary_id UUID (primary_key, shard_key) not null, + metric_name varchar (256) not null, + metric_description varchar (256), + metric_unit varchar (256) + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateSummaryDatapoint string = `CREATE TABLE %smetric_summary_datapoint + ( + summary_id UUID (primary_key, shard_key) not null, + id UUID (primary_key) not null, + start_time_unix TIMESTAMP, + time_unix TIMESTAMP NOT NULL, + count LONG, + data_sum DOUBLE, + flags INT, + FOREIGN KEY (summary_id) references %smetric_summary(summary_id) as fk_summary_datapoint + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateSummaryDatapointAttribute string = `CREATE TABLE %smetric_summary_datapoint_attribute + ( + "summary_id" UUID (primary_key, shard_key) NOT NULL, + datapoint_id uuid (primary_key) not null, + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + FOREIGN KEY (summary_id) references %smetric_summary(summary_id) as fk_summary_datapoint_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateSummaryDatapointQuantileValues string = `CREATE TABLE %smetric_summary_datapoint_quantile_values + ( + summary_id UUID (primary_key, shard_key) not null, + datapoint_id UUID (primary_key) not null, + quantile_id UUID (primary_key) not null, + quantile DOUBLE, + value DOUBLE, + FOREIGN KEY (summary_id) references %smetric_summary(summary_id) as fk_summary_datapoint_quantile + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateSummaryResourceAttribute string = `CREATE TABLE %smetric_summary_resource_attribute + ( + "summary_id" UUID (primary_key) NOT NULL, + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + SHARD KEY (summary_id), + FOREIGN KEY (summary_id) references %smetric_summary(summary_id) as fk_summary_resource_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` + CreateSummaryScopeAttribute string = `CREATE TABLE %smetric_summary_scope_attribute + ( + "summary_id" UUID (primary_key) NOT NULL, + "name" VARCHAR (256), + "version" VARCHAR (256), + "key" VARCHAR (primary_key, 128, dict) NOT NULL, + "string_value" VARCHAR (256), + "bool_value" BOOLEAN, + "int_value" INTEGER, + "double_value" DOUBLE, + "bytes_value" BLOB (store_only), + SHARD KEY (summary_id), + FOREIGN KEY (summary_id) references %smetric_summary(summary_id) as fk_summary_scope_attribute + ) USING TABLE PROPERTIES (NO_ERROR_IF_EXISTS = TRUE); + ` +) + +// ValueTypePair - struct to wrap a value as [any] and its type [pcommon.ValueType] +type ValueTypePair struct { + value any + valueType pcommon.ValueType +} + +// attributeValueToKineticaFieldValue - Convert an attribute value to a [ValueTypePair] for writing to Kinetica +// +// @param value +// @return ValueTypePair +// @return error +func attributeValueToKineticaFieldValue(value pcommon.Value) (ValueTypePair, error) { + switch value.Type() { + case pcommon.ValueTypeStr: + var val string + if len(value.Str()) > 256 { + val = value.Str()[0:255] + } else { + val = value.Str() + } + return ValueTypePair{val, pcommon.ValueTypeStr}, nil + case pcommon.ValueTypeInt: + return ValueTypePair{value.Int(), pcommon.ValueTypeInt}, nil + case pcommon.ValueTypeDouble: + return ValueTypePair{value.Double(), pcommon.ValueTypeDouble}, nil + case pcommon.ValueTypeBool: + return ValueTypePair{value.Bool(), pcommon.ValueTypeBool}, nil + case pcommon.ValueTypeMap: + jsonBytes, err := json.Marshal(otlpKeyValueListToMap(value.Map())) + if err != nil { + return ValueTypePair{nil, pcommon.ValueTypeEmpty}, err + } + return ValueTypePair{string(jsonBytes), pcommon.ValueTypeStr}, nil + case pcommon.ValueTypeSlice: + jsonBytes, err := json.Marshal(otlpArrayToSlice(value.Slice())) + if err != nil { + return ValueTypePair{nil, pcommon.ValueTypeEmpty}, err + } + return ValueTypePair{string(jsonBytes), pcommon.ValueTypeStr}, nil + case pcommon.ValueTypeEmpty: + return ValueTypePair{nil, pcommon.ValueTypeEmpty}, nil + default: + return ValueTypePair{nil, pcommon.ValueTypeEmpty}, fmt.Errorf("Unknown value type %v", value) + } +} + +// otlpKeyValueListToMap - Convert an otlp Map to a map[string]interface{} with proper type conversions +// +// @param kvList +// @return map +func otlpKeyValueListToMap(kvList pcommon.Map) map[string]any { + m := make(map[string]any, kvList.Len()) + kvList.Range(func(k string, v pcommon.Value) bool { + switch v.Type() { + case pcommon.ValueTypeStr: + m[k] = v.Str() + case pcommon.ValueTypeInt: + m[k] = v.Int() + case pcommon.ValueTypeDouble: + m[k] = v.Double() + case pcommon.ValueTypeBool: + m[k] = v.Bool() + case pcommon.ValueTypeMap: + m[k] = otlpKeyValueListToMap(v.Map()) + case pcommon.ValueTypeSlice: + m[k] = otlpArrayToSlice(v.Slice()) + case pcommon.ValueTypeEmpty: + m[k] = nil + default: + m[k] = fmt.Sprintf(" %v", v) + } + return true + }) + return m +} + +// otlpArrayToSlice - Convert an otlp slice to a slice of interface{} with proper type conversions +// +// @param arr +// @return []interface{} +func otlpArrayToSlice(arr pcommon.Slice) []any { + s := make([]any, 0, arr.Len()) + for i := 0; i < arr.Len(); i++ { + v := arr.At(i) + switch v.Type() { + case pcommon.ValueTypeStr: + s = append(s, v.Str()) + case pcommon.ValueTypeInt: + s = append(s, v.Int()) + case pcommon.ValueTypeDouble: + s = append(s, v.Double()) + case pcommon.ValueTypeBool: + s = append(s, v.Bool()) + case pcommon.ValueTypeEmpty: + s = append(s, nil) + default: + s = append(s, fmt.Sprintf(" %v", v)) + } + } + return s +} + +// getAttributeValue +// +// @param vtPair +// @return *AttributeValue +// @return error +func getAttributeValue(vtPair ValueTypePair) (*AttributeValue, error) { + var av *AttributeValue + var err error + switch vtPair.valueType { + case pcommon.ValueTypeStr: + value := vtPair.value.(string) + av = new(AttributeValue) + av.StringValue = value + case pcommon.ValueTypeInt: + value := vtPair.value.(int) + av = new(AttributeValue) + av.IntValue = value + case pcommon.ValueTypeDouble: + value := vtPair.value.(float64) + av = new(AttributeValue) + av.DoubleValue = value + case pcommon.ValueTypeBool: + value := vtPair.value.(int8) + av = new(AttributeValue) + av.BoolValue = value + case pcommon.ValueTypeBytes: + value := vtPair.value.([]byte) + av = new(AttributeValue) + copy(av.BytesValue, value) + case pcommon.ValueTypeMap: + // value := vtPair.value + // av = new(AttributeValue) + // av.SetStringValue(value) + err = fmt.Errorf("Unhandled value type %v", vtPair.valueType) + + case pcommon.ValueTypeSlice: + // value := vtPair.value.(string) + // av = new(AttributeValue) + // av.SetStringValue(value) + err = fmt.Errorf("Unhandled value type %v", vtPair.valueType) + + default: + err = fmt.Errorf("Unknown value type %v", vtPair.valueType) + } + + if err != nil { + return nil, err + } + + return av, nil + +} + +// chunkBySize - Splits a slice into multiple slices of the given size +// +// @param items +// @param chunkSize +// @return [][]T +func chunkBySize[T any](items []T, chunkSize int) [][]T { + var _chunks = make([][]T, 0, (len(items)/chunkSize)+1) + for chunkSize < len(items) { + items, _chunks = items[chunkSize:], append(_chunks, items[0:chunkSize:chunkSize]) + } + return append(_chunks, items) +} diff --git a/exporter/kineticaexporter/config.go b/exporter/kineticaexporter/config.go index 701e40077585..a90b7baeaad8 100644 --- a/exporter/kineticaexporter/config.go +++ b/exporter/kineticaexporter/config.go @@ -18,7 +18,6 @@ type Config struct { Username string `mapstructure:"username"` Password configopaque.String `mapstructure:"password"` BypassSslCertCheck bool `mapstructure:"bypasssslcertcheck"` - LogConfigFile string `mapstructure:"logconfigfile"` } // Validate the config diff --git a/exporter/kineticaexporter/config_test.go b/exporter/kineticaexporter/config_test.go index 19e08f37d494..8d5517b78e92 100644 --- a/exporter/kineticaexporter/config_test.go +++ b/exporter/kineticaexporter/config_test.go @@ -29,7 +29,7 @@ func TestLoadConfig(t *testing.T) { }{ { - id: component.NewIDWithName("kinetica", ""), + id: component.MustNewIDWithName("kinetica", ""), expected: defaultCfg, }, } diff --git a/exporter/kineticaexporter/exporter_metric_test.go b/exporter/kineticaexporter/exporter_metric_test.go new file mode 100644 index 000000000000..49677fa1b383 --- /dev/null +++ b/exporter/kineticaexporter/exporter_metric_test.go @@ -0,0 +1,524 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package kineticaexporter + +import ( + "context" + "fmt" + "io" + "net/http" + "net/http/httptest" + "os" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.uber.org/zap/zaptest" +) + +var testServer *httptest.Server +var baseURL string + +var showTableMetricSummaryResponse = "\x04OK\x00&show_table_response\xfe\x13&otel.metric_summary\x02&otel.metric_summary\x00\x02\x00\x00\x02(14940230562727554683\x00\x02\xc6\x03{\"type\":\"record\",\"name\":\"type_name\",\"fields\":[{\"name\":\"summary_id\",\"type\":\"string\"},{\"name\":\"metric_name\",\"type\":\"string\"},{\"name\":\"metric_description\",\"type\":[\"string\",\"null\"]},{\"name\":\"metric_unit\",\"type\":[\"string\",\"null\"]}]}\x00\x02\x00\x00\x02\x08$metric_description\x06\x08data\x0echar256\x10nullable\x00\x16metric_name\x04\x08data\x0echar256\x00\x16metric_unit\x06\x08data\x0echar256\x10nullable\x00\x14summary_id\x08\x08data\x16primary_key\x12shard_key\x08uuid\x00\x00\x00\x028\"attribute_indexes\x00 collection_names\x08otel$compressed_columns\x000datasource_subscriptions\x00\x18foreign_keys\x00\"foreign_shard_key\x00$global_access_mode\x14read_write,is_automatic_partition\nfalse\x10is_dirty\x00\"is_view_persisted\x00\"last_refresh_time\x00(owner_resource_group ", string(finalResponseBytes)) + + _, err = w.Write(finalResponseBytes) + if err != nil { + http.Error(w, "Error wrting reesponse", http.StatusInternalServerError) + return + } + +} + +func getShowTableResponse(requestBody string) []byte { + switch { + case strings.Contains(requestBody, "metric_summary_scope_attribute"): + return []byte(showTableMetricSummaryScopeAttributesResponse) + case strings.Contains(requestBody, "metric_summary_resource_attribute"): + return []byte(showTableMetricSummaryResourceAttributesResponse) + case strings.Contains(requestBody, "metric_summary_datapoint_quantile_values"): + return []byte(showTableMetricSummaryDatapointQuantileValuesResponse) + case strings.Contains(requestBody, "metric_summary_datapoint_attribute"): + return []byte(showTableMetricSummaryDatapointAttributeResponse) + case strings.Contains(requestBody, "metric_summary_datapoint"): + return []byte(showTableMetricSummaryDatapointResponse) + case strings.Contains(requestBody, "metric_summary"): + return []byte(showTableMetricSummaryResponse) + default: + return []byte("") + } + +} + +// Setup function (runs before tests start) +func TestMain(m *testing.M) { + // Create a test server with a simple handler function + testServer = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + fmt.Println("In main ...") + switch r.URL.Path { + case "/insert/records": + handleInsertRecords(w, r) + case "/show/table": + handleShowTable(w, r) + case "/execute/sql": + handleExecuteSQL(w, r) + default: + http.Error(w, "Not found", http.StatusNotFound) + } + })) + + baseURL = testServer.URL // Store the base URL for test requests + + // Run the tests + code := m.Run() + + // Teardown: Close the test server after all tests are finished + testServer.Close() + // Perform any other teardown operations here if needed + + // Exit with the test status code + // This allows TestMain to report the result of the tests + // You can also perform further actions based on the test results + os.Exit(code) +} diff --git a/exporter/kineticaexporter/generated_component_test.go b/exporter/kineticaexporter/generated_component_test.go new file mode 100644 index 000000000000..b2ce8ed923d7 --- /dev/null +++ b/exporter/kineticaexporter/generated_component_test.go @@ -0,0 +1,101 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package kineticaexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/kineticaexporter/go.mod b/exporter/kineticaexporter/go.mod index ea3a942c5ab9..3e5332d1bed1 100644 --- a/exporter/kineticaexporter/go.mod +++ b/exporter/kineticaexporter/go.mod @@ -1,50 +1,75 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kineticaexporter -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/google/uuid v1.6.0 + github.com/kineticadb/kinetica-api-go v0.0.3 + github.com/samber/lo v1.39.0 + github.com/stretchr/testify v1.9.0 + github.com/wk8/go-ordered-map/v2 v2.1.8 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/multierr v1.11.0 + go.uber.org/zap v1.27.0 + gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/bahlo/generic-list-go v0.2.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/buger/jsonparser v1.1.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-resty/resty/v2 v2.7.0 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/hamba/avro/v2 v2.13.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/knadh/koanf/v2 v2.1.1 // indirect + github.com/logrusorgru/aurora v2.0.3+incompatible // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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.1-0.20181226105442-5d4384ee4fb2 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/ztrue/tracerr v0.3.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230911183012-2d3300fd4832 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/kineticaexporter/go.sum b/exporter/kineticaexporter/go.sum index 1c52c4b651e2..595faf29ee26 100644 --- a/exporter/kineticaexporter/go.sum +++ b/exporter/kineticaexporter/go.sum @@ -1,72 +1,67 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= +github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= +github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -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/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= +github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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/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/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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hamba/avro/v2 v2.13.0 h1:QY2uX2yvJTW0OoMKelGShvq4v1hqab6CxJrPwh0fnj0= +github.com/hamba/avro/v2 v2.13.0/go.mod h1:Q9YK+qxAhtVrNqOhwlZTATLgLA8qxG2vtvkhK8fJ7Jo= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= 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/kineticadb/kinetica-api-go v0.0.3 h1:DXBe/VYr5WGjQNZG+5ETBVJiFq7bMKpgB1/U5c7NcW0= +github.com/kineticadb/kinetica-api-go v0.0.3/go.mod h1:mbazf5lM5ApXXF3eRelAY76BhFWpVyuXhWv3vmTJixA= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8= +github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +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= @@ -77,103 +72,101 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/samber/lo v1.39.0 h1:4gTz1wUhNYLhFSKl6O+8peW0v2F4BCY034GRpU9WnuA= +github.com/samber/lo v1.39.0/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= +github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +github.com/ztrue/tracerr v0.3.0 h1:lDi6EgEYhPYPnKcjsYzmWw4EkFEoA/gfe+I9Y5f+h6Y= +github.com/ztrue/tracerr v0.3.0/go.mod h1:qEalzze4VN9O8tnhBXScfCrmoJo10o8TN5ciKjm6Mww= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 h1:qCEDpW1G+vcj3Y7Fy52pEM1AWm3abj8WimGYejI3SC4= +golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/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= @@ -181,38 +174,20 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230911183012-2d3300fd4832 h1:o4LtQxebKIJ4vkzyhtD2rfUNZ20Zf0ik5YVP5E7G7VE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230911183012-2d3300fd4832/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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/exporter/kineticaexporter/internal/metadata/generated_status.go b/exporter/kineticaexporter/internal/metadata/generated_status.go index 8ce647f25c4b..f0c0f4c69e8b 100644 --- a/exporter/kineticaexporter/internal/metadata/generated_status.go +++ b/exporter/kineticaexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("kinetica") ) const ( - Type = "kinetica" MetricsStability = component.StabilityLevelDevelopment TracesStability = component.StabilityLevelDevelopment LogsStability = component.StabilityLevelDevelopment ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/kinetica") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/kinetica") +} diff --git a/exporter/kineticaexporter/metadata.yaml b/exporter/kineticaexporter/metadata.yaml index 63137132f7e3..aaa519c61567 100644 --- a/exporter/kineticaexporter/metadata.yaml +++ b/exporter/kineticaexporter/metadata.yaml @@ -1,4 +1,5 @@ type: kinetica +scope_name: otelcol/kinetica status: class: exporter @@ -7,3 +8,8 @@ status: distributions: [] codeowners: active: [am-kinetica, TylerHelmuth] + + +# TODO: Update the exporter to pass the tests +tests: + skip_lifecycle: true \ No newline at end of file diff --git a/exporter/kineticaexporter/metrics_exporter.go b/exporter/kineticaexporter/metrics_exporter.go index c5fd6484b864..790bfa5a7bee 100644 --- a/exporter/kineticaexporter/metrics_exporter.go +++ b/exporter/kineticaexporter/metrics_exporter.go @@ -5,26 +5,238 @@ package kineticaexporter // import "github.com/open-telemetry/opentelemetry-coll import ( "context" + "fmt" + "strings" + "github.com/google/uuid" + "github.com/samber/lo" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" + "go.uber.org/multierr" "go.uber.org/zap" ) +// Metrics handling + +type kineticaGaugeRecord struct { + gauge *Gauge + resourceAttribute []GaugeResourceAttribute + scopeAttribute []GaugeScopeAttribute + datapoint []GaugeDatapoint + datapointAttribute []GaugeDatapointAttribute + exemplars []GaugeDatapointExemplar + exemplarAttribute []GaugeDataPointExemplarAttribute +} + +type kineticaSumRecord struct { + sum *Sum + sumResourceAttribute []SumResourceAttribute + sumScopeAttribute []SumScopeAttribute + datapoint []SumDatapoint + datapointAttribute []SumDataPointAttribute + exemplars []SumDatapointExemplar + exemplarAttribute []SumDataPointExemplarAttribute +} + +type kineticaHistogramRecord struct { + histogram *Histogram + histogramResourceAttribute []HistogramResourceAttribute + histogramScopeAttribute []HistogramScopeAttribute + histogramDatapoint []HistogramDatapoint + histogramDatapointAtribute []HistogramDataPointAttribute + histogramBucketCount []HistogramDatapointBucketCount + histogramExplicitBound []HistogramDatapointExplicitBound + exemplars []HistogramDatapointExemplar + exemplarAttribute []HistogramDataPointExemplarAttribute +} + +type kineticaExponentialHistogramRecord struct { + histogram *ExponentialHistogram + histogramResourceAttribute []ExponentialHistogramResourceAttribute + histogramScopeAttribute []ExponentialHistogramScopeAttribute + histogramDatapoint []ExponentialHistogramDatapoint + histogramDatapointAttribute []ExponentialHistogramDataPointAttribute + histogramBucketNegativeCount []ExponentialHistogramBucketNegativeCount + histogramBucketPositiveCount []ExponentialHistogramBucketPositiveCount + exemplars []ExponentialHistogramDatapointExemplar + exemplarAttribute []ExponentialHistogramDataPointExemplarAttribute +} + +type kineticaSummaryRecord struct { + summary *Summary + summaryDatapoint []SummaryDatapoint + summaryDatapointAttribute []SummaryDataPointAttribute + summaryResourceAttribute []SummaryResourceAttribute + summaryScopeAttribute []SummaryScopeAttribute + summaryDatapointQuantileValues []SummaryDatapointQuantileValues +} + +var ( + gaugeTableDDLs = []string{ + CreateGauge, + CreateGaugeDatapoint, + CreateGaugeDatapointAttribute, + CreateGaugeDatapointExemplar, + CreateGaugeDatapointExemplarAttribute, + CreateGaugeResourceAttribute, + CreateGaugeScopeAttribute, + } + + sumTableDDLs = []string{ + CreateSum, + CreateSumDatapoint, + CreateSumDatapointAttribute, + CreateSumDatapointExemplar, + CreateSumDatapointExemplarAttribute, + CreateSumResourceAttribute, + CreateSumScopeAttribute, + } + + histogramTableDDLs = []string{ + CreateHistogram, + CreateHistogramDatapoint, + CreateHistogramDatapointBucketCount, + CreateHistogramDatapointExplicitBound, + CreateHistogramDatapointAttribute, + CreateHistogramDatapointExemplar, + CreateHistogramDatapointExemplarAttribute, + CreateHistogramResourceAttribute, + CreateHistogramScopeAttribute, + } + + expHistogramTableDDLs = []string{ + CreateExpHistogram, + CreateExpHistogramDatapoint, + CreateExpHistogramDatapointBucketPositiveCount, + CreateExpHistogramDatapointBucketNegativeCount, + CreateExpHistogramDatapointAttribute, + CreateExpHistogramDatapointExemplar, + CreateExpHistogramDatapointExemplarAttribute, + CreateExpHistogramResourceAttribute, + CreateExpHistogramScopeAttribute, + } + + summaryTableDDLs = []string{ + CreateSummary, + CreateSummaryDatapoint, + CreateSummaryDatapointAttribute, + CreateSummaryDatapointQuantileValues, + CreateSummaryResourceAttribute, + CreateSummaryScopeAttribute, + } +) + type kineticaMetricsExporter struct { logger *zap.Logger + writer *KiWriter } -func newMetricsExporter(_ *zap.Logger, _ *Config) *kineticaMetricsExporter { +func newMetricsExporter(logger *zap.Logger, cfg *Config) *kineticaMetricsExporter { + kineticaLogger := logger + writer := newKiWriter(context.TODO(), *cfg, kineticaLogger) metricsExp := &kineticaMetricsExporter{ - logger: nil, + logger: kineticaLogger, + writer: writer, } return metricsExp } -func (e *kineticaMetricsExporter) start(_ context.Context, _ component.Host) error { +func (e *kineticaMetricsExporter) start(ctx context.Context, _ component.Host) error { - return nil + fmt.Println("SCHEMA NAME - ", e.writer.cfg.Schema) + + if e.writer.cfg.Schema != "" && len(e.writer.cfg.Schema) != 0 { + // Config has a schema name + if err := createSchema(ctx, e.writer, e.writer.cfg); err != nil { + return err + } + } + err := createMetricTables(ctx, e.writer) + return err +} + +// createMetricTables +// +// @param ctx +// @param kiWriter +// @return error +func createMetricTables(ctx context.Context, kiWriter *KiWriter) error { + var errs []error + + // create gauge tables + err := createTablesForMetricType(ctx, gaugeTableDDLs, kiWriter) + if err != nil { + errs = append(errs, err) + } + + // create sum tables + err = createTablesForMetricType(ctx, sumTableDDLs, kiWriter) + if err != nil { + errs = append(errs, err) + } + + // create histogram tables + err = createTablesForMetricType(ctx, histogramTableDDLs, kiWriter) + if err != nil { + errs = append(errs, err) + } + + // create exponential histogram tables + err = createTablesForMetricType(ctx, expHistogramTableDDLs, kiWriter) + if err != nil { + errs = append(errs, err) + } + + // create summary tables + err = createTablesForMetricType(ctx, summaryTableDDLs, kiWriter) + if err != nil { + errs = append(errs, err) + } + + return multierr.Combine(errs...) +} + +func createTablesForMetricType(ctx context.Context, metricTypeDDLs []string, kiWriter *KiWriter) error { + var errs []error + + var schema string + schema = strings.Trim(kiWriter.cfg.Schema, " ") + if len(schema) > 0 { + schema += "." + } else { + schema = "" + } + + lo.ForEach(metricTypeDDLs, func(ddl string, _ int) { + + stmt := strings.ReplaceAll(ddl, "%s", schema) + kiWriter.logger.Debug("Creating Table - ", zap.String("DDL", stmt)) + + _, err := kiWriter.Db.ExecuteSqlRaw(ctx, stmt, 0, 0, "", nil) + if err != nil { + kiWriter.logger.Error(err.Error()) + errs = append(errs, err) + } + }) + + return multierr.Combine(errs...) +} + +// createSchema - Create a schema +// +// @param ctx +// @param kiWriter +// @param config +// @return bool - True if schema creation successful +func createSchema(ctx context.Context, kiWriter *KiWriter, config Config) error { + stmt := fmt.Sprintf(CreateSchema, config.Schema) + kiWriter.logger.Debug(stmt) + _, err := kiWriter.Db.ExecuteSqlRaw(ctx, stmt, 0, 0, "", nil) + if err != nil { + kiWriter.logger.Error(err.Error()) + } + return err } // shutdown will shut down the exporter. @@ -38,7 +250,1386 @@ func (e *kineticaMetricsExporter) shutdown(_ context.Context) error { // @param _ ctx unused // @param md // @return error -func (e *kineticaMetricsExporter) pushMetricsData(_ context.Context, _ pmetric.Metrics) error { +func (e *kineticaMetricsExporter) pushMetricsData(_ context.Context, md pmetric.Metrics) error { - return nil + var metricType pmetric.MetricType + var errs []error + + var gaugeRecords []kineticaGaugeRecord + var sumRecords []kineticaSumRecord + var histogramRecords []kineticaHistogramRecord + var exponentialHistogramRecords []kineticaExponentialHistogramRecord + var summaryRecords []kineticaSummaryRecord + + e.logger.Debug("Resource metrics ", zap.Int("count = ", md.ResourceMetrics().Len())) + + for i := 0; i < md.ResourceMetrics().Len(); i++ { + metrics := md.ResourceMetrics().At(i) + resAttr := metrics.Resource().Attributes() + + e.logger.Debug("Scope metrics ", zap.Int("count = ", metrics.ScopeMetrics().Len())) + + for j := 0; j < metrics.ScopeMetrics().Len(); j++ { + metricSlice := metrics.ScopeMetrics().At(j).Metrics() + scopeInstr := metrics.ScopeMetrics().At(j).Scope() + scopeURL := metrics.ScopeMetrics().At(j).SchemaUrl() + + e.logger.Debug("metrics ", zap.Int("count = ", metricSlice.Len())) + + for k := 0; k < metricSlice.Len(); k++ { + + metric := metricSlice.At(k) + metricType = metric.Type() + switch metric.Type() { + case pmetric.MetricTypeGauge: + gaugeRecord, err := e.createGaugeRecord(resAttr, metrics.SchemaUrl(), scopeInstr, scopeURL, metric.Gauge(), metric.Name(), metric.Description(), metric.Unit()) + if err == nil { + gaugeRecords = append(gaugeRecords, *gaugeRecord) + e.logger.Debug("Added gauge") + } else { + e.logger.Error(err.Error()) + errs = append(errs, err) + } + case pmetric.MetricTypeSum: + sumRecord, err := e.createSumRecord(resAttr, metrics.SchemaUrl(), scopeInstr, scopeURL, metric.Sum(), metric.Name(), metric.Description(), metric.Unit()) + if err == nil { + sumRecords = append(sumRecords, *sumRecord) + e.logger.Debug("Added sum") + } else { + e.logger.Error(err.Error()) + errs = append(errs, err) + } + case pmetric.MetricTypeHistogram: + histogramRecord, err := e.createHistogramRecord(resAttr, metrics.SchemaUrl(), scopeInstr, scopeURL, metric.Histogram(), metric.Name(), metric.Description(), metric.Unit()) + if err == nil { + histogramRecords = append(histogramRecords, *histogramRecord) + e.logger.Debug("Added histogram") + } else { + e.logger.Error(err.Error()) + errs = append(errs, err) + } + case pmetric.MetricTypeExponentialHistogram: + exponentialHistogramRecord, err := e.createExponentialHistogramRecord(resAttr, metrics.SchemaUrl(), scopeInstr, scopeURL, metric.ExponentialHistogram(), metric.Name(), metric.Description(), metric.Unit()) + if err == nil { + exponentialHistogramRecords = append(exponentialHistogramRecords, *exponentialHistogramRecord) + e.logger.Debug("Added exp histogram") + } else { + e.logger.Error(err.Error()) + errs = append(errs, err) + } + case pmetric.MetricTypeSummary: + summaryRecord, err := e.createSummaryRecord(resAttr, metrics.SchemaUrl(), scopeInstr, scopeURL, metric.Summary(), metric.Name(), metric.Description(), metric.Unit()) + if err == nil { + summaryRecords = append(summaryRecords, *summaryRecord) + e.logger.Debug("Added summary") + } else { + e.logger.Error(err.Error()) + errs = append(errs, err) + } + default: + return fmt.Errorf("Unsupported metrics type") + } + + e.logger.Debug("Gauge ", zap.Int("count = ", len(gaugeRecords))) + e.logger.Debug("Sum ", zap.Int("count = ", len(sumRecords))) + e.logger.Debug("Histogram ", zap.Int("count = ", len(histogramRecords))) + e.logger.Debug("Exp Histogram ", zap.Int("count = ", len(exponentialHistogramRecords))) + e.logger.Debug("Summary ", zap.Int("count = ", len(summaryRecords))) + + if len(errs) > 0 { + e.logger.Error(multierr.Combine(errs...).Error()) + return multierr.Combine(errs...) + } + } + } + } + + e.logger.Debug("Before writing metrics into Kinetica") + + switch metricType { + case pmetric.MetricTypeGauge: + if err := e.writer.persistGaugeRecord(gaugeRecords); err != nil { + errs = append(errs, err) + e.logger.Error(err.Error()) + } + case pmetric.MetricTypeSum: + if err := e.writer.persistSumRecord(sumRecords); err != nil { + errs = append(errs, err) + e.logger.Error(err.Error()) + } + case pmetric.MetricTypeHistogram: + if err := e.writer.persistHistogramRecord(histogramRecords); err != nil { + errs = append(errs, err) + e.logger.Error(err.Error()) + } + case pmetric.MetricTypeExponentialHistogram: + if err := e.writer.persistExponentialHistogramRecord(exponentialHistogramRecords); err != nil { + errs = append(errs, err) + e.logger.Error(err.Error()) + } + case pmetric.MetricTypeSummary: + if err := e.writer.persistSummaryRecord(summaryRecords); err != nil { + errs = append(errs, err) + e.logger.Error(err.Error()) + } + default: + return fmt.Errorf("Unsupported metrics type") + + } + return multierr.Combine(errs...) +} + +// createSummaryRecord - creates a Summary type record +// +// @receiver e - Method aplicable to [kineticaMetricsExporter] +// @param resAttr - a map of key to value of resource attributes +// @param _ schemaURL - unused +// @param scopeInstr - the instrumentation scope +// @param _ scopeURL - unused +// @param summaryRecord - the Summary [pmetric.Summary] record +// @param name +// @param description +// @param unit +// @return *kineticaSummaryRecord +// @return error +func (e *kineticaMetricsExporter) createSummaryRecord(resAttr pcommon.Map, _ string, scopeInstr pcommon.InstrumentationScope, _ string, summaryRecord pmetric.Summary, name, description, unit string) (*kineticaSummaryRecord, error) { + var errs []error + + kiSummaryRecord := new(kineticaSummaryRecord) + + summary := &Summary{ + SummaryID: uuid.New().String(), + MetricName: name, + Description: description, + Unit: unit, + } + + kiSummaryRecord.summary = summary + + // Handle data points + var datapointAttribute []SummaryDataPointAttribute + datapointAttributes := make(map[string]ValueTypePair) + + for i := 0; i < summaryRecord.DataPoints().Len(); i++ { + datapoint := summaryRecord.DataPoints().At(i) + summaryDatapoint := &SummaryDatapoint{ + SummaryID: summary.SummaryID, + ID: uuid.New().String(), + StartTimeUnix: datapoint.StartTimestamp().AsTime().UnixMilli(), + TimeUnix: datapoint.Timestamp().AsTime().UnixMilli(), + Count: int64(datapoint.Count()), + Sum: datapoint.Sum(), + Flags: int(datapoint.Flags()), + } + kiSummaryRecord.summaryDatapoint = append(kiSummaryRecord.summaryDatapoint, *summaryDatapoint) + + // Handle summary datapoint attribute + datapoint.Attributes().Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Sum record attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + datapointAttributes[k] = v + } else { + e.logger.Debug("Invalid sum record attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range datapointAttributes { + vtPair := datapointAttributes[key] + sa, err := e.newSummaryDatapointAttributeValue(summary.SummaryID, summaryDatapoint.ID, key, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + datapointAttribute = append(datapointAttribute, *sa) + } + } + kiSummaryRecord.summaryDatapointAttribute = append(kiSummaryRecord.summaryDatapointAttribute, datapointAttribute...) + + for k := range datapointAttributes { + delete(datapointAttributes, k) + } + + // Handle quantile values + quantileValues := datapoint.QuantileValues() + for i := 0; i < quantileValues.Len(); i++ { + quantileValue := quantileValues.At(i) + summaryQV := &SummaryDatapointQuantileValues{ + SummaryID: summary.SummaryID, + DatapointID: summaryDatapoint.ID, + QuantileID: uuid.New().String(), + Quantile: quantileValue.Quantile(), + Value: quantileValue.Value(), + } + kiSummaryRecord.summaryDatapointQuantileValues = append(kiSummaryRecord.summaryDatapointQuantileValues, *summaryQV) + } + + } + + // Handle Resource attribute + var resourceAttribute []SummaryResourceAttribute + resourceAttributes := make(map[string]ValueTypePair) + + resAttr.Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Resource attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + resourceAttributes[k] = v + } else { + e.logger.Debug("Invalid resource attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range resourceAttributes { + vtPair := resourceAttributes[key] + ga, err := e.newSummaryResourceAttributeValue(summary.SummaryID, key, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + resourceAttribute = append(resourceAttribute, *ga) + } + } + + copy(kiSummaryRecord.summaryResourceAttribute, resourceAttribute) + + // Handle Scope attribute + var scopeAttribute []SummaryScopeAttribute + scopeAttributes := make(map[string]ValueTypePair) + scopeName := scopeInstr.Name() + scopeVersion := scopeInstr.Version() + + scopeInstr.Attributes().Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Scope attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + scopeAttributes[k] = v + } else { + e.logger.Debug("Invalid scope attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range scopeAttributes { + vtPair := scopeAttributes[key] + sa, err := e.newSummaryScopeAttributeValue(summary.SummaryID, key, scopeName, scopeVersion, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + scopeAttribute = append(scopeAttribute, *sa) + } + } + + copy(kiSummaryRecord.summaryScopeAttribute, scopeAttribute) + + return kiSummaryRecord, multierr.Combine(errs...) +} + +// createExponentialHistogramRecord - creates an exponential histogram type record +// +// @receiver e +// @param resAttr +// @param _ schemaURL - unused +// @param scopeInstr +// @param _ scopeURL - unused +// @param exponentialHistogramRecord +// @param name +// @param description +// @param unit +// @return *kineticaExponentialHistogramRecord +// @return error +func (e *kineticaMetricsExporter) createExponentialHistogramRecord(resAttr pcommon.Map, _ string, scopeInstr pcommon.InstrumentationScope, _ string, exponentialHistogramRecord pmetric.ExponentialHistogram, name, description, unit string) (*kineticaExponentialHistogramRecord, error) { + var errs []error + + kiExpHistogramRecord := new(kineticaExponentialHistogramRecord) + + histogram := &ExponentialHistogram{ + HistogramID: uuid.New().String(), + MetricName: name, + Description: description, + Unit: unit, + AggregationTemporality: exponentialHistogramRecord.AggregationTemporality(), + } + + kiExpHistogramRecord.histogram = histogram + + // Handle data points + var datapointAttribute []ExponentialHistogramDataPointAttribute + datapointAttributes := make(map[string]ValueTypePair) + + var exemplarAttribute []ExponentialHistogramDataPointExemplarAttribute + exemplarAttributes := make(map[string]ValueTypePair) + + var datapointBucketPositiveCount []ExponentialHistogramBucketPositiveCount + var datapointBucketNegativeCount []ExponentialHistogramBucketNegativeCount + + for i := 0; i < exponentialHistogramRecord.DataPoints().Len(); i++ { + datapoint := exponentialHistogramRecord.DataPoints().At(i) + + expHistogramDatapoint := ExponentialHistogramDatapoint{ + HistogramID: histogram.HistogramID, + ID: uuid.New().String(), + StartTimeUnix: datapoint.StartTimestamp().AsTime().UnixMilli(), + TimeUnix: datapoint.Timestamp().AsTime().UnixMilli(), + Count: int64(datapoint.Count()), + Sum: datapoint.Sum(), + Min: datapoint.Min(), + Max: datapoint.Max(), + Flags: int(datapoint.Flags()), + Scale: int(datapoint.Scale()), + ZeroCount: int64(datapoint.ZeroCount()), + BucketsPositiveOffset: int(datapoint.Positive().Offset()), + BucketsNegativeOffset: int(datapoint.Negative().Offset()), + } + kiExpHistogramRecord.histogramDatapoint = append(kiExpHistogramRecord.histogramDatapoint, expHistogramDatapoint) + + // Handle histogram datapoint attribute + datapoint.Attributes().Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Sum record attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + datapointAttributes[k] = v + } else { + e.logger.Debug("Invalid sum record attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range datapointAttributes { + vtPair := datapointAttributes[key] + sa, err := e.newExponentialHistogramDatapointAttributeValue(histogram.HistogramID, expHistogramDatapoint.ID, key, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + datapointAttribute = append(datapointAttribute, *sa) + } + } + kiExpHistogramRecord.histogramDatapointAttribute = append(kiExpHistogramRecord.histogramDatapointAttribute, datapointAttribute...) + + for k := range datapointAttributes { + delete(datapointAttributes, k) + } + + // Handle datapoint exemplars + exemplars := datapoint.Exemplars() + + for i := 0; i < exemplars.Len(); i++ { + exemplar := exemplars.At(i) + sumDatapointExemplar := ExponentialHistogramDatapointExemplar{ + HistogramID: histogram.HistogramID, + DatapointID: expHistogramDatapoint.ID, + ExemplarID: uuid.New().String(), + TimeUnix: exemplar.Timestamp().AsTime().UnixMilli(), + HistogramValue: exemplar.DoubleValue(), + TraceID: exemplar.TraceID().String(), + SpanID: exemplar.SpanID().String(), + } + kiExpHistogramRecord.exemplars = append(kiExpHistogramRecord.exemplars, sumDatapointExemplar) + + // Handle Exemplar attribute + exemplar.FilteredAttributes().Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Sum record attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + exemplarAttributes[k] = v + } else { + e.logger.Debug("Invalid sum record attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range exemplarAttributes { + vtPair := exemplarAttributes[key] + ea, err := e.newExponentialHistogramDatapointExemplarAttributeValue(expHistogramDatapoint.HistogramID, expHistogramDatapoint.ID, sumDatapointExemplar.ExemplarID, key, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + exemplarAttribute = append(exemplarAttribute, *ea) + } + } + + kiExpHistogramRecord.exemplarAttribute = append(kiExpHistogramRecord.exemplarAttribute, exemplarAttribute...) + + for k := range exemplarAttributes { + delete(exemplarAttributes, k) + } + + } + + // Handle positive and negative bucket counts + for i := 0; i < datapoint.Positive().BucketCounts().Len(); i++ { + positiveBucketCount := datapoint.Positive().BucketCounts().At(i) + datapointBucketPositiveCount = append(datapointBucketPositiveCount, ExponentialHistogramBucketPositiveCount{ + HistogramID: expHistogramDatapoint.HistogramID, + DatapointID: expHistogramDatapoint.ID, + CountID: uuid.New().String(), + Count: int64(positiveBucketCount), + }) + } + kiExpHistogramRecord.histogramBucketPositiveCount = append(kiExpHistogramRecord.histogramBucketPositiveCount, datapointBucketPositiveCount...) + + for i := 0; i < datapoint.Negative().BucketCounts().Len(); i++ { + negativeBucketCount := datapoint.Negative().BucketCounts().At(i) + datapointBucketNegativeCount = append(datapointBucketNegativeCount, ExponentialHistogramBucketNegativeCount{ + HistogramID: expHistogramDatapoint.HistogramID, + DatapointID: expHistogramDatapoint.ID, + CountID: uuid.New().String(), + Count: negativeBucketCount, + }) + } + kiExpHistogramRecord.histogramBucketNegativeCount = append(kiExpHistogramRecord.histogramBucketNegativeCount, datapointBucketNegativeCount...) + + } + + // Handle Resource attribute + var resourceAttribute []ExponentialHistogramResourceAttribute + resourceAttributes := make(map[string]ValueTypePair) + + resAttr.Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Resource attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + resourceAttributes[k] = v + } else { + e.logger.Debug("Invalid resource attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range resourceAttributes { + vtPair := resourceAttributes[key] + ga, err := e.newExponentialHistogramResourceAttributeValue(histogram.HistogramID, key, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + resourceAttribute = append(resourceAttribute, *ga) + } + } + + copy(kiExpHistogramRecord.histogramResourceAttribute, resourceAttribute) + + // Handle Scope attribute + var scopeAttribute []ExponentialHistogramScopeAttribute + scopeAttributes := make(map[string]ValueTypePair) + scopeName := scopeInstr.Name() + scopeVersion := scopeInstr.Version() + + scopeInstr.Attributes().Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Scope attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + scopeAttributes[k] = v + } else { + e.logger.Debug("Invalid scope attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range scopeAttributes { + vtPair := scopeAttributes[key] + sa, err := e.newExponentialHistogramScopeAttributeValue(histogram.HistogramID, key, scopeName, scopeVersion, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + scopeAttribute = append(scopeAttribute, *sa) + } + } + + copy(kiExpHistogramRecord.histogramScopeAttribute, scopeAttribute) + + return kiExpHistogramRecord, multierr.Combine(errs...) +} + +// createHistogramRecord - creates a Histogram type record +// +// @receiver e +// @param resAttr +// @param _ schemaURL - unused +// @param scopeInstr +// @param _ scopeURL - unused +// @param histogramRecord +// @param name +// @param description +// @param unit +// @return *kineticaHistogramRecord +// @return error +func (e *kineticaMetricsExporter) createHistogramRecord(resAttr pcommon.Map, _ string, scopeInstr pcommon.InstrumentationScope, _ string, histogramRecord pmetric.Histogram, name, description, unit string) (*kineticaHistogramRecord, error) { + + e.logger.Debug("In createHistogramRecord ...") + + var errs []error + + kiHistogramRecord := new(kineticaHistogramRecord) + + histogram := &Histogram{ + HistogramID: uuid.New().String(), + MetricName: name, + Description: description, + Unit: unit, + AggregationTemporality: histogramRecord.AggregationTemporality(), + } + + kiHistogramRecord.histogram = histogram + + // Handle data points + var datapointAttribute []HistogramDataPointAttribute + datapointAttributes := make(map[string]ValueTypePair) + + var exemplarAttribute []HistogramDataPointExemplarAttribute + exemplarAttributes := make(map[string]ValueTypePair) + + // Handle data points + for i := 0; i < histogramRecord.DataPoints().Len(); i++ { + datapoint := histogramRecord.DataPoints().At(i) + + histogramDatapoint := &HistogramDatapoint{ + HistogramID: histogram.HistogramID, + ID: uuid.New().String(), + StartTimeUnix: datapoint.StartTimestamp().AsTime().UnixMilli(), + TimeUnix: datapoint.Timestamp().AsTime().UnixMilli(), + Count: int64(datapoint.Count()), + Sum: datapoint.Sum(), + Min: datapoint.Min(), + Max: datapoint.Max(), + Flags: int(datapoint.Flags()), + } + kiHistogramRecord.histogramDatapoint = append(kiHistogramRecord.histogramDatapoint, *histogramDatapoint) + + // Handle histogram datapoint attribute + datapoint.Attributes().Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Histogram record attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + datapointAttributes[k] = v + } else { + e.logger.Debug("Invalid histogram record attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range datapointAttributes { + vtPair := datapointAttributes[key] + sa, err := e.newHistogramDatapointAttributeValue(histogram.HistogramID, histogramDatapoint.ID, key, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + datapointAttribute = append(datapointAttribute, *sa) + } + } + kiHistogramRecord.histogramDatapointAtribute = append(kiHistogramRecord.histogramDatapointAtribute, datapointAttribute...) + + for k := range datapointAttributes { + delete(datapointAttributes, k) + } + + // Handle data point exemplars + exemplars := datapoint.Exemplars() + + for i := 0; i < exemplars.Len(); i++ { + exemplar := exemplars.At(i) + histogramDatapointExemplar := HistogramDatapointExemplar{ + HistogramID: histogram.HistogramID, + DatapointID: histogramDatapoint.ID, + ExemplarID: uuid.New().String(), + TimeUnix: exemplar.Timestamp().AsTime().UnixMilli(), + HistogramValue: exemplar.DoubleValue(), + TraceID: exemplar.TraceID().String(), + SpanID: exemplar.SpanID().String(), + } + kiHistogramRecord.exemplars = append(kiHistogramRecord.exemplars, histogramDatapointExemplar) + + // Handle Exemplar attribute + exemplar.FilteredAttributes().Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Histogram record attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + exemplarAttributes[k] = v + } else { + e.logger.Debug("Invalid histogram record attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range exemplarAttributes { + vtPair := exemplarAttributes[key] + ea, err := e.newHistogramDatapointExemplarAttributeValue(histogramDatapoint.HistogramID, histogramDatapoint.ID, histogramDatapointExemplar.ExemplarID, key, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + exemplarAttribute = append(exemplarAttribute, *ea) + } + } + + kiHistogramRecord.exemplarAttribute = append(kiHistogramRecord.exemplarAttribute, exemplarAttribute...) + + for k := range exemplarAttributes { + delete(exemplarAttributes, k) + } + } + + histogramBucketCounts := datapoint.BucketCounts() + for i := 0; i < histogramBucketCounts.Len(); i++ { + bucketCount := HistogramDatapointBucketCount{ + HistogramID: histogramDatapoint.HistogramID, + DatapointID: histogramDatapoint.ID, + CountID: uuid.New().String(), + Count: int64(histogramBucketCounts.At(i)), + } + kiHistogramRecord.histogramBucketCount = append(kiHistogramRecord.histogramBucketCount, bucketCount) + } + + histogramExplicitBounds := datapoint.ExplicitBounds() + for i := 0; i < histogramExplicitBounds.Len(); i++ { + explicitBound := HistogramDatapointExplicitBound{ + HistogramID: histogramDatapoint.HistogramID, + DatapointID: histogramDatapoint.ID, + BoundID: uuid.New().String(), + ExplicitBound: histogramExplicitBounds.At(i), + } + kiHistogramRecord.histogramExplicitBound = append(kiHistogramRecord.histogramExplicitBound, explicitBound) + } + } + + // Handle Resource attribute + var resourceAttribute []HistogramResourceAttribute + resourceAttributes := make(map[string]ValueTypePair) + + if resAttr.Len() > 0 { + resAttr.Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Resource attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + resourceAttributes[k] = v + } else { + e.logger.Debug("Invalid resource attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range resourceAttributes { + vtPair := resourceAttributes[key] + ga, err := e.newHistogramResourceAttributeValue(histogram.HistogramID, key, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + resourceAttribute = append(resourceAttribute, *ga) + } + } + + kiHistogramRecord.histogramResourceAttribute = make([]HistogramResourceAttribute, len(resourceAttribute)) + copy(kiHistogramRecord.histogramResourceAttribute, resourceAttribute) + + } + + // Handle Scope attribute + var scopeAttribute []HistogramScopeAttribute + scopeAttributes := make(map[string]ValueTypePair) + scopeName := scopeInstr.Name() + scopeVersion := scopeInstr.Version() + + if scopeInstr.Attributes().Len() > 0 { + scopeInstr.Attributes().Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Scope attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + scopeAttributes[k] = v + } else { + e.logger.Debug("Invalid scope attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range scopeAttributes { + vtPair := scopeAttributes[key] + sa, err := e.newHistogramScopeAttributeValue(histogram.HistogramID, key, scopeName, scopeVersion, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + scopeAttribute = append(scopeAttribute, *sa) + } + } + + kiHistogramRecord.histogramScopeAttribute = make([]HistogramScopeAttribute, len(scopeAttribute)) + copy(kiHistogramRecord.histogramScopeAttribute, scopeAttribute) + } + + return kiHistogramRecord, multierr.Combine(errs...) +} + +// createSumRecord - creates a SUM type record +// +// @receiver e +// @param resAttr +// @param schemaURL +// @param scopeInstr +// @param scopeURL +// @param sumRecord +// @param name +// @param description +// @param unit +// @return *kineticaSumRecord +// @return error +func (e *kineticaMetricsExporter) createSumRecord(resAttr pcommon.Map, _ string, scopeInstr pcommon.InstrumentationScope, _ string, sumRecord pmetric.Sum, name, description, unit string) (*kineticaSumRecord, error) { + var errs []error + + kiSumRecord := new(kineticaSumRecord) + var isMonotonic int8 + if sumRecord.IsMonotonic() { + isMonotonic = 1 + } + + sum := &Sum{ + SumID: uuid.New().String(), + MetricName: name, + Description: description, + Unit: unit, + AggregationTemporality: sumRecord.AggregationTemporality(), + IsMonotonic: isMonotonic, + } + + kiSumRecord.sum = sum + + // Handle data points + var sumDatapointAttribute []SumDataPointAttribute + sumDatapointAttributes := make(map[string]ValueTypePair) + + var exemplarAttribute []SumDataPointExemplarAttribute + exemplarAttributes := make(map[string]ValueTypePair) + + for i := 0; i < sumRecord.DataPoints().Len(); i++ { + datapoint := sumRecord.DataPoints().At(i) + + sumDatapoint := SumDatapoint{ + SumID: sum.SumID, + ID: uuid.New().String(), + StartTimeUnix: datapoint.StartTimestamp().AsTime().UnixMilli(), + TimeUnix: datapoint.Timestamp().AsTime().UnixMilli(), + SumValue: datapoint.DoubleValue(), + Flags: int(datapoint.Flags()), + } + kiSumRecord.datapoint = append(kiSumRecord.datapoint, sumDatapoint) + + // Handle Sum attribute + datapoint.Attributes().Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Sum record attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + sumDatapointAttributes[k] = v + } else { + e.logger.Debug("Invalid sum record attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range sumDatapointAttributes { + vtPair := sumDatapointAttributes[key] + sa, err := e.newSumDatapointAttributeValue(sum.SumID, sumDatapoint.ID, key, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + sumDatapointAttribute = append(sumDatapointAttribute, *sa) + } + } + kiSumRecord.datapointAttribute = append(kiSumRecord.datapointAttribute, sumDatapointAttribute...) + + for k := range sumDatapointAttributes { + delete(sumDatapointAttributes, k) + } + + // Handle data point exemplars + exemplars := datapoint.Exemplars() + + for i := 0; i < exemplars.Len(); i++ { + exemplar := exemplars.At(i) + sumDatapointExemplar := SumDatapointExemplar{ + SumID: sum.SumID, + DatapointID: sumDatapoint.ID, + ExemplarID: uuid.New().String(), + TimeUnix: exemplar.Timestamp().AsTime().UnixMilli(), + SumValue: exemplar.DoubleValue(), + TraceID: exemplar.TraceID().String(), + SpanID: exemplar.SpanID().String(), + } + kiSumRecord.exemplars = append(kiSumRecord.exemplars, sumDatapointExemplar) + + // Handle Exemplar attribute + exemplar.FilteredAttributes().Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Sum record attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + exemplarAttributes[k] = v + } else { + e.logger.Debug("Invalid sum record attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range exemplarAttributes { + vtPair := exemplarAttributes[key] + ea, err := e.newSumDatapointExemplarAttributeValue(sum.SumID, sumDatapoint.ID, sumDatapointExemplar.ExemplarID, key, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + exemplarAttribute = append(exemplarAttribute, *ea) + } + } + + kiSumRecord.exemplarAttribute = append(kiSumRecord.exemplarAttribute, exemplarAttribute...) + + for k := range exemplarAttributes { + delete(exemplarAttributes, k) + } + + } + + } + + // Handle Resource attribute + var resourceAttribute []SumResourceAttribute + resourceAttributes := make(map[string]ValueTypePair) + + if resAttr.Len() > 0 { + resAttr.Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Resource attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + resourceAttributes[k] = v + } else { + e.logger.Debug("Invalid resource attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range resourceAttributes { + vtPair := resourceAttributes[key] + ga, err := e.newSumResourceAttributeValue(sum.SumID, key, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + resourceAttribute = append(resourceAttribute, *ga) + } + } + + kiSumRecord.sumResourceAttribute = make([]SumResourceAttribute, len(resourceAttribute)) + copy(kiSumRecord.sumResourceAttribute, resourceAttribute) + } + + // Handle Scope attribute + var scopeAttribute []SumScopeAttribute + scopeAttributes := make(map[string]ValueTypePair) + scopeName := scopeInstr.Name() + scopeVersion := scopeInstr.Version() + + if scopeInstr.Attributes().Len() > 0 { + scopeInstr.Attributes().Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Scope attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + scopeAttributes[k] = v + } else { + e.logger.Debug("Invalid scope attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range scopeAttributes { + vtPair := scopeAttributes[key] + sa, err := e.newSumScopeAttributeValue(sum.SumID, key, scopeName, scopeVersion, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + scopeAttribute = append(scopeAttribute, *sa) + } + } + + copy(kiSumRecord.sumScopeAttribute, scopeAttribute) + } else { + // No attributes found - just basic scope + kiSumRecord.sumScopeAttribute = append(kiSumRecord.sumScopeAttribute, SumScopeAttribute{ + SumID: sum.SumID, + ScopeName: scopeName, + ScopeVersion: scopeVersion, + Key: "", + AttributeValue: AttributeValue{}, + }) + + } + + return kiSumRecord, multierr.Combine(errs...) +} + +// createGaugeRecord - creates a Gauge type record +// +// @receiver e +// @param resAttr +// @param _ schemaURL unused +// @param scopeInstr +// @param _ scopeURL unused +// @param gaugeRecord +// @param name +// @param description +// @param unit +// @return *kineticaGaugeRecord +// @return error +func (e *kineticaMetricsExporter) createGaugeRecord(resAttr pcommon.Map, _ string, scopeInstr pcommon.InstrumentationScope, _ string, gaugeRecord pmetric.Gauge, name, description, unit string) (*kineticaGaugeRecord, error) { + + var errs []error + + kiGaugeRecord := new(kineticaGaugeRecord) + + gauge := &Gauge{ + GaugeID: uuid.New().String(), + MetricName: name, + Description: description, + Unit: unit, + } + + kiGaugeRecord.gauge = gauge + + // Handle data points + var gaugeDatapointAttribute []GaugeDatapointAttribute + gaugeDatapointAttributes := make(map[string]ValueTypePair) + + var exemplarAttribute []GaugeDataPointExemplarAttribute + exemplarAttributes := make(map[string]ValueTypePair) + + for i := 0; i < gaugeRecord.DataPoints().Len(); i++ { + datapoint := gaugeRecord.DataPoints().At(i) + + gaugeDatapoint := GaugeDatapoint{ + GaugeID: gauge.GaugeID, + ID: uuid.New().String(), + StartTimeUnix: datapoint.StartTimestamp().AsTime().UnixMilli(), + TimeUnix: datapoint.Timestamp().AsTime().UnixMilli(), + GaugeValue: datapoint.DoubleValue(), + Flags: int(datapoint.Flags()), + } + kiGaugeRecord.datapoint = append(kiGaugeRecord.datapoint, gaugeDatapoint) + + datapoint.Attributes().Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Gauge record attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + gaugeDatapointAttributes[k] = v + } else { + e.logger.Debug("Invalid gauge record attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range gaugeDatapointAttributes { + vtPair := gaugeDatapointAttributes[key] + ga, err := e.newGaugeDatapointAttributeValue(gauge.GaugeID, gaugeDatapoint.ID, key, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + gaugeDatapointAttribute = append(gaugeDatapointAttribute, *ga) + } + } + + kiGaugeRecord.datapointAttribute = append(kiGaugeRecord.datapointAttribute, gaugeDatapointAttribute...) + + for k := range gaugeDatapointAttributes { + delete(gaugeDatapointAttributes, k) + } + + // Handle data point exemplars + exemplars := datapoint.Exemplars() + for i := 0; i < exemplars.Len(); i++ { + exemplar := exemplars.At(i) + gaugeDatapointExemplar := GaugeDatapointExemplar{ + GaugeID: gauge.GaugeID, + DatapointID: gaugeDatapoint.ID, + ExemplarID: uuid.New().String(), + TimeUnix: exemplar.Timestamp().AsTime().UnixMilli(), + GaugeValue: exemplar.DoubleValue(), + TraceID: exemplar.TraceID().String(), + SpanID: exemplar.SpanID().String(), + } + kiGaugeRecord.exemplars = append(kiGaugeRecord.exemplars, gaugeDatapointExemplar) + + // Handle Exemplar attribute + exemplar.FilteredAttributes().Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Sum record attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + exemplarAttributes[k] = v + } else { + e.logger.Debug("Invalid sum record attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + for key := range exemplarAttributes { + vtPair := exemplarAttributes[key] + ea, err := e.newGaugeDatapointExemplarAttributeValue(gauge.GaugeID, gaugeDatapoint.ID, gaugeDatapointExemplar.ExemplarID, key, vtPair) + if err != nil { + e.logger.Error(err.Error()) + } else { + exemplarAttribute = append(exemplarAttribute, *ea) + } + } + + kiGaugeRecord.exemplarAttribute = append(kiGaugeRecord.exemplarAttribute, exemplarAttribute...) + + for k := range exemplarAttributes { + delete(exemplarAttributes, k) + } + } + } + + // Handle Resource attribute + e.logger.Debug("Resource Attributes received ->", zap.Any("Attributes", resAttr)) + + var resourceAttribute []GaugeResourceAttribute + resourceAttributes := make(map[string]ValueTypePair) + + if resAttr.Len() > 0 { + resAttr.Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Resource attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + resourceAttributes[k] = v + } else { + e.logger.Debug("Invalid resource attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + e.logger.Debug("Resource Attributes to be added ->", zap.Any("Attributes", resourceAttributes)) + for key := range resourceAttributes { + vtPair := resourceAttributes[key] + ga, err := e.newGaugeResourceAttributeValue(gauge.GaugeID, key, vtPair) + + e.logger.Debug("New resource attribute ->", zap.Any("Attribute", ga)) + + if err != nil { + e.logger.Error(err.Error()) + } else { + resourceAttribute = append(resourceAttribute, *ga) + } + } + + kiGaugeRecord.resourceAttribute = make([]GaugeResourceAttribute, len(resourceAttribute)) + copy(kiGaugeRecord.resourceAttribute, resourceAttribute) + e.logger.Debug("Resource Attributes actually added ->", zap.Any("Attributes", kiGaugeRecord.resourceAttribute)) + } + + // Handle Scope attribute + e.logger.Debug("Scope Attributes received ->", zap.Any("Attributes", scopeInstr.Attributes())) + + var scopeAttribute []GaugeScopeAttribute + scopeAttributes := make(map[string]ValueTypePair) + scopeName := scopeInstr.Name() + scopeVersion := scopeInstr.Version() + + if scopeInstr.Attributes().Len() > 0 { + scopeInstr.Attributes().Range(func(k string, v pcommon.Value) bool { + if k == "" { + e.logger.Debug("Scope attribute key is empty") + } else if v, err := attributeValueToKineticaFieldValue(v); err == nil { + scopeAttributes[k] = v + } else { + e.logger.Debug("Invalid scope attribute value", zap.String("Error", err.Error())) + errs = append(errs, err) + } + return true + }) + + e.logger.Debug("Scope Attributes to be added ->", zap.Any("Attributes", scopeAttributes)) + for key := range scopeAttributes { + vtPair := scopeAttributes[key] + ga, err := e.newGaugeScopeAttributeValue(gauge.GaugeID, key, scopeName, scopeVersion, vtPair) + + e.logger.Debug("New scope attribute ->", zap.Any("Attribute", ga)) + + if err != nil { + e.logger.Error(err.Error()) + } else { + scopeAttribute = append(scopeAttribute, *ga) + } + } + + kiGaugeRecord.scopeAttribute = make([]GaugeScopeAttribute, len(scopeAttribute)) + copy(kiGaugeRecord.scopeAttribute, scopeAttribute) + e.logger.Debug("Scope Attributes actually added ->", zap.Any("Attributes", kiGaugeRecord.scopeAttribute)) + } else { + // No attributes found - just basic scope + kiGaugeRecord.scopeAttribute = append(kiGaugeRecord.scopeAttribute, GaugeScopeAttribute{ + GaugeID: gauge.GaugeID, + ScopeName: scopeName, + ScopeVersion: scopeVersion, + Key: "", + AttributeValue: AttributeValue{}, + }) + } + + return kiGaugeRecord, multierr.Combine(errs...) +} + +// Utility functions +func (e *kineticaMetricsExporter) newGaugeResourceAttributeValue(gaugeID string, key string, vtPair ValueTypePair) (*GaugeResourceAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + ra := &GaugeResourceAttribute{gaugeID, key, *av} + return ra, nil +} + +func (e *kineticaMetricsExporter) newGaugeDatapointAttributeValue(gaugeID string, datapointID string, key string, vtPair ValueTypePair) (*GaugeDatapointAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + ga := &GaugeDatapointAttribute{gaugeID, datapointID, key, *av} + return ga, nil +} + +func (e *kineticaMetricsExporter) newGaugeScopeAttributeValue(gaugeID string, key string, scopeName string, scopeVersion string, vtPair ValueTypePair) (*GaugeScopeAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + sa := &GaugeScopeAttribute{gaugeID, key, scopeName, scopeVersion, *av} + return sa, nil +} + +func (e *kineticaMetricsExporter) newSumDatapointAttributeValue(sumID string, datapointID string, key string, vtPair ValueTypePair) (*SumDataPointAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + ga := &SumDataPointAttribute{sumID, datapointID, key, *av} + return ga, nil +} + +func (e *kineticaMetricsExporter) newSumResourceAttributeValue(sumID string, key string, vtPair ValueTypePair) (*SumResourceAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + ra := &SumResourceAttribute{sumID, key, *av} + return ra, nil +} + +func (e *kineticaMetricsExporter) newSumScopeAttributeValue(sumID string, key string, scopeName string, scopeVersion string, vtPair ValueTypePair) (*SumScopeAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + sa := &SumScopeAttribute{sumID, key, scopeName, scopeVersion, *av} + return sa, nil +} + +func (e *kineticaMetricsExporter) newSumDatapointExemplarAttributeValue(sumID string, sumDatapointID string, sumDatapointExemplarID string, key string, vtPair ValueTypePair) (*SumDataPointExemplarAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + sa := &SumDataPointExemplarAttribute{sumID, sumDatapointID, sumDatapointExemplarID, key, *av} + return sa, nil +} + +func (e *kineticaMetricsExporter) newExponentialHistogramDatapointExemplarAttributeValue(histogramID string, histogramDatapointID string, histogramDatapointExemplarID string, key string, vtPair ValueTypePair) (*ExponentialHistogramDataPointExemplarAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + sa := &ExponentialHistogramDataPointExemplarAttribute{histogramID, histogramDatapointID, histogramDatapointExemplarID, key, *av} + return sa, nil +} + +func (e *kineticaMetricsExporter) newExponentialHistogramDatapointAttributeValue(histogramID string, datapointID string, key string, vtPair ValueTypePair) (*ExponentialHistogramDataPointAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + ga := &ExponentialHistogramDataPointAttribute{histogramID, datapointID, key, *av} + return ga, nil +} + +func (e *kineticaMetricsExporter) newHistogramDatapointExemplarAttributeValue(histogramID string, datapointID string, exemplarID string, key string, vtPair ValueTypePair) (*HistogramDataPointExemplarAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + ga := &HistogramDataPointExemplarAttribute{histogramID, datapointID, exemplarID, key, *av} + return ga, nil +} + +func (e *kineticaMetricsExporter) newGaugeDatapointExemplarAttributeValue(gaugeID string, gaugeDatapointID string, gaugeDatapointExemplarID string, key string, vtPair ValueTypePair) (*GaugeDataPointExemplarAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + sa := &GaugeDataPointExemplarAttribute{gaugeID, gaugeDatapointID, gaugeDatapointExemplarID, key, *av} + return sa, nil +} + +func (e *kineticaMetricsExporter) newHistogramResourceAttributeValue(histogramID string, key string, vtPair ValueTypePair) (*HistogramResourceAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + ra := &HistogramResourceAttribute{histogramID, key, *av} + return ra, nil +} + +func (e *kineticaMetricsExporter) newHistogramScopeAttributeValue(histogramID string, key string, scopeName string, scopeVersion string, vtPair ValueTypePair) (*HistogramScopeAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + sa := &HistogramScopeAttribute{histogramID, key, scopeName, scopeVersion, *av} + return sa, nil +} + +func (e *kineticaMetricsExporter) newExponentialHistogramResourceAttributeValue(histogramID string, key string, vtPair ValueTypePair) (*ExponentialHistogramResourceAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + ra := &ExponentialHistogramResourceAttribute{histogramID, key, *av} + return ra, nil +} + +func (e *kineticaMetricsExporter) newExponentialHistogramScopeAttributeValue(histogramID string, key string, scopeName string, scopeVersion string, vtPair ValueTypePair) (*ExponentialHistogramScopeAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + sa := &ExponentialHistogramScopeAttribute{histogramID, key, scopeName, scopeVersion, *av} + return sa, nil +} + +func (e *kineticaMetricsExporter) newSummaryResourceAttributeValue(summaryID string, key string, vtPair ValueTypePair) (*SummaryResourceAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + ra := &SummaryResourceAttribute{summaryID, key, *av} + return ra, nil +} + +func (e *kineticaMetricsExporter) newSummaryScopeAttributeValue(summaryID string, key string, scopeName string, scopeVersion string, vtPair ValueTypePair) (*SummaryScopeAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + sa := &SummaryScopeAttribute{summaryID, key, scopeName, scopeVersion, *av} + return sa, nil + +} + +func (e *kineticaMetricsExporter) newSummaryDatapointAttributeValue(summaryID string, summaryDatapointID string, key string, vtPair ValueTypePair) (*SummaryDataPointAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + sa := &SummaryDataPointAttribute{summaryID, summaryDatapointID, key, *av} + return sa, nil +} + +func (e *kineticaMetricsExporter) newHistogramDatapointAttributeValue(histogramID string, datapointID string, key string, vtPair ValueTypePair) (*HistogramDataPointAttribute, error) { + var av *AttributeValue + var err error + + av, err = getAttributeValue(vtPair) + if err != nil { + return nil, err + } + + ga := &HistogramDataPointAttribute{histogramID, datapointID, key, *av} + return ga, nil } diff --git a/exporter/kineticaexporter/writer.go b/exporter/kineticaexporter/writer.go new file mode 100644 index 000000000000..87528ae8b762 --- /dev/null +++ b/exporter/kineticaexporter/writer.go @@ -0,0 +1,835 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package kineticaexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kineticaexporter" + +import ( + "context" + "fmt" + "sync" + + "github.com/kineticadb/kinetica-api-go/kinetica" + orderedmap "github.com/wk8/go-ordered-map/v2" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.uber.org/multierr" + "go.uber.org/zap" +) + +// AttributeValue - struct to contain attribute values of different types +// Used by other metric structs +type AttributeValue struct { + IntValue int `avro:"int_value"` + StringValue string `avro:"string_value"` + BoolValue int8 `avro:"bool_value"` + DoubleValue float64 `avro:"double_value"` + BytesValue []byte `avro:"bytes_value"` +} + +// KiWriter - struct modeling the Kinetica connection, contains the +// Kinetica connection [kinetica.Kinetica], the Kinetica Options [kinetica.KineticaOptions], +// the config [Config] and the logger [zap.Logger] +type KiWriter struct { + Db kinetica.Kinetica + Options kinetica.KineticaOptions + cfg Config + logger *zap.Logger +} + +// GetDb - Getter for the Kinetica instance +// +// @receiver kiwriter +// @return gpudb.Gpudb +func (kiwriter *KiWriter) GetDb() kinetica.Kinetica { + return kiwriter.Db +} + +// GetOptions - Getter for the Kinetica options. +// +// @receiver kiwriter +// @return gpudb.GpudbOptions +func (kiwriter *KiWriter) GetOptions() kinetica.KineticaOptions { + return kiwriter.Options +} + +// GetCfg - Getter for the [Config] value +// +// @receiver kiwriter +// @return Config +func (kiwriter *KiWriter) GetCfg() Config { + return kiwriter.cfg +} + +// Writer - global pointer to kiwriter struct initialized in the init func +var Writer *KiWriter + +// init +func init() { + ctx := context.TODO() + cfg := createDefaultConfig() + config := cfg.(*Config) + options := kinetica.KineticaOptions{Username: config.Username, Password: string(config.Password), ByPassSslCertCheck: config.BypassSslCertCheck} + gpudbInst := kinetica.NewWithOptions(ctx, config.Host, &options) + Writer = &KiWriter{*gpudbInst, options, *config, nil} +} + +// newKiWriter - Constructor for the [KiWriter] struct +// +// @param ctx +// @param cfg +// @return *KiWriter +func newKiWriter(ctx context.Context, cfg Config, logger *zap.Logger) *KiWriter { + options := kinetica.KineticaOptions{Username: cfg.Username, Password: string(cfg.Password), ByPassSslCertCheck: cfg.BypassSslCertCheck} + gpudbInst := kinetica.NewWithOptions(ctx, cfg.Host, &options) + return &KiWriter{*gpudbInst, options, cfg, logger} +} + +// Metrics Handling + +// Gauge - struct modeling the Gauge data +type Gauge struct { + GaugeID string `avro:"gauge_id"` + MetricName string `avro:"metric_name"` + Description string `avro:"metric_description"` + Unit string `avro:"metric_unit"` +} + +// GaugeDatapoint - struct modeling the Gauge Datapoint +type GaugeDatapoint struct { + GaugeID string `avro:"gauge_id"` + ID string `avro:"id"` + StartTimeUnix int64 `mapstructure:"start_time_unix" avro:"start_time_unix"` + TimeUnix int64 `mapstructure:"time_unix" avro:"time_unix"` + GaugeValue float64 `mapstructure:"gauge_value" avro:"gauge_value"` + Flags int `mapstructure:"flags" avro:"flags"` +} + +// GaugeDatapointAttribute - struct modeling the Gauge Datapoint attributes +type GaugeDatapointAttribute struct { + GaugeID string `avro:"gauge_id"` + DatapointID string `avro:"datapoint_id"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// GaugeDatapointExemplar - struct modeling a Gauge Datapoint Exemplar +type GaugeDatapointExemplar struct { + GaugeID string `avro:"gauge_id"` + DatapointID string `avro:"datapoint_id"` + ExemplarID string `avro:"exemplar_id"` + TimeUnix int64 `mapstructure:"time_unix" avro:"time_unix"` + GaugeValue float64 `mapstructure:"gauge_value" avro:"gauge_value"` + TraceID string `mapstructure:"trace_id" avro:"trace_id"` + SpanID string `mapstructure:"span_id" avro:"span_id"` +} + +// GaugeDataPointExemplarAttribute - struct modeling a Gauge Datapoint Exemplar attribute +type GaugeDataPointExemplarAttribute struct { + GaugeID string `avro:"gauge_id"` + DatapointID string `avro:"datapoint_id"` + ExemplarID string `avro:"exemplar_id"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// GaugeResourceAttribute - struct modeling a Gauge resource attribute +type GaugeResourceAttribute struct { + GaugeID string `avro:"gauge_id"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// GaugeScopeAttribute - struct modeling a Gauge Scope attribute +type GaugeScopeAttribute struct { + GaugeID string `avro:"gauge_id"` + ScopeName string `avro:"name"` + ScopeVersion string `avro:"version"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// END Gauge + +// Sum + +// Sum - struct modeling a Sum metric +type Sum struct { + SumID string `avro:"sum_id"` + MetricName string `avro:"metric_name"` + Description string `avro:"metric_description"` + Unit string `avro:"metric_unit"` + pmetric.AggregationTemporality `avro:"aggregation_temporality"` + IsMonotonic int8 `avro:"is_monotonic"` +} + +// SumDatapoint - struct modeling a Sum Datapoint +type SumDatapoint struct { + SumID string `avro:"sum_id"` + ID string `avro:"id"` + StartTimeUnix int64 `mapstructure:"start_time_unix" avro:"start_time_unix"` + TimeUnix int64 `mapstructure:"time_unix" avro:"time_unix"` + SumValue float64 `mapstructure:"sum_value" avro:"sum_value"` + Flags int `mapstructure:"flags" avro:"flags"` +} + +// SumDataPointAttribute - struct modeling a Sum Datapoint attribute +type SumDataPointAttribute struct { + SumID string `avro:"sum_id"` + DatapointID string `avro:"datapoint_id"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// SumDatapointExemplar - struct modeling a Sum Datapoint Exemplar +type SumDatapointExemplar struct { + SumID string `avro:"sum_id"` + DatapointID string `avro:"datapoint_id"` + ExemplarID string `avro:"exemplar_id"` + TimeUnix int64 `mapstructure:"time_unix" avro:"time_unix"` + SumValue float64 `mapstructure:"sum_value" avro:"sum_value"` + TraceID string `mapstructure:"trace_id" avro:"trace_id"` + SpanID string `mapstructure:"span_id" avro:"span_id"` +} + +// SumDataPointExemplarAttribute - struct modeling a Sum Datapoint Exemplar attribute +type SumDataPointExemplarAttribute struct { + SumID string `avro:"sum_id"` + DatapointID string `avro:"datapoint_id"` + ExemplarID string `avro:"exemplar_id"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// SumResourceAttribute - struct modeling a Sum Resource attribute +type SumResourceAttribute struct { + SumID string `avro:"sum_id"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// SumScopeAttribute - struct modeling a Sum Scope attribute +type SumScopeAttribute struct { + SumID string `avro:"sum_id"` + ScopeName string `avro:"name"` + ScopeVersion string `avro:"version"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// END Sum + +// Histogram + +// Histogram - struct modeling a Histogram metric type +type Histogram struct { + HistogramID string `avro:"histogram_id"` + MetricName string `avro:"metric_name"` + Description string `avro:"metric_description"` + Unit string `avro:"metric_unit"` + pmetric.AggregationTemporality `avro:"aggregation_temporality"` +} + +// HistogramDatapoint - struct modeling a Histogram Datapoint +type HistogramDatapoint struct { + HistogramID string `avro:"histogram_id"` + ID string `avro:"id"` + StartTimeUnix int64 `avro:"start_time_unix"` + TimeUnix int64 `avro:"time_unix"` + Count int64 `avro:"count"` + Sum float64 `avro:"data_sum"` + Min float64 `avro:"data_min"` + Max float64 `avro:"data_max"` + Flags int `avro:"flags"` +} + +// HistogramDataPointAttribute - struct modeling a Histogram Datapoint attribute +type HistogramDataPointAttribute struct { + HistogramID string `avro:"histogram_id"` + DatapointID string `avro:"datapoint_id"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// HistogramDatapointBucketCount - struct modeling a Histogram Datapoint Bucket Count +type HistogramDatapointBucketCount struct { + HistogramID string `avro:"histogram_id"` + DatapointID string `avro:"datapoint_id"` + CountID string `avro:"count_id"` + Count int64 `avro:"count"` +} + +// HistogramDatapointExplicitBound - struct modeling a Histogram Datapoint Explicit Bound +type HistogramDatapointExplicitBound struct { + HistogramID string `avro:"histogram_id"` + DatapointID string `avro:"datapoint_id"` + BoundID string `avro:"bound_id"` + ExplicitBound float64 `avro:"explicit_bound"` +} + +// HistogramDatapointExemplar - struct modeling a Histogram Datapoint Exemplar +type HistogramDatapointExemplar struct { + HistogramID string `avro:"histogram_id"` + DatapointID string `avro:"datapoint_id"` + ExemplarID string `avro:"exemplar_id"` + TimeUnix int64 `avro:"time_unix"` + HistogramValue float64 `avro:"histogram_value"` + TraceID string `mapstructure:"trace_id" avro:"trace_id"` + SpanID string `mapstructure:"span_id" avro:"span_id"` +} + +// HistogramDataPointExemplarAttribute - struct modeling a Histogram Datapoint Exemplar attribute +type HistogramDataPointExemplarAttribute struct { + HistogramID string `avro:"histogram_id"` + DatapointID string `avro:"datapoint_id"` + ExemplarID string `avro:"exemplar_id"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// HistogramResourceAttribute - struct modeling a Histogram Resource Attribute +type HistogramResourceAttribute struct { + HistogramID string `avro:"histogram_id"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// HistogramScopeAttribute - struct modeling a Histogram Scope Attribute +type HistogramScopeAttribute struct { + HistogramID string `avro:"histogram_id"` + ScopeName string `avro:"name"` + ScopeVersion string `avro:"version"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// End Histogram + +// Exponential Histogram + +// ExponentialHistogram - struct modeling an Exponential Histogram +type ExponentialHistogram struct { + HistogramID string `avro:"histogram_id"` + MetricName string `avro:"metric_name"` + Description string `avro:"metric_description"` + Unit string `avro:"metric_unit"` + pmetric.AggregationTemporality `avro:"aggregation_temporality"` +} + +// ExponentialHistogramDatapoint - struct modeling an Exponential Histogram Datapoint +type ExponentialHistogramDatapoint struct { + HistogramID string `avro:"histogram_id"` + ID string `avro:"id"` + StartTimeUnix int64 `avro:"start_time_unix"` + TimeUnix int64 `avro:"time_unix"` + Count int64 `avro:"count"` + Sum float64 `avro:"data_sum"` + Min float64 `avro:"data_min"` + Max float64 `avro:"data_max"` + Flags int `avro:"flags"` + Scale int `avro:"scale"` + ZeroCount int64 `avro:"zero_count"` + BucketsPositiveOffset int `avro:"buckets_positive_offset"` + BucketsNegativeOffset int `avro:"buckets_negative_offset"` +} + +// ExponentialHistogramDataPointAttribute - struct modeling an Exponential Histogram Datapoint attribute +type ExponentialHistogramDataPointAttribute struct { + HistogramID string `avro:"histogram_id"` + DatapointID string `avro:"datapoint_id"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// ExponentialHistogramBucketNegativeCount - struct modeling an Exponential Histogram Bucket Negative Count +type ExponentialHistogramBucketNegativeCount struct { + HistogramID string `avro:"histogram_id"` + DatapointID string `avro:"datapoint_id"` + CountID string `avro:"count_id"` + Count uint64 `avro:"count"` +} + +// ExponentialHistogramBucketPositiveCount - struct modeling an Exponential Histogram Bucket Positive Count +type ExponentialHistogramBucketPositiveCount struct { + HistogramID string `avro:"histogram_id"` + DatapointID string `avro:"datapoint_id"` + CountID string `avro:"count_id"` + Count int64 `avro:"count"` +} + +// ExponentialHistogramDatapointExemplar - struct modeling an Exponential Histogram Datapoint Exemplar +type ExponentialHistogramDatapointExemplar struct { + HistogramID string `avro:"histogram_id"` + DatapointID string `avro:"datapoint_id"` + ExemplarID string `avro:"exemplar_id"` + TimeUnix int64 `avro:"time_unix"` + HistogramValue float64 `avro:"histogram_value"` + TraceID string `mapstructure:"trace_id" avro:"trace_id"` + SpanID string `mapstructure:"span_id" avro:"span_id"` +} + +// ExponentialHistogramDataPointExemplarAttribute - struct modeling an Exponential Histogram Datapoint Exemplar attribute +type ExponentialHistogramDataPointExemplarAttribute struct { + HistogramID string `avro:"histogram_id"` + DatapointID string `avro:"datapoint_id"` + ExemplarID string `avro:"exemplar_id"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// ExponentialHistogramResourceAttribute - struct modeling an Exponential Histogram Resource attribute +type ExponentialHistogramResourceAttribute struct { + HistogramID string `avro:"histogram_id"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// ExponentialHistogramScopeAttribute - struct modeling an Exponential Histogram Scope attribute +type ExponentialHistogramScopeAttribute struct { + HistogramID string `avro:"histogram_id"` + ScopeName string `avro:"name"` + ScopeVersion string `avro:"version"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// END Exponential Histogram + +// Summary + +// Summary - struct modeling a Summary type metric +type Summary struct { + SummaryID string `avro:"summary_id"` + MetricName string `avro:"metric_name"` + Description string `avro:"metric_description"` + Unit string `avro:"metric_unit"` +} + +// SummaryDatapoint - struct modeling a Summary Datapoint +type SummaryDatapoint struct { + SummaryID string `avro:"summary_id"` + ID string `avro:"id"` + StartTimeUnix int64 `avro:"start_time_unix"` + TimeUnix int64 `avro:"time_unix"` + Count int64 `avro:"count"` + Sum float64 `avro:"data_sum"` + Flags int `avro:"flags"` +} + +// SummaryDataPointAttribute - struct modeling a Summary Datapoint attribute +type SummaryDataPointAttribute struct { + SummaryID string `avro:"summary_id"` + DatapointID string `avro:"datapoint_id"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// SummaryDatapointQuantileValues - struct modeling a Summary Datapoint Quantile value +type SummaryDatapointQuantileValues struct { + SummaryID string `avro:"summary_id"` + DatapointID string `avro:"datapoint_id"` + QuantileID string `avro:"quantile_id"` + Quantile float64 `avro:"quantile"` + Value float64 `avro:"value"` +} + +// SummaryResourceAttribute - struct modeling a Summary Resource attribute +type SummaryResourceAttribute struct { + SummaryID string `avro:"summary_id"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// SummaryScopeAttribute - struct modeling a Summary Scope attribute +type SummaryScopeAttribute struct { + SummaryID string `avro:"summary_id"` + ScopeName string `avro:"name"` + ScopeVersion string `avro:"version"` + Key string `avro:"key"` + AttributeValue `mapstructure:",squash"` +} + +// END Summary + +// END Metrics Handling + +// writeMetric - a helper method used by different metric persistence methods to write the +// metric data in order. +// +// @receiver kiwriter - pointer to [KiWriter] +// @param metricType - a [pmetric.MetricTypeGauge] or something else converted to string +// @param tableDataMap - a map from table name to the relevant data +// @return error +func (kiwriter *KiWriter) writeMetric(metricType string, tableDataMap *orderedmap.OrderedMap[string, []any]) error { + + kiwriter.logger.Debug("Writing metric", zap.String("Type", metricType)) + + var errs []error + errsChan := make(chan error, tableDataMap.Len()) + + wg := &sync.WaitGroup{} + for pair := tableDataMap.Oldest(); pair != nil; pair = pair.Next() { + tableName := pair.Key + data := pair.Value + + wg.Add(1) + + go func(tableName string, data []any, wg *sync.WaitGroup) { + err := kiwriter.doChunkedInsert(context.TODO(), tableName, data) + if err != nil { + errsChan <- err + } + wg.Done() + }(tableName, data, wg) + + } + wg.Wait() + + close(errsChan) + + var insErrs error + for err := range errsChan { + insErrs = multierr.Append(insErrs, err) + } + errs = append(errs, insErrs) + return multierr.Combine(errs...) +} + +func (kiwriter *KiWriter) persistGaugeRecord(gaugeRecords []kineticaGaugeRecord) error { + kiwriter.logger.Debug("In persistGaugeRecord ...") + + var errs []error + var gauges []any + var resourceAttributes []any + var scopeAttributes []any + var datapoints []any + var datapointAttributes []any + var exemplars []any + var exemplarAttributes []any + + for _, gaugerecord := range gaugeRecords { + + gauges = append(gauges, *gaugerecord.gauge) + + for _, gr := range gaugerecord.resourceAttribute { + resourceAttributes = append(resourceAttributes, gr) + } + + for _, sa := range gaugerecord.scopeAttribute { + scopeAttributes = append(scopeAttributes, sa) + } + + for _, dp := range gaugerecord.datapoint { + datapoints = append(datapoints, dp) + } + + for _, dpattr := range gaugerecord.datapointAttribute { + datapointAttributes = append(datapointAttributes, dpattr) + } + + for _, ge := range gaugerecord.exemplars { + exemplars = append(exemplars, ge) + } + + for _, geattr := range gaugerecord.exemplarAttribute { + exemplarAttributes = append(exemplarAttributes, geattr) + } + + } + + tableDataMap := orderedmap.New[string, []any]() + + tableDataMap.Set(GaugeTable, gauges) + tableDataMap.Set(GaugeDatapointTable, datapoints) + tableDataMap.Set(GaugeDatapointAttributeTable, datapointAttributes) + tableDataMap.Set(GaugeResourceAttributeTable, resourceAttributes) + tableDataMap.Set(GaugeScopeAttributeTable, scopeAttributes) + tableDataMap.Set(GaugeDatapointExemplarTable, exemplars) + tableDataMap.Set(GaugeDatapointExemplarAttributeTable, exemplarAttributes) + + errs = append(errs, kiwriter.writeMetric(pmetric.MetricTypeGauge.String(), tableDataMap)) + + return multierr.Combine(errs...) +} + +func (kiwriter *KiWriter) persistSumRecord(sumRecords []kineticaSumRecord) error { + kiwriter.logger.Debug("In persistSumRecord ...") + + var errs []error + + var sums []any + var resourceAttributes []any + var scopeAttributes []any + var datapoints []any + var datapointAttributes []any + var exemplars []any + var exemplarAttributes []any + + for _, sumrecord := range sumRecords { + + sums = append(sums, *sumrecord.sum) + + for _, sr := range sumrecord.sumResourceAttribute { + resourceAttributes = append(resourceAttributes, sr) + } + + for _, sa := range sumrecord.sumScopeAttribute { + scopeAttributes = append(scopeAttributes, sa) + } + + for _, dp := range sumrecord.datapoint { + datapoints = append(datapoints, dp) + } + + for _, dpattr := range sumrecord.datapointAttribute { + datapointAttributes = append(datapointAttributes, dpattr) + } + + for _, se := range sumrecord.exemplars { + exemplars = append(exemplars, se) + } + + for _, seattr := range sumrecord.exemplarAttribute { + exemplarAttributes = append(exemplarAttributes, seattr) + } + + } + + tableDataMap := orderedmap.New[string, []any]() + + tableDataMap.Set(SumTable, sums) + tableDataMap.Set(SumDatapointTable, datapoints) + tableDataMap.Set(SumDatapointAttributeTable, datapointAttributes) + tableDataMap.Set(SumResourceAttributeTable, resourceAttributes) + tableDataMap.Set(SumScopeAttributeTable, scopeAttributes) + tableDataMap.Set(SumDatapointExemplarTable, exemplars) + tableDataMap.Set(SumDataPointExemplarAttributeTable, exemplarAttributes) + + errs = append(errs, kiwriter.writeMetric(pmetric.MetricTypeSum.String(), tableDataMap)) + + return multierr.Combine(errs...) +} + +func (kiwriter *KiWriter) persistHistogramRecord(histogramRecords []kineticaHistogramRecord) error { + kiwriter.logger.Debug("In persistHistogramRecord ...") + + var errs []error + + var histograms []any + var resourceAttributes []any + var scopeAttributes []any + var datapoints []any + var datapointAttributes []any + var bucketCounts []any + var explicitBounds []any + var exemplars []any + var exemplarAttributes []any + + for _, histogramrecord := range histogramRecords { + + histograms = append(histograms, *histogramrecord.histogram) + + for _, ra := range histogramrecord.histogramResourceAttribute { + resourceAttributes = append(resourceAttributes, ra) + } + + for _, sa := range histogramrecord.histogramScopeAttribute { + scopeAttributes = append(scopeAttributes, sa) + } + + for _, dp := range histogramrecord.histogramDatapoint { + datapoints = append(datapoints, dp) + } + + for _, dpattr := range histogramrecord.histogramDatapointAtribute { + datapointAttributes = append(datapointAttributes, dpattr) + } + + for _, bc := range histogramrecord.histogramBucketCount { + bucketCounts = append(bucketCounts, bc) + } + + for _, eb := range histogramrecord.histogramExplicitBound { + explicitBounds = append(explicitBounds, eb) + } + + for _, ex := range histogramrecord.exemplars { + exemplars = append(exemplars, ex) + } + + for _, exattr := range histogramrecord.exemplarAttribute { + exemplarAttributes = append(exemplarAttributes, exattr) + } + } + + tableDataMap := orderedmap.New[string, []any]() + + tableDataMap.Set(HistogramTable, histograms) + tableDataMap.Set(HistogramDatapointTable, datapoints) + tableDataMap.Set(HistogramDatapointAttributeTable, datapointAttributes) + tableDataMap.Set(HistogramBucketCountsTable, bucketCounts) + tableDataMap.Set(HistogramExplicitBoundsTable, explicitBounds) + tableDataMap.Set(HistogramResourceAttributeTable, resourceAttributes) + tableDataMap.Set(HistogramScopeAttributeTable, scopeAttributes) + tableDataMap.Set(HistogramDatapointExemplarTable, exemplars) + tableDataMap.Set(HistogramDataPointExemplarAttributeTable, exemplarAttributes) + + errs = append(errs, kiwriter.writeMetric(pmetric.MetricTypeHistogram.String(), tableDataMap)) + + return multierr.Combine(errs...) +} + +func (kiwriter *KiWriter) persistExponentialHistogramRecord(exponentialHistogramRecords []kineticaExponentialHistogramRecord) error { + kiwriter.logger.Debug("In persistExponentialHistogramRecord ...") + + var errs []error + + var histograms []any + var resourceAttributes []any + var scopeAttributes []any + var datapoints []any + var datapointAttributes []any + var positiveBucketCounts []any + var negativeBucketCounts []any + var exemplars []any + var exemplarAttributes []any + + for _, histogramrecord := range exponentialHistogramRecords { + + histograms = append(histograms, *histogramrecord.histogram) + + for _, ra := range histogramrecord.histogramResourceAttribute { + resourceAttributes = append(resourceAttributes, ra) + } + + for _, sa := range histogramrecord.histogramScopeAttribute { + scopeAttributes = append(scopeAttributes, sa) + } + + for _, dp := range histogramrecord.histogramDatapoint { + datapoints = append(datapoints, dp) + } + + for _, dpattr := range histogramrecord.histogramDatapointAttribute { + datapointAttributes = append(datapointAttributes, dpattr) + } + + for _, posbc := range histogramrecord.histogramBucketPositiveCount { + positiveBucketCounts = append(positiveBucketCounts, posbc) + } + + for _, negbc := range histogramrecord.histogramBucketNegativeCount { + negativeBucketCounts = append(negativeBucketCounts, negbc) + } + + for _, ex := range histogramrecord.exemplars { + exemplars = append(exemplars, ex) + } + + for _, exattr := range histogramrecord.exemplarAttribute { + exemplarAttributes = append(exemplarAttributes, exattr) + } + } + + tableDataMap := orderedmap.New[string, []any]() + + tableDataMap.Set(ExpHistogramTable, histograms) + tableDataMap.Set(ExpHistogramDatapointTable, datapoints) + tableDataMap.Set(ExpHistogramDatapointAttributeTable, datapointAttributes) + tableDataMap.Set(ExpHistogramPositiveBucketCountsTable, positiveBucketCounts) + tableDataMap.Set(ExpHistogramNegativeBucketCountsTable, negativeBucketCounts) + tableDataMap.Set(ExpHistogramResourceAttributeTable, resourceAttributes) + tableDataMap.Set(ExpHistogramScopeAttributeTable, scopeAttributes) + tableDataMap.Set(ExpHistogramDatapointExemplarTable, exemplars) + tableDataMap.Set(ExpHistogramDataPointExemplarAttributeTable, exemplarAttributes) + + errs = append(errs, kiwriter.writeMetric(pmetric.MetricTypeExponentialHistogram.String(), tableDataMap)) + + return multierr.Combine(errs...) +} + +func (kiwriter *KiWriter) persistSummaryRecord(summaryRecords []kineticaSummaryRecord) error { + kiwriter.logger.Debug("In persistSummaryRecord ...") + + var errs []error + + var summaries []any + var resourceAttributes []any + var scopeAttributes []any + var datapoints []any + var datapointAttributes []any + var datapointQuantiles []any + + for _, summaryrecord := range summaryRecords { + + summaries = append(summaries, *summaryrecord.summary) + + for _, ra := range summaryrecord.summaryResourceAttribute { + resourceAttributes = append(resourceAttributes, ra) + } + + for _, sa := range summaryrecord.summaryScopeAttribute { + scopeAttributes = append(scopeAttributes, sa) + } + + for _, dp := range summaryrecord.summaryDatapoint { + datapoints = append(datapoints, dp) + } + + for _, dpattr := range summaryrecord.summaryDatapointAttribute { + datapointAttributes = append(datapointAttributes, dpattr) + } + + for _, dpq := range summaryrecord.summaryDatapointQuantileValues { + datapointQuantiles = append(datapointQuantiles, dpq) + } + } + + tableDataMap := orderedmap.New[string, []any]() + + tableDataMap.Set(SummaryTable, summaries) + tableDataMap.Set(SummaryDatapointTable, datapoints) + tableDataMap.Set(SummaryDatapointAttributeTable, datapointAttributes) + tableDataMap.Set(SummaryDatapointQuantileValueTable, datapointQuantiles) + tableDataMap.Set(SummaryResourceAttributeTable, resourceAttributes) + tableDataMap.Set(SummaryScopeAttributeTable, scopeAttributes) + + errs = append(errs, kiwriter.writeMetric(pmetric.MetricTypeSummary.String(), tableDataMap)) + + return multierr.Combine(errs...) + +} + +func (kiwriter *KiWriter) doChunkedInsert(_ context.Context, tableName string, records []any) error { + + // Build the final table name with the schema prepended + var finalTable string + if len(kiwriter.cfg.Schema) != 0 { + finalTable = fmt.Sprintf("%s.%s", kiwriter.cfg.Schema, tableName) + } else { + finalTable = tableName + } + + kiwriter.logger.Debug("Writing to - ", zap.String("Table", finalTable), zap.Int("Record count", len(records))) + + recordChunks := chunkBySize(records, ChunkSize) + + errsChan := make(chan error, len(recordChunks)) + + wg := &sync.WaitGroup{} + + for _, recordChunk := range recordChunks { + wg.Add(1) + go func(data []any, wg *sync.WaitGroup) { + _, err := kiwriter.Db.InsertRecordsRaw(context.TODO(), finalTable, data) + errsChan <- err + + wg.Done() + }(recordChunk, wg) + } + wg.Wait() + close(errsChan) + var errs error + for err := range errsChan { + errs = multierr.Append(errs, err) + } + return errs +} diff --git a/exporter/loadbalancingexporter/README.md b/exporter/loadbalancingexporter/README.md index c3d6427de973..3f17f084e1dc 100644 --- a/exporter/loadbalancingexporter/README.md +++ b/exporter/loadbalancingexporter/README.md @@ -3,19 +3,15 @@ | Status | | | ------------- |-----------| -| Stability | [beta]: traces, logs | -| | [development]: metrics | -| Distributions | [contrib], [aws], [grafana], [observiq], [sumo] | +| Stability | [development]: metrics | +| | [beta]: traces, logs | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Floadbalancing%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Floadbalancing) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Floadbalancing%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Floadbalancing) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [development]: https://github.com/open-telemetry/opentelemetry-collector#development +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[grafana]: https://github.com/grafana/agent -[observiq]: https://github.com/observIQ/observiq-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector This is an exporter that will consistently export spans, metrics and logs depending on the `routing_key` configured. @@ -46,14 +42,20 @@ Around R/N of the "routes" will be rerouted differently, where: This should be stable enough for most cases, and the larger the number of backends, the less disruption it should cause. Still, if routing stability is important for your use case and your list of backends are constantly changing, consider using the `groupbytrace` processor. This way, traces are dispatched atomically to this exporter, and the same decision about the backend is made for the trace as a whole. -This also supports service name based exporting for traces. If you have two or more collectors that collect traces and then use spanmetrics processor to generate metrics and push to prometheus, there is a high chance of facing label collisions on prometheus if the routing is based on `traceID` because every collector sees the `service+operation` label. With service name based routing, each collector can only see one service name and can push metrics without any label collisions. +This also supports service name based exporting for traces. If you have two or more collectors that collect traces and then use spanmetrics connector to generate metrics and push to prometheus, there is a high chance of facing label collisions on prometheus if the routing is based on `traceID` because every collector sees the `service+operation` label. With service name based routing, each collector can only see one service name and can push metrics without any label collisions. + +## Resilience and scaling considerations +The `loadbalancingexporter` will, irrespective of the chosen resolver (`static`, `dns`, `k8s`), create one exporter per endpoint. The exporter conforms to its published configuration regarding sending queue and retry mechanisms. Importantly, the `loadbalancingexporter` will not attempt to re-route data to a healthy endpoint on delivery failure, and data loss is therefore possible if the exporter's target remains unavailable once redelivery is exhausted. Due consideration needs to be given to the exporter queue and retry configuration when running in a highly elastic environment. + +- When using the `static` resolver and a target is unavailable, all the target's load-balanced telemetry will fail to be delivered until either the target is restored or removed from the static list. The same principle applies to the `dns` resolver. +- When using `k8s`, `dns`, and likely future resolvers, topology changes are eventually reflected in the `loadbalancingexporter`. The `k8s` resolver will update more quickly than `dns`, but a window of time in which the true topology doesn't match the view of the `loadbalancingexporter` remains. ## Configuration Refer to [config.yaml](./testdata/config.yaml) for detailed examples on using the processor. * The `otlp` property configures the template used for building the OTLP exporter. Refer to the OTLP Exporter documentation for information on which options are available. Note that the `endpoint` property should not be set and will be overridden by this exporter with the backend endpoint. -* The `resolver` accepts a `static` node, a `dns` or a `k8s` service. If all three are specified, `k8s` takes precedence. +* The `resolver` accepts a `static` node, a `dns`, a `k8s` service or `awsCloudMap`. If all four are specified, an `errMultipleResolversProvided` error will be thrown. * The `hostname` property inside a `dns` node specifies the hostname to query in order to obtain the list of IP addresses. * The `dns` node also accepts the following optional properties: * `hostname` DNS hostname to resolve. @@ -63,6 +65,23 @@ Refer to [config.yaml](./testdata/config.yaml) for detailed examples on using th * The `k8s` node accepts the following optional properties: * `service` Kubernetes service to resolve, e.g. `lb-svc.lb-ns`. If no namespace is specified, an attempt will be made to infer the namespace for this collector, and if this fails it will fall back to the `default` namespace. * `ports` port to be used for exporting the traces to the addresses resolved from `service`. If `ports` is not specified, the default port 4317 is used. When multiple ports are specified, two backends are added to the load balancer as if they were at different pods. + * `timeout` resolver timeout in go-Duration format, e.g. `5s`, `1d`, `30m`. If not specified, `1s` will be used. +* The `awsCloudMap` node accepts the following properties: + * `namespace` The CloudMap namespace where the service is register, e.g. `cloudmap`. If no `namespace` is specified, this will fail to start the Load Balancer exporter. + * `serviceName` The name of the service that you specified when you registered the instance, e.g. `otelcollectors`. If no `serviceName` is specified, this will fail to start the Load Balancer exporter. + * `interval` resolver interval in go-Duration format, e.g. `5s`, `1d`, `30m`. If not specified, `30s` will be used. + * `timeout` resolver timeout in go-Duration format, e.g. `5s`, `1d`, `30m`. If not specified, `5s` will be used. + * `port` port to be used for exporting the traces to the addresses resolved from `service`. By default, the port is set in Cloud Map, but can be be overridden with a static value in this config + * `healthStatus` filter in AWS Cloud Map, you can specify the health status of the instances that you want to discover. The healthStatus filter is optional and allows you to query based on the health status of the instances. + * Available values are + * `HEALTHY`: Only return instances that are healthy. + * `UNHEALTHY`: Only return instances that are unhealthy. + * `ALL`: Return all instances, regardless of their health status. + * `HEALTHY_OR_ELSE_ALL`: Returns healthy instances, unless none are reporting a healthy state. In that case, return all instances. This is also called failing open. + * Resolver's default filter is set to `HEALTHY` when none is explicitly defined + * **Notes:** + * This resolver currently returns a maximum of 100 hosts. + * `TODO`: Feature request [29771](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/29771) aims to cover the pagination for this scenario * The `routing_key` property is used to route spans to exporters based on different parameters. This functionality is currently enabled only for `trace` pipeline types. It supports one of the following values: * `service`: exports spans based on their service name. This is useful when using processors like the span metrics, so all spans for each service are sent to consistent collector instances for metric collection. Otherwise, metrics for the same services are sent to different collectors, making aggregations inaccurate. * `traceID` (default): exports spans based on their `traceID`. @@ -155,6 +174,45 @@ service: - loadbalancing ``` +AWS CloudMap resolver example +```yaml +receivers: + otlp: + protocols: + grpc: + endpoint: localhost:4317 + +processors: + +exporters: + loadbalancing: + protocol: + otlp: + # all options from the OTLP exporter are supported + # except the endpoint + timeout: 3s + resolver: + awsCloudMap: + namespace: aws-namespace + serviceName: aws-otel-col-service-name + interval: 30s + +service: + pipelines: + traces: + receivers: + - otlp + processors: [] + exporters: + - loadbalancing + logs: + receivers: + - otlp + processors: [] + exporters: + - loadbalancing +``` + For testing purposes, the following configuration can be used, where both the load balancer and all backends are running locally: ```yaml receivers: diff --git a/exporter/loadbalancingexporter/config.go b/exporter/loadbalancingexporter/config.go index bfb7c057a686..6acee4a8ebe3 100644 --- a/exporter/loadbalancingexporter/config.go +++ b/exporter/loadbalancingexporter/config.go @@ -6,6 +6,7 @@ package loadbalancingexporter // import "github.com/open-telemetry/opentelemetry import ( "time" + "github.com/aws/aws-sdk-go-v2/service/servicediscovery/types" "go.opentelemetry.io/collector/exporter/otlpexporter" ) @@ -32,9 +33,10 @@ type Protocol struct { // ResolverSettings defines the configurations for the backend resolver type ResolverSettings struct { - Static *StaticResolver `mapstructure:"static"` - DNS *DNSResolver `mapstructure:"dns"` - K8sSvc *K8sSvcResolver `mapstructure:"k8s"` + Static *StaticResolver `mapstructure:"static"` + DNS *DNSResolver `mapstructure:"dns"` + K8sSvc *K8sSvcResolver `mapstructure:"k8s"` + AWSCloudMap *AWSCloudMapResolver `mapstructure:"awsCloudMap"` } // StaticResolver defines the configuration for the resolver providing a fixed list of backends @@ -52,6 +54,16 @@ type DNSResolver struct { // K8sSvcResolver defines the configuration for the DNS resolver type K8sSvcResolver struct { - Service string `mapstructure:"service"` - Ports []int32 `mapstructure:"ports"` + Service string `mapstructure:"service"` + Ports []int32 `mapstructure:"ports"` + Timeout time.Duration `mapstructure:"timeout"` +} + +type AWSCloudMapResolver struct { + NamespaceName string `mapstructure:"namespace"` + ServiceName string `mapstructure:"serviceName"` + HealthStatus types.HealthStatusFilter `mapstructure:"healthStatus"` + Interval time.Duration `mapstructure:"interval"` + Timeout time.Duration `mapstructure:"timeout"` + Port *uint16 `mapstructure:"port"` } diff --git a/exporter/loadbalancingexporter/example/Dockerfile b/exporter/loadbalancingexporter/example/Dockerfile index 26e83570bc5e..29289f483359 100644 --- a/exporter/loadbalancingexporter/example/Dockerfile +++ b/exporter/loadbalancingexporter/example/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21 AS build +FROM golang:1.22 AS build WORKDIR /src ADD . /src diff --git a/exporter/loadbalancingexporter/factory.go b/exporter/loadbalancingexporter/factory.go index 60a8be45217a..f748ff162c6f 100644 --- a/exporter/loadbalancingexporter/factory.go +++ b/exporter/loadbalancingexporter/factory.go @@ -32,6 +32,7 @@ func NewFactory() exporter.Factory { func createDefaultConfig() component.Config { otlpFactory := otlpexporter.NewFactory() otlpDefaultCfg := otlpFactory.CreateDefaultConfig().(*otlpexporter.Config) + otlpDefaultCfg.Endpoint = "placeholder:4317" return &Config{ Protocol: Protocol{ diff --git a/exporter/loadbalancingexporter/factory_test.go b/exporter/loadbalancingexporter/factory_test.go index ccf957eef971..6da108067651 100644 --- a/exporter/loadbalancingexporter/factory_test.go +++ b/exporter/loadbalancingexporter/factory_test.go @@ -25,7 +25,7 @@ func TestTracesExporterGetsCreatedWithValidConfiguration(t *testing.T) { exp, err := factory.CreateTracesExporter(context.Background(), creationParams, cfg) // verify - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exp) } @@ -43,6 +43,18 @@ func TestLogExporterGetsCreatedWithValidConfiguration(t *testing.T) { exp, err := factory.CreateLogsExporter(context.Background(), creationParams, cfg) // verify - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exp) } + +func TestOTLPConfigIsValid(t *testing.T) { + // prepare + factory := NewFactory() + defaultCfg := factory.CreateDefaultConfig().(*Config) + + // test + otlpCfg := defaultCfg.Protocol.OTLP + + // verify + assert.NoError(t, otlpCfg.Validate()) +} diff --git a/exporter/loadbalancingexporter/generated_component_test.go b/exporter/loadbalancingexporter/generated_component_test.go new file mode 100644 index 000000000000..f8e5b0c1fc4f --- /dev/null +++ b/exporter/loadbalancingexporter/generated_component_test.go @@ -0,0 +1,140 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package loadbalancingexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/loadbalancingexporter/go.mod b/exporter/loadbalancingexporter/go.mod index 4cd6a670bc19..e333e8e5e060 100644 --- a/exporter/loadbalancingexporter/go.mod +++ b/exporter/loadbalancingexporter/go.mod @@ -1,69 +1,82 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.89.0 - github.com/stretchr/testify v1.8.4 + github.com/aws/aws-sdk-go-v2/config v1.27.11 + github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.29.5 + github.com/aws/smithy-go v1.20.2 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.98.0 + github.com/stretchr/testify v1.9.0 go.opencensus.io v0.24.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0 - go.opentelemetry.io/collector/otelcol v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0 + go.opentelemetry.io/collector/otelcol v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 - k8s.io/api v0.28.3 - k8s.io/apimachinery v0.28.3 - k8s.io/client-go v0.28.3 - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 - sigs.k8s.io/controller-runtime v0.16.3 + go.uber.org/zap v1.27.0 + k8s.io/api v0.29.3 + k8s.io/apimachinery v0.29.3 + k8s.io/client-go v0.29.3 + k8s.io/utils v0.0.0-20240102154912-e7106e64919e + sigs.k8s.io/controller-runtime v0.17.3 ) require ( - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect + github.com/aws/aws-sdk-go-v2 v1.26.1 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.11 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/evanphx/json-patch/v5 v5.8.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.3.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/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.4.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/imdario/mergo v0.3.6 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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 @@ -72,71 +85,78 @@ require ( github.com/pkg/errors v0.9.1 // 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.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // 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.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.89.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/connector v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/processor v0.89.0 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/collector/service v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk v1.20.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.98.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.98.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 // indirect + go.opentelemetry.io/collector/connector v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/collector/processor v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/collector/service v0.98.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.25.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.4.0 // indirect - gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal => ../../pkg/batchpersignal diff --git a/exporter/loadbalancingexporter/go.sum b/exporter/loadbalancingexporter/go.sum index 8ef43fffa5b6..7b7276fae18d 100644 --- a/exporter/loadbalancingexporter/go.sum +++ b/exporter/loadbalancingexporter/go.sum @@ -1,889 +1,67 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= -cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= -cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= -cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= -cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= -cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= -cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= -cloud.google.com/go v0.110.7 h1:rJyC7nWRg2jWGZ4wSJ5nY65GTdYJkg0cd/uXb+ACI6o= -cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= -cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= -cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= -cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= -cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= -cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68= -cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= -cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= -cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= -cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= -cloud.google.com/go/accesscontextmanager v1.8.0/go.mod h1:uI+AI/r1oyWK99NN8cQ3UK76AMelMzgZCvJfsi2c+ps= -cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo= -cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= -cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= -cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= -cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6lKv3w0+tFTgXQ= -cloud.google.com/go/aiplatform v1.36.1/go.mod h1:WTm12vJRPARNvJ+v6P52RDHCNe4AhvjcIZ/9/RRHy/k= -cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= -cloud.google.com/go/aiplatform v1.45.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= -cloud.google.com/go/aiplatform v1.48.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= -cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= -cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= -cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= -cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= -cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= -cloud.google.com/go/analytics v0.21.2/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= -cloud.google.com/go/analytics v0.21.3/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= -cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= -cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= -cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= -cloud.google.com/go/apigateway v1.6.1/go.mod h1:ufAS3wpbRjqfZrzpvLC2oh0MFlpRJm2E/ts25yyqmXA= -cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= -cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= -cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= -cloud.google.com/go/apigeeconnect v1.6.1/go.mod h1:C4awq7x0JpLtrlQCr8AzVIzAaYgngRqWf9S5Uhg+wWs= -cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= -cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= -cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= -cloud.google.com/go/apigeeregistry v0.7.1/go.mod h1:1XgyjZye4Mqtw7T9TsY4NW10U7BojBvG4RMD+vRDrIw= -cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= -cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= -cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= -cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= -cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= -cloud.google.com/go/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg/X0V5fJn84= -cloud.google.com/go/appengine v1.7.0/go.mod h1:eZqpbHFCqRGa2aCdope7eC0SWLV1j0neb/QnMJVWx6A= -cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= -cloud.google.com/go/appengine v1.8.1/go.mod h1:6NJXGLVhZCN9aQ/AEDvmfzKEfoYBlfB80/BHiKVputY= -cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= -cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= -cloud.google.com/go/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= -cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= -cloud.google.com/go/area120 v0.8.1/go.mod h1:BVfZpGpB7KFVNxPiQBuHkX6Ed0rS51xIgmGyjrAfzsg= -cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= -cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= -cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= -cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= -cloud.google.com/go/artifactregistry v1.11.1/go.mod h1:lLYghw+Itq9SONbCa1YWBoWs1nOucMH0pwXN1rOBZFI= -cloud.google.com/go/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9ehma4WUEhZGWV6CeQNQ= -cloud.google.com/go/artifactregistry v1.12.0/go.mod h1:o6P3MIvtzTOnmvGagO9v/rOjjA0HmhJ+/6KAXrmYDCI= -cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= -cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346r3rIdkZ142BSQqhn5E= -cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= -cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= -cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= -cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= -cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= -cloud.google.com/go/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrdEUYXlJo= -cloud.google.com/go/asset v1.12.0/go.mod h1:h9/sFOa4eDIyKmH6QMpm4eUK3pDojWnUhTgJlk762Hg= -cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= -cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi03hd+WTQ= -cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= -cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= -cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= -cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= -cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= -cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0= -cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= -cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= -cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= -cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= -cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= -cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE= -cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= -cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= -cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= -cloud.google.com/go/baremetalsolution v1.1.1/go.mod h1:D1AV6xwOksJMV4OSlWHtWuFNZZYujJknMAP4Qa27QIA= -cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= -cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= -cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= -cloud.google.com/go/batch v1.3.1/go.mod h1:VguXeQKXIYaeeIYbuozUmBR13AfL4SJP7IltNPS+A4A= -cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= -cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= -cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= -cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= -cloud.google.com/go/beyondcorp v0.6.1/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= -cloud.google.com/go/beyondcorp v1.0.0/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= -cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= -cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= -cloud.google.com/go/bigquery v1.47.0/go.mod h1:sA9XOgy0A8vQK9+MWhEQTY6Tix87M/ZurWFIxmF9I/E= -cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm0Nf1fysJac= -cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= -cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= -cloud.google.com/go/bigquery v1.52.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= -cloud.google.com/go/bigquery v1.53.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= -cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= -cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= -cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= -cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= -cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= -cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= -cloud.google.com/go/billing v1.16.0/go.mod h1:y8vx09JSSJG02k5QxbycNRrN7FGZB6F3CAcgum7jvGA= -cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= -cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= -cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= -cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= -cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= -cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxijJRZED4zrqnwZ1lKH51U= -cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= -cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= -cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= -cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI= -cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= -cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= -cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= -cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= -cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeHCJNf/oHmc= -cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= -cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= -cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= -cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= -cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= -cloud.google.com/go/cloudbuild v1.10.1/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= -cloud.google.com/go/cloudbuild v1.13.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= -cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= -cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= -cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= -cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+PlS6PVXCpZI= -cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= -cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= -cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= -cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= -cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= -cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= -cloud.google.com/go/cloudtasks v1.11.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= -cloud.google.com/go/cloudtasks v1.12.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= -cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= -cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= -cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= -cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= -cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= -cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= -cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= -cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= -cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= -cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= -cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= -cloud.google.com/go/contactcenterinsights v1.9.1/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= -cloud.google.com/go/contactcenterinsights v1.10.0/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= -cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= -cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= -cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= -cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= -cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= -cloud.google.com/go/container v1.22.1/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= -cloud.google.com/go/container v1.24.0/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= -cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= -cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= -cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= -cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= -cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMNkwsDrWBSTyBubGXO7j0= -cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= -cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= -cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= -cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= -cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= -cloud.google.com/go/datacatalog v1.8.1/go.mod h1:RJ58z4rMp3gvETA465Vg+ag8BGgBdnRPEMMSTr5Uv+M= -cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3NXLzVJ1d1mRm0= -cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= -cloud.google.com/go/datacatalog v1.14.0/go.mod h1:h0PrGtlihoutNMp/uvwhawLQ9+c63Kz65UFqh49Yo+E= -cloud.google.com/go/datacatalog v1.14.1/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= -cloud.google.com/go/datacatalog v1.16.0/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= -cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= -cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= -cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= -cloud.google.com/go/dataflow v0.9.1/go.mod h1:Wp7s32QjYuQDWqJPFFlnBKhkAtiFpMTdg00qGbnIHVw= -cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= -cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= -cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= -cloud.google.com/go/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= -cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= -cloud.google.com/go/dataform v0.8.1/go.mod h1:3BhPSiw8xmppbgzeBbmDvmSWlwouuJkXsXsb8UBih9M= -cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= -cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= -cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= -cloud.google.com/go/datafusion v1.7.1/go.mod h1:KpoTBbFmoToDExJUso/fcCiguGDk7MEzOWXUsJo0wsI= -cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= -cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= -cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= -cloud.google.com/go/datalabeling v0.8.1/go.mod h1:XS62LBSVPbYR54GfYQsPXZjTW8UxCK2fkDciSrpRFdY= -cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= -cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= -cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= -cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= -cloud.google.com/go/dataplex v1.8.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= -cloud.google.com/go/dataplex v1.9.0/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= -cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= -cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= -cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= -cloud.google.com/go/dataproc/v2 v2.0.1/go.mod h1:7Ez3KRHdFGcfY7GcevBbvozX+zyWGcwLJvvAMwCaoZ4= -cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= -cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= -cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= -cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= -cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= -cloud.google.com/go/datastore v1.12.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= -cloud.google.com/go/datastore v1.12.1/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= -cloud.google.com/go/datastore v1.13.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= -cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= -cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= -cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= -cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= -cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= -cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= -cloud.google.com/go/datastream v1.9.1/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= -cloud.google.com/go/datastream v1.10.0/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= -cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= -cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= -cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= -cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= -cloud.google.com/go/deploy v1.11.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= -cloud.google.com/go/deploy v1.13.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= -cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= -cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= -cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= -cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= -cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= -cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHihAdRFMtn2WXuM= -cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= -cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= -cloud.google.com/go/dialogflow v1.38.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= -cloud.google.com/go/dialogflow v1.40.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= -cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= -cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= -cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= -cloud.google.com/go/dlp v1.10.1/go.mod h1:IM8BWz1iJd8njcNcG0+Kyd9OPnqnRNkDV8j42VT5KOI= -cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= -cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= -cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= -cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= -cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= -cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= -cloud.google.com/go/documentai v1.20.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= -cloud.google.com/go/documentai v1.22.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= -cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= -cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= -cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= -cloud.google.com/go/domains v0.9.1/go.mod h1:aOp1c0MbejQQ2Pjf1iJvnVyT+z6R6s8pX66KaCSDYfE= -cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= -cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= -cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= -cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= -cloud.google.com/go/edgecontainer v1.1.1/go.mod h1:O5bYcS//7MELQZs3+7mabRqoWQhXCzenBu0R8bz2rwk= -cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= -cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= -cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= -cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= -cloud.google.com/go/essentialcontacts v1.6.2/go.mod h1:T2tB6tX+TRak7i88Fb2N9Ok3PvY3UNbUsMag9/BARh4= -cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= -cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= -cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= -cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= -cloud.google.com/go/eventarc v1.12.1/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= -cloud.google.com/go/eventarc v1.13.0/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= -cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= -cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= -cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= -cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= -cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4= -cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= -cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= -cloud.google.com/go/firestore v1.12.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= -cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= -cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= -cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= -cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= -cloud.google.com/go/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1YbI7dGvHfldXw= -cloud.google.com/go/functions v1.12.0/go.mod h1:AXWGrF3e2C/5ehvwYo/GH6O5s09tOPksiKhz+hH8WkA= -cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= -cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE= -cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= -cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= -cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= -cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= -cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= -cloud.google.com/go/gaming v1.10.1/go.mod h1:XQQvtfP8Rb9Rxnxm5wFVpAp9zCQkJi2bLIb7iHGwB3s= -cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= -cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= -cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= -cloud.google.com/go/gkebackup v1.3.0/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= -cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= -cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= -cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= -cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw= -cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= -cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= -cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= -cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= -cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY= -cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= -cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= -cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= -cloud.google.com/go/gkemulticloud v0.6.1/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= -cloud.google.com/go/gkemulticloud v1.0.0/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= -cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= -cloud.google.com/go/grafeas v0.3.0/go.mod h1:P7hgN24EyONOTMyeJH6DxG4zD7fwiYa5Q6GUgyFSOU8= -cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= -cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= -cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= -cloud.google.com/go/gsuiteaddons v1.6.1/go.mod h1:CodrdOqRZcLp5WOwejHWYBjZvfY0kOphkAKpF/3qdZY= -cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= -cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= -cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= -cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= -cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/iam v1.0.1/go.mod h1:yR3tmSL8BcZB4bxByRv2jkSIahVmCtfKZwLYGBalRE8= -cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= -cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= -cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= -cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= -cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= -cloud.google.com/go/iap v1.7.0/go.mod h1:beqQx56T9O1G1yNPph+spKpNibDlYIiIixiqsQXxLIo= -cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= -cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyXYREQ= -cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= -cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= -cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= -cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw= -cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= -cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= -cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= -cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= -cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk= -cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= -cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= -cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= -cloud.google.com/go/kms v1.8.0/go.mod h1:4xFEhYFqvW+4VMELtZyxomGSYtSQKzM178ylFW4jMAg= -cloud.google.com/go/kms v1.9.0/go.mod h1:qb1tPTgfF9RQP8e1wq4cLFErVuTJv7UsSC915J8dh3w= -cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63m8d24= -cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= -cloud.google.com/go/kms v1.11.0/go.mod h1:hwdiYC0xjnWsKQQCQQmIQnS9asjYVSK6jtXm+zFqXLM= -cloud.google.com/go/kms v1.12.1/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= -cloud.google.com/go/kms v1.15.0/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= -cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= -cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= -cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= -cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= -cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= -cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIbMhvR8H2AW0= -cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= -cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= -cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc= -cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= -cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= -cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= -cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= -cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= -cloud.google.com/go/longrunning v0.4.2/go.mod h1:OHrnaYyLUV6oqwh0xiS7e5sLQhP1m0QU9R+WhGDMgIQ= -cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPkwP0YF1oVEchc= -cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= -cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= -cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= -cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= -cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak= -cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= -cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= -cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= -cloud.google.com/go/maps v1.3.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= -cloud.google.com/go/maps v1.4.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= -cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= -cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= -cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= -cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig= -cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= -cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= -cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= -cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= -cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= -cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA= -cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= -cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= -cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= -cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= -cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= -cloud.google.com/go/metastore v1.11.1/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= -cloud.google.com/go/metastore v1.12.0/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= -cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= -cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= -cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= -cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= -cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3ojypXrFSMr2rM= -cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= -cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= -cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= -cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= -cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= -cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= -cloud.google.com/go/networkconnectivity v1.12.1/go.mod h1:PelxSWYM7Sh9/guf8CFhi6vIqf19Ir/sbfZRUwXh92E= -cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= -cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= -cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= -cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vDdK74ibQc+Be0q7Fof0= -cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= -cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= -cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= -cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= -cloud.google.com/go/networksecurity v0.9.1/go.mod h1:MCMdxOKQ30wsBI1eI659f9kEp4wuuAueoC9AJKSPWZQ= -cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= -cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= -cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= -cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= -cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= -cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= -cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPcHZRKhlC1A8= -cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= -cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= -cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= -cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN5eKPUPbZyXOrk= -cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= -cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= -cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= -cloud.google.com/go/orchestration v1.8.1/go.mod h1:4sluRF3wgbYVRqz7zJ1/EUNc90TTprliq9477fGobD8= -cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= -cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= -cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= -cloud.google.com/go/orgpolicy v1.11.0/go.mod h1:2RK748+FtVvnfuynxBzdnyu7sygtoZa1za/0ZfpOs1M= -cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE= -cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= -cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= -cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= -cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= -cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= -cloud.google.com/go/osconfig v1.12.0/go.mod h1:8f/PaYzoS3JMVfdfTubkowZYGmAhUCjjwnjqWI7NVBc= -cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE= -cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= -cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= -cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= -cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= -cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= -cloud.google.com/go/oslogin v1.10.1/go.mod h1:x692z7yAue5nE7CsSnoG0aaMbNoRJRXO4sn73R+ZqAs= -cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= -cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= -cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= -cloud.google.com/go/phishingprotection v0.8.1/go.mod h1:AxonW7GovcA8qdEk13NfHq9hNx5KPtfxXNeUxTDxB6I= -cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= -cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= -cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= -cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= -cloud.google.com/go/policytroubleshooter v1.7.1/go.mod h1:0NaT5v3Ag1M7U5r0GfDCpUFkWd9YqpubBWsQlhanRv0= -cloud.google.com/go/policytroubleshooter v1.8.0/go.mod h1:tmn5Ir5EToWe384EuboTcVQT7nTag2+DuH3uHmKd1HU= -cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= -cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= -cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= -cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= -cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= -cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= -cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= -cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= -cloud.google.com/go/pubsub v1.32.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= -cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= -cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= -cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= -cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= -cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0= -cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= -cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= -cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= -cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= -cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= -cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= -cloud.google.com/go/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= -cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= -cloud.google.com/go/recaptchaenterprise/v2 v2.7.2/go.mod h1:kR0KjsJS7Jt1YSyWFkseQ756D45kaYNTlDPPaRAvDBU= -cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= -cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= -cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= -cloud.google.com/go/recommendationengine v0.8.1/go.mod h1:MrZihWwtFYWDzE6Hz5nKcNz3gLizXVIDI/o3G1DLcrE= -cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= -cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= -cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= -cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= -cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= -cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA8XxP5sb7Q7gpA= -cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= -cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= -cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= -cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= -cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= -cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090Mfd1tcg= -cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= -cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= -cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= -cloud.google.com/go/resourcemanager v1.6.0/go.mod h1:YcpXGRs8fDzcUl1Xw8uOVmI8JEadvhRIkoXXUNVYcVo= -cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= -cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8= -cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= -cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= -cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= -cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw= -cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= -cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= -cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= -cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= -cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= -cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE= -cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= -cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= -cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= -cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= -cloud.google.com/go/run v1.2.0/go.mod h1:36V1IlDzQ0XxbQjUx6IYbw8H3TJnWvhii963WW3B/bo= -cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= -cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= -cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= -cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= -cloud.google.com/go/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= -cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= -cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo= -cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= -cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= -cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= -cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= -cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw= -cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= -cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= -cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= -cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= -cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= -cloud.google.com/go/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= -cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= -cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA= -cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= -cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= -cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= -cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= -cloud.google.com/go/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= -cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= -cloud.google.com/go/securitycenter v1.23.0/go.mod h1:8pwQ4n+Y9WCWM278R8W3nF65QtY172h4S8aXyI9/hsQ= -cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= -cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= -cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= -cloud.google.com/go/servicecontrol v1.11.0/go.mod h1:kFmTzYzTUIuZs0ycVqRHNaNhgR+UMUpw9n02l/pY+mc= -cloud.google.com/go/servicecontrol v1.11.1/go.mod h1:aSnNNlwEFBY+PWGQ2DoM0JJ/QUXqV5/ZD9DOLB7SnUk= -cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= -cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= -cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= -cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= -cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= -cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= -cloud.google.com/go/servicedirectory v1.10.1/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= -cloud.google.com/go/servicedirectory v1.11.0/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= -cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= -cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= -cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= -cloud.google.com/go/servicemanagement v1.8.0/go.mod h1:MSS2TDlIEQD/fzsSGfCdJItQveu9NXnUniTrq/L8LK4= -cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= -cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= -cloud.google.com/go/serviceusage v1.5.0/go.mod h1:w8U1JvqUqwJNPEOTQjrMHkw3IaIFLoLsPLvsE3xueec= -cloud.google.com/go/serviceusage v1.6.0/go.mod h1:R5wwQcbOWsyuOfbP9tGdAnCAc6B9DRwPG1xtWMDeuPA= -cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= -cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= -cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= -cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g= -cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= -cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= -cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= -cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSqW4uH9lfUI= -cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= -cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= -cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= -cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= -cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= -cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= -cloud.google.com/go/speech v1.17.1/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= -cloud.google.com/go/speech v1.19.0/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= -cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= -cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= -cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= -cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= -cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= -cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= -cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= -cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA= -cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= -cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= -cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= -cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= -cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= -cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24= -cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= -cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= -cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= -cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk= -cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= -cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= -cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= -cloud.google.com/go/tpu v1.6.1/go.mod h1:sOdcHVIgDEEOKuqUoi6Fq53MKHJAtOwtz0GuKsWSH3E= -cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= -cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= -cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= -cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= -cloud.google.com/go/trace v1.10.1/go.mod h1:gbtL94KE5AJLH3y+WVpfWILmqgc6dXcqgNXdOPAQTYk= -cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= -cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= -cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= -cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= -cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= -cloud.google.com/go/translate v1.8.1/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= -cloud.google.com/go/translate v1.8.2/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= -cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= -cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= -cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= -cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1tR5lGthk= -cloud.google.com/go/video v1.14.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= -cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= -cloud.google.com/go/video v1.17.1/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= -cloud.google.com/go/video v1.19.0/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= -cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= -cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= -cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= -cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= -cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= -cloud.google.com/go/videointelligence v1.11.1/go.mod h1:76xn/8InyQHarjTWsBR058SmlPCwQjgcvoW0aZykOvo= -cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= -cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= -cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= -cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= -cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= -cloud.google.com/go/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= -cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= -cloud.google.com/go/vision/v2 v2.7.2/go.mod h1:jKa8oSYBWhYiXarHPvP4USxYANYUEdEsQrloLjrSwJU= -cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= -cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= -cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= -cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= -cloud.google.com/go/vmmigration v1.7.1/go.mod h1:WD+5z7a/IpZ5bKK//YmT9E047AD+rjycCAvyMxGJbro= -cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= -cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= -cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= -cloud.google.com/go/vmwareengine v0.4.1/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= -cloud.google.com/go/vmwareengine v1.0.0/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= -cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= -cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= -cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= -cloud.google.com/go/vpcaccess v1.7.1/go.mod h1:FogoD46/ZU+JUBX9D606X21EnxiszYi2tArQwLY4SXs= -cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= -cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= -cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= -cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= -cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= -cloud.google.com/go/webrisk v1.9.1/go.mod h1:4GCmXKcOa2BZcZPn6DCEvE7HypmEJcJkr4mtM+sqYPc= -cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= -cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= -cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= -cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv5/rGpFCsBOvPbYgszpg= -cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= -cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= -cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= -cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= -cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= -git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= -github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= -github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= -github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg= -github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA= +github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/aws/aws-sdk-go-v2/config v1.27.11 h1:f47rANd2LQEYHda2ddSCKYId18/8BhSRM4BULGmfgNA= +github.com/aws/aws-sdk-go-v2/config v1.27.11/go.mod h1:SMsV78RIOYdve1vf36z8LmnszlRWkwMQtomCAI0/mIE= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11 h1:YuIB1dJNf1Re822rriUOTxopaHHvIq0l/pX3fwO+Tzs= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6EKL+NcD7LG3dpKGMV4SShgo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.29.5 h1:a3nFS1TFNTH9TVizItnHz3BgPCk5/7ygrZQZAoUV3GA= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.29.5/go.mod h1:3pzLFJnbjkymz6RdZ963DuvMR9rzrKMXrlbteSk4Sxc= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= +github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= +github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= 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/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= -github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= -github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= -github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= -github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= +github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= 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/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= -github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= -github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= -github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= @@ -892,1135 +70,362 @@ github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2Kv github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= -github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= -github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2ev3xfyagutxiPw= -github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= -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/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= 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/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= 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/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= -github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +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/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= -github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= -github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= -github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= -github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY= +github.com/onsi/ginkgo/v2 v2.14.0/go.mod h1:JkUdW7JkN0V6rFvsHcJ478egV3XH9NxpD27Hal/PhZw= +github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= +github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= 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 v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -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.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= -github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= 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.1.1/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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.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.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -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/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= -github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/configgrpc v0.89.0/go.mod h1:2GuAxpU34a1X19kCZ8Kw3FUsxOIiFcWHiYorRCyhnCc= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0 h1:0oYIeiRTURjIIYXs1OsaMAyNgg6Vc/CNa882YCYS/04= -go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0/go.mod h1:kA+ycED/f5rUj2030XE45q0aXUe5haZhW62zdPgice0= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 h1:opvHcGANx+dS4HJwGTPtRMd6dZdOmmGn6c3PfW/bihQ= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/otelcol v0.89.0 h1:b3kC0zM9T6GxjhTcNEHIzXDd4zTIc7cBpexCPZ9nPzg= -go.opentelemetry.io/collector/otelcol v0.89.0/go.mod h1:BILxDcJe32wK+paX7ssnt4jyjOmTkIHvXe9JNjlHUk8= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 h1:ayqzWyj56xyc0tcBpaYjWtxvj5pfZNhYC8LrwvlLAeE= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/collector/service v0.89.0/go.mod h1:6IAr9Asn6t6YxSw6Qv5LwA+ilVUtP0nQsu1xzc9+mZA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0 h1:Yty9Vs4F3D6/liF1o6FNt0PvN85h/BJJ6DQKJ3nrcM0= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0/go.mod h1:On4VgbkqYL18kbJlWsa18+cMNe6rYpBnPi1ARI/BrsU= -go.opentelemetry.io/contrib/zpages v0.45.0 h1:jIwHHGoWzJoZdbIUtWdErjL85Gni6BignnAFqDtMRL4= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0 h1:E/sf+2slCUb7wqh5FHwhdwKWTA+VXyMMAcFNlKVf4yw= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0/go.mod h1:2xuXI78Xp9cttLsJMF/Y08cJUqckLt0kLasn+vcHR5w= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0/go.mod h1:hbzqqcIxyywu6UQ5J1wb4ntla8nCwCfNBZnMo2Dgh48= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0/go.mod h1:qmFtGlXhoa9qPt5RrZgMp4f5RfRagucrdriI+hb3yWQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0/go.mod h1:CMJYNAfooOwSZSAmAeMUV1M+TXld3BiK++z9fqIm2xk= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0/go.mod h1:nZStMoc1H/YJpRjSx9IEX4abBMekORTLQcTUT1CgLkg= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 h1:vcSjcjn/BTeM6abI5CDymZdtd1m24quD1Mx4VE3N3fM= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0/go.mod h1:HblEnlZQNsVuuDpszdKTWcrHBI09OjBn2pWSzBx1goM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 h1:4s9HxB4azeeQkhY0GE5wZlMj4/pz8tE5gx2OQpGUw58= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0/go.mod h1:djVA3TUJ2fSdMX0JE5XxFBOaZzprElJoP7fD4vnV2SU= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -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.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 h1:lRhfcLr3gK5S/zn92h3clyOPnCvvNKs1WTMbtH4UvO0= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0/go.mod h1:vNMFTWe4dF05LsodUOc84OfxdlYVp1kCMuZzb41WfAk= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 h1:x/VsGlBj+DtJCXIucwzwcxiwnwAU8a6ALK6UN8fPdKQ= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0/go.mod h1:BapTGXu7CYrQGNohbapPwTSt2Ty/k/c6Oemx9mSSiK4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 h1:SxDS+Yr8qE+ID58ELR5n0D+SUlqHKOZ72pK3YPFAelA= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0/go.mod h1:DEoB0d0k1iGt4KEABntL8AW9xYQ6E7fmgkM2/s8aXvM= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 h1:C02SPbRPvrtmZ9TvsHWpz2TvHzqY5mNyEAlDdhax/a4= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0/go.mod h1:dzZKtykJio3Rm+G+Cmr15VV3xKp0PmFuh9Q9b3c1K7A= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 h1:04zGXVQZ8D6nvoPX8AaqxWxGHNNVsGR78E+tY+2VQr8= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0/go.mod h1:+UrRiugWaQPssz4mgEgQQo640f2bDUCFlo2Xr0/5ulc= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 h1:JYpDN0OnMsu0awk0rjaYEIko9hFzzBJ6+2U5W2iVvUE= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0/go.mod h1:xrXL804nBum1PgbvmJQ4I+hyW+DU4xBGO3MKMiYFX6E= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0 h1:uhiR/luaJCwMnvvkIS/gIxBbSAp+/vbqeC3AXmuc/kg= +go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0/go.mod h1:1ySnK/6Cl+67FTP6ty04PX9nrXPYFPuBqZ+Xn9Jzz6Y= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 h1:JfvsDpTwAhA9au8/4vmONRh0OBVU6n36seb41JD/mTQ= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0/go.mod h1:t1zDwy6kYp4w1JgcGHMvdGbKYHqWpK00bB1AEQ0Oqlc= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/otelcol v0.98.0 h1:sUk49Wqw+VBYeDynEA+GSeVEusFvzFW3KuF2vfDbyo0= +go.opentelemetry.io/collector/otelcol v0.98.0/go.mod h1:dW3UzuaiaNTddjKajk3Tp2Y7muDvYJdQz2yGUOE53gs= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/collector/service v0.98.0 h1:lLJ7VXPXcV62fSISh4GuNd5ti6WvKje76NSgezc3ydo= +go.opentelemetry.io/collector/service v0.98.0/go.mod h1:wB7ozvZTHtMefb5KTYy5nyrVYWpGk8teq8jWFs4blIU= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0 h1:QU8UEKyPqgr/8vCC9LlDmkPnfFmiWAUF9GtJdcLz+BU= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0/go.mod h1:qonC7wyvtX1E6cEpAR+bJmhcGr6IVRGc/f6ZTpvi7jA= +go.opentelemetry.io/contrib/zpages v0.50.0 h1:hKC5asr83xDN4ErwSHVdk3gv053pZiF8SZKmS86IPEw= +go.opentelemetry.io/contrib/zpages v0.50.0/go.mod h1:8WovRn95fZdaX/dr3e4h7D8IqiVsnZ+WxY0Yn4LyU3k= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0 h1:0o/9KwAgxjK+3pMV0pwIF5toYHqDsPmQhfrBvKaG6mU= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0/go.mod h1:rZyTdpmRqoV+PpUn6QlruxJp/kE4765rPy0pP6mRDk8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 h1:hDKnobznDpcdTlNzO0S/owRB8tyVr1OoeZZhDoqY+Cs= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0/go.mod h1:kUDQaUs1h8iTIHbQTk+iJRiUvSfJYMMKTtMCaiVu7B0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 h1:Wc4hZuYXhVqq+TfRXLXlmNIL/awOanGx8ssq3ciDQxc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0/go.mod h1:BydOvapRqVEc0DVz27qWBX2jq45Ca5TI9mhZBDIdweY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 h1:vOL89uRfOCCNIjkisd0r7SEdJF3ZJFyCNY34fdZs8eU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0/go.mod h1:8GlBGcDk8KKi7n+2S4BT/CPZQYH3erLu0/k64r1MYgo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 h1:d7nHbdzU84STOiszaOxQ3kw5IwkSmHsU5Muol5/vL4I= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0/go.mod h1:yiPA1iZbb/EHYnODXOxvtKuB0I2hV8ehfLTEWpl7BJU= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 h1:0vZZdECYzhTt9MKQZ5qQ0V+J3MFu4MQaQ3COfugF+FQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0/go.mod h1:e7iXx3HjaSSBXfy9ykVUlupS2Vp7LBIBuT21ousM2Hk= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= 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-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -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.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= -golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= -golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/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.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/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-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= -golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= -golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= -golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= -golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg= -golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= -gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= -gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= -gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= -gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= -google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= -google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= -google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= -google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.107.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= -google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= -google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= -google.golang.org/api v0.118.0/go.mod h1:76TtD3vkgmZ66zZzp72bUUklpmQmKlhh6sYtIjYK+5E= -google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= -google.golang.org/api v0.124.0/go.mod h1:xu2HQurE5gi/3t1aFCvhPD781p0a3p11sdunTJ2BlP4= -google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= -google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= -google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= -google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= -google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= -google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= -google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201204527-e3fa12d562f3/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230112194545-e10362b5ecf9/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230113154510-dbe35b8444a5/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= -google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/genproto v0.0.0-20230303212802-e74f57abe488/go.mod h1:TvhZT5f700eVlTNwND1xoEZQeWTB2RY/65kplwl/bFA= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= -google.golang.org/genproto v0.0.0-20230629202037-9506855d4529/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= -google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108= -google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= -google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:mPBs5jNgx2GuQGvFwUvVKqtn6HsUw9nP64BedgvqEsQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= -google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= -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/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:8mL13HKkDa+IuJ8yruA3ci0q+0vsUz4m//+ottjwS5o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= -google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= -google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= +google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -2029,119 +434,43 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= -k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.37.0/go.mod h1:vtL+3mdHx/wcj3iEGz84rQa8vEqR6XM84v5Lcvfph20= -modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= -modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= -modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= -modernc.org/ccgo/v3 v3.0.0-20220904174949-82d86e1b6d56/go.mod h1:YSXjPL62P2AMSxBphRHPn7IkzhVHqkvOnRKAKh+W6ZI= -modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= -modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= -modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws= -modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= -modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8/go.mod h1:fUB3Vn0nVPReA+7IG7yZDfjv1TMWjhQP8gCxrFAtL5g= -modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= -modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= -modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= -modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= -modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= -modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= -modernc.org/libc v1.16.17/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU= -modernc.org/libc v1.16.19/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= -modernc.org/libc v1.17.0/go.mod h1:XsgLldpP4aWlPlsjqKRdHPqCxCjISdHfM/yeWC5GyW0= -modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= -modernc.org/libc v1.17.4/go.mod h1:WNg2ZH56rDEwdropAJeZPQkXmDwh+JCA1s/htl6r2fA= -modernc.org/libc v1.18.0/go.mod h1:vj6zehR5bfc98ipowQOM2nIDUZnVew/wNC/2tOGS+q0= -modernc.org/libc v1.20.3/go.mod h1:ZRfIaEkgrYgZDl6pa4W39HgN5G/yDW+NRmNKZBDFrk0= -modernc.org/libc v1.21.4/go.mod h1:przBsL5RDOZajTVslkugzLBj1evTue36jEomFQOoYuI= -modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug= -modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.2.0/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/memory v1.3.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/memory v1.4.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= -modernc.org/sqlite v1.18.2/go.mod h1:kvrTLEWgxUcHa2GfHBQtanR1H9ht3hTJNtKpzH9k1u0= -modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= -modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= -modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= -modernc.org/tcl v1.13.2/go.mod h1:7CLiGIPo1M8Rv1Mitpv5akc2+8fxUd2y2UzC/MfMzy0= -modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= -sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= +k8s.io/apiextensions-apiserver v0.29.2 h1:UK3xB5lOWSnhaCk0RFZ0LUacPZz9RY4wi/yt2Iu+btg= +k8s.io/apiextensions-apiserver v0.29.2/go.mod h1:aLfYjpA5p3OwtqNXQFkhJ56TB+spV8Gc4wfMhUA3/b8= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk= +sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/exporter/loadbalancingexporter/helpers.go b/exporter/loadbalancingexporter/helpers.go new file mode 100644 index 000000000000..b275ebd52fbc --- /dev/null +++ b/exporter/loadbalancingexporter/helpers.go @@ -0,0 +1,123 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package loadbalancingexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter" + +import ( + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +// mergeTraces concatenates two ptrace.Traces into a single ptrace.Traces. +func mergeTraces(t1 ptrace.Traces, t2 ptrace.Traces) ptrace.Traces { + mergedTraces := ptrace.NewTraces() + + if t1.SpanCount() == 0 && t2.SpanCount() == 0 { + return mergedTraces + } + + // Iterate over the first trace and append spans to the merged traces + for i := 0; i < t1.ResourceSpans().Len(); i++ { + rs := t1.ResourceSpans().At(i) + newRS := mergedTraces.ResourceSpans().AppendEmpty() + + rs.Resource().MoveTo(newRS.Resource()) + newRS.SetSchemaUrl(rs.SchemaUrl()) + + for j := 0; j < rs.ScopeSpans().Len(); j++ { + ils := rs.ScopeSpans().At(j) + + newILS := newRS.ScopeSpans().AppendEmpty() + ils.Scope().MoveTo(newILS.Scope()) + newILS.SetSchemaUrl(ils.SchemaUrl()) + + for k := 0; k < ils.Spans().Len(); k++ { + span := ils.Spans().At(k) + newSpan := newILS.Spans().AppendEmpty() + span.MoveTo(newSpan) + } + } + } + + // Iterate over the second trace and append spans to the merged traces + for i := 0; i < t2.ResourceSpans().Len(); i++ { + rs := t2.ResourceSpans().At(i) + newRS := mergedTraces.ResourceSpans().AppendEmpty() + + rs.Resource().MoveTo(newRS.Resource()) + newRS.SetSchemaUrl(rs.SchemaUrl()) + + for j := 0; j < rs.ScopeSpans().Len(); j++ { + ils := rs.ScopeSpans().At(j) + + newILS := newRS.ScopeSpans().AppendEmpty() + ils.Scope().MoveTo(newILS.Scope()) + newILS.SetSchemaUrl(ils.SchemaUrl()) + + for k := 0; k < ils.Spans().Len(); k++ { + span := ils.Spans().At(k) + newSpan := newILS.Spans().AppendEmpty() + span.MoveTo(newSpan) + } + } + } + + return mergedTraces +} + +// mergeMetrics concatenates two pmetric.Metrics into a single pmetric.Metrics. +func mergeMetrics(m1 pmetric.Metrics, m2 pmetric.Metrics) pmetric.Metrics { + mergedMetrics := pmetric.NewMetrics() + + if m1.MetricCount() == 0 && m2.MetricCount() == 0 { + return mergedMetrics + } + + // Iterate over the first metric and append metrics to the merged metrics + for i := 0; i < m1.ResourceMetrics().Len(); i++ { + rs := m1.ResourceMetrics().At(i) + newRS := mergedMetrics.ResourceMetrics().AppendEmpty() + + rs.Resource().MoveTo(newRS.Resource()) + newRS.SetSchemaUrl(rs.SchemaUrl()) + + for j := 0; j < rs.ScopeMetrics().Len(); j++ { + ils := rs.ScopeMetrics().At(j) + + newILS := newRS.ScopeMetrics().AppendEmpty() + ils.Scope().MoveTo(newILS.Scope()) + newILS.SetSchemaUrl(ils.SchemaUrl()) + + for k := 0; k < ils.Metrics().Len(); k++ { + metric := ils.Metrics().At(k) + newMetric := newILS.Metrics().AppendEmpty() + metric.MoveTo(newMetric) + } + } + } + + // Iterate over the second metric and append metrics to the merged metrics + for i := 0; i < m2.ResourceMetrics().Len(); i++ { + rs := m2.ResourceMetrics().At(i) + newRS := mergedMetrics.ResourceMetrics().AppendEmpty() + + rs.Resource().MoveTo(newRS.Resource()) + newRS.SetSchemaUrl(rs.SchemaUrl()) + + for j := 0; j < rs.ScopeMetrics().Len(); j++ { + ils := rs.ScopeMetrics().At(j) + + newILS := newRS.ScopeMetrics().AppendEmpty() + ils.Scope().MoveTo(newILS.Scope()) + newILS.SetSchemaUrl(ils.SchemaUrl()) + + for k := 0; k < ils.Metrics().Len(); k++ { + metric := ils.Metrics().At(k) + newMetric := newILS.Metrics().AppendEmpty() + metric.MoveTo(newMetric) + } + } + } + + return mergedMetrics +} diff --git a/exporter/loadbalancingexporter/helpers_test.go b/exporter/loadbalancingexporter/helpers_test.go new file mode 100644 index 000000000000..e8bda317d54b --- /dev/null +++ b/exporter/loadbalancingexporter/helpers_test.go @@ -0,0 +1,175 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package loadbalancingexporter + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + conventions "go.opentelemetry.io/collector/semconv/v1.6.1" +) + +func TestMergeTracesTwoEmpty(t *testing.T) { + expectedEmpty := ptrace.NewTraces() + trace1 := ptrace.NewTraces() + trace2 := ptrace.NewTraces() + + mergedTraces := mergeTraces(trace1, trace2) + + require.Equal(t, expectedEmpty, mergedTraces) +} + +func TestMergeTracesSingleEmpty(t *testing.T) { + expectedTraces := simpleTraces() + + trace1 := ptrace.NewTraces() + trace2 := simpleTraces() + + mergedTraces := mergeTraces(trace1, trace2) + + require.Equal(t, expectedTraces, mergedTraces) +} + +func TestMergeTraces(t *testing.T) { + expectedTraces := ptrace.NewTraces() + expectedTraces.ResourceSpans().EnsureCapacity(3) + aspans := expectedTraces.ResourceSpans().AppendEmpty() + aspans.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-1") + aspans.ScopeSpans().AppendEmpty().Spans().AppendEmpty().SetTraceID([16]byte{1, 2, 3, 4}) + bspans := expectedTraces.ResourceSpans().AppendEmpty() + bspans.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-2") + bspans.ScopeSpans().AppendEmpty().Spans().AppendEmpty().SetTraceID([16]byte{1, 2, 3, 2}) + cspans := expectedTraces.ResourceSpans().AppendEmpty() + cspans.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-3") + cspans.ScopeSpans().AppendEmpty().Spans().AppendEmpty().SetTraceID([16]byte{1, 2, 3, 3}) + + trace1 := ptrace.NewTraces() + trace1.ResourceSpans().EnsureCapacity(2) + t1aspans := trace1.ResourceSpans().AppendEmpty() + t1aspans.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-1") + t1aspans.ScopeSpans().AppendEmpty().Spans().AppendEmpty().SetTraceID([16]byte{1, 2, 3, 4}) + t1bspans := trace1.ResourceSpans().AppendEmpty() + t1bspans.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-2") + t1bspans.ScopeSpans().AppendEmpty().Spans().AppendEmpty().SetTraceID([16]byte{1, 2, 3, 2}) + + trace2 := ptrace.NewTraces() + trace2.ResourceSpans().EnsureCapacity(1) + t2cspans := trace2.ResourceSpans().AppendEmpty() + t2cspans.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-3") + t2cspans.ScopeSpans().AppendEmpty().Spans().AppendEmpty().SetTraceID([16]byte{1, 2, 3, 3}) + + mergedTraces := mergeTraces(trace1, trace2) + + require.Equal(t, expectedTraces, mergedTraces) +} + +func TestMergeMetricsTwoEmpty(t *testing.T) { + expectedEmpty := pmetric.NewMetrics() + metric1 := pmetric.NewMetrics() + metric2 := pmetric.NewMetrics() + + mergedMetrics := mergeMetrics(metric1, metric2) + + require.Equal(t, expectedEmpty, mergedMetrics) +} + +func TestMergeMetricsSingleEmpty(t *testing.T) { + expectedMetrics := simpleMetricsWithResource() + + metric1 := pmetric.NewMetrics() + metric2 := simpleMetricsWithResource() + + mergedMetrics := mergeMetrics(metric1, metric2) + + require.Equal(t, expectedMetrics, mergedMetrics) +} + +func TestMergeMetrics(t *testing.T) { + expectedMetrics := pmetric.NewMetrics() + expectedMetrics.ResourceMetrics().EnsureCapacity(3) + ametrics := expectedMetrics.ResourceMetrics().AppendEmpty() + ametrics.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-1") + ametrics.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetName("m1") + bmetrics := expectedMetrics.ResourceMetrics().AppendEmpty() + bmetrics.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-2") + bmetrics.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetName("m1") + cmetrics := expectedMetrics.ResourceMetrics().AppendEmpty() + cmetrics.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-3") + cmetrics.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetName("m2") + + metric1 := pmetric.NewMetrics() + metric1.ResourceMetrics().EnsureCapacity(2) + m1ametrics := metric1.ResourceMetrics().AppendEmpty() + m1ametrics.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-1") + m1ametrics.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetName("m1") + m1bmetrics := metric1.ResourceMetrics().AppendEmpty() + m1bmetrics.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-2") + m1bmetrics.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetName("m1") + + metric2 := pmetric.NewMetrics() + metric2.ResourceMetrics().EnsureCapacity(1) + m2cmetrics := metric2.ResourceMetrics().AppendEmpty() + m2cmetrics.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-3") + m2cmetrics.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetName("m2") + + mergedMetrics := mergeMetrics(metric1, metric2) + + require.Equal(t, expectedMetrics, mergedMetrics) +} + +func benchMergeTraces(b *testing.B, tracesCount int) { + traces1 := ptrace.NewTraces() + traces2 := ptrace.NewTraces() + + for i := 0; i < tracesCount; i++ { + appendSimpleTraceWithID(traces2.ResourceSpans().AppendEmpty(), [16]byte{1, 2, 3, 4}) + } + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + mergeTraces(traces1, traces2) + } +} + +func BenchmarkMergeTraces_X100(b *testing.B) { + benchMergeTraces(b, 100) +} + +func BenchmarkMergeTraces_X500(b *testing.B) { + benchMergeTraces(b, 500) +} + +func BenchmarkMergeTraces_X1000(b *testing.B) { + benchMergeTraces(b, 1000) +} + +func benchMergeMetrics(b *testing.B, metricsCount int) { + metrics1 := pmetric.NewMetrics() + metrics2 := pmetric.NewMetrics() + + for i := 0; i < metricsCount; i++ { + appendSimpleMetricWithID(metrics2.ResourceMetrics().AppendEmpty(), "metrics-2") + } + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + mergeMetrics(metrics1, metrics2) + } +} + +func BenchmarkMergeMetrics_X100(b *testing.B) { + benchMergeMetrics(b, 100) +} + +func BenchmarkMergeMetrics_X500(b *testing.B) { + benchMergeMetrics(b, 500) +} + +func BenchmarkMergeMetrics_X1000(b *testing.B) { + benchMergeMetrics(b, 1000) +} diff --git a/exporter/loadbalancingexporter/internal/metadata/generated_status.go b/exporter/loadbalancingexporter/internal/metadata/generated_status.go index 411eca7c5497..111de6b0d320 100644 --- a/exporter/loadbalancingexporter/internal/metadata/generated_status.go +++ b/exporter/loadbalancingexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("loadbalancing") ) const ( - Type = "loadbalancing" + MetricsStability = component.StabilityLevelDevelopment TracesStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta - MetricsStability = component.StabilityLevelDevelopment ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/loadbalancing") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/loadbalancing") +} diff --git a/exporter/loadbalancingexporter/loadbalancer.go b/exporter/loadbalancingexporter/loadbalancer.go index 862111d06c76..2f826ad9bc32 100644 --- a/exporter/loadbalancingexporter/loadbalancer.go +++ b/exporter/loadbalancingexporter/loadbalancer.go @@ -24,17 +24,9 @@ var ( errMultipleResolversProvided = errors.New("only one resolver should be specified") ) -var _ loadBalancer = (*loadBalancerImp)(nil) - type componentFactory func(ctx context.Context, endpoint string) (component.Component, error) -type loadBalancer interface { - component.Component - Endpoint(identifier []byte) string - Exporter(endpoint string) (component.Component, error) -} - -type loadBalancerImp struct { +type loadBalancer struct { logger *zap.Logger host component.Host @@ -42,17 +34,30 @@ type loadBalancerImp struct { ring *hashRing componentFactory componentFactory - exporters map[string]component.Component + exporters map[string]*wrappedExporter stopped bool updateLock sync.RWMutex } // Create new load balancer -func newLoadBalancer(params exporter.CreateSettings, cfg component.Config, factory componentFactory) (*loadBalancerImp, error) { +func newLoadBalancer(params exporter.CreateSettings, cfg component.Config, factory componentFactory) (*loadBalancer, error) { oCfg := cfg.(*Config) - if oCfg.Resolver.DNS != nil && oCfg.Resolver.Static != nil { + var count = 0 + if oCfg.Resolver.DNS != nil { + count++ + } + if oCfg.Resolver.Static != nil { + count++ + } + if oCfg.Resolver.AWSCloudMap != nil { + count++ + } + if oCfg.Resolver.K8sSvc != nil { + count++ + } + if count > 1 { return nil, errMultipleResolversProvided } @@ -80,7 +85,16 @@ func newLoadBalancer(params exporter.CreateSettings, cfg component.Config, facto if err != nil { return nil, err } - res, err = newK8sResolver(clt, k8sLogger, oCfg.Resolver.K8sSvc.Service, oCfg.Resolver.K8sSvc.Ports) + res, err = newK8sResolver(clt, k8sLogger, oCfg.Resolver.K8sSvc.Service, oCfg.Resolver.K8sSvc.Ports, oCfg.Resolver.K8sSvc.Timeout) + if err != nil { + return nil, err + } + } + + if oCfg.Resolver.AWSCloudMap != nil { + awsCloudMapLogger := params.Logger.With(zap.String("resolver", "awsCloudMap")) + var err error + res, err = newCloudMapResolver(awsCloudMapLogger, &oCfg.Resolver.AWSCloudMap.NamespaceName, &oCfg.Resolver.AWSCloudMap.ServiceName, oCfg.Resolver.AWSCloudMap.Port, &oCfg.Resolver.AWSCloudMap.HealthStatus, oCfg.Resolver.AWSCloudMap.Interval, oCfg.Resolver.AWSCloudMap.Timeout) if err != nil { return nil, err } @@ -90,21 +104,21 @@ func newLoadBalancer(params exporter.CreateSettings, cfg component.Config, facto return nil, errNoResolver } - return &loadBalancerImp{ + return &loadBalancer{ logger: params.Logger, res: res, componentFactory: factory, - exporters: map[string]component.Component{}, + exporters: map[string]*wrappedExporter{}, }, nil } -func (lb *loadBalancerImp) Start(ctx context.Context, host component.Host) error { +func (lb *loadBalancer) Start(ctx context.Context, host component.Host) error { lb.res.onChange(lb.onBackendChanges) lb.host = host return lb.res.start(ctx) } -func (lb *loadBalancerImp) onBackendChanges(resolved []string) { +func (lb *loadBalancer) onBackendChanges(resolved []string) { newRing := newHashRing(resolved) if !newRing.equal(lb.ring) { @@ -122,7 +136,7 @@ func (lb *loadBalancerImp) onBackendChanges(resolved []string) { } } -func (lb *loadBalancerImp) addMissingExporters(ctx context.Context, endpoints []string) { +func (lb *loadBalancer) addMissingExporters(ctx context.Context, endpoints []string) { for _, endpoint := range endpoints { endpoint = endpointWithPort(endpoint) @@ -132,12 +146,12 @@ func (lb *loadBalancerImp) addMissingExporters(ctx context.Context, endpoints [] lb.logger.Error("failed to create new exporter for endpoint", zap.String("endpoint", endpoint), zap.Error(err)) continue } - - if err = exp.Start(ctx, lb.host); err != nil { + we := newWrappedExporter(exp) + if err = we.Start(ctx, lb.host); err != nil { lb.logger.Error("failed to start new exporter for endpoint", zap.String("endpoint", endpoint), zap.Error(err)) continue } - lb.exporters[endpoint] = exp + lb.exporters[endpoint] = we } } } @@ -149,14 +163,18 @@ func endpointWithPort(endpoint string) string { return endpoint } -func (lb *loadBalancerImp) removeExtraExporters(ctx context.Context, endpoints []string) { +func (lb *loadBalancer) removeExtraExporters(ctx context.Context, endpoints []string) { endpointsWithPort := make([]string, len(endpoints)) for i, e := range endpoints { endpointsWithPort[i] = endpointWithPort(e) } for existing := range lb.exporters { if !endpointFound(existing, endpointsWithPort) { - _ = lb.exporters[existing].Shutdown(ctx) + exp := lb.exporters[existing] + // Shutdown the exporter asynchronously to avoid blocking the resolver + go func() { + _ = exp.Shutdown(ctx) + }() delete(lb.exporters, existing) } } @@ -172,29 +190,25 @@ func endpointFound(endpoint string, endpoints []string) bool { return false } -func (lb *loadBalancerImp) Shutdown(context.Context) error { +func (lb *loadBalancer) Shutdown(ctx context.Context) error { + err := lb.res.shutdown(ctx) lb.stopped = true - return nil + return err } -func (lb *loadBalancerImp) Endpoint(identifier []byte) string { - lb.updateLock.RLock() - defer lb.updateLock.RUnlock() - - return lb.ring.endpointFor(identifier) -} - -func (lb *loadBalancerImp) Exporter(endpoint string) (component.Component, error) { +// exporterAndEndpoint returns the exporter and the endpoint for the given identifier. +func (lb *loadBalancer) exporterAndEndpoint(identifier []byte) (*wrappedExporter, string, error) { // NOTE: make rolling updates of next tier of collectors work. currently, this may cause // data loss because the latest batches sent to outdated backend will never find their way out. // for details: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/1690 lb.updateLock.RLock() + defer lb.updateLock.RUnlock() + endpoint := lb.ring.endpointFor(identifier) exp, found := lb.exporters[endpointWithPort(endpoint)] - lb.updateLock.RUnlock() if !found { // something is really wrong... how come we couldn't find the exporter?? - return nil, fmt.Errorf("couldn't find the exporter for the endpoint %q", endpoint) + return nil, "", fmt.Errorf("couldn't find the exporter for the endpoint %q", endpoint) } - return exp, nil + return exp, endpoint, nil } diff --git a/exporter/loadbalancingexporter/loadbalancer_test.go b/exporter/loadbalancingexporter/loadbalancer_test.go index fbc884ff1863..47816dc482d8 100644 --- a/exporter/loadbalancingexporter/loadbalancer_test.go +++ b/exporter/loadbalancingexporter/loadbalancer_test.go @@ -134,9 +134,10 @@ func TestWithDNSResolverNoEndpoints(t *testing.T) { err = p.Start(context.Background(), componenttest.NewNopHost()) require.NoError(t, err) + defer func() { assert.NoError(t, p.Shutdown(context.Background())) }() // test - e := p.Endpoint([]byte{128, 128, 0, 0}) + _, e, _ := p.exporterAndEndpoint([]byte{128, 128, 0, 0}) // verify assert.Equal(t, "", e) @@ -200,7 +201,7 @@ func TestLoadBalancerShutdown(t *testing.T) { func TestOnBackendChanges(t *testing.T) { // prepare cfg := simpleConfig() - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockExporter(), nil } p, err := newLoadBalancer(exportertest.NewNopCreateSettings(), cfg, componentFactory) @@ -222,7 +223,7 @@ func TestOnBackendChanges(t *testing.T) { func TestRemoveExtraExporters(t *testing.T) { // prepare cfg := simpleConfig() - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockExporter(), nil } p, err := newLoadBalancer(exportertest.NewNopCreateSettings(), cfg, componentFactory) @@ -243,7 +244,7 @@ func TestRemoveExtraExporters(t *testing.T) { func TestAddMissingExporters(t *testing.T) { // prepare cfg := simpleConfig() - exporterFactory := exporter.NewFactory("otlp", func() component.Config { + exporterFactory := exporter.NewFactory(component.MustNewType("otlp"), func() component.Config { return &otlpexporter.Config{} }, exporter.WithTraces(func( _ context.Context, @@ -277,7 +278,7 @@ func TestFailedToAddMissingExporters(t *testing.T) { // prepare cfg := simpleConfig() expectedErr := errors.New("some expected error") - exporterFactory := exporter.NewFactory("otlp", func() component.Config { + exporterFactory := exporter.NewFactory(component.MustNewType("otlp"), func() component.Config { return &otlpexporter.Config{} }, exporter.WithTraces(func( _ context.Context, @@ -354,7 +355,7 @@ func TestFailedExporterInRing(t *testing.T) { Static: &StaticResolver{Hostnames: []string{"endpoint-1", "endpoint-2"}}, }, } - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockExporter(), nil } p, err := newLoadBalancer(exportertest.NewNopCreateSettings(), cfg, componentFactory) @@ -376,19 +377,56 @@ func TestFailedExporterInRing(t *testing.T) { // test // this trace ID will reach the endpoint-2 -- see the consistent hashing tests for more info - _, err = p.Exporter(p.Endpoint([]byte{128, 128, 0, 0})) + _, _, err = p.exporterAndEndpoint([]byte{128, 128, 0, 0}) // verify assert.Error(t, err) // test // this service name will reach the endpoint-2 -- see the consistent hashing tests for more info - _, err = p.Exporter(p.Endpoint([]byte("get-recommendations-1"))) + _, _, err = p.exporterAndEndpoint([]byte("get-recommendations-1")) // verify assert.Error(t, err) } -func newNopMockExporter() component.Component { - return mockComponent{} +func TestNewLoadBalancerInvalidNamespaceAwsResolver(t *testing.T) { + // prepare + cfg := &Config{ + Resolver: ResolverSettings{ + AWSCloudMap: &AWSCloudMapResolver{ + NamespaceName: "", + }, + }, + } + + // test + p, err := newLoadBalancer(exportertest.NewNopCreateSettings(), cfg, nil) + + // verify + assert.Nil(t, p) + assert.True(t, clientcmd.IsConfigurationInvalid(err) || errors.Is(err, errNoNamespace)) +} + +func TestNewLoadBalancerInvalidServiceAwsResolver(t *testing.T) { + // prepare + cfg := &Config{ + Resolver: ResolverSettings{ + AWSCloudMap: &AWSCloudMapResolver{ + NamespaceName: "cloudmap", + ServiceName: "", + }, + }, + } + + // test + p, err := newLoadBalancer(exportertest.NewNopCreateSettings(), cfg, nil) + + // verify + assert.Nil(t, p) + assert.True(t, clientcmd.IsConfigurationInvalid(err) || errors.Is(err, errNoServiceName)) +} + +func newNopMockExporter() *wrappedExporter { + return newWrappedExporter(mockComponent{}) } diff --git a/exporter/loadbalancingexporter/log_exporter.go b/exporter/loadbalancingexporter/log_exporter.go index 6cfe82edca65..9b79bdc439dc 100644 --- a/exporter/loadbalancingexporter/log_exporter.go +++ b/exporter/loadbalancingexporter/log_exporter.go @@ -5,7 +5,6 @@ package loadbalancingexporter // import "github.com/open-telemetry/opentelemetry import ( "context" - "fmt" "math/rand" "sync" "time" @@ -26,7 +25,7 @@ import ( var _ exporter.Logs = (*logExporterImp)(nil) type logExporterImp struct { - loadBalancer loadBalancer + loadBalancer *loadBalancer started bool shutdownWg sync.WaitGroup @@ -58,13 +57,14 @@ func (e *logExporterImp) Start(ctx context.Context, host component.Host) error { return e.loadBalancer.Start(ctx, host) } -func (e *logExporterImp) Shutdown(context.Context) error { +func (e *logExporterImp) Shutdown(ctx context.Context) error { if !e.started { return nil } + err := e.loadBalancer.Shutdown(ctx) e.started = false e.shutdownWg.Wait() - return nil + return err } func (e *logExporterImp) ConsumeLogs(ctx context.Context, ld plog.Logs) error { @@ -87,16 +87,13 @@ func (e *logExporterImp) consumeLog(ctx context.Context, ld plog.Logs) error { balancingKey = random() } - endpoint := e.loadBalancer.Endpoint(balancingKey[:]) - exp, err := e.loadBalancer.Exporter(endpoint) + le, endpoint, err := e.loadBalancer.exporterAndEndpoint(balancingKey[:]) if err != nil { return err } - le, ok := exp.(exporter.Logs) - if !ok { - return fmt.Errorf("unable to export logs, unexpected exporter type: expected exporter.Logs but got %T", exp) - } + le.consumeWG.Add(1) + defer le.consumeWG.Done() start := time.Now() err = le.ConsumeLogs(ctx, ld) diff --git a/exporter/loadbalancingexporter/log_exporter_test.go b/exporter/loadbalancingexporter/log_exporter_test.go index 30694a5a4235..82ee460f6427 100644 --- a/exporter/loadbalancingexporter/log_exporter_test.go +++ b/exporter/loadbalancingexporter/log_exporter_test.go @@ -114,7 +114,7 @@ func TestLogExporterShutdown(t *testing.T) { } func TestConsumeLogs(t *testing.T) { - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockLogsExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), simpleConfig(), componentFactory) @@ -129,7 +129,7 @@ func TestConsumeLogs(t *testing.T) { lb.addMissingExporters(context.Background(), []string{"endpoint-1"}) lb.res = &mockResolver{ triggerCallbacks: true, - onResolve: func(ctx context.Context) ([]string, error) { + onResolve: func(_ context.Context) ([]string, error) { return []string{"endpoint-1"}, nil }, } @@ -149,7 +149,7 @@ func TestConsumeLogs(t *testing.T) { } func TestConsumeLogsUnexpectedExporterType(t *testing.T) { - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), simpleConfig(), componentFactory) @@ -164,7 +164,7 @@ func TestConsumeLogsUnexpectedExporterType(t *testing.T) { lb.addMissingExporters(context.Background(), []string{"endpoint-1"}) lb.res = &mockResolver{ triggerCallbacks: true, - onResolve: func(ctx context.Context) ([]string, error) { + onResolve: func(_ context.Context) ([]string, error) { return []string{"endpoint-1"}, nil }, } @@ -186,7 +186,7 @@ func TestConsumeLogsUnexpectedExporterType(t *testing.T) { func TestLogBatchWithTwoTraces(t *testing.T) { sink := new(consumertest.LogsSink) - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newMockLogsExporter(sink.ConsumeLogs), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), simpleConfig(), componentFactory) @@ -258,7 +258,7 @@ func TestNoLogsInBatch(t *testing.T) { func TestLogsWithoutTraceID(t *testing.T) { sink := new(consumertest.LogsSink) - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newMockLogsExporter(sink.ConsumeLogs), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), simpleConfig(), componentFactory) @@ -287,6 +287,58 @@ func TestLogsWithoutTraceID(t *testing.T) { assert.Len(t, sink.AllLogs(), 1) } +// this test validates that exporter is can concurrently change the endpoints while consuming logs. +func TestConsumeLogs_ConcurrentResolverChange(t *testing.T) { + consumeStarted := make(chan struct{}) + consumeDone := make(chan struct{}) + + // imitate a slow exporter + te := &mockLogsExporter{Component: mockComponent{}} + te.consumelogsfn = func(_ context.Context, _ plog.Logs) error { + close(consumeStarted) + time.Sleep(50 * time.Millisecond) + return te.consumeErr + } + componentFactory := func(_ context.Context, _ string) (component.Component, error) { + return te, nil + } + lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), simpleConfig(), componentFactory) + require.NotNil(t, lb) + require.NoError(t, err) + + p, err := newLogsExporter(exportertest.NewNopCreateSettings(), simpleConfig()) + require.NotNil(t, p) + require.NoError(t, err) + + endpoints := []string{"endpoint-1"} + lb.res = &mockResolver{ + triggerCallbacks: true, + onResolve: func(_ context.Context) ([]string, error) { + return endpoints, nil + }, + } + p.loadBalancer = lb + + err = p.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) + defer func() { + require.NoError(t, p.Shutdown(context.Background())) + }() + + go func() { + assert.NoError(t, p.ConsumeLogs(context.Background(), simpleLogs())) + close(consumeDone) + }() + + // update endpoint while consuming logs + <-consumeStarted + endpoints = []string{"endpoint-2"} + endpoint, err := lb.res.resolve(context.Background()) + require.NoError(t, err) + require.Equal(t, endpoints, endpoint) + <-consumeDone +} + func TestRollingUpdatesWhenConsumeLogs(t *testing.T) { t.Skip("Flaky Test - See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/13331") @@ -344,7 +396,7 @@ func TestRollingUpdatesWhenConsumeLogs(t *testing.T) { DNS: &DNSResolver{Hostname: "service-1", Port: ""}, }, } - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockLogsExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), cfg, componentFactory) @@ -360,19 +412,17 @@ func TestRollingUpdatesWhenConsumeLogs(t *testing.T) { counter1 := &atomic.Int64{} counter2 := &atomic.Int64{} - defaultExporters := map[string]component.Component{ - "127.0.0.1:4317": newMockLogsExporter(func(ctx context.Context, ld plog.Logs) error { + defaultExporters := map[string]*wrappedExporter{ + "127.0.0.1:4317": newWrappedExporter(newMockLogsExporter(func(_ context.Context, _ plog.Logs) error { counter1.Add(1) // simulate an unreachable backend time.Sleep(10 * time.Second) return nil - }, - ), - "127.0.0.2:4317": newMockLogsExporter(func(ctx context.Context, ld plog.Logs) error { + })), + "127.0.0.2:4317": newWrappedExporter(newMockLogsExporter(func(_ context.Context, _ plog.Logs) error { counter2.Add(1) return nil - }, - ), + })), } // test @@ -385,7 +435,7 @@ func TestRollingUpdatesWhenConsumeLogs(t *testing.T) { lb.updateLock.Lock() lb.exporters = defaultExporters lb.updateLock.Unlock() - lb.res.onChange(func(endpoints []string) { + lb.res.onChange(func(_ []string) { lb.updateLock.Lock() lb.exporters = defaultExporters lb.updateLock.Unlock() @@ -458,15 +508,21 @@ func simpleLogWithoutID() plog.Logs { type mockLogsExporter struct { component.Component consumelogsfn func(ctx context.Context, ld plog.Logs) error + consumeErr error } func (e *mockLogsExporter) Capabilities() consumer.Capabilities { return consumer.Capabilities{MutatesData: false} } +func (e *mockLogsExporter) Shutdown(context.Context) error { + e.consumeErr = errors.New("exporter is shut down") + return nil +} + func (e *mockLogsExporter) ConsumeLogs(ctx context.Context, ld plog.Logs) error { if e.consumelogsfn == nil { - return nil + return e.consumeErr } return e.consumelogsfn(ctx, ld) } @@ -484,10 +540,5 @@ func newMockLogsExporter(consumelogsfn func(ctx context.Context, ld plog.Logs) e } func newNopMockLogsExporter() exporter.Logs { - return &mockLogsExporter{ - Component: mockComponent{}, - consumelogsfn: func(ctx context.Context, ld plog.Logs) error { - return nil - }, - } + return &mockLogsExporter{Component: mockComponent{}} } diff --git a/exporter/loadbalancingexporter/metadata.yaml b/exporter/loadbalancingexporter/metadata.yaml index 7d8166ab7d41..9918ca0e9bd8 100644 --- a/exporter/loadbalancingexporter/metadata.yaml +++ b/exporter/loadbalancingexporter/metadata.yaml @@ -1,4 +1,5 @@ type: loadbalancing +scope_name: otelcol/loadbalancing status: class: exporter @@ -7,9 +8,20 @@ status: development: [metrics] distributions: - contrib - - grafana - - observiq - - sumo - - aws codeowners: active: [jpkrohling] + +tests: + config: + routing_key: "service" + protocol: + otlp: + timeout: 1s + resolver: + static: + hostnames: + - backend-1:4317 + - backend-2:4317 + - backend-3:4317 + - backend-4:4317 + expect_consumer_error: true diff --git a/exporter/loadbalancingexporter/metrics_exporter.go b/exporter/loadbalancingexporter/metrics_exporter.go index f036bbd5cb20..9210723227d8 100644 --- a/exporter/loadbalancingexporter/metrics_exporter.go +++ b/exporter/loadbalancingexporter/metrics_exporter.go @@ -28,8 +28,10 @@ import ( var _ exporter.Metrics = (*metricExporterImp)(nil) +type exporterMetrics map[*wrappedExporter]pmetric.Metrics + type metricExporterImp struct { - loadBalancer loadBalancer + loadBalancer *loadBalancer routingKey routingKey stopped bool @@ -72,58 +74,65 @@ func (e *metricExporterImp) Start(ctx context.Context, host component.Host) erro return e.loadBalancer.Start(ctx, host) } -func (e *metricExporterImp) Shutdown(context.Context) error { +func (e *metricExporterImp) Shutdown(ctx context.Context) error { + err := e.loadBalancer.Shutdown(ctx) e.stopped = true e.shutdownWg.Wait() - return nil + return err } func (e *metricExporterImp) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error { - var errs error batches := batchpersignal.SplitMetrics(md) - for _, batch := range batches { - errs = multierr.Append(errs, e.consumeMetric(ctx, batch)) - } - return errs -} + exporterSegregatedMetrics := make(exporterMetrics) + endpoints := make(map[*wrappedExporter]string) -func (e *metricExporterImp) consumeMetric(ctx context.Context, md pmetric.Metrics) error { - var exp component.Component - routingIds, err := routingIdentifiersFromMetrics(md, e.routingKey) - if err != nil { - return err - } - for rid := range routingIds { - endpoint := e.loadBalancer.Endpoint([]byte(rid)) - exp, err = e.loadBalancer.Exporter(endpoint) + for _, batch := range batches { + routingIDs, err := routingIdentifiersFromMetrics(batch, e.routingKey) if err != nil { return err } - te, ok := exp.(exporter.Metrics) - if !ok { - return fmt.Errorf("unable to export metrics, unexpected exporter type: expected exporter.Metrics but got %T", exp) + for rid := range routingIDs { + exp, endpoint, err := e.loadBalancer.exporterAndEndpoint([]byte(rid)) + if err != nil { + return err + } + + _, ok := exporterSegregatedMetrics[exp] + if !ok { + exp.consumeWG.Add(1) + exporterSegregatedMetrics[exp] = pmetric.NewMetrics() + } + exporterSegregatedMetrics[exp] = mergeMetrics(exporterSegregatedMetrics[exp], batch) + + endpoints[exp] = endpoint } + } + + var errs error + for exp, metrics := range exporterSegregatedMetrics { start := time.Now() - err = te.ConsumeMetrics(ctx, md) + err := exp.ConsumeMetrics(ctx, metrics) + exp.consumeWG.Done() duration := time.Since(start) + errs = multierr.Append(errs, err) if err == nil { _ = stats.RecordWithTags( ctx, - []tag.Mutator{tag.Upsert(endpointTagKey, endpoint), successTrueMutator}, + []tag.Mutator{tag.Upsert(endpointTagKey, endpoints[exp]), successTrueMutator}, mBackendLatency.M(duration.Milliseconds())) } else { _ = stats.RecordWithTags( ctx, - []tag.Mutator{tag.Upsert(endpointTagKey, endpoint), successFalseMutator}, + []tag.Mutator{tag.Upsert(endpointTagKey, endpoints[exp]), successFalseMutator}, mBackendLatency.M(duration.Milliseconds())) } } - return err + return errs } func routingIdentifiersFromMetrics(mds pmetric.Metrics, key routingKey) (map[string]bool, error) { diff --git a/exporter/loadbalancingexporter/metrics_exporter_test.go b/exporter/loadbalancingexporter/metrics_exporter_test.go index 510a1cac31de..fb2e319c2abc 100644 --- a/exporter/loadbalancingexporter/metrics_exporter_test.go +++ b/exporter/loadbalancingexporter/metrics_exporter_test.go @@ -163,7 +163,7 @@ func TestMetricsExporterShutdown(t *testing.T) { } func TestConsumeMetrics(t *testing.T) { - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockMetricsExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), serviceBasedRoutingConfig(), componentFactory) @@ -176,11 +176,11 @@ func TestConsumeMetrics(t *testing.T) { assert.Equal(t, p.routingKey, svcRouting) // pre-load an exporter here, so that we don't use the actual OTLP exporter - lb.addMissingExporters(context.Background(), []string{"endpoint-1"}) + lb.addMissingExporters(context.Background(), []string{"endpoint-1", "endpoint-2"}) lb.res = &mockResolver{ triggerCallbacks: true, - onResolve: func(ctx context.Context) ([]string, error) { - return []string{"endpoint-1"}, nil + onResolve: func(_ context.Context) ([]string, error) { + return []string{"endpoint-1", "endpoint-2"}, nil }, } p.loadBalancer = lb @@ -199,8 +199,60 @@ func TestConsumeMetrics(t *testing.T) { } +// this test validates that exporter is can concurrently change the endpoints while consuming metrics. +func TestConsumeMetrics_ConcurrentResolverChange(t *testing.T) { + consumeStarted := make(chan struct{}) + consumeDone := make(chan struct{}) + + // imitate a slow exporter + te := &mockMetricsExporter{Component: mockComponent{}} + te.ConsumeMetricsFn = func(_ context.Context, _ pmetric.Metrics) error { + close(consumeStarted) + time.Sleep(50 * time.Millisecond) + return te.consumeErr + } + componentFactory := func(_ context.Context, _ string) (component.Component, error) { + return te, nil + } + lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), simpleConfig(), componentFactory) + require.NotNil(t, lb) + require.NoError(t, err) + + p, err := newMetricsExporter(exportertest.NewNopCreateSettings(), simpleConfig()) + require.NotNil(t, p) + require.NoError(t, err) + + endpoints := []string{"endpoint-1"} + lb.res = &mockResolver{ + triggerCallbacks: true, + onResolve: func(_ context.Context) ([]string, error) { + return endpoints, nil + }, + } + p.loadBalancer = lb + + err = p.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) + defer func() { + require.NoError(t, p.Shutdown(context.Background())) + }() + + go func() { + assert.NoError(t, p.ConsumeMetrics(context.Background(), simpleMetricsWithResource())) + close(consumeDone) + }() + + // update endpoint while consuming logs + <-consumeStarted + endpoints = []string{"endpoint-2"} + endpoint, err := lb.res.resolve(context.Background()) + require.NoError(t, err) + require.Equal(t, endpoints, endpoint) + <-consumeDone +} + func TestConsumeMetricsServiceBased(t *testing.T) { - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockMetricsExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), serviceBasedRoutingConfig(), componentFactory) @@ -216,7 +268,7 @@ func TestConsumeMetricsServiceBased(t *testing.T) { lb.addMissingExporters(context.Background(), []string{"endpoint-1"}) lb.res = &mockResolver{ triggerCallbacks: true, - onResolve: func(ctx context.Context) ([]string, error) { + onResolve: func(_ context.Context) ([]string, error) { return []string{"endpoint-1"}, nil }, } @@ -236,7 +288,7 @@ func TestConsumeMetricsServiceBased(t *testing.T) { } func TestConsumeMetricsResourceBased(t *testing.T) { - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockMetricsExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), resourceBasedRoutingConfig(), componentFactory) @@ -252,7 +304,7 @@ func TestConsumeMetricsResourceBased(t *testing.T) { lb.addMissingExporters(context.Background(), []string{"endpoint-1"}) lb.res = &mockResolver{ triggerCallbacks: true, - onResolve: func(ctx context.Context) ([]string, error) { + onResolve: func(_ context.Context) ([]string, error) { return []string{"endpoint-1"}, nil }, } @@ -272,7 +324,7 @@ func TestConsumeMetricsResourceBased(t *testing.T) { } func TestConsumeMetricsMetricNameBased(t *testing.T) { - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockMetricsExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), metricNameBasedRoutingConfig(), componentFactory) @@ -288,7 +340,7 @@ func TestConsumeMetricsMetricNameBased(t *testing.T) { lb.addMissingExporters(context.Background(), []string{"endpoint-1"}) lb.res = &mockResolver{ triggerCallbacks: true, - onResolve: func(ctx context.Context) ([]string, error) { + onResolve: func(_ context.Context) ([]string, error) { return []string{"endpoint-1"}, nil }, } @@ -331,7 +383,7 @@ func TestServiceBasedRoutingForSameMetricName(t *testing.T) { } func TestConsumeMetricsExporterNoEndpoint(t *testing.T) { - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockMetricsExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), serviceBasedRoutingConfig(), componentFactory) @@ -344,7 +396,7 @@ func TestConsumeMetricsExporterNoEndpoint(t *testing.T) { lb.res = &mockResolver{ triggerCallbacks: true, - onResolve: func(ctx context.Context) ([]string, error) { + onResolve: func(_ context.Context) ([]string, error) { return nil, nil }, } @@ -365,7 +417,7 @@ func TestConsumeMetricsExporterNoEndpoint(t *testing.T) { } func TestConsumeMetricsUnexpectedExporterType(t *testing.T) { - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), serviceBasedRoutingConfig(), componentFactory) @@ -378,10 +430,11 @@ func TestConsumeMetricsUnexpectedExporterType(t *testing.T) { // pre-load an exporter here, so that we don't use the actual OTLP exporter lb.addMissingExporters(context.Background(), []string{"endpoint-1"}) + lb.addMissingExporters(context.Background(), []string{"endpoint-2"}) lb.res = &mockResolver{ triggerCallbacks: true, - onResolve: func(ctx context.Context) ([]string, error) { - return []string{"endpoint-1"}, nil + onResolve: func(_ context.Context) ([]string, error) { + return []string{"endpoint-1", "endpoint-2"}, nil }, } p.loadBalancer = lb @@ -419,18 +472,18 @@ func TestBuildExporterConfigUnknown(t *testing.T) { exporterCfg := buildExporterConfig(c.(*Config), "the-endpoint") // verify - grpcSettings := defaultCfg.GRPCClientSettings + grpcSettings := defaultCfg.ClientConfig grpcSettings.Endpoint = "the-endpoint" - assert.Equal(t, grpcSettings, exporterCfg.GRPCClientSettings) + assert.Equal(t, grpcSettings, exporterCfg.ClientConfig) assert.Equal(t, defaultCfg.TimeoutSettings, exporterCfg.TimeoutSettings) - assert.Equal(t, defaultCfg.QueueSettings, exporterCfg.QueueSettings) - assert.Equal(t, defaultCfg.RetrySettings, exporterCfg.RetrySettings) + assert.Equal(t, defaultCfg.QueueConfig, exporterCfg.QueueConfig) + assert.Equal(t, defaultCfg.RetryConfig, exporterCfg.RetryConfig) } func TestBatchWithTwoMetrics(t *testing.T) { sink := new(consumertest.MetricsSink) - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newMockMetricsExporter(sink.ConsumeMetrics), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), serviceBasedRoutingConfig(), componentFactory) @@ -592,7 +645,7 @@ func TestRollingUpdatesWhenConsumeMetrics(t *testing.T) { DNS: &DNSResolver{Hostname: "service-1", Port: ""}, }, } - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockMetricsExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), cfg, componentFactory) @@ -608,19 +661,17 @@ func TestRollingUpdatesWhenConsumeMetrics(t *testing.T) { counter1 := &atomic.Int64{} counter2 := &atomic.Int64{} - defaultExporters := map[string]component.Component{ - "127.0.0.1:4317": newMockMetricsExporter(func(ctx context.Context, td pmetric.Metrics) error { + defaultExporters := map[string]*wrappedExporter{ + "127.0.0.1:4317": newWrappedExporter(newMockMetricsExporter(func(_ context.Context, _ pmetric.Metrics) error { counter1.Add(1) // simulate an unreachable backend time.Sleep(10 * time.Second) return nil - }, - ), - "127.0.0.2:4317": newMockMetricsExporter(func(ctx context.Context, td pmetric.Metrics) error { + })), + "127.0.0.2:4317": newWrappedExporter(newMockMetricsExporter(func(_ context.Context, _ pmetric.Metrics) error { counter2.Add(1) return nil - }, - ), + })), } // test @@ -633,7 +684,7 @@ func TestRollingUpdatesWhenConsumeMetrics(t *testing.T) { lb.updateLock.Lock() lb.exporters = defaultExporters lb.updateLock.Unlock() - lb.res.onChange(func(endpoints []string) { + lb.res.onChange(func(_ []string) { lb.updateLock.Lock() lb.exporters = defaultExporters lb.updateLock.Unlock() @@ -677,10 +728,101 @@ func TestRollingUpdatesWhenConsumeMetrics(t *testing.T) { require.Greater(t, counter2.Load(), int64(0)) } +func appendSimpleMetricWithServiceName(metric pmetric.Metrics, serviceName string, sigName string) { + metric.ResourceMetrics().EnsureCapacity(1) + rmetrics := metric.ResourceMetrics().AppendEmpty() + rmetrics.Resource().Attributes().PutStr(conventions.AttributeServiceName, serviceName) + rmetrics.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetName(sigName) +} + +func benchConsumeMetrics(b *testing.B, endpointsCount int, metricsCount int) { + sink := new(consumertest.MetricsSink) + componentFactory := func(_ context.Context, _ string) (component.Component, error) { + return newMockMetricsExporter(sink.ConsumeMetrics), nil + } + + endpoints := []string{} + for i := 0; i < endpointsCount; i++ { + endpoints = append(endpoints, fmt.Sprintf("endpoint-%d", i)) + } + + config := &Config{ + Resolver: ResolverSettings{ + Static: &StaticResolver{Hostnames: endpoints}, + }, + } + + lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), config, componentFactory) + require.NotNil(b, lb) + require.NoError(b, err) + + p, err := newMetricsExporter(exportertest.NewNopCreateSettings(), config) + require.NotNil(b, p) + require.NoError(b, err) + + p.loadBalancer = lb + + err = p.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(b, err) + + metric1 := pmetric.NewMetrics() + metric2 := pmetric.NewMetrics() + for i := 0; i < endpointsCount; i++ { + for j := 0; j < metricsCount/endpointsCount; j++ { + appendSimpleMetricWithServiceName(metric2, fmt.Sprintf("service-%d", i), fmt.Sprintf("sig-%d", i)) + } + } + simpleMetricsWithServiceName() + md := mergeMetrics(metric1, metric2) + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + err = p.ConsumeMetrics(context.Background(), md) + require.NoError(b, err) + } + + b.StopTimer() + err = p.Shutdown(context.Background()) + require.NoError(b, err) +} + +func BenchmarkConsumeMetrics_1E100T(b *testing.B) { + benchConsumeMetrics(b, 1, 100) +} + +func BenchmarkConsumeMetrics_1E1000T(b *testing.B) { + benchConsumeMetrics(b, 1, 1000) +} + +func BenchmarkConsumeMetrics_5E100T(b *testing.B) { + benchConsumeMetrics(b, 5, 100) +} + +func BenchmarkConsumeMetrics_5E500T(b *testing.B) { + benchConsumeMetrics(b, 5, 500) +} + +func BenchmarkConsumeMetrics_5E1000T(b *testing.B) { + benchConsumeMetrics(b, 5, 1000) +} + +func BenchmarkConsumeMetrics_10E100T(b *testing.B) { + benchConsumeMetrics(b, 10, 100) +} + +func BenchmarkConsumeMetrics_10E500T(b *testing.B) { + benchConsumeMetrics(b, 10, 500) +} + +func BenchmarkConsumeMetrics_10E1000T(b *testing.B) { + benchConsumeMetrics(b, 10, 1000) +} + func endpoint2Config() *Config { return &Config{ Resolver: ResolverSettings{ - Static: &StaticResolver{Hostnames: []string{"endpoint-2"}}, + Static: &StaticResolver{Hostnames: []string{"endpoint-1", "endpoint-2"}}, }, RoutingKey: "service", } @@ -689,7 +831,7 @@ func endpoint2Config() *Config { func resourceBasedRoutingConfig() *Config { return &Config{ Resolver: ResolverSettings{ - Static: &StaticResolver{Hostnames: []string{"endpoint-1"}}, + Static: &StaticResolver{Hostnames: []string{"endpoint-1", "endpoint-2"}}, }, RoutingKey: resourceRouteKey, } @@ -698,7 +840,7 @@ func resourceBasedRoutingConfig() *Config { func metricNameBasedRoutingConfig() *Config { return &Config{ Resolver: ResolverSettings{ - Static: &StaticResolver{Hostnames: []string{"endpoint-1"}}, + Static: &StaticResolver{Hostnames: []string{"endpoint-1", "endpoint-2"}}, }, RoutingKey: metricRouteKey, } @@ -728,7 +870,6 @@ func simpleMetricsWithServiceName() pmetric.Metrics { } func simpleMetricsWithResource() pmetric.Metrics { - metrics := pmetric.NewMetrics() metrics.ResourceMetrics().EnsureCapacity(1) rmetrics := metrics.ResourceMetrics().AppendEmpty() @@ -758,6 +899,7 @@ func appendSimpleMetricWithID(dest pmetric.ResourceMetrics, id string) { type mockMetricsExporter struct { component.Component ConsumeMetricsFn func(ctx context.Context, td pmetric.Metrics) error + consumeErr error } func newMockMetricsExporter(consumeMetricsFn func(ctx context.Context, td pmetric.Metrics) error) exporter.Metrics { @@ -768,21 +910,21 @@ func newMockMetricsExporter(consumeMetricsFn func(ctx context.Context, td pmetri } func newNopMockMetricsExporter() exporter.Metrics { - return &mockMetricsExporter{ - Component: mockComponent{}, - ConsumeMetricsFn: func(ctx context.Context, md pmetric.Metrics) error { - return nil - }, - } + return &mockMetricsExporter{Component: mockComponent{}} } func (e *mockMetricsExporter) Capabilities() consumer.Capabilities { return consumer.Capabilities{MutatesData: false} } +func (e *mockMetricsExporter) Shutdown(context.Context) error { + e.consumeErr = errors.New("exporter is shut down") + return nil +} + func (e *mockMetricsExporter) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error { if e.ConsumeMetricsFn == nil { - return nil + return e.consumeErr } return e.ConsumeMetricsFn(ctx, md) } diff --git a/exporter/loadbalancingexporter/package_test.go b/exporter/loadbalancingexporter/package_test.go new file mode 100644 index 000000000000..4e898c447576 --- /dev/null +++ b/exporter/loadbalancingexporter/package_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package loadbalancingexporter + +import ( + "testing" + + "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")) +} diff --git a/exporter/loadbalancingexporter/resolver_aws_cloudmap.go b/exporter/loadbalancingexporter/resolver_aws_cloudmap.go new file mode 100644 index 000000000000..21d14107013f --- /dev/null +++ b/exporter/loadbalancingexporter/resolver_aws_cloudmap.go @@ -0,0 +1,219 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package loadbalancingexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter" + +import ( + "context" + "errors" + "fmt" + "log" + "sort" + "sync" + "time" + + "github.com/aws/aws-sdk-go-v2/config" + "github.com/aws/aws-sdk-go-v2/service/servicediscovery" + "github.com/aws/aws-sdk-go-v2/service/servicediscovery/types" + "go.opencensus.io/stats" + "go.opencensus.io/tag" + "go.uber.org/zap" +) + +const ( + defaultAwsResInterval = 30 * time.Second + defaultAwsResTimeout = 5 * time.Second +) + +var ( + errNoNamespace = errors.New("no Cloud Map namespace specified to resolve the backends") + errNoServiceName = errors.New("no Cloud Map serviceName specified to resolve the backends") + + awsResolverMutator = tag.Upsert(tag.MustNewKey("resolver"), "aws") + + awsResolverSuccessTrueMutators = []tag.Mutator{awsResolverMutator, successTrueMutator} + awsResolverSuccessFalseMutators = []tag.Mutator{awsResolverMutator, successFalseMutator} +) + +func createDiscoveryFunction(client *servicediscovery.Client) func(params *servicediscovery.DiscoverInstancesInput) (*servicediscovery.DiscoverInstancesOutput, error) { + return func(params *servicediscovery.DiscoverInstancesInput) (*servicediscovery.DiscoverInstancesOutput, error) { + return client.DiscoverInstances(context.TODO(), params) + } +} + +type cloudMapResolver struct { + logger *zap.Logger + + namespaceName *string + serviceName *string + port *uint16 + healthStatus *types.HealthStatusFilter + resInterval time.Duration + resTimeout time.Duration + + endpoints []string + onChangeCallbacks []func([]string) + + stopCh chan struct{} + updateLock sync.Mutex + shutdownWg sync.WaitGroup + changeCallbackLock sync.RWMutex + discoveryFn func(params *servicediscovery.DiscoverInstancesInput) (*servicediscovery.DiscoverInstancesOutput, error) +} + +func newCloudMapResolver(logger *zap.Logger, namespaceName *string, serviceName *string, port *uint16, healthStatus *types.HealthStatusFilter, interval time.Duration, timeout time.Duration) (*cloudMapResolver, error) { + // Using the SDK's default configuration, loading additional config + // and credentials values from the environment variables, shared + // credentials, and shared configuration files + cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithDefaultRegion("us-east-1")) + if err != nil { + log.Fatalf("unable to load SDK config, %v", err) + return nil, err + } + + // Using the Config value, create the DynamoDB client + svc := servicediscovery.NewFromConfig(cfg) + + if namespaceName == nil || len(*namespaceName) == 0 { + return nil, errNoNamespace + } + + if serviceName == nil || len(*serviceName) == 0 { + return nil, errNoServiceName + } + + if interval == 0 { + interval = defaultAwsResInterval + } + if timeout == 0 { + timeout = defaultAwsResTimeout + } + + if healthStatus == nil { + var healthStatusFilter = types.HealthStatusFilterHealthy + healthStatus = &healthStatusFilter + } + + return &cloudMapResolver{ + logger: logger, + namespaceName: namespaceName, + serviceName: serviceName, + port: port, + healthStatus: healthStatus, + resInterval: interval, + resTimeout: timeout, + stopCh: make(chan struct{}), + discoveryFn: createDiscoveryFunction(svc), + }, nil +} + +func (r *cloudMapResolver) start(ctx context.Context) error { + if _, err := r.resolve(ctx); err != nil { + r.logger.Warn("failed initial resolve", zap.Error(err)) + } + + go r.periodicallyResolve() + + r.logger.Info("AWS CloudMap resolver started", + zap.Stringp("serviceName", r.serviceName), + zap.Stringp("namespaceName", r.namespaceName), + zap.Uint16p("port", r.port), + zap.String("healthStatus", string(*r.healthStatus)), + zap.Duration("interval", r.resInterval), zap.Duration("timeout", r.resTimeout)) + return nil +} + +func (r *cloudMapResolver) shutdown(_ context.Context) error { + r.changeCallbackLock.Lock() + r.onChangeCallbacks = nil + r.changeCallbackLock.Unlock() + + close(r.stopCh) + r.shutdownWg.Wait() + return nil +} + +func (r *cloudMapResolver) periodicallyResolve() { + ticker := time.NewTicker(r.resInterval) + + for { + select { + case <-ticker.C: + ctx, cancel := context.WithTimeout(context.Background(), r.resTimeout) + if _, err := r.resolve(ctx); err != nil { + r.logger.Warn("failed to resolve", zap.Error(err)) + } else { + r.logger.Debug("resolved successfully") + } + cancel() + case <-r.stopCh: + return + } + } +} + +func (r *cloudMapResolver) resolve(ctx context.Context) ([]string, error) { + r.shutdownWg.Add(1) + defer r.shutdownWg.Done() + + discoverInstancesOutput, err := r.discoveryFn(&servicediscovery.DiscoverInstancesInput{ + NamespaceName: r.namespaceName, + ServiceName: r.serviceName, + HealthStatus: *r.healthStatus, + MaxResults: nil, + OptionalParameters: nil, + QueryParameters: nil, + }) + if err != nil { + _ = stats.RecordWithTags(ctx, awsResolverSuccessFalseMutators, mNumResolutions.M(1)) + return nil, err + } + + _ = stats.RecordWithTags(ctx, awsResolverSuccessTrueMutators, mNumResolutions.M(1)) + + r.logger.Debug("resolver has discovered instances ", + zap.Int("Instance Count", len(discoverInstancesOutput.Instances))) + + var backends []string + for _, instance := range discoverInstancesOutput.Instances { + ipAddr := instance.Attributes["AWS_INSTANCE_IPV4"] + var endpoint string + if r.port == nil { + ipPort := instance.Attributes["AWS_INSTANCE_PORT"] + endpoint = fmt.Sprintf("%s:%s", ipAddr, ipPort) + } else { + endpoint = fmt.Sprintf("%s:%d", ipAddr, *r.port) + } + r.logger.Debug("resolved instance", + zap.String("Endpoint", endpoint)) + backends = append(backends, endpoint) + } + + // keep it always in the same order + sort.Strings(backends) + + if equalStringSlice(r.endpoints, backends) { + return r.endpoints, nil + } + + // the list has changed! + r.updateLock.Lock() + r.endpoints = backends + r.updateLock.Unlock() + _ = stats.RecordWithTags(ctx, awsResolverSuccessTrueMutators, mNumBackends.M(int64(len(backends)))) + + // propagate the change + r.changeCallbackLock.RLock() + for _, callback := range r.onChangeCallbacks { + callback(r.endpoints) + } + r.changeCallbackLock.RUnlock() + + return r.endpoints, nil +} + +func (r *cloudMapResolver) onChange(f func([]string)) { + r.changeCallbackLock.Lock() + defer r.changeCallbackLock.Unlock() + r.onChangeCallbacks = append(r.onChangeCallbacks, f) +} diff --git a/exporter/loadbalancingexporter/resolver_aws_cloudmap_test.go b/exporter/loadbalancingexporter/resolver_aws_cloudmap_test.go new file mode 100644 index 000000000000..a236f14bce0b --- /dev/null +++ b/exporter/loadbalancingexporter/resolver_aws_cloudmap_test.go @@ -0,0 +1,112 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package loadbalancingexporter + +import ( + "context" + "fmt" + "testing" + "time" + + "github.com/aws/aws-sdk-go-v2/service/servicediscovery" + "github.com/aws/aws-sdk-go-v2/service/servicediscovery/types" + "github.com/aws/smithy-go/middleware" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/zap" +) + +var instanceID = "test" +var namespaceName = "cloudmap" +var statusFilterHealthy = types.HealthStatusFilterHealthy + +var port uint16 = 1234 + +func TestInitialCloudMapResolution(t *testing.T) { + // prepare + + res := &cloudMapResolver{ + logger: zap.NewNop(), + namespaceName: &namespaceName, + serviceName: &instanceID, + healthStatus: &statusFilterHealthy, + resInterval: 5 * time.Second, + resTimeout: 1 * time.Second, + stopCh: make(chan struct{}), + discoveryFn: mockDiscovery, + } + + // test + var resolved []string + res.onChange(func(endpoints []string) { + resolved = endpoints + }) + require.NoError(t, res.start(context.Background())) + defer func() { + require.NoError(t, res.shutdown(context.Background())) + }() + + // verify + assert.Len(t, resolved, 3) + for i, value := range []string{"127.0.0.1:8080", "127.0.0.2:8080", "127.0.0.3:8080"} { + assert.Equal(t, value, resolved[i]) + } +} + +func TestInitialCloudMapResolutionWithPort(t *testing.T) { + // prepare + + res := &cloudMapResolver{ + logger: zap.NewNop(), + namespaceName: &namespaceName, + serviceName: &instanceID, + port: &port, + healthStatus: &statusFilterHealthy, + resInterval: 5 * time.Second, + resTimeout: 1 * time.Second, + stopCh: make(chan struct{}), + discoveryFn: mockDiscovery, + } + + // test + var resolved []string + res.onChange(func(endpoints []string) { + resolved = endpoints + }) + require.NoError(t, res.start(context.Background())) + defer func() { + require.NoError(t, res.shutdown(context.Background())) + }() + + // verify + assert.Len(t, resolved, 3) + for i, value := range []string{"127.0.0.1:1234", "127.0.0.2:1234", "127.0.0.3:1234"} { + assert.Equal(t, value, resolved[i]) + } +} + +func makeSummary(i int) types.HttpInstanceSummary { + return types.HttpInstanceSummary{ + Attributes: map[string]string{ + "AWS_INSTANCE_IPV4": fmt.Sprintf("127.0.0.%d", i), + "AWS_INSTANCE_PORT": "8080", + }, + HealthStatus: types.HealthStatusHealthy, + InstanceId: &instanceID, + NamespaceName: nil, + ServiceName: nil, + } +} +func mockDiscovery(*servicediscovery.DiscoverInstancesInput) (*servicediscovery.DiscoverInstancesOutput, error) { + + s := &servicediscovery.DiscoverInstancesOutput{ + Instances: []types.HttpInstanceSummary{ + makeSummary(1), + makeSummary(2), + makeSummary(3), + }, + ResultMetadata: middleware.Metadata{}, + } + return s, nil +} diff --git a/exporter/loadbalancingexporter/resolver_dns_test.go b/exporter/loadbalancingexporter/resolver_dns_test.go index 6f4ca264e403..0201c5a9cea5 100644 --- a/exporter/loadbalancingexporter/resolver_dns_test.go +++ b/exporter/loadbalancingexporter/resolver_dns_test.go @@ -107,6 +107,7 @@ func TestCantResolve(t *testing.T) { // verify assert.NoError(t, err) + assert.NoError(t, res.shutdown(context.Background())) } func TestOnChange(t *testing.T) { @@ -125,7 +126,7 @@ func TestOnChange(t *testing.T) { // test counter := &atomic.Int64{} - res.onChange(func(endpoints []string) { + res.onChange(func(_ []string) { counter.Add(1) }) require.NoError(t, res.start(context.Background())) @@ -215,7 +216,7 @@ func TestPeriodicallyResolve(t *testing.T) { } wg := sync.WaitGroup{} - res.onChange(func(backends []string) { + res.onChange(func(_ []string) { wg.Done() }) @@ -283,7 +284,7 @@ func TestShutdownClearsCallbacks(t *testing.T) { require.NoError(t, err) res.resolver = &mockDNSResolver{} - res.onChange(func(s []string) {}) + res.onChange(func(_ []string) {}) require.NoError(t, res.start(context.Background())) // sanity check @@ -297,7 +298,7 @@ func TestShutdownClearsCallbacks(t *testing.T) { assert.Len(t, res.onChangeCallbacks, 0) // check that we can add a new onChange before a new start - res.onChange(func(s []string) {}) + res.onChange(func(_ []string) {}) assert.Len(t, res.onChangeCallbacks, 1) } diff --git a/exporter/loadbalancingexporter/resolver_k8s.go b/exporter/loadbalancingexporter/resolver_k8s.go index 1c0b14aa9436..4a2d64fb6a61 100644 --- a/exporter/loadbalancingexporter/resolver_k8s.go +++ b/exporter/loadbalancingexporter/resolver_k8s.go @@ -13,6 +13,7 @@ import ( "strconv" "strings" "sync" + "time" "go.opencensus.io/stats" "go.opencensus.io/tag" @@ -23,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" "k8s.io/utils/strings/slices" "sigs.k8s.io/controller-runtime/pkg/client/config" ) @@ -37,6 +38,10 @@ var ( k8sResolverSuccessFalseMutators = []tag.Mutator{k8sResolverMutator, successFalseMutator} ) +const ( + defaultListWatchTimeout = 1 * time.Second +) + type k8sResolver struct { logger *zap.Logger svcName string @@ -48,6 +53,8 @@ type k8sResolver struct { epsListWatcher cache.ListerWatcher endpointsStore *sync.Map + lwTimeout time.Duration + endpoints []string onChangeCallbacks []func([]string) @@ -60,12 +67,16 @@ type k8sResolver struct { func newK8sResolver(clt kubernetes.Interface, logger *zap.Logger, service string, - ports []int32) (*k8sResolver, error) { + ports []int32, timeout time.Duration) (*k8sResolver, error) { if len(service) == 0 { return nil, errNoSvc } + if timeout == 0 { + timeout = defaultListWatchTimeout + } + nAddr := strings.SplitN(service, ".", 2) name, namespace := nAddr[0], "default" if len(nAddr) > 1 { @@ -84,12 +95,12 @@ func newK8sResolver(clt kubernetes.Interface, epsListWatcher := &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { options.FieldSelector = epsSelector - options.TimeoutSeconds = pointer.Int64(1) + options.TimeoutSeconds = ptr.To[int64](int64(timeout.Seconds())) return clt.CoreV1().Endpoints(namespace).List(context.Background(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.FieldSelector = epsSelector - options.TimeoutSeconds = pointer.Int64(1) + options.TimeoutSeconds = ptr.To[int64](int64(timeout.Seconds())) return clt.CoreV1().Endpoints(namespace).Watch(context.Background(), options) }, } @@ -106,6 +117,7 @@ func newK8sResolver(clt kubernetes.Interface, epsListWatcher: epsListWatcher, handler: h, stopCh: make(chan struct{}), + lwTimeout: timeout, } h.callback = r.resolve @@ -134,7 +146,8 @@ func (r *k8sResolver) start(_ context.Context) error { r.logger.Debug("K8s service resolver started", zap.String("service", r.svcName), zap.String("namespace", r.svcNs), - zap.Int32s("ports", r.port)) + zap.Int32s("ports", r.port), + zap.Duration("timeout", r.lwTimeout)) return nil } @@ -160,7 +173,7 @@ func (r *k8sResolver) resolve(ctx context.Context) ([]string, error) { defer r.shutdownWg.Done() var backends []string - r.endpointsStore.Range(func(address, value any) bool { + r.endpointsStore.Range(func(address, _ any) bool { addr := address.(string) if len(r.port) == 0 { backends = append(backends, addr) diff --git a/exporter/loadbalancingexporter/resolver_k8s_test.go b/exporter/loadbalancingexporter/resolver_k8s_test.go index 9e7a1fe14b6d..b7faf8497743 100644 --- a/exporter/loadbalancingexporter/resolver_k8s_test.go +++ b/exporter/loadbalancingexporter/resolver_k8s_test.go @@ -56,7 +56,7 @@ func TestK8sResolve(t *testing.T) { } cl := fake.NewSimpleClientset(endpoint) - res, err := newK8sResolver(cl, zap.NewNop(), service, ports) + res, err := newK8sResolver(cl, zap.NewNop(), service, ports, defaultListWatchTimeout) require.NoError(t, err) require.NoError(t, res.start(context.Background())) @@ -101,7 +101,7 @@ func TestK8sResolve(t *testing.T) { return err }, - verifyFn: func(ctx *suiteContext, args args) error { + verifyFn: func(ctx *suiteContext, _ args) error { if _, err := ctx.resolver.resolve(context.Background()); err != nil { return err } @@ -139,7 +139,7 @@ func TestK8sResolve(t *testing.T) { return err }, - verifyFn: func(ctx *suiteContext, args args) error { + verifyFn: func(ctx *suiteContext, _ args) error { if _, err := ctx.resolver.resolve(context.Background()); err != nil { return err } @@ -163,7 +163,7 @@ func TestK8sResolve(t *testing.T) { return suiteCtx.clientset.CoreV1().Endpoints(args.namespace). Delete(context.TODO(), args.service, metav1.DeleteOptions{}) }, - verifyFn: func(suiteCtx *suiteContext, args args) error { + verifyFn: func(suiteCtx *suiteContext, _ args) error { if _, err := suiteCtx.resolver.resolve(context.Background()); err != nil { return err } @@ -241,7 +241,7 @@ func Test_newK8sResolver(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := newK8sResolver(fake.NewSimpleClientset(), tt.args.logger, tt.args.service, tt.args.ports) + got, err := newK8sResolver(fake.NewSimpleClientset(), tt.args.logger, tt.args.service, tt.args.ports, defaultListWatchTimeout) if tt.wantErr != nil { require.Error(t, err, tt.wantErr) } else { diff --git a/exporter/loadbalancingexporter/resolver_static.go b/exporter/loadbalancingexporter/resolver_static.go index 8527669db834..86759f132bbe 100644 --- a/exporter/loadbalancingexporter/resolver_static.go +++ b/exporter/loadbalancingexporter/resolver_static.go @@ -49,7 +49,13 @@ func (r *staticResolver) start(ctx context.Context) error { return err } -func (r *staticResolver) shutdown(_ context.Context) error { +func (r *staticResolver) shutdown(context.Context) error { + r.endpoints = nil + + for _, callback := range r.onChangeCallbacks { + callback(r.endpoints) + } + return nil } diff --git a/exporter/loadbalancingexporter/resolver_static_test.go b/exporter/loadbalancingexporter/resolver_static_test.go index 4bdc0d815f17..63dda4be2367 100644 --- a/exporter/loadbalancingexporter/resolver_static_test.go +++ b/exporter/loadbalancingexporter/resolver_static_test.go @@ -39,7 +39,7 @@ func TestResolvedOnlyOnce(t *testing.T) { require.NoError(t, err) counter := 0 - res.onChange(func(endpoints []string) { + res.onChange(func(_ []string) { counter++ }) diff --git a/exporter/loadbalancingexporter/testdata/config.yaml b/exporter/loadbalancingexporter/testdata/config.yaml index a1ec52ed8d85..5d42674d79e3 100644 --- a/exporter/loadbalancingexporter/testdata/config.yaml +++ b/exporter/loadbalancingexporter/testdata/config.yaml @@ -27,3 +27,14 @@ loadbalancing/3: dns: hostname: service-1 port: 55690 + +loadbalancing/4: + protocol: + otlp: + + # how to get the list of backends: DNS + resolver: + awsCloudMap: + namespace: cloudmap-1 + serviceName: service-1 + port: 4319 diff --git a/exporter/loadbalancingexporter/testdata/test-build-exporter-config.yaml b/exporter/loadbalancingexporter/testdata/test-build-exporter-config.yaml index b7e1b4475437..bce0c82f379b 100644 --- a/exporter/loadbalancingexporter/testdata/test-build-exporter-config.yaml +++ b/exporter/loadbalancingexporter/testdata/test-build-exporter-config.yaml @@ -7,7 +7,7 @@ exporters: loadbalancing: protocol: otlp: - endpoint: should-be-replaced + endpoint: should-be-replaced:4317 resolver: static: diff --git a/exporter/loadbalancingexporter/trace_exporter.go b/exporter/loadbalancingexporter/trace_exporter.go index 06a67b142638..a6f955c69975 100644 --- a/exporter/loadbalancingexporter/trace_exporter.go +++ b/exporter/loadbalancingexporter/trace_exporter.go @@ -24,8 +24,10 @@ import ( var _ exporter.Traces = (*traceExporterImp)(nil) +type exporterTraces map[*wrappedExporter]ptrace.Traces + type traceExporterImp struct { - loadBalancer loadBalancer + loadBalancer *loadBalancer routingKey routingKey stopped bool @@ -70,57 +72,64 @@ func (e *traceExporterImp) Start(ctx context.Context, host component.Host) error return e.loadBalancer.Start(ctx, host) } -func (e *traceExporterImp) Shutdown(context.Context) error { +func (e *traceExporterImp) Shutdown(ctx context.Context) error { + err := e.loadBalancer.Shutdown(ctx) e.stopped = true e.shutdownWg.Wait() - return nil + return err } func (e *traceExporterImp) ConsumeTraces(ctx context.Context, td ptrace.Traces) error { - var errs error batches := batchpersignal.SplitTraces(td) - for _, batch := range batches { - errs = multierr.Append(errs, e.consumeTrace(ctx, batch)) - } - return errs -} - -func (e *traceExporterImp) consumeTrace(ctx context.Context, td ptrace.Traces) error { - var exp component.Component - routingIds, err := routingIdentifiersFromTraces(td, e.routingKey) - if err != nil { - return err - } - for rid := range routingIds { - endpoint := e.loadBalancer.Endpoint([]byte(rid)) - exp, err = e.loadBalancer.Exporter(endpoint) + exporterSegregatedTraces := make(exporterTraces) + endpoints := make(map[*wrappedExporter]string) + for _, batch := range batches { + routingID, err := routingIdentifiersFromTraces(batch, e.routingKey) if err != nil { return err } - te, ok := exp.(exporter.Traces) - if !ok { - return fmt.Errorf("unable to export traces, unexpected exporter type: expected exporter.Traces but got %T", exp) + for rid := range routingID { + exp, endpoint, err := e.loadBalancer.exporterAndEndpoint([]byte(rid)) + if err != nil { + return err + } + + _, ok := exporterSegregatedTraces[exp] + if !ok { + exp.consumeWG.Add(1) + exporterSegregatedTraces[exp] = ptrace.NewTraces() + } + exporterSegregatedTraces[exp] = mergeTraces(exporterSegregatedTraces[exp], batch) + + endpoints[exp] = endpoint } + } + var errs error + + for exp, td := range exporterSegregatedTraces { start := time.Now() - err = te.ConsumeTraces(ctx, td) + err := exp.ConsumeTraces(ctx, td) + exp.consumeWG.Done() + errs = multierr.Append(errs, err) duration := time.Since(start) if err == nil { _ = stats.RecordWithTags( ctx, - []tag.Mutator{tag.Upsert(endpointTagKey, endpoint), successTrueMutator}, + []tag.Mutator{tag.Upsert(endpointTagKey, endpoints[exp]), successTrueMutator}, mBackendLatency.M(duration.Milliseconds())) } else { _ = stats.RecordWithTags( ctx, - []tag.Mutator{tag.Upsert(endpointTagKey, endpoint), successFalseMutator}, + []tag.Mutator{tag.Upsert(endpointTagKey, endpoints[exp]), successFalseMutator}, mBackendLatency.M(duration.Milliseconds())) } } - return err + + return errs } func routingIdentifiersFromTraces(td ptrace.Traces, key routingKey) (map[string]bool, error) { diff --git a/exporter/loadbalancingexporter/trace_exporter_test.go b/exporter/loadbalancingexporter/trace_exporter_test.go index ff0f606144ff..cb544d118291 100644 --- a/exporter/loadbalancingexporter/trace_exporter_test.go +++ b/exporter/loadbalancingexporter/trace_exporter_test.go @@ -120,7 +120,7 @@ func TestTracesExporterShutdown(t *testing.T) { } func TestConsumeTraces(t *testing.T) { - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockTracesExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), simpleConfig(), componentFactory) @@ -136,7 +136,7 @@ func TestConsumeTraces(t *testing.T) { lb.addMissingExporters(context.Background(), []string{"endpoint-1"}) lb.res = &mockResolver{ triggerCallbacks: true, - onResolve: func(ctx context.Context) ([]string, error) { + onResolve: func(_ context.Context) ([]string, error) { return []string{"endpoint-1"}, nil }, } @@ -155,8 +155,61 @@ func TestConsumeTraces(t *testing.T) { assert.Nil(t, res) } +// This test validates that exporter is can concurrently change the endpoints while consuming traces. +func TestConsumeTraces_ConcurrentResolverChange(t *testing.T) { + consumeStarted := make(chan struct{}) + consumeDone := make(chan struct{}) + + // imitate a slow exporter + te := &mockTracesExporter{Component: mockComponent{}} + te.ConsumeTracesFn = func(_ context.Context, _ ptrace.Traces) error { + close(consumeStarted) + time.Sleep(50 * time.Millisecond) + return te.consumeErr + } + componentFactory := func(_ context.Context, _ string) (component.Component, error) { + return te, nil + } + lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), simpleConfig(), componentFactory) + require.NotNil(t, lb) + require.NoError(t, err) + + p, err := newTracesExporter(exportertest.NewNopCreateSettings(), simpleConfig()) + require.NotNil(t, p) + require.NoError(t, err) + assert.Equal(t, p.routingKey, traceIDRouting) + + endpoints := []string{"endpoint-1"} + lb.res = &mockResolver{ + triggerCallbacks: true, + onResolve: func(_ context.Context) ([]string, error) { + return endpoints, nil + }, + } + p.loadBalancer = lb + + err = p.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) + defer func() { + require.NoError(t, p.Shutdown(context.Background())) + }() + + go func() { + assert.NoError(t, p.ConsumeTraces(context.Background(), simpleTraces())) + close(consumeDone) + }() + + // update endpoint while consuming traces + <-consumeStarted + endpoints = []string{"endpoint-2"} + endpoint, err := lb.res.resolve(context.Background()) + require.NoError(t, err) + require.Equal(t, endpoints, endpoint) + <-consumeDone +} + func TestConsumeTracesServiceBased(t *testing.T) { - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockTracesExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), serviceBasedRoutingConfig(), componentFactory) @@ -170,10 +223,11 @@ func TestConsumeTracesServiceBased(t *testing.T) { // pre-load an exporter here, so that we don't use the actual OTLP exporter lb.addMissingExporters(context.Background(), []string{"endpoint-1"}) + lb.addMissingExporters(context.Background(), []string{"endpoint-2"}) lb.res = &mockResolver{ triggerCallbacks: true, - onResolve: func(ctx context.Context) ([]string, error) { - return []string{"endpoint-1"}, nil + onResolve: func(_ context.Context) ([]string, error) { + return []string{"endpoint-1", "endpoint-2"}, nil }, } p.loadBalancer = lb @@ -221,7 +275,7 @@ func TestServiceBasedRoutingForSameTraceId(t *testing.T) { } func TestConsumeTracesExporterNoEndpoint(t *testing.T) { - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockTracesExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), simpleConfig(), componentFactory) @@ -234,7 +288,7 @@ func TestConsumeTracesExporterNoEndpoint(t *testing.T) { lb.res = &mockResolver{ triggerCallbacks: true, - onResolve: func(ctx context.Context) ([]string, error) { + onResolve: func(_ context.Context) ([]string, error) { return nil, nil }, } @@ -255,7 +309,7 @@ func TestConsumeTracesExporterNoEndpoint(t *testing.T) { } func TestConsumeTracesUnexpectedExporterType(t *testing.T) { - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), simpleConfig(), componentFactory) @@ -270,7 +324,7 @@ func TestConsumeTracesUnexpectedExporterType(t *testing.T) { lb.addMissingExporters(context.Background(), []string{"endpoint-1"}) lb.res = &mockResolver{ triggerCallbacks: true, - onResolve: func(ctx context.Context) ([]string, error) { + onResolve: func(_ context.Context) ([]string, error) { return []string{"endpoint-1"}, nil }, } @@ -309,18 +363,18 @@ func TestBuildExporterConfig(t *testing.T) { exporterCfg := buildExporterConfig(c.(*Config), "the-endpoint") // verify - grpcSettings := defaultCfg.GRPCClientSettings + grpcSettings := defaultCfg.ClientConfig grpcSettings.Endpoint = "the-endpoint" - assert.Equal(t, grpcSettings, exporterCfg.GRPCClientSettings) + assert.Equal(t, grpcSettings, exporterCfg.ClientConfig) assert.Equal(t, defaultCfg.TimeoutSettings, exporterCfg.TimeoutSettings) - assert.Equal(t, defaultCfg.QueueSettings, exporterCfg.QueueSettings) - assert.Equal(t, defaultCfg.RetrySettings, exporterCfg.RetrySettings) + assert.Equal(t, defaultCfg.QueueConfig, exporterCfg.QueueConfig) + assert.Equal(t, defaultCfg.RetryConfig, exporterCfg.RetryConfig) } func TestBatchWithTwoTraces(t *testing.T) { sink := new(consumertest.TracesSink) - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newMockTracesExporter(sink.ConsumeTraces), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), simpleConfig(), componentFactory) @@ -345,7 +399,8 @@ func TestBatchWithTwoTraces(t *testing.T) { // verify assert.NoError(t, err) - assert.Len(t, sink.AllTraces(), 2) + assert.Len(t, sink.AllTraces(), 1) + assert.Equal(t, sink.AllTraces()[0].SpanCount(), 2) } func TestNoTracesInBatch(t *testing.T) { @@ -447,7 +502,7 @@ func TestRollingUpdatesWhenConsumeTraces(t *testing.T) { DNS: &DNSResolver{Hostname: "service-1", Port: ""}, }, } - componentFactory := func(ctx context.Context, endpoint string) (component.Component, error) { + componentFactory := func(_ context.Context, _ string) (component.Component, error) { return newNopMockTracesExporter(), nil } lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), cfg, componentFactory) @@ -463,19 +518,17 @@ func TestRollingUpdatesWhenConsumeTraces(t *testing.T) { counter1 := &atomic.Int64{} counter2 := &atomic.Int64{} - defaultExporters := map[string]component.Component{ - "127.0.0.1:4317": newMockTracesExporter(func(ctx context.Context, td ptrace.Traces) error { + defaultExporters := map[string]*wrappedExporter{ + "127.0.0.1:4317": newWrappedExporter(newMockTracesExporter(func(_ context.Context, _ ptrace.Traces) error { counter1.Add(1) // simulate an unreachable backend time.Sleep(10 * time.Second) return nil - }, - ), - "127.0.0.2:4317": newMockTracesExporter(func(ctx context.Context, td ptrace.Traces) error { + })), + "127.0.0.2:4317": newWrappedExporter(newMockTracesExporter(func(_ context.Context, _ ptrace.Traces) error { counter2.Add(1) return nil - }, - ), + })), } // test @@ -488,7 +541,7 @@ func TestRollingUpdatesWhenConsumeTraces(t *testing.T) { lb.updateLock.Lock() lb.exporters = defaultExporters lb.updateLock.Unlock() - lb.res.onChange(func(endpoints []string) { + lb.res.onChange(func(_ []string) { lb.updateLock.Lock() lb.exporters = defaultExporters lb.updateLock.Unlock() @@ -532,6 +585,89 @@ func TestRollingUpdatesWhenConsumeTraces(t *testing.T) { require.Greater(t, counter2.Load(), int64(0)) } +func benchConsumeTraces(b *testing.B, endpointsCount int, tracesCount int) { + sink := new(consumertest.TracesSink) + componentFactory := func(_ context.Context, _ string) (component.Component, error) { + return newMockTracesExporter(sink.ConsumeTraces), nil + } + + endpoints := []string{} + for i := 0; i < endpointsCount; i++ { + endpoints = append(endpoints, fmt.Sprintf("endpoint-%d", i)) + } + + config := &Config{ + Resolver: ResolverSettings{ + Static: &StaticResolver{Hostnames: endpoints}, + }, + } + + lb, err := newLoadBalancer(exportertest.NewNopCreateSettings(), config, componentFactory) + require.NotNil(b, lb) + require.NoError(b, err) + + p, err := newTracesExporter(exportertest.NewNopCreateSettings(), config) + require.NotNil(b, p) + require.NoError(b, err) + + p.loadBalancer = lb + + err = p.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(b, err) + + trace1 := ptrace.NewTraces() + trace2 := ptrace.NewTraces() + for i := 0; i < endpointsCount; i++ { + for j := 0; j < tracesCount/endpointsCount; j++ { + appendSimpleTraceWithID(trace2.ResourceSpans().AppendEmpty(), [16]byte{1, 2, 6, byte(i)}) + } + } + td := mergeTraces(trace1, trace2) + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + err = p.ConsumeTraces(context.Background(), td) + require.NoError(b, err) + } + + b.StopTimer() + err = p.Shutdown(context.Background()) + require.NoError(b, err) +} + +func BenchmarkConsumeTraces_1E100T(b *testing.B) { + benchConsumeTraces(b, 1, 100) +} + +func BenchmarkConsumeTraces_1E1000T(b *testing.B) { + benchConsumeTraces(b, 1, 1000) +} + +func BenchmarkConsumeTraces_5E100T(b *testing.B) { + benchConsumeTraces(b, 5, 100) +} + +func BenchmarkConsumeTraces_5E500T(b *testing.B) { + benchConsumeTraces(b, 5, 500) +} + +func BenchmarkConsumeTraces_5E1000T(b *testing.B) { + benchConsumeTraces(b, 5, 1000) +} + +func BenchmarkConsumeTraces_10E100T(b *testing.B) { + benchConsumeTraces(b, 10, 100) +} + +func BenchmarkConsumeTraces_10E500T(b *testing.B) { + benchConsumeTraces(b, 10, 500) +} + +func BenchmarkConsumeTraces_10E1000T(b *testing.B) { + benchConsumeTraces(b, 10, 1000) +} + func randomTraces() ptrace.Traces { v1 := uint8(rand.Intn(256)) v2 := uint8(rand.Intn(256)) @@ -551,9 +687,19 @@ func simpleTraces() ptrace.Traces { func simpleTracesWithServiceName() ptrace.Traces { traces := ptrace.NewTraces() traces.ResourceSpans().EnsureCapacity(1) + rspans := traces.ResourceSpans().AppendEmpty() rspans.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-1") rspans.ScopeSpans().AppendEmpty().Spans().AppendEmpty().SetTraceID([16]byte{1, 2, 3, 4}) + + bspans := traces.ResourceSpans().AppendEmpty() + bspans.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-2") + bspans.ScopeSpans().AppendEmpty().Spans().AppendEmpty().SetTraceID([16]byte{1, 2, 3, 4}) + + aspans := traces.ResourceSpans().AppendEmpty() + aspans.Resource().Attributes().PutStr(conventions.AttributeServiceName, "service-name-3") + aspans.ScopeSpans().AppendEmpty().Spans().AppendEmpty().SetTraceID([16]byte{1, 2, 3, 5}) + return traces } @@ -584,7 +730,7 @@ func simpleConfig() *Config { func serviceBasedRoutingConfig() *Config { return &Config{ Resolver: ResolverSettings{ - Static: &StaticResolver{Hostnames: []string{"endpoint-1"}}, + Static: &StaticResolver{Hostnames: []string{"endpoint-1", "endpoint-2"}}, }, RoutingKey: "service", } @@ -593,6 +739,7 @@ func serviceBasedRoutingConfig() *Config { type mockTracesExporter struct { component.Component ConsumeTracesFn func(ctx context.Context, td ptrace.Traces) error + consumeErr error } func newMockTracesExporter(consumeTracesFn func(ctx context.Context, td ptrace.Traces) error) exporter.Traces { @@ -603,12 +750,12 @@ func newMockTracesExporter(consumeTracesFn func(ctx context.Context, td ptrace.T } func newNopMockTracesExporter() exporter.Traces { - return &mockTracesExporter{ - Component: mockComponent{}, - ConsumeTracesFn: func(ctx context.Context, td ptrace.Traces) error { - return nil - }, - } + return &mockTracesExporter{Component: mockComponent{}} +} + +func (e *mockTracesExporter) Shutdown(context.Context) error { + e.consumeErr = errors.New("exporter is shut down") + return nil } func (e *mockTracesExporter) Capabilities() consumer.Capabilities { @@ -617,7 +764,7 @@ func (e *mockTracesExporter) Capabilities() consumer.Capabilities { func (e *mockTracesExporter) ConsumeTraces(ctx context.Context, td ptrace.Traces) error { if e.ConsumeTracesFn == nil { - return nil + return e.consumeErr } return e.ConsumeTracesFn(ctx, td) } diff --git a/exporter/loadbalancingexporter/wrapped_exporter.go b/exporter/loadbalancingexporter/wrapped_exporter.go new file mode 100644 index 000000000000..cb2491fc23ff --- /dev/null +++ b/exporter/loadbalancingexporter/wrapped_exporter.go @@ -0,0 +1,56 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package loadbalancingexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter" + +import ( + "context" + "fmt" + "sync" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +// wrappedExporter is an exporter that waits for the data processing to complete before shutting down. +// consumeWG has to be incremented explicitly by the consumer of the wrapped exporter. +type wrappedExporter struct { + component.Component + consumeWG sync.WaitGroup +} + +func newWrappedExporter(exp component.Component) *wrappedExporter { + return &wrappedExporter{Component: exp} +} + +func (we *wrappedExporter) Shutdown(ctx context.Context) error { + we.consumeWG.Wait() + return we.Component.Shutdown(ctx) +} + +func (we *wrappedExporter) ConsumeTraces(ctx context.Context, td ptrace.Traces) error { + te, ok := we.Component.(exporter.Traces) + if !ok { + return fmt.Errorf("unable to export traces, unexpected exporter type: expected exporter.Traces but got %T", we.Component) + } + return te.ConsumeTraces(ctx, td) +} + +func (we *wrappedExporter) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error { + me, ok := we.Component.(exporter.Metrics) + if !ok { + return fmt.Errorf("unable to export metrics, unexpected exporter type: expected exporter.Metrics but got %T", we.Component) + } + return me.ConsumeMetrics(ctx, md) +} + +func (we *wrappedExporter) ConsumeLogs(ctx context.Context, ld plog.Logs) error { + le, ok := we.Component.(exporter.Logs) + if !ok { + return fmt.Errorf("unable to export logs, unexpected exporter type: expected exporter.Logs but got %T", we.Component) + } + return le.ConsumeLogs(ctx, ld) +} diff --git a/exporter/logicmonitorexporter/README.md b/exporter/logicmonitorexporter/README.md index 429aeef4296b..f46d814434a8 100644 --- a/exporter/logicmonitorexporter/README.md +++ b/exporter/logicmonitorexporter/README.md @@ -52,3 +52,21 @@ Set the environment variable `LOGICMONITOR_BEARER_TOKEN` headers: Authorization: Bearer ``` +## Resource Mapping for Logs + +As per the LogicMonitor's [Log Ingestion documentation](https://www.logicmonitor.com/support/lm-logs/sending-logs-to-the-lm-logs-ingestion-api), if more than one resource property exists, only the first property will be mapped. In case of OTLP logs, there can be multiple resource attributes and its order also cannot be guaranteed. + +Recently we have made the resource mapping for logs more flexible. With that, any of the resource attributes present in the log matches can be considered for resource mapping. +But, this is not the default behaviour. In order to make the resource mapping flexible, you can configure the `resource_mapping_op` in the LogicMonitor's exporter. + +```yaml + exporters: + logicmonitor: + endpoint: https://company.logicmonitor.com/rest + headers: + Authorization: Bearer + logs: + resource_mapping_op: "OR" +``` + +The value for `resource_mapping_op` can be `AND` or `OR`. The values are case-insensitive. \ No newline at end of file diff --git a/exporter/logicmonitorexporter/config.go b/exporter/logicmonitorexporter/config.go index c1675fafed70..f5625988288d 100644 --- a/exporter/logicmonitorexporter/config.go +++ b/exporter/logicmonitorexporter/config.go @@ -6,9 +6,11 @@ package logicmonitorexporter // import "github.com/open-telemetry/opentelemetry- import ( "fmt" "net/url" + "strings" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry" @@ -16,14 +18,16 @@ import ( // Config defines configuration for LogicMonitor exporter. type Config struct { - confighttp.HTTPClientSettings `mapstructure:",squash"` + confighttp.ClientConfig `mapstructure:",squash"` exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` ResourceToTelemetrySettings resourcetotelemetry.Settings `mapstructure:"resource_to_telemetry_conversion"` // ApiToken of Logicmonitor Platform APIToken APIToken `mapstructure:"api_token"` + // Logs defines the Logs exporter specific configuration + Logs LogsConfig `mapstructure:"logs"` } type APIToken struct { @@ -31,14 +35,38 @@ type APIToken struct { AccessKey configopaque.String `mapstructure:"access_key"` } +type MappingOperation string + +const ( + And MappingOperation = "and" + Or MappingOperation = "or" +) + +func (mop *MappingOperation) UnmarshalText(in []byte) error { + switch op := MappingOperation(strings.ToLower(string(in))); op { + case And, Or: + *mop = op + return nil + + default: + return fmt.Errorf("unsupported mapping operation %q", op) + } +} + +// LogsConfig defines the logs exporter specific configuration options +type LogsConfig struct { + // Operation to be performed for resource mapping. Valid values are `and`, `or`. + ResourceMappingOperation MappingOperation `mapstructure:"resource_mapping_op"` +} + func (c *Config) Validate() error { if c.Endpoint == "" { - return fmt.Errorf("Endpoint should not be empty") + return fmt.Errorf("endpoint should not be empty") } u, err := url.Parse(c.Endpoint) if err != nil || u.Scheme == "" || u.Host == "" { - return fmt.Errorf("Endpoint must be valid") + return fmt.Errorf("endpoint must be valid") } return nil } diff --git a/exporter/logicmonitorexporter/config_test.go b/exporter/logicmonitorexporter/config_test.go index 549711a7ad32..2e9cf01edca7 100644 --- a/exporter/logicmonitorexporter/config_test.go +++ b/exporter/logicmonitorexporter/config_test.go @@ -13,6 +13,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -29,37 +31,37 @@ func TestConfigValidation(t *testing.T) { { name: "empty endpoint", cfg: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "", }, }, wantErr: true, - errorMessage: "Endpoint should not be empty", + errorMessage: "endpoint should not be empty", }, { name: "missing http scheme", cfg: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "test.com/dummy", }, }, wantErr: true, - errorMessage: "Endpoint must be valid", + errorMessage: "endpoint must be valid", }, { name: "invalid endpoint format", cfg: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "invalid.com@#$%", }, }, wantErr: true, - errorMessage: "Endpoint must be valid", + errorMessage: "endpoint must be valid", }, { name: "valid config", cfg: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "http://validurl.com/rest", }, }, @@ -100,9 +102,9 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "apitoken"), expected: &Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "https://company.logicmonitor.com/rest", }, APIToken: APIToken{ @@ -114,9 +116,9 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "bearertoken"), expected: &Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "https://company.logicmonitor.com/rest", Headers: map[string]configopaque.String{ "Authorization": "Bearer ", @@ -124,6 +126,22 @@ func TestLoadConfig(t *testing.T) { }, }, }, + { + id: component.NewIDWithName(metadata.Type, "resource-mapping-op"), + expected: &Config{ + BackOffConfig: configretry.NewDefaultBackOffConfig(), + QueueSettings: exporterhelper.NewDefaultQueueSettings(), + ClientConfig: confighttp.ClientConfig{ + Endpoint: "https://company.logicmonitor.com/rest", + Headers: map[string]configopaque.String{ + "Authorization": "Bearer ", + }, + }, + Logs: LogsConfig{ + ResourceMappingOperation: "or", + }, + }, + }, } for _, tt := range tests { @@ -140,3 +158,35 @@ func TestLoadConfig(t *testing.T) { }) } } + +func TestUnmarshal(t *testing.T) { + tests := []struct { + name string + configMap *confmap.Conf + cfg *Config + err string + }{ + { + name: "invalid resource mapping operation", + configMap: confmap.NewFromStringMap(map[string]any{ + "logs": map[string]any{ + "resource_mapping_op": "invalid_op", + }, + }), + err: "1 error(s) decoding:\n\n* error decoding 'logs.resource_mapping_op': unsupported mapping operation \"invalid_op\"", + }, + } + + f := NewFactory() + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + cfg := f.CreateDefaultConfig().(*Config) + err := component.UnmarshalConfig(tt.configMap, cfg) + if err != nil || tt.err != "" { + assert.EqualError(t, err, tt.err) + } else { + assert.Equal(t, tt.cfg, cfg) + } + }) + } +} diff --git a/exporter/logicmonitorexporter/factory.go b/exporter/logicmonitorexporter/factory.go index efe75d72d425..e5c6e9c3f2db 100644 --- a/exporter/logicmonitorexporter/factory.go +++ b/exporter/logicmonitorexporter/factory.go @@ -9,6 +9,7 @@ import ( "context" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -28,7 +29,7 @@ func NewFactory() exporter.Factory { func createDefaultConfig() component.Config { return &Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), } } @@ -44,7 +45,8 @@ func createLogsExporter(ctx context.Context, set exporter.CreateSettings, cfg co lmLogExp.PushLogData, exporterhelper.WithStart(lmLogExp.start), exporterhelper.WithQueue(c.QueueSettings), - exporterhelper.WithRetry(c.RetrySettings), + exporterhelper.WithRetry(c.BackOffConfig), + exporterhelper.WithShutdown(lmLogExp.shutdown), ) } @@ -59,6 +61,8 @@ func createTracesExporter(ctx context.Context, set exporter.CreateSettings, cfg lmTraceExp.PushTraceData, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), exporterhelper.WithStart(lmTraceExp.start), - exporterhelper.WithRetry(c.RetrySettings), - exporterhelper.WithQueue(c.QueueSettings)) + exporterhelper.WithRetry(c.BackOffConfig), + exporterhelper.WithQueue(c.QueueSettings), + exporterhelper.WithShutdown(lmTraceExp.shutdown), + ) } diff --git a/exporter/logicmonitorexporter/factory_test.go b/exporter/logicmonitorexporter/factory_test.go index b5e7af3a2778..4f03d0b61ad8 100644 --- a/exporter/logicmonitorexporter/factory_test.go +++ b/exporter/logicmonitorexporter/factory_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/exportertest" ) @@ -20,7 +21,7 @@ func TestCreateDefaultConfig(t *testing.T) { cfg := factory.CreateDefaultConfig() assert.Equal(t, &Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), }, cfg, "failed to create default config") @@ -37,7 +38,7 @@ func TestCreateLogsExporter(t *testing.T) { { name: "valid config", config: Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "http://example.logicmonitor.com/rest", }, }, @@ -77,7 +78,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "valid config", config: Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "http://example.logicmonitor.com/rest", }, }, diff --git a/exporter/logicmonitorexporter/generated_component_test.go b/exporter/logicmonitorexporter/generated_component_test.go new file mode 100644 index 000000000000..08361ca97790 --- /dev/null +++ b/exporter/logicmonitorexporter/generated_component_test.go @@ -0,0 +1,133 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package logicmonitorexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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 exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/logicmonitorexporter/go.mod b/exporter/logicmonitorexporter/go.mod index 5553c740cce4..0515dbb8e093 100644 --- a/exporter/logicmonitorexporter/go.mod +++ b/exporter/logicmonitorexporter/go.mod @@ -1,68 +1,78 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter -go 1.20 +go 1.21 require ( - github.com/logicmonitor/lm-data-sdk-go v1.0.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/logicmonitor/lm-data-sdk-go v1.3.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/pdata/testdata v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/logicmonitorexporter/go.sum b/exporter/logicmonitorexporter/go.sum index 10f02b02690a..0640938b0a4e 100644 --- a/exporter/logicmonitorexporter/go.sum +++ b/exporter/logicmonitorexporter/go.sum @@ -1,86 +1,58 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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.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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/logicmonitor/lm-data-sdk-go v1.0.0 h1:2eiz7kq3G0rLc/hqVpsk1c2B0PMjp6nLhHzc5SmTn80= -github.com/logicmonitor/lm-data-sdk-go v1.0.0/go.mod h1:XvYS9xp/0WrPpc6ge2O3ZPn2dgbKO46PnfCfbKaeUu8= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/logicmonitor/lm-data-sdk-go v1.3.0 h1:Obrexk35IKupFQezngkesR/kMfHQdAEUR1zYbJrOrzg= +github.com/logicmonitor/lm-data-sdk-go v1.3.0/go.mod h1:nIHr4uOPfg6AM7mG1rewg3L4O3rfge34o7UYB7joBM4= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -90,119 +62,106 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -210,38 +169,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/logicmonitorexporter/internal/logs/package_test.go b/exporter/logicmonitorexporter/internal/logs/package_test.go new file mode 100644 index 000000000000..1158f120b289 --- /dev/null +++ b/exporter/logicmonitorexporter/internal/logs/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package logs + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/logicmonitorexporter/internal/logs/sender.go b/exporter/logicmonitorexporter/internal/logs/sender.go index e372be7614fc..426ec04d6898 100644 --- a/exporter/logicmonitorexporter/internal/logs/sender.go +++ b/exporter/logicmonitorexporter/internal/logs/sender.go @@ -11,7 +11,6 @@ import ( lmsdklogs "github.com/logicmonitor/lm-data-sdk-go/api/logs" "github.com/logicmonitor/lm-data-sdk-go/model" - "github.com/logicmonitor/lm-data-sdk-go/utils" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" @@ -23,15 +22,8 @@ type Sender struct { } // NewSender creates a new Sender -func NewSender(ctx context.Context, endpoint string, client *http.Client, authParams utils.AuthParams, logger *zap.Logger) (*Sender, error) { - options := []lmsdklogs.Option{ - lmsdklogs.WithLogBatchingDisabled(), - lmsdklogs.WithAuthentication(authParams), - lmsdklogs.WithHTTPClient(client), - lmsdklogs.WithEndpoint(endpoint), - } - - logIngestClient, err := lmsdklogs.NewLMLogIngest(ctx, options...) +func NewSender(ctx context.Context, logger *zap.Logger, opts ...lmsdklogs.Option) (*Sender, error) { + logIngestClient, err := lmsdklogs.NewLMLogIngest(ctx, opts...) if err != nil { return nil, fmt.Errorf("failed to create logIngestClient: %w", err) } @@ -44,27 +36,23 @@ func NewSender(ctx context.Context, endpoint string, client *http.Client, authPa func (s *Sender) SendLogs(ctx context.Context, payload []model.LogInput) error { ingestResponse, err := s.logIngestClient.SendLogs(ctx, payload) if err != nil { - return consumererror.NewPermanent(err) - } - if ingestResponse != nil { - - if ingestResponse.Success { - return nil - } - if ingestResponse.RetryAfter > 0 { - return exporterhelper.NewThrottleRetry(ingestResponse.Error, time.Duration(ingestResponse.RetryAfter)*time.Second) - } - if ingestResponse.StatusCode == http.StatusMultiStatus { - for _, status := range ingestResponse.MultiStatus { - if isPermanentClientFailure(int(status.Code)) { - return consumererror.NewPermanent(fmt.Errorf("permanent failure error %s, complete error log %w", status.Error, ingestResponse.Error)) + if ingestResponse != nil { + if ingestResponse.RetryAfter > 0 { + return exporterhelper.NewThrottleRetry(ingestResponse.Error, time.Duration(ingestResponse.RetryAfter)*time.Second) + } + if ingestResponse.StatusCode == http.StatusMultiStatus { + for _, status := range ingestResponse.MultiStatus { + if isPermanentClientFailure(int(status.Code)) { + return consumererror.NewPermanent(fmt.Errorf("permanent failure error %s, complete error log %w", status.Error, ingestResponse.Error)) + } } } + if isPermanentClientFailure(ingestResponse.StatusCode) { + return consumererror.NewPermanent(ingestResponse.Error) + } + return ingestResponse.Error } - if isPermanentClientFailure(ingestResponse.StatusCode) { - return consumererror.NewPermanent(ingestResponse.Error) - } - return ingestResponse.Error + return consumererror.NewPermanent(err) } return nil } diff --git a/exporter/logicmonitorexporter/internal/logs/sender_test.go b/exporter/logicmonitorexporter/internal/logs/sender_test.go index 67f7355a6355..03624995987a 100644 --- a/exporter/logicmonitorexporter/internal/logs/sender_test.go +++ b/exporter/logicmonitorexporter/internal/logs/sender_test.go @@ -21,13 +21,9 @@ import ( ) func TestSendLogs(t *testing.T) { - authParams := utils.AuthParams{ - AccessID: "testId", - AccessKey: "testKey", - BearerToken: "testToken", - } + t.Run("should not return error", func(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { response := lmsdklogs.LMLogIngestResponse{ Success: true, Message: "Accepted", @@ -39,7 +35,7 @@ func TestSendLogs(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) - sender, err := NewSender(ctx, ts.URL, ts.Client(), authParams, zap.NewNop()) + sender, err := NewSender(ctx, zap.NewNop(), buildLogIngestTestOpts(ts.URL, ts.Client())...) assert.NoError(t, err) logInput := translator.ConvertToLMLogInput("test msg", utils.NewTimestampFromTime(time.Now()).String(), map[string]any{"system.hostname": "test"}, map[string]any{"cloud.provider": "aws"}) @@ -49,7 +45,7 @@ func TestSendLogs(t *testing.T) { }) t.Run("should return permanent failure error", func(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { response := lmsdklogs.LMLogIngestResponse{ Success: false, Message: "The request is invalid. For example, it may be missing headers or the request body is incorrectly formatted.", @@ -61,7 +57,7 @@ func TestSendLogs(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) - sender, err := NewSender(ctx, ts.URL, ts.Client(), authParams, zap.NewNop()) + sender, err := NewSender(ctx, zap.NewNop(), buildLogIngestTestOpts(ts.URL, ts.Client())...) assert.NoError(t, err) logInput := translator.ConvertToLMLogInput("test msg", utils.NewTimestampFromTime(time.Now()).String(), map[string]any{"system.hostname": "test"}, map[string]any{"cloud.provider": "aws"}) @@ -72,7 +68,7 @@ func TestSendLogs(t *testing.T) { }) t.Run("should not return permanent failure error", func(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { response := lmsdklogs.LMLogIngestResponse{ Success: false, Message: "A dependency failed to respond within a reasonable time.", @@ -84,7 +80,7 @@ func TestSendLogs(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) - sender, err := NewSender(ctx, ts.URL, ts.Client(), authParams, zap.NewNop()) + sender, err := NewSender(ctx, zap.NewNop(), buildLogIngestTestOpts(ts.URL, ts.Client())...) assert.NoError(t, err) logInput := translator.ConvertToLMLogInput("test msg", utils.NewTimestampFromTime(time.Now()).String(), map[string]any{"system.hostname": "test"}, map[string]any{"cloud.provider": "aws"}) @@ -94,3 +90,19 @@ func TestSendLogs(t *testing.T) { assert.Equal(t, false, consumererror.IsPermanent(err)) }) } + +func buildLogIngestTestOpts(endpoint string, client *http.Client) []lmsdklogs.Option { + authParams := utils.AuthParams{ + AccessID: "testId", + AccessKey: "testKey", + BearerToken: "testToken", + } + + opts := []lmsdklogs.Option{ + lmsdklogs.WithLogBatchingDisabled(), + lmsdklogs.WithAuthentication(authParams), + lmsdklogs.WithHTTPClient(client), + lmsdklogs.WithEndpoint(endpoint), + } + return opts +} diff --git a/exporter/logicmonitorexporter/internal/metadata/generated_status.go b/exporter/logicmonitorexporter/internal/metadata/generated_status.go index 0ebb1cbf0f50..08e3f10aaabf 100644 --- a/exporter/logicmonitorexporter/internal/metadata/generated_status.go +++ b/exporter/logicmonitorexporter/internal/metadata/generated_status.go @@ -4,10 +4,23 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("logicmonitor") ) const ( - Type = "logicmonitor" TracesStability = component.StabilityLevelAlpha LogsStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/logicmonitor") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/logicmonitor") +} diff --git a/exporter/logicmonitorexporter/internal/traces/package_test.go b/exporter/logicmonitorexporter/internal/traces/package_test.go new file mode 100644 index 000000000000..d1398ba09b9b --- /dev/null +++ b/exporter/logicmonitorexporter/internal/traces/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package traces + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/logicmonitorexporter/internal/traces/sender.go b/exporter/logicmonitorexporter/internal/traces/sender.go index b7ecc4cbefe2..208ca69a4b13 100644 --- a/exporter/logicmonitorexporter/internal/traces/sender.go +++ b/exporter/logicmonitorexporter/internal/traces/sender.go @@ -44,27 +44,23 @@ func NewSender(ctx context.Context, endpoint string, client *http.Client, authPa func (s *Sender) SendTraces(ctx context.Context, td ptrace.Traces) error { ingestResponse, err := s.traceIngestClient.SendTraces(ctx, td) if err != nil { - return consumererror.NewPermanent(err) - } - if ingestResponse != nil { - - if ingestResponse.Success { - return nil - } - if ingestResponse.RetryAfter > 0 { - return exporterhelper.NewThrottleRetry(ingestResponse.Error, time.Duration(ingestResponse.RetryAfter)*time.Second) - } - if ingestResponse.StatusCode == http.StatusMultiStatus { - for _, status := range ingestResponse.MultiStatus { - if isPermanentClientFailure(int(status.Code)) { - return consumererror.NewPermanent(fmt.Errorf("permanent failure error %s, complete error log %w", status.Error, ingestResponse.Error)) + if ingestResponse != nil { + if ingestResponse.RetryAfter > 0 { + return exporterhelper.NewThrottleRetry(ingestResponse.Error, time.Duration(ingestResponse.RetryAfter)*time.Second) + } + if ingestResponse.StatusCode == http.StatusMultiStatus { + for _, status := range ingestResponse.MultiStatus { + if isPermanentClientFailure(int(status.Code)) { + return consumererror.NewPermanent(fmt.Errorf("permanent failure error %s, complete error log %w", status.Error, ingestResponse.Error)) + } } } + if isPermanentClientFailure(ingestResponse.StatusCode) { + return consumererror.NewPermanent(ingestResponse.Error) + } + return ingestResponse.Error } - if isPermanentClientFailure(ingestResponse.StatusCode) { - return consumererror.NewPermanent(ingestResponse.Error) - } - return ingestResponse.Error + return consumererror.NewPermanent(err) } return nil } diff --git a/exporter/logicmonitorexporter/internal/traces/sender_test.go b/exporter/logicmonitorexporter/internal/traces/sender_test.go index 59806dbead6a..c9b07aafdf5f 100644 --- a/exporter/logicmonitorexporter/internal/traces/sender_test.go +++ b/exporter/logicmonitorexporter/internal/traces/sender_test.go @@ -14,9 +14,8 @@ import ( "github.com/logicmonitor/lm-data-sdk-go/utils" "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/consumer/consumererror" + "go.opentelemetry.io/collector/pdata/testdata" "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" ) func TestSendTraces(t *testing.T) { @@ -26,7 +25,7 @@ func TestSendTraces(t *testing.T) { BearerToken: "testToken", } t.Run("should not return error", func(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { response := lmsdktraces.LMTraceIngestResponse{ Success: true, Message: "Accepted", @@ -41,13 +40,13 @@ func TestSendTraces(t *testing.T) { sender, err := NewSender(ctx, ts.URL, ts.Client(), authParams, zap.NewNop()) assert.NoError(t, err) - err = sender.SendTraces(ctx, testdata.GenerateTracesOneSpan()) + err = sender.SendTraces(ctx, testdata.GenerateTraces(1)) cancel() assert.NoError(t, err) }) t.Run("should return permanent failure error", func(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { response := lmsdktraces.LMTraceIngestResponse{ Success: false, Message: "The request is invalid. For example, it may be missing headers or the request body is incorrectly formatted.", @@ -62,14 +61,14 @@ func TestSendTraces(t *testing.T) { sender, err := NewSender(ctx, ts.URL, ts.Client(), authParams, zap.NewNop()) assert.NoError(t, err) - err = sender.SendTraces(ctx, testdata.GenerateTracesOneSpan()) + err = sender.SendTraces(ctx, testdata.GenerateTraces(1)) cancel() assert.Error(t, err) assert.Equal(t, true, consumererror.IsPermanent(err)) }) t.Run("should not return permanent failure error", func(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { response := lmsdktraces.LMTraceIngestResponse{ Success: false, Message: "A dependency failed to respond within a reasonable time.", @@ -84,7 +83,7 @@ func TestSendTraces(t *testing.T) { sender, err := NewSender(ctx, ts.URL, ts.Client(), authParams, zap.NewNop()) assert.NoError(t, err) - err = sender.SendTraces(ctx, testdata.GenerateTracesOneSpan()) + err = sender.SendTraces(ctx, testdata.GenerateTraces(1)) cancel() assert.Error(t, err) assert.Equal(t, false, consumererror.IsPermanent(err)) diff --git a/exporter/logicmonitorexporter/logs_exporter.go b/exporter/logicmonitorexporter/logs_exporter.go index d79b500d8c95..5e25f40ad9d8 100644 --- a/exporter/logicmonitorexporter/logs_exporter.go +++ b/exporter/logicmonitorexporter/logs_exporter.go @@ -6,8 +6,10 @@ package logicmonitorexporter // import "github.com/open-telemetry/opentelemetry- import ( "context" "fmt" + "net/http" "time" + lmsdklogs "github.com/logicmonitor/lm-data-sdk-go/api/logs" "github.com/logicmonitor/lm-data-sdk-go/model" "github.com/logicmonitor/lm-data-sdk-go/utils" "github.com/logicmonitor/lm-data-sdk-go/utils/translator" @@ -30,6 +32,7 @@ type logExporter struct { config *Config sender *logs.Sender settings component.TelemetrySettings + cancel context.CancelFunc } // Create new logicmonitor logs exporter @@ -43,18 +46,15 @@ func newLogsExporter(_ context.Context, cfg component.Config, set exporter.Creat } func (e *logExporter) start(ctx context.Context, host component.Host) error { - client, err := e.config.HTTPClientSettings.ToClient(host, e.settings) + client, err := e.config.ClientConfig.ToClientContext(ctx, host, e.settings) if err != nil { return fmt.Errorf("failed to create http client: %w", err) } - authParams := utils.AuthParams{ - AccessID: e.config.APIToken.AccessID, - AccessKey: string(e.config.APIToken.AccessKey), - BearerToken: string(e.config.Headers["Authorization"]), - } + opts := buildLogIngestOpts(e.config, client) - e.sender, err = logs.NewSender(ctx, e.config.Endpoint, client, authParams, e.settings.Logger) + ctx, e.cancel = context.WithCancel(ctx) + e.sender, err = logs.NewSender(ctx, e.settings.Logger, opts...) if err != nil { return err } @@ -97,6 +97,35 @@ func (e *logExporter) PushLogData(ctx context.Context, lg plog.Logs) error { return e.sender.SendLogs(ctx, payload) } +func (e *logExporter) shutdown(_ context.Context) error { + if e.cancel != nil { + e.cancel() + } + + return nil +} + +func buildLogIngestOpts(config *Config, client *http.Client) []lmsdklogs.Option { + authParams := utils.AuthParams{ + AccessID: config.APIToken.AccessID, + AccessKey: string(config.APIToken.AccessKey), + BearerToken: string(config.Headers["Authorization"]), + } + + opts := []lmsdklogs.Option{ + lmsdklogs.WithLogBatchingDisabled(), + lmsdklogs.WithAuthentication(authParams), + lmsdklogs.WithHTTPClient(client), + lmsdklogs.WithEndpoint(config.Endpoint), + } + + if config.Logs.ResourceMappingOperation != "" { + opts = append(opts, lmsdklogs.WithResourceMappingOperation(string(config.Logs.ResourceMappingOperation))) + } + + return opts +} + func timestampFromLogRecord(lr plog.LogRecord) pcommon.Timestamp { if lr.Timestamp() != 0 { return lr.Timestamp() diff --git a/exporter/logicmonitorexporter/logs_exporter_test.go b/exporter/logicmonitorexporter/logs_exporter_test.go index cab32946ffa8..2fbace5657cb 100644 --- a/exporter/logicmonitorexporter/logs_exporter_test.go +++ b/exporter/logicmonitorexporter/logs_exporter_test.go @@ -38,7 +38,7 @@ func Test_NewLogsExporter(t *testing.T) { logger *zap.Logger }{ config: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "http://example.logicmonitor.com/rest", }, APIToken: APIToken{AccessID: "testid", AccessKey: "testkey"}, @@ -57,7 +57,7 @@ func Test_NewLogsExporter(t *testing.T) { } func TestPushLogData(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { response := lmsdklogs.LMLogIngestResponse{ Success: true, Message: "Accepted", @@ -68,7 +68,7 @@ func TestPushLogData(t *testing.T) { defer ts.Close() cfg := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: ts.URL, }, APIToken: APIToken{AccessID: "testid", AccessKey: "testkey"}, @@ -110,6 +110,7 @@ func TestPushLogData(t *testing.T) { exp := newLogsExporter(test.args.ctx, test.fields.config, set) require.NoError(t, exp.start(test.args.ctx, componenttest.NewNopHost())) + defer func() { require.NoError(t, exp.shutdown(test.args.ctx)) }() err := exp.PushLogData(test.args.ctx, test.args.lg) assert.NoError(t, err) }) diff --git a/exporter/logicmonitorexporter/metadata.yaml b/exporter/logicmonitorexporter/metadata.yaml index b1c3f73a59ba..3934ecea1bed 100644 --- a/exporter/logicmonitorexporter/metadata.yaml +++ b/exporter/logicmonitorexporter/metadata.yaml @@ -1,4 +1,5 @@ type: logicmonitor +scope_name: otelcol/logicmonitor status: class: exporter @@ -7,3 +8,11 @@ status: distributions: [contrib] codeowners: active: [bogdandrutu, khyatigandhi6, avadhut123pisal] + +tests: + config: + endpoint: https://company.logicmonitor.com/rest + api_token: + access_id: "accessid" + access_key: "accesskey" + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/logicmonitorexporter/package_test.go b/exporter/logicmonitorexporter/package_test.go new file mode 100644 index 000000000000..babe01d0f205 --- /dev/null +++ b/exporter/logicmonitorexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package logicmonitorexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/logicmonitorexporter/testdata/config.yaml b/exporter/logicmonitorexporter/testdata/config.yaml index fc6f2c4379dc..9dfeb246f3bc 100644 --- a/exporter/logicmonitorexporter/testdata/config.yaml +++ b/exporter/logicmonitorexporter/testdata/config.yaml @@ -13,3 +13,11 @@ logicmonitor/bearertoken: endpoint: https://company.logicmonitor.com/rest headers: Authorization: Bearer +# The following entry demonstrates how to set resource mapping operation (AND / OR). +# The values are case-insensitive +logicmonitor/resource-mapping-op: + logs: + resource_mapping_op: "OR" + endpoint: https://company.logicmonitor.com/rest + headers: + Authorization: Bearer diff --git a/exporter/logicmonitorexporter/traces_exporter.go b/exporter/logicmonitorexporter/traces_exporter.go index 6150535a3da6..e2cd8cb8d248 100644 --- a/exporter/logicmonitorexporter/traces_exporter.go +++ b/exporter/logicmonitorexporter/traces_exporter.go @@ -19,6 +19,7 @@ type tracesExporter struct { config *Config sender *traces.Sender settings component.TelemetrySettings + cancel context.CancelFunc } // newTracesExporter creates new Logicmonitor Traces Exporter. @@ -33,7 +34,7 @@ func newTracesExporter(_ context.Context, cfg component.Config, set exporter.Cre } func (e *tracesExporter) start(ctx context.Context, host component.Host) error { - client, err := e.config.HTTPClientSettings.ToClient(host, e.settings) + client, err := e.config.ClientConfig.ToClientContext(ctx, host, e.settings) if err != nil { return fmt.Errorf("failed to create http client: %w", err) } @@ -43,6 +44,8 @@ func (e *tracesExporter) start(ctx context.Context, host component.Host) error { AccessKey: string(e.config.APIToken.AccessKey), BearerToken: string(e.config.Headers["Authorization"]), } + + ctx, e.cancel = context.WithCancel(ctx) e.sender, err = traces.NewSender(ctx, e.config.Endpoint, client, authParams, e.settings.Logger) if err != nil { return err @@ -53,3 +56,11 @@ func (e *tracesExporter) start(ctx context.Context, host component.Host) error { func (e *tracesExporter) PushTraceData(ctx context.Context, td ptrace.Traces) error { return e.sender.SendTraces(ctx, td) } + +func (e *tracesExporter) shutdown(_ context.Context) error { + if e.cancel != nil { + e.cancel() + } + + return nil +} diff --git a/exporter/logicmonitorexporter/traces_exporter_test.go b/exporter/logicmonitorexporter/traces_exporter_test.go index ab914129eabf..27ce15ede5f0 100644 --- a/exporter/logicmonitorexporter/traces_exporter_test.go +++ b/exporter/logicmonitorexporter/traces_exporter_test.go @@ -21,7 +21,7 @@ import ( func Test_NewTracesExporter(t *testing.T) { t.Run("should create Traces exporter", func(t *testing.T) { config := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "http://example.logicmonitor.com/rest", }, APIToken: APIToken{AccessID: "testid", AccessKey: "testkey"}, @@ -33,7 +33,7 @@ func Test_NewTracesExporter(t *testing.T) { } func TestPushTraceData(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { response := lmsdktraces.LMTraceIngestResponse{ Success: true, Message: "", @@ -45,7 +45,7 @@ func TestPushTraceData(t *testing.T) { params := exportertest.NewNopCreateSettings() f := NewFactory() config := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: ts.URL, }, APIToken: APIToken{AccessID: "testid", AccessKey: "testkey"}, @@ -54,6 +54,7 @@ func TestPushTraceData(t *testing.T) { exp, err := f.CreateTracesExporter(ctx, params, config) assert.NoError(t, err) assert.NoError(t, exp.Start(ctx, componenttest.NewNopHost())) + defer func() { assert.NoError(t, exp.Shutdown(ctx)) }() testTraces := ptrace.NewTraces() generateTraces().CopyTo(testTraces) diff --git a/exporter/logzioexporter/README.md b/exporter/logzioexporter/README.md index 0c0c6ff9d62c..7becbc6f090a 100644 --- a/exporter/logzioexporter/README.md +++ b/exporter/logzioexporter/README.md @@ -4,14 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces, logs | -| Distributions | [contrib], [aws], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Flogzio%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Flogzio) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Flogzio%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Flogzio) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Doron-Bargo](https://www.github.com/Doron-Bargo), [@yotamloe](https://www.github.com/yotamloe) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@yotamloe](https://www.github.com/yotamloe) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector This exporter supports sending trace and log data to [Logz.io](https://www.logz.io) @@ -172,3 +170,7 @@ service: logs: level: debug #activate debug mode ``` + +#### Scope Name +When using the logs exporter with logs originating from instrumentation library (i.e opentelemetry log4j2 appender), the scopeName field will be added (if the field is populated in the original log). +``` \ No newline at end of file diff --git a/exporter/logzioexporter/config.go b/exporter/logzioexporter/config.go index 26e7e4c2f976..d0d12bfacc8e 100644 --- a/exporter/logzioexporter/config.go +++ b/exporter/logzioexporter/config.go @@ -9,20 +9,21 @@ import ( "github.com/hashicorp/go-hclog" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) // Config contains Logz.io specific configuration such as Account TracesToken, Region, etc. type Config struct { - confighttp.HTTPClientSettings `mapstructure:",squash"` // confighttp client settings https://pkg.go.dev/go.opentelemetry.io/collector/config/confighttp#HTTPClientSettings - exporterhelper.QueueSettings `mapstructure:"sending_queue"` // exporter helper queue settings https://pkg.go.dev/go.opentelemetry.io/collector/exporter/exporterhelper#QueueSettings - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` // exporter helper retry settings https://pkg.go.dev/go.opentelemetry.io/collector/exporter/exporterhelper#RetrySettings - Token configopaque.String `mapstructure:"account_token"` // Your Logz.io Account Token, can be found at https://app.logz.io/#/dashboard/settings/general - Region string `mapstructure:"region"` // Your Logz.io 2-letter region code, can be found at https://docs.logz.io/user-guide/accounts/account-region.html#available-regions - CustomEndpoint string `mapstructure:"custom_endpoint"` // **Deprecation** Custom endpoint to ship traces to. Use only for dev and tests. - DrainInterval int `mapstructure:"drain_interval"` // **Deprecation** Queue drain interval in seconds. Defaults to `3`. - QueueCapacity int64 `mapstructure:"queue_capacity"` // **Deprecation** Queue capacity in bytes. Defaults to `20 * 1024 * 1024` ~ 20mb. - QueueMaxLength int `mapstructure:"queue_max_length"` // **Deprecation** Max number of items allowed in the queue. Defaults to `500000`. + confighttp.ClientConfig `mapstructure:",squash"` // confighttp client settings https://pkg.go.dev/go.opentelemetry.io/collector/config/confighttp#ClientConfig + exporterhelper.QueueSettings `mapstructure:"sending_queue"` // exporter helper queue settings https://pkg.go.dev/go.opentelemetry.io/collector/exporter/exporterhelper#QueueSettings + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // exporter helper retry settings https://pkg.go.dev/go.opentelemetry.io/collector/exporter/exporterhelper#RetrySettings + Token configopaque.String `mapstructure:"account_token"` // Your Logz.io Account Token, can be found at https://app.logz.io/#/dashboard/settings/general + Region string `mapstructure:"region"` // Your Logz.io 2-letter region code, can be found at https://docs.logz.io/user-guide/accounts/account-region.html#available-regions + CustomEndpoint string `mapstructure:"custom_endpoint"` // **Deprecation** Custom endpoint to ship traces to. Use only for dev and tests. + DrainInterval int `mapstructure:"drain_interval"` // **Deprecation** Queue drain interval in seconds. Defaults to `3`. + QueueCapacity int64 `mapstructure:"queue_capacity"` // **Deprecation** Queue capacity in bytes. Defaults to `20 * 1024 * 1024` ~ 20mb. + QueueMaxLength int `mapstructure:"queue_max_length"` // **Deprecation** Max number of items allowed in the queue. Defaults to `500000`. } func (c *Config) Validate() error { @@ -51,6 +52,6 @@ func (c *Config) checkAndWarnDeprecatedOptions(logger hclog.Logger) { if c.CustomEndpoint != "" { logger.Warn("You are using the deprecated `custom_endpoint` option that will be removed in the next release; please use `endpoint` configuration instead: https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp") logger.Warn("Mapping `custom_endpoint` -> `Endpoint`") - c.HTTPClientSettings.Endpoint = c.CustomEndpoint + c.ClientConfig.Endpoint = c.CustomEndpoint } } diff --git a/exporter/logzioexporter/config_test.go b/exporter/logzioexporter/config_test.go index 839a501956e9..a85ca894239d 100644 --- a/exporter/logzioexporter/config_test.go +++ b/exporter/logzioexporter/config_test.go @@ -14,6 +14,7 @@ import ( "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/exportertest" @@ -35,16 +36,16 @@ func TestLoadConfig(t *testing.T) { Token: "token", Region: "eu", } - expected.RetrySettings = exporterhelper.NewDefaultRetrySettings() - expected.RetrySettings.MaxInterval = 5 * time.Second + expected.BackOffConfig = configretry.NewDefaultBackOffConfig() + expected.BackOffConfig.MaxInterval = 5 * time.Second expected.QueueSettings = exporterhelper.NewDefaultQueueSettings() expected.QueueSettings.Enabled = false - expected.HTTPClientSettings = confighttp.HTTPClientSettings{ + expected.ClientConfig = confighttp.ClientConfig{ Endpoint: "", Timeout: 30 * time.Second, Headers: map[string]configopaque.String{}, // Default to gzip compression - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, // We almost read 0 bytes, so no need to tune ReadBufferSize. WriteBufferSize: 512 * 1024, } @@ -64,14 +65,14 @@ func TestDefaultLoadConfig(t *testing.T) { expected := &Config{ Token: "logzioTESTtoken", } - expected.RetrySettings = exporterhelper.NewDefaultRetrySettings() + expected.BackOffConfig = configretry.NewDefaultBackOffConfig() expected.QueueSettings = exporterhelper.NewDefaultQueueSettings() - expected.HTTPClientSettings = confighttp.HTTPClientSettings{ + expected.ClientConfig = confighttp.ClientConfig{ Endpoint: "", Timeout: 30 * time.Second, Headers: map[string]configopaque.String{}, // Default to gzip compression - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, // We almost read 0 bytes, so no need to tune ReadBufferSize. WriteBufferSize: 512 * 1024, } @@ -82,17 +83,17 @@ func TestCheckAndWarnDeprecatedOptions(t *testing.T) { // Config with legacy options actualCfg := &Config{ QueueSettings: exporterhelper.NewDefaultQueueSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), Token: "logzioTESTtoken", CustomEndpoint: "https://api.example.com", QueueMaxLength: 10, DrainInterval: 10, - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "", Timeout: 10 * time.Second, Headers: map[string]configopaque.String{}, // Default to gzip compression - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, // We almost read 0 bytes, so no need to tune ReadBufferSize. WriteBufferSize: 512 * 1024, }, @@ -109,14 +110,14 @@ func TestCheckAndWarnDeprecatedOptions(t *testing.T) { CustomEndpoint: "https://api.example.com", QueueMaxLength: 10, DrainInterval: 10, - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "https://api.example.com", Timeout: 10 * time.Second, Headers: map[string]configopaque.String{}, // Default to gzip compression - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, // We almost read 0 bytes, so no need to tune ReadBufferSize. WriteBufferSize: 512 * 1024, }, diff --git a/exporter/logzioexporter/example/config.yaml b/exporter/logzioexporter/example/config.yaml index 2e11ba7d6c05..57f47ffd4b4c 100644 --- a/exporter/logzioexporter/example/config.yaml +++ b/exporter/logzioexporter/example/config.yaml @@ -1,5 +1,6 @@ receivers: opencensus: + endpoint: :55678 zipkin: endpoint: :9411 jaeger: diff --git a/exporter/logzioexporter/exporter.go b/exporter/logzioexporter/exporter.go index df726d33f175..2b00d86e57ce 100644 --- a/exporter/logzioexporter/exporter.go +++ b/exporter/logzioexporter/exporter.go @@ -11,6 +11,7 @@ import ( "fmt" "io" "net/http" + "reflect" "strconv" "time" @@ -21,6 +22,7 @@ import ( "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/ptrace" "google.golang.org/genproto/googleapis/rpc/status" @@ -70,7 +72,7 @@ func newLogzioTracesExporter(config *Config, set exporter.CreateSettings) (expor if err != nil { return nil, err } - exporter.config.HTTPClientSettings.Endpoint, err = generateEndpoint(config) + exporter.config.ClientConfig.Endpoint, err = generateEndpoint(config) if err != nil { return nil, err } @@ -84,7 +86,7 @@ func newLogzioTracesExporter(config *Config, set exporter.CreateSettings) (expor // disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), exporterhelper.WithQueue(config.QueueSettings), - exporterhelper.WithRetry(config.RetrySettings), + exporterhelper.WithRetry(config.BackOffConfig), ) } func newLogzioLogsExporter(config *Config, set exporter.CreateSettings) (exporter.Logs, error) { @@ -92,7 +94,7 @@ func newLogzioLogsExporter(config *Config, set exporter.CreateSettings) (exporte if err != nil { return nil, err } - exporter.config.HTTPClientSettings.Endpoint, err = generateEndpoint(config) + exporter.config.ClientConfig.Endpoint, err = generateEndpoint(config) if err != nil { return nil, err } @@ -106,12 +108,12 @@ func newLogzioLogsExporter(config *Config, set exporter.CreateSettings) (exporte // disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), exporterhelper.WithQueue(config.QueueSettings), - exporterhelper.WithRetry(config.RetrySettings), + exporterhelper.WithRetry(config.BackOffConfig), ) } -func (exporter *logzioExporter) start(_ context.Context, host component.Host) error { - client, err := exporter.config.HTTPClientSettings.ToClient(host, exporter.settings) +func (exporter *logzioExporter) start(ctx context.Context, host component.Host) error { + client, err := exporter.config.ClientConfig.ToClientContext(ctx, host, exporter.settings) if err != nil { return err } @@ -127,26 +129,56 @@ func (exporter *logzioExporter) pushLogData(ctx context.Context, ld plog.Logs) e scopeLogs := resourceLogs.At(i).ScopeLogs() for j := 0; j < scopeLogs.Len(); j++ { logRecords := scopeLogs.At(j).LogRecords() + scope := scopeLogs.At(j).Scope() + details := mergeMapEntries(resource.Attributes(), scope.Attributes()) + details.PutStr(`scopeName`, scope.Name()) for k := 0; k < logRecords.Len(); k++ { log := logRecords.At(k) - jsonLog := convertLogRecordToJSON(log, resource) - logzioLog, err := json.Marshal(jsonLog) + jsonLog, err := json.Marshal(convertLogRecordToJSON(log, details)) if err != nil { return err } - _, err = dataBuffer.Write(append(logzioLog, '\n')) + _, err = dataBuffer.Write(append(jsonLog, '\n')) if err != nil { return err } } } } - err := exporter.export(ctx, exporter.config.HTTPClientSettings.Endpoint, dataBuffer.Bytes()) + err := exporter.export(ctx, exporter.config.ClientConfig.Endpoint, dataBuffer.Bytes()) // reset the data buffer after each export to prevent duplicated data dataBuffer.Reset() return err } +func mergeMapEntries(maps ...pcommon.Map) pcommon.Map { + res := map[string]any{} + for _, m := range maps { + for key, val := range m.AsRaw() { + // Check if the key was already added + if resMapValue, keyExists := res[key]; keyExists { + rt := reflect.TypeOf(resMapValue) + switch rt.Kind() { + case reflect.Slice: + res[key] = append(resMapValue.([]any), val) + default: + // Create a new slice and append values if the key exists: + valslice := []any{} + res[key] = append(valslice, resMapValue, val) + } + } else { + res[key] = val + } + } + } + pcommonRes := pcommon.NewMap() + err := pcommonRes.FromRaw(res) + if err != nil { + return pcommon.Map{} + } + return pcommonRes +} + func (exporter *logzioExporter) pushTraceData(ctx context.Context, traces ptrace.Traces) error { // a buffer to store logzio span and services bytes var dataBuffer bytes.Buffer @@ -188,7 +220,7 @@ func (exporter *logzioExporter) pushTraceData(ctx context.Context, traces ptrace } } } - err = exporter.export(ctx, exporter.config.HTTPClientSettings.Endpoint, dataBuffer.Bytes()) + err = exporter.export(ctx, exporter.config.ClientConfig.Endpoint, dataBuffer.Bytes()) // reset the data buffer after each export to prevent duplicated data dataBuffer.Reset() return err diff --git a/exporter/logzioexporter/exporter_test.go b/exporter/logzioexporter/exporter_test.go index d37e138bf77f..190afaa825c6 100644 --- a/exporter/logzioexporter/exporter_test.go +++ b/exporter/logzioexporter/exporter_test.go @@ -25,9 +25,8 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" conventions "go.opentelemetry.io/collector/semconv/v1.6.1" - - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" ) const ( @@ -51,11 +50,9 @@ func fillLogOne(log plog.LogRecord) { log.SetSeverityText("Info") log.SetSpanID([8]byte{0x01, 0x02, 0x04, 0x08}) log.SetTraceID([16]byte{0x08, 0x04, 0x02, 0x01}) - attrs := log.Attributes() attrs.PutStr("app", "server") attrs.PutDouble("instance_num", 1) - // nested body map attMap := log.Body().SetEmptyMap() attMap.PutDouble("23", 45) @@ -71,7 +68,6 @@ func fillLogTwo(log plog.LogRecord) { log.SetDroppedAttributesCount(1) log.SetSeverityNumber(plog.SeverityNumberInfo) log.SetSeverityText("Info") - attrs := log.Attributes() attrs.PutStr("customer", "acme") attrs.PutDouble("number", 64) @@ -79,11 +75,11 @@ func fillLogTwo(log plog.LogRecord) { attrs.PutStr("env", "dev") log.Body().SetStr("something happened") } + func fillLogNoTimestamp(log plog.LogRecord) { log.SetDroppedAttributesCount(1) log.SetSeverityNumber(plog.SeverityNumberInfo) log.SetSeverityText("Info") - attrs := log.Attributes() attrs.PutStr("customer", "acme") attrs.PutDouble("number", 64) @@ -93,8 +89,9 @@ func fillLogNoTimestamp(log plog.LogRecord) { } func generateLogsOneEmptyTimestamp() plog.Logs { - ld := testdata.GenerateLogsOneEmptyLogRecord() + ld := testdata.GenerateLogs(1) logs := ld.ResourceLogs().At(0).ScopeLogs().At(0).LogRecords() + ld.ResourceLogs().At(0).ScopeLogs().At(0).Scope().SetName("logScopeName") fillLogOne(logs.At(0)) fillLogNoTimestamp(logs.AppendEmpty()) return ld @@ -186,18 +183,18 @@ func TestExportErrors(tester *testing.T) { {http.StatusBadRequest}, } for _, test := range ExportErrorsTests { - server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { + server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) { rw.WriteHeader(test.status) })) cfg := &Config{ Region: "", Token: "token", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: server.URL, }, } td := newTestTracesWithAttributes() - ld := testdata.GenerateLogsManyLogRecordsSameResource(10) + ld := testdata.GenerateLogs(10) err := testTracesExporter(td, tester, cfg) fmt.Println(err.Error()) require.Error(tester, err) @@ -223,13 +220,11 @@ func TestNullExporterConfig(tester *testing.T) { func gUnzipData(data []byte) (resData []byte, err error) { b := bytes.NewBuffer(data) - var r io.Reader r, err = gzip.NewReader(b) if err != nil { return } - var resB bytes.Buffer _, err = resB.ReadFrom(r) if err != nil { @@ -248,9 +243,9 @@ func TestPushTraceData(tester *testing.T) { cfg := Config{ Token: "token", Region: "", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: server.URL, - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, }, } defer server.Close() @@ -281,13 +276,13 @@ func TestPushLogsData(tester *testing.T) { cfg := Config{ Token: "token", Region: "", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: server.URL, - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, }, } defer server.Close() - ld := testdata.GenerateLogsManyLogRecordsSameResource(2) + ld := testdata.GenerateLogs(2) res := ld.ResourceLogs().At(0).Resource() res.Attributes().PutStr(conventions.AttributeServiceName, testService) res.Attributes().PutStr(conventions.AttributeHostName, testHost) @@ -299,5 +294,33 @@ func TestPushLogsData(tester *testing.T) { assert.NoError(tester, json.Unmarshal([]byte(requests[0]), &jsonLog)) assert.Equal(tester, testHost, jsonLog["host.name"]) assert.Equal(tester, testService, jsonLog["service.name"]) +} +func TestMergeMapEntries(tester *testing.T) { + var firstMap = pcommon.NewMap() + var secondMap = pcommon.NewMap() + var expectedMap = pcommon.NewMap() + firstMap.PutStr("name", "exporter") + firstMap.PutStr("host", "localhost") + firstMap.PutStr("instanceNum", "1") + firstMap.PutInt("id", 4) + secondMap.PutStr("tag", "test") + secondMap.PutStr("host", "ec2") + secondMap.PutInt("instanceNum", 3) + secondMap.PutEmptyMap("id").PutInt("instance_a", 1) + expectedMap.PutStr("name", "exporter") + expectedMap.PutStr("tag", "test") + var slice = expectedMap.PutEmptySlice("host") + slice.AppendEmpty().SetStr("localhost") + slice.AppendEmpty().SetStr("ec2") + slice = expectedMap.PutEmptySlice("instanceNum") + var val = slice.AppendEmpty() + val.SetStr("1") + val = slice.AppendEmpty() + val.SetInt(3) + slice = expectedMap.PutEmptySlice("id") + slice.AppendEmpty().SetInt(4) + slice.AppendEmpty().SetEmptyMap().PutInt("instance_a", 1) + var mergedMap = mergeMapEntries(firstMap, secondMap) + assert.Equal(tester, expectedMap.AsRaw(), mergedMap.AsRaw()) } diff --git a/exporter/logzioexporter/factory.go b/exporter/logzioexporter/factory.go index 8733ff082c71..6b65fcd83fb8 100644 --- a/exporter/logzioexporter/factory.go +++ b/exporter/logzioexporter/factory.go @@ -16,6 +16,7 @@ import ( "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -36,14 +37,14 @@ func createDefaultConfig() component.Config { return &Config{ Region: "", Token: "", - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "", Timeout: 30 * time.Second, Headers: map[string]configopaque.String{}, // Default to gzip compression - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, // We almost read 0 bytes, so no need to tune ReadBufferSize. WriteBufferSize: 512 * 1024, }, @@ -75,13 +76,13 @@ func getListenerURL(region string) string { } func generateEndpoint(cfg *Config) (string, error) { - defaultURL := fmt.Sprintf("%s/?token=%s", getListenerURL(""), cfg.Token) + defaultURL := fmt.Sprintf("%s/?token=%s", getListenerURL(""), string(cfg.Token)) switch { - case cfg.HTTPClientSettings.Endpoint != "": - return cfg.HTTPClientSettings.Endpoint, nil + case cfg.ClientConfig.Endpoint != "": + return cfg.ClientConfig.Endpoint, nil case cfg.Region != "": - return fmt.Sprintf("%s/?token=%s", getListenerURL(cfg.Region), cfg.Token), nil - case cfg.HTTPClientSettings.Endpoint == "" && cfg.Region == "": + return fmt.Sprintf("%s/?token=%s", getListenerURL(cfg.Region), string(cfg.Token)), nil + case cfg.ClientConfig.Endpoint == "" && cfg.Region == "": return defaultURL, errors.New("failed to generate endpoint, Endpoint or Region must be set") default: return defaultURL, nil diff --git a/exporter/logzioexporter/factory_test.go b/exporter/logzioexporter/factory_test.go index b42cb23da224..60624fa977cd 100644 --- a/exporter/logzioexporter/factory_test.go +++ b/exporter/logzioexporter/factory_test.go @@ -38,7 +38,7 @@ func TestCreateTracesExporter(t *testing.T) { params := exportertest.NewNopCreateSettings() exporter, err := factory.CreateTracesExporter(context.Background(), params, cfg) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, exporter) } @@ -63,7 +63,7 @@ func TestGenerateUrl(t *testing.T) { cfg := &Config{ Region: test.region, Token: "token", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: test.endpoint, }, } diff --git a/exporter/logzioexporter/generated_component_test.go b/exporter/logzioexporter/generated_component_test.go new file mode 100644 index 000000000000..a9cb10971d20 --- /dev/null +++ b/exporter/logzioexporter/generated_component_test.go @@ -0,0 +1,133 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package logzioexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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 exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/logzioexporter/go.mod b/exporter/logzioexporter/go.mod index 14e2aa7f8aa2..2fda17b46d2a 100644 --- a/exporter/logzioexporter/go.mod +++ b/exporter/logzioexporter/go.mod @@ -1,77 +1,85 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter -go 1.20 +go 1.21 require ( - github.com/hashicorp/go-hclog v1.5.0 - github.com/jaegertracing/jaeger v1.41.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configcompression v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d - google.golang.org/protobuf v1.31.0 + github.com/hashicorp/go-hclog v1.6.3 + github.com/jaegertracing/jaeger v1.55.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configcompression v1.5.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/pdata/testdata v0.98.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 + google.golang.org/protobuf v1.33.0 ) require ( github.com/apache/thrift v0.19.0 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/fatih/color v1.14.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/opentracing/opentracing-go v1.2.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/atomic v1.10.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/grpc v1.59.0 // indirect + google.golang.org/grpc v1.62.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/logzioexporter/go.sum b/exporter/logzioexporter/go.sum index 9f06878f1ddd..791dc08e4d2b 100644 --- a/exporter/logzioexporter/go.sum +++ b/exporter/logzioexporter/go.sum @@ -1,99 +1,75 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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 v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +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/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= +github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= 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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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.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/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= 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/jaegertracing/jaeger v1.41.0 h1:vVNky8dP46M2RjGaZ7qRENqylW+tBFay3h57N16Ip7M= -github.com/jaegertracing/jaeger v1.41.0/go.mod h1:SIkAT75iVmA9U+mESGYuMH6UQv6V9Qy4qxo0lwfCQAc= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= 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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -101,119 +77,102 @@ 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/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= +github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +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/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -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/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -222,17 +181,14 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -240,38 +196,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/logzioexporter/internal/metadata/generated_status.go b/exporter/logzioexporter/internal/metadata/generated_status.go index 53e889139196..0a0ec9b10118 100644 --- a/exporter/logzioexporter/internal/metadata/generated_status.go +++ b/exporter/logzioexporter/internal/metadata/generated_status.go @@ -4,10 +4,23 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("logzio") ) const ( - Type = "logzio" TracesStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/logzio") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/logzio") +} diff --git a/exporter/logzioexporter/jsonlog.go b/exporter/logzioexporter/jsonlog.go index 54a9341ef268..391b61e166ea 100644 --- a/exporter/logzioexporter/jsonlog.go +++ b/exporter/logzioexporter/jsonlog.go @@ -11,7 +11,7 @@ import ( ) // convertLogRecordToJSON Takes `plog.LogRecord` and `pcommon.Resource` input, outputs byte array that represents the log record as json string -func convertLogRecordToJSON(log plog.LogRecord, resource pcommon.Resource) map[string]any { +func convertLogRecordToJSON(log plog.LogRecord, attributes pcommon.Map) map[string]any { jsonLog := map[string]any{} if spanID := log.SpanID(); !spanID.IsEmpty() { jsonLog["spanID"] = hex.EncodeToString(spanID[:]) @@ -26,13 +26,9 @@ func convertLogRecordToJSON(log plog.LogRecord, resource pcommon.Resource) map[s if log.Timestamp().AsTime().UnixMilli() != 0 { jsonLog["@timestamp"] = log.Timestamp().AsTime().UnixMilli() } - // add resource attributes to each json log - resource.Attributes().Range(func(k string, v pcommon.Value) bool { - jsonLog[k] = v.AsRaw() - return true - }) - // add log record attributes to each json log - log.Attributes().Range(func(k string, v pcommon.Value) bool { + + // Add merged attributed to each json log + attributes.Range(func(k string, v pcommon.Value) bool { jsonLog[k] = v.AsRaw() return true }) diff --git a/exporter/logzioexporter/jsonlog_test.go b/exporter/logzioexporter/jsonlog_test.go index c95fb7059ac9..6d75ceecc148 100644 --- a/exporter/logzioexporter/jsonlog_test.go +++ b/exporter/logzioexporter/jsonlog_test.go @@ -70,24 +70,25 @@ func TestConvertLogRecordToJSON(t *testing.T) { }, } for _, test := range convertLogRecordToJSONTests { - output := convertLogRecordToJSON(test.log, test.resource) + output := convertLogRecordToJSON(test.log, test.log.Attributes()) require.Equal(t, output, test.expected) } - } + func TestSetTimeStamp(t *testing.T) { var recordedRequests []byte server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { recordedRequests, _ = io.ReadAll(req.Body) rw.WriteHeader(http.StatusOK) })) + defer func() { server.Close() }() ld := generateLogsOneEmptyTimestamp() cfg := &Config{ Region: "us", Token: "token", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: server.URL, - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, }, } var err error diff --git a/exporter/logzioexporter/metadata.yaml b/exporter/logzioexporter/metadata.yaml index 28d24cc9d2ad..1b4fb9cd2046 100644 --- a/exporter/logzioexporter/metadata.yaml +++ b/exporter/logzioexporter/metadata.yaml @@ -1,9 +1,15 @@ type: logzio +scope_name: otelcol/logzio status: class: exporter stability: beta: [traces, logs] - distributions: [contrib, observiq, aws] + distributions: [contrib] codeowners: - active: [Doron-Bargo, yotamloe] + active: [yotamloe] + +tests: + config: + endpoint: "172.0.0.1:8080:" + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/logzioexporter/package_test.go b/exporter/logzioexporter/package_test.go new file mode 100644 index 000000000000..475e5299340f --- /dev/null +++ b/exporter/logzioexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package logzioexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/lokiexporter/README.md b/exporter/lokiexporter/README.md index 8a1f4a3485af..d7e711f821dc 100644 --- a/exporter/lokiexporter/README.md +++ b/exporter/lokiexporter/README.md @@ -4,13 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: logs | -| Distributions | [contrib], [observiq] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Floki%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Floki) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Floki%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Floki) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@gramidt](https://www.github.com/gramidt), [@gouthamve](https://www.github.com/gouthamve), [@jpkrohling](https://www.github.com/jpkrohling), [@mar4uk](https://www.github.com/mar4uk) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector Exports data via HTTP to [Loki](https://grafana.com/docs/loki/latest/). diff --git a/exporter/lokiexporter/config.go b/exporter/lokiexporter/config.go index 4067cdf989d6..1ac225728286 100644 --- a/exporter/lokiexporter/config.go +++ b/exporter/lokiexporter/config.go @@ -8,14 +8,15 @@ import ( "net/url" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) // Config defines configuration for Loki exporter. type Config struct { - confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + confighttp.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + exporterhelper.QueueSettings `mapstructure:"sending_queue"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` DefaultLabelsEnabled map[string]bool `mapstructure:"default_labels_enabled"` } diff --git a/exporter/lokiexporter/config_test.go b/exporter/lokiexporter/config_test.go index 656a6e510b5c..dfdda9c34e26 100644 --- a/exporter/lokiexporter/config_test.go +++ b/exporter/lokiexporter/config_test.go @@ -15,6 +15,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -35,13 +36,13 @@ func TestLoadConfigNewExporter(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "allsettings"), expected: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Headers: map[string]configopaque.String{ "X-Custom-Header": "loki_rocks", }, Endpoint: "https://loki:3100/loki/api/v1/push", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "/var/lib/mycert.pem", CertFile: "certfile", KeyFile: "keyfile", @@ -52,7 +53,7 @@ func TestLoadConfigNewExporter(t *testing.T) { WriteBufferSize: 345, Timeout: time.Second * 10, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, MaxInterval: 1 * time.Minute, @@ -109,7 +110,7 @@ func TestConfigValidate(t *testing.T) { { desc: "Config is valid", cfg: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "https://loki.example.com", }, }, diff --git a/exporter/lokiexporter/exporter.go b/exporter/lokiexporter/exporter.go index dddf72606099..c037c5244d95 100644 --- a/exporter/lokiexporter/exporter.go +++ b/exporter/lokiexporter/exporter.go @@ -15,13 +15,14 @@ import ( "github.com/gogo/protobuf/proto" "github.com/golang/snappy" - "go.opencensus.io/stats" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/otel/metric" "go.uber.org/multierr" "go.uber.org/zap" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter/internal/metadata" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/loki" ) @@ -35,15 +36,28 @@ type lokiExporter struct { settings component.TelemetrySettings client *http.Client wg sync.WaitGroup + + lokiExporterFailedToSendLogRecordsDueToMissingLabels metric.Int64Counter } -func newExporter(config *Config, settings component.TelemetrySettings) *lokiExporter { +func newExporter(config *Config, settings component.TelemetrySettings) (*lokiExporter, error) { settings.Logger.Info("using the new Loki exporter") + count, err := metadata.Meter(settings).Int64Counter( + "lokiexporter_send_failed_due_to_missing_labels", + metric.WithDescription("Number of log records failed to send because labels were missing"), + metric.WithUnit("1"), + ) + + if err != nil { + return nil, err + } + return &lokiExporter{ config: config, settings: settings, - } + lokiExporterFailedToSendLogRecordsDueToMissingLabels: count, + }, nil } func (l *lokiExporter) pushLogData(ctx context.Context, ld plog.Logs) error { @@ -53,7 +67,7 @@ func (l *lokiExporter) pushLogData(ctx context.Context, ld plog.Logs) error { for tenant, request := range requests { err := l.sendPushRequest(ctx, tenant, request, ld) if isErrMissingLabels(err) { - stats.Record(ctx, lokiExporterFailedToSendLogRecordsDueToMissingLabels.M(int64(ld.LogRecordCount()))) + l.lokiExporterFailedToSendLogRecordsDueToMissingLabels.Add(ctx, int64(ld.LogRecordCount())) } errs = multierr.Append(errs, err) @@ -81,12 +95,12 @@ func (l *lokiExporter) sendPushRequest(ctx context.Context, tenant string, reque return consumererror.NewPermanent(err) } - req, err := http.NewRequestWithContext(ctx, "POST", l.config.HTTPClientSettings.Endpoint, bytes.NewReader(buf)) + req, err := http.NewRequestWithContext(ctx, "POST", l.config.ClientConfig.Endpoint, bytes.NewReader(buf)) if err != nil { return consumererror.NewPermanent(err) } - for k, v := range l.config.HTTPClientSettings.Headers { + for k, v := range l.config.ClientConfig.Headers { req.Header.Set(k, string(v)) } req.Header.Set("Content-Type", "application/x-protobuf") @@ -134,8 +148,8 @@ func encode(pb proto.Message) ([]byte, error) { return buf, nil } -func (l *lokiExporter) start(_ context.Context, host component.Host) (err error) { - client, err := l.config.HTTPClientSettings.ToClient(host, l.settings) +func (l *lokiExporter) start(ctx context.Context, host component.Host) (err error) { + client, err := l.config.ClientConfig.ToClientContext(ctx, host, l.settings) if err != nil { return err } diff --git a/exporter/lokiexporter/exporter_test.go b/exporter/lokiexporter/exporter_test.go index 6473f7f9cabe..6fbb09b3b3f0 100644 --- a/exporter/lokiexporter/exporter_test.go +++ b/exporter/lokiexporter/exporter_test.go @@ -63,7 +63,7 @@ func TestPushLogData(t *testing.T) { actualPushRequest := &push.PushRequest{} // prepare - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { encPayload, err := io.ReadAll(r.Body) require.NoError(t, err) @@ -76,7 +76,7 @@ func TestPushLogData(t *testing.T) { defer ts.Close() cfg := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: ts.URL, }, } @@ -239,7 +239,7 @@ func TestLogsToLokiRequestWithGroupingByTenant(t *testing.T) { actualPushRequestPerTenant := map[string]*push.PushRequest{} // prepare - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { encPayload, err := io.ReadAll(r.Body) require.NoError(t, err) @@ -255,7 +255,7 @@ func TestLogsToLokiRequestWithGroupingByTenant(t *testing.T) { defer ts.Close() cfg := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: ts.URL, }, } diff --git a/exporter/lokiexporter/factory.go b/exporter/lokiexporter/factory.go index dce14b140890..d82d0ee1355f 100644 --- a/exporter/lokiexporter/factory.go +++ b/exporter/lokiexporter/factory.go @@ -9,10 +9,10 @@ import ( "context" "time" - "go.opencensus.io/stats/view" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -21,8 +21,6 @@ import ( // NewFactory creates a factory for the legacy Loki exporter. func NewFactory() exporter.Factory { - _ = view.Register(metricViews()...) - return exporter.NewFactory( metadata.Type, createDefaultConfig, @@ -32,14 +30,14 @@ func NewFactory() exporter.Factory { func createDefaultConfig() component.Config { return &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "", Timeout: 30 * time.Second, Headers: map[string]configopaque.String{}, // We almost read 0 bytes, so no need to tune ReadBufferSize. WriteBufferSize: 512 * 1024, }, - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), DefaultLabelsEnabled: map[string]bool{ "exporter": true, @@ -52,7 +50,11 @@ func createDefaultConfig() component.Config { func createLogsExporter(ctx context.Context, set exporter.CreateSettings, config component.Config) (exporter.Logs, error) { exporterConfig := config.(*Config) - exp := newExporter(exporterConfig, set.TelemetrySettings) + exp, err := newExporter(exporterConfig, set.TelemetrySettings) + + if err != nil { + return nil, err + } return exporterhelper.NewLogsExporter( ctx, @@ -61,7 +63,7 @@ func createLogsExporter(ctx context.Context, set exporter.CreateSettings, config exp.pushLogData, // explicitly disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(exporterConfig.RetrySettings), + exporterhelper.WithRetry(exporterConfig.BackOffConfig), exporterhelper.WithQueue(exporterConfig.QueueSettings), exporterhelper.WithStart(exp.start), exporterhelper.WithShutdown(exp.stop), diff --git a/exporter/lokiexporter/factory_test.go b/exporter/lokiexporter/factory_test.go index 9eee92d276d1..a3779f53a4e7 100644 --- a/exporter/lokiexporter/factory_test.go +++ b/exporter/lokiexporter/factory_test.go @@ -22,47 +22,51 @@ func TestExporter_new(t *testing.T) { t.Run("with valid config", func(t *testing.T) { config := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: validEndpoint, }, } - exp := newExporter(config, componenttest.NewNopTelemetrySettings()) + exp, err := newExporter(config, componenttest.NewNopTelemetrySettings()) + require.NoError(t, err) require.NotNil(t, exp) }) } func TestExporter_startReturnsNillWhenValidConfig(t *testing.T) { config := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: validEndpoint, }, } - exp := newExporter(config, componenttest.NewNopTelemetrySettings()) + exp, err := newExporter(config, componenttest.NewNopTelemetrySettings()) + require.NoError(t, err) require.NotNil(t, exp) require.NoError(t, exp.start(context.Background(), componenttest.NewNopHost())) } func TestExporter_startReturnsErrorWhenInvalidHttpClientSettings(t *testing.T) { config := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "", - CustomRoundTripper: func(next http.RoundTripper) (http.RoundTripper, error) { - return nil, fmt.Errorf("this causes HTTPClientSettings.ToClient() to error") + CustomRoundTripper: func(_ http.RoundTripper) (http.RoundTripper, error) { + return nil, fmt.Errorf("this causes ClientConfig.ToClient() to error") }, }, } - exp := newExporter(config, componenttest.NewNopTelemetrySettings()) + exp, err := newExporter(config, componenttest.NewNopTelemetrySettings()) + require.NoError(t, err) require.NotNil(t, exp) require.Error(t, exp.start(context.Background(), componenttest.NewNopHost())) } func TestExporter_stopAlwaysReturnsNil(t *testing.T) { config := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: validEndpoint, }, } - exp := newExporter(config, componenttest.NewNopTelemetrySettings()) + exp, err := newExporter(config, componenttest.NewNopTelemetrySettings()) + require.NoError(t, err) require.NotNil(t, exp) require.NoError(t, exp.stop(context.Background())) } diff --git a/exporter/lokiexporter/generated_component_test.go b/exporter/lokiexporter/generated_component_test.go new file mode 100644 index 000000000000..7f18cd15120d --- /dev/null +++ b/exporter/lokiexporter/generated_component_test.go @@ -0,0 +1,126 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package lokiexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/lokiexporter/go.mod b/exporter/lokiexporter/go.mod index 3d24c9629a89..a3c5ca8038d3 100644 --- a/exporter/lokiexporter/go.mod +++ b/exporter/lokiexporter/go.mod @@ -1,84 +1,87 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter -go 1.20 +go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.1 + github.com/cenkalti/backoff/v4 v4.3.0 github.com/gogo/protobuf v1.3.2 github.com/golang/snappy v0.0.4 - github.com/grafana/loki/pkg/push v0.0.0-20230127072203-4e8cc8d71928 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/loki v0.89.0 - github.com/prometheus/common v0.45.0 - github.com/stretchr/testify v1.8.4 - go.opencensus.io v0.24.0 - go.opentelemetry.io/collector v0.89.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/loki v0.98.0 + github.com/prometheus/common v0.52.2 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.98.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.89.0 // indirect - github.com/pkg/errors v0.9.1 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/prometheus v0.47.2 // indirect + github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e // indirect github.com/rs/cors v1.10.1 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/atomic v1.11.0 // indirect - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/lokiexporter/go.sum b/exporter/lokiexporter/go.sum index d8d31d24772b..731f64c30f8e 100644 --- a/exporter/lokiexporter/go.sum +++ b/exporter/lokiexporter/go.sum @@ -1,32 +1,29 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 h1:8q4SaHjFsClSvuVne0ID/5Ka8u3fcIHyqkLjcFpNRHQ= -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/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= -github.com/aws/aws-sdk-go v1.44.302 h1:ST3ko6GrJKn3Xi+nAvxjG3uk/V1pW8KC52WLeIxqqNk= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 h1:n1DH8TPV4qqPTje2RcUBYwtrTWlabVp4n46+74X2pn4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0/go.mod h1:HDcZnuGbiyppErN6lB+idp4CKhjbc8gwjto6OPpyggM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/aws/aws-sdk-go v1.50.32 h1:POt81DvegnpQKM4DMDLlHz1CO6OBnEoQ1gRhYFd7QRY= +github.com/aws/aws-sdk-go v1.50.32/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= 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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= -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/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= @@ -36,71 +33,55 @@ github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBj github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= +github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 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.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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/grafana/loki/pkg/push v0.0.0-20230127072203-4e8cc8d71928 h1:KCbGfs9SGr3lL3RWc+c+njCYyWUOa++Oas6McnwdQ2I= -github.com/grafana/loki/pkg/push v0.0.0-20230127072203-4e8cc8d71928/go.mod h1:DhJMrd2QInI/1CNtTN43BZuTmkccdizW1jZ+F6aHkhY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37 h1:w59bmBeLOk4enGtyX4kTBNY3FCw/nwDTYUqcjC4vKhg= +github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37/go.mod h1:f3JSoxBTPXX5ec4FxxeC19nTBSxoTz+cBgS3cYLMcr0= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= 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/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/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= 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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -109,142 +90,132 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= -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.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= +github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= -github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e h1:UmqAuY2OyDoog8+l5FybViJE5B2r+UxVGCUwFTsY5AA= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e/go.mod h1:+0ld+ozir7zWFcHA2vVpWAKxXakIioEjPPNOqH+J3ZA= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -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/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +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/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= 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.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= @@ -252,39 +223,27 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78 h1:Xs9lu+tLXxLIfuci70nG4cpwaRC+mRQPUL7LoIeDJC4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= diff --git a/exporter/lokiexporter/internal/metadata/generated_status.go b/exporter/lokiexporter/internal/metadata/generated_status.go index 8ac8d582873a..49aedda31bcf 100644 --- a/exporter/lokiexporter/internal/metadata/generated_status.go +++ b/exporter/lokiexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("loki") ) const ( - Type = "loki" LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/loki") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/loki") +} diff --git a/exporter/lokiexporter/internal/tenant/package_test.go b/exporter/lokiexporter/internal/tenant/package_test.go new file mode 100644 index 000000000000..ec35a023094f --- /dev/null +++ b/exporter/lokiexporter/internal/tenant/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package tenant + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/lokiexporter/metadata.yaml b/exporter/lokiexporter/metadata.yaml index b5b1c2c7cab2..15b15fd707ea 100644 --- a/exporter/lokiexporter/metadata.yaml +++ b/exporter/lokiexporter/metadata.yaml @@ -1,4 +1,5 @@ type: loki +scope_name: otelcol/loki status: class: exporter @@ -6,6 +7,8 @@ status: beta: [logs] distributions: - contrib - - observiq codeowners: active: [gramidt, gouthamve, jpkrohling, mar4uk] + +tests: + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/lokiexporter/metrics.go b/exporter/lokiexporter/metrics.go deleted file mode 100644 index 456bbe2307d4..000000000000 --- a/exporter/lokiexporter/metrics.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package lokiexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter" - -import ( - "go.opencensus.io/stats" - "go.opencensus.io/stats/view" -) - -var ( - lokiExporterFailedToSendLogRecordsDueToMissingLabels = stats.Int64("lokiexporter_send_failed_due_to_missing_labels", "Number of log records failed to send because labels were missing", stats.UnitDimensionless) -) - -func metricViews() []*view.View { - return []*view.View{ - { - Name: "lokiexporter_send_failed_due_to_missing_labels", - Description: "Number of log records failed to send because labels were missing", - Measure: lokiExporterFailedToSendLogRecordsDueToMissingLabels, - Aggregation: view.Count(), - }, - } -} diff --git a/exporter/lokiexporter/package_test.go b/exporter/lokiexporter/package_test.go new file mode 100644 index 000000000000..eba5a730e48e --- /dev/null +++ b/exporter/lokiexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package lokiexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/mezmoexporter/config.go b/exporter/mezmoexporter/config.go index 4f028ddff0ea..691f19f54094 100644 --- a/exporter/mezmoexporter/config.go +++ b/exporter/mezmoexporter/config.go @@ -10,6 +10,7 @@ import ( "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -32,9 +33,9 @@ const ( // Config defines configuration for Mezmo exporter. type Config struct { - confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + confighttp.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + exporterhelper.QueueSettings `mapstructure:"sending_queue"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // IngestURL is the URL to send telemetry to. IngestURL string `mapstructure:"ingest_url"` @@ -44,8 +45,8 @@ type Config struct { } // returns default http client settings -func createDefaultHTTPClientSettings() confighttp.HTTPClientSettings { - return confighttp.HTTPClientSettings{ +func createDefaultClientConfig() confighttp.ClientConfig { + return confighttp.ClientConfig{ Timeout: defaultTimeout, } } diff --git a/exporter/mezmoexporter/config_test.go b/exporter/mezmoexporter/config_test.go index dca59ef2b1e5..953ea71aa778 100644 --- a/exporter/mezmoexporter/config_test.go +++ b/exporter/mezmoexporter/config_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -40,10 +41,10 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "allsettings"), expected: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: 5 * time.Second, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: false, InitialInterval: 99 * time.Second, MaxInterval: 199 * time.Second, diff --git a/exporter/mezmoexporter/exporter.go b/exporter/mezmoexporter/exporter.go index b58845b31b98..0c4689957d8f 100644 --- a/exporter/mezmoexporter/exporter.go +++ b/exporter/mezmoexporter/exporter.go @@ -58,13 +58,18 @@ func (m *mezmoExporter) pushLogData(_ context.Context, ld plog.Logs) error { return m.logDataToMezmo(ld) } -func (m *mezmoExporter) start(_ context.Context, host component.Host) (err error) { - m.client, err = m.config.HTTPClientSettings.ToClient(host, m.settings) +func (m *mezmoExporter) start(ctx context.Context, host component.Host) (err error) { + m.client, err = m.config.ClientConfig.ToClientContext(ctx, host, m.settings) return err } func (m *mezmoExporter) stop(context.Context) (err error) { + if m.client == nil { + return nil + } m.wg.Wait() + m.client.CloseIdleConnections() + m.client = nil return nil } diff --git a/exporter/mezmoexporter/exporter_test.go b/exporter/mezmoexporter/exporter_test.go index f38c89196b9b..9722a20b3cc0 100644 --- a/exporter/mezmoexporter/exporter_test.go +++ b/exporter/mezmoexporter/exporter_test.go @@ -169,7 +169,7 @@ func createLogger() (*zap.Logger, *observer.ObservedLogs) { func TestLogsExporter(t *testing.T) { httpServerParams := testServerParams{ t: t, - assertionsCallback: func(req *http.Request, body mezmoLogBody) (int, string) { + assertionsCallback: func(req *http.Request, _ mezmoLogBody) (int, string) { assert.Equal(t, "application/json", req.Header.Get("Content-Type")) assert.Equal(t, "mezmo-otel-exporter/"+buildInfo.Version, req.Header.Get("User-Agent")) return http.StatusOK, "" @@ -240,7 +240,7 @@ func Test404IngestError(t *testing.T) { httpServerParams := testServerParams{ t: t, - assertionsCallback: func(req *http.Request, body mezmoLogBody) (int, string) { + assertionsCallback: func(_ *http.Request, _ mezmoLogBody) (int, string) { return http.StatusNotFound, `{"foo":"bar"}` }, } diff --git a/exporter/mezmoexporter/factory.go b/exporter/mezmoexporter/factory.go index 370f084d6a78..f771189aad26 100644 --- a/exporter/mezmoexporter/factory.go +++ b/exporter/mezmoexporter/factory.go @@ -8,6 +8,7 @@ import ( "errors" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -26,10 +27,10 @@ func NewFactory() exporter.Factory { // Create a default Memzo config func createDefaultConfig() component.Config { return &Config{ - HTTPClientSettings: createDefaultHTTPClientSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), - IngestURL: defaultIngestURL, + ClientConfig: createDefaultClientConfig(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), + QueueSettings: exporterhelper.NewDefaultQueueSettings(), + IngestURL: defaultIngestURL, } } @@ -51,7 +52,7 @@ func createLogsExporter(ctx context.Context, settings exporter.CreateSettings, e exp.pushLogData, // explicitly disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(expCfg.RetrySettings), + exporterhelper.WithRetry(expCfg.BackOffConfig), exporterhelper.WithQueue(expCfg.QueueSettings), exporterhelper.WithStart(exp.start), exporterhelper.WithShutdown(exp.stop), diff --git a/exporter/mezmoexporter/factory_test.go b/exporter/mezmoexporter/factory_test.go index b6372780b4df..d68d4b7df8b4 100644 --- a/exporter/mezmoexporter/factory_test.go +++ b/exporter/mezmoexporter/factory_test.go @@ -9,9 +9,9 @@ import ( "time" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/exportertest" @@ -21,7 +21,7 @@ import ( func TestType(t *testing.T) { factory := NewFactory() pType := factory.Type() - assert.Equal(t, pType, component.Type(metadata.Type)) + assert.Equal(t, pType, metadata.Type) } func TestCreateDefaultConfig(t *testing.T) { @@ -32,10 +32,10 @@ func TestCreateDefaultConfig(t *testing.T) { IngestURL: defaultIngestURL, IngestKey: "", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: 5 * time.Second, }, - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), }) assert.NoError(t, componenttest.CheckConfigStruct(cfg)) diff --git a/exporter/mezmoexporter/generated_component_test.go b/exporter/mezmoexporter/generated_component_test.go new file mode 100644 index 000000000000..0d2dbd025443 --- /dev/null +++ b/exporter/mezmoexporter/generated_component_test.go @@ -0,0 +1,126 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package mezmoexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/mezmoexporter/go.mod b/exporter/mezmoexporter/go.mod index 11d7f268dd89..3863d49c6538 100644 --- a/exporter/mezmoexporter/go.mod +++ b/exporter/mezmoexporter/go.mod @@ -1,65 +1,76 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter -go 1.20 +go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.1 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 + github.com/cenkalti/backoff/v4 v4.3.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.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.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/mezmoexporter/go.sum b/exporter/mezmoexporter/go.sum index dadc64deca8e..aa7ec0ae96d4 100644 --- a/exporter/mezmoexporter/go.sum +++ b/exporter/mezmoexporter/go.sum @@ -1,82 +1,56 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -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/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -86,121 +60,108 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -208,38 +169,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/mezmoexporter/internal/metadata/generated_status.go b/exporter/mezmoexporter/internal/metadata/generated_status.go index 0cd555eb9901..85638edd4136 100644 --- a/exporter/mezmoexporter/internal/metadata/generated_status.go +++ b/exporter/mezmoexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("mezmo") ) const ( - Type = "mezmo" LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/mezmo") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/mezmo") +} diff --git a/exporter/mezmoexporter/metadata.yaml b/exporter/mezmoexporter/metadata.yaml index 5255f57e8e53..457faeeb2b31 100644 --- a/exporter/mezmoexporter/metadata.yaml +++ b/exporter/mezmoexporter/metadata.yaml @@ -1,4 +1,5 @@ type: mezmo +scope_name: otelcol/mezmo status: class: exporter @@ -7,3 +8,8 @@ status: distributions: [contrib] codeowners: active: [dashpole, billmeyer, gjanco] + +tests: + config: + disable_keep_alives: true + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/mezmoexporter/package_test.go b/exporter/mezmoexporter/package_test.go new file mode 100644 index 000000000000..e768b14cb712 --- /dev/null +++ b/exporter/mezmoexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package mezmoexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/opencensusexporter/README.md b/exporter/opencensusexporter/README.md index 86726ae83570..f4fb787a6f90 100644 --- a/exporter/opencensusexporter/README.md +++ b/exporter/opencensusexporter/README.md @@ -4,13 +4,13 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces, metrics | -| Distributions | [contrib], [observiq] | +| Distributions | [core], [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fopencensus%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fopencensus) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fopencensus%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fopencensus) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@open-telemetry/collector-approvers](https://github.com/orgs/open-telemetry/teams/collector-approvers) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector Exports traces and/or metrics via gRPC using diff --git a/exporter/opencensusexporter/config.go b/exporter/opencensusexporter/config.go index 142150d4239f..7890a95609c0 100644 --- a/exporter/opencensusexporter/config.go +++ b/exporter/opencensusexporter/config.go @@ -6,14 +6,15 @@ package opencensusexporter // import "github.com/open-telemetry/opentelemetry-co import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configgrpc" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) // Config defines configuration for OpenCensus exporter. type Config struct { - configgrpc.GRPCClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configgrpc.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + exporterhelper.QueueSettings `mapstructure:"sending_queue"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // The number of workers that send the gRPC requests. NumWorkers int `mapstructure:"num_workers"` diff --git a/exporter/opencensusexporter/config_test.go b/exporter/opencensusexporter/config_test.go index 62b2595b13bf..323fdd64ed11 100644 --- a/exporter/opencensusexporter/config_test.go +++ b/exporter/opencensusexporter/config_test.go @@ -13,6 +13,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -37,7 +38,7 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "2"), expected: &Config{ - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, MaxInterval: 1 * time.Minute, @@ -48,7 +49,7 @@ func TestLoadConfig(t *testing.T) { NumConsumers: 2, QueueSize: 10, }, - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Headers: map[string]configopaque.String{ "can you have a . here?": "F0000000-0000-0000-0000-000000000000", "header1": "234", @@ -56,8 +57,8 @@ func TestLoadConfig(t *testing.T) { }, Endpoint: "1.2.3.4:1234", Compression: "gzip", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "/var/lib/mycert.pem", }, Insecure: false, diff --git a/exporter/opencensusexporter/factory.go b/exporter/opencensusexporter/factory.go index 6a726398a287..4cf079f447dc 100644 --- a/exporter/opencensusexporter/factory.go +++ b/exporter/opencensusexporter/factory.go @@ -26,7 +26,7 @@ func NewFactory() exporter.Factory { func createDefaultConfig() component.Config { return &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ // We almost read 0 bytes, so no need to tune ReadBufferSize. WriteBufferSize: 512 * 1024, }, @@ -47,7 +47,7 @@ func createTracesExporter(ctx context.Context, set exporter.CreateSettings, cfg cfg, oce.pushTraces, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), - exporterhelper.WithRetry(oCfg.RetrySettings), + exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), exporterhelper.WithStart(oce.start), exporterhelper.WithShutdown(oce.shutdown)) @@ -66,7 +66,7 @@ func createMetricsExporter(ctx context.Context, set exporter.CreateSettings, cfg cfg, oce.pushMetrics, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), - exporterhelper.WithRetry(oCfg.RetrySettings), + exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), exporterhelper.WithStart(oce.start), exporterhelper.WithShutdown(oce.shutdown)) diff --git a/exporter/opencensusexporter/factory_test.go b/exporter/opencensusexporter/factory_test.go index b291fb98e92b..5b4be53f952e 100644 --- a/exporter/opencensusexporter/factory_test.go +++ b/exporter/opencensusexporter/factory_test.go @@ -37,7 +37,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "NoEndpoint", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: "", }, NumWorkers: 3, @@ -47,9 +47,9 @@ func TestCreateTracesExporter(t *testing.T) { { name: "ZeroNumWorkers", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: false, }, }, @@ -60,9 +60,9 @@ func TestCreateTracesExporter(t *testing.T) { { name: "UseSecure", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: false, }, }, @@ -72,7 +72,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "Keepalive", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, Keepalive: &configgrpc.KeepaliveClientConfig{ Time: 30 * time.Second, @@ -86,7 +86,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "Compression", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, Compression: "gzip", }, @@ -96,7 +96,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "Headers", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, Headers: map[string]configopaque.String{ "hdr1": "val1", @@ -109,7 +109,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "CompressionError", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, Compression: "unknown compression", }, @@ -121,10 +121,10 @@ func TestCreateTracesExporter(t *testing.T) { { name: "CaCert", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "testdata/test_cert.pem", }, }, @@ -135,10 +135,10 @@ func TestCreateTracesExporter(t *testing.T) { { name: "CertPemFileError", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "nosuchfile", }, }, @@ -163,7 +163,7 @@ func TestCreateTracesExporter(t *testing.T) { func checkErrorsAndStartAndShutdown(t *testing.T, exporter component.Component, err error, mustFailOnCreate, mustFailOnStart bool) { if mustFailOnCreate { - assert.NotNil(t, err) + assert.Error(t, err) return } assert.NoError(t, err) diff --git a/exporter/opencensusexporter/generated_component_test.go b/exporter/opencensusexporter/generated_component_test.go new file mode 100644 index 000000000000..d84aadc3e869 --- /dev/null +++ b/exporter/opencensusexporter/generated_component_test.go @@ -0,0 +1,133 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package opencensusexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/opencensusexporter/go.mod b/exporter/opencensusexporter/go.mod index d2dae08dffa1..5386cc634d9f 100644 --- a/exporter/opencensusexporter/go.mod +++ b/exporter/opencensusexporter/go.mod @@ -1,77 +1,89 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter -go 1.20 +go 1.21 require ( github.com/census-instrumentation/opencensus-proto v0.4.1 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configgrpc v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/receiver v0.89.0 - google.golang.org/grpc v1.59.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configgrpc v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/pdata/testdata v0.98.0 + go.opentelemetry.io/collector/receiver v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + google.golang.org/grpc v1.63.2 ) require ( - cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.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.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.2 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect github.com/soheilhy/cmux v0.1.5 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text 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-20231030173426-d783a09b4405 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/opencensusexporter/go.sum b/exporter/opencensusexporter/go.sum index 7f42fb4b3a05..4bbee03091ca 100644 --- a/exporter/opencensusexporter/go.sum +++ b/exporter/opencensusexporter/go.sum @@ -1,20 +1,16 @@ -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.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -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= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.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-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= 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= @@ -22,16 +18,15 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF 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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -48,9 +43,8 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W 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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 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= @@ -59,12 +53,14 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw 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.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/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/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= 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= @@ -77,15 +73,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -97,13 +92,17 @@ github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0b 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/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= 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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= @@ -115,66 +114,74 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/configgrpc v0.89.0/go.mod h1:2GuAxpU34a1X19kCZ8Kw3FUsxOIiFcWHiYorRCyhnCc= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -194,10 +201,9 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= 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= @@ -207,8 +213,8 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -227,22 +233,22 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= 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-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -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-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= 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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -252,13 +258,11 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/opencensusexporter/internal/metadata/generated_status.go b/exporter/opencensusexporter/internal/metadata/generated_status.go index 081df994310b..4b095c2f69fa 100644 --- a/exporter/opencensusexporter/internal/metadata/generated_status.go +++ b/exporter/opencensusexporter/internal/metadata/generated_status.go @@ -4,10 +4,23 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("opencensus") ) const ( - Type = "opencensus" TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/opencensus") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/opencensus") +} diff --git a/exporter/opencensusexporter/metadata.yaml b/exporter/opencensusexporter/metadata.yaml index 03f1bdbded1a..496eed6c698a 100644 --- a/exporter/opencensusexporter/metadata.yaml +++ b/exporter/opencensusexporter/metadata.yaml @@ -1,9 +1,15 @@ type: opencensus +scope_name: otelcol/opencensus status: class: exporter stability: beta: [traces, metrics] - distributions: [contrib, observiq] + distributions: [core, contrib] codeowners: active: [open-telemetry/collector-approvers] + +tests: + config: + endpoint: opencensus2:55678 + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/opencensusexporter/opencensus.go b/exporter/opencensusexporter/opencensus.go index 530241478abc..0cedb5130ab6 100644 --- a/exporter/opencensusexporter/opencensus.go +++ b/exporter/opencensusexporter/opencensus.go @@ -64,7 +64,7 @@ func newOcExporter(_ context.Context, cfg *Config, settings component.TelemetryS metadata: metadata.New(nil), settings: settings, } - for k, v := range cfg.GRPCClientSettings.Headers { + for k, v := range cfg.ClientConfig.Headers { oce.metadata.Set(k, string(v)) } return oce, nil @@ -72,7 +72,7 @@ func newOcExporter(_ context.Context, cfg *Config, settings component.TelemetryS // start creates the gRPC client Connection func (oce *ocExporter) start(ctx context.Context, host component.Host) error { - clientConn, err := oce.cfg.GRPCClientSettings.ToClientConn(ctx, host, oce.settings) + clientConn, err := oce.cfg.ClientConfig.ToClientConn(ctx, host, oce.settings) if err != nil { return err } diff --git a/exporter/opencensusexporter/opencensus_test.go b/exporter/opencensusexporter/opencensus_test.go index 11f5a403893a..607ed49ca75c 100644 --- a/exporter/opencensusexporter/opencensus_test.go +++ b/exporter/opencensusexporter/opencensus_test.go @@ -16,10 +16,10 @@ import ( "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/receiver/receivertest" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver" ) @@ -28,7 +28,7 @@ func TestSendTraces(t *testing.T) { rFactory := opencensusreceiver.NewFactory() rCfg := rFactory.CreateDefaultConfig().(*opencensusreceiver.Config) endpoint := testutil.GetAvailableLocalAddress(t) - rCfg.GRPCServerSettings.NetAddr.Endpoint = endpoint + rCfg.ServerConfig.NetAddr.Endpoint = endpoint set := receivertest.NewNopCreateSettings() recv, err := rFactory.CreateTracesReceiver(context.Background(), set, rCfg, sink) assert.NoError(t, err) @@ -39,9 +39,9 @@ func TestSendTraces(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.GRPCClientSettings = configgrpc.GRPCClientSettings{ + cfg.ClientConfig = configgrpc.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, } @@ -55,7 +55,7 @@ func TestSendTraces(t *testing.T) { assert.NoError(t, exp.Shutdown(context.Background())) }) - td := testdata.GenerateTracesOneSpan() + td := testdata.GenerateTraces(1) assert.NoError(t, exp.ConsumeTraces(context.Background(), td)) assert.Eventually(t, func() bool { return len(sink.AllTraces()) == 1 @@ -81,9 +81,9 @@ func TestSendTraces(t *testing.T) { func TestSendTraces_NoBackend(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.GRPCClientSettings = configgrpc.GRPCClientSettings{ + cfg.ClientConfig = configgrpc.ClientConfig{ Endpoint: "localhost:56569", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, } @@ -96,7 +96,7 @@ func TestSendTraces_NoBackend(t *testing.T) { assert.NoError(t, exp.Shutdown(context.Background())) }) - td := testdata.GenerateTracesOneSpan() + td := testdata.GenerateTraces(1) for i := 0; i < 10000; i++ { assert.Error(t, exp.ConsumeTraces(context.Background(), td)) } @@ -105,9 +105,9 @@ func TestSendTraces_NoBackend(t *testing.T) { func TestSendTraces_AfterStop(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.GRPCClientSettings = configgrpc.GRPCClientSettings{ + cfg.ClientConfig = configgrpc.ClientConfig{ Endpoint: "localhost:56569", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, } @@ -118,7 +118,7 @@ func TestSendTraces_AfterStop(t *testing.T) { require.NoError(t, exp.Start(context.Background(), host)) assert.NoError(t, exp.Shutdown(context.Background())) - td := testdata.GenerateTracesOneSpan() + td := testdata.GenerateTraces(1) assert.Error(t, exp.ConsumeTraces(context.Background(), td)) } @@ -127,7 +127,7 @@ func TestSendMetrics(t *testing.T) { rFactory := opencensusreceiver.NewFactory() rCfg := rFactory.CreateDefaultConfig().(*opencensusreceiver.Config) endpoint := testutil.GetAvailableLocalAddress(t) - rCfg.GRPCServerSettings.NetAddr.Endpoint = endpoint + rCfg.ServerConfig.NetAddr.Endpoint = endpoint set := receivertest.NewNopCreateSettings() recv, err := rFactory.CreateMetricsReceiver(context.Background(), set, rCfg, sink) assert.NoError(t, err) @@ -138,9 +138,9 @@ func TestSendMetrics(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.GRPCClientSettings = configgrpc.GRPCClientSettings{ + cfg.ClientConfig = configgrpc.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, } @@ -154,7 +154,7 @@ func TestSendMetrics(t *testing.T) { assert.NoError(t, exp.Shutdown(context.Background())) }) - md := testdata.GenerateMetricsOneMetric() + md := testdata.GenerateMetrics(1) assert.NoError(t, exp.ConsumeMetrics(context.Background(), md)) assert.Eventually(t, func() bool { return len(sink.AllMetrics()) == 1 @@ -178,9 +178,9 @@ func TestSendMetrics(t *testing.T) { func TestSendMetrics_NoBackend(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.GRPCClientSettings = configgrpc.GRPCClientSettings{ + cfg.ClientConfig = configgrpc.ClientConfig{ Endpoint: "localhost:56569", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, } @@ -193,7 +193,7 @@ func TestSendMetrics_NoBackend(t *testing.T) { assert.NoError(t, exp.Shutdown(context.Background())) }) - md := testdata.GenerateMetricsOneMetric() + md := testdata.GenerateMetrics(1) for i := 0; i < 10000; i++ { assert.Error(t, exp.ConsumeMetrics(context.Background(), md)) } @@ -202,9 +202,9 @@ func TestSendMetrics_NoBackend(t *testing.T) { func TestSendMetrics_AfterStop(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.GRPCClientSettings = configgrpc.GRPCClientSettings{ + cfg.ClientConfig = configgrpc.ClientConfig{ Endpoint: "localhost:56569", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, } @@ -215,6 +215,6 @@ func TestSendMetrics_AfterStop(t *testing.T) { require.NoError(t, exp.Start(context.Background(), host)) assert.NoError(t, exp.Shutdown(context.Background())) - md := testdata.GenerateMetricsOneMetric() + md := testdata.GenerateMetrics(1) assert.Error(t, exp.ConsumeMetrics(context.Background(), md)) } diff --git a/exporter/opencensusexporter/package_test.go b/exporter/opencensusexporter/package_test.go new file mode 100644 index 000000000000..c5b21ea873b4 --- /dev/null +++ b/exporter/opencensusexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package opencensusexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/opensearchexporter/README.md b/exporter/opensearchexporter/README.md index 4b01d248c9c1..47c7bd705f87 100644 --- a/exporter/opensearchexporter/README.md +++ b/exporter/opensearchexporter/README.md @@ -3,12 +3,15 @@ | Status | | | ------------- |-----------| -| Stability | [development]: logs, traces | -| Distributions | [] | +| Stability | [development]: logs | +| | [alpha]: traces | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fopensearch%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fopensearch) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fopensearch%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fopensearch) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@MitchellGale](https://www.github.com/MitchellGale), [@MaxKsyunz](https://www.github.com/MaxKsyunz), [@YANG-DB](https://www.github.com/YANG-DB) | [development]: https://github.com/open-telemetry/opentelemetry-collector#development +[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib OpenSearch exporter supports sending OpenTelemetry signals as documents to [OpenSearch](https://www.opensearch.org). @@ -21,7 +24,7 @@ The documents are sent using [observability catalog](https://github.com/opensear - `namespace` (default=`namespace`) a user-provided label to group telemetry. It is used to construct the name of the destination index or data stream. ### HTTP Connection Options -OpenSearch export supports standard (HTTP client settings](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp#client-configuration). +OpenSearch export supports standard [HTTP client settings](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp#client-configuration). - `http.endpoint` (required) `:` of OpenSearch node to send data to. ### TLS settings diff --git a/exporter/opensearchexporter/config.go b/exporter/opensearchexporter/config.go index 9fb127748eb4..c8546a6d407a 100644 --- a/exporter/opensearchexporter/config.go +++ b/exporter/opensearchexporter/config.go @@ -8,6 +8,7 @@ import ( "strings" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -27,8 +28,8 @@ const ( // Config defines configuration for OpenSearch exporter. type Config struct { - confighttp.HTTPClientSettings `mapstructure:"http"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + confighttp.ClientConfig `mapstructure:"http"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` exporterhelper.TimeoutSettings `mapstructure:",squash"` MappingsSettings `mapstructure:"mapping"` diff --git a/exporter/opensearchexporter/config_test.go b/exporter/opensearchexporter/config_test.go index 6ce3c8ddc3bd..68d9abd6b681 100644 --- a/exporter/opensearchexporter/config_test.go +++ b/exporter/opensearchexporter/config_test.go @@ -14,8 +14,8 @@ import ( "go.opentelemetry.io/collector/config/configauth" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" - "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter/internal/metadata" ) @@ -49,7 +49,7 @@ func TestLoadConfig(t *testing.T) { expected: &Config{ Dataset: "ngnix", Namespace: "eu", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: sampleEndpoint, Timeout: 2 * time.Minute, Headers: map[string]configopaque.String{ @@ -57,9 +57,9 @@ func TestLoadConfig(t *testing.T) { }, MaxIdleConns: &maxIdleConns, IdleConnTimeout: &idleConnTimeout, - Auth: &configauth.Authentication{AuthenticatorID: component.NewID("sample_basic_auth")}, + Auth: &configauth.Authentication{AuthenticatorID: component.MustNewID("sample_basic_auth")}, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 100 * time.Millisecond, MaxInterval: 30 * time.Second, @@ -81,7 +81,7 @@ func TestLoadConfig(t *testing.T) { config.Dataset = "" config.Namespace = "eu" }), - configValidateAssert: func(t assert.TestingT, err error, i ...any) bool { + configValidateAssert: func(t assert.TestingT, err error, _ ...any) bool { return assert.ErrorContains(t, err, errDatasetNoValue.Error()) }, }, @@ -92,7 +92,7 @@ func TestLoadConfig(t *testing.T) { config.Dataset = "ngnix" config.Namespace = "" }), - configValidateAssert: func(t assert.TestingT, err error, i ...any) bool { + configValidateAssert: func(t assert.TestingT, err error, _ ...any) bool { return assert.ErrorContains(t, err, errNamespaceNoValue.Error()) }, }, @@ -102,7 +102,7 @@ func TestLoadConfig(t *testing.T) { config.Endpoint = sampleEndpoint config.BulkAction = "delete" }), - configValidateAssert: func(t assert.TestingT, err error, i ...any) bool { + configValidateAssert: func(t assert.TestingT, err error, _ ...any) bool { return assert.ErrorContains(t, err, errBulkActionInvalid.Error()) }, }, diff --git a/exporter/opensearchexporter/factory.go b/exporter/opensearchexporter/factory.go index b4bfdd2e359d..75a74580f7f0 100644 --- a/exporter/opensearchexporter/factory.go +++ b/exporter/opensearchexporter/factory.go @@ -10,6 +10,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -29,12 +30,12 @@ func NewFactory() exporter.Factory { func newDefaultConfig() component.Config { return &Config{ - HTTPClientSettings: confighttp.NewDefaultHTTPClientSettings(), - Dataset: defaultDataset, - Namespace: defaultNamespace, - BulkAction: defaultBulkAction, - RetrySettings: exporterhelper.NewDefaultRetrySettings(), - MappingsSettings: MappingsSettings{Mode: defaultMappingMode}, + ClientConfig: confighttp.NewDefaultClientConfig(), + Dataset: defaultDataset, + Namespace: defaultNamespace, + BulkAction: defaultBulkAction, + BackOffConfig: configretry.NewDefaultBackOffConfig(), + MappingsSettings: MappingsSettings{Mode: defaultMappingMode}, } } @@ -51,7 +52,7 @@ func createTracesExporter(ctx context.Context, te.pushTraceData, exporterhelper.WithStart(te.Start), exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), - exporterhelper.WithRetry(c.RetrySettings), + exporterhelper.WithRetry(c.BackOffConfig), exporterhelper.WithTimeout(c.TimeoutSettings)) } @@ -68,6 +69,6 @@ func createLogsExporter(ctx context.Context, le.pushLogData, exporterhelper.WithStart(le.Start), exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: true}), - exporterhelper.WithRetry(c.RetrySettings), + exporterhelper.WithRetry(c.BackOffConfig), exporterhelper.WithTimeout(c.TimeoutSettings)) } diff --git a/exporter/opensearchexporter/generated_component_test.go b/exporter/opensearchexporter/generated_component_test.go new file mode 100644 index 000000000000..f3abc6a94cca --- /dev/null +++ b/exporter/opensearchexporter/generated_component_test.go @@ -0,0 +1,133 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package opensearchexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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 exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/opensearchexporter/go.mod b/exporter/opensearchexporter/go.mod index 124e5c1c8704..16d3b099dab9 100644 --- a/exporter/opensearchexporter/go.mod +++ b/exporter/opensearchexporter/go.mod @@ -1,73 +1,83 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.0.0-00010101000000-000000000000 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.98.0 github.com/opensearch-project/opensearch-go/v2 v2.3.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configauth v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configauth v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/elastic/go-structform v0.0.10 github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.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/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/rs/cors v1.10.1 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect ) replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil => ../../pkg/pdatautil diff --git a/exporter/opensearchexporter/go.sum b/exporter/opensearchexporter/go.sum index 2edd4b5cc10b..ea7d1564bcb2 100644 --- a/exporter/opensearchexporter/go.sum +++ b/exporter/opensearchexporter/go.sum @@ -1,6 +1,3 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= @@ -15,64 +12,41 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5 github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= 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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/elastic/go-structform v0.0.10 h1:oy08o/Ih2hHTkNcRY/1HhaYvIp5z6t8si8gnCJPDo1w= github.com/elastic/go-structform v0.0.10/go.mod h1:CZWf9aIRYY5SuKSmOhtXScE5uQiLZNqAFnwKR4OrIM4= -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/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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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.8/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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -81,21 +55,20 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr 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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -108,13 +81,16 @@ github.com/opensearch-project/opensearch-go/v2 v2.3.0/go.mod h1:8LDr9FCgUTVoT+5E github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -124,99 +100,91 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV 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.2/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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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/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.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.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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/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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -226,8 +194,8 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -240,10 +208,6 @@ 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-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= @@ -252,39 +216,18 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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= -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/exporter/opensearchexporter/internal/metadata/generated_status.go b/exporter/opensearchexporter/internal/metadata/generated_status.go index fb407b74435c..94060398ab71 100644 --- a/exporter/opensearchexporter/internal/metadata/generated_status.go +++ b/exporter/opensearchexporter/internal/metadata/generated_status.go @@ -4,10 +4,23 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("opensearch") ) const ( - Type = "opensearch" LogsStability = component.StabilityLevelDevelopment - TracesStability = component.StabilityLevelDevelopment + TracesStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/opensearch") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/opensearch") +} diff --git a/exporter/opensearchexporter/internal/objmodel/package_test.go b/exporter/opensearchexporter/internal/objmodel/package_test.go new file mode 100644 index 000000000000..1828b58a7ea3 --- /dev/null +++ b/exporter/opensearchexporter/internal/objmodel/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package objmodel + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/opensearchexporter/log_bulk_indexer.go b/exporter/opensearchexporter/log_bulk_indexer.go index 99b9747b7743..ccf548bb8d67 100644 --- a/exporter/opensearchexporter/log_bulk_indexer.go +++ b/exporter/opensearchexporter/log_bulk_indexer.go @@ -64,7 +64,7 @@ func (lbi *logBulkIndexer) submit(ctx context.Context, ld plog.Logs) { if err != nil { lbi.appendPermanentError(err) } else { - ItemFailureHandler := func(ctx context.Context, item opensearchutil.BulkIndexerItem, resp opensearchutil.BulkIndexerResponseItem, itemErr error) { + ItemFailureHandler := func(_ context.Context, _ opensearchutil.BulkIndexerItem, resp opensearchutil.BulkIndexerResponseItem, itemErr error) { // Setup error handler. The handler handles the per item response status based on the // selective ACKing in the bulk response. lbi.processItemFailure(resp, itemErr, makeLog(resource, resourceSchemaURL, scope, scopeSchemaURL, log)) diff --git a/exporter/opensearchexporter/metadata.yaml b/exporter/opensearchexporter/metadata.yaml index 96fa9a12928c..81899f33adbd 100644 --- a/exporter/opensearchexporter/metadata.yaml +++ b/exporter/opensearchexporter/metadata.yaml @@ -1,8 +1,17 @@ type: opensearch +scope_name: otelcol/opensearch status: class: exporter stability: - development: [logs, traces] + alpha: [traces] + development: [logs] + distributions: [contrib] codeowners: - active: [Aneurysm9, MitchellGale, MaxKsyunz, YANG-DB] \ No newline at end of file + active: [Aneurysm9, MitchellGale, MaxKsyunz, YANG-DB] + +tests: + expect_consumer_error: true + config: + http: + endpoint: https://opensearch.example.com:9200 \ No newline at end of file diff --git a/exporter/opensearchexporter/package_test.go b/exporter/opensearchexporter/package_test.go new file mode 100644 index 000000000000..9b90d8760fdf --- /dev/null +++ b/exporter/opensearchexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package opensearchexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/opensearchexporter/sso_log_exporter.go b/exporter/opensearchexporter/sso_log_exporter.go index 24c709bbc1b2..7ab0ec9447e5 100644 --- a/exporter/opensearchexporter/sso_log_exporter.go +++ b/exporter/opensearchexporter/sso_log_exporter.go @@ -19,7 +19,7 @@ type logExporter struct { Index string bulkAction string model mappingModel - httpSettings confighttp.HTTPClientSettings + httpSettings confighttp.ClientConfig telemetry component.TelemetrySettings } @@ -43,13 +43,13 @@ func newLogExporter(cfg *Config, set exporter.CreateSettings) (*logExporter, err telemetry: set.TelemetrySettings, Index: getIndexName(cfg.Dataset, cfg.Namespace, cfg.LogsIndex), bulkAction: cfg.BulkAction, - httpSettings: cfg.HTTPClientSettings, + httpSettings: cfg.ClientConfig, model: model, }, nil } -func (l *logExporter) Start(_ context.Context, host component.Host) error { - httpClient, err := l.httpSettings.ToClient(host, l.telemetry) +func (l *logExporter) Start(ctx context.Context, host component.Host) error { + httpClient, err := l.httpSettings.ToClientContext(ctx, host, l.telemetry) if err != nil { return err } diff --git a/exporter/opensearchexporter/sso_trace_exporter.go b/exporter/opensearchexporter/sso_trace_exporter.go index 1b2885766c36..1b791a1c772b 100644 --- a/exporter/opensearchexporter/sso_trace_exporter.go +++ b/exporter/opensearchexporter/sso_trace_exporter.go @@ -21,7 +21,7 @@ type ssoTracesExporter struct { Dataset string bulkAction string model mappingModel - httpSettings confighttp.HTTPClientSettings + httpSettings confighttp.ClientConfig telemetry component.TelemetrySettings } @@ -41,12 +41,12 @@ func newSSOTracesExporter(cfg *Config, set exporter.CreateSettings) (*ssoTracesE Dataset: cfg.Dataset, bulkAction: cfg.BulkAction, model: model, - httpSettings: cfg.HTTPClientSettings, + httpSettings: cfg.ClientConfig, }, nil } -func (s *ssoTracesExporter) Start(_ context.Context, host component.Host) error { - httpClient, err := s.httpSettings.ToClient(host, s.telemetry) +func (s *ssoTracesExporter) Start(ctx context.Context, host component.Host) error { + httpClient, err := s.httpSettings.ToClientContext(ctx, host, s.telemetry) if err != nil { return err } diff --git a/exporter/opensearchexporter/trace_bulk_indexer.go b/exporter/opensearchexporter/trace_bulk_indexer.go index 6f373f5a00f8..b6e7f5132e1e 100644 --- a/exporter/opensearchexporter/trace_bulk_indexer.go +++ b/exporter/opensearchexporter/trace_bulk_indexer.go @@ -67,7 +67,7 @@ func (tbi *traceBulkIndexer) submit(ctx context.Context, td ptrace.Traces) { if err != nil { tbi.appendPermanentError(err) } else { - ItemFailureHandler := func(ctx context.Context, item opensearchutil.BulkIndexerItem, resp opensearchutil.BulkIndexerResponseItem, itemErr error) { + ItemFailureHandler := func(_ context.Context, _ opensearchutil.BulkIndexerItem, resp opensearchutil.BulkIndexerResponseItem, itemErr error) { // Setup error handler. The handler handles the per item response status based on the // selective ACKing in the bulk response. tbi.processItemFailure(resp, itemErr, makeTrace(resource, resourceSchemaURL, scope, scopeSchemaURL, span)) diff --git a/exporter/tanzuobservabilityexporter/Makefile b/exporter/otelarrowexporter/Makefile similarity index 100% rename from exporter/tanzuobservabilityexporter/Makefile rename to exporter/otelarrowexporter/Makefile diff --git a/exporter/otelarrowexporter/README.md b/exporter/otelarrowexporter/README.md new file mode 100644 index 000000000000..4fdc86c1896f --- /dev/null +++ b/exporter/otelarrowexporter/README.md @@ -0,0 +1,243 @@ +# OpenTelemetry Protocol with Apache Arrow Exporter + + +| Status | | +| ------------- |-----------| +| Stability | [development]: traces, metrics, logs | +| Distributions | [] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fotelarrow%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fotelarrow) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fotelarrow%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fotelarrow) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jmacd](https://www.github.com/jmacd), [@moh-osman3](https://www.github.com/moh-osman3) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development + + +Exports telemetry data using [OpenTelemetry Protocol with Apache +Arrow](https://github.com/open-telemetry/otel-arrow) components with +support for both OpenTelemetry Protocol with Apache +Arrow and standard [OpenTelemetry Protocol]( +https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md) +(OTLP) protocol via gRPC. + +## Getting Started + +The [OpenTelemetry Protocol with Apache +Arrow](https://github.com/open-telemetry/otel-arrow) exporter combines +the features and configuration syntax of the core OpenTelemetry +Collector [OTLP +exporter](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter) +component with additional support for the OpenTelemetry Protocol with +Apache Arrow. + +OpenTelemetry Protocol with Apache Arrow supports column-oriented data +transport using the Apache Arrow data format. This component converts +OTLP data into an optimized representation and then sends batches of +data using Apache Arrow to encode the stream. The OpenTelemetry +Protocol with Apache Arrow receiver component contains logic to reverse the process used in this +component. + +The use of an OpenTelemetry Protocol with Apache Arrow +exporter-receiver pair is recommended when the network is expensive. +Typically, expect to see a 50% reduction in bandwidth compared with +the same data being sent using standard OTLP/gRPC with Zstd +compression, batch sizes being equal. + +This component includes all the features and configuration of the core +OTLP exporter, making it possible to upgrade from the core OTLP +exporter component. This is as simple as replacing "otlp" with +"otelarrow" as the component name in the collector configuration. + +To enable the OpenTelemetry Protocol with Apache Arrow exporter, +include it in the list of exporters for a pipeline. The `endpoint` +setting is required. The `tls` setting is requirede for insecure +transport. + +- `endpoint` (no default): host:port to which the exporter is going to send OTLP trace data, +using the gRPC protocol. The valid syntax is described +[here](https://github.com/grpc/grpc/blob/master/doc/naming.md). +If a scheme of `https` is used then client transport security is enabled and overrides the `insecure` setting. +- `tls`: see [TLS Configuration Settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md) for the full set of available options. + +Example: + +```yaml +exporters: + otelarrow/secure: + endpoint: external-collector:4317 + tls: + cert_file: file.cert + key_file: file.key + otelarrow/insecure: + endpoint: internal-collector:4317 + tls: + insecure: true +``` + +By default, `zstd` compression is enabled at the gRPC level. See +[compression configuration](#compression-configuration) below. To +disable gRPC-level compression, configure "none": + +```yaml +exporters: + otelarrow: + compression: none + endpoint: ... + tls: ... +``` + +## Configuration + +Several helper files are leveraged to provide additional capabilities automatically: + +- [gRPC settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configgrpc/README.md) +- [TLS and mTLS settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md) +- [Queuing, retry and timeout settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md) + +### Arrow-specific Configuration + +In the `arrow` configuration block, the following settings enable and +disable the use of OpenTelemetry Protocol with Apache Arrow as opposed +to standard OTLP. + +- `disabled` (default: false): disables use of Arrow, causing the exporter to use standard OTLP +- `disable_downgrade` (default: false): prevents this exporter from using standard OTLP. + +The following settings determine the resources that the exporter will use: + +- `num_streams` (default: number of CPUs): the number of concurrent Arrow streams +- `max_stream_lifetime` (default: unlimited): duration after which streams are recycled. + +### Network Configuration + +This component uses `round_robin` by default as the gRPC load +balancer. This can be modified using the `balancer_name` setting, for +example, to configure the `pick_first` balancer: + +```yaml +exporters: + otelarrow: + balancer_name: pick_first + endpoint: ... + tls: ... +``` + +When the server or an intermediate proxy uses a keepalive setting, the +Arrow-specific `max_stream_lifetime` setting is critical to avoiding +abrupt termination of Arrow streams, which causes retries of the +in-flight requests. The maximum stream lifetime should be set to a +value less than the minimum of the server's keepalive parameter (and +any of the intermediate proxies), plus the export timeout. + +```yaml +exporters: + otelarrow: + timeout: 30s + arrow: + max_stream_lifetime: 9m30s + endpoint: ... + tls: ... +``` + +When this is configured, the stream will terminate cleanly without +causing retries, with `OK` gRPC status. + +The corresponding `otelarrowreceiver` keepalive setting, that is +compatible with the one above, reads: + + + +``` +receivers: + otelarrow: + protocols: + grpc: + keepalive: + server_parameters: + max_connection_age: 1m + max_connection_age_grace: 10m +``` + +### Exporter metrics + +In addition to the the standard +[exporterhelper](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md) +and +[obsreport](https://pkg.go.dev/go.opentelemetry.io/collector/obsreport) +metrics, this component provides network-level measurement instruments +which we anticipate will become part of `exporterhelper` and/or +`obsreport` in the future. At the `normal` level of metrics detail: + +- `exporter_sent`: uncompressed bytes sent, prior to compression +- `exporter_sent_wire`: compressed bytes sent, on the wire. + +Arrow's compression performance can be derived by dividing the average +`exporter_sent` value by the average `exporter_sent_wire` value. + +At the `detailed` metrics detail level, information about the stream +of data being returned to the exporter will be instrumented: + +- `exporter_recv`: uncompressed bytes received, prior to compression +- `exporter_recv_wire`: compressed bytes received, on the wire. + +### Compression Configuration + +The exporter supports configuring Zstd compression at both the gRPC +and the Arrow level. The exporter metrics described above will be +correct in either case. The default settings are subject to change as +we gain experience. + +See the Collector [compression +comparison](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configgrpc/README.md#compression-comparison) +for general information about the choice of Zstd by default, for other +general compression configuration and benchmark information. + +For the OpenTelemetry Protocol with Apache Arrow streams specifically, +gRPC-level the Zstd compression level can be configured. However, +there is an important caveat: the gRPC-Go library requires that +compressor implementations be registered statically. These libraries +use compressors named `zstdarrow1`, `zstdarrow2`, ..., `zstdarrow10`, +supporting 10 configurable compression levels. Note, however that +these configurations are static and only one unique configuration is +possible per level. It is possible to configure multiple +OpenTelemetry Protocol with Apache Arrow exporters with different Zstd +configuration simply by using distinct levels. + +Under `arrow`, the `zstd` sub-configuration has the following fields: + +- `level`: in the range 1-10 determines a number of defaults (default 5) +- `window_size_mib`: size of the Zstd window in MiB, 0 indicates to determine based on level (default 0) +- `concurrency`: controls background CPU used for compression, 0 indicates to let `zstd` library decide (default 1) + +The exporter supports configuring compression at the [Arrow +columnar-protocol +level](https://arrow.apache.org/docs/format/Columnar.html#format-ipc). + +- `payload_compression`: compression applied at the Arrow IPC level, "none" by default, "zstd" supported. + + payload_compression: zstd # describes Arrow-IPC compression (default "none") + +Compression settings at the Arrow IPC level cannot be further +configured. We do not recommend configuring both payload and +gRPC-level compression at once, hwoever these settings are +independent. + +For example, two exporters may be configured with multiple zstd +configurations, provided they use different levels: + +```yaml +exporters: + otelarrow/best: + compression: zstd # describes gRPC-level compression (default "zstd") + arrow: + zstd: + level: 10 # describes gRPC-level compression level (default 5) + otelarrow/fastest: + compression: zstd + arrow: + zstd: + level: 1 # 1 is the "fastest" compression level +``` diff --git a/exporter/otelarrowexporter/config.go b/exporter/otelarrowexporter/config.go new file mode 100644 index 000000000000..96f5cb7d7c06 --- /dev/null +++ b/exporter/otelarrowexporter/config.go @@ -0,0 +1,126 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelarrowexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/otelarrowexporter" + +import ( + "fmt" + "time" + + "github.com/open-telemetry/otel-arrow/collector/compression/zstd" + "github.com/open-telemetry/otel-arrow/pkg/config" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configcompression" + "go.opentelemetry.io/collector/config/configgrpc" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/exporter/exporterhelper" + "google.golang.org/grpc" +) + +// Config defines configuration for OTLP exporter. +type Config struct { + // Timeout, Retry, Queue, and gRPC client settings are + // inherited from exporterhelper using field names + // intentionally identical to the core OTLP exporter. + + exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + exporterhelper.QueueSettings `mapstructure:"sending_queue"` + + RetrySettings configretry.BackOffConfig `mapstructure:"retry_on_failure"` + + configgrpc.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + + // Arrow includes settings specific to OTel Arrow. + Arrow ArrowSettings `mapstructure:"arrow"` + + // UserDialOptions cannot be configured via `mapstructure` + // schemes. This is useful for custom purposes where the + // exporter is built and configured via code instead of yaml. + // Uses include custom dialer, custom user-agent, etc. + UserDialOptions []grpc.DialOption `mapstructure:"-"` +} + +// ArrowSettings includes whether Arrow is enabled and the number of +// concurrent Arrow streams. +type ArrowSettings struct { + // NumStreams determines the number of OTel Arrow streams. + NumStreams int `mapstructure:"num_streams"` + + // MaxStreamLifetime should be set to less than the value of + // grpc: keepalive: max_connection_age_grace plus the timeout. + MaxStreamLifetime time.Duration `mapstructure:"max_stream_lifetime"` + + // Zstd settings apply to OTel-Arrow use of gRPC specifically. + // Note that when multiple Otel-Arrow exporters are configured + // their settings will be applied in arbitrary order. + // Identical Zstd settings are recommended when multiple + // OTel-Arrow exporters are in use. + Zstd zstd.EncoderConfig `mapstructure:"zstd"` + + // PayloadCompression is applied on the Arrow IPC stream + // internally and may have different results from using + // gRPC-level compression. This is disabled by default, since + // gRPC-level compression is enabled by default. This can be + // set to "zstd" to turn on Arrow-Zstd compression. + // Note that `Zstd` applies to gRPC, not Arrow compression. + PayloadCompression configcompression.Type `mapstructure:"payload_compression"` + + // Disabled prevents using OTel Arrow streams. The exporter + // falls back to standard OTLP. + Disabled bool `mapstructure:"disabled"` + + // DisableDowngrade prevents this exporter from fallback back + // to standard OTLP. If the Arrow service is unavailable, it + // will retry and/or fail. + DisableDowngrade bool `mapstructure:"disable_downgrade"` +} + +var _ component.Config = (*Config)(nil) + +// Validate checks if the exporter configuration is valid +func (cfg *Config) Validate() error { + if err := cfg.QueueSettings.Validate(); err != nil { + return fmt.Errorf("queue settings has invalid configuration: %w", err) + } + if err := cfg.Arrow.Validate(); err != nil { + return fmt.Errorf("arrow settings has invalid configuration: %w", err) + } + + return nil +} + +// Validate returns an error when the number of streams is less than 1. +func (cfg *ArrowSettings) Validate() error { + if cfg.NumStreams < 1 { + return fmt.Errorf("stream count must be > 0: %d", cfg.NumStreams) + } + + if cfg.MaxStreamLifetime.Seconds() < 1 { + return fmt.Errorf("max stream life must be >= 1s: %d", cfg.MaxStreamLifetime) + } + + if err := cfg.Zstd.Validate(); err != nil { + return fmt.Errorf("zstd encoder: invalid configuration: %w", err) + } + + // The cfg.PayloadCompression field is validated by the underlying library, + // but we only support Zstd or none. + switch cfg.PayloadCompression { + case "none", "", configcompression.TypeZstd: + default: + return fmt.Errorf("unsupported payload compression: %s", cfg.PayloadCompression) + } + return nil +} + +func (cfg *ArrowSettings) toArrowProducerOptions() (arrowOpts []config.Option) { + switch cfg.PayloadCompression { + case configcompression.TypeZstd: + arrowOpts = append(arrowOpts, config.WithZstd()) + case "none", "": + arrowOpts = append(arrowOpts, config.WithNoZstd()) + default: + // Should have failed in validate, nothing we can do. + } + return +} diff --git a/exporter/otelarrowexporter/config_test.go b/exporter/otelarrowexporter/config_test.go new file mode 100644 index 000000000000..e855fa078d57 --- /dev/null +++ b/exporter/otelarrowexporter/config_test.go @@ -0,0 +1,151 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelarrowexporter + +import ( + "math" + "path/filepath" + "testing" + "time" + + "github.com/open-telemetry/otel-arrow/collector/compression/zstd" + "github.com/open-telemetry/otel-arrow/pkg/config" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configauth" + "go.opentelemetry.io/collector/config/configcompression" + "go.opentelemetry.io/collector/config/configgrpc" + "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/config/configtls" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter/exporterhelper" +) + +func TestUnmarshalDefaultConfig(t *testing.T) { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "default.yaml")) + require.NoError(t, err) + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.Equal(t, factory.CreateDefaultConfig(), cfg) + assert.Equal(t, "round_robin", cfg.(*Config).ClientConfig.BalancerName) +} + +func TestUnmarshalConfig(t *testing.T) { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.Equal(t, + &Config{ + TimeoutSettings: exporterhelper.TimeoutSettings{ + Timeout: 10 * time.Second, + }, + RetrySettings: configretry.BackOffConfig{ + Enabled: true, + InitialInterval: 10 * time.Second, + RandomizationFactor: 0.7, + Multiplier: 1.3, + MaxInterval: 1 * time.Minute, + MaxElapsedTime: 10 * time.Minute, + }, + QueueSettings: exporterhelper.QueueSettings{ + Enabled: true, + NumConsumers: 2, + QueueSize: 10, + }, + ClientConfig: configgrpc.ClientConfig{ + Headers: map[string]configopaque.String{ + "can you have a . here?": "F0000000-0000-0000-0000-000000000000", + "header1": "234", + "another": "somevalue", + }, + Endpoint: "1.2.3.4:1234", + Compression: "none", + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ + CAFile: "/var/lib/mycert.pem", + }, + Insecure: false, + }, + Keepalive: &configgrpc.KeepaliveClientConfig{ + Time: 20 * time.Second, + PermitWithoutStream: true, + Timeout: 30 * time.Second, + }, + WriteBufferSize: 512 * 1024, + BalancerName: "experimental", + Auth: &configauth.Authentication{AuthenticatorID: component.MustNewID("nop")}, + }, + Arrow: ArrowSettings{ + NumStreams: 2, + MaxStreamLifetime: 2 * time.Hour, + PayloadCompression: configcompression.TypeZstd, + Zstd: zstd.DefaultEncoderConfig(), + }, + }, cfg) +} + +func TestArrowSettingsValidate(t *testing.T) { + settings := func(enabled bool, numStreams int, maxStreamLifetime time.Duration, level zstd.Level) *ArrowSettings { + return &ArrowSettings{ + Disabled: !enabled, + NumStreams: numStreams, + MaxStreamLifetime: maxStreamLifetime, + Zstd: zstd.EncoderConfig{ + Level: level, + }, + } + } + require.NoError(t, settings(true, 1, 10*time.Second, zstd.DefaultLevel).Validate()) + require.NoError(t, settings(false, 1, 10*time.Second, zstd.DefaultLevel).Validate()) + require.NoError(t, settings(true, 2, 1*time.Second, zstd.DefaultLevel).Validate()) + require.NoError(t, settings(true, math.MaxInt, 10*time.Second, zstd.DefaultLevel).Validate()) + require.NoError(t, settings(true, math.MaxInt, 10*time.Second, zstd.MaxLevel).Validate()) + require.NoError(t, settings(true, math.MaxInt, 10*time.Second, zstd.MinLevel).Validate()) + + require.Error(t, settings(true, 0, 10*time.Second, zstd.DefaultLevel).Validate()) + require.Contains(t, settings(true, 0, 10*time.Second, zstd.DefaultLevel).Validate().Error(), "stream count must be") + require.Contains(t, settings(true, 1, -1*time.Second, zstd.DefaultLevel).Validate().Error(), "max stream life must be") + require.Error(t, settings(false, -1, 10*time.Second, zstd.DefaultLevel).Validate()) + require.Error(t, settings(false, 1, -1*time.Second, zstd.DefaultLevel).Validate()) + require.Error(t, settings(true, math.MinInt, 10*time.Second, zstd.DefaultLevel).Validate()) + require.Error(t, settings(true, math.MaxInt, 10*time.Second, zstd.MinLevel-1).Validate()) + require.Error(t, settings(true, math.MaxInt, 10*time.Second, zstd.MaxLevel+1).Validate()) +} + +func TestDefaultSettingsValid(t *testing.T) { + cfg := createDefaultConfig() + // this must be set by the user and config + // validation always checks that a value is set. + cfg.(*Config).Arrow.MaxStreamLifetime = 2 * time.Second + require.NoError(t, cfg.(*Config).Validate()) +} + +func TestArrowSettingsPayloadCompressionZstd(t *testing.T) { + settings := ArrowSettings{ + PayloadCompression: configcompression.TypeZstd, + } + var config config.Config + for _, opt := range settings.toArrowProducerOptions() { + opt(&config) + } + require.True(t, config.Zstd) +} + +func TestArrowSettingsPayloadCompressionNone(t *testing.T) { + for _, value := range []string{"", "none"} { + settings := ArrowSettings{ + PayloadCompression: configcompression.Type(value), + } + var config config.Config + for _, opt := range settings.toArrowProducerOptions() { + opt(&config) + } + require.False(t, config.Zstd) + } +} diff --git a/exporter/otelarrowexporter/doc.go b/exporter/otelarrowexporter/doc.go new file mode 100644 index 000000000000..e76c5e35612b --- /dev/null +++ b/exporter/otelarrowexporter/doc.go @@ -0,0 +1,10 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +// Package otelarrowexporter exports telemetry using OpenTelemetry +// Protocol with Apache Arrow and/or standard OpenTelemetry Protocol +// data using configuration structures similar to the core OTLP +// exporter. +package otelarrowexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/otelarrowexporter" diff --git a/exporter/otelarrowexporter/factory.go b/exporter/otelarrowexporter/factory.go new file mode 100644 index 000000000000..edc1c5f2c3fc --- /dev/null +++ b/exporter/otelarrowexporter/factory.go @@ -0,0 +1,146 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelarrowexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/otelarrowexporter" + +import ( + "context" + "runtime" + "time" + + arrowpb "github.com/open-telemetry/otel-arrow/api/experimental/arrow/v1" + "github.com/open-telemetry/otel-arrow/collector/compression/zstd" + "github.com/open-telemetry/otel-arrow/collector/netstats" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configcompression" + "go.opentelemetry.io/collector/config/configgrpc" + "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exporterhelper" + "google.golang.org/grpc" + + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/otelarrowexporter/internal/arrow" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/otelarrowexporter/internal/metadata" +) + +// NewFactory creates a factory for OTel-Arrow exporter. +func NewFactory() exporter.Factory { + return exporter.NewFactory( + metadata.Type, + createDefaultConfig, + exporter.WithTraces(createTracesExporter, metadata.TracesStability), + exporter.WithMetrics(createMetricsExporter, metadata.MetricsStability), + exporter.WithLogs(createLogsExporter, metadata.LogsStability), + ) +} + +func createDefaultConfig() component.Config { + return &Config{ + TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), + RetrySettings: configretry.NewDefaultBackOffConfig(), + QueueSettings: exporterhelper.NewDefaultQueueSettings(), + + ClientConfig: configgrpc.ClientConfig{ + Headers: map[string]configopaque.String{}, + // Default to zstd compression + Compression: configcompression.TypeZstd, + // We almost read 0 bytes, so no need to tune ReadBufferSize. + WriteBufferSize: 512 * 1024, + // The `configgrpc` default is pick_first, + // which is not great for OTel Arrow exporters + // because it concentrates load at a single + // destination. + BalancerName: "round_robin", + }, + Arrow: ArrowSettings{ + NumStreams: runtime.NumCPU(), + MaxStreamLifetime: time.Hour, + + Zstd: zstd.DefaultEncoderConfig(), + + // PayloadCompression is off by default because gRPC + // compression is on by default, above. + PayloadCompression: "", + }, + } +} + +func (e *baseExporter) helperOptions() []exporterhelper.Option { + return []exporterhelper.Option{ + exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), + exporterhelper.WithTimeout(e.config.TimeoutSettings), + exporterhelper.WithRetry(e.config.RetrySettings), + exporterhelper.WithQueue(e.config.QueueSettings), + exporterhelper.WithStart(e.start), + exporterhelper.WithShutdown(e.shutdown), + } +} + +func gRPCName(desc grpc.ServiceDesc) string { + return netstats.GRPCStreamMethodName(desc, desc.Streams[0]) +} + +var ( + arrowTracesMethod = gRPCName(arrowpb.ArrowTracesService_ServiceDesc) + arrowMetricsMethod = gRPCName(arrowpb.ArrowMetricsService_ServiceDesc) + arrowLogsMethod = gRPCName(arrowpb.ArrowLogsService_ServiceDesc) +) + +func createArrowTracesStream(conn *grpc.ClientConn) arrow.StreamClientFunc { + return arrow.MakeAnyStreamClient(arrowTracesMethod, arrowpb.NewArrowTracesServiceClient(conn).ArrowTraces) +} + +func createTracesExporter( + ctx context.Context, + set exporter.CreateSettings, + cfg component.Config, +) (exporter.Traces, error) { + exp, err := newExporter(cfg, set, createArrowTracesStream) + if err != nil { + return nil, err + } + return exporterhelper.NewTracesExporter(ctx, exp.settings, exp.config, + exp.pushTraces, + exp.helperOptions()..., + ) +} + +func createArrowMetricsStream(conn *grpc.ClientConn) arrow.StreamClientFunc { + return arrow.MakeAnyStreamClient(arrowMetricsMethod, arrowpb.NewArrowMetricsServiceClient(conn).ArrowMetrics) +} + +func createMetricsExporter( + ctx context.Context, + set exporter.CreateSettings, + cfg component.Config, +) (exporter.Metrics, error) { + exp, err := newExporter(cfg, set, createArrowMetricsStream) + if err != nil { + return nil, err + } + return exporterhelper.NewMetricsExporter(ctx, exp.settings, exp.config, + exp.pushMetrics, + exp.helperOptions()..., + ) +} + +func createArrowLogsStream(conn *grpc.ClientConn) arrow.StreamClientFunc { + return arrow.MakeAnyStreamClient(arrowLogsMethod, arrowpb.NewArrowLogsServiceClient(conn).ArrowLogs) +} + +func createLogsExporter( + ctx context.Context, + set exporter.CreateSettings, + cfg component.Config, +) (exporter.Logs, error) { + exp, err := newExporter(cfg, set, createArrowLogsStream) + if err != nil { + return nil, err + } + return exporterhelper.NewLogsExporter(ctx, exp.settings, exp.config, + exp.pushLogs, + exp.helperOptions()..., + ) +} diff --git a/exporter/otelarrowexporter/factory_test.go b/exporter/otelarrowexporter/factory_test.go new file mode 100644 index 000000000000..45d20e553288 --- /dev/null +++ b/exporter/otelarrowexporter/factory_test.go @@ -0,0 +1,235 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelarrowexporter + +import ( + "context" + "path/filepath" + "runtime" + "testing" + "time" + + "github.com/open-telemetry/otel-arrow/collector/compression/zstd" + "github.com/open-telemetry/otel-arrow/collector/testutil" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configcompression" + "go.opentelemetry.io/collector/config/configgrpc" + "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/config/configtls" + "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/exporter/exportertest" +) + +func TestCreateDefaultConfig(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + assert.NotNil(t, cfg, "failed to create default config") + assert.NoError(t, componenttest.CheckConfigStruct(cfg)) + ocfg, ok := factory.CreateDefaultConfig().(*Config) + assert.True(t, ok) + assert.Equal(t, ocfg.RetrySettings, configretry.NewDefaultBackOffConfig()) + assert.Equal(t, ocfg.QueueSettings, exporterhelper.NewDefaultQueueSettings()) + assert.Equal(t, ocfg.TimeoutSettings, exporterhelper.NewDefaultTimeoutSettings()) + assert.Equal(t, ocfg.Compression, configcompression.TypeZstd) + assert.Equal(t, ocfg.Arrow, ArrowSettings{ + Disabled: false, + NumStreams: runtime.NumCPU(), + MaxStreamLifetime: time.Hour, + PayloadCompression: "", + Zstd: zstd.DefaultEncoderConfig(), + }) +} + +func TestCreateMetricsExporter(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.ClientConfig.Endpoint = testutil.GetAvailableLocalAddress(t) + + set := exportertest.NewNopCreateSettings() + oexp, err := factory.CreateMetricsExporter(context.Background(), set, cfg) + require.Nil(t, err) + require.NotNil(t, oexp) +} + +func TestCreateTracesExporter(t *testing.T) { + endpoint := testutil.GetAvailableLocalAddress(t) + tests := []struct { + name string + config Config + mustFailOnCreate bool + mustFailOnStart bool + }{ + { + name: "NoEndpoint", + config: Config{ + ClientConfig: configgrpc.ClientConfig{ + Endpoint: "", + }, + }, + mustFailOnCreate: true, + }, + { + name: "UseSecure", + config: Config{ + ClientConfig: configgrpc.ClientConfig{ + Endpoint: endpoint, + TLSSetting: configtls.ClientConfig{ + Insecure: false, + }, + }, + }, + }, + { + name: "Keepalive", + config: Config{ + ClientConfig: configgrpc.ClientConfig{ + Endpoint: endpoint, + Keepalive: &configgrpc.KeepaliveClientConfig{ + Time: 30 * time.Second, + Timeout: 25 * time.Second, + PermitWithoutStream: true, + }, + }, + }, + }, + { + name: "NoneCompression", + config: Config{ + ClientConfig: configgrpc.ClientConfig{ + Endpoint: endpoint, + Compression: "none", + }, + }, + }, + { + name: "GzipCompression", + config: Config{ + ClientConfig: configgrpc.ClientConfig{ + Endpoint: endpoint, + Compression: configcompression.TypeGzip, + }, + }, + }, + { + name: "SnappyCompression", + config: Config{ + ClientConfig: configgrpc.ClientConfig{ + Endpoint: endpoint, + Compression: configcompression.TypeSnappy, + }, + }, + }, + { + name: "ZstdCompression", + config: Config{ + ClientConfig: configgrpc.ClientConfig{ + Endpoint: endpoint, + Compression: configcompression.TypeZstd, + }, + }, + }, + { + name: "Headers", + config: Config{ + ClientConfig: configgrpc.ClientConfig{ + Endpoint: endpoint, + Headers: map[string]configopaque.String{ + "hdr1": "val1", + "hdr2": "val2", + }, + }, + }, + }, + { + name: "NumConsumers", + config: Config{ + ClientConfig: configgrpc.ClientConfig{ + Endpoint: endpoint, + }, + }, + }, + { + name: "CaCert", + config: Config{ + ClientConfig: configgrpc.ClientConfig{ + Endpoint: endpoint, + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ + CAFile: filepath.Join("testdata", "test_cert.pem"), + }, + }, + }, + }, + }, + { + name: "CertPemFileError", + config: Config{ + ClientConfig: configgrpc.ClientConfig{ + Endpoint: endpoint, + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ + CAFile: "nosuchfile", + }, + }, + }, + }, + mustFailOnStart: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + factory := NewFactory() + set := exportertest.NewNopCreateSettings() + config := tt.config + consumer, err := factory.CreateTracesExporter(context.Background(), set, &config) + if tt.mustFailOnCreate { + assert.NotNil(t, err) + return + } + assert.NoError(t, err) + assert.NotNil(t, consumer) + err = consumer.Start(context.Background(), componenttest.NewNopHost()) + if tt.mustFailOnStart { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + // Shutdown is called even when Start fails + err = consumer.Shutdown(context.Background()) + if err != nil { + // Since the endpoint of OTLP exporter doesn't actually exist, + // exporter may already stop because it cannot connect. + assert.Equal(t, err.Error(), "rpc error: code = Canceled desc = grpc: the client connection is closing") + } + }) + } +} + +func TestCreateLogsExporter(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.ClientConfig.Endpoint = testutil.GetAvailableLocalAddress(t) + + set := exportertest.NewNopCreateSettings() + oexp, err := factory.CreateLogsExporter(context.Background(), set, cfg) + require.Nil(t, err) + require.NotNil(t, oexp) +} + +func TestCreateArrowTracesExporter(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.ClientConfig.Endpoint = testutil.GetAvailableLocalAddress(t) + cfg.Arrow = ArrowSettings{ + NumStreams: 1, + } + set := exportertest.NewNopCreateSettings() + oexp, err := factory.CreateTracesExporter(context.Background(), set, cfg) + require.Nil(t, err) + require.NotNil(t, oexp) +} diff --git a/exporter/otelarrowexporter/go.mod b/exporter/otelarrowexporter/go.mod new file mode 100644 index 000000000000..91a1bac6b07f --- /dev/null +++ b/exporter/otelarrowexporter/go.mod @@ -0,0 +1,82 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/otelarrowexporter + +go 1.21 + +require ( + github.com/open-telemetry/otel-arrow v0.18.0 + github.com/open-telemetry/otel-arrow/collector v0.20.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configauth v0.98.0 + go.opentelemetry.io/collector/config/configcompression v1.5.0 + go.opentelemetry.io/collector/config/configgrpc v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + google.golang.org/grpc v1.63.2 +) + +require ( + github.com/apache/arrow/go/v14 v14.0.2 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // 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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/goccy/go-json v0.10.2 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect + github.com/google/flatbuffers v23.5.26+incompatible // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.17.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.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mostynb/go-grpc-compression v1.2.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/zeebo/xxh3 v1.0.2 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/mod v0.13.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.14.0 // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/exporter/otelarrowexporter/go.sum b/exporter/otelarrowexporter/go.sum new file mode 100644 index 000000000000..714d7d65c473 --- /dev/null +++ b/exporter/otelarrowexporter/go.sum @@ -0,0 +1,208 @@ +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/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.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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.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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +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/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.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/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/open-telemetry/otel-arrow v0.18.0 h1:v3KH1HIpdXRy+V5awAmn2M+uthbE52Qi7svBYSweASI= +github.com/open-telemetry/otel-arrow v0.18.0/go.mod h1:054cuTUlLVHH6Y//65bEPeMiHjYRs7DiX/el+yQbgYg= +github.com/open-telemetry/otel-arrow/collector v0.20.0 h1:DWo3OK2kvmGXcgoTc7dRBrADuwu0PKX31KcG/q7fElk= +github.com/open-telemetry/otel-arrow/collector v0.20.0/go.mod h1:MDDGj7VCOA6ya0d+xbPneynT5gC7TCHV3vVeXDEo41g= +github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= +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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +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.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +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.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.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-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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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.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.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +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-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +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/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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/exporter/otelarrowexporter/internal/arrow/exporter.go b/exporter/otelarrowexporter/internal/arrow/exporter.go new file mode 100644 index 000000000000..e4b2d766511b --- /dev/null +++ b/exporter/otelarrowexporter/internal/arrow/exporter.go @@ -0,0 +1,44 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package arrow // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/otelarrowexporter/internal/arrow" + +import ( + "context" + + arrowpb "github.com/open-telemetry/otel-arrow/api/experimental/arrow/v1" + "google.golang.org/grpc" +) + +// Exporter exports OpenTelemetry Protocol with Apache Arrow protocol +// data for a specific signal. One of these structs is created per +// baseExporter, in the top-level module, when Arrow is enabled. +type Exporter struct { + // TODO: Implementation +} + +// AnyStreamClient is the interface supported by all Arrow streams, +// i.e., any of the Arrow-supported signals having a single method w/ +// the appropriate per-signal name. +type AnyStreamClient interface { + Send(*arrowpb.BatchArrowRecords) error + Recv() (*arrowpb.BatchStatus, error) + grpc.ClientStream +} + +// StreamClientFunc is a constructor for AnyStreamClients. These return +// the method name to assist with instrumentation, since the gRPC stats +// handler isn't able to see the correct uncompressed size. +type StreamClientFunc func(context.Context, ...grpc.CallOption) (AnyStreamClient, string, error) + +// MakeAnyStreamClient accepts any Arrow-like stream, which is one of +// the Arrow-supported signals having a single method w/ the +// appropriate name, and turns it into an AnyStreamClient. The method +// name is carried through because once constructed, gRPC clients will +// not reveal their service and method names. +func MakeAnyStreamClient[T AnyStreamClient](method string, clientFunc func(ctx context.Context, opts ...grpc.CallOption) (T, error)) StreamClientFunc { + return func(ctx context.Context, opts ...grpc.CallOption) (AnyStreamClient, string, error) { + client, err := clientFunc(ctx, opts...) + return client, method, err + } +} diff --git a/exporter/otelarrowexporter/internal/metadata/generated_status.go b/exporter/otelarrowexporter/internal/metadata/generated_status.go new file mode 100644 index 000000000000..23f908751c9c --- /dev/null +++ b/exporter/otelarrowexporter/internal/metadata/generated_status.go @@ -0,0 +1,27 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("otelarrow") +) + +const ( + TracesStability = component.StabilityLevelDevelopment + MetricsStability = component.StabilityLevelDevelopment + LogsStability = component.StabilityLevelDevelopment +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/otelarrow") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/otelarrow") +} diff --git a/exporter/otelarrowexporter/metadata.yaml b/exporter/otelarrowexporter/metadata.yaml new file mode 100644 index 000000000000..59ac44f0a15b --- /dev/null +++ b/exporter/otelarrowexporter/metadata.yaml @@ -0,0 +1,15 @@ +type: otelarrow +scope_name: otelcol/otelarrow + +status: + class: exporter + stability: + development: [traces, metrics, logs] + distributions: [] + codeowners: + active: [jmacd, moh-osman3] + +# TODO: Update the exporter to pass the tests +tests: + skip_lifecycle: true + skip_shutdown: true diff --git a/exporter/otelarrowexporter/otelarrow.go b/exporter/otelarrowexporter/otelarrow.go new file mode 100644 index 000000000000..c1e689e3c01a --- /dev/null +++ b/exporter/otelarrowexporter/otelarrow.go @@ -0,0 +1,78 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelarrowexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/otelarrowexporter" + +import ( + "context" + "errors" + "fmt" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "google.golang.org/grpc" + + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/otelarrowexporter/internal/arrow" +) + +// baseExporter is used as the basis for all OpenTelemetry signal types. +type baseExporter struct { + // config is the active component.Config. + config *Config + + // settings are the active collector-wide settings. + settings exporter.CreateSettings + + // TODO: implementation +} + +type streamClientFactory func(conn *grpc.ClientConn) arrow.StreamClientFunc + +// newExporter configures a new exporter using the associated stream factory for Arrow. +func newExporter(cfg component.Config, set exporter.CreateSettings, _ streamClientFactory) (*baseExporter, error) { + // TODO: Implementation. + oCfg, ok := cfg.(*Config) + if !ok { + return nil, fmt.Errorf("unrecognized configuration type: %T", cfg) + } + if oCfg.Endpoint == "" { + return nil, errors.New("OTel-Arrow exporter config requires an Endpoint") + } + return &baseExporter{ + config: oCfg, + settings: set, + }, nil +} + +// start configures and starts the gRPC client connection. +func (e *baseExporter) start(ctx context.Context, host component.Host) (err error) { + // TODO: Implementation: the following is a placeholder used + // to satisfy gRPC configuration-related configuration errors. + if _, err = e.config.ClientConfig.ToClientConn(ctx, host, e.settings.TelemetrySettings); err != nil { + return err + } + return nil +} + +func (e *baseExporter) shutdown(_ context.Context) error { + // TODO: Implementation. + return nil +} + +func (e *baseExporter) pushTraces(_ context.Context, _ ptrace.Traces) error { + // TODO: Implementation. + return nil +} + +func (e *baseExporter) pushMetrics(_ context.Context, _ pmetric.Metrics) error { + // TODO: Implementation. + return nil +} + +func (e *baseExporter) pushLogs(_ context.Context, _ plog.Logs) error { + // TODO: Implementation. + return nil +} diff --git a/exporter/otelarrowexporter/testdata/config.yaml b/exporter/otelarrowexporter/testdata/config.yaml new file mode 100644 index 000000000000..46134951f462 --- /dev/null +++ b/exporter/otelarrowexporter/testdata/config.yaml @@ -0,0 +1,32 @@ +endpoint: "1.2.3.4:1234" +compression: "none" +tls: + ca_file: /var/lib/mycert.pem +timeout: 10s +sending_queue: + enabled: true + num_consumers: 2 + queue_size: 10 +retry_on_failure: + enabled: true + initial_interval: 10s + randomization_factor: 0.7 + multiplier: 1.3 + max_interval: 60s + max_elapsed_time: 10m +auth: + authenticator: nop +headers: + "can you have a . here?": "F0000000-0000-0000-0000-000000000000" + header1: 234 + another: "somevalue" +keepalive: + time: 20s + timeout: 30s + permit_without_stream: true +balancer_name: "experimental" +arrow: + num_streams: 2 + disabled: false + max_stream_lifetime: 2h + payload_compression: "zstd" diff --git a/exporter/otelarrowexporter/testdata/default.yaml b/exporter/otelarrowexporter/testdata/default.yaml new file mode 100644 index 000000000000..458203eaedb7 --- /dev/null +++ b/exporter/otelarrowexporter/testdata/default.yaml @@ -0,0 +1 @@ +# when nothing is set diff --git a/exporter/otelarrowexporter/testdata/test_cert.pem b/exporter/otelarrowexporter/testdata/test_cert.pem new file mode 100644 index 000000000000..b3842e597a23 --- /dev/null +++ b/exporter/otelarrowexporter/testdata/test_cert.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICpDCCAYwCCQC5oaFsqLW3GTANBgkqhkiG9w0BAQsFADAUMRIwEAYDVQQDDAls +b2NhbGhvc3QwHhcNMjEwNzE0MDAxMzU2WhcNMzEwNzEyMDAxMzU2WjAUMRIwEAYD +VQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDO +mKaE1qg5VLMwaUnSzufT23rRJFbuy/HDXwsH63yZVSsISQkGjkBYBgrqAMtVnsI/ +l4gXtBWkZtJFs68Sbo9ps3W0PdB5+d12R5NUNA1rkZtx3jtEN33dpGhifug/TIZe +7Zr0G1z6gNoaEezk0Jpg4KsH7QpIeHPRhIZMyWeqddgD/qL4/ukaU4NOORuF3WoT +oo2LpI3jUq66mz2N2Inq0V/OX7BYB4Ur6EtjWh2baiUuw9fq+oLUlgZd6ypnugC/ ++YfgYqvWtRntmEr0Z+O4Kz81P2IpH/0h1RFhWyK6thVGa9cx6aseCp3V2cMXfGfc +z4n3Uvz87v+bZvGbcse/AgMBAAEwDQYJKoZIhvcNAQELBQADggEBAAlvNBNoqXUQ +ohR0eozIHGeJ94U7WK5zXf2NSvmRlwHzHXvUq6GKd+8Bv1foMjI6OpSOZmjtRGsc +rWET1WjSyQddRfqYazhWp1IyYu5LfATwPS+RXJAkWixKVfG+Ta2x6u+aT/bSZwEg +NwRerc6pyqv5UG8Z7Pe1kAxbgOwZv5KXAewIgTSbEkmIp1Dg8GhGeWD5pjYNCkJV +Na2KMAUWP3PeQzdSBKmBNpsRUALuSTxb5u7pl+PA7FLInTtDeyZn8xpO1GPBhbJE +trDbmTbj5YexOXEaQtGtZ6fwRw2jnUm8nqtXozxIomnVTBO8vLmZAUgyJ71trRw0 +gE9tH5Ndlug= +-----END CERTIFICATE----- diff --git a/exporter/otelarrowexporter/testdata/test_key.pem b/exporter/otelarrowexporter/testdata/test_key.pem new file mode 100644 index 000000000000..dedfad3df6e3 --- /dev/null +++ b/exporter/otelarrowexporter/testdata/test_key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDOmKaE1qg5VLMw +aUnSzufT23rRJFbuy/HDXwsH63yZVSsISQkGjkBYBgrqAMtVnsI/l4gXtBWkZtJF +s68Sbo9ps3W0PdB5+d12R5NUNA1rkZtx3jtEN33dpGhifug/TIZe7Zr0G1z6gNoa +Eezk0Jpg4KsH7QpIeHPRhIZMyWeqddgD/qL4/ukaU4NOORuF3WoToo2LpI3jUq66 +mz2N2Inq0V/OX7BYB4Ur6EtjWh2baiUuw9fq+oLUlgZd6ypnugC/+YfgYqvWtRnt +mEr0Z+O4Kz81P2IpH/0h1RFhWyK6thVGa9cx6aseCp3V2cMXfGfcz4n3Uvz87v+b +ZvGbcse/AgMBAAECggEADeR39iDVKR3H+u5pl3JwZm+w35V4/w/ZzxB6FmtAcrMm +dKUspTM1onWtkDTDd5t4ZnxTG3zxo5+Cbkt571xd6na16Ivrk/g4aza+8n+Zk200 +LcEK7ThqD1h56H2uMmt78bA6pkWcx/+YKv6flndsmi0hcyP+eAcZirJFsa4teWna +P6rhI9zThc9OcecqGZIlmzJQ4cLbIO86QqkWW6yjKYg6riOb2g+i3e97ZngMCTcV +lni+sksLlXBNKPqh1AkiUFe4pInRBh4LGQ5rNSYswEqlQY0iW0u4Hs3HNou0On+8 +1T8m5wzKQ+23AN+vVRJ/MHssQiB/TPK92jXVgEz6eQKBgQD2GEb7NzDIxsAQZBQo +tt3jYitNcAEqMWeT7wxCMMue4wIrT6Fp6NuG5NMVqLglzx72m6TXg7YzZxPrAnlH +jblWI4sxwVC8BjjYyGud7qMuhUIZmI8aS9HuYW0ODSxkcpVVXd4HDUYKg7PafAkl +cj745E5KGD+qW44KASTTQ1SwRQKBgQDW6WLp/nPVPO5YEK4nzS7b1RRC8ypHiKd6 +LzhA2izgcsmO3F3Y5ZZ5rzeFbjgZiGFTUB/r1mgomI8kZyIGP1AN6o8oY9I89gHY +/DEEagIsFK5jAEoMeN0qbgqasOXpi+uUHCNidWa7OWOL9Rsh7dyVT54xcqMC2Qak +Vpoy5miiMwKBgQDuOHH9nF9M+5fQRhB9mQcRpWXlgBagkVKCkVR8fl+dXoIrCtpl +e1OGMNtki/42G1kNv3zCYm1tNMrDI5HjAf32tFF5yHguipdcwiXqq6aq0bQ6ssNT +4TFGYGkAwR/H3GNST5stmFvEsdjYFlmENiNfKyHd97spXZcReCn9l5/TQQKBgDRG +PpYWG4zBrmPjYskxonU8ZhpG1YDi34Hb3H4B06qgoSBLv9QTPD/K++FLxv+G6c1/ +DtSpqVo+iYrcPy1v1wQbisjTRv8nA5oI9c9SDcc1HJneJyTTfVBlxdSMtM/TBfFX +ys+XKO7fbbRMYVYmamIzJJJ4hOgba/8rRYSeANN7AoGBAMDdrT+ig3aDMratbAvY +lqsfN3AtxoZ+ZVQYyUbzTSZPZ/to9eNuBzhRKcQ3QfG95nrHb7OnWHa7+1kc4p/Q +jMgzJgRpajlES+F3CCMPgJIJg7Ev+yiSCJLP9ZOsC+E96bK265hUcDyCXwb3Wzmg +4L9sc1QsQW80QO/RnaEzGO51 +-----END PRIVATE KEY----- diff --git a/exporter/prometheusexporter/README.md b/exporter/prometheusexporter/README.md index 752686eba711..c208eaa11abb 100644 --- a/exporter/prometheusexporter/README.md +++ b/exporter/prometheusexporter/README.md @@ -4,18 +4,13 @@ | Status | | | ------------- |-----------| | Stability | [beta]: metrics | -| Distributions | [core], [contrib], [aws], [grafana], [observiq], [redhat], [sumo] | +| Distributions | [core], [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fprometheus%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fprometheus) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fprometheus%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fprometheus) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[grafana]: https://github.com/grafana/agent -[observiq]: https://github.com/observIQ/observiq-otel-collector -[redhat]: https://github.com/os-observability/redhat-opentelemetry-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector Exports data in the [Prometheus format](https://prometheus.io/docs/concepts/data_model/), which allows it to be scraped by a [Prometheus](https://prometheus.io/) server. @@ -24,7 +19,7 @@ Exports data in the [Prometheus format](https://prometheus.io/docs/concepts/data The following settings are required: -- `endpoint` (no default): the address on which metrics will be exposed, using path `/metrics`. For full list of `HTTPServerSettings` refer [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). +- `endpoint` (no default): the address on which metrics will be exposed, using path `/metrics`. For full list of `ServerConfig` refer [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). The following settings can be optionally configured: diff --git a/exporter/prometheusexporter/accumulator.go b/exporter/prometheusexporter/accumulator.go index 62fb29692ef7..e5c7f281092d 100644 --- a/exporter/prometheusexporter/accumulator.go +++ b/exporter/prometheusexporter/accumulator.go @@ -84,7 +84,7 @@ func (a *lastValueAccumulator) addMetric(metric pmetric.Metric, il pcommon.Instr case pmetric.MetricTypeSum: return a.accumulateSum(metric, il, resourceAttrs, now) case pmetric.MetricTypeHistogram: - return a.accumulateDoubleHistogram(metric, il, resourceAttrs, now) + return a.accumulateHistogram(metric, il, resourceAttrs, now) case pmetric.MetricTypeSummary: return a.accumulateSummary(metric, il, resourceAttrs, now) default: @@ -221,42 +221,70 @@ func (a *lastValueAccumulator) accumulateSum(metric pmetric.Metric, il pcommon.I return } -func (a *lastValueAccumulator) accumulateDoubleHistogram(metric pmetric.Metric, il pcommon.InstrumentationScope, resourceAttrs pcommon.Map, now time.Time) (n int) { - doubleHistogram := metric.Histogram() +func (a *lastValueAccumulator) accumulateHistogram(metric pmetric.Metric, il pcommon.InstrumentationScope, resourceAttrs pcommon.Map, now time.Time) (n int) { + histogram := metric.Histogram() + a.logger.Debug("Accumulate histogram.....") + dps := histogram.DataPoints() - // Drop metrics with non-cumulative aggregations - if doubleHistogram.AggregationTemporality() != pmetric.AggregationTemporalityCumulative { - return - } - - dps := doubleHistogram.DataPoints() for i := 0; i < dps.Len(); i++ { ip := dps.At(i) - signature := timeseriesSignature(il.Name(), metric, ip.Attributes(), resourceAttrs) + signature := timeseriesSignature(il.Name(), metric, ip.Attributes(), resourceAttrs) // uniquely identify this time series you are accumulating for if ip.Flags().NoRecordedValue() { a.registeredMetrics.Delete(signature) return 0 } - v, ok := a.registeredMetrics.Load(signature) + v, ok := a.registeredMetrics.Load(signature) // a accumulates metric values for all times series. Get value for particular time series if !ok { + // first data point m := copyMetricMetadata(metric) ip.CopyTo(m.SetEmptyHistogram().DataPoints().AppendEmpty()) + m.Histogram().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) a.registeredMetrics.Store(signature, &accumulatedValue{value: m, resourceAttrs: resourceAttrs, scope: il, updated: now}) n++ continue } mv := v.(*accumulatedValue) - if ip.Timestamp().AsTime().Before(mv.value.Histogram().DataPoints().At(0).Timestamp().AsTime()) { - // only keep datapoint with latest timestamp + m := copyMetricMetadata(metric) + m.SetEmptyHistogram().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + + switch histogram.AggregationTemporality() { + case pmetric.AggregationTemporalityDelta: + pp := mv.value.Histogram().DataPoints().At(0) // previous aggregated value for time range + if ip.StartTimestamp().AsTime() != pp.Timestamp().AsTime() { + // treat misalignment as restart and reset, or violation of single-writer principle and drop + a.logger.With( + zap.String("ip_start_time", ip.StartTimestamp().String()), + zap.String("pp_start_time", pp.StartTimestamp().String()), + zap.String("pp_timestamp", pp.Timestamp().String()), + zap.String("ip_timestamp", ip.Timestamp().String()), + ).Warn("Misaligned starting timestamps") + if ip.StartTimestamp().AsTime().After(pp.Timestamp().AsTime()) { + a.logger.Debug("treating it like reset") + ip.CopyTo(m.Histogram().DataPoints().AppendEmpty()) + } else { + a.logger.With( + zap.String("metric_name", metric.Name()), + ).Warn("Dropped misaligned histogram datapoint") + continue + } + } else { + a.logger.Debug("Accumulate another histogram datapoint") + accumulateHistogramValues(pp, ip, m.Histogram().DataPoints().AppendEmpty()) + } + case pmetric.AggregationTemporalityCumulative: + if ip.Timestamp().AsTime().Before(mv.value.Histogram().DataPoints().At(0).Timestamp().AsTime()) { + // only keep datapoint with latest timestamp + continue + } + + ip.CopyTo(m.Histogram().DataPoints().AppendEmpty()) + default: + // unsupported temporality continue } - - m := copyMetricMetadata(metric) - ip.CopyTo(m.SetEmptyHistogram().DataPoints().AppendEmpty()) - m.Histogram().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) a.registeredMetrics.Store(signature, &accumulatedValue{value: m, resourceAttrs: resourceAttrs, scope: il, updated: now}) n++ } @@ -316,3 +344,42 @@ func copyMetricMetadata(metric pmetric.Metric) pmetric.Metric { return m } + +func accumulateHistogramValues(prev, current, dest pmetric.HistogramDataPoint) { + dest.SetStartTimestamp(prev.StartTimestamp()) + + older := prev + newer := current + if current.Timestamp().AsTime().Before(prev.Timestamp().AsTime()) { + older = current + newer = prev + } + + newer.Attributes().CopyTo(dest.Attributes()) + dest.SetTimestamp(newer.Timestamp()) + + // checking for bucket boundary alignment, optionally re-aggregate on newer boundaries + match := older.ExplicitBounds().Len() == newer.ExplicitBounds().Len() + for i := 0; match && i < newer.ExplicitBounds().Len(); i++ { + match = older.ExplicitBounds().At(i) == newer.ExplicitBounds().At(i) + } + + if match { + + dest.SetCount(newer.Count() + older.Count()) + dest.SetSum(newer.Sum() + older.Sum()) + + counts := make([]uint64, newer.BucketCounts().Len()) + for i := 0; i < newer.BucketCounts().Len(); i++ { + counts[i] = newer.BucketCounts().At(i) + older.BucketCounts().At(i) + } + dest.BucketCounts().FromRaw(counts) + } else { + // use new value if bucket bounds do not match + dest.SetCount(newer.Count()) + dest.SetSum(newer.Sum()) + dest.BucketCounts().FromRaw(newer.BucketCounts().AsRaw()) + } + + dest.ExplicitBounds().FromRaw(newer.ExplicitBounds().AsRaw()) +} diff --git a/exporter/prometheusexporter/accumulator_test.go b/exporter/prometheusexporter/accumulator_test.go index c9b4eb3f7b2b..43b78ced5f01 100644 --- a/exporter/prometheusexporter/accumulator_test.go +++ b/exporter/prometheusexporter/accumulator_test.go @@ -15,48 +15,6 @@ import ( "go.uber.org/zap" ) -func TestAccumulateDeltaAggregation(t *testing.T) { - tests := []struct { - name string - fillMetric func(time.Time, pmetric.Metric) - }{ - { - name: "Histogram", - fillMetric: func(ts time.Time, metric pmetric.Metric) { - metric.SetName("test_metric") - metric.SetEmptyHistogram().SetAggregationTemporality(pmetric.AggregationTemporalityDelta) - metric.SetDescription("test description") - dp := metric.Histogram().DataPoints().AppendEmpty() - dp.BucketCounts().FromRaw([]uint64{5, 2}) - dp.SetCount(7) - dp.ExplicitBounds().FromRaw([]float64{3.5, 10.0}) - dp.SetSum(42.42) - dp.Attributes().PutStr("label_1", "1") - dp.Attributes().PutStr("label_2", "2") - dp.SetTimestamp(pcommon.NewTimestampFromTime(ts)) - }, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - resourceMetrics := pmetric.NewResourceMetrics() - ilm := resourceMetrics.ScopeMetrics().AppendEmpty() - ilm.Scope().SetName("test") - tt.fillMetric(time.Now(), ilm.Metrics().AppendEmpty()) - - a := newAccumulator(zap.NewNop(), 1*time.Hour).(*lastValueAccumulator) - n := a.Accumulate(resourceMetrics) - require.Equal(t, 0, n) - - signature := timeseriesSignature(ilm.Scope().Name(), ilm.Metrics().At(0), pcommon.NewMap(), pcommon.NewMap()) - v, ok := a.registeredMetrics.Load(signature) - require.False(t, ok) - require.Nil(t, v) - }) - } -} - func TestAccumulateMetrics(t *testing.T) { tests := []struct { name string @@ -167,7 +125,7 @@ func TestAccumulateMetrics(t *testing.T) { }, { name: "Summary", - metric: func(ts time.Time, v float64, metrics pmetric.MetricSlice) { + metric: func(ts time.Time, _ float64, metrics pmetric.MetricSlice) { metric := metrics.AppendEmpty() metric.SetName("test_metric") metric.SetDescription("test description") @@ -236,7 +194,7 @@ func TestAccumulateMetrics(t *testing.T) { }, { name: "StalenessMarkerSummary", - metric: func(ts time.Time, v float64, metrics pmetric.MetricSlice) { + metric: func(ts time.Time, _ float64, metrics pmetric.MetricSlice) { metric := metrics.AppendEmpty() metric.SetName("test_metric") metric.SetDescription("test description") @@ -422,6 +380,194 @@ func TestAccumulateDeltaToCumulative(t *testing.T) { } } +func TestAccumulateDeltaToCumulativeHistogram(t *testing.T) { + appendDeltaHistogram := func(startTs time.Time, ts time.Time, count uint64, sum float64, counts []uint64, bounds []float64, metrics pmetric.MetricSlice) { + metric := metrics.AppendEmpty() + metric.SetName("test_metric") + metric.SetEmptyHistogram().SetAggregationTemporality(pmetric.AggregationTemporalityDelta) + metric.SetDescription("test description") + dp := metric.Histogram().DataPoints().AppendEmpty() + dp.ExplicitBounds().FromRaw(bounds) + dp.BucketCounts().FromRaw(counts) + dp.SetCount(count) + dp.SetSum(sum) + dp.Attributes().PutStr("label_1", "1") + dp.Attributes().PutStr("label_2", "2") + dp.SetTimestamp(pcommon.NewTimestampFromTime(ts)) + dp.SetStartTimestamp(pcommon.NewTimestampFromTime(startTs)) + } + + t.Run("AccumulateHappyPath", func(t *testing.T) { + startTs := time.Now().Add(-5 * time.Second) + ts1 := time.Now().Add(-4 * time.Second) + ts2 := time.Now().Add(-3 * time.Second) + resourceMetrics := pmetric.NewResourceMetrics() + ilm := resourceMetrics.ScopeMetrics().AppendEmpty() + ilm.Scope().SetName("test") + appendDeltaHistogram(startTs, ts1, 5, 2.5, []uint64{1, 3, 1, 0, 0}, []float64{0.1, 0.5, 1, 10}, ilm.Metrics()) + appendDeltaHistogram(ts1, ts2, 4, 8.3, []uint64{1, 1, 2, 0, 0}, []float64{0.1, 0.5, 1, 10}, ilm.Metrics()) + + m1 := ilm.Metrics().At(0).Histogram().DataPoints().At(0) + m2 := ilm.Metrics().At(1).Histogram().DataPoints().At(0) + signature := timeseriesSignature(ilm.Scope().Name(), ilm.Metrics().At(0), m2.Attributes(), pcommon.NewMap()) + + a := newAccumulator(zap.NewNop(), 1*time.Hour).(*lastValueAccumulator) + n := a.Accumulate(resourceMetrics) + require.Equal(t, 2, n) + + m, ok := a.registeredMetrics.Load(signature) + v := m.(*accumulatedValue).value.Histogram().DataPoints().At(0) + require.True(t, ok) + + require.Equal(t, m1.Sum()+m2.Sum(), v.Sum()) + require.Equal(t, m1.Count()+m2.Count(), v.Count()) + + for i := 0; i < v.BucketCounts().Len(); i++ { + require.Equal(t, m1.BucketCounts().At(i)+m2.BucketCounts().At(i), v.BucketCounts().At(i)) + } + + for i := 0; i < v.ExplicitBounds().Len(); i++ { + require.Equal(t, m2.ExplicitBounds().At(i), v.ExplicitBounds().At(i)) + } + }) + t.Run("ResetBuckets/Ignore", func(t *testing.T) { + startTs := time.Now().Add(-5 * time.Second) + ts1 := time.Now().Add(-3 * time.Second) + ts2 := time.Now().Add(-4 * time.Second) + resourceMetrics := pmetric.NewResourceMetrics() + ilm := resourceMetrics.ScopeMetrics().AppendEmpty() + ilm.Scope().SetName("test") + appendDeltaHistogram(startTs, ts1, 5, 2.5, []uint64{1, 3, 1, 0, 0}, []float64{0.1, 0.5, 1, 10}, ilm.Metrics()) + appendDeltaHistogram(startTs, ts2, 7, 5, []uint64{3, 1, 1, 0, 0}, []float64{0.1, 0.2, 1, 10}, ilm.Metrics()) + + m1 := ilm.Metrics().At(0).Histogram().DataPoints().At(0) + m2 := ilm.Metrics().At(1).Histogram().DataPoints().At(0) + signature := timeseriesSignature(ilm.Scope().Name(), ilm.Metrics().At(0), m2.Attributes(), pcommon.NewMap()) + + // should ignore metric with different buckets from the past + a := newAccumulator(zap.NewNop(), 1*time.Hour).(*lastValueAccumulator) + n := a.Accumulate(resourceMetrics) + require.Equal(t, 1, n) + + m, ok := a.registeredMetrics.Load(signature) + v := m.(*accumulatedValue).value.Histogram().DataPoints().At(0) + require.True(t, ok) + + require.Equal(t, m1.Sum(), v.Sum()) + require.Equal(t, m1.Count(), v.Count()) + + for i := 0; i < v.BucketCounts().Len(); i++ { + require.Equal(t, m1.BucketCounts().At(i), v.BucketCounts().At(i)) + } + + for i := 0; i < v.ExplicitBounds().Len(); i++ { + require.Equal(t, m1.ExplicitBounds().At(i), v.ExplicitBounds().At(i)) + } + }) + t.Run("ResetBuckets/Perform", func(t *testing.T) { + // should reset when different buckets arrive + startTs := time.Now().Add(-5 * time.Second) + ts1 := time.Now().Add(-3 * time.Second) + ts2 := time.Now().Add(-2 * time.Second) + resourceMetrics := pmetric.NewResourceMetrics() + ilm := resourceMetrics.ScopeMetrics().AppendEmpty() + ilm.Scope().SetName("test") + appendDeltaHistogram(startTs, ts1, 5, 2.5, []uint64{1, 3, 1, 0, 0}, []float64{0.1, 0.5, 1, 10}, ilm.Metrics()) + appendDeltaHistogram(ts1, ts2, 7, 5, []uint64{3, 1, 1, 0, 0}, []float64{0.1, 0.2, 1, 10}, ilm.Metrics()) + + m2 := ilm.Metrics().At(1).Histogram().DataPoints().At(0) + signature := timeseriesSignature(ilm.Scope().Name(), ilm.Metrics().At(0), m2.Attributes(), pcommon.NewMap()) + + // should ignore metric with different buckets from the past + a := newAccumulator(zap.NewNop(), 1*time.Hour).(*lastValueAccumulator) + n := a.Accumulate(resourceMetrics) + require.Equal(t, 2, n) + + m, ok := a.registeredMetrics.Load(signature) + v := m.(*accumulatedValue).value.Histogram().DataPoints().At(0) + require.True(t, ok) + + require.Equal(t, m2.Sum(), v.Sum()) + require.Equal(t, m2.Count(), v.Count()) + + for i := 0; i < v.BucketCounts().Len(); i++ { + require.Equal(t, m2.BucketCounts().At(i), v.BucketCounts().At(i)) + } + + for i := 0; i < v.ExplicitBounds().Len(); i++ { + require.Equal(t, m2.ExplicitBounds().At(i), v.ExplicitBounds().At(i)) + } + }) + t.Run("MisalignedTimestamps/Drop", func(t *testing.T) { + // should drop data points with different start time that's before latest timestamp + startTs1 := time.Now().Add(-5 * time.Second) + startTs2 := time.Now().Add(-4 * time.Second) + ts1 := time.Now().Add(-3 * time.Second) + ts2 := time.Now().Add(-2 * time.Second) + resourceMetrics := pmetric.NewResourceMetrics() + ilm := resourceMetrics.ScopeMetrics().AppendEmpty() + ilm.Scope().SetName("test") + appendDeltaHistogram(startTs1, ts1, 5, 2.5, []uint64{1, 3, 1, 0, 0}, []float64{0.1, 0.5, 1, 10}, ilm.Metrics()) + appendDeltaHistogram(startTs2, ts2, 7, 5, []uint64{3, 1, 1, 0, 0}, []float64{0.1, 0.2, 1, 10}, ilm.Metrics()) + + m1 := ilm.Metrics().At(0).Histogram().DataPoints().At(0) + signature := timeseriesSignature(ilm.Scope().Name(), ilm.Metrics().At(0), m1.Attributes(), pcommon.NewMap()) + + a := newAccumulator(zap.NewNop(), 1*time.Hour).(*lastValueAccumulator) + n := a.Accumulate(resourceMetrics) + require.Equal(t, 1, n) + + m, ok := a.registeredMetrics.Load(signature) + v := m.(*accumulatedValue).value.Histogram().DataPoints().At(0) + require.True(t, ok) + + require.Equal(t, m1.Sum(), v.Sum()) + require.Equal(t, m1.Count(), v.Count()) + + for i := 0; i < v.BucketCounts().Len(); i++ { + require.Equal(t, m1.BucketCounts().At(i), v.BucketCounts().At(i)) + } + + for i := 0; i < v.ExplicitBounds().Len(); i++ { + require.Equal(t, m1.ExplicitBounds().At(i), v.ExplicitBounds().At(i)) + } + }) + t.Run("MisalignedTimestamps/Reset", func(t *testing.T) { + // reset when start timestamp skips ahead + startTs1 := time.Now().Add(-5 * time.Second) + startTs2 := time.Now().Add(-2 * time.Second) + ts1 := time.Now().Add(-3 * time.Second) + ts2 := time.Now().Add(-1 * time.Second) + resourceMetrics := pmetric.NewResourceMetrics() + ilm := resourceMetrics.ScopeMetrics().AppendEmpty() + ilm.Scope().SetName("test") + appendDeltaHistogram(startTs1, ts1, 5, 2.5, []uint64{1, 3, 1, 0, 0}, []float64{0.1, 0.5, 1, 10}, ilm.Metrics()) + appendDeltaHistogram(startTs2, ts2, 7, 5, []uint64{3, 1, 1, 0, 0}, []float64{0.1, 0.2, 1, 10}, ilm.Metrics()) + + m2 := ilm.Metrics().At(1).Histogram().DataPoints().At(0) + signature := timeseriesSignature(ilm.Scope().Name(), ilm.Metrics().At(0), m2.Attributes(), pcommon.NewMap()) + + a := newAccumulator(zap.NewNop(), 1*time.Hour).(*lastValueAccumulator) + n := a.Accumulate(resourceMetrics) + require.Equal(t, 2, n) + + m, ok := a.registeredMetrics.Load(signature) + v := m.(*accumulatedValue).value.Histogram().DataPoints().At(0) + require.True(t, ok) + + require.Equal(t, m2.Sum(), v.Sum()) + require.Equal(t, m2.Count(), v.Count()) + + for i := 0; i < v.BucketCounts().Len(); i++ { + require.Equal(t, m2.BucketCounts().At(i), v.BucketCounts().At(i)) + } + + for i := 0; i < v.ExplicitBounds().Len(); i++ { + require.Equal(t, m2.ExplicitBounds().At(i), v.ExplicitBounds().At(i)) + } + }) +} + func TestAccumulateDroppedMetrics(t *testing.T) { tests := []struct { name string diff --git a/exporter/prometheusexporter/config.go b/exporter/prometheusexporter/config.go index 80a8bc285dd6..811823e734e5 100644 --- a/exporter/prometheusexporter/config.go +++ b/exporter/prometheusexporter/config.go @@ -15,7 +15,7 @@ import ( // Config defines configuration for Prometheus exporter. type Config struct { - confighttp.HTTPServerSettings `mapstructure:",squash"` + confighttp.ServerConfig `mapstructure:",squash"` // Namespace if set, exports metrics under the provided value. Namespace string `mapstructure:"namespace"` diff --git a/exporter/prometheusexporter/config_test.go b/exporter/prometheusexporter/config_test.go index 1be8076596c0..05c465288e41 100644 --- a/exporter/prometheusexporter/config_test.go +++ b/exporter/prometheusexporter/config_test.go @@ -35,10 +35,10 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "2"), expected: &Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: "1.2.3.4:1234", - TLSSetting: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: &configtls.ServerConfig{ + Config: configtls.Config{ CertFile: "certs/server.crt", KeyFile: "certs/server.key", CAFile: "certs/ca.crt", diff --git a/exporter/prometheusexporter/end_to_end_test.go b/exporter/prometheusexporter/end_to_end_test.go index b4c84b04260f..b941787e3277 100644 --- a/exporter/prometheusexporter/end_to_end_test.go +++ b/exporter/prometheusexporter/end_to_end_test.go @@ -16,7 +16,6 @@ import ( "testing" "time" - promconfig "github.com/prometheus/prometheus/config" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/exporter/exportertest" @@ -36,7 +35,7 @@ func TestEndToEndSummarySupport(t *testing.T) { var currentScrapeIndex = 0 wg.Add(1) // scrape one endpoint - dropWizardServer := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { + dropWizardServer := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) { // Serve back the metrics as if they were from DropWizard. _, err := rw.Write([]byte(dropWizardResponse)) require.NoError(t, err) @@ -58,7 +57,7 @@ func TestEndToEndSummarySupport(t *testing.T) { // 2. Create the Prometheus metrics exporter that'll receive and verify the metrics produced. exporterCfg := &Config{ Namespace: "test", - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: "localhost:8787", }, SendTimestamps: true, @@ -88,7 +87,7 @@ func TestEndToEndSummarySupport(t *testing.T) { static_configs: - targets: ['%s'] `, srvURL.Host)) - receiverConfig := new(promconfig.Config) + receiverConfig := new(prometheusreceiver.PromConfig) if err = yaml.Unmarshal(yamlConfig, receiverConfig); err != nil { t.Fatal(err) } diff --git a/exporter/prometheusexporter/factory.go b/exporter/prometheusexporter/factory.go index ab1581e4a872..b29253fe0f8c 100644 --- a/exporter/prometheusexporter/factory.go +++ b/exporter/prometheusexporter/factory.go @@ -8,6 +8,7 @@ import ( "time" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -52,6 +53,7 @@ func createMetricsExporter( prometheus.ConsumeMetrics, exporterhelper.WithStart(prometheus.Start), exporterhelper.WithShutdown(prometheus.Shutdown), + exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: true}), ) if err != nil { return nil, err diff --git a/exporter/prometheusexporter/generated_component_test.go b/exporter/prometheusexporter/generated_component_test.go new file mode 100644 index 000000000000..98bfc75a3f89 --- /dev/null +++ b/exporter/prometheusexporter/generated_component_test.go @@ -0,0 +1,128 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package prometheusexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + require.NoError(t, err) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/prometheusexporter/go.mod b/exporter/prometheusexporter/go.mod index 5751805d3837..d5dfc57a4744 100644 --- a/exporter/prometheusexporter/go.mod +++ b/exporter/prometheusexporter/go.mod @@ -1,92 +1,90 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.89.0 - github.com/prometheus/client_golang v1.17.0 - github.com/prometheus/client_model v0.5.0 - github.com/prometheus/common v0.45.0 - github.com/prometheus/prometheus v0.47.2 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/receiver v0.89.0 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.98.0 + github.com/prometheus/client_golang v1.19.0 + github.com/prometheus/client_model v0.6.1 + github.com/prometheus/common v0.52.2 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/receiver v0.98.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 gopkg.in/yaml.v2 v2.4.0 ) require ( - cloud.google.com/go/compute v1.23.2 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect - github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.29 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect - github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 // indirect + github.com/Code-Hex/go-generics-cache v1.3.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect + github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.47.10 // indirect + github.com/aws/aws-sdk-go v1.50.32 // 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/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dennwc/varint v1.0.0 // indirect - github.com/digitalocean/godo v1.99.0 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.7+incompatible // indirect - github.com/docker/go-connections v0.4.0 // indirect + github.com/digitalocean/godo v1.109.0 // indirect + github.com/distribution/reference v0.5.0 // indirect + github.com/docker/docker v25.0.5+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/emicklei/go-restful/v3 v3.10.2 // indirect - github.com/envoyproxy/go-control-plane v0.11.1 // indirect - github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/envoyproxy/go-control-plane v0.12.0 // indirect + github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.4 // indirect - github.com/go-resty/resty/v2 v2.7.0 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.20.4 // indirect + github.com/go-openapi/swag v0.22.9 // indirect + github.com/go-resty/resty/v2 v2.11.0 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect + github.com/golang-jwt/jwt/v5 v5.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gophercloud/gophercloud v1.5.0 // indirect + github.com/googleapis/gax-go/v2 v2.12.2 // indirect + github.com/gophercloud/gophercloud v1.8.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect - github.com/hashicorp/consul/api v1.25.1 // indirect + github.com/hashicorp/consul/api v1.28.2 // indirect github.com/hashicorp/cronexpr v1.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -97,94 +95,94 @@ require ( github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect - github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e // indirect + github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702 // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/hetznercloud/hcloud-go/v2 v2.0.0 // indirect + github.com/hetznercloud/hcloud-go/v2 v2.6.0 // indirect github.com/imdario/mergo v0.3.16 // indirect - github.com/ionos-cloud/sdk-go/v6 v6.1.8 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.11 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect github.com/kylelemons/godebug v1.1.0 // indirect - github.com/linode/linodego v1.19.0 // indirect + github.com/linode/linodego v1.30.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/miekg/dns v1.1.55 // indirect + github.com/miekg/dns v1.1.58 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect - github.com/ovh/go-ovh v1.4.1 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect + github.com/ovh/go-ovh v1.4.3 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e // indirect github.com/rs/cors v1.10.1 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.15.0 // indirect - google.golang.org/api v0.150.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.19.0 // indirect + google.golang.org/api v0.168.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240304212257-790db918fca8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.28.3 // indirect - k8s.io/apimachinery v0.28.3 // indirect - k8s.io/client-go v0.28.3 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect + k8s.io/api v0.29.3 // indirect + k8s.io/apimachinery v0.29.3 // indirect + k8s.io/client-go v0.29.3 // indirect + k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/exporter/prometheusexporter/go.sum b/exporter/prometheusexporter/go.sum index 9b9698412689..b5ac8374a21f 100644 --- a/exporter/prometheusexporter/go.sum +++ b/exporter/prometheusexporter/go.sum @@ -19,8 +19,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.2 h1:nWEMDhgbBkBJjfpVySqU4jgWdc22PLR0o4vEexZHers= -cloud.google.com/go/compute v1.23.2/go.mod h1:JJ0atRC0J/oWYiiVBmsSsrRnh92DhZPG4hFDcR04Rns= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= @@ -34,41 +34,29 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= -github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 h1:8q4SaHjFsClSvuVne0ID/5Ka8u3fcIHyqkLjcFpNRHQ= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/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/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= -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/azcore v1.10.0 h1:n1DH8TPV4qqPTje2RcUBYwtrTWlabVp4n46+74X2pn4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0/go.mod h1:HDcZnuGbiyppErN6lB+idp4CKhjbc8gwjto6OPpyggM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 h1:MxA59PGoCFb+vCwRQi3PhQEwHj4+r2dhuv9HG+vM7iM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0/go.mod h1:uYt4CfhkJA9o0FN7jfE5minm/i4nUE4MjGUJkzB6Zs8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 h1:PTFGRSlMKCQelWwxUyYVEUqseBJVemLyqWJjvMyt0do= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0/go.mod h1:LRr2FzBTQlONPPa5HREE5+RjSCTXl7BwOvYOaWTqCaI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 h1:bXwSugBiSbgtz7rOtbfGf+woewp4f06orW9OP5BjHLA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0/go.mod h1:Y/HgrePTmGy9HjdSGTqZNa+apUpTVIEVKXJyARP2lrk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1 h1:7CBQ+Ei8SP2c6ydQTGCCrS35bDxgTMfoP2miAwK++OU= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1/go.mod h1:c/wcGeGx5FUPbM/JltUYHZcKmigwyVLJlDq+4HdtXaw= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= -github.com/Azure/go-autorest/autorest v0.11.29/go.mod h1:ZtEzC4Jy2JDrZLxvWs8LrBWEBycl1hbT1eknI8MtfAs= -github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= -github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= -github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= -github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= -github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= -github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Code-Hex/go-generics-cache v1.3.1 h1:i8rLwyhoyhaerr7JpjtYjJZUcCbWOdiYO3fZXLiEC4g= +github.com/Code-Hex/go-generics-cache v1.3.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -77,8 +65,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= @@ -86,19 +74,21 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.50.32 h1:POt81DvegnpQKM4DMDLlHz1CO6OBnEoQ1gRhYFd7QRY= +github.com/aws/aws-sdk-go v1.50.32/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -106,37 +96,40 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= -github.com/digitalocean/godo v1.99.0 h1:gUHO7n9bDaZFWvbzOum4bXE0/09ZuYA9yA8idQHX57E= -github.com/digitalocean/godo v1.99.0/go.mod h1:SsS2oXo2rznfM/nORlZ/6JaUJZFhmKTib1YhopUc8NA= +github.com/digitalocean/godo v1.109.0 h1:4W97RJLJSUQ3veRZDNbp1Ol3Rbn6Lmt9bKGvfqYI5SU= +github.com/digitalocean/godo v1.109.0/go.mod h1:R6EmmWI8CT1+fCtjWY9UCB+L5uufuZH13wk3YhxycCs= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= -github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= +github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI= +github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= 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/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= @@ -159,33 +152,33 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= -github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= +github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= +github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= +github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= +github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= +github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= +github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= +github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -214,13 +207,15 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -251,30 +246,33 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 h1:n6vlPhxsA+BW/XsS5+uqi7GyzaLa5MH7qlSLBZtRdiA= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ZWj6lSlDF3F74SfKwfTCer72Q= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/gophercloud/gophercloud v1.5.0 h1:cDN6XFCLKiiqvYpjQLq9AiM7RDRbIC9450WpPH+yvXo= -github.com/gophercloud/gophercloud v1.5.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= +github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= +github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= +github.com/gophercloud/gophercloud v1.8.0 h1:TM3Jawprb2NrdOnvcHhWJalmKmAmOGgfZElM/3oBYCk= +github.com/gophercloud/gophercloud v1.8.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 h1:6UKoz5ujsI55KNpsJH3UwCq3T8kKbZwNZBNPuTTje8U= -github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= -github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= -github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/hashicorp/consul/api v1.28.2 h1:mXfkRHrpHN4YY3RqL09nXU1eHKLNiuAN4kHvDQ16k/8= +github.com/hashicorp/consul/api v1.28.2/go.mod h1:KyzqzgMEya+IZPcD65YFoOVAgPpbfERu4I/tzG6/ueE= +github.com/hashicorp/consul/sdk v0.16.0 h1:SE9m0W6DEfgIVCJX7xU+iv/hUl4m/nxqMTnCdMxDpJ8= +github.com/hashicorp/consul/sdk v0.16.0/go.mod h1:7pxqqhqoaPqnBnzXD1StKed62LqJeClzVsUEy85Zr0A= github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -291,6 +289,7 @@ github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -302,10 +301,12 @@ github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5O github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -316,19 +317,21 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e h1:sr4lujmn9heD030xx/Pd4B/JSmvRhFzuotNXaaV0WLs= -github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e/go.mod h1:O23qLAZuCx4htdY9zBaO4cJPXgleSFEdq6D/sezGgYE= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702 h1:fI1LXuBaS1d9z1kmb++Og6YD8uMRwadXorCwE+xgOFA= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702/go.mod h1:z71gkJdrkAt/Rl6C7Q79VE7AwJ5lUF+M+fzFTyIHYB0= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hetznercloud/hcloud-go/v2 v2.0.0 h1:Sg1DJ+MAKvbYAqaBaq9tPbwXBS2ckPIaMtVdUjKu+4g= -github.com/hetznercloud/hcloud-go/v2 v2.0.0/go.mod h1:4iUG2NG8b61IAwNx6UsMWQ6IfIf/i1RsG0BbsKAyR5Q= +github.com/hetznercloud/hcloud-go/v2 v2.6.0 h1:RJOA2hHZ7rD1pScA4O1NF6qhkHyUdbbxjHgFNot8928= +github.com/hetznercloud/hcloud-go/v2 v2.6.0/go.mod h1:4J1cSE57+g0WS93IiHLV7ubTHItcp+awzeBp5bM9mfA= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/ionos-cloud/sdk-go/v6 v6.1.8 h1:493wE/BkZxJf7x79UCE0cYGPZoqQcPiEBALvt7uVGY0= -github.com/ionos-cloud/sdk-go/v6 v6.1.8/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= -github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/ionos-cloud/sdk-go/v6 v6.1.11 h1:J/uRN4UWO3wCyGOeDdMKv8LWRzKu6UIkLEaes38Kzh8= +github.com/ionos-cloud/sdk-go/v6 v6.1.11/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= +github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= 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= @@ -349,31 +352,32 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/linode/linodego v1.19.0 h1:n4WJrcr9+30e9JGZ6DI0nZbm5SdAj1kSwvvt/998YUw= -github.com/linode/linodego v1.19.0/go.mod h1:XZFR+yJ9mm2kwf6itZ6SCpu+6w3KnIevV0Uu5HNWJgQ= +github.com/linode/linodego v1.30.0 h1:6HJli+LX7NGu+Sne2G+ux790EkVOWOV/SR4mK3jcs6k= +github.com/linode/linodego v1.30.0/go.mod h1:/46h/XpmWi//oSA92GX2p3FIxb8HbX7grslPPQalR2o= 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/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -392,27 +396,28 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= +github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= -github.com/miekg/dns v1.1.55/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= +github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4= +github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +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/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= 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= @@ -421,25 +426,29 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= -github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= -github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -github.com/ovh/go-ovh v1.4.1 h1:VBGa5wMyQtTP7Zb+w97zRCh9sLtM/2YKRyy+MEJmWaM= -github.com/ovh/go-ovh v1.4.1/go.mod h1:6bL6pPyUT7tBfI0pqOegJgRjgjuO+mOo+MyXd1EEC0M= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/ovh/go-ovh v1.4.3 h1:Gs3V823zwTFpzgGLZNI6ILS4rmxZgJwJCz54Er9LwD0= +github.com/ovh/go-ovh v1.4.3/go.mod h1:AkPXVtgwB6xlKblMjRKJJmjRp+ogrE7fz2lVgcQY8SY= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -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/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -450,26 +459,27 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/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 v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -479,32 +489,39 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= -github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e h1:UmqAuY2OyDoog8+l5FybViJE5B2r+UxVGCUwFTsY5AA= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e/go.mod h1:+0ld+ozir7zWFcHA2vVpWAKxXakIioEjPPNOqH+J3ZA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 h1:a9hSJdJcd16e0HoMsnFvaHvxB3pxSD+SC7+CISp7xY0= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 h1:/8rfZAdFfafRXOgz+ZpMZZWZ5pYggCY9t7e/BvjaBHM= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= +github.com/shoenig/test v1.7.1/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= 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.1.1/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -513,16 +530,22 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= 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.2/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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/gjson v1.10.2 h1:APbLGOM0rrEkd8WBw9C24nllro4ajFuJu0Sc9hRz8Bo= +github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/tinylru v1.1.0 h1:XY6IUfzVTU9rpwdhKUF6nQdChgCdGjkMfLzbWyiau6I= +github.com/tidwall/tinylru v1.1.0/go.mod h1:3+bX+TJ2baOLMWTnlyNWHh4QMnFyARg2TLTQ6OFbzw8= github.com/tidwall/wal v1.1.7 h1:emc1TRjIVsdKKSnpwGBAcsAGg0767SvUk8+ygx7Bb+4= +github.com/tidwall/wal v1.1.7/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= 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/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= @@ -531,7 +554,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -539,75 +563,112 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/collector v0.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/otelcol v0.89.0 h1:b3kC0zM9T6GxjhTcNEHIzXDd4zTIc7cBpexCPZ9nPzg= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 h1:oTEOHs2t00f9LfRwZGzKSXJPR3FHjPDDhjt05iWXYZM= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0 h1:Yty9Vs4F3D6/liF1o6FNt0PvN85h/BJJ6DQKJ3nrcM0= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0 h1:E/sf+2slCUb7wqh5FHwhdwKWTA+VXyMMAcFNlKVf4yw= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 h1:vcSjcjn/BTeM6abI5CDymZdtd1m24quD1Mx4VE3N3fM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 h1:4s9HxB4azeeQkhY0GE5wZlMj4/pz8tE5gx2OQpGUw58= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 h1:lRhfcLr3gK5S/zn92h3clyOPnCvvNKs1WTMbtH4UvO0= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0/go.mod h1:vNMFTWe4dF05LsodUOc84OfxdlYVp1kCMuZzb41WfAk= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 h1:x/VsGlBj+DtJCXIucwzwcxiwnwAU8a6ALK6UN8fPdKQ= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0/go.mod h1:BapTGXu7CYrQGNohbapPwTSt2Ty/k/c6Oemx9mSSiK4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 h1:SxDS+Yr8qE+ID58ELR5n0D+SUlqHKOZ72pK3YPFAelA= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0/go.mod h1:DEoB0d0k1iGt4KEABntL8AW9xYQ6E7fmgkM2/s8aXvM= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 h1:C02SPbRPvrtmZ9TvsHWpz2TvHzqY5mNyEAlDdhax/a4= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0/go.mod h1:dzZKtykJio3Rm+G+Cmr15VV3xKp0PmFuh9Q9b3c1K7A= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 h1:04zGXVQZ8D6nvoPX8AaqxWxGHNNVsGR78E+tY+2VQr8= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0/go.mod h1:+UrRiugWaQPssz4mgEgQQo640f2bDUCFlo2Xr0/5ulc= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 h1:JYpDN0OnMsu0awk0rjaYEIko9hFzzBJ6+2U5W2iVvUE= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0/go.mod h1:xrXL804nBum1PgbvmJQ4I+hyW+DU4xBGO3MKMiYFX6E= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/otelcol v0.98.0 h1:sUk49Wqw+VBYeDynEA+GSeVEusFvzFW3KuF2vfDbyo0= +go.opentelemetry.io/collector/otelcol v0.98.0/go.mod h1:dW3UzuaiaNTddjKajk3Tp2Y7muDvYJdQz2yGUOE53gs= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 h1:iM4fMLGig3GKmz5XNtOPKDsnCnvbi0+UHYaWsx/aSRc= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0/go.mod h1:ROnuUkZJgpKEIDf3AIVjgRGNI7KPqCKPXsw8whL6Hzs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/collector/service v0.98.0 h1:lLJ7VXPXcV62fSISh4GuNd5ti6WvKje76NSgezc3ydo= +go.opentelemetry.io/collector/service v0.98.0/go.mod h1:wB7ozvZTHtMefb5KTYy5nyrVYWpGk8teq8jWFs4blIU= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0 h1:QU8UEKyPqgr/8vCC9LlDmkPnfFmiWAUF9GtJdcLz+BU= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0/go.mod h1:qonC7wyvtX1E6cEpAR+bJmhcGr6IVRGc/f6ZTpvi7jA= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0 h1:0o/9KwAgxjK+3pMV0pwIF5toYHqDsPmQhfrBvKaG6mU= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0/go.mod h1:rZyTdpmRqoV+PpUn6QlruxJp/kE4765rPy0pP6mRDk8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 h1:hDKnobznDpcdTlNzO0S/owRB8tyVr1OoeZZhDoqY+Cs= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0/go.mod h1:kUDQaUs1h8iTIHbQTk+iJRiUvSfJYMMKTtMCaiVu7B0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 h1:Wc4hZuYXhVqq+TfRXLXlmNIL/awOanGx8ssq3ciDQxc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0/go.mod h1:BydOvapRqVEc0DVz27qWBX2jq45Ca5TI9mhZBDIdweY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 h1:vOL89uRfOCCNIjkisd0r7SEdJF3ZJFyCNY34fdZs8eU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0/go.mod h1:8GlBGcDk8KKi7n+2S4BT/CPZQYH3erLu0/k64r1MYgo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 h1:d7nHbdzU84STOiszaOxQ3kw5IwkSmHsU5Muol5/vL4I= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0/go.mod h1:yiPA1iZbb/EHYnODXOxvtKuB0I2hV8ehfLTEWpl7BJU= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 h1:0vZZdECYzhTt9MKQZ5qQ0V+J3MFu4MQaQ3COfugF+FQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0/go.mod h1:e7iXx3HjaSSBXfy9ykVUlupS2Vp7LBIBuT21ousM2Hk= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -616,11 +677,10 @@ golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3 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.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -631,8 +691,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +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/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -654,8 +714,9 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB 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/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -690,20 +751,21 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -716,7 +778,9 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.1.0/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-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -762,7 +826,6 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -770,15 +833,20 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -786,14 +854,18 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= @@ -838,13 +910,15 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= 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.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -861,16 +935,16 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.150.0 h1:Z9k22qD289SZ8gCJrk4DrWXkNjtfvKAUo/l1ma8eBYE= -google.golang.org/api v0.150.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= +google.golang.org/api v0.168.0 h1:MBRe+Ki4mMN93jhDDbpuRLjRddooArz4FeSObvUMmjY= +google.golang.org/api v0.168.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -900,12 +974,10 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -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-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto/googleapis/api v0.0.0-20240304212257-790db918fca8 h1:8eadJkXbwDEMNwcB5O0s5Y5eCfyuCLdvaiOIaGTrWmQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240304212257-790db918fca8/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -919,8 +991,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= +google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -933,8 +1005,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -958,6 +1030,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -965,24 +1038,24 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/exporter/prometheusexporter/internal/metadata/generated_status.go b/exporter/prometheusexporter/internal/metadata/generated_status.go index 793e897d7681..53a6268cd725 100644 --- a/exporter/prometheusexporter/internal/metadata/generated_status.go +++ b/exporter/prometheusexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("prometheus") ) const ( - Type = "prometheus" MetricsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/prometheus") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/prometheus") +} diff --git a/exporter/prometheusexporter/metadata.yaml b/exporter/prometheusexporter/metadata.yaml index 9df66711907d..362bc5ad66fe 100644 --- a/exporter/prometheusexporter/metadata.yaml +++ b/exporter/prometheusexporter/metadata.yaml @@ -1,4 +1,5 @@ type: prometheus +scope_name: otelcol/prometheus status: class: exporter @@ -7,10 +8,9 @@ status: distributions: - core - contrib - - aws - - grafana - - observiq - - redhat - - sumo codeowners: active: [Aneurysm9] + +tests: + config: + endpoint: "127.0.0.1:1234" diff --git a/exporter/prometheusexporter/package_test.go b/exporter/prometheusexporter/package_test.go new file mode 100644 index 000000000000..4848448dfc0c --- /dev/null +++ b/exporter/prometheusexporter/package_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package prometheusexporter + +import ( + "testing" + + "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")) +} diff --git a/exporter/prometheusexporter/prometheus.go b/exporter/prometheusexporter/prometheus.go index 2cb2faceb078..9309bd54be2b 100644 --- a/exporter/prometheusexporter/prometheus.go +++ b/exporter/prometheusexporter/prometheus.go @@ -57,8 +57,8 @@ func newPrometheusExporter(config *Config, set exporter.CreateSettings) (*promet }, nil } -func (pe *prometheusExporter) Start(_ context.Context, host component.Host) error { - ln, err := pe.config.ToListener() +func (pe *prometheusExporter) Start(ctx context.Context, host component.Host) error { + ln, err := pe.config.ToListenerContext(ctx) if err != nil { return err } @@ -67,7 +67,7 @@ func (pe *prometheusExporter) Start(_ context.Context, host component.Host) erro mux := http.NewServeMux() mux.Handle("/metrics", pe.handler) - srv, err := pe.config.ToServer(host, pe.settings, mux) + srv, err := pe.config.ToServerContext(ctx, host, pe.settings, mux) if err != nil { return err } diff --git a/exporter/prometheusexporter/prometheus_test.go b/exporter/prometheusexporter/prometheus_test.go index c1478d7d2512..ca1b5f5522e9 100644 --- a/exporter/prometheusexporter/prometheus_test.go +++ b/exporter/prometheusexporter/prometheus_test.go @@ -39,7 +39,7 @@ func TestPrometheusExporter(t *testing.T) { "foo0": "bar0", "code0": "one0", }, - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: "localhost:8999", }, SendTimestamps: false, @@ -48,7 +48,7 @@ func TestPrometheusExporter(t *testing.T) { }, { config: &Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: "localhost:88999", }, }, @@ -96,10 +96,10 @@ func TestPrometheusExporter_WithTLS(t *testing.T) { "foo2": "bar2", "code2": "one2", }, - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: "localhost:7777", - TLSSetting: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: &configtls.ServerConfig{ + Config: configtls.Config{ CertFile: "./testdata/certs/server.crt", KeyFile: "./testdata/certs/server.key", CAFile: "./testdata/certs/ca.crt", @@ -117,8 +117,8 @@ func TestPrometheusExporter_WithTLS(t *testing.T) { exp, err := factory.CreateMetricsExporter(context.Background(), set, cfg) require.NoError(t, err) - tlscs := configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + tlscs := configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "./testdata/certs/ca.crt", CertFile: "./testdata/certs/client.crt", KeyFile: "./testdata/certs/client.key", @@ -136,8 +136,10 @@ func TestPrometheusExporter_WithTLS(t *testing.T) { t.Cleanup(func() { require.NoError(t, exp.Shutdown(context.Background())) // trigger a get so that the server cleans up our keepalive socket - _, err = httpClient.Get("https://localhost:7777/metrics") + var resp *http.Response + resp, err = httpClient.Get("https://localhost:7777/metrics") require.NoError(t, err) + require.NoError(t, resp.Body.Close()) }) assert.NotNil(t, exp) @@ -181,7 +183,7 @@ func TestPrometheusExporter_endToEndMultipleTargets(t *testing.T) { "foo1": "bar1", "code1": "one1", }, - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: "localhost:7777", }, MetricExpiration: 120 * time.Minute, @@ -195,8 +197,10 @@ func TestPrometheusExporter_endToEndMultipleTargets(t *testing.T) { t.Cleanup(func() { require.NoError(t, exp.Shutdown(context.Background())) // trigger a get so that the server cleans up our keepalive socket - _, err = http.Get("http://localhost:7777/metrics") + var resp *http.Response + resp, err = http.Get("http://localhost:7777/metrics") require.NoError(t, err) + require.NoError(t, resp.Body.Close()) }) assert.NotNil(t, exp) @@ -263,7 +267,7 @@ func TestPrometheusExporter_endToEnd(t *testing.T) { "foo1": "bar1", "code1": "one1", }, - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: "localhost:7777", }, MetricExpiration: 120 * time.Minute, @@ -277,8 +281,10 @@ func TestPrometheusExporter_endToEnd(t *testing.T) { t.Cleanup(func() { require.NoError(t, exp.Shutdown(context.Background())) // trigger a get so that the server cleans up our keepalive socket - _, err = http.Get("http://localhost:7777/metrics") + var resp *http.Response + resp, err = http.Get("http://localhost:7777/metrics") require.NoError(t, err) + require.NoError(t, resp.Body.Close()) }) assert.NotNil(t, exp) @@ -339,7 +345,7 @@ func TestPrometheusExporter_endToEndWithTimestamps(t *testing.T) { "foo2": "bar2", "code2": "one2", }, - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: "localhost:7777", }, SendTimestamps: true, @@ -354,8 +360,10 @@ func TestPrometheusExporter_endToEndWithTimestamps(t *testing.T) { t.Cleanup(func() { require.NoError(t, exp.Shutdown(context.Background())) // trigger a get so that the server cleans up our keepalive socket - _, err = http.Get("http://localhost:7777/metrics") + var resp *http.Response + resp, err = http.Get("http://localhost:7777/metrics") require.NoError(t, err) + require.NoError(t, resp.Body.Close()) }) assert.NotNil(t, exp) @@ -416,7 +424,7 @@ func TestPrometheusExporter_endToEndWithResource(t *testing.T) { "foo2": "bar2", "code2": "one2", }, - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: "localhost:7777", }, SendTimestamps: true, @@ -434,8 +442,10 @@ func TestPrometheusExporter_endToEndWithResource(t *testing.T) { t.Cleanup(func() { require.NoError(t, exp.Shutdown(context.Background())) // trigger a get so that the server cleans up our keepalive socket - _, err = http.Get("http://localhost:7777/metrics") + var resp *http.Response + resp, err = http.Get("http://localhost:7777/metrics") require.NoError(t, err, "Failed to perform a scrape") + require.NoError(t, resp.Body.Close()) }) assert.NotNil(t, exp) diff --git a/exporter/prometheusremotewriteexporter/DESIGN.md b/exporter/prometheusremotewriteexporter/DESIGN.md index f1a14c1d4c22..3fbf369050f0 100644 --- a/exporter/prometheusremotewriteexporter/DESIGN.md +++ b/exporter/prometheusremotewriteexporter/DESIGN.md @@ -10,7 +10,7 @@ Date: July 30, 2020 Prometheus can be integrated with remote storage systems that supports its remote write API. Existing remote storage integration support is included in [Cortex](https://cortexmetrics.io/docs/api/), [influxDB](https://docs.influxdata.com/influxdb/v1.8/supported_protocols/prometheus/), and many [others](https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage). -The following diagram shows an example of Prometheus remote write API usage, with Cortex,n open source, horizontally scalable, highly available, multi-tenant, long term storage, as a remote storage backend. +The following diagram shows an example of Prometheus remote write API usage, with Cortex, an open source, horizontally scalable, highly available, multi-tenant, long term storage, as a remote storage backend. ![Cortex Architecture](img/cortex.png) diff --git a/exporter/prometheusremotewriteexporter/README.md b/exporter/prometheusremotewriteexporter/README.md index f15b3c4b76e8..f48f3e9d00a8 100644 --- a/exporter/prometheusremotewriteexporter/README.md +++ b/exporter/prometheusremotewriteexporter/README.md @@ -4,15 +4,13 @@ | Status | | | ------------- |-----------| | Stability | [beta]: metrics | -| Distributions | [core], [contrib], [aws], [observiq] | +| Distributions | [core], [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fprometheusremotewrite%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fprometheusremotewrite) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fprometheusremotewrite%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fprometheusremotewrite) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@rapphil](https://www.github.com/rapphil) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector Prometheus Remote Write Exporter sends OpenTelemetry metrics @@ -52,6 +50,7 @@ The following settings can be optionally configured: - *Note the following headers cannot be changed: `Content-Encoding`, `Content-Type`, `X-Prometheus-Remote-Write-Version`, and `User-Agent`.* - `namespace`: prefix attached to each exported metric name. - `add_metric_suffixes`: If set to false, type and unit suffixes will not be added to metrics. Default: true. +- `send_metadata`: If set to true, prometheus metadata will be generated and sent. Default: false. - `remote_write_queue`: fine tuning for queueing and sending of the outgoing remote writes. - `enabled`: enable the sending queue (default: `true`) - `queue_size`: number of OTLP metrics that can be queued. Ignored if `enabled` is `false` (default: `10000`) diff --git a/exporter/prometheusremotewriteexporter/config.go b/exporter/prometheusremotewriteexporter/config.go index 22b0b3a969d9..f63468783b1f 100644 --- a/exporter/prometheusremotewriteexporter/config.go +++ b/exporter/prometheusremotewriteexporter/config.go @@ -8,6 +8,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry" @@ -16,7 +17,7 @@ import ( // Config defines configuration for Remote Write exporter. type Config struct { exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // prefix attached to each exported metric name // See: https://prometheus.io/docs/practices/naming/#metric-names @@ -29,7 +30,7 @@ type Config struct { // ExternalLabels defines a map of label keys and values that are allowed to start with reserved prefix "__" ExternalLabels map[string]string `mapstructure:"external_labels"` - HTTPClientSettings confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + ClientConfig confighttp.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. // maximum size in bytes of time series batch sent to remote storage MaxBatchSizeBytes int `mapstructure:"max_batch_size_bytes"` @@ -48,6 +49,9 @@ type Config struct { // AddMetricSuffixes controls whether unit and type suffixes are added to metrics on export AddMetricSuffixes bool `mapstructure:"add_metric_suffixes"` + + // SendMetadata controls whether prometheus metadata will be generated and sent + SendMetadata bool `mapstructure:"send_metadata"` } type CreatedMetric struct { diff --git a/exporter/prometheusremotewriteexporter/config_test.go b/exporter/prometheusremotewriteexporter/config_test.go index 19926e845652..00e6074eda19 100644 --- a/exporter/prometheusremotewriteexporter/config_test.go +++ b/exporter/prometheusremotewriteexporter/config_test.go @@ -14,6 +14,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -42,7 +43,7 @@ func TestLoadConfig(t *testing.T) { expected: &Config{ MaxBatchSizeBytes: 3000000, TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, MaxInterval: 1 * time.Minute, @@ -58,10 +59,10 @@ func TestLoadConfig(t *testing.T) { AddMetricSuffixes: false, Namespace: "test-space", ExternalLabels: map[string]string{"key1": "value1", "key2": "value2"}, - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "localhost:8888", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "/var/lib/mycert.pem", // This is subject to change, but currently I have no idea what else to put here lol }, Insecure: false, diff --git a/exporter/prometheusremotewriteexporter/exporter.go b/exporter/prometheusremotewriteexporter/exporter.go index 865abcc06636..52ad2ecd1f91 100644 --- a/exporter/prometheusremotewriteexporter/exporter.go +++ b/exporter/prometheusremotewriteexporter/exporter.go @@ -21,16 +21,39 @@ import ( "github.com/prometheus/prometheus/prompb" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" "go.uber.org/multierr" + "go.uber.org/zap" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/internal/metadata" prometheustranslator "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite" ) +type prwTelemetry interface { + recordTranslationFailure(ctx context.Context) + recordTranslatedTimeSeries(ctx context.Context, numTS int) +} + +type prwTelemetryOtel struct { + failedTranslations metric.Int64Counter + translatedTimeSeries metric.Int64Counter + otelAttrs []attribute.KeyValue +} + +func (p *prwTelemetryOtel) recordTranslationFailure(ctx context.Context) { + p.failedTranslations.Add(ctx, 1, metric.WithAttributes(p.otelAttrs...)) +} + +func (p *prwTelemetryOtel) recordTranslatedTimeSeries(ctx context.Context, numTS int) { + p.translatedTimeSeries.Add(ctx, int64(numTS), metric.WithAttributes(p.otelAttrs...)) +} + // prwExporter converts OTLP metrics to Prometheus remote write TimeSeries and sends them to a remote endpoint. type prwExporter struct { endpointURL *url.URL @@ -40,11 +63,36 @@ type prwExporter struct { concurrency int userAgentHeader string maxBatchSizeBytes int - clientSettings *confighttp.HTTPClientSettings + clientSettings *confighttp.ClientConfig settings component.TelemetrySettings - retrySettings exporterhelper.RetrySettings + retrySettings configretry.BackOffConfig wal *prweWAL exporterSettings prometheusremotewrite.Settings + telemetry prwTelemetry +} + +func newPRWTelemetry(set exporter.CreateSettings) (prwTelemetry, error) { + + meter := metadata.Meter(set.TelemetrySettings) + // TODO: create helper functions similar to the processor helper: BuildCustomMetricName + prefix := "exporter/" + metadata.Type.String() + "/" + failedTranslations, errFailedTranslation := meter.Int64Counter(prefix+"failed_translations", + metric.WithDescription("Number of translation operations that failed to translate metrics from Otel to Prometheus"), + metric.WithUnit("1"), + ) + + translatedTimeSeries, errTranslatedMetrics := meter.Int64Counter(prefix+"translated_time_series", + metric.WithDescription("Number of Prometheus time series that were translated from OTel metrics"), + metric.WithUnit("1"), + ) + + return &prwTelemetryOtel{ + failedTranslations: failedTranslations, + translatedTimeSeries: translatedTimeSeries, + otelAttrs: []attribute.KeyValue{ + attribute.String("exporter", set.ID.String()), + }, + }, errors.Join(errFailedTranslation, errTranslatedMetrics) } // newPRWExporter initializes a new prwExporter instance and sets fields accordingly. @@ -54,11 +102,16 @@ func newPRWExporter(cfg *Config, set exporter.CreateSettings) (*prwExporter, err return nil, err } - endpointURL, err := url.ParseRequestURI(cfg.HTTPClientSettings.Endpoint) + endpointURL, err := url.ParseRequestURI(cfg.ClientConfig.Endpoint) if err != nil { return nil, errors.New("invalid endpoint") } + prwTelemetry, err := newPRWTelemetry(set) + if err != nil { + return nil, err + } + userAgentHeader := fmt.Sprintf("%s/%s", strings.ReplaceAll(strings.ToLower(set.BuildInfo.Description), " ", "-"), set.BuildInfo.Version) prwe := &prwExporter{ @@ -68,31 +121,27 @@ func newPRWExporter(cfg *Config, set exporter.CreateSettings) (*prwExporter, err userAgentHeader: userAgentHeader, maxBatchSizeBytes: cfg.MaxBatchSizeBytes, concurrency: cfg.RemoteWriteQueue.NumConsumers, - clientSettings: &cfg.HTTPClientSettings, + clientSettings: &cfg.ClientConfig, settings: set.TelemetrySettings, - retrySettings: cfg.RetrySettings, + retrySettings: cfg.BackOffConfig, exporterSettings: prometheusremotewrite.Settings{ Namespace: cfg.Namespace, ExternalLabels: sanitizedLabels, DisableTargetInfo: !cfg.TargetInfo.Enabled, ExportCreatedMetric: cfg.CreatedMetric.Enabled, AddMetricSuffixes: cfg.AddMetricSuffixes, + SendMetadata: cfg.SendMetadata, }, - } - if cfg.WAL == nil { - return prwe, nil + telemetry: prwTelemetry, } - prwe.wal, err = newWAL(cfg.WAL, prwe.export) - if err != nil { - return nil, err - } + prwe.wal = newWAL(cfg.WAL, prwe.export) return prwe, nil } // Start creates the prometheus client func (prwe *prwExporter) Start(ctx context.Context, host component.Host) (err error) { - prwe.client, err = prwe.clientSettings.ToClient(host, prwe.settings) + prwe.client, err = prwe.clientSettings.ToClientContext(ctx, host, prwe.settings) if err != nil { return err } @@ -130,12 +179,22 @@ func (prwe *prwExporter) PushMetrics(ctx context.Context, md pmetric.Metrics) er case <-prwe.closeChan: return errors.New("shutdown has been called") default: + tsMap, err := prometheusremotewrite.FromMetrics(md, prwe.exporterSettings) if err != nil { - err = consumererror.NewPermanent(err) + prwe.telemetry.recordTranslationFailure(ctx) + prwe.settings.Logger.Debug("failed to translate metrics, exporting remaining metrics", zap.Error(err), zap.Int("translated", len(tsMap))) + } + + prwe.telemetry.recordTranslatedTimeSeries(ctx, len(tsMap)) + + var m []*prompb.MetricMetadata + if prwe.exporterSettings.SendMetadata { + m = prometheusremotewrite.OtelMetricsToMetadata(md, prwe.exporterSettings.AddMetricSuffixes) } + // Call export even if a conversion error, since there may be points that were successfully converted. - return multierr.Combine(err, prwe.handleExport(ctx, tsMap)) + return prwe.handleExport(ctx, tsMap, m) } } @@ -151,14 +210,14 @@ func validateAndSanitizeExternalLabels(cfg *Config) (map[string]string, error) { return sanitizedLabels, nil } -func (prwe *prwExporter) handleExport(ctx context.Context, tsMap map[string]*prompb.TimeSeries) error { +func (prwe *prwExporter) handleExport(ctx context.Context, tsMap map[string]*prompb.TimeSeries, m []*prompb.MetricMetadata) error { // There are no metrics to export, so return. if len(tsMap) == 0 { return nil } // Calls the helper function to convert and batch the TsMap to the desired format - requests, err := batchTimeSeries(tsMap, prwe.maxBatchSizeBytes) + requests, err := batchTimeSeries(tsMap, prwe.maxBatchSizeBytes, m) if err != nil { return err } @@ -219,15 +278,24 @@ func (prwe *prwExporter) export(ctx context.Context, requests []*prompb.WriteReq } func (prwe *prwExporter) execute(ctx context.Context, writeReq *prompb.WriteRequest) error { + // Uses proto.Marshal to convert the WriteRequest into bytes array + data, errMarshal := proto.Marshal(writeReq) + if errMarshal != nil { + return consumererror.NewPermanent(errMarshal) + } + buf := make([]byte, len(data), cap(data)) + compressedData := snappy.Encode(buf, data) + // executeFunc can be used for backoff and non backoff scenarios. executeFunc := func() error { - // Uses proto.Marshal to convert the WriteRequest into bytes array - data, err := proto.Marshal(writeReq) - if err != nil { - return backoff.Permanent(consumererror.NewPermanent(err)) + // check there was no timeout in the component level to avoid retries + // to continue to run after a timeout + select { + case <-ctx.Done(): + return backoff.Permanent(ctx.Err()) + default: + // continue } - buf := make([]byte, len(data), cap(data)) - compressedData := snappy.Encode(buf, data) // Create the HTTP POST request to send to the endpoint req, err := http.NewRequestWithContext(ctx, "POST", prwe.endpointURL.String(), bytes.NewReader(compressedData)) diff --git a/exporter/prometheusremotewriteexporter/exporter_test.go b/exporter/prometheusremotewriteexporter/exporter_test.go index 2a317cebb91d..7adcae6f83e3 100644 --- a/exporter/prometheusremotewriteexporter/exporter_test.go +++ b/exporter/prometheusremotewriteexporter/exporter_test.go @@ -22,6 +22,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter" @@ -35,11 +36,11 @@ import ( // Test_NewPRWExporter checks that a new exporter instance with non-nil fields is initialized func Test_NewPRWExporter(t *testing.T) { cfg := &Config{ - TimeoutSettings: exporterhelper.TimeoutSettings{}, - RetrySettings: exporterhelper.RetrySettings{}, - Namespace: "", - ExternalLabels: map[string]string{}, - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ""}, + TimeoutSettings: exporterhelper.TimeoutSettings{}, + BackOffConfig: configretry.BackOffConfig{}, + Namespace: "", + ExternalLabels: map[string]string{}, + ClientConfig: confighttp.ClientConfig{Endpoint: ""}, TargetInfo: &TargetInfo{ Enabled: true, }, @@ -106,7 +107,7 @@ func Test_NewPRWExporter(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - cfg.HTTPClientSettings.Endpoint = tt.endpoint + cfg.ClientConfig.Endpoint = tt.endpoint cfg.ExternalLabels = tt.externalLabels cfg.Namespace = tt.namespace cfg.RemoteWriteQueue.NumConsumers = 1 @@ -132,7 +133,7 @@ func Test_NewPRWExporter(t *testing.T) { func Test_Start(t *testing.T) { cfg := &Config{ TimeoutSettings: exporterhelper.TimeoutSettings{}, - RetrySettings: exporterhelper.RetrySettings{}, + BackOffConfig: configretry.BackOffConfig{}, MaxBatchSizeBytes: 3000000, Namespace: "", ExternalLabels: map[string]string{}, @@ -158,7 +159,7 @@ func Test_Start(t *testing.T) { returnErrorOnStartUp bool set exporter.CreateSettings endpoint string - clientSettings confighttp.HTTPClientSettings + clientSettings confighttp.ClientConfig }{ { name: "success_case", @@ -167,7 +168,7 @@ func Test_Start(t *testing.T) { concurrency: 5, externalLabels: map[string]string{"Key1": "Val1"}, set: set, - clientSettings: confighttp.HTTPClientSettings{Endpoint: "https://some.url:9411/api/prom/push"}, + clientSettings: confighttp.ClientConfig{Endpoint: "https://some.url:9411/api/prom/push"}, }, { name: "invalid_tls", @@ -177,10 +178,10 @@ func Test_Start(t *testing.T) { externalLabels: map[string]string{"Key1": "Val1"}, set: set, returnErrorOnStartUp: true, - clientSettings: confighttp.HTTPClientSettings{ + clientSettings: confighttp.ClientConfig{ Endpoint: "https://some.url:9411/api/prom/push", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "non-existent file", CertFile: "", KeyFile: "", @@ -197,7 +198,7 @@ func Test_Start(t *testing.T) { cfg.ExternalLabels = tt.externalLabels cfg.Namespace = tt.namespace cfg.RemoteWriteQueue.NumConsumers = 1 - cfg.HTTPClientSettings = tt.clientSettings + cfg.ClientConfig = tt.clientSettings prwe, err := newPRWExporter(cfg, tt.set) assert.NoError(t, err) @@ -326,7 +327,7 @@ func Test_export(t *testing.T) { } func TestNoMetricsNoError(t *testing.T) { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusAccepted) })) defer server.Close() @@ -343,9 +344,9 @@ func runExportPipeline(ts *prompb.TimeSeries, endpoint *url.URL) error { } cfg := createDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = endpoint.String() + cfg.ClientConfig.Endpoint = endpoint.String() cfg.RemoteWriteQueue.NumConsumers = 1 - cfg.RetrySettings = exporterhelper.RetrySettings{ + cfg.BackOffConfig = configretry.BackOffConfig{ Enabled: true, InitialInterval: 100 * time.Millisecond, // Shorter initial interval MaxInterval: 1 * time.Second, // Shorter max interval @@ -368,7 +369,20 @@ func runExportPipeline(ts *prompb.TimeSeries, endpoint *url.URL) error { return err } - return prwe.handleExport(context.Background(), testmap) + return prwe.handleExport(context.Background(), testmap, nil) +} + +type mockPRWTelemetry struct { + failedTranslations int + translatedTimeSeries int +} + +func (m *mockPRWTelemetry) recordTranslationFailure(_ context.Context) { + m.failedTranslations++ +} + +func (m *mockPRWTelemetry) recordTranslatedTimeSeries(_ context.Context, numTs int) { + m.translatedTimeSeries += numTs } // Test_PushMetrics checks the number of TimeSeries received by server and the number of metrics dropped is the same as @@ -419,6 +433,11 @@ func Test_PushMetrics(t *testing.T) { emptySummaryBatch := getMetricsFromMetricList(invalidMetrics[emptySummary]) + // partial success (or partial failure) cases + + partialSuccess1 := getMetricsFromMetricList(validMetrics1[validSum], validMetrics2[validSum], + validMetrics1[validIntGauge], validMetrics2[validIntGauge], invalidMetrics[emptyGauge]) + // staleNaN cases staleNaNHistogramBatch := getMetricsFromMetricList(staleNaNMetrics[staleNaNHistogram]) staleNaNEmptyHistogramBatch := getMetricsFromMetricList(staleNaNMetrics[staleNaNEmptyHistogram]) @@ -456,20 +475,23 @@ func Test_PushMetrics(t *testing.T) { } tests := []struct { - name string - metrics pmetric.Metrics - reqTestFunc func(t *testing.T, r *http.Request, expected int, isStaleMarker bool) - expectedTimeSeries int - httpResponseCode int - returnErr bool - isStaleMarker bool - skipForWAL bool + name string + metrics pmetric.Metrics + reqTestFunc func(t *testing.T, r *http.Request, expected int, isStaleMarker bool) + expectedTimeSeries int + httpResponseCode int + returnErr bool + isStaleMarker bool + skipForWAL bool + expectedFailedTranslations int }{ { - name: "invalid_type_case", - metrics: invalidTypeBatch, - httpResponseCode: http.StatusAccepted, - returnErr: true, + name: "invalid_type_case", + metrics: invalidTypeBatch, + httpResponseCode: http.StatusAccepted, + reqTestFunc: checkFunc, + expectedTimeSeries: 1, // the resource target metric. + expectedFailedTranslations: 1, }, { name: "intSum_case", @@ -566,32 +588,40 @@ func Test_PushMetrics(t *testing.T) { skipForWAL: true, }, { - name: "emptyGauge_case", - metrics: emptyDoubleGaugeBatch, - reqTestFunc: checkFunc, - httpResponseCode: http.StatusAccepted, - returnErr: true, + name: "emptyGauge_case", + metrics: emptyDoubleGaugeBatch, + reqTestFunc: checkFunc, + httpResponseCode: http.StatusAccepted, + expectedFailedTranslations: 1, }, { - name: "emptyCumulativeSum_case", - metrics: emptyCumulativeSumBatch, - reqTestFunc: checkFunc, - httpResponseCode: http.StatusAccepted, - returnErr: true, + name: "emptyCumulativeSum_case", + metrics: emptyCumulativeSumBatch, + reqTestFunc: checkFunc, + httpResponseCode: http.StatusAccepted, + expectedFailedTranslations: 1, }, { - name: "emptyCumulativeHistogram_case", - metrics: emptyCumulativeHistogramBatch, - reqTestFunc: checkFunc, - httpResponseCode: http.StatusAccepted, - returnErr: true, + name: "emptyCumulativeHistogram_case", + metrics: emptyCumulativeHistogramBatch, + reqTestFunc: checkFunc, + httpResponseCode: http.StatusAccepted, + expectedFailedTranslations: 1, }, { - name: "emptySummary_case", - metrics: emptySummaryBatch, - reqTestFunc: checkFunc, - httpResponseCode: http.StatusAccepted, - returnErr: true, + name: "emptySummary_case", + metrics: emptySummaryBatch, + reqTestFunc: checkFunc, + httpResponseCode: http.StatusAccepted, + expectedFailedTranslations: 1, + }, + { + name: "partialSuccess_case", + metrics: partialSuccess1, + reqTestFunc: checkFunc, + httpResponseCode: http.StatusAccepted, + expectedTimeSeries: 4, + expectedFailedTranslations: 1, }, { name: "staleNaNIntGauge_case", @@ -667,6 +697,7 @@ func Test_PushMetrics(t *testing.T) { } t.Run(tt.name, func(t *testing.T) { t.Parallel() + mockTelemetry := &mockPRWTelemetry{} server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if tt.reqTestFunc != nil { tt.reqTestFunc(t, r, tt.expectedTimeSeries, tt.isStaleMarker) @@ -677,7 +708,7 @@ func Test_PushMetrics(t *testing.T) { defer server.Close() // Adjusted retry settings for faster testing - retrySettings := exporterhelper.RetrySettings{ + retrySettings := configretry.BackOffConfig{ Enabled: true, InitialInterval: 100 * time.Millisecond, // Shorter initial interval MaxInterval: 1 * time.Second, // Shorter max interval @@ -685,7 +716,7 @@ func Test_PushMetrics(t *testing.T) { } cfg := &Config{ Namespace: "", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: server.URL, // We almost read 0 bytes, so no need to tune ReadBufferSize. ReadBufferSize: 0, @@ -699,7 +730,7 @@ func Test_PushMetrics(t *testing.T) { CreatedMetric: &CreatedMetric{ Enabled: true, }, - RetrySettings: retrySettings, + BackOffConfig: retrySettings, } if useWAL { @@ -715,7 +746,10 @@ func Test_PushMetrics(t *testing.T) { } set := exportertest.NewNopCreateSettings() set.BuildInfo = buildInfo + prwe, nErr := newPRWExporter(cfg, set) + prwe.telemetry = mockTelemetry + require.NoError(t, nErr) ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -728,6 +762,9 @@ func Test_PushMetrics(t *testing.T) { assert.Error(t, err) return } + + assert.Equal(t, tt.expectedFailedTranslations, mockTelemetry.failedTranslations) + assert.Equal(t, tt.expectedTimeSeries, mockTelemetry.translatedTimeSeries) assert.NoError(t, err) }) } @@ -855,7 +892,7 @@ func TestWALOnExporterRoundTrip(t *testing.T) { // receive the bytes uploaded to it by our exporter. uploadedBytesCh := make(chan []byte, 1) exiting := make(chan bool) - prweServer := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { + prweServer := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, req *http.Request) { uploaded, err2 := io.ReadAll(req.Body) assert.NoError(t, err2, "Error while reading from HTTP upload") select { @@ -871,7 +908,7 @@ func TestWALOnExporterRoundTrip(t *testing.T) { tempDir := t.TempDir() cfg := &Config{ Namespace: "test_ns", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: prweServer.URL, }, RemoteWriteQueue: RemoteWriteQueue{NumConsumers: 1}, @@ -919,7 +956,7 @@ func TestWALOnExporterRoundTrip(t *testing.T) { "timeseries1": ts1, "timeseries2": ts2, } - errs := prwe.handleExport(ctx, tsMap) + errs := prwe.handleExport(ctx, tsMap, nil) assert.NoError(t, errs) // Shutdown after we've written to the WAL. This ensures that our // exported data in-flight will flushed flushed to the WAL before exiting. @@ -997,69 +1034,86 @@ func TestWALOnExporterRoundTrip(t *testing.T) { assert.Equal(t, gotFromWAL, gotFromUpload) } -func TestRetryOn5xx(t *testing.T) { - // Create a mock HTTP server with a counter to simulate a 5xx error on the first attempt and a 2xx success on the second attempt - attempts := 0 - mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if attempts < 4 { - attempts++ - http.Error(w, "Internal Server Error", http.StatusInternalServerError) - } else { - w.WriteHeader(http.StatusOK) - } - })) - defer mockServer.Close() - - endpointURL, err := url.Parse(mockServer.URL) - require.NoError(t, err) - - // Create the prwExporter - exporter := &prwExporter{ - endpointURL: endpointURL, - client: http.DefaultClient, - retrySettings: exporterhelper.RetrySettings{ - Enabled: true, - }, - } - - ctx := context.Background() +func canceledContext() context.Context { + ctx, cancel := context.WithCancel(context.Background()) + cancel() + return ctx +} - // Execute the write request and verify that the exporter returns a non-permanent error on the first attempt. - err = exporter.execute(ctx, &prompb.WriteRequest{}) - assert.NoError(t, err) - assert.Equal(t, 4, attempts) +func assertPermanentConsumerError(t assert.TestingT, err error, _ ...any) bool { + return assert.True(t, consumererror.IsPermanent(err), "error should be consumererror.Permanent") } -func TestNoRetryOn4xx(t *testing.T) { - // Create a mock HTTP server with a counter to simulate a 4xx error - attempts := 0 - mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if attempts < 1 { - attempts++ - http.Error(w, "Bad Request", http.StatusBadRequest) - } else { - w.WriteHeader(http.StatusOK) - } - })) - defer mockServer.Close() +func TestRetries(t *testing.T) { - endpointURL, err := url.Parse(mockServer.URL) - require.NoError(t, err) - - // Create the prwExporter - exporter := &prwExporter{ - endpointURL: endpointURL, - client: http.DefaultClient, - retrySettings: exporterhelper.RetrySettings{ - Enabled: true, + tts := []struct { + name string + serverErrorCount int // number of times server should return error + expectedAttempts int + httpStatus int + assertError assert.ErrorAssertionFunc + assertErrorType assert.ErrorAssertionFunc + ctx context.Context + }{ + { + "test 5xx should retry", + 3, + 4, + http.StatusInternalServerError, + assert.NoError, + assert.NoError, + context.Background(), + }, + { + "test 4xx should not retry", + 4, + 1, + http.StatusBadRequest, + assert.Error, + assertPermanentConsumerError, + context.Background(), + }, + { + "test timeout context should not execute", + 4, + 0, + http.StatusInternalServerError, + assert.Error, + assertPermanentConsumerError, + canceledContext(), }, } - ctx := context.Background() + for _, tt := range tts { + t.Run(tt.name, func(t *testing.T) { + totalAttempts := 0 + mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { + if totalAttempts < tt.serverErrorCount { + http.Error(w, http.StatusText(tt.httpStatus), tt.httpStatus) + } else { + w.WriteHeader(http.StatusOK) + } + totalAttempts++ + }, + )) + defer mockServer.Close() + + endpointURL, err := url.Parse(mockServer.URL) + require.NoError(t, err) + + // Create the prwExporter + exporter := &prwExporter{ + endpointURL: endpointURL, + client: http.DefaultClient, + retrySettings: configretry.BackOffConfig{ + Enabled: true, + }, + } - // Execute the write request and verify that the exporter returns an error due to the 4xx response. - err = exporter.execute(ctx, &prompb.WriteRequest{}) - assert.Error(t, err) - assert.True(t, consumererror.IsPermanent(err)) - assert.Equal(t, 1, attempts) + err = exporter.execute(tt.ctx, &prompb.WriteRequest{}) + tt.assertError(t, err) + tt.assertErrorType(t, err) + assert.Equal(t, tt.expectedAttempts, totalAttempts) + }) + } } diff --git a/exporter/prometheusremotewriteexporter/factory.go b/exporter/prometheusremotewriteexporter/factory.go index 63135b9b8cb5..d0a0f8555513 100644 --- a/exporter/prometheusremotewriteexporter/factory.go +++ b/exporter/prometheusremotewriteexporter/factory.go @@ -8,10 +8,10 @@ import ( "errors" "time" - "github.com/cenkalti/backoff/v4" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -67,21 +67,18 @@ func createMetricsExporter(ctx context.Context, set exporter.CreateSettings, } func createDefaultConfig() component.Config { + retrySettings := configretry.NewDefaultBackOffConfig() + retrySettings.InitialInterval = 50 * time.Millisecond + return &Config{ Namespace: "", ExternalLabels: map[string]string{}, MaxBatchSizeBytes: 3000000, TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), - RetrySettings: exporterhelper.RetrySettings{ - Enabled: true, - InitialInterval: 50 * time.Millisecond, - MaxInterval: 200 * time.Millisecond, - MaxElapsedTime: 1 * time.Minute, - RandomizationFactor: backoff.DefaultRandomizationFactor, - Multiplier: backoff.DefaultMultiplier, - }, + BackOffConfig: retrySettings, AddMetricSuffixes: true, - HTTPClientSettings: confighttp.HTTPClientSettings{ + SendMetadata: false, + ClientConfig: confighttp.ClientConfig{ Endpoint: "http://some.url:9411/api/prom/push", // We almost read 0 bytes, so no need to tune ReadBufferSize. ReadBufferSize: 0, diff --git a/exporter/prometheusremotewriteexporter/factory_test.go b/exporter/prometheusremotewriteexporter/factory_test.go index 5043d17758ee..c1625bcbb383 100644 --- a/exporter/prometheusremotewriteexporter/factory_test.go +++ b/exporter/prometheusremotewriteexporter/factory_test.go @@ -27,10 +27,10 @@ func Test_createDefaultConfig(t *testing.T) { func Test_createMetricsExporter(t *testing.T) { invalidConfig := createDefaultConfig().(*Config) - invalidConfig.HTTPClientSettings = confighttp.HTTPClientSettings{} + invalidConfig.ClientConfig = confighttp.ClientConfig{} invalidTLSConfig := createDefaultConfig().(*Config) - invalidTLSConfig.HTTPClientSettings.TLSSetting = configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + invalidTLSConfig.ClientConfig.TLSSetting = configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "non-existent file", CertFile: "", KeyFile: "", @@ -86,6 +86,7 @@ func Test_createMetricsExporter(t *testing.T) { return } assert.NoError(t, err) + assert.NoError(t, exp.Shutdown(context.Background())) }) } } diff --git a/exporter/prometheusremotewriteexporter/generated_component_test.go b/exporter/prometheusremotewriteexporter/generated_component_test.go new file mode 100644 index 000000000000..5ffca178a9d8 --- /dev/null +++ b/exporter/prometheusremotewriteexporter/generated_component_test.go @@ -0,0 +1,126 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package prometheusremotewriteexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/prometheusremotewriteexporter/go.mod b/exporter/prometheusremotewriteexporter/go.mod index 05bdf442f7bc..2d60135f98ce 100644 --- a/exporter/prometheusremotewriteexporter/go.mod +++ b/exporter/prometheusremotewriteexporter/go.mod @@ -1,76 +1,86 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter -go 1.20 +go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.1 + github.com/cenkalti/backoff/v4 v4.3.0 github.com/fsnotify/fsnotify v1.7.0 github.com/gogo/protobuf v1.3.2 github.com/golang/snappy v0.0.4 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.89.0 - github.com/prometheus/prometheus v0.47.2 - github.com/stretchr/testify v1.8.4 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.98.0 + github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e + github.com/stretchr/testify v1.9.0 github.com/tidwall/wal v1.1.7 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel v1.25.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.52.2 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect github.com/tidwall/gjson v1.10.2 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/tinylru v1.1.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/prometheusremotewriteexporter/go.sum b/exporter/prometheusremotewriteexporter/go.sum index 88bfeacbcdfc..f5a9ed41224e 100644 --- a/exporter/prometheusremotewriteexporter/go.sum +++ b/exporter/prometheusremotewriteexporter/go.sum @@ -1,84 +1,55 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/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/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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -89,27 +60,24 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= -github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e h1:UmqAuY2OyDoog8+l5FybViJE5B2r+UxVGCUwFTsY5AA= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e/go.mod h1:+0ld+ozir7zWFcHA2vVpWAKxXakIioEjPPNOqH+J3ZA= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/gjson v1.10.2 h1:APbLGOM0rrEkd8WBw9C24nllro4ajFuJu0Sc9hRz8Bo= github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= @@ -122,101 +90,90 @@ github.com/tidwall/wal v1.1.7 h1:emc1TRjIVsdKKSnpwGBAcsAGg0767SvUk8+ygx7Bb+4= github.com/tidwall/wal v1.1.7/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -224,38 +181,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78 h1:Xs9lu+tLXxLIfuci70nG4cpwaRC+mRQPUL7LoIeDJC4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/prometheusremotewriteexporter/helper.go b/exporter/prometheusremotewriteexporter/helper.go index b468609380c8..d5eca3086a7e 100644 --- a/exporter/prometheusremotewriteexporter/helper.go +++ b/exporter/prometheusremotewriteexporter/helper.go @@ -11,12 +11,12 @@ import ( ) // batchTimeSeries splits series into multiple batch write requests. -func batchTimeSeries(tsMap map[string]*prompb.TimeSeries, maxBatchByteSize int) ([]*prompb.WriteRequest, error) { +func batchTimeSeries(tsMap map[string]*prompb.TimeSeries, maxBatchByteSize int, m []*prompb.MetricMetadata) ([]*prompb.WriteRequest, error) { if len(tsMap) == 0 { return nil, errors.New("invalid tsMap: cannot be empty map") } - requests := make([]*prompb.WriteRequest, 0, len(tsMap)) + requests := make([]*prompb.WriteRequest, 0, len(tsMap)+len(m)) tsArray := make([]prompb.TimeSeries, 0, len(tsMap)) sizeOfCurrentBatch := 0 @@ -42,6 +42,30 @@ func batchTimeSeries(tsMap map[string]*prompb.TimeSeries, maxBatchByteSize int) requests = append(requests, wrapped) } + mArray := make([]prompb.MetricMetadata, 0, len(m)) + sizeOfCurrentBatch = 0 + i = 0 + for _, v := range m { + sizeOfM := v.Size() + + if sizeOfCurrentBatch+sizeOfM >= maxBatchByteSize { + wrapped := convertMetadataToRequest(mArray) + requests = append(requests, wrapped) + + mArray = make([]prompb.MetricMetadata, 0, len(m)-i) + sizeOfCurrentBatch = 0 + } + + mArray = append(mArray, *v) + sizeOfCurrentBatch += sizeOfM + i++ + } + + if len(mArray) != 0 { + wrapped := convertMetadataToRequest(mArray) + requests = append(requests, wrapped) + } + return requests, nil } @@ -57,6 +81,12 @@ func convertTimeseriesToRequest(tsArray []prompb.TimeSeries) *prompb.WriteReques } } +func convertMetadataToRequest(m []prompb.MetricMetadata) *prompb.WriteRequest { + return &prompb.WriteRequest{ + Metadata: m, + } +} + func orderBySampleTimestamp(tsArray []prompb.TimeSeries) []prompb.TimeSeries { for i := range tsArray { sL := tsArray[i].Samples diff --git a/exporter/prometheusremotewriteexporter/helper_test.go b/exporter/prometheusremotewriteexporter/helper_test.go index 9528607a6fd9..8404bb6c9e9e 100644 --- a/exporter/prometheusremotewriteexporter/helper_test.go +++ b/exporter/prometheusremotewriteexporter/helper_test.go @@ -57,7 +57,7 @@ func Test_batchTimeSeries(t *testing.T) { // run tests for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - requests, err := batchTimeSeries(tt.tsMap, tt.maxBatchByteSize) + requests, err := batchTimeSeries(tt.tsMap, tt.maxBatchByteSize, nil) if tt.returnErr { assert.Error(t, err) return diff --git a/exporter/prometheusremotewriteexporter/internal/metadata/generated_status.go b/exporter/prometheusremotewriteexporter/internal/metadata/generated_status.go index 2d3635acb0f4..1ad10c8ecf32 100644 --- a/exporter/prometheusremotewriteexporter/internal/metadata/generated_status.go +++ b/exporter/prometheusremotewriteexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("prometheusremotewrite") ) const ( - Type = "prometheusremotewrite" MetricsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/prometheusremotewrite") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/prometheusremotewrite") +} diff --git a/exporter/prometheusremotewriteexporter/metadata.yaml b/exporter/prometheusremotewriteexporter/metadata.yaml index 762142015495..2bd409f97907 100644 --- a/exporter/prometheusremotewriteexporter/metadata.yaml +++ b/exporter/prometheusremotewriteexporter/metadata.yaml @@ -1,9 +1,13 @@ type: prometheusremotewrite +scope_name: otelcol/prometheusremotewrite status: class: exporter stability: beta: [metrics] - distributions: [core, contrib, aws, observiq] + distributions: [core, contrib] codeowners: active: [Aneurysm9, rapphil] + +tests: + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/prometheusremotewriteexporter/package_test.go b/exporter/prometheusremotewriteexporter/package_test.go new file mode 100644 index 000000000000..b12f843d1f2e --- /dev/null +++ b/exporter/prometheusremotewriteexporter/package_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package prometheusremotewriteexporter + +import ( + "testing" + + "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) +} diff --git a/exporter/prometheusremotewriteexporter/wal.go b/exporter/prometheusremotewriteexporter/wal.go index 746ba53bff26..f40e21d063b9 100644 --- a/exporter/prometheusremotewriteexporter/wal.go +++ b/exporter/prometheusremotewriteexporter/wal.go @@ -59,11 +59,11 @@ func (wc *WALConfig) truncateFrequency() time.Duration { return defaultWALTruncateFrequency } -func newWAL(walConfig *WALConfig, exportSink func(context.Context, []*prompb.WriteRequest) error) (*prweWAL, error) { +func newWAL(walConfig *WALConfig, exportSink func(context.Context, []*prompb.WriteRequest) error) *prweWAL { if walConfig == nil { // There are cases for which the WAL can be disabled. // TODO: Perhaps log that the WAL wasn't enabled. - return nil, errNilConfig + return nil } return &prweWAL{ @@ -72,7 +72,7 @@ func newWAL(walConfig *WALConfig, exportSink func(context.Context, []*prompb.Wri stopChan: make(chan struct{}), rWALIndex: &atomic.Uint64{}, wWALIndex: &atomic.Uint64{}, - }, nil + } } func (wc *WALConfig) createWAL() (*wal.Log, string, error) { @@ -90,7 +90,6 @@ func (wc *WALConfig) createWAL() (*wal.Log, string, error) { var ( errAlreadyClosed = errors.New("already closed") errNilWAL = errors.New("wal is nil") - errNilConfig = errors.New("expecting a non-nil configuration") ) // retrieveWALIndices queries the WriteAheadLog for its current first and last indices. diff --git a/exporter/prometheusremotewriteexporter/wal_test.go b/exporter/prometheusremotewriteexporter/wal_test.go index 9de93623f647..9059b65ed2da 100644 --- a/exporter/prometheusremotewriteexporter/wal_test.go +++ b/exporter/prometheusremotewriteexporter/wal_test.go @@ -21,16 +21,14 @@ func doNothingExportSink(_ context.Context, reqL []*prompb.WriteRequest) error { func TestWALCreation_nilConfig(t *testing.T) { config := (*WALConfig)(nil) - pwal, err := newWAL(config, doNothingExportSink) - require.Equal(t, err, errNilConfig) + pwal := newWAL(config, doNothingExportSink) require.Nil(t, pwal) } func TestWALCreation_nonNilConfig(t *testing.T) { config := &WALConfig{Directory: t.TempDir()} - pwal, err := newWAL(config, doNothingExportSink) + pwal := newWAL(config, doNothingExportSink) require.NotNil(t, pwal) - assert.Nil(t, err) assert.NoError(t, pwal.stop()) } @@ -80,18 +78,15 @@ func TestWALStopManyTimes(t *testing.T) { TruncateFrequency: 60 * time.Microsecond, BufferSize: 1, } - pwal, err := newWAL(config, doNothingExportSink) - require.Nil(t, err) + pwal := newWAL(config, doNothingExportSink) require.NotNil(t, pwal) // Ensure that invoking .stop() multiple times doesn't cause a panic, but actually // First close should NOT return an error. - err = pwal.stop() - require.Nil(t, err) + require.NoError(t, pwal.stop()) for i := 0; i < 4; i++ { // Every invocation to .stop() should return an errAlreadyClosed. - err = pwal.stop() - require.Equal(t, err, errAlreadyClosed) + require.ErrorIs(t, pwal.stop(), errAlreadyClosed) } } @@ -99,8 +94,8 @@ func TestWAL_persist(t *testing.T) { // Unit tests that requests written to the WAL persist. config := &WALConfig{Directory: t.TempDir()} - pwal, err := newWAL(config, doNothingExportSink) - require.Nil(t, err) + pwal := newWAL(config, doNothingExportSink) + require.NotNil(t, pwal) // 1. Write out all the entries. reqL := []*prompb.WriteRequest{ @@ -127,27 +122,25 @@ func TestWAL_persist(t *testing.T) { } ctx := context.Background() - err = pwal.retrieveWALIndices() - require.Nil(t, err) + require.NoError(t, pwal.retrieveWALIndices()) t.Cleanup(func() { assert.NoError(t, pwal.stop()) }) - err = pwal.persistToWAL(reqL) - require.Nil(t, err) + require.NoError(t, pwal.persistToWAL(reqL)) // 2. Read all the entries from the WAL itself, guided by the indices available, // and ensure that they are exactly in order as we'd expect them. wal := pwal.wal start, err := wal.FirstIndex() - require.Nil(t, err) + require.NoError(t, err) end, err := wal.LastIndex() - require.Nil(t, err) + require.NoError(t, err) var reqLFromWAL []*prompb.WriteRequest for i := start; i <= end; i++ { req, err := pwal.readPrompbFromWAL(ctx, i) - require.Nil(t, err) + require.NoError(t, err) reqLFromWAL = append(reqLFromWAL, req) } diff --git a/exporter/pulsarexporter/config.go b/exporter/pulsarexporter/config.go index 86eade408a7e..8bc9d557ecc9 100644 --- a/exporter/pulsarexporter/config.go +++ b/exporter/pulsarexporter/config.go @@ -10,6 +10,7 @@ import ( "github.com/apache/pulsar-client-go/pulsar" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -17,7 +18,7 @@ import ( type Config struct { exporterhelper.TimeoutSettings `mapstructure:",squash"` exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // Endpoint of pulsar broker (default "pulsar://localhost:6650") Endpoint string `mapstructure:"endpoint"` diff --git a/exporter/pulsarexporter/config_test.go b/exporter/pulsarexporter/config_test.go index c20f2ed3e274..bd43784cc546 100644 --- a/exporter/pulsarexporter/config_test.go +++ b/exporter/pulsarexporter/config_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -35,7 +36,7 @@ func TestLoadConfig(t *testing.T) { TimeoutSettings: exporterhelper.TimeoutSettings{ Timeout: 20 * time.Second, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, MaxInterval: 1 * time.Minute, diff --git a/exporter/pulsarexporter/factory.go b/exporter/pulsarexporter/factory.go index 639fd2a60d5b..d66cf9188568 100644 --- a/exporter/pulsarexporter/factory.go +++ b/exporter/pulsarexporter/factory.go @@ -10,6 +10,7 @@ import ( "time" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -59,7 +60,7 @@ func NewFactory(options ...FactoryOption) exporter.Factory { func createDefaultConfig() component.Config { return &Config{ TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), Endpoint: defaultBroker, // using an empty topic to track when it has not been set by user, default is based on traces or metrics. @@ -103,8 +104,9 @@ func (f *pulsarExporterFactory) createTracesExporter( // Disable exporterhelper Timeout, because we cannot pass a Context to the Producer, // and will rely on the Pulsar Producer Timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(oCfg.RetrySettings), + exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), + exporterhelper.WithStart(exp.start), exporterhelper.WithShutdown(exp.Close)) } @@ -133,8 +135,9 @@ func (f *pulsarExporterFactory) createMetricsExporter( // Disable exporterhelper Timeout, because we cannot pass a Context to the Producer, // and will rely on the sarama Pulsar Timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(oCfg.RetrySettings), + exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), + exporterhelper.WithStart(exp.start), exporterhelper.WithShutdown(exp.Close)) } @@ -163,7 +166,8 @@ func (f *pulsarExporterFactory) createLogsExporter( // Disable exporterhelper Timeout, because we cannot pass a Context to the Producer, // and will rely on the Pulsar Producer Timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(oCfg.RetrySettings), + exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), + exporterhelper.WithStart(exp.start), exporterhelper.WithShutdown(exp.Close)) } diff --git a/exporter/pulsarexporter/factory_test.go b/exporter/pulsarexporter/factory_test.go index a48b8c6a6c47..186542c706df 100644 --- a/exporter/pulsarexporter/factory_test.go +++ b/exporter/pulsarexporter/factory_test.go @@ -10,6 +10,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/exportertest" ) @@ -18,7 +20,7 @@ func Test_createDefaultConfig(t *testing.T) { cfg := createDefaultConfig() assert.Equal(t, cfg, &Config{ TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), Endpoint: defaultBroker, // using an empty topic to track when it has not been set by user, default is based on traces or metrics. @@ -38,9 +40,10 @@ func TestWithTracesMarshalers_err(t *testing.T) { tracesMarshaler := &customTraceMarshaler{encoding: "unknown"} f := NewFactory(withTracesMarshalers(tracesMarshaler)) r, err := f.CreateTracesExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = r.Start(context.Background(), componenttest.NewNopHost()) // no available broker require.Error(t, err) - assert.Nil(t, r) } func TestCreateTracesExporter_err(t *testing.T) { @@ -49,9 +52,10 @@ func TestCreateTracesExporter_err(t *testing.T) { f := pulsarExporterFactory{tracesMarshalers: tracesMarshalers()} r, err := f.createTracesExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = r.Start(context.Background(), componenttest.NewNopHost()) // no available broker require.Error(t, err) - assert.Nil(t, r) } func TestCreateMetricsExporter_err(t *testing.T) { @@ -59,9 +63,10 @@ func TestCreateMetricsExporter_err(t *testing.T) { cfg.Endpoint = "" mf := pulsarExporterFactory{metricsMarshalers: metricsMarshalers()} - mr, err := mf.createMetricsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + r, err := mf.createMetricsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = r.Start(context.Background(), componenttest.NewNopHost()) require.Error(t, err) - assert.Nil(t, mr) } func TestCreateLogsExporter_err(t *testing.T) { @@ -69,7 +74,8 @@ func TestCreateLogsExporter_err(t *testing.T) { cfg.Endpoint = "" mf := pulsarExporterFactory{logsMarshalers: logsMarshalers()} - mr, err := mf.createLogsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + r, err := mf.createLogsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = r.Start(context.Background(), componenttest.NewNopHost()) require.Error(t, err) - assert.Nil(t, mr) } diff --git a/exporter/pulsarexporter/generated_component_test.go b/exporter/pulsarexporter/generated_component_test.go new file mode 100644 index 000000000000..4979e6a6d81b --- /dev/null +++ b/exporter/pulsarexporter/generated_component_test.go @@ -0,0 +1,101 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package pulsarexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/pulsarexporter/go.mod b/exporter/pulsarexporter/go.mod index b4ac2a253c4f..395f3c18e3a9 100644 --- a/exporter/pulsarexporter/go.mod +++ b/exporter/pulsarexporter/go.mod @@ -1,24 +1,27 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter -go 1.20 +go 1.21 require ( github.com/apache/pulsar-client-go v0.8.1 - github.com/cenkalti/backoff/v4 v4.2.1 + github.com/cenkalti/backoff/v4 v4.3.0 github.com/gogo/protobuf v1.3.2 - github.com/jaegertracing/jaeger v1.41.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 + github.com/jaegertracing/jaeger v1.55.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 ) require ( @@ -29,65 +32,62 @@ require ( github.com/apache/thrift v0.19.0 // indirect github.com/ardielle/ardielle-go v1.5.2 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/danieljoos/wincred v1.0.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/frankban/quicktest v1.14.3 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.6 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/linkedin/goavro/v2 v2.9.8 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/nxadm/tail v1.4.8 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.49.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/atomic v1.11.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/pulsarexporter/go.sum b/exporter/pulsarexporter/go.sum index 38cf2dc28695..4070b570af17 100644 --- a/exporter/pulsarexporter/go.sum +++ b/exporter/pulsarexporter/go.sum @@ -36,7 +36,6 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= @@ -46,7 +45,6 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/zstd v1.5.0 h1:+K/VEwIAaPcHiMtQvpLD4lqW7f0Gk3xdYZmI1hD+CXo= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -74,12 +72,12 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q= -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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -94,12 +92,14 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= 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/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/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0= -github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= +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/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= @@ -112,7 +112,8 @@ github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3 github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +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/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -120,15 +121,18 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -142,7 +146,6 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -188,6 +191,7 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= 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/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -205,7 +209,8 @@ github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -225,8 +230,6 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -239,8 +242,8 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jaegertracing/jaeger v1.41.0 h1:vVNky8dP46M2RjGaZ7qRENqylW+tBFay3h57N16Ip7M= -github.com/jaegertracing/jaeger v1.41.0/go.mod h1:SIkAT75iVmA9U+mESGYuMH6UQv6V9Qy4qxo0lwfCQAc= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= github.com/jawher/mow.cli v1.0.4/go.mod h1:5hQj2V8g+qYmLUVWqu4Wuja1pI57M83EChYLVZ0sMKk= github.com/jawher/mow.cli v1.2.0/go.mod h1:y+pcA3jBAdo/GIZx/0rFjw/K2bVEODP9rfZOfaiq8Ko= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= @@ -260,14 +263,14 @@ github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNr 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.10.8/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= +github.com/klauspost/compress v1.17.6/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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -276,6 +279,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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= @@ -286,8 +290,6 @@ github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPK github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -301,8 +303,6 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -316,17 +316,18 @@ 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/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak= -github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= @@ -338,37 +339,38 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= +github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= @@ -391,30 +393,23 @@ github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= @@ -425,51 +420,55 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +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.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= 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.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -479,8 +478,9 @@ golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -516,6 +516,7 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -557,8 +558,9 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -571,8 +573,8 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -584,6 +586,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -639,12 +642,16 @@ golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -653,6 +660,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= 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/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -709,9 +718,11 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -741,8 +752,9 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -784,8 +796,8 @@ google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -806,8 +818,8 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -820,13 +832,15 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= diff --git a/exporter/pulsarexporter/internal/metadata/generated_status.go b/exporter/pulsarexporter/internal/metadata/generated_status.go index ca71c889e14d..7397a8a4e89c 100644 --- a/exporter/pulsarexporter/internal/metadata/generated_status.go +++ b/exporter/pulsarexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("pulsar") ) const ( - Type = "pulsar" TracesStability = component.StabilityLevelAlpha MetricsStability = component.StabilityLevelAlpha LogsStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/pulsar") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/pulsar") +} diff --git a/exporter/pulsarexporter/metadata.yaml b/exporter/pulsarexporter/metadata.yaml index a353a37e119a..49c6040a833f 100644 --- a/exporter/pulsarexporter/metadata.yaml +++ b/exporter/pulsarexporter/metadata.yaml @@ -1,4 +1,5 @@ type: pulsar +scope_name: otelcol/pulsar status: class: exporter @@ -7,3 +8,7 @@ status: distributions: [contrib] codeowners: active: [dmitryax, dao-jun] + +# Update the exporter to pass the tests +tests: + skip_lifecycle: true \ No newline at end of file diff --git a/exporter/pulsarexporter/pulsar_exporter.go b/exporter/pulsarexporter/pulsar_exporter.go index e32a84516c11..7a473a612235 100644 --- a/exporter/pulsarexporter/pulsar_exporter.go +++ b/exporter/pulsarexporter/pulsar_exporter.go @@ -8,6 +8,7 @@ import ( "fmt" "github.com/apache/pulsar-client-go/pulsar" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/pdata/plog" @@ -20,6 +21,7 @@ import ( var errUnrecognizedEncoding = fmt.Errorf("unrecognized encoding") type PulsarTracesProducer struct { + cfg Config client pulsar.Client producer pulsar.Producer topic string @@ -48,12 +50,26 @@ func (e *PulsarTracesProducer) tracesPusher(ctx context.Context, td ptrace.Trace } func (e *PulsarTracesProducer) Close(context.Context) error { + if e.producer == nil { + return nil + } e.producer.Close() e.client.Close() return nil } +func (e *PulsarTracesProducer) start(_ context.Context, _ component.Host) error { + client, producer, err := newPulsarProducer(e.cfg) + if err != nil { + return err + } + e.client = client + e.producer = producer + return nil +} + type PulsarMetricsProducer struct { + cfg Config client pulsar.Client producer pulsar.Producer topic string @@ -82,12 +98,26 @@ func (e *PulsarMetricsProducer) metricsDataPusher(ctx context.Context, md pmetri } func (e *PulsarMetricsProducer) Close(context.Context) error { + if e.producer == nil { + return nil + } e.producer.Close() e.client.Close() return nil } +func (e *PulsarMetricsProducer) start(_ context.Context, _ component.Host) error { + client, producer, err := newPulsarProducer(e.cfg) + if err != nil { + return err + } + e.client = client + e.producer = producer + return nil +} + type PulsarLogsProducer struct { + cfg Config client pulsar.Client producer pulsar.Producer topic string @@ -116,11 +146,24 @@ func (e *PulsarLogsProducer) logsDataPusher(ctx context.Context, ld plog.Logs) e } func (e *PulsarLogsProducer) Close(context.Context) error { + if e.producer == nil { + return nil + } e.producer.Close() e.client.Close() return nil } +func (e *PulsarLogsProducer) start(_ context.Context, _ component.Host) error { + client, producer, err := newPulsarProducer(e.cfg) + if err != nil { + return err + } + e.client = client + e.producer = producer + return nil +} + func newPulsarProducer(config Config) (pulsar.Client, pulsar.Producer, error) { options := config.clientOptions() @@ -146,14 +189,9 @@ func newMetricsExporter(config Config, set exporter.CreateSettings, marshalers m if marshaler == nil { return nil, errUnrecognizedEncoding } - client, producer, err := newPulsarProducer(config) - if err != nil { - return nil, err - } return &PulsarMetricsProducer{ - client: client, - producer: producer, + cfg: config, topic: config.Topic, marshaler: marshaler, logger: set.Logger, @@ -166,13 +204,8 @@ func newTracesExporter(config Config, set exporter.CreateSettings, marshalers ma if marshaler == nil { return nil, errUnrecognizedEncoding } - client, producer, err := newPulsarProducer(config) - if err != nil { - return nil, err - } return &PulsarTracesProducer{ - client: client, - producer: producer, + cfg: config, topic: config.Topic, marshaler: marshaler, logger: set.Logger, @@ -184,14 +217,9 @@ func newLogsExporter(config Config, set exporter.CreateSettings, marshalers map[ if marshaler == nil { return nil, errUnrecognizedEncoding } - client, producer, err := newPulsarProducer(config) - if err != nil { - return nil, err - } return &PulsarLogsProducer{ - client: client, - producer: producer, + cfg: config, topic: config.Topic, marshaler: marshaler, logger: set.Logger, diff --git a/exporter/pulsarexporter/pulsar_exporter_test.go b/exporter/pulsarexporter/pulsar_exporter_test.go index beb049ebc541..e126545c214c 100644 --- a/exporter/pulsarexporter/pulsar_exporter_test.go +++ b/exporter/pulsarexporter/pulsar_exporter_test.go @@ -59,7 +59,7 @@ func Test_tracerPublisher_marshaler_err(t *testing.T) { producer := PulsarTracesProducer{client: nil, producer: mProducer, marshaler: &customTraceMarshaler{encoding: "unknown"}} err := producer.tracesPusher(context.Background(), testdata.GenerateTracesManySpansSameResource(10)) - assert.NotNil(t, err) + assert.Error(t, err) assert.True(t, consumererror.IsPermanent(err)) } diff --git a/extension/httpforwarder/Makefile b/exporter/rabbitmqexporter/Makefile similarity index 100% rename from extension/httpforwarder/Makefile rename to exporter/rabbitmqexporter/Makefile diff --git a/exporter/rabbitmqexporter/README.md b/exporter/rabbitmqexporter/README.md new file mode 100644 index 000000000000..a396f98427fa --- /dev/null +++ b/exporter/rabbitmqexporter/README.md @@ -0,0 +1,46 @@ +# RabbitMQ Exporter + +| Status | | +| ------------- |-----------| +| Stability | [development]: traces, metrics, logs | +| Distributions | [] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Frabbitmq%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Frabbitmq) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Frabbitmq%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Frabbitmq) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@swar8080](https://www.github.com/swar8080) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development + + +Exports metrics, traces, and logs to [RabbitMQ](https://www.rabbitmq.com/) using the AMQP 0.9.1 protocol + +## Getting Started + +The following settings can be configured: +- `connection`: + - `endpoint` (required, ex = amqp://localhost:5672): Endpoint to connect to RabbitMQ + - `vhost` (optional): The RabbitMQ [virtual host](https://www.rabbitmq.com/docs/vhosts) to connect to + - `auth`: + - `sasl`: Configuration if using SASL PLAIN authentication + - `username` (required): username for authentication + - `password` (required): password for authentication + - `tls` (optional): TODO, need to add this + - `routing`: + - `routing_key` (default = otlp_spans for traces, otlp_metrics for metrics, otlp_logs for logs): Routing key used to route exported messages to RabbitMQ consumers + - `durable` (default = true): Whether to instruct RabbitMQ to make messages [durable](https://www.rabbitmq.com/docs/queues#durability) by writing to disk + - `message_body_encoding`: (default = "otlp_proto"): The encoding of telemetry sent to RabbitMQ + - `otlp_proto`: payload is Protobuf serialized from `ExportTraceServiceRequest` if set as a traces exporter or `ExportMetricsServiceRequest` for metrics or `ExportLogsServiceRequest` for logs. + - `otlp_json`: ** EXPERIMENTAL ** payload is JSON serialized from `ExportTraceServiceRequest` if set as a traces exporter or `ExportMetricsServiceRequest` for metrics or `ExportLogsServiceRequest` for logs. + - `retry_on_failure`: + - `enabled` (default = false) + +Example config: + +```yaml +exporters: + rabbitmq: + connection: + endpoint: amqp://localhost:5672 + auth: + sasl: + username: user + password: pass +``` \ No newline at end of file diff --git a/exporter/rabbitmqexporter/config.go b/exporter/rabbitmqexporter/config.go new file mode 100644 index 000000000000..9aad0213d7a5 --- /dev/null +++ b/exporter/rabbitmqexporter/config.go @@ -0,0 +1,43 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package rabbitmqexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/rabbitmqexporter" + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" +) + +type Config struct { + Connection ConnectionConfig `mapstructure:"connection"` + Routing RoutingConfig `mapstructure:"routing"` + MessageBodyEncoding string `mapstructure:"message_body_encoding"` + Durable bool `mapstructure:"durable"` + RetrySettings configretry.BackOffConfig `mapstructure:"retry_on_failure"` +} + +type ConnectionConfig struct { + Endpoint string `mapstructure:"endpoint"` + VHost string `mapstructure:"vhost"` + Auth AuthConfig `mapstructure:"auth"` +} + +type RoutingConfig struct { + RoutingKey string `mapstructure:"routing_key"` +} + +type AuthConfig struct { + SASL SASLConfig `mapstructure:"sasl"` +} + +type SASLConfig struct { + Username string `mapstructure:"username"` + Password string `mapstructure:"password"` +} + +var _ component.Config = (*Config)(nil) + +// Validate checks if the exporter configuration is valid +func (cfg *Config) Validate() error { + return nil +} diff --git a/exporter/rabbitmqexporter/config_test.go b/exporter/rabbitmqexporter/config_test.go new file mode 100644 index 000000000000..22cb41018d68 --- /dev/null +++ b/exporter/rabbitmqexporter/config_test.go @@ -0,0 +1,91 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package rabbitmqexporter + +import ( + "path/filepath" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/confmap/confmaptest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/rabbitmqexporter/internal/metadata" +) + +func TestLoadConfig(t *testing.T) { + t.Parallel() + + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "test-config.yaml")) + require.NoError(t, err) + + tests := []struct { + id component.ID + expected component.Config + }{ + { + id: component.NewIDWithName(metadata.Type, ""), + expected: createDefaultConfig().(*Config), + }, + { + id: component.NewIDWithName(metadata.Type, "all_fields"), + expected: &Config{ + Connection: ConnectionConfig{ + Endpoint: "amqp://localhost:5672", + VHost: "vhost1", + Auth: AuthConfig{ + SASL: SASLConfig{ + Username: "user", + Password: "pass", + }, + }, + }, + Routing: RoutingConfig{ + RoutingKey: "custom_routing_key", + }, + MessageBodyEncoding: "otlp_json", + Durable: false, + RetrySettings: configretry.BackOffConfig{ + Enabled: true, + }, + }, + }, + { + id: component.NewIDWithName(metadata.Type, "mandatory_fields"), + expected: &Config{ + Connection: ConnectionConfig{ + Endpoint: "amqp://localhost:5672", + VHost: "", + Auth: AuthConfig{ + SASL: SASLConfig{ + Username: "user", + Password: "pass", + }, + }, + }, + MessageBodyEncoding: "otlp_proto", + Durable: true, + RetrySettings: configretry.BackOffConfig{ + Enabled: false, + }, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.id.String(), func(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + + sub, err := cm.Sub(tt.id.String()) + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + assert.NoError(t, component.ValidateConfig(cfg)) + assert.Equal(t, tt.expected, cfg) + }) + } +} diff --git a/exporter/rabbitmqexporter/doc.go b/exporter/rabbitmqexporter/doc.go new file mode 100644 index 000000000000..52181ceff162 --- /dev/null +++ b/exporter/rabbitmqexporter/doc.go @@ -0,0 +1,7 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +// Package rabbitmqexporter exports telemetry to RabbitMQ using the AMQP 0.9.1 protocol +package rabbitmqexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/rabbitmqexporter" diff --git a/exporter/rabbitmqexporter/factory.go b/exporter/rabbitmqexporter/factory.go new file mode 100644 index 000000000000..23804efdf432 --- /dev/null +++ b/exporter/rabbitmqexporter/factory.go @@ -0,0 +1,101 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package rabbitmqexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/rabbitmqexporter" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exporterhelper" + + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/rabbitmqexporter/internal/metadata" +) + +const ( + defaultEncoding = "otlp_proto" +) + +func NewFactory() exporter.Factory { + return exporter.NewFactory( + metadata.Type, + createDefaultConfig, + exporter.WithLogs(createLogsExporter, metadata.LogsStability), + exporter.WithMetrics(createMetricsExporter, metadata.TracesStability), + exporter.WithTraces(createTracesExporter, metadata.LogsStability), + ) +} + +func createDefaultConfig() component.Config { + retrySettings := configretry.BackOffConfig{ + Enabled: false, + } + return &Config{ + MessageBodyEncoding: defaultEncoding, + Durable: true, + RetrySettings: retrySettings, + } +} + +func createTracesExporter( + ctx context.Context, + set exporter.CreateSettings, + cfg component.Config, +) (exporter.Traces, error) { + config := cfg.(*Config) + r := newRabbitmqExporter(config, set.TelemetrySettings) + + return exporterhelper.NewTracesExporter( + ctx, + set, + cfg, + r.pushTraces, + exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), + exporterhelper.WithStart(r.start), + exporterhelper.WithShutdown(r.shutdown), + exporterhelper.WithRetry(config.RetrySettings), + ) +} + +func createMetricsExporter( + ctx context.Context, + set exporter.CreateSettings, + cfg component.Config, +) (exporter.Metrics, error) { + config := (cfg.(*Config)) + r := newRabbitmqExporter(config, set.TelemetrySettings) + + return exporterhelper.NewMetricsExporter( + ctx, + set, + cfg, + r.pushMetrics, + exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), + exporterhelper.WithStart(r.start), + exporterhelper.WithShutdown(r.shutdown), + exporterhelper.WithRetry(config.RetrySettings), + ) +} + +func createLogsExporter( + ctx context.Context, + set exporter.CreateSettings, + cfg component.Config, +) (exporter.Logs, error) { + config := (cfg.(*Config)) + r := newRabbitmqExporter(config, set.TelemetrySettings) + + return exporterhelper.NewLogsExporter( + ctx, + set, + cfg, + r.pushLogs, + exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), + exporterhelper.WithStart(r.start), + exporterhelper.WithShutdown(r.shutdown), + exporterhelper.WithRetry(config.RetrySettings), + ) +} diff --git a/exporter/rabbitmqexporter/factory_test.go b/exporter/rabbitmqexporter/factory_test.go new file mode 100644 index 000000000000..a5787dd6881b --- /dev/null +++ b/exporter/rabbitmqexporter/factory_test.go @@ -0,0 +1,47 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package rabbitmqexporter + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/exporter/exportertest" +) + +func TestCreateDefaultConfig(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + assert.NotNil(t, cfg, "failed to create default config") + assert.NoError(t, componenttest.CheckConfigStruct(cfg)) +} + +func TestCreateTracesExporter(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + + te, err := factory.CreateTracesExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + assert.NoError(t, err) + assert.NotNil(t, te) +} + +func TestCreateMetricsExporter(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + + te, err := factory.CreateMetricsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + assert.NoError(t, err) + assert.NotNil(t, te) +} + +func TestCreateLogsExporter(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + + te, err := factory.CreateLogsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + assert.NoError(t, err) + assert.NotNil(t, te) +} diff --git a/exporter/rabbitmqexporter/generated_component_test.go b/exporter/rabbitmqexporter/generated_component_test.go new file mode 100644 index 000000000000..78deb8976565 --- /dev/null +++ b/exporter/rabbitmqexporter/generated_component_test.go @@ -0,0 +1,101 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package rabbitmqexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/rabbitmqexporter/go.mod b/exporter/rabbitmqexporter/go.mod new file mode 100644 index 000000000000..32b372534e1f --- /dev/null +++ b/exporter/rabbitmqexporter/go.mod @@ -0,0 +1,59 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/rabbitmqexporter + +go 1.21 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 +) + +require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // 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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.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.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/exporter/rabbitmqexporter/go.sum b/exporter/rabbitmqexporter/go.sum new file mode 100644 index 000000000000..affe818ecd46 --- /dev/null +++ b/exporter/rabbitmqexporter/go.sum @@ -0,0 +1,152 @@ +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.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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.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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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/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/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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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/exporter/rabbitmqexporter/internal/metadata/generated_status.go b/exporter/rabbitmqexporter/internal/metadata/generated_status.go new file mode 100644 index 000000000000..e52726f1f42b --- /dev/null +++ b/exporter/rabbitmqexporter/internal/metadata/generated_status.go @@ -0,0 +1,27 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("rabbitmq") +) + +const ( + TracesStability = component.StabilityLevelDevelopment + MetricsStability = component.StabilityLevelDevelopment + LogsStability = component.StabilityLevelDevelopment +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/rabbitmq") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/rabbitmq") +} diff --git a/exporter/rabbitmqexporter/metadata.yaml b/exporter/rabbitmqexporter/metadata.yaml new file mode 100644 index 000000000000..caca7005d662 --- /dev/null +++ b/exporter/rabbitmqexporter/metadata.yaml @@ -0,0 +1,15 @@ +type: rabbitmq +scope_name: otelcol/rabbitmq + +status: + class: exporter + stability: + development: [traces, metrics, logs] + distributions: [] + codeowners: + active: [swar8080] + +tests: + skip_lifecycle: true + skip_shutdown: false + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/rabbitmqexporter/package_test.go b/exporter/rabbitmqexporter/package_test.go new file mode 100644 index 000000000000..a47186870311 --- /dev/null +++ b/exporter/rabbitmqexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package rabbitmqexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/rabbitmqexporter/rabbitmq_exporter.go b/exporter/rabbitmqexporter/rabbitmq_exporter.go new file mode 100644 index 000000000000..0c4d326a1e47 --- /dev/null +++ b/exporter/rabbitmqexporter/rabbitmq_exporter.go @@ -0,0 +1,54 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package rabbitmqexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/rabbitmqexporter" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +type rabbitmqExporter struct { + config *Config + settings component.TelemetrySettings +} + +func newRabbitmqExporter(cfg *Config, set component.TelemetrySettings) *rabbitmqExporter { + return &rabbitmqExporter{ + config: cfg, + settings: set, + } +} + +func (s *rabbitmqExporter) start(_ context.Context, _ component.Host) error { + + // To Be Implemented + return nil +} + +func (s *rabbitmqExporter) pushTraces(_ context.Context, _ ptrace.Traces) error { + + // To Be Implemented + return nil +} + +func (s *rabbitmqExporter) pushMetrics(_ context.Context, _ pmetric.Metrics) error { + + // To Be Implemented + return nil +} + +func (s *rabbitmqExporter) pushLogs(_ context.Context, _ plog.Logs) error { + + // To Be Implemented + return nil +} + +func (s *rabbitmqExporter) shutdown(_ context.Context) error { + // To Be Implemented + return nil +} diff --git a/exporter/rabbitmqexporter/testdata/test-config.yaml b/exporter/rabbitmqexporter/testdata/test-config.yaml new file mode 100644 index 000000000000..18ea1c1f6d0a --- /dev/null +++ b/exporter/rabbitmqexporter/testdata/test-config.yaml @@ -0,0 +1,22 @@ +rabbitmq/all_fields: + connection: + endpoint: amqp://localhost:5672 + vhost: vhost1 + auth: + sasl: + username: user + password: pass + routing: + routing_key: custom_routing_key + message_body_encoding: otlp_json + durable: false + retry_on_failure: + enabled: true + +rabbitmq/mandatory_fields: + connection: + endpoint: amqp://localhost:5672 + auth: + sasl: + username: user + password: pass diff --git a/exporter/sapmexporter/README.md b/exporter/sapmexporter/README.md index 5dffdac1d775..e6dc89e9875e 100644 --- a/exporter/sapmexporter/README.md +++ b/exporter/sapmexporter/README.md @@ -4,15 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces | -| Distributions | [contrib], [aws], [observiq], [splunk] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fsapm%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fsapm) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fsapm%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fsapm) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dmitryax](https://www.github.com/dmitryax), [@atoulme](https://www.github.com/atoulme) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector The SAPM exporter builds on the Jaeger proto and adds additional batching on top. This allows diff --git a/exporter/sapmexporter/config.go b/exporter/sapmexporter/config.go index 8f56221617b0..0c34eb7d23df 100644 --- a/exporter/sapmexporter/config.go +++ b/exporter/sapmexporter/config.go @@ -10,6 +10,7 @@ import ( sapmclient "github.com/signalfx/sapm-proto/client" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk" @@ -50,7 +51,7 @@ type Config struct { exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` } func (c *Config) Validate() error { diff --git a/exporter/sapmexporter/config_test.go b/exporter/sapmexporter/config_test.go index a3c9de3d88ca..baf3e96463d6 100644 --- a/exporter/sapmexporter/config_test.go +++ b/exporter/sapmexporter/config_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -51,7 +52,7 @@ func TestLoadConfig(t *testing.T) { TimeoutSettings: exporterhelper.TimeoutSettings{ Timeout: 10 * time.Second, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, MaxInterval: 1 * time.Minute, diff --git a/exporter/sapmexporter/exporter.go b/exporter/sapmexporter/exporter.go index 7767474aecc7..878d0267fce3 100644 --- a/exporter/sapmexporter/exporter.go +++ b/exporter/sapmexporter/exporter.go @@ -68,7 +68,7 @@ func newSAPMTracesExporter(cfg *Config, set exporter.CreateSettings) (exporter.T se.pushTraceData, exporterhelper.WithShutdown(se.Shutdown), exporterhelper.WithQueue(cfg.QueueSettings), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithTimeout(cfg.TimeoutSettings), ) diff --git a/exporter/sapmexporter/exporter_test.go b/exporter/sapmexporter/exporter_test.go index f52079884c9f..846380839960 100644 --- a/exporter/sapmexporter/exporter_test.go +++ b/exporter/sapmexporter/exporter_test.go @@ -39,7 +39,7 @@ func TestCreateTracesExporter(t *testing.T) { params := exportertest.NewNopCreateSettings() te, err := newSAPMTracesExporter(cfg, params) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, te, "failed to create trace exporter") assert.NoError(t, te.Shutdown(context.Background()), "trace exporter shutdown failed") @@ -199,7 +199,7 @@ func TestSAPMClientTokenUsageAndErrorMarshalling(t *testing.T) { params := exportertest.NewNopCreateSettings() se, err := newSAPMExporter(cfg, params) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, se, "failed to create trace exporter") trace, testTraceErr := buildTestTrace() @@ -315,7 +315,7 @@ func TestCompression(t *testing.T) { params := exportertest.NewNopCreateSettings() se, err := newSAPMExporter(cfg, params) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, se, "failed to create trace exporter") trace, testTraceErr := buildTestTrace() diff --git a/exporter/sapmexporter/factory.go b/exporter/sapmexporter/factory.go index ab1069c60db7..58ef76f720f2 100644 --- a/exporter/sapmexporter/factory.go +++ b/exporter/sapmexporter/factory.go @@ -7,6 +7,7 @@ import ( "context" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -33,7 +34,7 @@ func createDefaultConfig() component.Config { AccessTokenPassthrough: true, }, TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), } } diff --git a/exporter/sapmexporter/factory_test.go b/exporter/sapmexporter/factory_test.go index ceb401881553..f06670f6c156 100644 --- a/exporter/sapmexporter/factory_test.go +++ b/exporter/sapmexporter/factory_test.go @@ -21,7 +21,7 @@ func TestCreateDefaultConfig(t *testing.T) { func TestCreateExporter(t *testing.T) { factory := NewFactory() - assert.Equal(t, "sapm", string(factory.Type())) + assert.Equal(t, "sapm", factory.Type().String()) cfg := factory.CreateDefaultConfig() eCfg := cfg.(*Config) @@ -29,7 +29,7 @@ func TestCreateExporter(t *testing.T) { params := exportertest.NewNopCreateSettings() te, err := factory.CreateTracesExporter(context.Background(), params, eCfg) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, te, "failed to create trace exporter") me, err := factory.CreateMetricsExporter(context.Background(), params, eCfg) diff --git a/exporter/sapmexporter/generated_component_test.go b/exporter/sapmexporter/generated_component_test.go new file mode 100644 index 000000000000..8a15e3679afc --- /dev/null +++ b/exporter/sapmexporter/generated_component_test.go @@ -0,0 +1,126 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package sapmexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/sapmexporter/go.mod b/exporter/sapmexporter/go.mod index ddc176d0e076..04bc40486f12 100644 --- a/exporter/sapmexporter/go.mod +++ b/exporter/sapmexporter/go.mod @@ -1,67 +1,73 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter -go 1.20 +go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.1 - github.com/jaegertracing/jaeger v1.41.0 - github.com/klauspost/compress v1.17.2 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.89.0 - github.com/signalfx/sapm-proto v0.13.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/cenkalti/backoff/v4 v4.3.0 + github.com/jaegertracing/jaeger v1.55.0 + github.com/klauspost/compress v1.17.8 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.98.0 + github.com/signalfx/sapm-proto v0.14.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( github.com/apache/thrift v0.19.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/atomic v1.10.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/sapmexporter/go.sum b/exporter/sapmexporter/go.sum index 90274af802c7..bfe5e6e0cf40 100644 --- a/exporter/sapmexporter/go.sum +++ b/exporter/sapmexporter/go.sum @@ -1,38 +1,39 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.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/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/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/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/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -54,32 +55,31 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ 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.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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/jaegertracing/jaeger v1.41.0 h1:vVNky8dP46M2RjGaZ7qRENqylW+tBFay3h57N16Ip7M= -github.com/jaegertracing/jaeger v1.41.0/go.mod h1:SIkAT75iVmA9U+mESGYuMH6UQv6V9Qy4qxo0lwfCQAc= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= 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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -87,79 +87,81 @@ 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/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= 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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/signalfx/sapm-proto v0.13.0 h1:yEkp1+MAU4vZvnJMp56uhVlRjlvCK7KQjBg0g2Apw8k= -github.com/signalfx/sapm-proto v0.13.0/go.mod h1:C72HjeCW5v0Llk6pIVJ/ZH8A5GbiZpCCSkE1dSlpWxY= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= +github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +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/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/signalfx/sapm-proto v0.14.0 h1:KWh3I5E4EkelB19aP1/54Ik8khSioC/RVRW/riOfRGg= +github.com/signalfx/sapm-proto v0.14.0/go.mod h1:Km6PskZh966cqNoUn3AmRyGRix5VfwnxVBvn2vjRC9U= 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.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/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -178,8 +180,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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= @@ -190,8 +192,8 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -213,15 +215,15 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= 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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -233,11 +235,11 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/sapmexporter/internal/metadata/generated_status.go b/exporter/sapmexporter/internal/metadata/generated_status.go index b623b108ae12..17fa827679d7 100644 --- a/exporter/sapmexporter/internal/metadata/generated_status.go +++ b/exporter/sapmexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("sapm") ) const ( - Type = "sapm" TracesStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/sapm") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/sapm") +} diff --git a/exporter/sapmexporter/metadata.yaml b/exporter/sapmexporter/metadata.yaml index 3df77e18104b..47ae147c81d1 100644 --- a/exporter/sapmexporter/metadata.yaml +++ b/exporter/sapmexporter/metadata.yaml @@ -1,9 +1,14 @@ type: sapm +scope_name: otelcol/sapm status: class: exporter stability: beta: [traces] - distributions: [contrib, splunk, observiq, aws] + distributions: [contrib] codeowners: active: [dmitryax, atoulme] + + +tests: + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/sapmexporter/package_test.go b/exporter/sapmexporter/package_test.go new file mode 100644 index 000000000000..14ca4f36f219 --- /dev/null +++ b/exporter/sapmexporter/package_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sapmexporter + +import ( + "testing" + + "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")) +} diff --git a/exporter/sentryexporter/factory_test.go b/exporter/sentryexporter/factory_test.go index c16652a2ebd5..1827e3ad9750 100644 --- a/exporter/sentryexporter/factory_test.go +++ b/exporter/sentryexporter/factory_test.go @@ -23,14 +23,14 @@ func TestCreateDefaultConfig(t *testing.T) { func TestCreateExporter(t *testing.T) { factory := NewFactory() - assert.Equal(t, metadata.Type, string(factory.Type())) + assert.Equal(t, metadata.Type, factory.Type()) cfg := factory.CreateDefaultConfig() eCfg := cfg.(*Config) params := exportertest.NewNopCreateSettings() te, err := factory.CreateTracesExporter(context.Background(), params, eCfg) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, te, "failed to create trace exporter") me, err := factory.CreateMetricsExporter(context.Background(), params, eCfg) diff --git a/exporter/sentryexporter/generated_component_test.go b/exporter/sentryexporter/generated_component_test.go new file mode 100644 index 000000000000..e22a7b4b5e9b --- /dev/null +++ b/exporter/sentryexporter/generated_component_test.go @@ -0,0 +1,126 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package sentryexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/sentryexporter/go.mod b/exporter/sentryexporter/go.mod index e3736907ed1e..77591cd4e5a0 100644 --- a/exporter/sentryexporter/go.mod +++ b/exporter/sentryexporter/go.mod @@ -1,53 +1,64 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter -go 1.20 +go 1.21 require ( - github.com/getsentry/sentry-go v0.25.0 + github.com/getsentry/sentry-go v0.27.0 github.com/google/go-cmp v0.6.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/sentryexporter/go.sum b/exporter/sentryexporter/go.sum index 70111f98bdf8..900caf06e600 100644 --- a/exporter/sentryexporter/go.sum +++ b/exporter/sentryexporter/go.sum @@ -1,58 +1,34 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI= -github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -61,15 +37,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -78,106 +53,93 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ 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/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -185,38 +147,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/sentryexporter/internal/metadata/generated_status.go b/exporter/sentryexporter/internal/metadata/generated_status.go index c524afd062e5..3928cb23fcb9 100644 --- a/exporter/sentryexporter/internal/metadata/generated_status.go +++ b/exporter/sentryexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("sentry") ) const ( - Type = "sentry" TracesStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/sentry") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/sentry") +} diff --git a/exporter/sentryexporter/metadata.yaml b/exporter/sentryexporter/metadata.yaml index 74cf89d6984b..83375983bd64 100644 --- a/exporter/sentryexporter/metadata.yaml +++ b/exporter/sentryexporter/metadata.yaml @@ -1,4 +1,5 @@ type: sentry +scope_name: otelcol/sentry status: class: exporter @@ -7,3 +8,7 @@ status: distributions: [contrib] codeowners: active: [AbhiPrasad] + + +tests: + expect_consumer_error: true \ No newline at end of file diff --git a/exporter/sentryexporter/package_test.go b/exporter/sentryexporter/package_test.go new file mode 100644 index 000000000000..7ee7fa0393fa --- /dev/null +++ b/exporter/sentryexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sentryexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/sentryexporter/sentry_exporter_test.go b/exporter/sentryexporter/sentry_exporter_test.go index 0506e88c379e..86f0b50b84b9 100644 --- a/exporter/sentryexporter/sentry_exporter_test.go +++ b/exporter/sentryexporter/sentry_exporter_test.go @@ -724,7 +724,7 @@ func TestPushTraceData(t *testing.T) { } err := s.pushTraceData(context.Background(), test.td) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, test.called, transport.called) }) } diff --git a/exporter/signalfxexporter/README.md b/exporter/signalfxexporter/README.md index d194857efd01..d07b5b48a4dc 100644 --- a/exporter/signalfxexporter/README.md +++ b/exporter/signalfxexporter/README.md @@ -4,15 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces, metrics, logs | -| Distributions | [contrib], [aws], [observiq], [splunk] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fsignalfx%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fsignalfx) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fsignalfx%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fsignalfx) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dmitryax](https://www.github.com/dmitryax), [@crobert-1](https://www.github.com/crobert-1) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector This exporter can be used to send metrics, events, and trace correlation to SignalFx. @@ -84,8 +81,12 @@ The following configuration options can also be configured: - `disable_default_translation_rules` (default = `false`): Disable default translation of the OTel metrics to a SignalFx compatible format. The default translation rules are defined in `translation/constants.go`. -- `timeout` (default = 5s): Amount of time to wait for a send operation to +- `timeout` (default = 10s): Amount of time to wait for a send operation to complete. +- `http2_read_idle_timeout` (default = 10s): Send a ping frame for a health check if the connection has been idle for the configured value. + 0s means http/2 health check will be disabled. +- `http2_ping_timeout` (default = 10s): Triggered by `http2_read_idle_timeout`; When there's no response to the ping within the configured value, + the connection will be closed. If this value is set to 0, it will default to 15s. - `headers` (no default): Headers to pass in the payload. - `max_idle_conns` (default = 100): The maximum idle HTTP connections the client can keep open. - `max_idle_conns_per_host` (default = 100): The maximum idle HTTP connections the client can keep open per host. @@ -141,7 +142,8 @@ will be replaced with a `_`. api_tls: ca_file: "/etc/opt/certs/ca.pem" ``` -- `drop_histogram_buckets`: (default = `false`) if set to true, histogram buckets will not be translated into datapoints with `_bucket` suffix but will be dropped instead, only datapoints with `_sum`, `_count`, `_min` (optional) and `_max` (optional) suffixes will be sent. +- `drop_histogram_buckets`: (default = `false`) if set to true, histogram buckets will not be translated into datapoints with `_bucket` suffix but will be dropped instead, only datapoints with `_sum`, `_count`, `_min` (optional) and `_max` (optional) suffixes will be sent. Please note that this option does not apply to histograms sent in OTLP format with `send_otlp_histograms` enabled. +- `send_otlp_histograms`: (default: `false`) if set to true, any histogram metrics receiver by the exporter will be sent to Splunk Observability backend in OTLP format without conversion to SignalFx format. This can only be enabled if the Splunk Observability environment (realm) has the new Histograms feature rolled out. Please note that histograms sent in OTLP format do not apply to the exporter configurations `include_metrics` and `exclude_metrics`. In addition, this exporter offers queued retry which is enabled by default. Information about queued retry configuration parameters can be found [here](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md). diff --git a/exporter/signalfxexporter/config.go b/exporter/signalfxexporter/config.go index b8d14217d7a6..d7b27608c9b2 100644 --- a/exporter/signalfxexporter/config.go +++ b/exporter/signalfxexporter/config.go @@ -11,6 +11,7 @@ import ( "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -49,9 +50,9 @@ var _ confmap.Unmarshaler = (*Config)(nil) // Config defines configuration for SignalFx exporter. type Config struct { - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` - confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + exporterhelper.QueueSettings `mapstructure:"sending_queue"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` + confighttp.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. // AccessToken is the authentication token provided by SignalFx. AccessToken configopaque.String `mapstructure:"access_token"` @@ -67,7 +68,7 @@ type Config struct { // ingest_tls needs to be set if the exporter's IngestURL is pointing to a signalfx receiver // with TLS enabled and using a self-signed certificate where its CA is not loaded in the system cert pool. - IngestTLSSettings configtls.TLSClientSetting `mapstructure:"ingest_tls,omitempty"` + IngestTLSSettings configtls.ClientConfig `mapstructure:"ingest_tls,omitempty"` // APIURL is the destination to where SignalFx metadata will be sent. This // value takes precedence over the value of Realm @@ -75,7 +76,7 @@ type Config struct { // api_tls needs to be set if the exporter's APIURL is pointing to a httforwarder extension // with TLS enabled and using a self-signed certificate where its CA is not loaded in the system cert pool. - APITLSSettings configtls.TLSClientSetting `mapstructure:"api_tls,omitempty"` + APITLSSettings configtls.ClientConfig `mapstructure:"api_tls,omitempty"` // Whether to log datapoints dispatched to Splunk Observability Cloud LogDataPoints bool `mapstructure:"log_data_points"` @@ -111,7 +112,7 @@ type Config struct { // ExcludeMetrics defines dpfilter.MetricFilters that will determine metrics to be // excluded from sending to SignalFx backend. If translations enabled with - // TranslationRules options, the exclusion will be applie on translated metrics. + // TranslationRules options, the exclusion will be applied on translated metrics. ExcludeMetrics []dpfilters.MetricFilter `mapstructure:"exclude_metrics"` // IncludeMetrics defines dpfilter.MetricFilters to override exclusion any of metric. @@ -133,6 +134,10 @@ type Config struct { // Whether to drop histogram bucket metrics dispatched to Splunk Observability. // Default value is set to false. DropHistogramBuckets bool `mapstructure:"drop_histogram_buckets"` + + // Whether to send histogram metrics in OTLP format to Splunk Observability. + // Default value is set to false. + SendOTLPHistograms bool `mapstructure:"send_otlp_histograms"` } type DimensionClientConfig struct { @@ -201,7 +206,7 @@ func (cfg *Config) Unmarshal(componentParser *confmap.Conf) error { return nil } - if err := componentParser.Unmarshal(cfg); err != nil { + if err := componentParser.Unmarshal(cfg, confmap.WithIgnoreUnused()); err != nil { return err } @@ -219,7 +224,7 @@ func (cfg *Config) Validate() error { ` "ingest_url" and "api_url" should be explicitly set`) } - if cfg.HTTPClientSettings.Timeout < 0 { + if cfg.ClientConfig.Timeout < 0 { return errors.New(`cannot have a negative "timeout"`) } @@ -241,7 +246,7 @@ func loadConfig(bytes []byte) (Config, error) { return cfg, err } - if err := confmap.NewFromStringMap(data).Unmarshal(&cfg, confmap.WithErrorUnused()); err != nil { + if err := confmap.NewFromStringMap(data).Unmarshal(&cfg); err != nil { return cfg, fmt.Errorf("failed to load default exclude metrics: %w", err) } diff --git a/exporter/signalfxexporter/config_test.go b/exporter/signalfxexporter/config_test.go index 2646ee12cbef..8f135e5b77d3 100644 --- a/exporter/signalfxexporter/config_test.go +++ b/exporter/signalfxexporter/config_test.go @@ -15,6 +15,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -47,14 +48,16 @@ func TestLoadConfig(t *testing.T) { expected: &Config{ AccessToken: "testToken", Realm: "ap0", - HTTPClientSettings: confighttp.HTTPClientSettings{ - Timeout: 5 * time.Second, - Headers: nil, - MaxIdleConns: &hundred, - MaxIdleConnsPerHost: &hundred, - IdleConnTimeout: &idleConnTimeout, + ClientConfig: confighttp.ClientConfig{ + Timeout: 10 * time.Second, + Headers: nil, + MaxIdleConns: &hundred, + MaxIdleConnsPerHost: &hundred, + IdleConnTimeout: &idleConnTimeout, + HTTP2ReadIdleTimeout: 10 * time.Second, + HTTP2PingTimeout: 10 * time.Second, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 5 * time.Second, MaxInterval: 30 * time.Second, @@ -82,7 +85,7 @@ func TestLoadConfig(t *testing.T) { DeltaTranslationTTL: 3600, ExcludeProperties: nil, Correlation: &correlation.Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "", Timeout: 5 * time.Second, }, @@ -101,6 +104,7 @@ func TestLoadConfig(t *testing.T) { }, }, NonAlphanumericDimensionChars: "_-.", + SendOTLPHistograms: false, }, }, { @@ -108,17 +112,19 @@ func TestLoadConfig(t *testing.T) { expected: &Config{ AccessToken: "testToken", Realm: "us1", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: 2 * time.Second, Headers: map[string]configopaque.String{ "added-entry": "added value", "dot.test": "test", }, - MaxIdleConns: &seventy, - MaxIdleConnsPerHost: &seventy, - IdleConnTimeout: &idleConnTimeout, + MaxIdleConns: &seventy, + MaxIdleConnsPerHost: &seventy, + IdleConnTimeout: &idleConnTimeout, + HTTP2ReadIdleTimeout: 10 * time.Second, + HTTP2PingTimeout: 10 * time.Second, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, MaxInterval: 1 * time.Minute, @@ -239,7 +245,7 @@ func TestLoadConfig(t *testing.T) { }, }, Correlation: &correlation.Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "", Timeout: 5 * time.Second, }, @@ -258,6 +264,7 @@ func TestLoadConfig(t *testing.T) { }, }, NonAlphanumericDimensionChars: "_-.", + SendOTLPHistograms: true, }, }, } @@ -489,9 +496,9 @@ func TestConfigValidateErrors(t *testing.T) { { name: "Negative Timeout", cfg: &Config{ - Realm: "us0", - AccessToken: "access_token", - HTTPClientSettings: confighttp.HTTPClientSettings{Timeout: -1 * time.Second}, + Realm: "us0", + AccessToken: "access_token", + ClientConfig: confighttp.ClientConfig{Timeout: -1 * time.Second}, }, }, { @@ -545,7 +552,7 @@ func TestUnmarshalExcludeMetrics(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - require.NoError(t, tt.cfg.Unmarshal(confmap.NewFromStringMap(map[string]any{}))) + require.NoError(t, component.UnmarshalConfig(confmap.NewFromStringMap(map[string]any{}), tt.cfg)) assert.Len(t, tt.cfg.ExcludeMetrics, tt.excludeMetricsLen) }) } diff --git a/exporter/signalfxexporter/dpclient.go b/exporter/signalfxexporter/dpclient.go index 350c943459c0..82748947f4be 100644 --- a/exporter/signalfxexporter/dpclient.go +++ b/exporter/signalfxexporter/dpclient.go @@ -17,12 +17,20 @@ import ( sfxpb "github.com/signalfx/com_signalfx_metrics_protobuf/model" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/utils" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk" ) +const ( + contentEncodingHeader = "Content-Encoding" + contentTypeHeader = "Content-Type" + otlpProtobufContentType = "application/x-protobuf;format=otlp" +) + type sfxClientBase struct { ingestURL *url.URL headers map[string]string @@ -58,6 +66,7 @@ type sfxDPClient struct { logger *zap.Logger accessTokenPassthrough bool converter *translation.MetricsConverter + sendOTLPHistograms bool } func (s *sfxDPClient) pushMetricsData( @@ -81,48 +90,55 @@ func (s *sfxDPClient) pushMetricsData( // All metrics in the pmetric.Metrics will have the same access token because of the BatchPerResourceMetrics. metricToken := s.retrieveAccessToken(rms.At(0)) + // export SFx format sfxDataPoints := s.converter.MetricsToSignalFxV2(md) - if s.logDataPoints { - for _, dp := range sfxDataPoints { - s.logger.Debug("Dispatching SFx datapoint", zap.Stringer("dp", dp)) + if len(sfxDataPoints) > 0 { + droppedCount, err := s.pushMetricsDataForToken(ctx, sfxDataPoints, metricToken) + if err != nil { + return droppedCount, err } } - return s.pushMetricsDataForToken(ctx, sfxDataPoints, metricToken) -} -func (s *sfxDPClient) pushMetricsDataForToken(ctx context.Context, sfxDataPoints []*sfxpb.DataPoint, accessToken string) (int, error) { - body, compressed, err := s.encodeBody(sfxDataPoints) - if err != nil { - return len(sfxDataPoints), consumererror.NewPermanent(err) + // export any histograms in otlp if sendOTLPHistograms is true + if s.sendOTLPHistograms { + histogramData, metricCount := utils.GetHistograms(md) + if metricCount > 0 { + droppedCount, err := s.pushOTLPMetricsDataForToken(ctx, histogramData, metricToken) + if err != nil { + return droppedCount, err + } + } } + return 0, nil + +} + +func (s *sfxDPClient) postData(ctx context.Context, body io.Reader, headers map[string]string) error { datapointURL := *s.ingestURL if !strings.HasSuffix(datapointURL.Path, "v2/datapoint") { datapointURL.Path = path.Join(datapointURL.Path, "v2/datapoint") } req, err := http.NewRequestWithContext(ctx, "POST", datapointURL.String(), body) if err != nil { - return len(sfxDataPoints), consumererror.NewPermanent(err) + return consumererror.NewPermanent(err) } + // Set the headers configured in sfxDPClient for k, v := range s.headers { req.Header.Set(k, v) } - // Override access token in headers map if it's non empty. - if accessToken != "" { - req.Header.Set(splunk.SFxAccessTokenHeader, accessToken) - } - - if compressed { - req.Header.Set("Content-Encoding", "gzip") + // Set any extra headers passed by the caller + for k, v := range headers { + req.Header.Set(k, v) } // TODO: Mark errors as partial errors wherever applicable when, partial // error for metrics is available. resp, err := s.client.Do(req) if err != nil { - return len(sfxDataPoints), err + return err } defer func() { @@ -132,7 +148,39 @@ func (s *sfxDPClient) pushMetricsDataForToken(ctx context.Context, sfxDataPoints err = splunk.HandleHTTPCode(resp) if err != nil { - return len(sfxDataPoints), err + return err + } + return nil +} + +func (s *sfxDPClient) pushMetricsDataForToken(ctx context.Context, sfxDataPoints []*sfxpb.DataPoint, accessToken string) (int, error) { + + if s.logDataPoints { + for _, dp := range sfxDataPoints { + s.logger.Debug("Dispatching SFx datapoint", zap.Stringer("dp", dp)) + } + } + + body, compressed, err := s.encodeBody(sfxDataPoints) + dataPointCount := len(sfxDataPoints) + if err != nil { + return dataPointCount, consumererror.NewPermanent(err) + } + + headers := make(map[string]string) + + // Override access token in headers map if it's non empty. + if accessToken != "" { + headers[splunk.SFxAccessTokenHeader] = accessToken + } + + if compressed { + headers[contentEncodingHeader] = "gzip" + } + + err = s.postData(ctx, body, headers) + if err != nil { + return dataPointCount, err } return 0, nil } @@ -160,3 +208,61 @@ func (s *sfxDPClient) retrieveAccessToken(md pmetric.ResourceMetrics) string { } return "" } + +func (s *sfxDPClient) pushOTLPMetricsDataForToken(ctx context.Context, mh pmetric.Metrics, accessToken string) (int, error) { + + dataPointCount := mh.DataPointCount() + if s.logDataPoints { + s.logger.Debug("Count of metrics to send in OTLP format", + zap.Int("resource metrics", mh.ResourceMetrics().Len()), + zap.Int("metrics", mh.MetricCount()), + zap.Int("data points", dataPointCount)) + buf, err := metricsMarshaler.MarshalMetrics(mh) + if err != nil { + s.logger.Error("Failed to marshal metrics for logging otlp histograms", zap.Error(err)) + } else { + s.logger.Debug("Dispatching OTLP metrics", zap.String("pmetrics", string(buf))) + } + } + + body, compressed, err := s.encodeOTLPBody(mh) + if err != nil { + return dataPointCount, consumererror.NewPermanent(err) + } + + headers := make(map[string]string) + + // Set otlp content-type header + headers[contentTypeHeader] = otlpProtobufContentType + + // Override access token in headers map if it's non-empty. + if accessToken != "" { + headers[splunk.SFxAccessTokenHeader] = accessToken + } + + if compressed { + headers[contentEncodingHeader] = "gzip" + } + + s.logger.Debug("Sending metrics in OTLP format") + + err = s.postData(ctx, body, headers) + + if err != nil { + return dataPointCount, consumererror.NewMetrics(err, mh) + } + + return 0, nil +} + +func (s *sfxDPClient) encodeOTLPBody(md pmetric.Metrics) (bodyReader io.Reader, compressed bool, err error) { + + tr := pmetricotlp.NewExportRequestFromMetrics(md) + + body, err := tr.MarshalProto() + + if err != nil { + return nil, false, err + } + return s.getReader(body) +} diff --git a/exporter/signalfxexporter/exporter.go b/exporter/signalfxexporter/exporter.go index 2f35031623ec..c0d4cc3cd6bd 100644 --- a/exporter/signalfxexporter/exporter.go +++ b/exporter/signalfxexporter/exporter.go @@ -84,6 +84,7 @@ func newSignalFxExporter( config.IncludeMetrics, config.NonAlphanumericDimensionChars, config.DropHistogramBuckets, + !config.SendOTLPHistograms, // if SendOTLPHistograms is true, do not process histograms when converting to SFx ) if err != nil { return nil, fmt.Errorf("failed to create metric converter: %w", err) @@ -105,7 +106,7 @@ func (se *signalfxExporter) start(ctx context.Context, host component.Host) (err } headers := buildHeaders(se.config, se.version) - client, err := se.createClient(host) + client, err := se.createClient(ctx, host) if err != nil { return err } @@ -121,6 +122,7 @@ func (se *signalfxExporter) start(ctx context.Context, host component.Host) (err logger: se.logger, accessTokenPassthrough: se.config.AccessTokenPassthrough, converter: se.converter, + sendOTLPHistograms: se.config.SendOTLPHistograms, } apiTLSCfg, err := se.config.APITLSSettings.LoadTLSConfig() @@ -186,14 +188,14 @@ func newEventExporter(config *Config, createSettings exporter.CreateSettings) (* } -func (se *signalfxExporter) startLogs(_ context.Context, host component.Host) error { +func (se *signalfxExporter) startLogs(ctx context.Context, host component.Host) error { ingestURL, err := se.config.getIngestURL() if err != nil { return err } headers := buildHeaders(se.config, se.version) - client, err := se.createClient(host) + client, err := se.createClient(ctx, host) if err != nil { return err } @@ -213,10 +215,10 @@ func (se *signalfxExporter) startLogs(_ context.Context, host component.Host) er return nil } -func (se *signalfxExporter) createClient(host component.Host) (*http.Client, error) { - se.config.HTTPClientSettings.TLSSetting = se.config.IngestTLSSettings +func (se *signalfxExporter) createClient(ctx context.Context, host component.Host) (*http.Client, error) { + se.config.ClientConfig.TLSSetting = se.config.IngestTLSSettings - return se.config.ToClient(host, se.telemetrySettings) + return se.config.ToClientContext(ctx, host, se.telemetrySettings) } func (se *signalfxExporter) pushMetrics(ctx context.Context, md pmetric.Metrics) error { @@ -260,11 +262,11 @@ func buildHeaders(config *Config, version string) map[string]string { // Add any custom headers from the config. They will override the pre-defined // ones above in case of conflict, but, not the content encoding one since // the latter one is defined according to the payload. - for k, v := range config.HTTPClientSettings.Headers { + for k, v := range config.ClientConfig.Headers { headers[k] = string(v) } // we want to control how headers are set, overriding user headers with our passthrough. - config.HTTPClientSettings.Headers = nil + config.ClientConfig.Headers = nil return headers } diff --git a/exporter/signalfxexporter/exporter_test.go b/exporter/signalfxexporter/exporter_test.go index 5d66060a0681..d81236b80cf8 100644 --- a/exporter/signalfxexporter/exporter_test.go +++ b/exporter/signalfxexporter/exporter_test.go @@ -39,6 +39,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/dimensions" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/dpfilters" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/utils" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk" metadata "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata" ) @@ -67,18 +68,18 @@ func TestNew(t *testing.T) { { name: "successfully create exporter", config: &Config{ - AccessToken: "someToken", - Realm: "xyz", - HTTPClientSettings: confighttp.HTTPClientSettings{Timeout: 1 * time.Second}, + AccessToken: "someToken", + Realm: "xyz", + ClientConfig: confighttp.ClientConfig{Timeout: 1 * time.Second}, }, }, { name: "create exporter with host metadata syncer", config: &Config{ - AccessToken: "someToken", - Realm: "xyz", - HTTPClientSettings: confighttp.HTTPClientSettings{Timeout: 1 * time.Second}, - SyncHostMetadata: true, + AccessToken: "someToken", + Realm: "xyz", + ClientConfig: confighttp.ClientConfig{Timeout: 1 * time.Second}, + SyncHostMetadata: true, }, }, } @@ -180,16 +181,16 @@ func TestConsumeMetrics(t *testing.T) { assert.NoError(t, err) cfg := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: 1 * time.Second, Headers: map[string]configopaque.String{"test_header_": "test"}, }, } - client, err := cfg.ToClient(componenttest.NewNopHost(), exportertest.NewNopCreateSettings().TelemetrySettings) + client, err := cfg.ToClientContext(context.Background(), componenttest.NewNopHost(), exportertest.NewNopCreateSettings().TelemetrySettings) require.NoError(t, err) - c, err := translation.NewMetricsConverter(zap.NewNop(), nil, nil, nil, "", false) + c, err := translation.NewMetricsConverter(zap.NewNop(), nil, nil, nil, "", false, true) require.NoError(t, err) require.NotNil(t, c) dpClient := &sfxDPClient{ @@ -237,7 +238,7 @@ func TestConsumeMetricsWithAccessTokenPassthrough(t *testing.T) { fromHeaders := "AccessTokenFromClientHeaders" fromLabels := []string{"AccessTokenFromLabel0", "AccessTokenFromLabel1"} - validMetricsWithToken := func(includeToken bool, token string) pmetric.Metrics { + validMetricsWithToken := func(includeToken bool, token string, histogram bool) pmetric.Metrics { out := pmetric.NewMetrics() rm := out.ResourceMetrics().AppendEmpty() @@ -248,12 +249,17 @@ func TestConsumeMetricsWithAccessTokenPassthrough(t *testing.T) { ilm := rm.ScopeMetrics().AppendEmpty() m := ilm.Metrics().AppendEmpty() - m.SetName("test_gauge") + if histogram { + buildHistogram(m, "test_histogram", pcommon.Timestamp(100000000), 1) + } else { + m.SetName("test_gauge") + + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("k0", "v0") + dp.Attributes().PutStr("k1", "v1") + dp.SetDoubleValue(123) + } - dp := m.SetEmptyGauge().DataPoints().AppendEmpty() - dp.Attributes().PutStr("k0", "v0") - dp.Attributes().PutStr("k1", "v1") - dp.SetDoubleValue(123) return out } @@ -263,44 +269,93 @@ func TestConsumeMetricsWithAccessTokenPassthrough(t *testing.T) { metrics pmetric.Metrics additionalHeaders map[string]string pushedTokens []string + sendOTLPHistograms bool }{ { name: "passthrough access token and included in md", accessTokenPassthrough: true, - metrics: validMetricsWithToken(true, fromLabels[0]), + metrics: validMetricsWithToken(true, fromLabels[0], false), + pushedTokens: []string{fromLabels[0]}, + sendOTLPHistograms: false, + }, + { + name: "passthrough access token and included in md with OTLP histogram", + accessTokenPassthrough: true, + metrics: validMetricsWithToken(true, fromLabels[0], true), pushedTokens: []string{fromLabels[0]}, + sendOTLPHistograms: true, }, { name: "passthrough access token and not included in md", accessTokenPassthrough: true, - metrics: validMetricsWithToken(false, fromLabels[0]), + metrics: validMetricsWithToken(false, fromLabels[0], false), + pushedTokens: []string{fromHeaders}, + sendOTLPHistograms: false, + }, + { + name: "passthrough access token and not included in md with OTLP histogram", + accessTokenPassthrough: true, + metrics: validMetricsWithToken(false, fromLabels[0], true), pushedTokens: []string{fromHeaders}, + sendOTLPHistograms: true, }, { name: "don't passthrough access token and included in md", accessTokenPassthrough: false, metrics: func() pmetric.Metrics { - forFirstToken := validMetricsWithToken(true, fromLabels[0]) + forFirstToken := validMetricsWithToken(true, fromLabels[0], false) + tgt := forFirstToken.ResourceMetrics().AppendEmpty() + validMetricsWithToken(true, fromLabels[1], false).ResourceMetrics().At(0).CopyTo(tgt) + return forFirstToken + }(), + pushedTokens: []string{fromHeaders}, + sendOTLPHistograms: false, + }, + { + name: "don't passthrough access token and included in md with OTLP histogram", + accessTokenPassthrough: false, + metrics: func() pmetric.Metrics { + forFirstToken := validMetricsWithToken(true, fromLabels[0], true) tgt := forFirstToken.ResourceMetrics().AppendEmpty() - validMetricsWithToken(true, fromLabels[1]).ResourceMetrics().At(0).CopyTo(tgt) + validMetricsWithToken(true, fromLabels[1], true).ResourceMetrics().At(0).CopyTo(tgt) return forFirstToken }(), - pushedTokens: []string{fromHeaders}, + pushedTokens: []string{fromHeaders}, + sendOTLPHistograms: true, }, { name: "don't passthrough access token and not included in md", accessTokenPassthrough: false, - metrics: validMetricsWithToken(false, fromLabels[0]), + metrics: validMetricsWithToken(false, fromLabels[0], false), + pushedTokens: []string{fromHeaders}, + sendOTLPHistograms: false, + }, + { + name: "don't passthrough access token and not included in md with OTLP histogram", + accessTokenPassthrough: false, + metrics: validMetricsWithToken(false, fromLabels[0], true), pushedTokens: []string{fromHeaders}, + sendOTLPHistograms: true, }, { name: "override user-specified token-like header", accessTokenPassthrough: true, - metrics: validMetricsWithToken(true, fromLabels[0]), + metrics: validMetricsWithToken(true, fromLabels[0], false), + additionalHeaders: map[string]string{ + "x-sf-token": "user-specified", + }, + pushedTokens: []string{fromLabels[0]}, + sendOTLPHistograms: false, + }, + { + name: "override user-specified token-like header with OTLP histogram", + accessTokenPassthrough: true, + metrics: validMetricsWithToken(true, fromLabels[0], true), additionalHeaders: map[string]string{ "x-sf-token": "user-specified", }, - pushedTokens: []string{fromLabels[0]}, + pushedTokens: []string{fromLabels[0]}, + sendOTLPHistograms: true, }, { name: "use token from header when resource is nil", @@ -319,28 +374,75 @@ func TestConsumeMetricsWithAccessTokenPassthrough(t *testing.T) { return out }(), - pushedTokens: []string{fromHeaders}, + pushedTokens: []string{fromHeaders}, + sendOTLPHistograms: false, + }, + { + name: "use token from header when resource is nil with OTLP histogram", + accessTokenPassthrough: true, + metrics: func() pmetric.Metrics { + out := pmetric.NewMetrics() + rm := out.ResourceMetrics().AppendEmpty() + ilm := rm.ScopeMetrics().AppendEmpty() + m := ilm.Metrics().AppendEmpty() + buildHistogram(m, "test_histogram", pcommon.Timestamp(1000), 1) + return out + }(), + pushedTokens: []string{fromHeaders}, + sendOTLPHistograms: true, }, { name: "multiple tokens passed through", accessTokenPassthrough: true, metrics: func() pmetric.Metrics { - forFirstToken := validMetricsWithToken(true, fromLabels[0]) - forSecondToken := validMetricsWithToken(true, fromLabels[1]) + forFirstToken := validMetricsWithToken(true, fromLabels[0], false) + forSecondToken := validMetricsWithToken(true, fromLabels[1], false) + forSecondToken.ResourceMetrics().EnsureCapacity(2) + forFirstToken.ResourceMetrics().At(0).CopyTo(forSecondToken.ResourceMetrics().AppendEmpty()) + + return forSecondToken + }(), + pushedTokens: []string{fromLabels[0], fromLabels[1]}, + sendOTLPHistograms: false, + }, + { + name: "multiple tokens passed through with OTLP histogram", + accessTokenPassthrough: true, + metrics: func() pmetric.Metrics { + forFirstToken := validMetricsWithToken(true, fromLabels[0], true) + forSecondToken := validMetricsWithToken(true, fromLabels[1], true) forSecondToken.ResourceMetrics().EnsureCapacity(2) forFirstToken.ResourceMetrics().At(0).CopyTo(forSecondToken.ResourceMetrics().AppendEmpty()) return forSecondToken }(), - pushedTokens: []string{fromLabels[0], fromLabels[1]}, + pushedTokens: []string{fromLabels[0], fromLabels[1]}, + sendOTLPHistograms: true, }, { name: "multiple tokens passed through - multiple md with same token", accessTokenPassthrough: true, metrics: func() pmetric.Metrics { - forFirstToken := validMetricsWithToken(true, fromLabels[1]) - forSecondToken := validMetricsWithToken(true, fromLabels[0]) - moreForSecondToken := validMetricsWithToken(true, fromLabels[1]) + forFirstToken := validMetricsWithToken(true, fromLabels[1], false) + forSecondToken := validMetricsWithToken(true, fromLabels[0], false) + moreForSecondToken := validMetricsWithToken(true, fromLabels[1], false) + + forSecondToken.ResourceMetrics().EnsureCapacity(3) + forFirstToken.ResourceMetrics().At(0).CopyTo(forSecondToken.ResourceMetrics().AppendEmpty()) + moreForSecondToken.ResourceMetrics().At(0).CopyTo(forSecondToken.ResourceMetrics().AppendEmpty()) + + return forSecondToken + }(), + pushedTokens: []string{fromLabels[0], fromLabels[1]}, + sendOTLPHistograms: false, + }, + { + name: "multiple tokens passed through - multiple md with same token with OTLP histogram", + accessTokenPassthrough: true, + metrics: func() pmetric.Metrics { + forFirstToken := validMetricsWithToken(true, fromLabels[1], true) + forSecondToken := validMetricsWithToken(true, fromLabels[0], true) + moreForSecondToken := validMetricsWithToken(true, fromLabels[1], true) forSecondToken.ResourceMetrics().EnsureCapacity(3) forFirstToken.ResourceMetrics().At(0).CopyTo(forSecondToken.ResourceMetrics().AppendEmpty()) @@ -348,15 +450,16 @@ func TestConsumeMetricsWithAccessTokenPassthrough(t *testing.T) { return forSecondToken }(), - pushedTokens: []string{fromLabels[0], fromLabels[1]}, + pushedTokens: []string{fromLabels[0], fromLabels[1]}, + sendOTLPHistograms: true, }, { name: "multiple tokens passed through - multiple md with same token grouped together", accessTokenPassthrough: true, metrics: func() pmetric.Metrics { - forFirstToken := validMetricsWithToken(true, fromLabels[0]) - forSecondToken := validMetricsWithToken(true, fromLabels[1]) - moreForSecondToken := validMetricsWithToken(true, fromLabels[1]) + forFirstToken := validMetricsWithToken(true, fromLabels[0], false) + forSecondToken := validMetricsWithToken(true, fromLabels[1], false) + moreForSecondToken := validMetricsWithToken(true, fromLabels[1], false) forSecondToken.ResourceMetrics().EnsureCapacity(3) moreForSecondToken.ResourceMetrics().At(0).CopyTo(forSecondToken.ResourceMetrics().AppendEmpty()) @@ -364,19 +467,51 @@ func TestConsumeMetricsWithAccessTokenPassthrough(t *testing.T) { return forSecondToken }(), - pushedTokens: []string{fromLabels[0], fromLabels[1]}, + pushedTokens: []string{fromLabels[0], fromLabels[1]}, + sendOTLPHistograms: false, + }, + { + name: "multiple tokens passed through - multiple md with same token grouped together in OTLP histogram", + accessTokenPassthrough: true, + metrics: func() pmetric.Metrics { + forFirstToken := validMetricsWithToken(true, fromLabels[0], true) + forSecondToken := validMetricsWithToken(true, fromLabels[1], true) + moreForSecondToken := validMetricsWithToken(true, fromLabels[1], true) + + forSecondToken.ResourceMetrics().EnsureCapacity(3) + moreForSecondToken.ResourceMetrics().At(0).CopyTo(forSecondToken.ResourceMetrics().AppendEmpty()) + forFirstToken.ResourceMetrics().At(0).CopyTo(forSecondToken.ResourceMetrics().AppendEmpty()) + + return forSecondToken + }(), + pushedTokens: []string{fromLabels[0], fromLabels[1]}, + sendOTLPHistograms: true, }, { name: "multiple tokens passed through - one corrupted", accessTokenPassthrough: true, metrics: func() pmetric.Metrics { - forFirstToken := validMetricsWithToken(true, fromLabels[0]) - forSecondToken := validMetricsWithToken(false, fromLabels[1]) + forFirstToken := validMetricsWithToken(true, fromLabels[0], false) + forSecondToken := validMetricsWithToken(false, fromLabels[1], false) + forSecondToken.ResourceMetrics().EnsureCapacity(2) + forFirstToken.ResourceMetrics().At(0).CopyTo(forSecondToken.ResourceMetrics().AppendEmpty()) + return forSecondToken + }(), + pushedTokens: []string{fromLabels[0], fromHeaders}, + sendOTLPHistograms: false, + }, + { + name: "multiple tokens passed through - one corrupted in OTLP histogram", + accessTokenPassthrough: true, + metrics: func() pmetric.Metrics { + forFirstToken := validMetricsWithToken(true, fromLabels[0], true) + forSecondToken := validMetricsWithToken(false, fromLabels[1], true) forSecondToken.ResourceMetrics().EnsureCapacity(2) forFirstToken.ResourceMetrics().At(0).CopyTo(forSecondToken.ResourceMetrics().AppendEmpty()) return forSecondToken }(), - pushedTokens: []string{fromLabels[0], fromHeaders}, + pushedTokens: []string{fromLabels[0], fromHeaders}, + sendOTLPHistograms: true, }, } for _, tt := range tests { @@ -402,13 +537,14 @@ func TestConsumeMetricsWithAccessTokenPassthrough(t *testing.T) { cfg := factory.CreateDefaultConfig().(*Config) cfg.IngestURL = server.URL cfg.APIURL = server.URL - cfg.HTTPClientSettings.Headers = make(map[string]configopaque.String) + cfg.ClientConfig.Headers = make(map[string]configopaque.String) for k, v := range tt.additionalHeaders { - cfg.HTTPClientSettings.Headers[k] = configopaque.String(v) + cfg.ClientConfig.Headers[k] = configopaque.String(v) } - cfg.HTTPClientSettings.Headers["test_header_"] = configopaque.String(tt.name) + cfg.ClientConfig.Headers["test_header_"] = configopaque.String(tt.name) cfg.AccessToken = configopaque.String(fromHeaders) cfg.AccessTokenPassthrough = tt.accessTokenPassthrough + cfg.SendOTLPHistograms = tt.sendOTLPHistograms sfxExp, err := NewFactory().CreateMetricsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) require.NoError(t, err) require.NoError(t, sfxExp.Start(context.Background(), componenttest.NewNopHost())) @@ -441,9 +577,9 @@ func TestNewEventExporter(t *testing.T) { assert.Nil(t, got) cfg := &Config{ - AccessToken: "someToken", - Realm: "xyz", - HTTPClientSettings: confighttp.HTTPClientSettings{Timeout: 1 * time.Second}, + AccessToken: "someToken", + Realm: "xyz", + ClientConfig: confighttp.ClientConfig{Timeout: 1 * time.Second}, } got, err = newEventExporter(cfg, exportertest.NewNopCreateSettings()) @@ -557,13 +693,13 @@ func TestConsumeEventData(t *testing.T) { assert.NoError(t, err) cfg := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: 1 * time.Second, Headers: map[string]configopaque.String{"test_header_": "test"}, }, } - client, err := cfg.ToClient(componenttest.NewNopHost(), exportertest.NewNopCreateSettings().TelemetrySettings) + client, err := cfg.ToClientContext(context.Background(), componenttest.NewNopHost(), exportertest.NewNopCreateSettings().TelemetrySettings) require.NoError(t, err) eventClient := &sfxEventClient{ @@ -730,6 +866,7 @@ func TestConsumeMetadata(t *testing.T) { cfg.IncludeMetrics, cfg.NonAlphanumericDimensionChars, false, + true, ) require.NoError(t, err) type args struct { @@ -1003,7 +1140,7 @@ func TestConsumeMetadata(t *testing.T) { wg := sync.WaitGroup{} wg.Add(1) - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + server := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { b, err := io.ReadAll(r.Body) assert.NoError(t, err) @@ -1077,19 +1214,19 @@ func TestConsumeMetadata(t *testing.T) { func BenchmarkExporterConsumeData(b *testing.B) { batchSize := 1000 metrics := pmetric.NewMetrics() - tmd := testMetricsData() + tmd := testMetricsData(false) for i := 0; i < batchSize; i++ { tmd.ResourceMetrics().At(0).CopyTo(metrics.ResourceMetrics().AppendEmpty()) } - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusAccepted) })) defer server.Close() serverURL, err := url.Parse(server.URL) assert.NoError(b, err) - c, err := translation.NewMetricsConverter(zap.NewNop(), nil, nil, nil, "", false) + c, err := translation.NewMetricsConverter(zap.NewNop(), nil, nil, nil, "", false, true) require.NoError(b, err) require.NotNil(b, c) dpClient := &sfxDPClient{ @@ -1140,13 +1277,13 @@ func TestTLSExporterInit(t *testing.T) { config: &Config{ APIURL: "https://test", IngestURL: "https://test", - IngestTLSSettings: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + IngestTLSSettings: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "./testdata/certs/ca.pem", }, }, - APITLSSettings: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + APITLSSettings: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "./testdata/certs/ca.pem", }, }, @@ -1160,8 +1297,8 @@ func TestTLSExporterInit(t *testing.T) { config: &Config{ APIURL: "https://test", IngestURL: "https://test", - IngestTLSSettings: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + IngestTLSSettings: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "./testdata/certs/missingfile", }, }, @@ -1176,8 +1313,8 @@ func TestTLSExporterInit(t *testing.T) { config: &Config{ APIURL: "https://test", IngestURL: "https://test", - IngestTLSSettings: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + IngestTLSSettings: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "./testdata/certs/invalid-ca.pem", }, }, @@ -1217,7 +1354,7 @@ func TestTLSIngestConnection(t *testing.T) { dp.Attributes().PutStr("k1", "v1") dp.SetDoubleValue(123) - server, err := newLocalHTTPSTestServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + server, err := newLocalHTTPSTestServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { fmt.Fprint(w, "connection is successful") })) require.NoError(t, err) @@ -1247,8 +1384,8 @@ func TestTLSIngestConnection(t *testing.T) { config: &Config{ APIURL: serverURL, IngestURL: serverURL, - IngestTLSSettings: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + IngestTLSSettings: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "./testdata/certs/ca.pem", }, }, @@ -1282,7 +1419,7 @@ func TestTLSIngestConnection(t *testing.T) { func TestDefaultSystemCPUTimeExcludedAndTranslated(t *testing.T) { translator, err := translation.NewMetricTranslator(defaultTranslationRules, 3600) require.NoError(t, err) - converter, err := translation.NewMetricsConverter(zap.NewNop(), translator, defaultExcludeMetrics, nil, "_-.", false) + converter, err := translation.NewMetricsConverter(zap.NewNop(), translator, defaultExcludeMetrics, nil, "_-.", false, true) require.NoError(t, err) md := pmetric.NewMetrics() @@ -1325,7 +1462,8 @@ func TestTLSAPIConnection(t *testing.T) { cfg.ExcludeMetrics, cfg.IncludeMetrics, cfg.NonAlphanumericDimensionChars, - false) + false, + true) require.NoError(t, err) metadata := []*metadata.MetadataUpdate{ @@ -1340,7 +1478,7 @@ func TestTLSAPIConnection(t *testing.T) { }, } - server, err := newLocalHTTPSTestServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + server, err := newLocalHTTPSTestServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { fmt.Fprint(w, "connection is successful") })) require.NoError(t, err) @@ -1359,8 +1497,8 @@ func TestTLSAPIConnection(t *testing.T) { IngestURL: server.URL, AccessToken: "random", SyncHostMetadata: true, - APITLSSettings: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + APITLSSettings: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "./testdata/certs/ca.pem", }, }, @@ -1437,3 +1575,315 @@ func newLocalHTTPSTestServer(handler http.Handler) (*httptest.Server, error) { ts.StartTLS() return ts, nil } + +func BenchmarkExporterConsumeDataWithOTLPHistograms(b *testing.B) { + batchSize := 1000 + metrics := pmetric.NewMetrics() + tmd := testMetricsData(true) + for i := 0; i < batchSize; i++ { + tmd.ResourceMetrics().At(0).CopyTo(metrics.ResourceMetrics().AppendEmpty()) + } + + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { + w.WriteHeader(http.StatusAccepted) + })) + defer server.Close() + serverURL, err := url.Parse(server.URL) + assert.NoError(b, err) + + c, err := translation.NewMetricsConverter(zap.NewNop(), nil, nil, nil, "", false, false) + require.NoError(b, err) + require.NotNil(b, c) + dpClient := &sfxDPClient{ + sfxClientBase: sfxClientBase{ + ingestURL: serverURL, + client: &http.Client{ + Timeout: 1 * time.Second, + }, + zippers: sync.Pool{New: func() any { + return gzip.NewWriter(nil) + }}, + }, + logger: zap.NewNop(), + converter: c, + } + + for i := 0; i < b.N; i++ { + numDroppedTimeSeries, err := dpClient.pushMetricsData(context.Background(), metrics) + assert.NoError(b, err) + assert.Equal(b, 0, numDroppedTimeSeries) + } +} + +func TestConsumeMixedMetrics(t *testing.T) { + ts := pcommon.NewTimestampFromTime(time.Now()) + smallBatch := pmetric.NewMetrics() + rm := smallBatch.ResourceMetrics().AppendEmpty() + res := rm.Resource() + res.Attributes().PutStr("kr0", "vr0") + ilms := rm.ScopeMetrics() + ilms.EnsureCapacity(2) + ilm := ilms.AppendEmpty() + ilm.Scope().Attributes().PutStr("ks0", "vs0") + ilm.Metrics().EnsureCapacity(2) + ilm.Metrics().AppendEmpty() + buildHistogram(ilm.Metrics().At(0), "test_histogram", ts, 2) + ilm.Metrics().AppendEmpty() + m1 := ilm.Metrics().At(1) + m1.SetName("test_gauge") + dp1 := m1.SetEmptyGauge().DataPoints().AppendEmpty() + dp1.Attributes().PutStr("k0", "v0") + dp1.SetDoubleValue(123) + + smallBatchHistogramOnly := pmetric.NewMetrics() + rmh := smallBatchHistogramOnly.ResourceMetrics().AppendEmpty() + resh := rmh.Resource() + resh.Attributes().PutStr("kr0", "vr0") + ilmsh := rmh.ScopeMetrics() + ilmsh.EnsureCapacity(2) + ilmh := ilmsh.AppendEmpty() + ilmh.Scope().Attributes().PutStr("ks0", "vs0") + ilmh.Metrics().EnsureCapacity(2) + ilmh.Metrics().AppendEmpty() + buildHistogram(ilmh.Metrics().At(0), "test_histogram", ts, 2) + + tests := []struct { + name string + md pmetric.Metrics + sfxHTTPResponseCode int + otlpHTTPResponseCode int + retryAfter int + numDroppedTimeSeries int + wantErr bool + wantPermanentErr bool + wantThrottleErr bool + expectedErrorMsg string + wantPartialMetricsErr bool + }{ + { + name: "happy_path", + md: smallBatch, + sfxHTTPResponseCode: http.StatusAccepted, + otlpHTTPResponseCode: http.StatusAccepted, + }, + { + name: "happy_path_otlp", + md: smallBatchHistogramOnly, + otlpHTTPResponseCode: http.StatusAccepted, + }, + { + name: "response_forbidden_sfx", + md: smallBatch, + sfxHTTPResponseCode: http.StatusForbidden, + numDroppedTimeSeries: 1, + wantErr: true, + expectedErrorMsg: "HTTP 403 \"Forbidden\"", + }, + { + name: "response_forbidden_otlp", + md: smallBatchHistogramOnly, + otlpHTTPResponseCode: http.StatusForbidden, + numDroppedTimeSeries: 2, + wantErr: true, + expectedErrorMsg: "HTTP 403 \"Forbidden\"", + }, + { + name: "response_forbidden_mixed", + md: smallBatch, + sfxHTTPResponseCode: http.StatusAccepted, + otlpHTTPResponseCode: http.StatusForbidden, + numDroppedTimeSeries: 2, + wantErr: true, + expectedErrorMsg: "HTTP 403 \"Forbidden\"", + }, + { + name: "response_bad_request_sfx", + md: smallBatch, + sfxHTTPResponseCode: http.StatusBadRequest, + numDroppedTimeSeries: 1, + wantPermanentErr: true, + expectedErrorMsg: "Permanent error: \"HTTP/1.1 400 Bad Request", + }, + { + name: "response_bad_request_otlp", + md: smallBatchHistogramOnly, + otlpHTTPResponseCode: http.StatusBadRequest, + numDroppedTimeSeries: 2, + wantPermanentErr: true, + expectedErrorMsg: "Permanent error: \"HTTP/1.1 400 Bad Request", + }, + { + name: "response_bad_request_mixed", + md: smallBatch, + sfxHTTPResponseCode: http.StatusAccepted, + otlpHTTPResponseCode: http.StatusBadRequest, + numDroppedTimeSeries: 2, + wantPermanentErr: true, + expectedErrorMsg: "Permanent error: \"HTTP/1.1 400 Bad Request", + }, + { + name: "response_throttle_sfx", + md: smallBatch, + sfxHTTPResponseCode: http.StatusTooManyRequests, + numDroppedTimeSeries: 1, + wantThrottleErr: true, + }, + { + name: "response_throttle_mixed", + md: smallBatch, + sfxHTTPResponseCode: http.StatusAccepted, + otlpHTTPResponseCode: http.StatusTooManyRequests, + numDroppedTimeSeries: 2, + wantThrottleErr: true, + wantPartialMetricsErr: true, + }, + { + name: "response_throttle_otlp", + md: smallBatchHistogramOnly, + otlpHTTPResponseCode: http.StatusTooManyRequests, + numDroppedTimeSeries: 2, + wantThrottleErr: true, + wantPartialMetricsErr: true, + }, + { + name: "response_throttle_with_header_sfx", + md: smallBatch, + retryAfter: 123, + sfxHTTPResponseCode: http.StatusServiceUnavailable, + numDroppedTimeSeries: 1, + wantThrottleErr: true, + }, + { + name: "response_throttle_with_header_otlp", + md: smallBatchHistogramOnly, + retryAfter: 123, + otlpHTTPResponseCode: http.StatusServiceUnavailable, + numDroppedTimeSeries: 2, + wantThrottleErr: true, + wantPartialMetricsErr: true, + }, + { + name: "response_throttle_with_header_mixed", + md: smallBatch, + retryAfter: 123, + sfxHTTPResponseCode: http.StatusAccepted, + otlpHTTPResponseCode: http.StatusServiceUnavailable, + numDroppedTimeSeries: 2, + wantThrottleErr: true, + wantPartialMetricsErr: true, + }, + { + name: "large_batch", + md: generateLargeMixedDPBatch(), + sfxHTTPResponseCode: http.StatusAccepted, + otlpHTTPResponseCode: http.StatusAccepted, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + assert.Equal(t, "test", r.Header.Get("test_header_")) + var respCode int + if r.Header.Get("Content-Type") == otlpProtobufContentType { + respCode = tt.otlpHTTPResponseCode + } else { + respCode = tt.sfxHTTPResponseCode + } + if (respCode == http.StatusTooManyRequests || + respCode == http.StatusServiceUnavailable) && tt.retryAfter != 0 { + w.Header().Add(splunk.HeaderRetryAfter, strconv.Itoa(tt.retryAfter)) + } + w.WriteHeader(respCode) + _, _ = w.Write([]byte("response content")) + })) + defer server.Close() + + serverURL, err := url.Parse(server.URL) + assert.NoError(t, err) + + cfg := &Config{ + ClientConfig: confighttp.ClientConfig{ + Timeout: 1 * time.Second, + Headers: map[string]configopaque.String{"test_header_": "test"}, + }, + } + + client, err := cfg.ToClientContext(context.Background(), componenttest.NewNopHost(), exportertest.NewNopCreateSettings().TelemetrySettings) + require.NoError(t, err) + + c, err := translation.NewMetricsConverter(zap.NewNop(), nil, nil, nil, "", false, false) + require.NoError(t, err) + require.NotNil(t, c) + sfxClient := &sfxDPClient{ + sfxClientBase: sfxClientBase{ + ingestURL: serverURL, + client: client, + zippers: sync.Pool{New: func() any { + return gzip.NewWriter(nil) + }}, + }, + logger: zap.NewNop(), + converter: c, + sendOTLPHistograms: true, + } + + numDroppedTimeSeries, err := sfxClient.pushMetricsData(context.Background(), tt.md) + assert.Equal(t, tt.numDroppedTimeSeries, numDroppedTimeSeries) + + if tt.wantErr { + assert.Error(t, err) + assert.EqualError(t, err, tt.expectedErrorMsg) + return + } + + if tt.wantPermanentErr { + assert.Error(t, err) + assert.True(t, consumererror.IsPermanent(err)) + assert.True(t, strings.HasPrefix(err.Error(), tt.expectedErrorMsg)) + assert.Contains(t, err.Error(), "response content") + return + } + + if tt.wantThrottleErr { + if tt.wantPartialMetricsErr { + partialMetrics, _ := utils.GetHistograms(smallBatch) + throttleErr := fmt.Errorf("HTTP %d %q", tt.otlpHTTPResponseCode, http.StatusText(tt.otlpHTTPResponseCode)) + throttleErr = exporterhelper.NewThrottleRetry(throttleErr, time.Duration(tt.retryAfter)*time.Second) + testErr := consumererror.NewMetrics(throttleErr, partialMetrics) + assert.EqualValues(t, testErr, err) + return + } + + expected := fmt.Errorf("HTTP %d %q", tt.sfxHTTPResponseCode, http.StatusText(tt.sfxHTTPResponseCode)) + expected = exporterhelper.NewThrottleRetry(expected, time.Duration(tt.retryAfter)*time.Second) + assert.EqualValues(t, expected, err) + return + } + + assert.NoError(t, err) + }) + } +} + +func generateLargeMixedDPBatch() pmetric.Metrics { + md := pmetric.NewMetrics() + md.ResourceMetrics().EnsureCapacity(7500) + + ts := pcommon.NewTimestampFromTime(time.Now()) + for i := 0; i < 7500; i++ { + rm := md.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("kr0", "vr0") + ilm := rm.ScopeMetrics().AppendEmpty() + ilm.Metrics().EnsureCapacity(2) + m1 := ilm.Metrics().AppendEmpty() + m1.SetName("test_" + strconv.Itoa(i)) + dp := m1.SetEmptyGauge().DataPoints().AppendEmpty() + dp.SetTimestamp(ts) + dp.Attributes().PutStr("k0", "v0") + dp.Attributes().PutStr("k1", "v1") + dp.SetIntValue(int64(i)) + m2 := ilm.Metrics().AppendEmpty() + buildHistogram(m2, "histogram_"+strconv.Itoa(i), ts, 1) + } + return md +} diff --git a/exporter/signalfxexporter/factory.go b/exporter/signalfxexporter/factory.go index ab42f8a6cdbb..cabf701a9387 100644 --- a/exporter/signalfxexporter/factory.go +++ b/exporter/signalfxexporter/factory.go @@ -11,6 +11,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" @@ -22,8 +23,10 @@ import ( ) const ( - defaultHTTPTimeout = time.Second * 5 - defaultMaxConns = 100 + defaultHTTPTimeout = time.Second * 10 + defaultHTTP2ReadIdleTimeout = time.Second * 10 + defaultHTTP2PingTimeout = time.Second * 10 + defaultMaxConns = 100 defaultDimMaxBuffered = 10000 defaultDimSendDelay = 10 * time.Second @@ -49,13 +52,15 @@ func createDefaultConfig() component.Config { timeout := 10 * time.Second return &Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), - HTTPClientSettings: confighttp.HTTPClientSettings{ - Timeout: defaultHTTPTimeout, - MaxIdleConns: &maxConnCount, - MaxIdleConnsPerHost: &maxConnCount, - IdleConnTimeout: &idleConnTimeout, + ClientConfig: confighttp.ClientConfig{ + Timeout: defaultHTTPTimeout, + MaxIdleConns: &maxConnCount, + MaxIdleConnsPerHost: &maxConnCount, + IdleConnTimeout: &idleConnTimeout, + HTTP2ReadIdleTimeout: defaultHTTP2ReadIdleTimeout, + HTTP2PingTimeout: defaultHTTP2PingTimeout, }, AccessTokenPassthroughConfig: splunk.AccessTokenPassthroughConfig{ AccessTokenPassthrough: true, @@ -83,24 +88,24 @@ func createTracesExporter( cfg := eCfg.(*Config) corrCfg := cfg.Correlation - if corrCfg.HTTPClientSettings.Endpoint == "" { + if corrCfg.ClientConfig.Endpoint == "" { apiURL, err := cfg.getAPIURL() if err != nil { return nil, fmt.Errorf("unable to create API URL: %w", err) } - corrCfg.HTTPClientSettings.Endpoint = apiURL.String() + corrCfg.ClientConfig.Endpoint = apiURL.String() } if cfg.AccessToken == "" { return nil, errors.New("access_token is required") } - set.Logger.Info("Correlation tracking enabled", zap.String("endpoint", corrCfg.HTTPClientSettings.Endpoint)) + set.Logger.Info("Correlation tracking enabled", zap.String("endpoint", corrCfg.ClientConfig.Endpoint)) tracker := correlation.NewTracker(corrCfg, cfg.AccessToken, set) return exporterhelper.NewTracesExporter( ctx, set, cfg, - tracker.AddSpans, + tracker.ProcessTraces, exporterhelper.WithStart(tracker.Start), exporterhelper.WithShutdown(tracker.Shutdown)) } @@ -124,7 +129,7 @@ func createMetricsExporter( exp.pushMetrics, // explicitly disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithQueue(cfg.QueueSettings), exporterhelper.WithStart(exp.start), exporterhelper.WithShutdown(exp.shutdown)) @@ -167,7 +172,7 @@ func createLogsExporter( exp.pushLogs, // explicitly disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(expCfg.RetrySettings), + exporterhelper.WithRetry(expCfg.BackOffConfig), exporterhelper.WithQueue(expCfg.QueueSettings), exporterhelper.WithStart(exp.startLogs)) diff --git a/exporter/signalfxexporter/factory_test.go b/exporter/signalfxexporter/factory_test.go index c9db6217cd8b..e276af79ba58 100644 --- a/exporter/signalfxexporter/factory_test.go +++ b/exporter/signalfxexporter/factory_test.go @@ -102,7 +102,7 @@ func TestCreateMetricsExporter_CustomConfig(t *testing.T) { config := &Config{ AccessToken: "testToken", Realm: "us1", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: 2 * time.Second, Headers: map[string]configopaque.String{ "added-entry": "added value", @@ -121,9 +121,9 @@ func TestDefaultTranslationRules(t *testing.T) { require.NotNil(t, rules, "rules are nil") tr, err := translation.NewMetricTranslator(rules, 1) require.NoError(t, err) - data := testMetricsData() + data := testMetricsData(false) - c, err := translation.NewMetricsConverter(zap.NewNop(), tr, nil, nil, "", false) + c, err := translation.NewMetricsConverter(zap.NewNop(), tr, nil, nil, "", false, true) require.NoError(t, err) translated := c.MetricsToSignalFxV2(data) require.NotNil(t, translated) @@ -210,7 +210,7 @@ func requireDimension(t *testing.T, dims []*sfxpb.Dimension, key, val string) { require.True(t, found, `missing dimension: %s`, key) } -func testMetricsData() pmetric.Metrics { +func testMetricsData(addHistogram bool) pmetric.Metrics { md := pmetric.NewMetrics() m1 := md.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() @@ -232,6 +232,10 @@ func testMetricsData() pmetric.Metrics { dp12.SetTimestamp(pcommon.NewTimestampFromTime(time.Unix(1596000000, 0))) dp12.SetIntValue(6e9) + if addHistogram { + buildHistogram(m1, "histogram", pcommon.NewTimestampFromTime(time.Unix(1596000000, 0)), 5) + } + sm2 := md.ResourceMetrics().At(0).ScopeMetrics().AppendEmpty().Metrics() m2 := sm2.AppendEmpty() m2.SetName("system.disk.io") @@ -263,6 +267,10 @@ func testMetricsData() pmetric.Metrics { dp24.SetTimestamp(pcommon.NewTimestampFromTime(time.Unix(1596000000, 0))) dp24.SetIntValue(8e9) + if addHistogram { + buildHistogram(m2, "histogram", pcommon.NewTimestampFromTime(time.Unix(1596000000, 0)), 5) + } + m3 := sm2.AppendEmpty() m3.SetName("system.disk.operations") m3.SetDescription("Disk operations count.") @@ -294,6 +302,10 @@ func testMetricsData() pmetric.Metrics { dp34.SetTimestamp(pcommon.NewTimestampFromTime(time.Unix(1596000000, 0))) dp34.SetIntValue(5e3) + if addHistogram { + buildHistogram(m3, "histogram", pcommon.NewTimestampFromTime(time.Unix(1596000000, 0)), 5) + } + m4 := md.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() m4.SetName("system.disk.operations") m4.SetDescription("Disk operations count.") @@ -325,6 +337,10 @@ func testMetricsData() pmetric.Metrics { dp44.SetTimestamp(pcommon.NewTimestampFromTime(time.Unix(1596000060, 0))) dp44.SetIntValue(7e3) + if addHistogram { + buildHistogram(m4, "histogram", pcommon.NewTimestampFromTime(time.Unix(1596000000, 0)), 5) + } + sm5 := md.ResourceMetrics().At(0).ScopeMetrics().AppendEmpty().Metrics() m5 := sm5.AppendEmpty() m5.SetName("system.network.io") @@ -347,6 +363,10 @@ func testMetricsData() pmetric.Metrics { dp52.SetTimestamp(pcommon.NewTimestampFromTime(time.Unix(1596000000, 0))) dp52.SetIntValue(6e9) + if addHistogram { + buildHistogram(m5, "histogram", pcommon.NewTimestampFromTime(time.Unix(1596000000, 0)), 5) + } + m6 := sm5.AppendEmpty() m6.SetName("system.network.packets") m6.SetDescription("The number of packets transferred") @@ -367,6 +387,10 @@ func testMetricsData() pmetric.Metrics { dp62.SetTimestamp(pcommon.NewTimestampFromTime(time.Unix(1596000000, 0))) dp62.SetIntValue(150) + if addHistogram { + buildHistogram(m6, "histogram", pcommon.NewTimestampFromTime(time.Unix(1596000000, 0)), 5) + } + sm7 := md.ResourceMetrics().At(0).ScopeMetrics().AppendEmpty().Metrics() m7 := sm7.AppendEmpty() m7.SetName("container.memory.working_set") @@ -378,6 +402,10 @@ func testMetricsData() pmetric.Metrics { dp71.SetTimestamp(pcommon.NewTimestampFromTime(time.Unix(1596000000, 0))) dp71.SetIntValue(1000) + if addHistogram { + buildHistogram(m7, "histogram", pcommon.NewTimestampFromTime(time.Unix(1596000000, 0)), 5) + } + m8 := sm7.AppendEmpty() m8.SetName("container.memory.page_faults") dp81 := m8.SetEmptyGauge().DataPoints().AppendEmpty() @@ -387,6 +415,10 @@ func testMetricsData() pmetric.Metrics { dp81.SetTimestamp(pcommon.NewTimestampFromTime(time.Unix(1596000000, 0))) dp81.SetIntValue(1000) + if addHistogram { + buildHistogram(m8, "histogram", pcommon.NewTimestampFromTime(time.Unix(1596000000, 0)), 5) + } + m9 := sm7.AppendEmpty() m9.SetName("container.memory.major_page_faults") dp91 := m9.SetEmptyGauge().DataPoints().AppendEmpty() @@ -396,6 +428,10 @@ func testMetricsData() pmetric.Metrics { dp91.SetTimestamp(pcommon.NewTimestampFromTime(time.Unix(1596000000, 0))) dp91.SetIntValue(1000) + if addHistogram { + buildHistogram(m9, "histogram", pcommon.NewTimestampFromTime(time.Unix(1596000000, 0)), 5) + } + return md } @@ -493,7 +529,7 @@ func TestHostmetricsCPUTranslations(t *testing.T) { f := NewFactory() cfg := f.CreateDefaultConfig().(*Config) require.NoError(t, setDefaultExcludes(cfg)) - converter, err := translation.NewMetricsConverter(zap.NewNop(), testGetTranslator(t), cfg.ExcludeMetrics, cfg.IncludeMetrics, "", false) + converter, err := translation.NewMetricsConverter(zap.NewNop(), testGetTranslator(t), cfg.ExcludeMetrics, cfg.IncludeMetrics, "", false, true) require.NoError(t, err) md1, err := golden.ReadMetrics(filepath.Join("testdata", "hostmetrics_system_cpu_time_1.yaml")) @@ -534,7 +570,7 @@ func TestDefaultExcludesTranslated(t *testing.T) { cfg := f.CreateDefaultConfig().(*Config) require.NoError(t, setDefaultExcludes(cfg)) - converter, err := translation.NewMetricsConverter(zap.NewNop(), testGetTranslator(t), cfg.ExcludeMetrics, cfg.IncludeMetrics, "", false) + converter, err := translation.NewMetricsConverter(zap.NewNop(), testGetTranslator(t), cfg.ExcludeMetrics, cfg.IncludeMetrics, "", false, true) require.NoError(t, err) var metrics []map[string]string @@ -557,7 +593,7 @@ func TestDefaultExcludes_not_translated(t *testing.T) { cfg := f.CreateDefaultConfig().(*Config) require.NoError(t, setDefaultExcludes(cfg)) - converter, err := translation.NewMetricsConverter(zap.NewNop(), nil, cfg.ExcludeMetrics, cfg.IncludeMetrics, "", false) + converter, err := translation.NewMetricsConverter(zap.NewNop(), nil, cfg.ExcludeMetrics, cfg.IncludeMetrics, "", false, true) require.NoError(t, err) var metrics []map[string]string @@ -577,7 +613,7 @@ func BenchmarkMetricConversion(b *testing.B) { tr, err := translation.NewMetricTranslator(rules, 1) require.NoError(b, err) - c, err := translation.NewMetricsConverter(zap.NewNop(), tr, nil, nil, "", false) + c, err := translation.NewMetricsConverter(zap.NewNop(), tr, nil, nil, "", false, true) require.NoError(b, err) bytes, err := os.ReadFile("testdata/json/hostmetrics.json") @@ -622,3 +658,29 @@ func testReadJSON(f string, v any) error { } return json.Unmarshal(bytes, &v) } + +func buildHistogramDP(dp pmetric.HistogramDataPoint, timestamp pcommon.Timestamp) { + dp.SetStartTimestamp(timestamp) + dp.SetTimestamp(timestamp) + dp.SetMin(1.0) + dp.SetMax(2) + dp.SetCount(5) + dp.SetSum(7.0) + dp.BucketCounts().FromRaw([]uint64{3, 2}) + dp.ExplicitBounds().FromRaw([]float64{1, 2}) + dp.Attributes().PutStr("k1", "v1") +} + +func buildHistogram(im pmetric.Metric, name string, timestamp pcommon.Timestamp, dpCount int) { + im.SetName(name) + im.SetDescription("Histogram") + im.SetUnit("1") + im.SetEmptyHistogram().SetAggregationTemporality(pmetric.AggregationTemporalityDelta) + idps := im.Histogram().DataPoints() + idps.EnsureCapacity(dpCount) + + for i := 0; i < dpCount; i++ { + dp := idps.AppendEmpty() + buildHistogramDP(dp, timestamp) + } +} diff --git a/exporter/signalfxexporter/generated_component_test.go b/exporter/signalfxexporter/generated_component_test.go new file mode 100644 index 000000000000..bd3e511048c3 --- /dev/null +++ b/exporter/signalfxexporter/generated_component_test.go @@ -0,0 +1,140 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package signalfxexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/signalfxexporter/go.mod b/exporter/signalfxexporter/go.mod index 324a750e7dea..a6ffad13a317 100644 --- a/exporter/signalfxexporter/go.mod +++ b/exporter/signalfxexporter/go.mod @@ -1,85 +1,96 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter -go 1.20 +go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.1 + github.com/cenkalti/backoff/v4 v4.3.0 github.com/gobwas/glob v0.2.3 github.com/gogo/protobuf v1.3.2 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.89.0 - github.com/shirou/gopsutil/v3 v3.23.10 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.98.0 + github.com/shirou/gopsutil/v3 v3.24.3 github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 - golang.org/x/sys v0.14.0 + go.uber.org/zap v1.27.0 + golang.org/x/sys v0.19.0 gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.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/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.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.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // 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.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect github.com/shoenig/go-m1cpu v0.1.6 // 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.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - golang.org/x/net v0.18.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + golang.org/x/net v0.24.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect ) replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => ../../internal/common diff --git a/exporter/signalfxexporter/go.sum b/exporter/signalfxexporter/go.sum index 7d2f55241e8d..b2e3a48e10e2 100644 --- a/exporter/signalfxexporter/go.sum +++ b/exporter/signalfxexporter/go.sum @@ -1,92 +1,73 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -98,17 +79,20 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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= @@ -118,102 +102,96 @@ github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfi 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/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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= @@ -221,18 +199,14 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -240,38 +214,23 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/signalfxexporter/internal/apm/correlations/client.go b/exporter/signalfxexporter/internal/apm/correlations/client.go index 427c0abb685f..ba86baf9a6c2 100644 --- a/exporter/signalfxexporter/internal/apm/correlations/client.go +++ b/exporter/signalfxexporter/internal/apm/correlations/client.go @@ -44,6 +44,7 @@ type CorrelationClient interface { Delete(*Correlation, SuccessfulDeleteCB) Get(dimName string, dimValue string, cb SuccessfulGetCB) Start() + Shutdown() } type request struct { @@ -387,3 +388,9 @@ func (cc *Client) Start() { go cc.processChan() go cc.processRetryChan() } + +// Shutdown the client. This will block until the context's cancel +// function is complete. +func (cc *Client) Shutdown() { + cc.wg.Wait() +} diff --git a/exporter/signalfxexporter/internal/apm/correlations/client_test.go b/exporter/signalfxexporter/internal/apm/correlations/client_test.go index 48cb24b996de..87ff12866cb6 100644 --- a/exporter/signalfxexporter/internal/apm/correlations/client_test.go +++ b/exporter/signalfxexporter/internal/apm/correlations/client_test.go @@ -124,7 +124,7 @@ func makeHandler(t *testing.T, corCh chan<- *request, forcedRespCode *atomic.Val }) } -func setup(t *testing.T) (CorrelationClient, chan *request, *atomic.Value, *atomic.Value, context.CancelFunc) { +func setup(t *testing.T) (CorrelationClient, *httptest.Server, chan *request, *atomic.Value, *atomic.Value, context.CancelFunc, context.Context) { serverCh := make(chan *request, 100) var forcedRespCode atomic.Value @@ -132,10 +132,6 @@ func setup(t *testing.T) (CorrelationClient, chan *request, *atomic.Value, *atom server := httptest.NewServer(makeHandler(t, serverCh, &forcedRespCode, &forcedRespPayload)) ctx, cancel := context.WithCancel(context.Background()) - go func() { - <-ctx.Done() - server.Close() - }() serverURL, err := url.Parse(server.URL) if err != nil { @@ -176,13 +172,20 @@ func setup(t *testing.T) (CorrelationClient, chan *request, *atomic.Value, *atom } client.Start() - return client, serverCh, &forcedRespCode, &forcedRespPayload, cancel + return client, server, serverCh, &forcedRespCode, &forcedRespPayload, cancel, ctx +} + +func teardown(ctx context.Context, client CorrelationClient, server *httptest.Server, serverCh chan *request, cancel context.CancelFunc) { + close(serverCh) + cancel() + <-ctx.Done() + client.Shutdown() + server.Close() } func TestCorrelationClient(t *testing.T) { - client, serverCh, forcedRespCode, forcedRespPayload, cancel := setup(t) - defer close(serverCh) - defer cancel() + client, server, serverCh, forcedRespCode, forcedRespPayload, cancel, ctx := setup(t) + defer teardown(ctx, client, server, serverCh, cancel) for _, correlationType := range []Type{Service, Environment} { for _, op := range []string{http.MethodPut, http.MethodDelete} { @@ -242,7 +245,7 @@ func TestCorrelationClient(t *testing.T) { client.Correlate(testData, CorrelateCB(func(_ *Correlation, _ error) {})) // sending the testData twice tests deduplication, since the 500 status // will trigger retries, and the requests should be deduped and the - // TotalRertriedUpdates should still only be 5 + // TotalRetriedUpdates should still only be 5 client.Correlate(testData, CorrelateCB(func(_ *Correlation, _ error) {})) cors := waitForCors(serverCh, 1, 4) diff --git a/exporter/signalfxexporter/internal/apm/correlations/package_test.go b/exporter/signalfxexporter/internal/apm/correlations/package_test.go new file mode 100644 index 000000000000..334bbbdc8b54 --- /dev/null +++ b/exporter/signalfxexporter/internal/apm/correlations/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package correlations + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/signalfxexporter/internal/apm/requests/requestcounter/package_test.go b/exporter/signalfxexporter/internal/apm/requests/requestcounter/package_test.go new file mode 100644 index 000000000000..2cdaafa8e8fb --- /dev/null +++ b/exporter/signalfxexporter/internal/apm/requests/requestcounter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package requestcounter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/signalfxexporter/internal/apm/requests/sender.go b/exporter/signalfxexporter/internal/apm/requests/sender.go index e06e649ea33a..708f00571655 100644 --- a/exporter/signalfxexporter/internal/apm/requests/sender.go +++ b/exporter/signalfxexporter/internal/apm/requests/sender.go @@ -48,8 +48,14 @@ func (rs *ReqSender) Send(req *http.Request) { go rs.processRequests() } - // Block until we can get through a request - rs.requests <- req + // Block until we can get the request through, or until the context is cancelled. The request processor + // shuts down when the context has been cancelled, so there's no value added to keep blocking. Blocking + // forever results in Shutdown never completing. + select { + case <-rs.ctx.Done(): + return + case rs.requests <- req: + } } } diff --git a/exporter/signalfxexporter/internal/apm/tracetracker/package_test.go b/exporter/signalfxexporter/internal/apm/tracetracker/package_test.go new file mode 100644 index 000000000000..15d86ec4d3a0 --- /dev/null +++ b/exporter/signalfxexporter/internal/apm/tracetracker/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package tracetracker + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/signalfxexporter/internal/apm/tracetracker/shims.go b/exporter/signalfxexporter/internal/apm/tracetracker/shims.go deleted file mode 100644 index f239cc198463..000000000000 --- a/exporter/signalfxexporter/internal/apm/tracetracker/shims.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 -// Originally copied from https://github.com/signalfx/signalfx-agent/blob/fbc24b0fdd3884bd0bbfbd69fe3c83f49d4c0b77/pkg/apm/tracetracker/shims.go - -package tracetracker // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/tracetracker" - -var ( - _ SpanList = (*fakeSpanList)(nil) - _ Span = (*fakeSpan)(nil) -) - -// Span is a generic interface for accessing span metadata. -type Span interface { - Environment() (string, bool) - ServiceName() (string, bool) - Tag(string) (string, bool) - NumTags() int -} - -// SpanList is a generic interface for accessing a list of spans. -type SpanList interface { - Len() int - At(i int) Span -} - -type fakeSpan struct { - serviceName string - tags map[string]string -} - -func (s fakeSpan) Environment() (string, bool) { - env, ok := s.tags["environment"] - return env, ok -} - -func (s fakeSpan) ServiceName() (string, bool) { - return s.serviceName, s.serviceName != "" -} - -func (s fakeSpan) Tag(tag string) (string, bool) { - t, ok := s.tags[tag] - return t, ok -} - -func (s fakeSpan) NumTags() int { - return len(s.tags) -} - -type fakeSpanList []fakeSpan - -func (s fakeSpanList) Len() int { - return len(s) -} - -func (s fakeSpanList) At(i int) Span { - return s[i] -} diff --git a/exporter/signalfxexporter/internal/apm/tracetracker/tracker.go b/exporter/signalfxexporter/internal/apm/tracetracker/tracker.go index e1511b0e36c9..9637d111549f 100644 --- a/exporter/signalfxexporter/internal/apm/tracetracker/tracker.go +++ b/exporter/signalfxexporter/internal/apm/tracetracker/tracker.go @@ -7,14 +7,20 @@ package tracetracker // import "github.com/open-telemetry/opentelemetry-collecto import ( "context" "strings" - "sync" - "sync/atomic" "time" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/ptrace" + conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/correlations" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/log" ) +// fallbackEnvironment is the environment value to use if no environment is found in the span. +// This is the same value that is being set on the backend on spans that don't have an environment. +const fallbackEnvironment = "unknown" + // DefaultDimsToSyncSource are the default dimensions to sync correlated environment and services onto. var DefaultDimsToSyncSource = map[string]string{ "container_id": "container_id", @@ -25,16 +31,11 @@ var DefaultDimsToSyncSource = map[string]string{ // spans passed through ProcessSpans. It supports expiry of service names if // they are not seen for a certain amount of time. type ActiveServiceTracker struct { - dpCacheLock sync.Mutex - log log.Logger // hostIDDims is the map of key/values discovered by the agent that identify the host hostIDDims map[string]string - // sendTraceHostCorrelationMetrics turns metric emission on and off - sendTraceHostCorrelationMetrics bool - // hostServiceCache is a cache of services associated with the host hostServiceCache *TimeoutCache @@ -52,37 +53,16 @@ type ActiveServiceTracker struct { // for more information tenantEmptyEnvironmentCache *TimeoutCache - // cache of service names to generate datapoints for - dpCache map[string]struct{} - timeNow func() time.Time // correlationClient is the client used for updating infrastructure correlation properties correlationClient correlations.CorrelationClient - // Internal metrics - spansProcessed int64 - // Map of dimensions to sync to with the key being the span attribute to lookup and the value being // the dimension to sync to. dimsToSyncSource map[string]string } -// addServiceToDPCache creates a datapoint for the given service in the dpCache. -func (a *ActiveServiceTracker) addServiceToDPCache(service string) { - a.dpCacheLock.Lock() - defer a.dpCacheLock.Unlock() - - a.dpCache[service] = struct{}{} -} - -// removeServiceFromDPCache removes the datapoint for the given service from the dpCache -func (a *ActiveServiceTracker) removeServiceFromDPCache(service string) { - a.dpCacheLock.Lock() - delete(a.dpCache, service) - a.dpCacheLock.Unlock() -} - // LoadHostIDDimCorrelations asynchronously retrieves all known correlations from the backend // for all known hostIDDims. This allows the agent to timeout and manage correlation // deletions on restart. @@ -97,11 +77,6 @@ func (a *ActiveServiceTracker) LoadHostIDDimCorrelations() { // Note that only the value is set for the host service cache because we only track services for the host // therefore there we don't need to include the dim key and value on the cache key if isNew := a.hostServiceCache.UpdateOrCreate(&CacheKey{value: service}, a.timeNow()); isNew { - if a.sendTraceHostCorrelationMetrics { - // create datapoint for service - a.addServiceToDPCache(service) - } - a.log.WithFields(log.Fields{"service": service}).Debug("Tracking service name from trace span") } } @@ -125,104 +100,55 @@ func New( timeout time.Duration, correlationClient correlations.CorrelationClient, hostIDDims map[string]string, - sendTraceHostCorrelationMetrics bool, dimsToSyncSource map[string]string, ) *ActiveServiceTracker { a := &ActiveServiceTracker{ - log: log, - hostIDDims: hostIDDims, - hostServiceCache: NewTimeoutCache(timeout), - hostEnvironmentCache: NewTimeoutCache(timeout), - tenantServiceCache: NewTimeoutCache(timeout), - tenantEnvironmentCache: NewTimeoutCache(timeout), - tenantEmptyEnvironmentCache: NewTimeoutCache(timeout), - dpCache: make(map[string]struct{}), - correlationClient: correlationClient, - sendTraceHostCorrelationMetrics: sendTraceHostCorrelationMetrics, - timeNow: time.Now, - dimsToSyncSource: dimsToSyncSource, + log: log, + hostIDDims: hostIDDims, + hostServiceCache: NewTimeoutCache(timeout), + hostEnvironmentCache: NewTimeoutCache(timeout), + tenantServiceCache: NewTimeoutCache(timeout), + tenantEnvironmentCache: NewTimeoutCache(timeout), + tenantEmptyEnvironmentCache: NewTimeoutCache(timeout), + correlationClient: correlationClient, + timeNow: time.Now, + dimsToSyncSource: dimsToSyncSource, } a.LoadHostIDDimCorrelations() return a } -// AddSpansGeneric accepts a list of trace spans and uses them to update the +// ProcessTraces accepts a list of trace spans and uses them to update the // current list of active services. This is thread-safe. -func (a *ActiveServiceTracker) AddSpansGeneric(_ context.Context, spans SpanList) { +func (a *ActiveServiceTracker) ProcessTraces(_ context.Context, traces ptrace.Traces) { // Take current time once since this is a system call. now := a.timeNow() - for i := 0; i < spans.Len(); i++ { - a.processEnvironment(spans.At(i), now) - a.processService(spans.At(i), now) + for i := 0; i < traces.ResourceSpans().Len(); i++ { + a.processEnvironment(traces.ResourceSpans().At(i).Resource(), now) + a.processService(traces.ResourceSpans().At(i).Resource(), now) } - - // Protected by lock above - atomic.AddInt64(&a.spansProcessed, int64(spans.Len())) } -func (a *ActiveServiceTracker) processEnvironment(span Span, now time.Time) { - if span.NumTags() == 0 { +func (a *ActiveServiceTracker) processEnvironment(res pcommon.Resource, now time.Time) { + attrs := res.Attributes() + if attrs.Len() == 0 { return } - environment, environmentFound := span.Environment() - - if !environmentFound || strings.TrimSpace(environment) == "" { - // The following is ONLY to mitigate a corner case scenario where the environment for a container/pod is set on - // the backend with an old default environment set by the agent, and the agent has been restarted with no - // default environment. On restart, the agent only fetches existing environment values for hostIDDims, and does - // not fetch for containers/pod dims. If a container/pod is emitting spans without an environment value, then - // the agent won't be able to overwrite the value. The agent is also unable to age out environment values for - // containers/pods from startup. - // - // Under that VERY specific circumstance, we need to fetch and delete the environment values for each - // pod/container that we have not already scraped an environment off of this agent runtime. - for sourceAttr, dimName := range a.dimsToSyncSource { - sourceAttr := sourceAttr - dimName := dimName - if dimValue, ok := span.Tag(sourceAttr); ok { - // look up the dimension / value in the environment cache to ensure it doesn't already exist - // if it does exist, this means we've already scraped and overwritten what was on the backend - // probably from another span. This also implies that some spans for the tenant have an environment - // and some do not. - a.tenantEnvironmentCache.RunIfKeyDoesNotExist(&CacheKey{dimName: dimName, dimValue: dimValue}, func() { - // create a cache key ensuring that we don't fetch environment values multiple times for spans with - // empty environments - if isNew := a.tenantEmptyEnvironmentCache.UpdateOrCreate(&CacheKey{dimName: dimName, dimValue: dimValue}, now); isNew { - // get the existing value from the backend - a.correlationClient.Get(dimName, dimValue, func(response map[string][]string) { - if len(response) == 0 { - return - } - - // look for the existing environment value - environments, ok := response["sf_environments"] - if !ok || len(environments) == 0 { - return - } - - // Note: This cache operation is OK to execute inside of the encapsulating - // tenantEnvironmentCache.RunIfKeyDoesNotExist() because it is actually inside an - // asynchronous callback to the correlation client's Get(). So... by the time the callback - // is actually executed, the parent RunIfKeyDoesNotExist will have already released the lock - // on the cache - a.tenantEnvironmentCache.RunIfKeyDoesNotExist(&CacheKey{dimName: dimName, dimValue: dimValue}, func() { - a.correlationClient.Delete(&correlations.Correlation{ - Type: correlations.Environment, - DimName: dimName, - DimValue: dimValue, - Value: environments[0], // We already checked for empty, and backend enforces 1 value max. - }, func(_ *correlations.Correlation) {}) - }) - }) - } - }) - } - } - // return so we don't set empty string or spaces as an environment value - return + // Determine the environment value from the incoming spans. + // First check "deployment.environment" attribute. + // Then, try "environment" attribute (SignalFx schema). + // Otherwise, use the same fallback value as set on the backend. + var environment string + if env, ok := attrs.Get(conventions.AttributeDeploymentEnvironment); ok { + environment = env.Str() + } else if env, ok = attrs.Get("environment"); ok { + environment = env.Str() + } + if strings.TrimSpace(environment) == "" { + environment = fallbackEnvironment } // update the environment for the hostIDDims @@ -236,7 +162,7 @@ func (a *ActiveServiceTracker) processEnvironment(span Span, now time.Time) { DimName: dimName, DimValue: dimValue, Value: environment, - }, func(cor *correlations.Correlation, err error) { + }, func(_ *correlations.Correlation, err error) { if err == nil { a.hostEnvironmentCache.UpdateOrCreate(&CacheKey{value: environment}, now) } @@ -255,19 +181,19 @@ func (a *ActiveServiceTracker) processEnvironment(span Span, now time.Time) { for sourceAttr, dimName := range a.dimsToSyncSource { sourceAttr := sourceAttr dimName := dimName - if dimValue, ok := span.Tag(sourceAttr); ok { + if val, ok := attrs.Get(sourceAttr); ok { // Note that the value is not set on the cache key. We only send the first environment received for a // given pod/container, and we never delete the values set on the container/pod dimension. // So we only need to cache the dim name and dim value that have been associated with an environment. - if exists := a.tenantEnvironmentCache.UpdateIfExists(&CacheKey{dimName: dimName, dimValue: dimValue}, now); !exists { + if exists := a.tenantEnvironmentCache.UpdateIfExists(&CacheKey{dimName: dimName, dimValue: val.Str()}, now); !exists { a.correlationClient.Correlate(&correlations.Correlation{ Type: correlations.Environment, DimName: dimName, - DimValue: dimValue, + DimValue: val.Str(), Value: environment, - }, func(cor *correlations.Correlation, err error) { + }, func(_ *correlations.Correlation, err error) { if err == nil { - a.tenantEnvironmentCache.UpdateOrCreate(&CacheKey{dimName: dimName, dimValue: dimValue}, now) + a.tenantEnvironmentCache.UpdateOrCreate(&CacheKey{dimName: dimName, dimValue: val.Str()}, now) } }) } @@ -275,9 +201,10 @@ func (a *ActiveServiceTracker) processEnvironment(span Span, now time.Time) { } } -func (a *ActiveServiceTracker) processService(span Span, now time.Time) { +func (a *ActiveServiceTracker) processService(res pcommon.Resource, now time.Time) { // Can't do anything if the spans don't have a local service name - service, ok := span.ServiceName() + serviceNameAttr, ok := res.Attributes().Get(conventions.AttributeServiceName) + service := serviceNameAttr.Str() if !ok || service == "" { return } @@ -294,7 +221,7 @@ func (a *ActiveServiceTracker) processService(span Span, now time.Time) { DimName: dimName, DimValue: dimValue, Value: service, - }, func(cor *correlations.Correlation, err error) { + }, func(_ *correlations.Correlation, err error) { if err == nil { a.hostServiceCache.UpdateOrCreate(&CacheKey{value: service}, now) } @@ -306,11 +233,6 @@ func (a *ActiveServiceTracker) processService(span Span, now time.Time) { } } - if a.sendTraceHostCorrelationMetrics { - // create datapoint for service - a.addServiceToDPCache(service) - } - a.log.WithFields(log.Fields{"service": service}).Debug("Tracking service name from trace span") } @@ -319,19 +241,19 @@ func (a *ActiveServiceTracker) processService(span Span, now time.Time) { for sourceAttr, dimName := range a.dimsToSyncSource { sourceAttr := sourceAttr dimName := dimName - if dimValue, ok := span.Tag(sourceAttr); ok { + if val, ok := res.Attributes().Get(sourceAttr); ok { // Note that the value is not set on the cache key. We only send the first service received for a // given pod/container, and we never delete the values set on the container/pod dimension. // So we only need to cache the dim name and dim value that have been associated with a service. - if exists := a.tenantServiceCache.UpdateIfExists(&CacheKey{dimName: dimName, dimValue: dimValue}, now); !exists { + if exists := a.tenantServiceCache.UpdateIfExists(&CacheKey{dimName: dimName, dimValue: val.Str()}, now); !exists { a.correlationClient.Correlate(&correlations.Correlation{ Type: correlations.Service, DimName: dimName, - DimValue: dimValue, + DimValue: val.Str(), Value: service, - }, func(cor *correlations.Correlation, err error) { + }, func(_ *correlations.Correlation, err error) { if err == nil { - a.tenantServiceCache.UpdateOrCreate(&CacheKey{dimName: dimName, dimValue: dimValue}, now) + a.tenantServiceCache.UpdateOrCreate(&CacheKey{dimName: dimName, dimValue: val.Str()}, now) } }) } @@ -352,14 +274,10 @@ func (a *ActiveServiceTracker) Purge() { DimName: dimName, DimValue: dimValue, Value: purged.value, - }, func(cor *correlations.Correlation) { + }, func(_ *correlations.Correlation) { a.hostServiceCache.Delete(purged) }) } - // remove host/service correlation metric from tracker - if a.sendTraceHostCorrelationMetrics { - a.removeServiceFromDPCache(purged.value) - } a.log.WithFields(log.Fields{"serviceName": purged.value}).Debug("No longer tracking service name from trace span") } @@ -373,7 +291,7 @@ func (a *ActiveServiceTracker) Purge() { DimName: dimName, DimValue: dimValue, Value: purged.value, - }, func(cor *correlations.Correlation) { + }, func(_ *correlations.Correlation) { a.hostEnvironmentCache.Delete(purged) a.log.WithFields(log.Fields{"environmentName": purged.value}).Debug("No longer tracking environment name from trace span") }) diff --git a/exporter/signalfxexporter/internal/apm/tracetracker/tracker_test.go b/exporter/signalfxexporter/internal/apm/tracetracker/tracker_test.go index 30640fda8eda..b7fb27695550 100644 --- a/exporter/signalfxexporter/internal/apm/tracetracker/tracker_test.go +++ b/exporter/signalfxexporter/internal/apm/tracetracker/tracker_test.go @@ -12,6 +12,9 @@ import ( "time" "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/ptrace" + conventions "go.opentelemetry.io/collector/semconv/v1.6.1" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/correlations" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/log" @@ -26,52 +29,42 @@ func advanceTime(a *ActiveServiceTracker, minutes int64) { a.timeNow = func() time.Time { return newNow } } -// mergeStringMaps merges n maps with a later map's keys overriding earlier maps -func mergeStringMaps(maps ...map[string]string) map[string]string { - ret := map[string]string{} - +// newResourceWithAttrs creates a new resource with the given attributes. +func newResourceWithAttrs(maps ...map[string]string) pcommon.Resource { + res := pcommon.NewResource() for _, m := range maps { for k, v := range m { - ret[k] = v + res.Attributes().PutStr(k, v) } } - - return ret + return res } func TestExpiration(t *testing.T) { correlationClient := &correlationTestClient{} hostIDDims := map[string]string{"host": "test", "AWSUniqueId": "randomAWSUniqueId"} - a := New(log.Nil, 5*time.Minute, correlationClient, hostIDDims, true, DefaultDimsToSyncSource) + a := New(log.Nil, 5*time.Minute, correlationClient, hostIDDims, DefaultDimsToSyncSource) setTime(a, time.Unix(100, 0)) - a.AddSpansGeneric(context.Background(), fakeSpanList{ - { - serviceName: "one", - tags: mergeStringMaps(hostIDDims, map[string]string{"environment": "environment1"}), - }, - { - serviceName: "two", - tags: mergeStringMaps(hostIDDims, map[string]string{"environment": "environment2"}), - }, - { - serviceName: "three", - tags: mergeStringMaps(hostIDDims, map[string]string{"environment": "environment3"}), - }, - }) + fakeTraces := ptrace.NewTraces() + newResourceWithAttrs(hostIDDims, map[string]string{conventions.AttributeServiceName: "one", "environment": "environment1"}). + CopyTo(fakeTraces.ResourceSpans().AppendEmpty().Resource()) + newResourceWithAttrs(hostIDDims, map[string]string{conventions.AttributeServiceName: "two", "environment": "environment2"}). + CopyTo(fakeTraces.ResourceSpans().AppendEmpty().Resource()) + newResourceWithAttrs(hostIDDims, map[string]string{conventions.AttributeServiceName: "three", "environment": "environment3"}). + CopyTo(fakeTraces.ResourceSpans().AppendEmpty().Resource()) + a.ProcessTraces(context.Background(), fakeTraces) assert.Equal(t, int64(3), a.hostServiceCache.ActiveCount, "activeServiceCount is not properly tracked") assert.Equal(t, int64(3), a.hostEnvironmentCache.ActiveCount, "activeEnvironmentCount is not properly tracked") advanceTime(a, 4) - a.AddSpansGeneric(context.Background(), fakeSpanList{ - { - serviceName: "two", - tags: mergeStringMaps(hostIDDims, map[string]string{"environment": "environment2"}), - }, - }) + fakeTraces = ptrace.NewTraces() + newResourceWithAttrs(hostIDDims, map[string]string{conventions.AttributeServiceName: "two", "environment": "environment2"}). + CopyTo(fakeTraces.ResourceSpans().AppendEmpty().Resource()) + a.ProcessTraces(context.Background(), fakeTraces) advanceTime(a, 2) a.Purge() @@ -92,7 +85,8 @@ type correlationTestClient struct { correlateCounter int64 } -func (c *correlationTestClient) Start() { /*no-op*/ } +func (c *correlationTestClient) Start() { /*no-op*/ } +func (c *correlationTestClient) Shutdown() { /*no-op*/ } func (c *correlationTestClient) Get(_ string, dimValue string, cb correlations.SuccessfulGetCB) { atomic.AddInt64(&c.getCounter, 1) go func() { @@ -145,29 +139,24 @@ func TestCorrelationEmptyEnvironment(t *testing.T) { hostIDDims := map[string]string{"host": "test", "AWSUniqueId": "randomAWSUniqueId"} wg.Add(len(hostIDDims)) containerLevelIDDims := map[string]string{"kubernetes_pod_uid": "testk8sPodUID", "container_id": "testContainerID"} - a := New(log.Nil, 5*time.Minute, correlationClient, hostIDDims, true, DefaultDimsToSyncSource) + a := New(log.Nil, 5*time.Minute, correlationClient, hostIDDims, DefaultDimsToSyncSource) wg.Wait() // wait for the initial fetch of hostIDDims to complete - // for each container level ID we're going to perform a GET to check for an environment - wg.Add(len(containerLevelIDDims)) - a.AddSpansGeneric(context.Background(), fakeSpanList{ - {tags: mergeStringMaps(hostIDDims, containerLevelIDDims)}, - {tags: mergeStringMaps(hostIDDims, containerLevelIDDims)}, - {tags: mergeStringMaps(hostIDDims, containerLevelIDDims)}, - }) - - wg.Wait() // wait for the gets to complete to check for existing tenant environment values - - // there shouldn't be any active tenant environments. None of the spans had environments on them, - // and we don't actively fetch and store environments from the back end. That's kind of the whole point of this - // the workaround this is testing. - assert.Equal(t, int64(0), a.tenantEnvironmentCache.ActiveCount, "tenantEnvironmentCache is not properly tracked") - // ensure we only have 1 entry per container / pod id - assert.Equal(t, int64(len(containerLevelIDDims)), a.tenantEmptyEnvironmentCache.ActiveCount, "tenantEmptyEnvironmentCount is not properly tracked") - // len(hostIDDims) * len(containerLevelIDDims) - assert.Equal(t, int64(len(containerLevelIDDims)+len(hostIDDims)), atomic.LoadInt64(&correlationClient.getCounter), "") - // 1 DELETE * len(containerLevelIDDims) - assert.Equal(t, len(containerLevelIDDims), len(correlationClient.getCorrelations()), "") + fakeTraces := ptrace.NewTraces() + fakeResource := newResourceWithAttrs(hostIDDims, containerLevelIDDims) + fakeResource.CopyTo(fakeTraces.ResourceSpans().AppendEmpty().Resource()) + fakeResource.CopyTo(fakeTraces.ResourceSpans().AppendEmpty().Resource()) + fakeResource.CopyTo(fakeTraces.ResourceSpans().AppendEmpty().Resource()) + a.ProcessTraces(context.Background(), fakeTraces) + + cors := correlationClient.getCorrelations() + assert.Equal(t, 4, len(cors), "expected 4 correlations to be made") + for _, c := range cors { + assert.Contains(t, []string{"container_id", "kubernetes_pod_uid", "host", "AWSUniqueId"}, c.DimName) + assert.Contains(t, []string{"test", "randomAWSUniqueId", "testk8sPodUID", "testContainerID"}, c.DimValue) + assert.Equal(t, correlations.Type("environment"), c.Type) + assert.Equal(t, fallbackEnvironment, c.Value) + } } func TestCorrelationUpdates(t *testing.T) { @@ -187,7 +176,7 @@ func TestCorrelationUpdates(t *testing.T) { hostIDDims := map[string]string{"host": "test", "AWSUniqueId": "randomAWSUniqueId"} wg.Add(len(hostIDDims)) containerLevelIDDims := map[string]string{"kubernetes_pod_uid": "testk8sPodUID", "container_id": "testContainerID"} - a := New(log.Nil, 5*time.Minute, correlationClient, hostIDDims, true, DefaultDimsToSyncSource) + a := New(log.Nil, 5*time.Minute, correlationClient, hostIDDims, DefaultDimsToSyncSource) wg.Wait() assert.Equal(t, int64(1), a.hostServiceCache.ActiveCount, "activeServiceCount is not properly tracked") assert.Equal(t, int64(1), a.hostEnvironmentCache.ActiveCount, "activeEnvironmentCount is not properly tracked") @@ -200,20 +189,14 @@ func TestCorrelationUpdates(t *testing.T) { setTime(a, time.Unix(100, 0)) - a.AddSpansGeneric(context.Background(), fakeSpanList{ - { - serviceName: "one", - tags: mergeStringMaps(hostIDDims, mergeStringMaps(containerLevelIDDims, map[string]string{"environment": "environment1"})), - }, - { - serviceName: "two", - tags: mergeStringMaps(hostIDDims, mergeStringMaps(containerLevelIDDims, map[string]string{"environment": "environment2"})), - }, - { - serviceName: "three", - tags: mergeStringMaps(hostIDDims, mergeStringMaps(containerLevelIDDims, map[string]string{"environment": "environment3"})), - }, - }) + fakeTraces := ptrace.NewTraces() + newResourceWithAttrs(containerLevelIDDims, map[string]string{conventions.AttributeServiceName: "one", "environment": "environment1"}). + CopyTo(fakeTraces.ResourceSpans().AppendEmpty().Resource()) + newResourceWithAttrs(containerLevelIDDims, map[string]string{conventions.AttributeServiceName: "two", "environment": "environment2"}). + CopyTo(fakeTraces.ResourceSpans().AppendEmpty().Resource()) + newResourceWithAttrs(containerLevelIDDims, map[string]string{conventions.AttributeServiceName: "three", "environment": "environment3"}). + CopyTo(fakeTraces.ResourceSpans().AppendEmpty().Resource()) + a.ProcessTraces(context.Background(), fakeTraces) assert.Equal(t, int64(3), a.hostServiceCache.ActiveCount, "activeServiceCount is not properly tracked") assert.Equal(t, int64(3), a.hostEnvironmentCache.ActiveCount, "activeEnvironmentCount is not properly tracked") diff --git a/exporter/signalfxexporter/internal/correlation/config.go b/exporter/signalfxexporter/internal/correlation/config.go index 89e3cd5718a1..72e20ffa6854 100644 --- a/exporter/signalfxexporter/internal/correlation/config.go +++ b/exporter/signalfxexporter/internal/correlation/config.go @@ -17,7 +17,7 @@ import ( // DefaultConfig returns default configuration correlation values. func DefaultConfig() *Config { return &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{Timeout: 5 * time.Second}, + ClientConfig: confighttp.ClientConfig{Timeout: 5 * time.Second}, StaleServiceTimeout: 5 * time.Minute, SyncAttributes: map[string]string{ conventions.AttributeK8SPodUID: conventions.AttributeK8SPodUID, @@ -36,8 +36,8 @@ func DefaultConfig() *Config { // Config defines configuration for correlation via traces. type Config struct { - confighttp.HTTPClientSettings `mapstructure:",squash"` - correlations.Config `mapstructure:",squash"` + confighttp.ClientConfig `mapstructure:",squash"` + correlations.Config `mapstructure:",squash"` // How long to wait after a trace span's service name is last seen before // uncorrelating that service. @@ -47,11 +47,11 @@ type Config struct { } func (c *Config) validate() error { - if c.HTTPClientSettings.Endpoint == "" { + if c.ClientConfig.Endpoint == "" { return errors.New("`correlation.endpoint` not specified") } - _, err := url.Parse(c.HTTPClientSettings.Endpoint) + _, err := url.Parse(c.ClientConfig.Endpoint) if err != nil { return err } diff --git a/exporter/signalfxexporter/internal/correlation/config_test.go b/exporter/signalfxexporter/internal/correlation/config_test.go index 8de7b1211d99..78e4ec71846f 100644 --- a/exporter/signalfxexporter/internal/correlation/config_test.go +++ b/exporter/signalfxexporter/internal/correlation/config_test.go @@ -12,7 +12,7 @@ import ( func TestValidConfig(t *testing.T) { config := DefaultConfig() - config.HTTPClientSettings.Endpoint = "https://localhost" + config.ClientConfig.Endpoint = "https://localhost" require.NoError(t, config.validate()) } @@ -22,7 +22,7 @@ func TestInvalidConfig(t *testing.T) { require.Error(t, noEndpointErr) invalid = Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: ":123:456"}, + ClientConfig: confighttp.ClientConfig{Endpoint: ":123:456"}, } invalidURLErr := invalid.validate() require.Error(t, invalidURLErr) diff --git a/exporter/signalfxexporter/internal/correlation/correlation.go b/exporter/signalfxexporter/internal/correlation/correlation.go index e2e3dd37957e..29c7ab783570 100644 --- a/exporter/signalfxexporter/internal/correlation/correlation.go +++ b/exporter/signalfxexporter/internal/correlation/correlation.go @@ -48,20 +48,20 @@ func NewTracker(cfg *Config, accessToken configopaque.String, params exporter.Cr } } -func newCorrelationClient(cfg *Config, accessToken configopaque.String, params exporter.CreateSettings, host component.Host) ( +func newCorrelationClient(ctx context.Context, cfg *Config, accessToken configopaque.String, params exporter.CreateSettings, host component.Host) ( *correlationContext, error, ) { - corrURL, err := url.Parse(cfg.HTTPClientSettings.Endpoint) + corrURL, err := url.Parse(cfg.ClientConfig.Endpoint) if err != nil { - return nil, fmt.Errorf("failed to parse correlation endpoint URL %q: %w", cfg.HTTPClientSettings.Endpoint, err) + return nil, fmt.Errorf("failed to parse correlation endpoint URL %q: %w", cfg.ClientConfig.Endpoint, err) } - httpClient, err := cfg.ToClient(host, params.TelemetrySettings) + httpClient, err := cfg.ToClientContext(ctx, host, params.TelemetrySettings) if err != nil { return nil, fmt.Errorf("failed to create correlation API client: %w", err) } - ctx, cancel := context.WithCancel(context.Background()) + ctx, cancel := context.WithCancel(ctx) client, err := correlations.NewCorrelationClient(ctx, newZapShim(params.Logger), httpClient, correlations.ClientConfig{ Config: cfg.Config, @@ -80,9 +80,9 @@ func newCorrelationClient(cfg *Config, accessToken configopaque.String, params e }, nil } -// AddSpans processes the provided spans to correlate the services and environment observed +// ProcessTraces processes the provided spans to correlate the services and environment observed // to the resources (host, pods, etc.) emitting the spans. -func (cor *Tracker) AddSpans(ctx context.Context, traces ptrace.Traces) error { +func (cor *Tracker) ProcessTraces(ctx context.Context, traces ptrace.Traces) error { if cor == nil || traces.ResourceSpans().Len() == 0 { return nil } @@ -107,7 +107,6 @@ func (cor *Tracker) AddSpans(ctx context.Context, traces ptrace.Traces) error { map[string]string{ hostDimension: hostID.ID, }, - false, cor.cfg.SyncAttributes) cor.pTicker = &timeutils.PolicyTicker{OnTickFunc: cor.traceTracker.Purge} @@ -117,15 +116,15 @@ func (cor *Tracker) AddSpans(ctx context.Context, traces ptrace.Traces) error { }) if cor.traceTracker != nil { - cor.traceTracker.AddSpansGeneric(ctx, spanListWrap{traces.ResourceSpans()}) + cor.traceTracker.ProcessTraces(ctx, traces) } return nil } // Start correlation tracking. -func (cor *Tracker) Start(_ context.Context, host component.Host) (err error) { - cor.correlation, err = newCorrelationClient(cor.cfg, cor.accessToken, cor.params, host) +func (cor *Tracker) Start(ctx context.Context, host component.Host) (err error) { + cor.correlation, err = newCorrelationClient(ctx, cor.cfg, cor.accessToken, cor.params, host) if err != nil { return err } @@ -138,6 +137,7 @@ func (cor *Tracker) Shutdown(_ context.Context) error { if cor != nil { if cor.correlation != nil { cor.correlation.cancel() + cor.correlation.CorrelationClient.Shutdown() } if cor.pTicker != nil { diff --git a/exporter/signalfxexporter/internal/correlation/correlation_test.go b/exporter/signalfxexporter/internal/correlation/correlation_test.go index acc5f3389875..74d688af9366 100644 --- a/exporter/signalfxexporter/internal/correlation/correlation_test.go +++ b/exporter/signalfxexporter/internal/correlation/correlation_test.go @@ -33,10 +33,10 @@ func TestTrackerAddSpans(t *testing.T) { attr.PutStr("host.name", "localhost") // Add empty first, should ignore. - assert.NoError(t, tracker.AddSpans(context.Background(), ptrace.NewTraces())) + assert.NoError(t, tracker.ProcessTraces(context.Background(), ptrace.NewTraces())) assert.Nil(t, tracker.traceTracker) - assert.NoError(t, tracker.AddSpans(context.Background(), traces)) + assert.NoError(t, tracker.ProcessTraces(context.Background(), traces)) assert.NotNil(t, tracker.traceTracker, "trace tracker should be set") @@ -54,10 +54,10 @@ func TestTrackerStart(t *testing.T) { { name: "invalid http client settings fails", config: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "localhost:9090", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "/non/existent", }, }, @@ -86,6 +86,8 @@ func TestTrackerStart(t *testing.T) { } else { require.NoError(t, err) } + + assert.NoError(t, tracker.Shutdown(context.Background())) }) } } diff --git a/exporter/signalfxexporter/internal/correlation/package_test.go b/exporter/signalfxexporter/internal/correlation/package_test.go new file mode 100644 index 000000000000..80d3ec2c9232 --- /dev/null +++ b/exporter/signalfxexporter/internal/correlation/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package correlation + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/signalfxexporter/internal/correlation/spanshims.go b/exporter/signalfxexporter/internal/correlation/spanshims.go deleted file mode 100644 index c8ffe51679f5..000000000000 --- a/exporter/signalfxexporter/internal/correlation/spanshims.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package correlation // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/correlation" - -import ( - "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" - - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/tracetracker" -) - -var ( - _ tracetracker.SpanList = (*spanListWrap)(nil) - _ tracetracker.Span = (*spanWrap)(nil) -) - -type spanWrap struct { - ptrace.ResourceSpans -} - -func (s spanWrap) Environment() (string, bool) { - attr := s.Resource().Attributes() - - // Try to find deployment.environment before falling back to environment (SignalFx value). - env, ok := attr.Get(conventions.AttributeDeploymentEnvironment) - if ok && env.Str() != "" { - return env.Str(), true - } - - env, ok = attr.Get("environment") - if ok && env.Str() != "" { - return env.Str(), true - } - - return "", false -} - -func (s spanWrap) ServiceName() (string, bool) { - attr := s.Resource().Attributes() - - serviceName, ok := attr.Get(conventions.AttributeServiceName) - if ok && serviceName.Str() != "" { - return serviceName.Str(), true - } - - return "", false -} - -func (s spanWrap) Tag(tag string) (string, bool) { - attr := s.Resource().Attributes() - val, ok := attr.Get(tag) - if ok { - return val.Str(), true - } - return "", false -} - -func (s spanWrap) NumTags() int { - attr := s.Resource().Attributes() - return attr.Len() -} - -type spanListWrap struct { - ptrace.ResourceSpansSlice -} - -func (s spanListWrap) Len() int { - return s.ResourceSpansSlice.Len() -} - -func (s spanListWrap) At(i int) tracetracker.Span { - return spanWrap{ResourceSpans: s.ResourceSpansSlice.At(i)} -} diff --git a/exporter/signalfxexporter/internal/correlation/spanshims_test.go b/exporter/signalfxexporter/internal/correlation/spanshims_test.go deleted file mode 100644 index a54dc94eae56..000000000000 --- a/exporter/signalfxexporter/internal/correlation/spanshims_test.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package correlation - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/pdata/ptrace" -) - -func TestSpanShimList(t *testing.T) { - spans := ptrace.NewResourceSpansSlice() - spans.EnsureCapacity(2) - s1 := spans.AppendEmpty() - s2 := spans.AppendEmpty() - wrapped := spanListWrap{spans} - assert.Equal(t, 2, wrapped.Len()) - assert.Equal(t, spanWrap{s1}, wrapped.At(0)) - assert.Equal(t, spanWrap{s2}, wrapped.At(1)) -} - -func TestSpanShimList_Empty(t *testing.T) { - spans := ptrace.NewResourceSpansSlice() - wrapped := spanListWrap{spans} - assert.Equal(t, 0, wrapped.Len()) -} - -func TestSpanShim_Service(t *testing.T) { - span := ptrace.NewResourceSpans() - res := span.Resource() - attr := res.Attributes() - attr.PutStr("service.name", "shopping-cart") - - wrapped := spanWrap{span} - - service, ok := wrapped.ServiceName() - require.True(t, ok) - - assert.Equal(t, "shopping-cart", service) -} - -func TestSpanShim_Environment(t *testing.T) { - span := ptrace.NewResourceSpans() - res := span.Resource() - attr := res.Attributes() - attr.PutStr("deployment.environment", "prod") - - wrapped := spanWrap{span} - - environment, ok := wrapped.Environment() - require.True(t, ok) - - assert.Equal(t, "prod", environment) -} - -func TestSpanShim_SignalfxEnvironment(t *testing.T) { - span := ptrace.NewResourceSpans() - res := span.Resource() - attr := res.Attributes() - attr.PutStr("environment", "prod") - - wrapped := spanWrap{span} - - environment, ok := wrapped.Environment() - require.True(t, ok) - - assert.Equal(t, "prod", environment) -} - -func TestSpanShim_Missing(t *testing.T) { - span := ptrace.NewResourceSpans() - wrapped := spanWrap{span} - - _, ok := wrapped.Environment() - assert.False(t, ok) - _, ok = wrapped.ServiceName() - assert.False(t, ok) -} - -func TestSpanShim_ResourceNil(t *testing.T) { - span := ptrace.NewResourceSpans() - - wrapped := spanWrap{span} - - _, ok := wrapped.Environment() - assert.False(t, ok) - _, ok = wrapped.ServiceName() - assert.False(t, ok) - _, ok = wrapped.Tag("tag") - assert.False(t, ok) - - assert.Equal(t, 0, wrapped.NumTags()) -} - -func TestSpanShim_Tags(t *testing.T) { - span := ptrace.NewResourceSpans() - res := span.Resource() - attr := res.Attributes() - attr.PutStr("tag1", "tag1val") - - wrapped := spanWrap{span} - - assert.Equal(t, 1, wrapped.NumTags()) - - tag, ok := wrapped.Tag("tag1") - assert.True(t, ok) - assert.Equal(t, "tag1val", tag) - - tag, ok = wrapped.Tag("missing") - assert.False(t, ok) - assert.Equal(t, "", tag) -} diff --git a/exporter/signalfxexporter/internal/dimensions/metadata_test.go b/exporter/signalfxexporter/internal/dimensions/metadata_test.go index fc938a481a4b..4fa352dc8f2b 100644 --- a/exporter/signalfxexporter/internal/dimensions/metadata_test.go +++ b/exporter/signalfxexporter/internal/dimensions/metadata_test.go @@ -205,6 +205,7 @@ func TestGetDimensionUpdateFromMetadata(t *testing.T) { nil, "-_.", false, + true, ) require.NoError(t, err) assert.Equal(t, tt.want, getDimensionUpdateFromMetadata(tt.args.metadata, *converter)) diff --git a/exporter/signalfxexporter/internal/hostmetadata/host_linux.go b/exporter/signalfxexporter/internal/hostmetadata/host_linux.go index dce8e7de296e..b543f767c64b 100644 --- a/exporter/signalfxexporter/internal/hostmetadata/host_linux.go +++ b/exporter/signalfxexporter/internal/hostmetadata/host_linux.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build linux -// +build linux // Taken from https://github.com/signalfx/golib/blob/master/metadata/hostmetadata/host-linux.go // with minor modifications. diff --git a/exporter/signalfxexporter/internal/hostmetadata/host_linux_test.go b/exporter/signalfxexporter/internal/hostmetadata/host_linux_test.go index 5d0dcee2fdf6..5b662cfdcdf1 100644 --- a/exporter/signalfxexporter/internal/hostmetadata/host_linux_test.go +++ b/exporter/signalfxexporter/internal/hostmetadata/host_linux_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build linux -// +build linux // Taken from https://github.com/signalfx/golib/blob/master/metadata/hostmetadata/host-linux_test.go as is. diff --git a/exporter/signalfxexporter/internal/hostmetadata/host_others.go b/exporter/signalfxexporter/internal/hostmetadata/host_others.go index a010c6ee433e..c4f930b2a841 100644 --- a/exporter/signalfxexporter/internal/hostmetadata/host_others.go +++ b/exporter/signalfxexporter/internal/hostmetadata/host_others.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !linux -// +build !linux // Taken from https://github.com/signalfx/golib/blob/master/metadata/hostmetadata/host-not-linux.go as is. diff --git a/exporter/signalfxexporter/internal/hostmetadata/metadata_others_test.go b/exporter/signalfxexporter/internal/hostmetadata/metadata_others_test.go index 4ba34c49d051..daec25ffc6c4 100644 --- a/exporter/signalfxexporter/internal/hostmetadata/metadata_others_test.go +++ b/exporter/signalfxexporter/internal/hostmetadata/metadata_others_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !linux -// +build !linux package hostmetadata diff --git a/exporter/signalfxexporter/internal/hostmetadata/package_test.go b/exporter/signalfxexporter/internal/hostmetadata/package_test.go new file mode 100644 index 000000000000..3bc935fd715a --- /dev/null +++ b/exporter/signalfxexporter/internal/hostmetadata/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package hostmetadata + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/signalfxexporter/internal/metadata/generated_status.go b/exporter/signalfxexporter/internal/metadata/generated_status.go index 5b483082c64c..574ac42ee36d 100644 --- a/exporter/signalfxexporter/internal/metadata/generated_status.go +++ b/exporter/signalfxexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("signalfx") ) const ( - Type = "signalfx" TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/signalfx") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/signalfx") +} diff --git a/exporter/signalfxexporter/internal/translation/converter.go b/exporter/signalfxexporter/internal/translation/converter.go index 7f704d9f8893..9a63c8815e12 100644 --- a/exporter/signalfxexporter/internal/translation/converter.go +++ b/exporter/signalfxexporter/internal/translation/converter.go @@ -36,6 +36,7 @@ type MetricsConverter struct { datapointValidator *datapointValidator translator *signalfx.FromTranslator dropHistogramBuckets bool + processHistograms bool } // NewMetricsConverter creates a MetricsConverter from the passed in logger and @@ -47,7 +48,8 @@ func NewMetricsConverter( excludes []dpfilters.MetricFilter, includes []dpfilters.MetricFilter, nonAlphanumericDimChars string, - dropHistogramBuckets bool) (*MetricsConverter, error) { + dropHistogramBuckets bool, + processHistograms bool) (*MetricsConverter, error) { fs, err := dpfilters.NewFilterSet(excludes, includes) if err != nil { return nil, err @@ -59,11 +61,13 @@ func NewMetricsConverter( datapointValidator: newDatapointValidator(logger, nonAlphanumericDimChars), translator: &signalfx.FromTranslator{}, dropHistogramBuckets: dropHistogramBuckets, + processHistograms: processHistograms, }, nil } -// MetricsToSignalFxV2 converts the passed in MetricsData to SFx datapoints, -// returning those datapoints and the number of time series that had to be +// MetricsToSignalFxV2 converts the passed in MetricsData to SFx datapoints +// and if processHistograms is set, histogram metrics are not converted to SFx format. +// It returns those datapoints and the number of time series that had to be // dropped because of errors or warnings. func (c *MetricsConverter) MetricsToSignalFxV2(md pmetric.Metrics) []*sfxpb.DataPoint { var sfxDataPoints []*sfxpb.DataPoint @@ -77,7 +81,7 @@ func (c *MetricsConverter) MetricsToSignalFxV2(md pmetric.Metrics) []*sfxpb.Data var initialDps []*sfxpb.DataPoint for k := 0; k < ilm.Metrics().Len(); k++ { currentMetric := ilm.Metrics().At(k) - dps := c.translator.FromMetric(currentMetric, extraDimensions, c.dropHistogramBuckets) + dps := c.translator.FromMetric(currentMetric, extraDimensions, c.dropHistogramBuckets, c.processHistograms) initialDps = append(initialDps, dps...) } diff --git a/exporter/signalfxexporter/internal/translation/converter_test.go b/exporter/signalfxexporter/internal/translation/converter_test.go index f2f8457c7457..13c5fc711462 100644 --- a/exporter/signalfxexporter/internal/translation/converter_test.go +++ b/exporter/signalfxexporter/internal/translation/converter_test.go @@ -603,7 +603,7 @@ func Test_MetricDataToSignalFxV2(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - c, err := NewMetricsConverter(logger, nil, tt.excludeMetrics, tt.includeMetrics, "", true) + c, err := NewMetricsConverter(logger, nil, tt.excludeMetrics, tt.includeMetrics, "", true, true) require.NoError(t, err) md := tt.metricsFn() gotSfxDataPoints := c.MetricsToSignalFxV2(md) @@ -832,7 +832,7 @@ func Test_MetricDataToSignalFxV2WithHistogramBuckets(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - c, err := NewMetricsConverter(logger, nil, tt.excludeMetrics, tt.includeMetrics, "", false) + c, err := NewMetricsConverter(logger, nil, tt.excludeMetrics, tt.includeMetrics, "", false, true) require.NoError(t, err) md := tt.metricsFn() gotSfxDataPoints := c.MetricsToSignalFxV2(md) @@ -982,7 +982,7 @@ func Test_MetricDataToSignalFxV2WithHistogramBuckets(t *testing.T) { for _, tt := range testsWithDropHistogramBuckets { t.Run(tt.name, func(t *testing.T) { - c, err := NewMetricsConverter(logger, nil, tt.excludeMetrics, tt.includeMetrics, "", true) + c, err := NewMetricsConverter(logger, nil, tt.excludeMetrics, tt.includeMetrics, "", true, true) require.NoError(t, err) md := tt.metricsFn() gotSfxDataPoints := c.MetricsToSignalFxV2(md) @@ -994,6 +994,110 @@ func Test_MetricDataToSignalFxV2WithHistogramBuckets(t *testing.T) { assert.Equal(t, tt.wantSfxDataPoints, gotSfxDataPoints) }) } + + testsWithProcessHistogramsFalse := []struct { + name string + metricsFn func() pmetric.Metrics + excludeMetrics []dpfilters.MetricFilter + includeMetrics []dpfilters.MetricFilter + wantCount int + wantSfxDataPoints []*sfxpb.DataPoint + }{ + { + name: "no_histograms", + metricsFn: func() pmetric.Metrics { + out := pmetric.NewMetrics() + ilm := out.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty() + { + m := ilm.Metrics().AppendEmpty() + m.SetName("gauge_int_with_dims") + initInt64PtWithLabels(m.SetEmptyGauge().DataPoints().AppendEmpty()) + } + { + m := ilm.Metrics().AppendEmpty() + m.SetName("cumulative_double_with_dims") + m.SetEmptySum().SetIsMonotonic(true) + initDoublePtWithLabels(m.Sum().DataPoints().AppendEmpty()) + } + return out + }, + wantCount: 2, + wantSfxDataPoints: []*sfxpb.DataPoint{ + int64SFxDataPoint("gauge_int_with_dims", &sfxMetricTypeGauge, labelMap), + doubleSFxDataPoint("cumulative_double_with_dims", &sfxMetricTypeCumulativeCounter, labelMap), + }, + }, + { + name: "only_histograms", + metricsFn: func() pmetric.Metrics { + out := pmetric.NewMetrics() + ilm := out.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty() + { + m := ilm.Metrics().AppendEmpty() + m.SetName("histo_with_buckets") + initHistDP(m.SetEmptyHistogram().DataPoints().AppendEmpty()) + } + { + m := ilm.Metrics().AppendEmpty() + m.SetName("histo_with_buckets_2") + initHistDP(m.SetEmptyHistogram().DataPoints().AppendEmpty()) + } + return out + }, + wantCount: 0, + wantSfxDataPoints: []*sfxpb.DataPoint(nil), + }, + { + name: "mixed_with_histograms", + metricsFn: func() pmetric.Metrics { + out := pmetric.NewMetrics() + ilm := out.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty() + { + m := ilm.Metrics().AppendEmpty() + m.SetName("gauge_int_with_dims") + initInt64PtWithLabels(m.SetEmptyGauge().DataPoints().AppendEmpty()) + } + { + m := ilm.Metrics().AppendEmpty() + m.SetName("cumulative_double_with_dims") + m.SetEmptySum().SetIsMonotonic(true) + initDoublePtWithLabels(m.Sum().DataPoints().AppendEmpty()) + } + { + m := ilm.Metrics().AppendEmpty() + m.SetName("histo_with_no_buckets") + initHistDPNoBuckets(m.SetEmptyHistogram().DataPoints().AppendEmpty()) + } + { + m := ilm.Metrics().AppendEmpty() + m.SetName("histo_with_buckets") + initHistDP(m.SetEmptyHistogram().DataPoints().AppendEmpty()) + } + return out + }, + wantCount: 2, + wantSfxDataPoints: []*sfxpb.DataPoint{ + int64SFxDataPoint("gauge_int_with_dims", &sfxMetricTypeGauge, labelMap), + doubleSFxDataPoint("cumulative_double_with_dims", &sfxMetricTypeCumulativeCounter, labelMap), + }, + }, + } + + for _, tt := range testsWithProcessHistogramsFalse { + t.Run(tt.name, func(t *testing.T) { + c, err := NewMetricsConverter(logger, nil, tt.excludeMetrics, tt.includeMetrics, "", true, false) + require.NoError(t, err) + md := tt.metricsFn() + gotSfxDataPoints := c.MetricsToSignalFxV2(md) + + // Sort SFx dimensions since they are built from maps and the order + // of those is not deterministic. + sortDimensions(tt.wantSfxDataPoints) + sortDimensions(gotSfxDataPoints) + assert.Equal(t, tt.wantCount, len(gotSfxDataPoints)) + assert.Equal(t, tt.wantSfxDataPoints, gotSfxDataPoints) + }) + } } func TestMetricDataToSignalFxV2WithTranslation(t *testing.T) { @@ -1030,7 +1134,7 @@ func TestMetricDataToSignalFxV2WithTranslation(t *testing.T) { }, }, } - c, err := NewMetricsConverter(zap.NewNop(), translator, nil, nil, "", false) + c, err := NewMetricsConverter(zap.NewNop(), translator, nil, nil, "", false, true) require.NoError(t, err) assert.EqualValues(t, expected, c.MetricsToSignalFxV2(md)) } @@ -1069,7 +1173,7 @@ func TestDimensionKeyCharsWithPeriod(t *testing.T) { }, }, } - c, err := NewMetricsConverter(zap.NewNop(), translator, nil, nil, "_-.", false) + c, err := NewMetricsConverter(zap.NewNop(), translator, nil, nil, "_-.", false, true) require.NoError(t, err) assert.EqualValues(t, expected, c.MetricsToSignalFxV2(md)) @@ -1087,7 +1191,7 @@ func TestInvalidNumberOfDimensions(t *testing.T) { for i := 0; i < 10; i++ { dp.Attributes().PutStr(fmt.Sprint("dim_key_", i), fmt.Sprint("dim_val_", i)) } - c, err := NewMetricsConverter(logger, nil, nil, nil, "_-.", false) + c, err := NewMetricsConverter(logger, nil, nil, nil, "_-.", false, true) require.NoError(t, err) assert.EqualValues(t, 1, len(c.MetricsToSignalFxV2(md))) // No log message should be printed @@ -1193,7 +1297,7 @@ func TestNewMetricsConverter(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := NewMetricsConverter(zap.NewNop(), nil, tt.excludes, nil, "", false) + got, err := NewMetricsConverter(zap.NewNop(), nil, tt.excludes, nil, "", false, true) if tt.wantErr { assert.Error(t, err) return @@ -1253,7 +1357,7 @@ func TestMetricsConverter_ConvertDimension(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - c, err := NewMetricsConverter(zap.NewNop(), tt.fields.metricTranslator, nil, nil, tt.fields.nonAlphanumericDimChars, false) + c, err := NewMetricsConverter(zap.NewNop(), tt.fields.metricTranslator, nil, nil, tt.fields.nonAlphanumericDimChars, false, true) require.NoError(t, err) if got := c.ConvertDimension(tt.args.dim); got != tt.want { t.Errorf("ConvertDimension() = %v, want %v", got, tt.want) diff --git a/exporter/signalfxexporter/internal/translation/dpfilters/dimensions_test.go b/exporter/signalfxexporter/internal/translation/dpfilters/dimensions_test.go index 96e31b554123..223b34fa1767 100644 --- a/exporter/signalfxexporter/internal/translation/dpfilters/dimensions_test.go +++ b/exporter/signalfxexporter/internal/translation/dpfilters/dimensions_test.go @@ -122,9 +122,9 @@ func TestDimensionsFilter(t *testing.T) { t.Run(test.name, func(t *testing.T) { f, err := newDimensionsFilter(test.filter) if test.shouldError { - require.NotNil(t, err) + require.Error(t, err) } else { - require.Nil(t, err) + require.NoError(t, err) } require.Equal(t, test.shouldMatch, f.Matches(test.input)) diff --git a/exporter/signalfxexporter/internal/translation/dpfilters/package_test.go b/exporter/signalfxexporter/internal/translation/dpfilters/package_test.go new file mode 100644 index 000000000000..1275a6708a52 --- /dev/null +++ b/exporter/signalfxexporter/internal/translation/dpfilters/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package dpfilters + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/signalfxexporter/internal/translation/dpfilters/propertyfilter_test.go b/exporter/signalfxexporter/internal/translation/dpfilters/propertyfilter_test.go index b66a687820d5..736bb856960d 100644 --- a/exporter/signalfxexporter/internal/translation/dpfilters/propertyfilter_test.go +++ b/exporter/signalfxexporter/internal/translation/dpfilters/propertyfilter_test.go @@ -72,7 +72,7 @@ property_value: '!/property.value/'`, cm := confmap.NewFromStringMap(conf) pf := &PropertyFilter{} - err = cm.Unmarshal(pf, confmap.WithErrorUnused()) + err = cm.Unmarshal(pf) if test.expectedError != "" { require.EqualError(t, err, test.expectedError) } else { diff --git a/exporter/signalfxexporter/internal/translation/dpfilters/string_test.go b/exporter/signalfxexporter/internal/translation/dpfilters/string_test.go index 8e23aff35939..efdede79d77c 100644 --- a/exporter/signalfxexporter/internal/translation/dpfilters/string_test.go +++ b/exporter/signalfxexporter/internal/translation/dpfilters/string_test.go @@ -149,9 +149,9 @@ func TestStringFilter(t *testing.T) { t.Run(test.name, func(t *testing.T) { f, err := NewStringFilter(test.filter) if test.shouldError { - assert.NotNil(t, err) + assert.Error(t, err) } else { - assert.Nil(t, err) + assert.NoError(t, err) } for i := range test.inputs { assert.Equal(t, test.shouldMatch[i], f.Matches(test.inputs[i])) diff --git a/exporter/signalfxexporter/internal/translation/translator_test.go b/exporter/signalfxexporter/internal/translation/translator_test.go index 288f2d500336..10f8c0281dd7 100644 --- a/exporter/signalfxexporter/internal/translation/translator_test.go +++ b/exporter/signalfxexporter/internal/translation/translator_test.go @@ -2960,7 +2960,7 @@ func testConverter(t *testing.T, mapping map[string]string) *MetricsConverter { tr, err := NewMetricTranslator(rules, 1) require.NoError(t, err) - c, err := NewMetricsConverter(zap.NewNop(), tr, nil, nil, "", false) + c, err := NewMetricsConverter(zap.NewNop(), tr, nil, nil, "", false, true) require.NoError(t, err) return c } diff --git a/exporter/signalfxexporter/internal/utils/histogram_utils.go b/exporter/signalfxexporter/internal/utils/histogram_utils.go new file mode 100644 index 000000000000..42f520237c79 --- /dev/null +++ b/exporter/signalfxexporter/internal/utils/histogram_utils.go @@ -0,0 +1,138 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package utils // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/utils" + +import ( + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk" +) + +// removeAccessToken removes the SFX access token label if found in the give resource metric as a resource attribute +func removeAccessToken(dest pmetric.ResourceMetrics) { + dest.Resource().Attributes().RemoveIf(func(k string, _ pcommon.Value) bool { + return k == splunk.SFxAccessTokenLabel + }) +} + +// matchedHistogramResourceMetrics returns a map with the keys set to the index of resource Metrics containing +// Histogram metric type. +// The value is another map consisting of the ScopeMetric indices in the RM which contain Histogram metric type as keys +// and the value as an int slice with indices of the Histogram metric within the given scope. +// Example output {1: {1: [0,2]}}. +// The above output can be interpreted as Resource at index 1 contains Histogram metrics. +// Within this resource specifically the scope metric at index 1 contain Histograms. +// Lastly, the scope metric at index 1 has two Histogram type metric which can be found at index 0 and 2. +func matchedHistogramResourceMetrics(md pmetric.Metrics) (matchedRMIdx map[int]map[int][]int) { + rms := md.ResourceMetrics() + for i := 0; i < rms.Len(); i++ { + rm := rms.At(i) + matchedSMIdx := matchedHistogramScopeMetrics(rm) + if len(matchedSMIdx) > 0 { + if matchedRMIdx == nil { + matchedRMIdx = map[int]map[int][]int{} + } + matchedRMIdx[i] = matchedSMIdx + } + } + return +} + +// matchedHistogramScopeMetrics returns a map with keys equal to the ScopeMetric indices in the input resource metric +// which contain Histogram metric type. +// And the value is an int slice with indices of the Histogram metric within the keyed scope metric. +// Example output {1: [0,2]}. +// The above output can be interpreted as scope metrics at index 1 contains Histogram metrics. +// And that the scope metric at index 1 has two Histogram type metric which can be found at index 0 and 2. +func matchedHistogramScopeMetrics(rm pmetric.ResourceMetrics) (matchedSMIdx map[int][]int) { + ilms := rm.ScopeMetrics() + for i := 0; i < ilms.Len(); i++ { + ilm := ilms.At(i) + matchedMetricsIdx := matchedHistogramMetrics(ilm) + if len(matchedMetricsIdx) > 0 { + if matchedSMIdx == nil { + matchedSMIdx = map[int][]int{} + } + matchedSMIdx[i] = matchedMetricsIdx + } + } + return +} + +// matchedHistogramMetrics returns an int slice with indices of metrics which are of Histogram type +// within the input scope metric. +// Example output [0,2]. +// The above output can be interpreted as input scope metric has Histogram type metric at index 0 and 2. +func matchedHistogramMetrics(ilm pmetric.ScopeMetrics) (matchedMetricsIdx []int) { + ms := ilm.Metrics() + for i := 0; i < ms.Len(); i++ { + metric := ms.At(i) + if metric.Type() == pmetric.MetricTypeHistogram { + matchedMetricsIdx = append(matchedMetricsIdx, i) + } + } + return +} + +// GetHistograms returns new Metrics slice containing only Histogram metrics found in the input +// and the count of histogram metrics +func GetHistograms(md pmetric.Metrics) (pmetric.Metrics, int) { + matchedMetricsIdxes := matchedHistogramResourceMetrics(md) + matchedRmCount := len(matchedMetricsIdxes) + if matchedRmCount == 0 { + return pmetric.Metrics{}, 0 + } + + metricCount := 0 + srcRms := md.ResourceMetrics() + dest := pmetric.NewMetrics() + dstRms := dest.ResourceMetrics() + dstRms.EnsureCapacity(matchedRmCount) + + // Iterate over those ResourceMetrics which were found to contain histograms + for rmIdx, ilmMap := range matchedMetricsIdxes { + srcRm := srcRms.At(rmIdx) + + // Copy resource metric properties to dest + destRm := dstRms.AppendEmpty() + srcRm.Resource().CopyTo(destRm.Resource()) + destRm.SetSchemaUrl(srcRm.SchemaUrl()) + + // Remove Sfx access token + removeAccessToken(destRm) + + matchedIlmCount := len(ilmMap) + destIlms := destRm.ScopeMetrics() + destIlms.EnsureCapacity(matchedIlmCount) + srcIlms := srcRm.ScopeMetrics() + + // Iterate over ScopeMetrics which were found to contain histograms + for ilmIdx, metricIdxes := range ilmMap { + srcIlm := srcIlms.At(ilmIdx) + + // Copy scope properties to dest + destIlm := destIlms.AppendEmpty() + srcIlm.Scope().CopyTo(destIlm.Scope()) + destIlm.SetSchemaUrl(srcIlm.SchemaUrl()) + + matchedMetricCount := len(metricIdxes) + destMs := destIlm.Metrics() + destMs.EnsureCapacity(matchedMetricCount) + srcMs := srcIlm.Metrics() + + // Iterate over Metrics which contain histograms + for _, srcIdx := range metricIdxes { + srcMetric := srcMs.At(srcIdx) + + // Copy metric properties to dest + destMetric := destMs.AppendEmpty() + srcMetric.CopyTo(destMetric) + metricCount++ + } + } + } + + return dest, metricCount +} diff --git a/exporter/signalfxexporter/internal/utils/histogram_utils_test.go b/exporter/signalfxexporter/internal/utils/histogram_utils_test.go new file mode 100644 index 000000000000..03d7f366a2c9 --- /dev/null +++ b/exporter/signalfxexporter/internal/utils/histogram_utils_test.go @@ -0,0 +1,337 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package utils + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest/pmetrictest" +) + +func initMetric(m pmetric.Metric, name string, ty pmetric.MetricType) { + m.SetName(name) + m.SetDescription("") + m.SetUnit("1") + switch ty { + case pmetric.MetricTypeGauge: + m.SetEmptyGauge() + case pmetric.MetricTypeSum: + sum := m.SetEmptySum() + sum.SetIsMonotonic(true) + sum.SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + case pmetric.MetricTypeHistogram: + histo := m.SetEmptyHistogram() + histo.SetAggregationTemporality(pmetric.AggregationTemporalityDelta) + case pmetric.MetricTypeExponentialHistogram: + histo := m.SetEmptyExponentialHistogram() + histo.SetAggregationTemporality(pmetric.AggregationTemporalityDelta) + case pmetric.MetricTypeSummary: + m.SetEmptySummary() + } +} + +func buildHistogramDP(dp pmetric.HistogramDataPoint, timestamp pcommon.Timestamp) { + dp.SetStartTimestamp(timestamp) + dp.SetTimestamp(timestamp) + dp.SetMin(1.0) + dp.SetMax(2) + dp.SetCount(5) + dp.SetSum(7.0) + dp.BucketCounts().FromRaw([]uint64{3, 2}) + dp.ExplicitBounds().FromRaw([]float64{1, 2}) + dp.Attributes().PutStr("k1", "v1") +} + +func buildHistogram(im pmetric.Metric, name string, timestamp pcommon.Timestamp, dpCount int) { + initMetric(im, name, pmetric.MetricTypeHistogram) + idps := im.Histogram().DataPoints() + idps.EnsureCapacity(dpCount) + + for i := 0; i < dpCount; i++ { + dp := idps.AppendEmpty() + buildHistogramDP(dp, timestamp) + } +} + +func buildGauge(im pmetric.Metric, name string, timestamp pcommon.Timestamp, dpCount int) { + initMetric(im, name, pmetric.MetricTypeGauge) + idps := im.Gauge().DataPoints() + idps.EnsureCapacity(dpCount) + + for i := 0; i < dpCount; i++ { + dp := idps.AppendEmpty() + dp.SetTimestamp(timestamp) + dp.SetDoubleValue(1000) + dp.Attributes().PutStr("k1", "v1") + } +} + +func buildSum(im pmetric.Metric, name string, timestamp pcommon.Timestamp, dpCount int) { + initMetric(im, name, pmetric.MetricTypeSum) + idps := im.Sum().DataPoints() + idps.EnsureCapacity(dpCount) + + for i := 0; i < dpCount; i++ { + dp := idps.AppendEmpty() + dp.SetStartTimestamp(timestamp) + dp.SetTimestamp(timestamp) + dp.SetIntValue(123) + dp.Attributes().PutStr("k1", "v1") + } +} + +func TestHistogramsAreRetrieved(t *testing.T) { + ts := pcommon.NewTimestampFromTime(time.Date(2024, 2, 9, 20, 26, 13, 789, time.UTC)) + tests := []struct { + name string + inMetricsFunc func() pmetric.Metrics + wantMetricCount int + wantMetrics func() pmetric.Metrics + }{ + { + name: "no_histograms", + inMetricsFunc: func() pmetric.Metrics { + out := pmetric.NewMetrics() + ilm := out.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty() + ilm.Metrics().EnsureCapacity(2) + { + m := ilm.Metrics().AppendEmpty() + buildGauge(m, "gauge", ts, 1) + } + { + m := ilm.Metrics().AppendEmpty() + buildGauge(m, "sum", ts, 1) + } + return out + }, + wantMetricCount: 0, + wantMetrics: func() pmetric.Metrics { return pmetric.Metrics{} }, + }, + { + name: "only_histograms", + inMetricsFunc: func() pmetric.Metrics { + out := pmetric.NewMetrics() + rm := out.ResourceMetrics().AppendEmpty() + res := rm.Resource() + res.Attributes().PutStr("kr0", "vr0") + ilms := rm.ScopeMetrics() + ilms.EnsureCapacity(3) + ilm := ilms.AppendEmpty() + ilm.SetSchemaUrl("Scope SchemaUrl") + ilm.Scope().Attributes().PutStr("ks0", "vs0") + ilm.Scope().SetName("Scope name") + ilm.Scope().SetVersion("Scope version") + ilm.Metrics().EnsureCapacity(2) + { + m := ilm.Metrics().AppendEmpty() + buildHistogram(m, "histogram_1", ts, 5) + } + { + m := ilm.Metrics().AppendEmpty() + buildHistogram(m, "histogram_2", ts, 1) + } + return out + }, + wantMetricCount: 2, + wantMetrics: func() pmetric.Metrics { + out := pmetric.NewMetrics() + rm := out.ResourceMetrics().AppendEmpty() + res := rm.Resource() + res.Attributes().PutStr("kr0", "vr0") + ilm := rm.ScopeMetrics().AppendEmpty() + ilm.SetSchemaUrl("Scope SchemaUrl") + ilm.Scope().Attributes().PutStr("ks0", "vs0") + ilm.Scope().SetName("Scope name") + ilm.Scope().SetVersion("Scope version") + ilm.Metrics().EnsureCapacity(2) + { + m := ilm.Metrics().AppendEmpty() + buildHistogram(m, "histogram_1", ts, 5) + } + { + m := ilm.Metrics().AppendEmpty() + buildHistogram(m, "histogram_2", ts, 1) + } + return out + }, + }, + { + name: "mixed_type_multiple_scopes", + inMetricsFunc: func() pmetric.Metrics { + out := pmetric.NewMetrics() + rm := out.ResourceMetrics().AppendEmpty() + res := rm.Resource() + res.Attributes().PutStr("kr0", "vr0") + rm.ScopeMetrics().AppendEmpty() + ilm0 := rm.ScopeMetrics().At(0) + ilm0.SetSchemaUrl("Scope SchemaUrl s0") + ilm0.Scope().Attributes().PutStr("ks0", "vs0") + ilm0.Scope().SetName("Scope name s0") + ilm0.Scope().SetVersion("Scope version s0") + ilm0.Metrics().EnsureCapacity(2) + ilm0.Metrics().AppendEmpty() + buildHistogram(ilm0.Metrics().At(0), "histogram_1_s0", ts, 1) + ilm0.Metrics().AppendEmpty() + buildGauge(ilm0.Metrics().At(1), "gauge_s0", ts, 2) + + rm.ScopeMetrics().AppendEmpty() + ilm1 := rm.ScopeMetrics().At(1) + ilm1.Metrics().AppendEmpty() + buildSum(ilm1.Metrics().At(0), "gauge_s1", ts, 2) + + rm.ScopeMetrics().AppendEmpty() + ilm2 := rm.ScopeMetrics().At(2) + ilm2.SetSchemaUrl("Scope SchemaUrl s2") + ilm2.Scope().Attributes().PutStr("ks2", "vs2") + ilm2.Metrics().EnsureCapacity(2) + ilm2.Metrics().AppendEmpty() + buildHistogram(ilm2.Metrics().At(0), "histogram_1_s2", ts, 1) + ilm2.Metrics().AppendEmpty() + buildHistogram(ilm2.Metrics().At(1), "histogram_2_s2", ts, 2) + return out + }, + wantMetricCount: 3, + wantMetrics: func() pmetric.Metrics { + out := pmetric.NewMetrics() + rm := out.ResourceMetrics().AppendEmpty() + res := rm.Resource() + res.Attributes().PutStr("kr0", "vr0") + rm.ScopeMetrics().AppendEmpty() + ilm0 := rm.ScopeMetrics().At(0) + ilm0.SetSchemaUrl("Scope SchemaUrl s0") + ilm0.Scope().Attributes().PutStr("ks0", "vs0") + ilm0.Scope().SetName("Scope name s0") + ilm0.Scope().SetVersion("Scope version s0") + buildHistogram(ilm0.Metrics().AppendEmpty(), "histogram_1_s0", ts, 1) + + rm.ScopeMetrics().AppendEmpty() + ilm1 := rm.ScopeMetrics().At(1) + ilm1.SetSchemaUrl("Scope SchemaUrl s2") + ilm1.Scope().Attributes().PutStr("ks2", "vs2") + ilm1.Metrics().EnsureCapacity(2) + ilm1.Metrics().AppendEmpty() + buildHistogram(ilm1.Metrics().At(0), "histogram_1_s2", ts, 1) + ilm1.Metrics().AppendEmpty() + buildHistogram(ilm1.Metrics().At(1), "histogram_2_s2", ts, 2) + return out + }}, + { + name: "mixed_type_multiple_resources", + inMetricsFunc: func() pmetric.Metrics { + out := pmetric.NewMetrics() + out.ResourceMetrics().EnsureCapacity(3) + out.ResourceMetrics().AppendEmpty() + rm0 := out.ResourceMetrics().At(0) + rm0.SetSchemaUrl("Resource SchemaUrl r0") + rm0.Resource().Attributes().PutStr("kr0", "vr0") + rm0.ScopeMetrics().AppendEmpty() + ilm0r0 := rm0.ScopeMetrics().At(0) + ilm0r0.SetSchemaUrl("Scope SchemaUrl s0") + ilm0r0.Scope().Attributes().PutStr("ks0", "vs0") + ilm0r0.Metrics().EnsureCapacity(2) + ilm0r0.Metrics().AppendEmpty() + buildHistogram(ilm0r0.Metrics().At(0), "histogram_1_s0_r0", ts, 1) + ilm0r0.Metrics().AppendEmpty() + buildGauge(ilm0r0.Metrics().At(1), "gauge_s0_r0", ts, 1) + rm0.ScopeMetrics().AppendEmpty() + ilm1r0 := rm0.ScopeMetrics().At(1) + ilm1r0.Metrics().AppendEmpty() + buildGauge(ilm1r0.Metrics().At(0), "gauge_s1_r0", ts, 1) + + out.ResourceMetrics().AppendEmpty() + rm1 := out.ResourceMetrics().At(1) + rm1.Resource().Attributes().PutStr("kr1", "vr1") + ilm0r1 := rm1.ScopeMetrics().AppendEmpty() + ilm0r1.SetSchemaUrl("Scope SchemaUrl s0") + ilm0r1.Scope().Attributes().PutStr("ks0", "vs0") + ilm0r1.Metrics().AppendEmpty() + buildGauge(ilm0r1.Metrics().At(0), "gauge_s0_r1", ts, 1) + + out.ResourceMetrics().AppendEmpty() + rm2 := out.ResourceMetrics().At(2) + rm2.Resource().Attributes().PutStr("kr2", "vr2") + ilm0r2 := rm2.ScopeMetrics().AppendEmpty() + ilm0r2.SetSchemaUrl("Scope SchemaUrl s0") + ilm0r2.Scope().Attributes().PutStr("ks0", "vs0") + ilm0r2.Metrics().AppendEmpty() + ilm0r2.Metrics().EnsureCapacity(2) + buildGauge(ilm0r2.Metrics().At(0), "gauge_s0_r2", ts, 1) + ilm0r2.Metrics().AppendEmpty() + buildHistogram(ilm0r2.Metrics().At(1), "histogram_s0_r2", ts, 1) + + return out + }, + wantMetricCount: 2, + wantMetrics: func() pmetric.Metrics { + out := pmetric.NewMetrics() + out.ResourceMetrics().AppendEmpty() + rm := out.ResourceMetrics().At(0) + rm.SetSchemaUrl("Resource SchemaUrl r0") + rm.Resource().Attributes().PutStr("kr0", "vr0") + rm.ScopeMetrics().AppendEmpty() + ilm0 := rm.ScopeMetrics().At(0) + ilm0.SetSchemaUrl("Scope SchemaUrl s0") + ilm0.Scope().Attributes().PutStr("ks0", "vs0") + ilm0.Metrics().EnsureCapacity(1) + ilm0.Metrics().AppendEmpty() + buildHistogram(ilm0.Metrics().At(0), "histogram_1_s0_r0", ts, 1) + + out.ResourceMetrics().AppendEmpty() + rm1 := out.ResourceMetrics().At(1) + rm1.Resource().Attributes().PutStr("kr2", "vr2") + ilm0r1 := rm1.ScopeMetrics().AppendEmpty() + ilm0r1.SetSchemaUrl("Scope SchemaUrl s0") + ilm0r1.Scope().Attributes().PutStr("ks0", "vs0") + ilm0r1.Metrics().AppendEmpty() + buildHistogram(ilm0r1.Metrics().At(0), "histogram_s0_r2", ts, 1) + + return out + }}, + { + name: "remove_access_token", + inMetricsFunc: func() pmetric.Metrics { + out := pmetric.NewMetrics() + rm := out.ResourceMetrics().AppendEmpty() + res := rm.Resource() + res.Attributes().PutStr("kr0", "vr0") + res.Attributes().PutStr("com.splunk.signalfx.access_token", "abcd") + ilms := rm.ScopeMetrics() + ilm := ilms.AppendEmpty() + buildHistogram(ilm.Metrics().AppendEmpty(), "histogram_1", ts, 1) + return out + }, + wantMetricCount: 1, + wantMetrics: func() pmetric.Metrics { + out := pmetric.NewMetrics() + rm := out.ResourceMetrics().AppendEmpty() + res := rm.Resource() + res.Attributes().PutStr("kr0", "vr0") + ilms := rm.ScopeMetrics() + ilm := ilms.AppendEmpty() + buildHistogram(ilm.Metrics().AppendEmpty(), "histogram_1", ts, 1) + return out + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + md := tt.inMetricsFunc() + gotMetrics, gotCount := GetHistograms(md) + assert.Equal(t, tt.wantMetricCount, gotCount) + if tt.wantMetricCount == 0 { + assert.Equal(t, tt.wantMetrics(), gotMetrics) + } else { + err := pmetrictest.CompareMetrics(tt.wantMetrics(), gotMetrics, + pmetrictest.IgnoreResourceMetricsOrder(), pmetrictest.IgnoreScopeMetricsOrder()) + assert.NoError(t, err) + } + }) + } +} diff --git a/exporter/signalfxexporter/metadata.yaml b/exporter/signalfxexporter/metadata.yaml index 777f6c51b5ce..7e11fe3224ed 100644 --- a/exporter/signalfxexporter/metadata.yaml +++ b/exporter/signalfxexporter/metadata.yaml @@ -1,9 +1,20 @@ type: signalfx +scope_name: otelcol/signalfx status: class: exporter stability: beta: [traces, metrics, logs] - distributions: [contrib, splunk, observiq, aws] + distributions: [contrib] codeowners: active: [dmitryax, crobert-1] +tests: + config: + access_token: "my_fake_token" + ingest_url: "http://localhost:1234" + api_url: "http://localhost:1234" + sending_queue: + enabled: false + retry_on_failure: + enabled: false + expect_consumer_error: true diff --git a/exporter/signalfxexporter/testdata/config.yaml b/exporter/signalfxexporter/testdata/config.yaml index d82534b51563..edc8f0d9765b 100644 --- a/exporter/signalfxexporter/testdata/config.yaml +++ b/exporter/signalfxexporter/testdata/config.yaml @@ -79,3 +79,4 @@ signalfx/allsettings: property_value: '!globbed*value' dimension_name: globbed* dimension_value: '!globbed*value' + send_otlp_histograms: true diff --git a/exporter/skywalkingexporter/README.md b/exporter/skywalkingexporter/README.md index 86859e0f0194..8168be3a5919 100644 --- a/exporter/skywalkingexporter/README.md +++ b/exporter/skywalkingexporter/README.md @@ -3,12 +3,13 @@ | Status | | | ------------- |-----------| -| Stability | [beta]: metrics, logs | +| Stability | [unmaintained]: metrics, logs | | Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fskywalking%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fskywalking) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fskywalking%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fskywalking) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@liqiangz](https://www.github.com/liqiangz) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | | +| Emeritus | [@liqiangz](https://www.github.com/liqiangz) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[unmaintained]: https://github.com/open-telemetry/opentelemetry-collector#unmaintained [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/exporter/skywalkingexporter/config.go b/exporter/skywalkingexporter/config.go index 33da44d12b6b..dbe20d0c43bf 100644 --- a/exporter/skywalkingexporter/config.go +++ b/exporter/skywalkingexporter/config.go @@ -8,14 +8,15 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configgrpc" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) // Config defines configuration for SkyWalking exporter. type Config struct { - configgrpc.GRPCClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + configgrpc.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. // The number of grpc streams that send the gRPC requests. diff --git a/exporter/skywalkingexporter/config_test.go b/exporter/skywalkingexporter/config_test.go index 17622d35ee30..5f28d24bccb9 100644 --- a/exporter/skywalkingexporter/config_test.go +++ b/exporter/skywalkingexporter/config_test.go @@ -14,6 +14,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -41,7 +42,7 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "2"), expected: &Config{ - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, MaxInterval: 1 * time.Minute, @@ -57,7 +58,7 @@ func TestLoadConfig(t *testing.T) { TimeoutSettings: exporterhelper.TimeoutSettings{ Timeout: 10 * time.Second, }, - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Headers: map[string]configopaque.String{ "can you have a . here?": "F0000000-0000-0000-0000-000000000000", "header1": "234", @@ -65,8 +66,8 @@ func TestLoadConfig(t *testing.T) { }, Endpoint: "1.2.3.4:11800", Compression: "gzip", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "/var/lib/mycert.pem", }, Insecure: false, @@ -101,7 +102,7 @@ func TestLoadConfig(t *testing.T) { func TestValidate(t *testing.T) { c1 := &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: "", }, NumStreams: 3, @@ -109,7 +110,7 @@ func TestValidate(t *testing.T) { err := c1.Validate() assert.Error(t, err) c2 := &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: "", }, NumStreams: 0, diff --git a/exporter/skywalkingexporter/factory.go b/exporter/skywalkingexporter/factory.go index 8f42d5779907..61f1758e8d32 100644 --- a/exporter/skywalkingexporter/factory.go +++ b/exporter/skywalkingexporter/factory.go @@ -8,6 +8,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configgrpc" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -26,10 +27,10 @@ func NewFactory() exporter.Factory { func createDefaultConfig() component.Config { return &Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ // We almost read 0 bytes, so no need to tune ReadBufferSize. WriteBufferSize: 512 * 1024, }, @@ -50,7 +51,7 @@ func createLogsExporter( cfg, oce.pushLogs, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), - exporterhelper.WithRetry(oCfg.RetrySettings), + exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), exporterhelper.WithTimeout(oCfg.TimeoutSettings), exporterhelper.WithStart(oce.start), @@ -67,7 +68,7 @@ func createMetricsExporter(ctx context.Context, set exporter.CreateSettings, cfg cfg, oce.pushMetrics, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), - exporterhelper.WithRetry(oCfg.RetrySettings), + exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), exporterhelper.WithTimeout(oCfg.TimeoutSettings), exporterhelper.WithStart(oce.start), diff --git a/exporter/skywalkingexporter/factory_test.go b/exporter/skywalkingexporter/factory_test.go index 65e064085478..948dc6b5d65d 100644 --- a/exporter/skywalkingexporter/factory_test.go +++ b/exporter/skywalkingexporter/factory_test.go @@ -37,9 +37,9 @@ func TestCreateTracesExporter(t *testing.T) { { name: "UseSecure", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: false, }, }, @@ -49,7 +49,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "Keepalive", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, Keepalive: &configgrpc.KeepaliveClientConfig{ Time: 30 * time.Second, @@ -63,7 +63,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "Compression", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, Compression: "gzip", }, @@ -73,7 +73,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "Headers", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, Headers: map[string]configopaque.String{ "hdr1": "val1", @@ -86,7 +86,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "CompressionError", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, Compression: "unknown compression", }, @@ -98,10 +98,10 @@ func TestCreateTracesExporter(t *testing.T) { { name: "CaCert", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "testdata/test_cert.pem", }, Insecure: false, @@ -113,10 +113,10 @@ func TestCreateTracesExporter(t *testing.T) { { name: "CertPemFileError", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "nosuchfile", }, }, @@ -141,7 +141,7 @@ func TestCreateTracesExporter(t *testing.T) { func checkErrorsAndStartAndShutdown(t *testing.T, exporter component.Component, err error, mustFailOnCreate, mustFailOnStart bool) { if mustFailOnCreate { - assert.NotNil(t, err) + assert.Error(t, err) return } assert.NoError(t, err) diff --git a/exporter/skywalkingexporter/generated_component_test.go b/exporter/skywalkingexporter/generated_component_test.go new file mode 100644 index 000000000000..1827d9cf9e4f --- /dev/null +++ b/exporter/skywalkingexporter/generated_component_test.go @@ -0,0 +1,94 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package skywalkingexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/skywalkingexporter/go.mod b/exporter/skywalkingexporter/go.mod index ec9d0226227f..b9fcb4219fab 100644 --- a/exporter/skywalkingexporter/go.mod +++ b/exporter/skywalkingexporter/go.mod @@ -1,70 +1,77 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter -go 1.20 +go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.1 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configgrpc v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - google.golang.org/grpc v1.59.0 - skywalking.apache.org/repo/goapi v0.0.0-20211122071111-ffc517fbfe21 + github.com/cenkalti/backoff/v4 v4.3.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configgrpc v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + google.golang.org/grpc v1.63.2 + skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4 ) require ( - cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.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.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.2 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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 - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/skywalkingexporter/go.sum b/exporter/skywalkingexporter/go.sum index 758eef2c997e..aad0e9b46422 100644 --- a/exporter/skywalkingexporter/go.sum +++ b/exporter/skywalkingexporter/go.sum @@ -1,25 +1,20 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -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= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.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/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= 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= @@ -30,22 +25,19 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/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/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -60,8 +52,6 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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= @@ -69,12 +59,14 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw 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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -88,15 +80,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -108,88 +99,96 @@ github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0b 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/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= 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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 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.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/collector v0.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/configgrpc v0.89.0/go.mod h1:2GuAxpU34a1X19kCZ8Kw3FUsxOIiFcWHiYorRCyhnCc= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -199,6 +198,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -209,15 +210,16 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +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.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -225,6 +227,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/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.1.0/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= @@ -232,16 +236,27 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w 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-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/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-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= 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.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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= @@ -254,31 +269,31 @@ golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapK 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.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 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/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.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= 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-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a h1:a2MQQVoTo96JC9PMGtGBymLp7+/RzpFc2yX/9WfFg1c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= 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.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -290,18 +305,17 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.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= 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= -skywalking.apache.org/repo/goapi v0.0.0-20211122071111-ffc517fbfe21 h1:USC28w3toXoRiNzSCN3lLgnmT8l6RokW7++GiXcNMCU= -skywalking.apache.org/repo/goapi v0.0.0-20211122071111-ffc517fbfe21/go.mod h1:4KrWd+Oi4lkB+PtxZgIlf+3T6EECPru4fOWNMEHjxRk= +skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4 h1:3YIFmsshgsU6FzHgnkG9Z24CkXkgoexBN5O0aSzK79g= +skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4/go.mod h1:oD2dxcDAHVIt95Ee7kJHgZ5f64QNhrqTjQYARwfafc4= diff --git a/exporter/skywalkingexporter/internal/metadata/generated_status.go b/exporter/skywalkingexporter/internal/metadata/generated_status.go index 1f86caa24833..5edad7ceb341 100644 --- a/exporter/skywalkingexporter/internal/metadata/generated_status.go +++ b/exporter/skywalkingexporter/internal/metadata/generated_status.go @@ -4,10 +4,23 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("skywalking") ) const ( - Type = "skywalking" - MetricsStability = component.StabilityLevelBeta - LogsStability = component.StabilityLevelBeta + MetricsStability = component.StabilityLevelUnmaintained + LogsStability = component.StabilityLevelUnmaintained ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/skywalking") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/skywalking") +} diff --git a/exporter/skywalkingexporter/metadata.yaml b/exporter/skywalkingexporter/metadata.yaml index 42c59039b459..740d109da83b 100644 --- a/exporter/skywalkingexporter/metadata.yaml +++ b/exporter/skywalkingexporter/metadata.yaml @@ -1,9 +1,14 @@ type: skywalking +scope_name: otelcol/skywalking status: class: exporter stability: - beta: [metrics, logs] + unmaintained: [metrics, logs] distributions: [contrib] codeowners: - active: [liqiangz] + active: [] + emeritus: [liqiangz] + +tests: + skip_lifecycle: true diff --git a/exporter/skywalkingexporter/skywalking.go b/exporter/skywalkingexporter/skywalking.go index 17a3cdafd0ae..a61b761fde2f 100644 --- a/exporter/skywalkingexporter/skywalking.go +++ b/exporter/skywalkingexporter/skywalking.go @@ -50,7 +50,7 @@ func newSwExporter(_ context.Context, cfg *Config, settings component.TelemetryS metadata: metadata.New(nil), settings: settings, } - for k, v := range cfg.GRPCClientSettings.Headers { + for k, v := range cfg.ClientConfig.Headers { oce.metadata.Set(k, string(v)) } return oce @@ -58,7 +58,7 @@ func newSwExporter(_ context.Context, cfg *Config, settings component.TelemetryS // start creates the gRPC client Connection func (oce *swExporter) start(ctx context.Context, host component.Host) error { - clientConn, err := oce.cfg.GRPCClientSettings.ToClientConn(ctx, host, oce.settings) + clientConn, err := oce.cfg.ClientConfig.ToClientConn(ctx, host, oce.settings) if err != nil { return err } diff --git a/exporter/skywalkingexporter/skywalking_benchmark_test.go b/exporter/skywalkingexporter/skywalking_benchmark_test.go index e8084343b62c..4a232bbb19ad 100644 --- a/exporter/skywalkingexporter/skywalking_benchmark_test.go +++ b/exporter/skywalkingexporter/skywalking_benchmark_test.go @@ -126,9 +126,9 @@ func doInit(numStream int, t *testing.T) (*swExporter, *grpc.Server, *mockLogHan NumConsumers: 1, QueueSize: 1000, }, - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: addr.String(), - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, }, @@ -141,7 +141,7 @@ func doInit(numStream int, t *testing.T) (*swExporter, *grpc.Server, *mockLogHan tt, oce.pushLogs, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), - exporterhelper.WithRetry(tt.RetrySettings), + exporterhelper.WithRetry(tt.BackOffConfig), exporterhelper.WithQueue(tt.QueueSettings), exporterhelper.WithTimeout(tt.TimeoutSettings), exporterhelper.WithStart(oce.start), diff --git a/exporter/skywalkingexporter/skywalking_test.go b/exporter/skywalkingexporter/skywalking_test.go index 7e9614ef2370..e75c957b621c 100644 --- a/exporter/skywalkingexporter/skywalking_test.go +++ b/exporter/skywalkingexporter/skywalking_test.go @@ -31,9 +31,9 @@ func TestSwExporter(t *testing.T) { server, addr, handler := initializeGRPCTestServer(t, grpc.MaxConcurrentStreams(10)) tt := &Config{ NumStreams: 10, - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: addr.String(), - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, }, @@ -46,7 +46,7 @@ func TestSwExporter(t *testing.T) { tt, oce.pushLogs, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), - exporterhelper.WithRetry(tt.RetrySettings), + exporterhelper.WithRetry(tt.BackOffConfig), exporterhelper.WithQueue(tt.QueueSettings), exporterhelper.WithTimeout(tt.TimeoutSettings), exporterhelper.WithStart(oce.start), @@ -104,9 +104,9 @@ func TestSwExporter(t *testing.T) { server, addr, handler2 := initializeGRPCTestServerMetric(t, grpc.MaxConcurrentStreams(10)) tt = &Config{ NumStreams: 10, - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: addr.String(), - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, }, @@ -119,7 +119,7 @@ func TestSwExporter(t *testing.T) { tt, oce.pushMetrics, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), - exporterhelper.WithRetry(tt.RetrySettings), + exporterhelper.WithRetry(tt.BackOffConfig), exporterhelper.WithQueue(tt.QueueSettings), exporterhelper.WithTimeout(tt.TimeoutSettings), exporterhelper.WithStart(oce.start), diff --git a/exporter/splunkhecexporter/README.md b/exporter/splunkhecexporter/README.md index e9991e0ada66..57d17eff7466 100644 --- a/exporter/splunkhecexporter/README.md +++ b/exporter/splunkhecexporter/README.md @@ -4,14 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces, metrics, logs | -| Distributions | [contrib], [observiq], [splunk] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fsplunkhec%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fsplunkhec) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fsplunkhec%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fsplunkhec) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@atoulme](https://www.github.com/atoulme), [@dmitryax](https://www.github.com/dmitryax) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector ## Configuration @@ -29,14 +27,17 @@ The following configuration options can also be configured: - `use_multi_metric_format` (default: false): Combines metrics with the same metadata to reduce ingest using the [multiple-metric JSON format](https://docs.splunk.com/Documentation/Splunk/9.0.0/Metrics/GetMetricsInOther#The_multiple-metric_JSON_format). Applicable in the `metrics` pipeline only. - `disable_compression` (default: false): Whether to disable gzip compression over HTTP. - `timeout` (default: 10s): HTTP timeout when sending data. +- `http2_read_idle_timeout` (default = 10s): Send a ping frame for a health check if the connection has been idle for the configured value. + 0s means http/2 health check will be disabled. +- `http2_ping_timeout` (default = 10s): Triggered by `http2_read_idle_timeout`; When there's no response to the ping within the configured value, + the connection will be closed. If this value is set to 0, it will default to 15s. - `insecure_skip_verify` (default: false): Whether to skip checking the certificate of the HEC endpoint when sending data over HTTPS. - `ca_file` (no default) Path to the CA cert to verify the server being connected to. - `cert_file` (no default) Path to the TLS cert to use for client connections when TLS client auth is required. - `key_file` (no default) Path to the TLS key to use for TLS required connections. - `max_content_length_logs` (default: 2097152): Maximum log payload size in bytes. Log batches of bigger size will be broken down into several requests. Default value is 2097152 bytes (2 MiB). Maximum allowed value is 838860800 - (~ 800 MB). Keep in mind that Splunk Observability backend doesn't accept requests bigger than 2 MiB. This - configuration value can be raised only if used with Splunk Core/Cloud. When set to 0, it will treat as infinite length and it will create only 1 request per batch. + (~ 800 MB). When set to 0, it will treat as infinite length and it will create only 1 request per batch. - `max_content_length_metrics` (default: 2097152): Maximum metric payload size in bytes. Metric batches of bigger size will be broken down into several requests. Default value is 2097152 bytes (2 MiB). Maximum allowed value is 838860800 (~ 800 MB). When set to 0, it will treat as infinite length and it will create only one request per batch. diff --git a/exporter/splunkhecexporter/batchperscope_test.go b/exporter/splunkhecexporter/batchperscope_test.go index f196ec7ca8a5..3608bb4ee5c3 100644 --- a/exporter/splunkhecexporter/batchperscope_test.go +++ b/exporter/splunkhecexporter/batchperscope_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package splunkhecexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr" +package splunkhecexporter import ( "context" diff --git a/exporter/splunkhecexporter/client.go b/exporter/splunkhecexporter/client.go index 074e6776642b..33d72704e99c 100644 --- a/exporter/splunkhecexporter/client.go +++ b/exporter/splunkhecexporter/client.go @@ -618,7 +618,7 @@ func (c *client) stop(context.Context) error { func (c *client) start(ctx context.Context, host component.Host) (err error) { - httpClient, err := buildHTTPClient(c.config, host, c.telemetrySettings) + httpClient, err := buildHTTPClient(ctx, c.config, host, c.telemetrySettings) if err != nil { return err } @@ -662,10 +662,10 @@ func checkHecHealth(ctx context.Context, client *http.Client, healthCheckURL *ur return nil } -func buildHTTPClient(config *Config, host component.Host, telemetrySettings component.TelemetrySettings) (*http.Client, error) { +func buildHTTPClient(ctx context.Context, config *Config, host component.Host, telemetrySettings component.TelemetrySettings) (*http.Client, error) { // we handle compression explicitly. - config.HTTPClientSettings.Compression = "" - return config.ToClient(host, telemetrySettings) + config.ClientConfig.Compression = "" + return config.ToClientContext(ctx, host, telemetrySettings) } func buildHTTPHeaders(config *Config, buildInfo component.BuildInfo) map[string]string { diff --git a/exporter/splunkhecexporter/client_test.go b/exporter/splunkhecexporter/client_test.go index ab6efdadaec3..e2943797d1ff 100644 --- a/exporter/splunkhecexporter/client_test.go +++ b/exporter/splunkhecexporter/client_test.go @@ -202,7 +202,9 @@ func (c *capturingData) ServeHTTP(w http.ResponseWriter, r *http.Request) { panic(err) } go func() { - c.receivedRequest <- receivedRequest{body, r.Header} + if c.receivedRequest != nil { + c.receivedRequest <- receivedRequest{body, r.Header} + } }() w.WriteHeader(c.statusCode) } @@ -214,7 +216,7 @@ func runMetricsExport(cfg *Config, metrics pmetric.Metrics, expectedBatchesNum i } factory := NewFactory() - cfg.HTTPClientSettings.Endpoint = "http://" + listener.Addr().String() + "/services/collector" + cfg.ClientConfig.Endpoint = "http://" + listener.Addr().String() + "/services/collector" cfg.Token = "1234-1234" cfg.UseMultiMetricFormat = useMultiMetricsFormat @@ -266,7 +268,7 @@ func runTraceExport(testConfig *Config, traces ptrace.Traces, expectedBatchesNum factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "http://" + listener.Addr().String() + "/services/collector" + cfg.ClientConfig.Endpoint = "http://" + listener.Addr().String() + "/services/collector" cfg.DisableCompression = testConfig.DisableCompression cfg.MaxContentLengthTraces = testConfig.MaxContentLengthTraces cfg.Token = "1234-1234" @@ -328,7 +330,7 @@ func runLogExport(cfg *Config, ld plog.Logs, expectedBatchesNum int, t *testing. panic(err) } - cfg.HTTPClientSettings.Endpoint = "http://" + listener.Addr().String() + "/services/collector" + cfg.ClientConfig.Endpoint = "http://" + listener.Addr().String() + "/services/collector" cfg.Token = "1234-1234" rr := make(chan receivedRequest) @@ -1266,7 +1268,7 @@ func Test_PushMetricsData_Summary_NaN_Sum(t *testing.T) { func TestReceiveMetricsWithCompression(t *testing.T) { cfg := NewFactory().CreateDefaultConfig().(*Config) cfg.MaxContentLengthMetrics = 1800 - request, err := runMetricsExport(cfg, createMetricsData(1, 100), 1, false, t) + request, err := runMetricsExport(cfg, createMetricsData(1, 100), 2, false, t) assert.NoError(t, err) assert.Equal(t, "gzip", request[0].headers.Get("Content-Encoding")) assert.NotEqual(t, "", request) @@ -1292,12 +1294,12 @@ func TestErrorReceived(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "http://" + listener.Addr().String() + "/services/collector" + cfg.ClientConfig.Endpoint = "http://" + listener.Addr().String() + "/services/collector" // Disable QueueSettings to ensure that we execute the request when calling ConsumeTraces // otherwise we will not see the error. cfg.QueueSettings.Enabled = false // Disable retries to not wait too much time for the return error. - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false cfg.DisableCompression = true cfg.Token = "1234-1234" @@ -1346,8 +1348,8 @@ func TestInvalidURL(t *testing.T) { // otherwise we will not see the error. cfg.QueueSettings.Enabled = false // Disable retries to not wait too much time for the return error. - cfg.RetrySettings.Enabled = false - cfg.HTTPClientSettings.Endpoint = "ftp://example.com:134" + cfg.BackOffConfig.Enabled = false + cfg.ClientConfig.Endpoint = "ftp://example.com:134" cfg.Token = "1234-1234" params := exportertest.NewNopCreateSettings() exporter, err := factory.CreateTracesExporter(context.Background(), params, cfg) @@ -1363,8 +1365,7 @@ func TestInvalidURL(t *testing.T) { } func TestHeartbeatStartupFailed(t *testing.T) { - rr := make(chan receivedRequest) - capture := capturingData{receivedRequest: rr, statusCode: 403} + capture := capturingData{statusCode: 403} listener, err := net.Listen("tcp", "127.0.0.1:0") if err != nil { panic(err) @@ -1381,12 +1382,12 @@ func TestHeartbeatStartupFailed(t *testing.T) { }() factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "http://" + listener.Addr().String() + "/services/collector" + cfg.ClientConfig.Endpoint = "http://" + listener.Addr().String() + "/services/collector" // Disable QueueSettings to ensure that we execute the request when calling ConsumeTraces // otherwise we will not see the error. cfg.QueueSettings.Enabled = false // Disable retries to not wait too much time for the return error. - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false cfg.DisableCompression = true cfg.Token = "1234-1234" cfg.Heartbeat.Startup = true @@ -1394,8 +1395,11 @@ 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.String()), + ) + assert.NoError(t, exporter.Shutdown(context.Background())) } func TestHeartbeatStartupPass_Disabled(t *testing.T) { @@ -1417,12 +1421,12 @@ func TestHeartbeatStartupPass_Disabled(t *testing.T) { }() factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "http://" + listener.Addr().String() + "/services/collector" + cfg.ClientConfig.Endpoint = "http://" + listener.Addr().String() + "/services/collector" // Disable QueueSettings to ensure that we execute the request when calling ConsumeTraces // otherwise we will not see the error. cfg.QueueSettings.Enabled = false // Disable retries to not wait too much time for the return error. - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false cfg.DisableCompression = true cfg.Token = "1234-1234" cfg.Heartbeat.Startup = false @@ -1431,11 +1435,11 @@ func TestHeartbeatStartupPass_Disabled(t *testing.T) { exporter, err := factory.CreateTracesExporter(context.Background(), params, cfg) assert.NoError(t, err) assert.NoError(t, exporter.Start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, exporter.Shutdown(context.Background())) } func TestHeartbeatStartupPass(t *testing.T) { - rr := make(chan receivedRequest) - capture := capturingData{receivedRequest: rr, statusCode: 200} + capture := capturingData{statusCode: 200} listener, err := net.Listen("tcp", "127.0.0.1:0") if err != nil { panic(err) @@ -1452,12 +1456,12 @@ func TestHeartbeatStartupPass(t *testing.T) { }() factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "http://" + listener.Addr().String() + "/services/collector" + cfg.ClientConfig.Endpoint = "http://" + listener.Addr().String() + "/services/collector" // Disable QueueSettings to ensure that we execute the request when calling ConsumeTraces // otherwise we will not see the error. cfg.QueueSettings.Enabled = false // Disable retries to not wait too much time for the return error. - cfg.RetrySettings.Enabled = false + cfg.BackOffConfig.Enabled = false cfg.DisableCompression = true cfg.Token = "1234-1234" cfg.Heartbeat.Startup = true @@ -1466,6 +1470,7 @@ func TestHeartbeatStartupPass(t *testing.T) { exporter, err := factory.CreateTracesExporter(context.Background(), params, cfg) assert.NoError(t, err) assert.NoError(t, exporter.Start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, exporter.Shutdown(context.Background())) } type badJSON struct { diff --git a/exporter/splunkhecexporter/config.go b/exporter/splunkhecexporter/config.go index c11a1836ae3b..9d2e73a722bc 100644 --- a/exporter/splunkhecexporter/config.go +++ b/exporter/splunkhecexporter/config.go @@ -12,6 +12,7 @@ import ( "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk" @@ -63,9 +64,9 @@ type HecTelemetry struct { // Config defines configuration for Splunk exporter. type Config struct { - confighttp.HTTPClientSettings `mapstructure:",squash"` - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + confighttp.ClientConfig `mapstructure:",squash"` + exporterhelper.QueueSettings `mapstructure:"sending_queue"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // LogDataEnabled can be used to disable sending logs by the exporter. LogDataEnabled bool `mapstructure:"log_data_enabled"` @@ -136,7 +137,7 @@ type Config struct { func (cfg *Config) getURL() (out *url.URL, err error) { - out, err = url.Parse(cfg.HTTPClientSettings.Endpoint) + out, err = url.Parse(cfg.ClientConfig.Endpoint) if err != nil { return out, err } @@ -152,7 +153,7 @@ func (cfg *Config) Validate() error { if !cfg.LogDataEnabled && !cfg.ProfilingDataEnabled { return errors.New(`either "log_data_enabled" or "profiling_data_enabled" has to be true`) } - if cfg.HTTPClientSettings.Endpoint == "" { + if cfg.ClientConfig.Endpoint == "" { return errors.New(`requires a non-empty "endpoint"`) } _, err := cfg.getURL() @@ -179,8 +180,5 @@ func (cfg *Config) Validate() error { return fmt.Errorf(`requires "max_event_size" <= %d`, maxMaxEventSize) } - if err := cfg.QueueSettings.Validate(); err != nil { - return fmt.Errorf("sending_queue settings has invalid configuration: %w", err) - } return nil } diff --git a/exporter/splunkhecexporter/config_test.go b/exporter/splunkhecexporter/config_test.go index 602e36137322..996c59a27c39 100644 --- a/exporter/splunkhecexporter/config_test.go +++ b/exporter/splunkhecexporter/config_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -30,7 +31,7 @@ func TestLoadConfig(t *testing.T) { // Endpoint and Token do not have a default value so set them directly. defaultCfg := createDefaultConfig().(*Config) defaultCfg.Token = "00000000-0000-0000-0000-0000000000000" - defaultCfg.HTTPClientSettings.Endpoint = "https://splunk:8088/services/collector" + defaultCfg.ClientConfig.Endpoint = "https://splunk:8088/services/collector" hundred := 100 idleConnTimeout := 10 * time.Second @@ -59,22 +60,24 @@ func TestLoadConfig(t *testing.T) { MaxContentLengthLogs: 2 * 1024 * 1024, MaxContentLengthMetrics: 2 * 1024 * 1024, MaxContentLengthTraces: 2 * 1024 * 1024, - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: 10 * time.Second, Endpoint: "https://splunk:8088/services/collector", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "", CertFile: "", KeyFile: "", }, InsecureSkipVerify: false, }, - MaxIdleConns: &hundred, - MaxIdleConnsPerHost: &hundred, - IdleConnTimeout: &idleConnTimeout, + MaxIdleConns: &hundred, + MaxIdleConnsPerHost: &hundred, + IdleConnTimeout: &idleConnTimeout, + HTTP2ReadIdleTimeout: 10 * time.Second, + HTTP2PingTimeout: 10 * time.Second, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, MaxInterval: 1 * time.Minute, @@ -146,7 +149,7 @@ func TestConfig_Validate(t *testing.T) { name: "bad url", cfg: func() *Config { cfg := createDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "cache_object:foo/bar" + cfg.ClientConfig.Endpoint = "cache_object:foo/bar" cfg.Token = "foo" return cfg }(), @@ -156,7 +159,7 @@ func TestConfig_Validate(t *testing.T) { name: "missing token", cfg: func() *Config { cfg := createDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "http://example.com" + cfg.ClientConfig.Endpoint = "http://example.com" return cfg }(), wantErr: "requires a non-empty \"token\"", @@ -165,7 +168,7 @@ func TestConfig_Validate(t *testing.T) { name: "max default content-length for logs", cfg: func() *Config { cfg := createDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "http://foo_bar.com" + cfg.ClientConfig.Endpoint = "http://foo_bar.com" cfg.MaxContentLengthLogs = maxContentLengthLogsLimit + 1 cfg.Token = "foo" return cfg @@ -176,7 +179,7 @@ func TestConfig_Validate(t *testing.T) { name: "max default content-length for metrics", cfg: func() *Config { cfg := createDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "http://foo_bar.com" + cfg.ClientConfig.Endpoint = "http://foo_bar.com" cfg.MaxContentLengthMetrics = maxContentLengthMetricsLimit + 1 cfg.Token = "foo" return cfg @@ -187,7 +190,7 @@ func TestConfig_Validate(t *testing.T) { name: "max default content-length for traces", cfg: func() *Config { cfg := createDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "http://foo_bar.com" + cfg.ClientConfig.Endpoint = "http://foo_bar.com" cfg.MaxContentLengthTraces = maxContentLengthTracesLimit + 1 cfg.Token = "foo" return cfg @@ -198,18 +201,30 @@ func TestConfig_Validate(t *testing.T) { name: "max default event-size", cfg: func() *Config { cfg := createDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "http://foo_bar.com" + cfg.ClientConfig.Endpoint = "http://foo_bar.com" cfg.MaxEventSize = maxMaxEventSize + 1 cfg.Token = "foo" return cfg }(), wantErr: "requires \"max_event_size\" <= 838860800", }, + { + name: "negative queue size", + cfg: func() *Config { + cfg := createDefaultConfig().(*Config) + cfg.ClientConfig.Endpoint = "http://foo_bar.com" + cfg.QueueSettings.Enabled = true + cfg.QueueSettings.QueueSize = -5 + cfg.Token = "foo" + return cfg + }(), + wantErr: "queue size must be positive", + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - err := tt.cfg.Validate() + err := component.ValidateConfig(tt.cfg) if tt.wantErr == "" { require.NoError(t, err) } else { diff --git a/exporter/splunkhecexporter/example/Dockerfile b/exporter/splunkhecexporter/example/Dockerfile index 26e83570bc5e..29289f483359 100644 --- a/exporter/splunkhecexporter/example/Dockerfile +++ b/exporter/splunkhecexporter/example/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21 AS build +FROM golang:1.22 AS build WORKDIR /src ADD . /src diff --git a/exporter/splunkhecexporter/factory.go b/exporter/splunkhecexporter/factory.go index 9321d86c8bbe..b67baa3d4dce 100644 --- a/exporter/splunkhecexporter/factory.go +++ b/exporter/splunkhecexporter/factory.go @@ -9,6 +9,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -20,10 +21,12 @@ import ( ) const ( - defaultMaxIdleCons = 100 - defaultHTTPTimeout = 10 * time.Second - defaultIdleConnTimeout = 10 * time.Second - defaultSplunkAppName = "OpenTelemetry Collector Contrib" + defaultMaxIdleCons = 100 + defaultHTTPTimeout = 10 * time.Second + defaultHTTP2ReadIdleTimeout = time.Second * 10 + defaultHTTP2PingTimeout = time.Second * 10 + defaultIdleConnTimeout = 10 * time.Second + defaultSplunkAppName = "OpenTelemetry Collector Contrib" ) // TODO: Find a place for this to be shared. @@ -38,6 +41,12 @@ type baseLogsExporter struct { consumer.Logs } +// TODO: Find a place for this to be shared. +type baseTracesExporter struct { + component.Component + consumer.Traces +} + // NewFactory creates a factory for Splunk HEC exporter. func NewFactory() exporter.Factory { return exporter.NewFactory( @@ -54,14 +63,16 @@ func createDefaultConfig() component.Config { return &Config{ LogDataEnabled: true, ProfilingDataEnabled: true, - HTTPClientSettings: confighttp.HTTPClientSettings{ - Timeout: defaultHTTPTimeout, - IdleConnTimeout: &defaultIdleConnTimeout, - MaxIdleConnsPerHost: &defaultMaxConns, - MaxIdleConns: &defaultMaxConns, + ClientConfig: confighttp.ClientConfig{ + Timeout: defaultHTTPTimeout, + IdleConnTimeout: &defaultIdleConnTimeout, + MaxIdleConnsPerHost: &defaultMaxConns, + MaxIdleConns: &defaultMaxConns, + HTTP2ReadIdleTimeout: defaultHTTP2ReadIdleTimeout, + HTTP2PingTimeout: defaultHTTP2PingTimeout, }, SplunkAppName: defaultSplunkAppName, - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueSettings(), DisableCompression: false, MaxContentLengthLogs: defaultContentLengthLogsLimit, @@ -98,17 +109,28 @@ func createTracesExporter( c := newTracesClient(set, cfg) - return exporterhelper.NewTracesExporter( + e, err := exporterhelper.NewTracesExporter( ctx, set, cfg, c.pushTraceData, // explicitly disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithQueue(cfg.QueueSettings), exporterhelper.WithStart(c.start), exporterhelper.WithShutdown(c.stop)) + + if err != nil { + return nil, err + } + + wrapped := &baseTracesExporter{ + Component: e, + Traces: batchperresourceattr.NewMultiBatchPerResourceTraces([]string{splunk.HecTokenLabel, splunk.DefaultIndexLabel}, e), + } + + return wrapped, nil } func createMetricsExporter( @@ -120,14 +142,14 @@ func createMetricsExporter( c := newMetricsClient(set, cfg) - exporter, err := exporterhelper.NewMetricsExporter( + e, err := exporterhelper.NewMetricsExporter( ctx, set, cfg, c.pushMetricsData, // explicitly disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithQueue(cfg.QueueSettings), exporterhelper.WithStart(c.start), exporterhelper.WithShutdown(c.stop)) @@ -136,8 +158,8 @@ func createMetricsExporter( } wrapped := &baseMetricsExporter{ - Component: exporter, - Metrics: batchperresourceattr.NewBatchPerResourceMetrics(splunk.HecTokenLabel, exporter), + Component: e, + Metrics: batchperresourceattr.NewMultiBatchPerResourceMetrics([]string{splunk.HecTokenLabel, splunk.DefaultIndexLabel}, e), } return wrapped, nil @@ -159,7 +181,7 @@ func createLogsExporter( c.pushLogData, // explicitly disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithQueue(cfg.QueueSettings), exporterhelper.WithStart(c.start), exporterhelper.WithShutdown(c.stop)) @@ -170,7 +192,7 @@ func createLogsExporter( wrapped := &baseLogsExporter{ Component: logsExporter, - Logs: batchperresourceattr.NewBatchPerResourceLogs(splunk.HecTokenLabel, &perScopeBatcher{ + Logs: batchperresourceattr.NewMultiBatchPerResourceLogs([]string{splunk.HecTokenLabel, splunk.DefaultIndexLabel}, &perScopeBatcher{ logsEnabled: cfg.LogDataEnabled, profilingEnabled: cfg.ProfilingDataEnabled, logger: set.Logger, diff --git a/exporter/splunkhecexporter/factory_test.go b/exporter/splunkhecexporter/factory_test.go index 3e7146014b4e..0ae3358958b8 100644 --- a/exporter/splunkhecexporter/factory_test.go +++ b/exporter/splunkhecexporter/factory_test.go @@ -22,7 +22,7 @@ func TestCreateDefaultConfig(t *testing.T) { func TestCreateMetricsExporter(t *testing.T) { cfg := createDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "https://example.com:8088/services/collector" + cfg.ClientConfig.Endpoint = "https://example.com:8088/services/collector" cfg.Token = "1234-1234" params := exportertest.NewNopCreateSettings() @@ -32,7 +32,7 @@ func TestCreateMetricsExporter(t *testing.T) { func TestCreateTracesExporter(t *testing.T) { cfg := createDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "https://example.com:8088/services/collector" + cfg.ClientConfig.Endpoint = "https://example.com:8088/services/collector" cfg.Token = "1234-1234" params := exportertest.NewNopCreateSettings() @@ -42,7 +42,7 @@ func TestCreateTracesExporter(t *testing.T) { func TestCreateLogsExporter(t *testing.T) { cfg := createDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "https://example.com:8088/services/collector" + cfg.ClientConfig.Endpoint = "https://example.com:8088/services/collector" cfg.Token = "1234-1234" params := exportertest.NewNopCreateSettings() @@ -54,7 +54,7 @@ func TestCreateInstanceViaFactory(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "https://example.com:8088/services/collector" + cfg.ClientConfig.Endpoint = "https://example.com:8088/services/collector" cfg.Token = "1234-1234" params := exportertest.NewNopCreateSettings() exp, err := factory.CreateMetricsExporter( @@ -65,7 +65,7 @@ func TestCreateInstanceViaFactory(t *testing.T) { // Set values that don't have a valid default. cfg.Token = "testToken" - cfg.HTTPClientSettings.Endpoint = "https://example.com" + cfg.ClientConfig.Endpoint = "https://example.com" exp, err = factory.CreateMetricsExporter( context.Background(), params, cfg) @@ -78,7 +78,7 @@ func TestCreateInstanceViaFactory(t *testing.T) { func TestFactory_CreateMetricsExporter(t *testing.T) { config := &Config{ Token: "testToken", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "https://example.com:8000", }, } diff --git a/exporter/splunkhecexporter/generated_component_test.go b/exporter/splunkhecexporter/generated_component_test.go new file mode 100644 index 000000000000..96814b3ddc8a --- /dev/null +++ b/exporter/splunkhecexporter/generated_component_test.go @@ -0,0 +1,140 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package splunkhecexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/splunkhecexporter/go.mod b/exporter/splunkhecexporter/go.mod index ff80c8a8e88f..b42680a02b70 100644 --- a/exporter/splunkhecexporter/go.mod +++ b/exporter/splunkhecexporter/go.mod @@ -1,29 +1,33 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter -go 1.20 +go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.1 + github.com/cenkalti/backoff/v4 v4.3.0 github.com/json-iterator/go v1.1.12 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.89.0 - github.com/stretchr/testify v1.8.4 - github.com/testcontainers/testcontainers-go v0.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.98.0 + github.com/stretchr/testify v1.9.0 + github.com/testcontainers/testcontainers-go v0.29.1 go.opencensus.io v0.24.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -31,77 +35,83 @@ require ( dario.cat/mergo v1.0.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/Microsoft/hcsshim v0.11.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/containerd/containerd v1.7.7 // indirect + github.com/Microsoft/hcsshim v0.11.4 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/containerd/containerd v1.7.12 // indirect github.com/containerd/log v0.1.0 // indirect github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.7+incompatible // indirect - github.com/docker/go-connections v0.4.0 // indirect + github.com/distribution/reference v0.5.0 // indirect + github.com/docker/docker v25.0.5+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.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/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect - github.com/opencontainers/runc v1.1.12 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/pkg/errors v0.9.1 // 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.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sirupsen/logrus v1.9.3 // 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.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.15.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect ) replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal diff --git a/exporter/splunkhecexporter/go.sum b/exporter/splunkhecexporter/go.sum index 51350d770191..fcc791abf985 100644 --- a/exporter/splunkhecexporter/go.sum +++ b/exporter/splunkhecexporter/go.sum @@ -1,39 +1,41 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/hcsshim v0.11.1 h1:hJ3s7GbWlGK4YVV92sO88BQSyF4ZLVy7/awqOlPxFbA= -github.com/Microsoft/hcsshim v0.11.1/go.mod h1:nFJmaO4Zr5Y7eADdFOpYswDDlNVbvcIJJNJLECr5JQg= +github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= +github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.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/containerd/containerd v1.7.7 h1:QOC2K4A42RQpcrZyptP6z9EJZnlHfHJUfZrAAHe15q4= -github.com/containerd/containerd v1.7.7/go.mod h1:3c4XZv6VeT9qgf9GMTxNTMFxGJrGpI2vz1yk4ye+YY8= +github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= +github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -44,20 +46,21 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -86,40 +89,42 @@ 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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -131,27 +136,29 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= -github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= 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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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= @@ -161,77 +168,93 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs 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/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 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/testcontainers/testcontainers-go v0.26.0 h1:uqcYdoOHBy1ca7gKODfBd9uTHVK3a7UL848z09MVZ0c= -github.com/testcontainers/testcontainers-go v0.26.0/go.mod h1:ICriE9bLX5CLxL9OFQ2N+2N+f+803LNJ1utJb1+Inx0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/testcontainers/testcontainers-go v0.29.1 h1:z8kxdFlovA2y97RWx98v/TQ+tR+SXZm6p35M+xB92zk= +github.com/testcontainers/testcontainers-go v0.29.1/go.mod h1:SnKnKQav8UcgtKqjp/AD8bE1MqZm+3TDb/B8crE3XnI= 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= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -243,8 +266,8 @@ golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvx 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/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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= @@ -254,15 +277,16 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +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-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= @@ -273,14 +297,15 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -300,15 +325,18 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= 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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -320,14 +348,15 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= 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/exporter/splunkhecexporter/heartbeat_test.go b/exporter/splunkhecexporter/heartbeat_test.go index cec3bfb9f199..c17177231d8b 100644 --- a/exporter/splunkhecexporter/heartbeat_test.go +++ b/exporter/splunkhecexporter/heartbeat_test.go @@ -82,7 +82,7 @@ func resetMetrics(metricsNames ...string) { func Test_newHeartbeater_disabled(t *testing.T) { config := createTestConfig(map[string]string{}, false) config.Heartbeat.Interval = 0 - hb := newHeartbeater(config, component.NewDefaultBuildInfo(), func(ctx context.Context, ld plog.Logs) error { + hb := newHeartbeater(config, component.NewDefaultBuildInfo(), func(_ context.Context, _ plog.Logs) error { return nil }) assert.Nil(t, hb) @@ -111,7 +111,7 @@ func Test_Heartbeat_success(t *testing.T) { for _, tt := range tests { consumeLogsChan := make(chan plog.Logs, 10) - consumeFn := func(ctx context.Context, ld plog.Logs) error { + consumeFn := func(_ context.Context, ld plog.Logs) error { consumeLogsChan <- ld return nil } @@ -142,7 +142,7 @@ func Test_Heartbeat_success(t *testing.T) { func Test_Heartbeat_failure(t *testing.T) { resetMetrics() - consumeFn := func(ctx context.Context, ld plog.Logs) error { + consumeFn := func(_ context.Context, _ plog.Logs) error { return errors.New("always error") } initHeartbeater(t, map[string]string{}, true, consumeFn) diff --git a/exporter/splunkhecexporter/integration_test.go b/exporter/splunkhecexporter/integration_test.go index 88f315d4c2d6..72c8d736e954 100644 --- a/exporter/splunkhecexporter/integration_test.go +++ b/exporter/splunkhecexporter/integration_test.go @@ -10,7 +10,7 @@ import ( "crypto/tls" "fmt" "net/http" - "os" + "net/url" "os/exec" "strconv" "testing" @@ -58,7 +58,7 @@ func teardown(cfg SplunkContainerConfig) { fmt.Println("Stopping container") err := cfg.container.Terminate(cfg.conCtx) if err != nil { - fmt.Printf("Error while terminiating container") + fmt.Printf("Error while terminating container") panic(err) } // Remove docker image after tests @@ -74,17 +74,6 @@ func teardown(cfg SplunkContainerConfig) { fmt.Printf("Command output:\n%s\n", output) } -func TestMain(m *testing.M) { - splunkContCfg := setup() - - // Run the tests - code := m.Run() - - teardown(splunkContCfg) - // Exit with the test result code - os.Exit(code) -} - func createInsecureClient() *http.Client { // Create a custom transport with insecure settings tr := &http.Transport{ @@ -222,177 +211,180 @@ func prepareTracesData(index string, source string, sourcetype string) ptrace.Tr return traces } -func TestSplunkHecExporterEventsToSplunk(t *testing.T) { - logger := zaptest.NewLogger(t) - logger.Info("Test -> Splunk running at:", zap.String("host", integrationtestutils.GetConfigVariable("HOST")), - zap.String("uiPort", integrationtestutils.GetConfigVariable("UI_PORT")), - zap.String("hecPort", integrationtestutils.GetConfigVariable("HEC_PORT")), - zap.String("managementPort", integrationtestutils.GetConfigVariable("MANAGEMENT_PORT")), - ) - // Endpoint and Token do not have a default value so set them directly. - config := NewFactory().CreateDefaultConfig().(*Config) - config.Token = configopaque.String(integrationtestutils.GetConfigVariable("HEC_TOKEN")) - config.HTTPClientSettings.Endpoint = "https://" + integrationtestutils.GetConfigVariable("HOST") + ":" + integrationtestutils.GetConfigVariable("HEC_PORT") + "/services/collector" - config.Source = "otel" - config.SourceType = "st-otel" - config.Index = "main" - config.TLSSetting.InsecureSkipVerify = true - - url, err := config.getURL() - require.NoError(t, err, "Must not error while getting URL") - settings := exportertest.NewNopCreateSettings() - c := newLogsClient(settings, config) - logs := prepareLogs() - httpClient := createInsecureClient() - c.hecWorker = &defaultHecWorker{url, httpClient, buildHTTPHeaders(config, component.NewDefaultBuildInfo())} +type cfg struct { + event string + index string + source string + sourcetype string +} - err = c.pushLogData(context.Background(), logs) - require.NoError(t, err, "Must not error while sending Logs data") - waitForEventToBeIndexed() +type telemetryType string - query := "index=main *" - events := integrationtestutils.CheckEventsFromSplunk(query, "-3h@h") - logger.Info("Splunk received %d events in the last minute", zap.Int("no. of events", len(events))) - assert.True(t, len(events) == 1) - // check events fields - data, ok := events[0].(map[string]any) - if !ok { - logger.Info("Invalid event format") - } - assert.True(t, "test log" == data["_raw"].(string)) - assert.True(t, "main" == data["index"].(string)) - assert.True(t, "otel" == data["source"].(string)) - assert.True(t, "st-otel" == data["sourcetype"].(string)) +var metricsType = telemetryType("metrics") +var logsType = telemetryType("logs") +var tracesType = telemetryType("traces") + +type testCfg struct { + name string + config *cfg + startTime string + telType telemetryType } -func TestSplunkHecExporterEventsToSplunkNonDefaultIndex(t *testing.T) { - logger := zaptest.NewLogger(t) - logger.Info("Test -> Splunk running at:", zap.String("host", integrationtestutils.GetConfigVariable("HOST")), - zap.String("uiPort", integrationtestutils.GetConfigVariable("UI_PORT")), - zap.String("hecPort", integrationtestutils.GetConfigVariable("HEC_PORT")), - zap.String("managementPort", integrationtestutils.GetConfigVariable("MANAGEMENT_PORT")), - ) - - event := "This is my new event! And some number 101" - index := integrationtestutils.GetConfigVariable("EVENT_INDEX") - source := "otel-source" - sourcetype := "sck-otel-st" - - // Endpoint and Token do not have a default value so set them directly. - config := NewFactory().CreateDefaultConfig().(*Config) - config.Token = configopaque.String(integrationtestutils.GetConfigVariable("HEC_TOKEN")) - config.HTTPClientSettings.Endpoint = "https://" + integrationtestutils.GetConfigVariable("HOST") + ":" + integrationtestutils.GetConfigVariable("HEC_PORT") + "/services/collector" - config.Source = "otel" - config.SourceType = "st-otel" - config.Index = "main" - config.TLSSetting.InsecureSkipVerify = true - - url, err := config.getURL() - require.NoError(t, err, "Must not error while getting URL") +func logsTest(t *testing.T, config *Config, url *url.URL, test testCfg) { settings := exportertest.NewNopCreateSettings() c := newLogsClient(settings, config) - logs := prepareLogsNonDefaultParams(index, source, sourcetype, event) + var logs plog.Logs + if test.config.index != "main" { + logs = prepareLogsNonDefaultParams(test.config.index, test.config.source, test.config.sourcetype, test.config.event) + } else { + logs = prepareLogs() + } + httpClient := createInsecureClient() c.hecWorker = &defaultHecWorker{url, httpClient, buildHTTPHeaders(config, component.NewDefaultBuildInfo())} - err = c.pushLogData(context.Background(), logs) + err := c.pushLogData(context.Background(), logs) require.NoError(t, err, "Must not error while sending Logs data") waitForEventToBeIndexed() - query := "index=" + index + " *" - events := integrationtestutils.CheckEventsFromSplunk(query, "-1m@m") - logger.Info("Splunk received %d events in the last minute", zap.Int("no. of events", len(events))) - assert.True(t, len(events) == 1) + events := integrationtestutils.CheckEventsFromSplunk("index="+test.config.index+" *", test.startTime) + assert.Equal(t, len(events), 1) // check events fields data, ok := events[0].(map[string]any) - if !ok { - logger.Info("Invalid event format") - } - assert.True(t, event == data["_raw"].(string)) - assert.True(t, index == data["index"].(string)) - assert.True(t, source == data["source"].(string)) - assert.True(t, sourcetype == data["sourcetype"].(string)) + assert.True(t, ok, "Invalid event format") + assert.Equal(t, test.config.event, data["_raw"].(string)) + assert.Equal(t, test.config.index, data["index"].(string)) + assert.Equal(t, test.config.source, data["source"].(string)) + assert.Equal(t, test.config.sourcetype, data["sourcetype"].(string)) } -func TestSplunkHecExporterMetricsToSplunk(t *testing.T) { - logger := zaptest.NewLogger(t) - logger.Info("Test -> Splunk running at:", zap.String("host", integrationtestutils.GetConfigVariable("HOST")), - zap.String("uiPort", integrationtestutils.GetConfigVariable("UI_PORT")), - zap.String("hecPort", integrationtestutils.GetConfigVariable("HEC_PORT")), - zap.String("managementPort", integrationtestutils.GetConfigVariable("MANAGEMENT_PORT")), - ) - index := integrationtestutils.GetConfigVariable("METRIC_INDEX") - metricName := "test.metric" - // Endpoint and Token do not have a default value so set them directly. - config := NewFactory().CreateDefaultConfig().(*Config) - config.Token = configopaque.String(integrationtestutils.GetConfigVariable("HEC_TOKEN")) - config.HTTPClientSettings.Endpoint = "https://" + integrationtestutils.GetConfigVariable("HOST") + ":" + integrationtestutils.GetConfigVariable("HEC_PORT") + "/services/collector" - config.Source = "otel" - config.SourceType = "st-otel" - config.Index = index - config.TLSSetting.InsecureSkipVerify = true - - url, err := config.getURL() - require.NoError(t, err, "Must not error while getting URL") +func metricsTest(t *testing.T, config *Config, url *url.URL, test testCfg) { settings := exportertest.NewNopCreateSettings() c := newMetricsClient(settings, config) - metricData := prepareMetricsData(metricName) + metricData := prepareMetricsData(test.config.event) httpClient := createInsecureClient() c.hecWorker = &defaultHecWorker{url, httpClient, buildHTTPHeaders(config, component.NewDefaultBuildInfo())} - err = c.pushMetricsData(context.Background(), metricData) + err := c.pushMetricsData(context.Background(), metricData) require.NoError(t, err, "Must not error while sending Metrics data") waitForEventToBeIndexed() - events := integrationtestutils.CheckMetricsFromSplunk(index, metricName) - assert.True(t, len(events) == 1, "Events length is less than 1. No metrics found") + events := integrationtestutils.CheckMetricsFromSplunk(test.config.index, test.config.event) + assert.Equal(t, len(events), 1, "Events length is less than 1. No metrics found") } -func TestSplunkHecExporterTracesToSplunk(t *testing.T) { - logger := zaptest.NewLogger(t) - logger.Info("Test -> Splunk running at:", zap.String("host", integrationtestutils.GetConfigVariable("HOST")), - zap.String("uiPort", integrationtestutils.GetConfigVariable("UI_PORT")), - zap.String("hecPort", integrationtestutils.GetConfigVariable("HEC_PORT")), - zap.String("managementPort", integrationtestutils.GetConfigVariable("MANAGEMENT_PORT")), - ) - index := integrationtestutils.GetConfigVariable("TRACE_INDEX") - source := "trace-source" - sourcetype := "trace-sourcetype" - // Endpoint and Token do not have a default value so set them directly. - config := NewFactory().CreateDefaultConfig().(*Config) - config.Token = configopaque.String(integrationtestutils.GetConfigVariable("HEC_TOKEN")) - config.HTTPClientSettings.Endpoint = "https://" + integrationtestutils.GetConfigVariable("HOST") + ":" + integrationtestutils.GetConfigVariable("HEC_PORT") + "/services/collector" - config.Source = "otel" - config.SourceType = "st-otel" - config.Index = "main" - config.TLSSetting.InsecureSkipVerify = true - - url, err := config.getURL() - require.NoError(t, err, "Must not error while getting URL") +func tracesTest(t *testing.T, config *Config, url *url.URL, test testCfg) { settings := exportertest.NewNopCreateSettings() c := newTracesClient(settings, config) - tracesData := prepareTracesData(index, source, sourcetype) + tracesData := prepareTracesData(test.config.index, test.config.source, test.config.sourcetype) httpClient := createInsecureClient() c.hecWorker = &defaultHecWorker{url, httpClient, buildHTTPHeaders(config, component.NewDefaultBuildInfo())} - err = c.pushTraceData(context.Background(), tracesData) + err := c.pushTraceData(context.Background(), tracesData) require.NoError(t, err, "Must not error while sending Trace data") - waitForEventToBeIndexed() - query := "index=" + index + " *" - events := integrationtestutils.CheckEventsFromSplunk(query, "-1m@m") - logger.Info("Splunk received %d events in the last minute", zap.Int("no. of events", len(events))) - assert.True(t, len(events) == 1) + + events := integrationtestutils.CheckEventsFromSplunk("index="+test.config.index+" *", test.startTime) + assert.Equal(t, len(events), 1) // check fields data, ok := events[0].(map[string]any) - if !ok { - logger.Info("Invalid event format") + assert.True(t, ok, "Invalid event format") + assert.Equal(t, test.config.index, data["index"].(string)) + assert.Equal(t, test.config.source, data["source"].(string)) + assert.Equal(t, test.config.sourcetype, data["sourcetype"].(string)) +} + +func TestSplunkHecExporter(t *testing.T) { + splunkContCfg := setup() + defer teardown(splunkContCfg) + + tests := []testCfg{ + { + name: "Events to Splunk", + config: &cfg{ + event: "test log", + index: "main", + source: "otel", + sourcetype: "st-otel", + }, + startTime: "-3h@h", + telType: logsType, + }, + { + name: "Events to Splunk - Non default index", + config: &cfg{ + event: "This is my new event! And some number 101", + index: integrationtestutils.GetConfigVariable("EVENT_INDEX"), + source: "otel-source", + sourcetype: "sck-otel-st", + }, + startTime: "-1m@m", + telType: logsType, + }, + { + name: "Events to Splunk - metrics", + config: &cfg{ + event: "test.metric", + index: integrationtestutils.GetConfigVariable("METRIC_INDEX"), + source: "otel", + sourcetype: "st-otel", + }, + startTime: "", + telType: metricsType, + }, + { + name: "Events to Splunk - traces", + config: &cfg{ + event: "", + index: integrationtestutils.GetConfigVariable("TRACE_INDEX"), + source: "trace-source", + sourcetype: "trace-sourcetype", + }, + startTime: "-1m@m", + telType: tracesType, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + logger := zaptest.NewLogger(t) + logger.Info("Test -> Splunk running at:", zap.String("host", integrationtestutils.GetConfigVariable("HOST")), + zap.String("uiPort", integrationtestutils.GetConfigVariable("UI_PORT")), + zap.String("hecPort", integrationtestutils.GetConfigVariable("HEC_PORT")), + zap.String("managementPort", integrationtestutils.GetConfigVariable("MANAGEMENT_PORT")), + ) + + // Endpoint and Token do not have a default value so set them directly. + config := NewFactory().CreateDefaultConfig().(*Config) + config.Token = configopaque.String(integrationtestutils.GetConfigVariable("HEC_TOKEN")) + config.ClientConfig.Endpoint = "https://" + integrationtestutils.GetConfigVariable("HOST") + ":" + integrationtestutils.GetConfigVariable("HEC_PORT") + "/services/collector" + config.Source = "otel" + config.SourceType = "st-otel" + + if test.telType == metricsType { + config.Index = test.config.index + } else { + config.Index = "main" + } + config.TLSSetting.InsecureSkipVerify = true + + url, err := config.getURL() + require.NoError(t, err, "Must not error while getting URL") + + switch test.telType { + case logsType: + logsTest(t, config, url, test) + case metricsType: + metricsTest(t, config, url, test) + case tracesType: + tracesTest(t, config, url, test) + default: + assert.Fail(t, "Telemetry type must be set to one of the following values: metrics, traces, or logs.") + } + }) } - assert.True(t, index == data["index"].(string)) - assert.True(t, source == data["source"].(string)) - assert.True(t, sourcetype == data["sourcetype"].(string)) } func waitForEventToBeIndexed() { diff --git a/exporter/splunkhecexporter/internal/integrationtestutils/splunk.go b/exporter/splunkhecexporter/internal/integrationtestutils/splunk.go index f89ea09b9be4..4d5e47cf1676 100644 --- a/exporter/splunkhecexporter/internal/integrationtestutils/splunk.go +++ b/exporter/splunkhecexporter/internal/integrationtestutils/splunk.go @@ -112,7 +112,7 @@ func checkSearchJobStatusCode(user string, password string, baseURL string, jobI // logger.Println(checkJSONResponse) // debug // Print isDone field from response isDone := checkJSONResponse["entry"].([]any)[0].(map[string]any)["content"].(map[string]any)["isDone"] - logger.Printf("Is Splunk Search compleated [isDone flag]: %v\n", isDone) + logger.Printf("Is Splunk Search completed [isDone flag]: %v\n", isDone) return isDone } func postSearchRequest(user string, password string, baseURL string, searchQuery string, startTime string, endTime string) string { diff --git a/exporter/splunkhecexporter/internal/metadata/generated_status.go b/exporter/splunkhecexporter/internal/metadata/generated_status.go index d3e300fe92eb..def1a7fcd1c4 100644 --- a/exporter/splunkhecexporter/internal/metadata/generated_status.go +++ b/exporter/splunkhecexporter/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("splunk_hec") ) const ( - Type = "splunk_hec" TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/splunkhec") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/splunkhec") +} diff --git a/exporter/splunkhecexporter/logdata_to_splunk.go b/exporter/splunkhecexporter/logdata_to_splunk.go index 065b5e7c4b94..b28c4b783a1b 100644 --- a/exporter/splunkhecexporter/logdata_to_splunk.go +++ b/exporter/splunkhecexporter/logdata_to_splunk.go @@ -83,13 +83,18 @@ func mapLogRecordToSplunkEvent(res pcommon.Resource, lr plog.LogRecord, config * return true }) + body := lr.Body().AsRaw() + if body == nil { + body = "" + } + return &splunk.Event{ Time: nanoTimestampToEpochMilliseconds(lr.Timestamp()), Host: host, Source: source, SourceType: sourcetype, Index: index, - Event: lr.Body().AsRaw(), + Event: body, Fields: fields, } } diff --git a/exporter/splunkhecexporter/logdata_to_splunk_test.go b/exporter/splunkhecexporter/logdata_to_splunk_test.go index dc73249e2ec5..7896affb4cbb 100644 --- a/exporter/splunkhecexporter/logdata_to_splunk_test.go +++ b/exporter/splunkhecexporter/logdata_to_splunk_test.go @@ -188,7 +188,7 @@ func Test_mapLogRecordToSplunkEvent(t *testing.T) { return config }, wantSplunkEvents: []*splunk.Event{ - commonLogSplunkEvent(nil, 0, map[string]any{}, "unknown", "source", "sourcetype"), + commonLogSplunkEvent("", 0, map[string]any{}, "unknown", "source", "sourcetype"), }, }, { @@ -207,7 +207,7 @@ func Test_mapLogRecordToSplunkEvent(t *testing.T) { return config }, wantSplunkEvents: func() []*splunk.Event { - event := commonLogSplunkEvent(nil, 0, map[string]any{}, "unknown", "source", "sourcetype") + event := commonLogSplunkEvent("", 0, map[string]any{}, "unknown", "source", "sourcetype") event.Fields["span_id"] = "0000000000000032" event.Fields["trace_id"] = "00000000000000000000000000000064" return []*splunk.Event{event} @@ -330,7 +330,7 @@ func Test_mapLogRecordToSplunkEvent(t *testing.T) { return config }, wantSplunkEvents: []*splunk.Event{ - commonLogSplunkEvent(nil, ts, map[string]any{"custom": "custom"}, + commonLogSplunkEvent("", ts, map[string]any{"custom": "custom"}, "myhost", "myapp", "myapp-type"), }, }, @@ -454,7 +454,7 @@ func Test_emptyLogRecord(t *testing.T) { assert.Zero(t, event.Source) assert.Zero(t, event.SourceType) assert.Zero(t, event.Index) - assert.Nil(t, event.Event) + assert.Equal(t, "", event.Event) assert.Empty(t, event.Fields) } diff --git a/exporter/splunkhecexporter/metadata.yaml b/exporter/splunkhecexporter/metadata.yaml index fb77ac506dfc..b3305538b79a 100644 --- a/exporter/splunkhecexporter/metadata.yaml +++ b/exporter/splunkhecexporter/metadata.yaml @@ -1,9 +1,19 @@ type: splunk_hec +scope_name: otelcol/splunkhec status: class: exporter stability: beta: [traces, metrics, logs] - distributions: [contrib, splunk, observiq] + distributions: [contrib] codeowners: - active: [atoulme, dmitryax] \ No newline at end of file + active: [atoulme, dmitryax] +tests: + config: + token: "my_fake_token" + endpoint: "http://localhost:0" + sending_queue: + enabled: false + retry_on_failure: + enabled: false + expect_consumer_error: true diff --git a/exporter/splunkhecexporter/package_test.go b/exporter/splunkhecexporter/package_test.go new file mode 100644 index 000000000000..6bf200240882 --- /dev/null +++ b/exporter/splunkhecexporter/package_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package splunkhecexporter + +import ( + "testing" + + "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")) +} diff --git a/exporter/sumologicexporter/config.go b/exporter/sumologicexporter/config.go index 2c88a6b95739..16382c6942c7 100644 --- a/exporter/sumologicexporter/config.go +++ b/exporter/sumologicexporter/config.go @@ -9,14 +9,15 @@ import ( "time" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) // Config defines configuration for Sumo Logic exporter. type Config struct { - confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + confighttp.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + exporterhelper.QueueSettings `mapstructure:"sending_queue"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // Compression encoding format, either empty string, gzip or deflate (default gzip) // Empty string means no compression @@ -59,11 +60,11 @@ type Config struct { Client string `mapstructure:"client"` } -// createDefaultHTTPClientSettings returns default http client settings -func createDefaultHTTPClientSettings() confighttp.HTTPClientSettings { - return confighttp.HTTPClientSettings{ - Timeout: defaultTimeout, - } +// createDefaultClientConfig returns default http client settings +func createDefaultClientConfig() confighttp.ClientConfig { + config := confighttp.NewDefaultClientConfig() + config.Timeout = defaultTimeout + return config } // LogFormatType represents log_format @@ -147,7 +148,7 @@ func (cfg *Config) Validate() error { return fmt.Errorf("unexpected compression encoding: %s", cfg.CompressEncoding) } - if len(cfg.HTTPClientSettings.Endpoint) == 0 { + if len(cfg.ClientConfig.Endpoint) == 0 { return errors.New("endpoint is not set") } diff --git a/exporter/sumologicexporter/config_test.go b/exporter/sumologicexporter/config_test.go index 5659d65f5bb9..8eca2feb0951 100644 --- a/exporter/sumologicexporter/config_test.go +++ b/exporter/sumologicexporter/config_test.go @@ -24,7 +24,7 @@ func TestConfigValidation(t *testing.T) { LogFormat: "test_format", MetricFormat: "carbon2", CompressEncoding: "gzip", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: defaultTimeout, Endpoint: "test_endpoint", }, @@ -36,7 +36,7 @@ func TestConfigValidation(t *testing.T) { cfg: &Config{ LogFormat: "json", MetricFormat: "test_format", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: defaultTimeout, Endpoint: "test_endpoint", }, @@ -50,7 +50,7 @@ func TestConfigValidation(t *testing.T) { LogFormat: "json", MetricFormat: "carbon2", CompressEncoding: "test_format", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: defaultTimeout, Endpoint: "test_endpoint", }, @@ -63,7 +63,7 @@ func TestConfigValidation(t *testing.T) { LogFormat: "json", MetricFormat: "carbon2", CompressEncoding: "gzip", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: defaultTimeout, }, }, @@ -75,7 +75,7 @@ func TestConfigValidation(t *testing.T) { LogFormat: "json", MetricFormat: "carbon2", CompressEncoding: "gzip", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: defaultTimeout, Endpoint: "test_endpoint", }, @@ -92,7 +92,7 @@ func TestConfigValidation(t *testing.T) { LogFormat: "json", MetricFormat: "carbon2", CompressEncoding: "gzip", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: defaultTimeout, Endpoint: "test_endpoint", }, @@ -109,7 +109,7 @@ func TestConfigValidation(t *testing.T) { if tc.expectedErr == "" { assert.NoError(t, err) } else { - require.NotNil(t, err) + require.Error(t, err) assert.EqualError(t, err, tc.expectedErr) } }) diff --git a/exporter/sumologicexporter/exporter.go b/exporter/sumologicexporter/exporter.go index bbc4f454a9f7..0f5b85e5e1f4 100644 --- a/exporter/sumologicexporter/exporter.go +++ b/exporter/sumologicexporter/exporter.go @@ -94,7 +94,7 @@ func newLogsExporter( // Disable exporterhelper Timeout, since we are using a custom mechanism // within exporter itself exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithQueue(cfg.QueueSettings), exporterhelper.WithStart(se.start), ) @@ -117,15 +117,15 @@ func newMetricsExporter( // Disable exporterhelper Timeout, since we are using a custom mechanism // within exporter itself exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithQueue(cfg.QueueSettings), exporterhelper.WithStart(se.start), ) } // start starts the exporter -func (se *sumologicexporter) start(_ context.Context, host component.Host) (err error) { - client, err := se.config.HTTPClientSettings.ToClient(host, se.settings) +func (se *sumologicexporter) start(ctx context.Context, host component.Host) (err error) { + client, err := se.config.ClientConfig.ToClientContext(ctx, host, se.settings) if err != nil { return fmt.Errorf("failed to create HTTP Client: %w", err) } diff --git a/exporter/sumologicexporter/exporter_test.go b/exporter/sumologicexporter/exporter_test.go index 70b456c574d2..5a9a95879166 100644 --- a/exporter/sumologicexporter/exporter_test.go +++ b/exporter/sumologicexporter/exporter_test.go @@ -35,7 +35,7 @@ func TestInitExporter(t *testing.T) { LogFormat: "json", MetricFormat: "carbon2", CompressEncoding: "gzip", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: defaultTimeout, Endpoint: "test_endpoint", }, @@ -45,7 +45,7 @@ func TestInitExporter(t *testing.T) { func TestAllSuccess(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) assert.Equal(t, `Example log`, body) assert.Equal(t, "", req.Header.Get("X-Sumo-Fields")) @@ -61,7 +61,7 @@ func TestAllSuccess(t *testing.T) { func TestResourceMerge(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) assert.Equal(t, `Example log`, body) assert.Equal(t, "key1=original_value, key2=additional_value", req.Header.Get("X-Sumo-Fields")) @@ -113,7 +113,7 @@ func TestPartiallyFailed(t *testing.T) { assert.Equal(t, "Example log", body) assert.Equal(t, "key1=value1, key2=value2", req.Header.Get("X-Sumo-Fields")) }, - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) assert.Equal(t, "Another example log", body) assert.Equal(t, "key3=value3, key4=value4", req.Header.Get("X-Sumo-Fields")) @@ -142,7 +142,7 @@ func TestInvalidSourceFormats(t *testing.T) { LogFormat: "json", MetricFormat: "carbon2", CompressEncoding: "gzip", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Timeout: defaultTimeout, Endpoint: "test_endpoint", }, @@ -156,9 +156,9 @@ func TestInvalidHTTPCLient(t *testing.T) { LogFormat: "json", MetricFormat: "carbon2", CompressEncoding: "gzip", - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "test_endpoint", - CustomRoundTripper: func(next http.RoundTripper) (http.RoundTripper, error) { + CustomRoundTripper: func(_ http.RoundTripper) (http.RoundTripper, error) { return nil, errors.New("roundTripperException") }, }, @@ -172,7 +172,7 @@ func TestInvalidHTTPCLient(t *testing.T) { func TestPushInvalidCompressor(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) assert.Equal(t, `Example log`, body) assert.Equal(t, "", req.Header.Get("X-Sumo-Fields")) @@ -228,7 +228,7 @@ func TestPushFailedBatch(t *testing.T) { func TestAllMetricsSuccess(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) expected := `test_metric_data{test="test_value",test2="second_value"} 14500 1605534165000 gauge_metric_name{foo="bar",remote_name="156920",url="http://example_url"} 124 1608124661166 @@ -288,7 +288,7 @@ func TestMetricsPartiallyFailed(t *testing.T) { assert.Equal(t, expected, body) assert.Equal(t, "application/vnd.sumologic.prometheus", req.Header.Get("Content-Type")) }, - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) expected := `gauge_metric_name{foo="bar",remote_name="156920",url="http://example_url"} 124 1608124661166 gauge_metric_name{foo="bar",remote_name="156955",url="http://another_url"} 245 1608124662166` @@ -317,7 +317,7 @@ gauge_metric_name{foo="bar",remote_name="156955",url="http://another_url"} 245 1 func TestPushMetricsInvalidCompressor(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) assert.Equal(t, `Example log`, body) assert.Equal(t, "", req.Header.Get("X-Sumo-Fields")) @@ -346,7 +346,7 @@ func TestMetricsDifferentMetadata(t *testing.T) { assert.Equal(t, expected, body) assert.Equal(t, "application/vnd.sumologic.prometheus", req.Header.Get("Content-Type")) }, - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) expected := `gauge_metric_name{foo="bar",key2="value2",remote_name="156920",url="http://example_url"} 124 1608124661166 gauge_metric_name{foo="bar",key2="value2",remote_name="156955",url="http://another_url"} 245 1608124662166` diff --git a/exporter/sumologicexporter/factory.go b/exporter/sumologicexporter/factory.go index 169f1149ce46..dadb64969fea 100644 --- a/exporter/sumologicexporter/factory.go +++ b/exporter/sumologicexporter/factory.go @@ -10,6 +10,7 @@ import ( "fmt" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -42,9 +43,9 @@ func createDefaultConfig() component.Config { Client: DefaultClient, GraphiteTemplate: DefaultGraphiteTemplate, - HTTPClientSettings: createDefaultHTTPClientSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), - QueueSettings: qs, + ClientConfig: createDefaultClientConfig(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), + QueueSettings: qs, } } diff --git a/exporter/sumologicexporter/factory_test.go b/exporter/sumologicexporter/factory_test.go index 854ec4bc6af7..c37ad2e8ebb3 100644 --- a/exporter/sumologicexporter/factory_test.go +++ b/exporter/sumologicexporter/factory_test.go @@ -8,16 +8,18 @@ import ( "time" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" + + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter/internal/metadata" ) func TestType(t *testing.T) { factory := NewFactory() pType := factory.Type() - assert.Equal(t, pType, component.Type("sumologic")) + assert.Equal(t, pType, metadata.Type) } func TestCreateDefaultConfig(t *testing.T) { @@ -37,10 +39,12 @@ func TestCreateDefaultConfig(t *testing.T) { Client: "otelcol", GraphiteTemplate: "%{_metric_}", - HTTPClientSettings: confighttp.HTTPClientSettings{ - Timeout: 5 * time.Second, + ClientConfig: confighttp.ClientConfig{ + IdleConnTimeout: confighttp.NewDefaultClientConfig().IdleConnTimeout, + MaxIdleConns: confighttp.NewDefaultClientConfig().MaxIdleConns, + Timeout: 5 * time.Second, }, - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: qs, }) assert.NoError(t, componenttest.CheckConfigStruct(cfg)) diff --git a/exporter/sumologicexporter/generated_component_test.go b/exporter/sumologicexporter/generated_component_test.go new file mode 100644 index 000000000000..9dc51201a441 --- /dev/null +++ b/exporter/sumologicexporter/generated_component_test.go @@ -0,0 +1,94 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package sumologicexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/sumologicexporter/go.mod b/exporter/sumologicexporter/go.mod index 10fb6baf1f13..fb1809c82e89 100644 --- a/exporter/sumologicexporter/go.mod +++ b/exporter/sumologicexporter/go.mod @@ -1,63 +1,76 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/stretchr/testify v1.9.0 + go.opencensus.io v0.24.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/sumologicexporter/go.sum b/exporter/sumologicexporter/go.sum index da08e8ce56ea..af56edd0819d 100644 --- a/exporter/sumologicexporter/go.sum +++ b/exporter/sumologicexporter/go.sum @@ -1,11 +1,12 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -19,18 +20,18 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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 h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -54,29 +55,31 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ 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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -86,13 +89,17 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= 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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -102,61 +109,70 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -175,8 +191,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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= @@ -187,8 +203,8 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -210,15 +226,15 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= 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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -230,11 +246,11 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/sumologicexporter/internal/metadata/generated_status.go b/exporter/sumologicexporter/internal/metadata/generated_status.go index c230f2f43bf5..68e1ef803a9f 100644 --- a/exporter/sumologicexporter/internal/metadata/generated_status.go +++ b/exporter/sumologicexporter/internal/metadata/generated_status.go @@ -4,10 +4,23 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("sumologic") ) const ( - Type = "sumologic" MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/sumologic") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/sumologic") +} diff --git a/exporter/sumologicexporter/internal/observability/observability.go b/exporter/sumologicexporter/internal/observability/observability.go new file mode 100644 index 000000000000..8476713bd2c7 --- /dev/null +++ b/exporter/sumologicexporter/internal/observability/observability.go @@ -0,0 +1,126 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package observability // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter/internal/observability" + +import ( + "context" + "fmt" + "time" + + "go.opencensus.io/stats" + "go.opencensus.io/stats/view" + "go.opencensus.io/tag" +) + +func init() { + err := view.Register( + viewRequestsSent, + viewRequestsDuration, + viewRequestsBytes, + viewRequestsRecords, + ) + if err != nil { + fmt.Printf("Failed to register sumologic exporter's views: %v\n", err) + } +} + +var ( + mRequestsSent = stats.Int64("exporter/requests/sent", "Number of requests", "1") + mRequestsDuration = stats.Int64("exporter/requests/duration", "Duration of HTTP requests (in milliseconds)", "0") + mRequestsBytes = stats.Int64("exporter/requests/bytes", "Total size of requests (in bytes)", "0") + mRequestsRecords = stats.Int64("exporter/requests/records", "Total size of requests (in number of records)", "0") + + statusKey, _ = tag.NewKey("status_code") // nolint:errcheck + endpointKey, _ = tag.NewKey("endpoint") // nolint:errcheck + pipelineKey, _ = tag.NewKey("pipeline") // nolint:errcheck + exporterKey, _ = tag.NewKey("exporter") // nolint:errcheck +) + +var viewRequestsSent = &view.View{ + Name: mRequestsSent.Name(), + Description: mRequestsSent.Description(), + Measure: mRequestsSent, + TagKeys: []tag.Key{statusKey, endpointKey, pipelineKey, exporterKey}, + Aggregation: view.Count(), +} + +var viewRequestsDuration = &view.View{ + Name: mRequestsDuration.Name(), + Description: mRequestsDuration.Description(), + Measure: mRequestsDuration, + TagKeys: []tag.Key{statusKey, endpointKey, pipelineKey, exporterKey}, + Aggregation: view.Sum(), +} + +var viewRequestsBytes = &view.View{ + Name: mRequestsBytes.Name(), + Description: mRequestsBytes.Description(), + Measure: mRequestsBytes, + TagKeys: []tag.Key{statusKey, endpointKey, pipelineKey, exporterKey}, + Aggregation: view.Sum(), +} + +var viewRequestsRecords = &view.View{ + Name: mRequestsRecords.Name(), + Description: mRequestsRecords.Description(), + Measure: mRequestsRecords, + TagKeys: []tag.Key{statusKey, endpointKey, pipelineKey, exporterKey}, + Aggregation: view.Sum(), +} + +// RecordRequestsSent increments the metric that records sent requests +func RecordRequestsSent(statusCode int, endpoint string, pipeline string, exporter string) error { + return stats.RecordWithTags( + context.Background(), + []tag.Mutator{ + tag.Insert(statusKey, fmt.Sprint(statusCode)), + tag.Insert(endpointKey, endpoint), + tag.Insert(pipelineKey, pipeline), + tag.Insert(exporterKey, exporter), + }, + mRequestsSent.M(int64(1)), + ) +} + +// RecordRequestsDuration update metric which records request duration +func RecordRequestsDuration(duration time.Duration, statusCode int, endpoint string, pipeline string, exporter string) error { + return stats.RecordWithTags( + context.Background(), + []tag.Mutator{ + tag.Insert(statusKey, fmt.Sprint(statusCode)), + tag.Insert(endpointKey, endpoint), + tag.Insert(pipelineKey, pipeline), + tag.Insert(exporterKey, exporter), + }, + mRequestsDuration.M(duration.Milliseconds()), + ) +} + +// RecordRequestsBytes update metric which records number of send bytes +func RecordRequestsBytes(bytes int64, statusCode int, endpoint string, pipeline string, exporter string) error { + return stats.RecordWithTags( + context.Background(), + []tag.Mutator{ + tag.Insert(statusKey, fmt.Sprint(statusCode)), + tag.Insert(endpointKey, endpoint), + tag.Insert(pipelineKey, pipeline), + tag.Insert(exporterKey, exporter), + }, + mRequestsBytes.M(bytes), + ) +} + +// RecordRequestsRecords update metric which records number of sent records +func RecordRequestsRecords(records int64, statusCode int, endpoint string, pipeline string, exporter string) error { + return stats.RecordWithTags( + context.Background(), + []tag.Mutator{ + tag.Insert(statusKey, fmt.Sprint(statusCode)), + tag.Insert(endpointKey, endpoint), + tag.Insert(pipelineKey, pipeline), + tag.Insert(exporterKey, exporter), + }, + mRequestsRecords.M(records), + ) +} diff --git a/exporter/sumologicexporter/internal/observability/observability_test.go b/exporter/sumologicexporter/internal/observability/observability_test.go new file mode 100644 index 000000000000..321394115ac8 --- /dev/null +++ b/exporter/sumologicexporter/internal/observability/observability_test.go @@ -0,0 +1,177 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package observability // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter/internal/observability" + +import ( + "context" + "sort" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opencensus.io/metric/metricdata" + "go.opencensus.io/metric/metricexport" +) + +type exporter struct { + pipe chan *metricdata.Metric +} + +func newExporter() *exporter { + return &exporter{ + make(chan *metricdata.Metric), + } +} + +// Run goroutine which is going to receive `after` metrics. +// Goroutine is writing to returned chan +func (e *exporter) ReturnAfter(after int) chan []*metricdata.Metric { + ch := make(chan []*metricdata.Metric) + go func() { + received := []*metricdata.Metric{} + for m := range e.pipe { + received = append(received, m) + if len(received) >= after { + break + } + } + ch <- received + }() + return ch +} + +// Write received metrics to data channel +func (e *exporter) ExportMetrics(_ context.Context, data []*metricdata.Metric) error { + for _, m := range data { + e.pipe <- m + } + return nil +} + +// Creates metrics reader and forward metrics from it to chData +// Sens empty structs to fail chan afterwards +func metricReader(chData chan []*metricdata.Metric, fail chan struct{}, count int) { + + // Add a manual retry mechanism in case there's a hiccup reading the + // metrics from producers in ReadAndExport(): we can wait for the metrics + // to come instead of failing because they didn't come right away. + for i := 0; i < 10; i++ { + e := newExporter() + ch := e.ReturnAfter(count) + go metricexport.NewReader().ReadAndExport(e) + + select { + case <-time.After(500 * time.Millisecond): + + case data := <-ch: + chData <- data + return + } + } + + fail <- struct{}{} +} + +// NOTE: +// This test can only be run with -count 1 because of static +// metricproducer.GlobalManager() used in metricexport.NewReader(). +func TestMetrics(t *testing.T) { + const ( + statusCode = 200 + endpoint = "some/uri" + pipeline = "metrics" + exporter = "sumologic/my-name" + bytesFunc = "bytes" + recordsFunc = "records" + durationFunc = "duration" + sentFunc = "sent" + ) + type testCase struct { + name string + bytes int64 + records int64 + recordFunc string + duration time.Duration + } + tests := []testCase{ + { + name: "exporter/requests/sent", + recordFunc: sentFunc, + }, + { + name: "exporter/requests/duration", + recordFunc: durationFunc, + duration: time.Millisecond, + }, + { + name: "exporter/requests/bytes", + recordFunc: bytesFunc, + bytes: 1, + }, + { + name: "exporter/requests/records", + recordFunc: recordsFunc, + records: 1, + }, + } + + var ( + fail = make(chan struct{}) + chData = make(chan []*metricdata.Metric) + ) + + go metricReader(chData, fail, len(tests)) + + for _, tt := range tests { + switch tt.recordFunc { + case sentFunc: + require.NoError(t, RecordRequestsSent(statusCode, endpoint, pipeline, exporter)) + case durationFunc: + require.NoError(t, RecordRequestsDuration(tt.duration, statusCode, endpoint, pipeline, exporter)) + case bytesFunc: + require.NoError(t, RecordRequestsBytes(tt.bytes, statusCode, endpoint, pipeline, exporter)) + case recordsFunc: + require.NoError(t, RecordRequestsRecords(tt.records, statusCode, endpoint, pipeline, exporter)) + } + } + + var data []*metricdata.Metric + select { + case <-fail: + t.Fatalf("timedout waiting for metrics to arrive") + case data = <-chData: + } + + sort.Slice(tests, func(i, j int) bool { + return tests[i].name < tests[j].name + }) + + sort.Slice(data, func(i, j int) bool { + return data[i].Descriptor.Name < data[j].Descriptor.Name + }) + + for i, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + require.Len(t, data, len(tests)) + d := data[i] + assert.Equal(t, tt.name, d.Descriptor.Name, "Expected %v at index %v, but got %v.", tt.name, i, d.Descriptor.Name) + require.Len(t, d.TimeSeries, 1) + require.Len(t, d.TimeSeries[0].Points, 1) + assert.Equal(t, d.TimeSeries[0].Points[0].Value, int64(1)) + + require.Len(t, d.TimeSeries[0].LabelValues, 4) + + require.True(t, d.TimeSeries[0].LabelValues[0].Present) + require.True(t, d.TimeSeries[0].LabelValues[1].Present) + require.True(t, d.TimeSeries[0].LabelValues[2].Present) + require.True(t, d.TimeSeries[0].LabelValues[3].Present) + + assert.Equal(t, d.TimeSeries[0].LabelValues[0].Value, "some/uri") + assert.Equal(t, d.TimeSeries[0].LabelValues[1].Value, "sumologic/my-name") + assert.Equal(t, d.TimeSeries[0].LabelValues[2].Value, "metrics") + assert.Equal(t, d.TimeSeries[0].LabelValues[3].Value, "200") + }) + } +} diff --git a/exporter/sumologicexporter/metadata.yaml b/exporter/sumologicexporter/metadata.yaml index 7b7e746efafa..219657ea0094 100644 --- a/exporter/sumologicexporter/metadata.yaml +++ b/exporter/sumologicexporter/metadata.yaml @@ -1,4 +1,5 @@ type: sumologic +scope_name: otelcol/sumologic status: class: exporter @@ -7,3 +8,7 @@ status: distributions: [contrib] codeowners: active: [sumo-drosiek] + +# TODO: Update the exporter to pass the tests +tests: + skip_lifecycle: true diff --git a/exporter/sumologicexporter/sender.go b/exporter/sumologicexporter/sender.go index 08dfec87a2aa..0b7f0b516ff9 100644 --- a/exporter/sumologicexporter/sender.go +++ b/exporter/sumologicexporter/sender.go @@ -97,7 +97,7 @@ func (s *sender) send(ctx context.Context, pipeline PipelineType, body io.Reader if err != nil { return err } - req, err := http.NewRequestWithContext(ctx, http.MethodPost, s.config.HTTPClientSettings.Endpoint, data) + req, err := http.NewRequestWithContext(ctx, http.MethodPost, s.config.ClientConfig.Endpoint, data) if err != nil { return err } diff --git a/exporter/sumologicexporter/sender_test.go b/exporter/sumologicexporter/sender_test.go index 68c6bb47efb7..5cf4a1e1b6a4 100644 --- a/exporter/sumologicexporter/sender_test.go +++ b/exporter/sumologicexporter/sender_test.go @@ -42,7 +42,7 @@ func prepareSenderTest(t *testing.T, cb []func(w http.ResponseWriter, req *http. })) cfg := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: testServer.URL, Timeout: defaultTimeout, }, @@ -73,7 +73,7 @@ func prepareSenderTest(t *testing.T, cb []func(w http.ResponseWriter, req *http. s: newSender( cfg, &http.Client{ - Timeout: cfg.HTTPClientSettings.Timeout, + Timeout: cfg.ClientConfig.Timeout, }, f, sourceFormats{ @@ -168,7 +168,7 @@ func exampleMultitypeLogs() []plog.LogRecord { func TestSendLogs(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) assert.Equal(t, "Example log\nAnother example log", body) assert.Equal(t, "key1=value, key2=value2", req.Header.Get("X-Sumo-Fields")) @@ -186,7 +186,7 @@ func TestSendLogs(t *testing.T) { func TestSendLogsMultitype(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) expected := `{"lk1":"lv1","lk2":13} ["lv2",13]` @@ -206,11 +206,11 @@ func TestSendLogsMultitype(t *testing.T) { func TestSendLogsSplit(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) assert.Equal(t, "Example log", body) }, - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) assert.Equal(t, "Another example log", body) }, @@ -230,7 +230,7 @@ func TestSendLogsSplitFailedOne(t *testing.T) { body := extractBody(t, req) assert.Equal(t, "Example log", body) }, - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) assert.Equal(t, "Another example log", body) }, @@ -276,7 +276,7 @@ func TestSendLogsSplitFailedAll(t *testing.T) { func TestSendLogsJson(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) expected := `{"key1":"value1","key2":"value2","log":"Example log"} {"key1":"value1","key2":"value2","log":"Another example log"}` @@ -296,7 +296,7 @@ func TestSendLogsJson(t *testing.T) { func TestSendLogsJsonMultitype(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) expected := `{"key1":"value1","key2":"value2","log":{"lk1":"lv1","lk2":13}} {"key1":"value1","key2":"value2","log":["lv2",13]}` @@ -316,11 +316,11 @@ func TestSendLogsJsonMultitype(t *testing.T) { func TestSendLogsJsonSplit(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) assert.Equal(t, `{"key1":"value1","key2":"value2","log":"Example log"}`, body) }, - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) assert.Equal(t, `{"key1":"value1","key2":"value2","log":"Another example log"}`, body) }, @@ -342,7 +342,7 @@ func TestSendLogsJsonSplitFailedOne(t *testing.T) { body := extractBody(t, req) assert.Equal(t, `{"key1":"value1","key2":"value2","log":"Example log"}`, body) }, - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) assert.Equal(t, `{"key1":"value1","key2":"value2","log":"Another example log"}`, body) }, @@ -388,7 +388,7 @@ func TestSendLogsJsonSplitFailedAll(t *testing.T) { func TestSendLogsUnexpectedFormat(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, _ *http.Request) { }, }) defer func() { test.srv.Close() }() @@ -403,7 +403,7 @@ func TestSendLogsUnexpectedFormat(t *testing.T) { func TestOverrideSourceName(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { assert.Equal(t, "Test source name/test_name", req.Header.Get("X-Sumo-Name")) }, }) @@ -418,7 +418,7 @@ func TestOverrideSourceName(t *testing.T) { func TestOverrideSourceCategory(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { assert.Equal(t, "Test source category/test_name", req.Header.Get("X-Sumo-Category")) }, }) @@ -433,7 +433,7 @@ func TestOverrideSourceCategory(t *testing.T) { func TestOverrideSourceHost(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { assert.Equal(t, "Test source host/test_name", req.Header.Get("X-Sumo-Host")) }, }) @@ -474,7 +474,7 @@ func TestInvalidEndpoint(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){}) defer func() { test.srv.Close() }() - test.s.config.HTTPClientSettings.Endpoint = ":" + test.s.config.ClientConfig.Endpoint = ":" test.s.logBuffer = exampleLog() _, err := test.s.sendLogs(context.Background(), newFields(pcommon.NewMap())) @@ -485,7 +485,7 @@ func TestInvalidPostRequest(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){}) defer func() { test.srv.Close() }() - test.s.config.HTTPClientSettings.Endpoint = "" + test.s.config.ClientConfig.Endpoint = "" test.s.logBuffer = exampleLog() _, err := test.s.sendLogs(context.Background(), newFields(pcommon.NewMap())) @@ -496,7 +496,7 @@ func TestLogsBufferOverflow(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){}) defer func() { test.srv.Close() }() - test.s.config.HTTPClientSettings.Endpoint = ":" + test.s.config.ClientConfig.Endpoint = ":" log := exampleLog() flds := newFields(pcommon.NewMap()) @@ -602,7 +602,7 @@ func TestInvalidContentEncoding(t *testing.T) { func TestSendMetrics(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) expected := `test_metric_data{test="test_value",test2="second_value"} 14500 1605534165000 gauge_metric_name{foo="bar",remote_name="156920",url="http://example_url"} 124 1608124661166 @@ -629,12 +629,12 @@ gauge_metric_name{foo="bar",remote_name="156955",url="http://another_url"} 245 1 func TestSendMetricsSplit(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) expected := `test_metric_data{test="test_value",test2="second_value"} 14500 1605534165000` assert.Equal(t, expected, body) }, - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) expected := `gauge_metric_name{foo="bar",remote_name="156920",url="http://example_url"} 124 1608124661166 gauge_metric_name{foo="bar",remote_name="156955",url="http://another_url"} 245 1608124662166` @@ -662,7 +662,7 @@ func TestSendMetricsSplitFailedOne(t *testing.T) { expected := `test_metric_data{test="test_value",test2="second_value"} 14500 1605534165000` assert.Equal(t, expected, body) }, - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) expected := `gauge_metric_name{foo="bar",remote_name="156920",url="http://example_url"} 124 1608124661166 gauge_metric_name{foo="bar",remote_name="156955",url="http://another_url"} 245 1608124662166` @@ -719,7 +719,7 @@ gauge_metric_name{foo="bar",remote_name="156955",url="http://another_url"} 245 1 func TestSendMetricsUnexpectedFormat(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, _ *http.Request) { }, }) defer func() { test.srv.Close() }() @@ -766,7 +766,7 @@ func TestMetricsBufferOverflow(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){}) defer func() { test.srv.Close() }() - test.s.config.HTTPClientSettings.Endpoint = ":" + test.s.config.ClientConfig.Endpoint = ":" test.s.config.MetricFormat = PrometheusFormat test.s.config.MaxRequestBodySize = 1024 * 1024 * 1024 * 1024 metric := exampleIntMetric() @@ -784,7 +784,7 @@ func TestMetricsBufferOverflow(t *testing.T) { func TestSendCarbon2Metrics(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) expected := `test=test_value test2=second_value _unit=m/s escape_me=:invalid_ metric=true metric=test.metric.data unit=bytes 14500 1605534165 foo=bar metric=gauge_metric_name 124 1608124661 @@ -817,7 +817,7 @@ foo=bar metric=gauge_metric_name 245 1608124662` func TestSendGraphiteMetrics(t *testing.T) { test := prepareSenderTest(t, []func(w http.ResponseWriter, req *http.Request){ - func(w http.ResponseWriter, req *http.Request) { + func(_ http.ResponseWriter, req *http.Request) { body := extractBody(t, req) expected := `test_metric_data.true.m/s 14500 1605534165 gauge_metric_name.. 124 1608124661 diff --git a/exporter/syslogexporter/README.md b/exporter/syslogexporter/README.md index fb530780777c..08457ec06fe2 100644 --- a/exporter/syslogexporter/README.md +++ b/exporter/syslogexporter/README.md @@ -4,11 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [alpha]: logs | -| Distributions | [] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fsyslog%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fsyslog) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fsyslog%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fsyslog) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@kkujawa-sumo](https://www.github.com/kkujawa-sumo), [@rnishtala-sumo](https://www.github.com/rnishtala-sumo), [@astencel-sumo](https://www.github.com/astencel-sumo) | [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib The Syslog exporter sends logs in [syslog][syslog_wikipedia] format to a remote syslog server. @@ -26,7 +27,8 @@ This means that syslog messages received via the Syslog receiver and exported vi - `protocol` - (default = `rfc5424`) rfc5424/rfc3164 - `rfc5424` - Expects the syslog messages to be rfc5424 compliant - `rfc3164` - Expects the syslog messages to be rfc3164 compliant -- `tls` - configuration for TLS/mTLS +- `enable_octet_counting` (default = `false`) - Whether or not to enable rfc6587 octet counting +- `tls` - configuration for TLS/mTLS (applied only when `network` is set to `tcp`) - `insecure` (default = `false`) whether to enable client transport security, by default, TLS is enabled. - `cert_file` - Path to the TLS cert to use for TLS required connections. Should only be used if `insecure` is set to `false`. - `key_file` - Path to the TLS key to use for TLS required connections. Should only be used if `insecure` is set to `false`. diff --git a/exporter/syslogexporter/config.go b/exporter/syslogexporter/config.go index ea3fbbc75ffd..31f0c0c4bfc1 100644 --- a/exporter/syslogexporter/config.go +++ b/exporter/syslogexporter/config.go @@ -7,6 +7,7 @@ import ( "errors" "strings" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/multierr" @@ -17,6 +18,7 @@ var ( errInvalidEndpoint = errors.New("invalid endpoint: endpoint is required but it is not configured") errUnsupportedNetwork = errors.New("unsupported network: network is required, only tcp/udp supported") errUnsupportedProtocol = errors.New("unsupported protocol: Only rfc5424 and rfc3164 supported") + errOctetCounting = errors.New("octet counting is only supported for rfc5424 protocol") ) // Config defines configuration for Syslog exporter. @@ -32,11 +34,14 @@ type Config struct { // options: rfc5424, rfc3164 Protocol string `mapstructure:"protocol"` + // Wether or not to enable RFC 6587 Octet Counting. + EnableOctetCounting bool `mapstructure:"enable_octet_counting"` + // TLSSetting struct exposes TLS client configuration. - TLSSetting configtls.TLSClientSetting `mapstructure:"tls"` + TLSSetting configtls.ClientConfig `mapstructure:"tls"` exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct } @@ -62,6 +67,10 @@ func (cfg *Config) Validate() error { invalidFields = append(invalidFields, errUnsupportedProtocol) } + if cfg.EnableOctetCounting && cfg.Protocol != protocolRFC5424Str { + invalidFields = append(invalidFields, errOctetCounting) + } + if len(invalidFields) > 0 { return multierr.Combine(invalidFields...) } diff --git a/exporter/syslogexporter/exporter.go b/exporter/syslogexporter/exporter.go index c96274ee0d62..890b1071559e 100644 --- a/exporter/syslogexporter/exporter.go +++ b/exporter/syslogexporter/exporter.go @@ -25,18 +25,22 @@ type syslogexporter struct { } func initExporter(cfg *Config, createSettings exporter.CreateSettings) (*syslogexporter, error) { - tlsConfig, err := cfg.TLSSetting.LoadTLSConfig() - if err != nil { - return nil, err - } - cfg.Network = strings.ToLower(cfg.Network) + var loadedTLSConfig *tls.Config + if cfg.Network == "tcp" { + var err error + loadedTLSConfig, err = cfg.TLSSetting.LoadTLSConfig() + if err != nil { + return nil, err + } + } + s := &syslogexporter{ config: cfg, logger: createSettings.Logger, - tlsConfig: tlsConfig, - formatter: createFormatter(cfg.Protocol), + tlsConfig: loadedTLSConfig, + formatter: createFormatter(cfg.Protocol, cfg.EnableOctetCounting), } s.logger.Info("Syslog Exporter configured", @@ -64,7 +68,7 @@ func newLogsExporter( cfg, s.pushLogsData, exporterhelper.WithTimeout(cfg.TimeoutSettings), - exporterhelper.WithRetry(cfg.RetrySettings), + exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithQueue(cfg.QueueSettings), ) } diff --git a/exporter/syslogexporter/exporter_test.go b/exporter/syslogexporter/exporter_test.go index 58cdb03a61aa..189e89e73f40 100644 --- a/exporter/syslogexporter/exporter_test.go +++ b/exporter/syslogexporter/exporter_test.go @@ -5,6 +5,7 @@ package syslogexporter import ( "context" + "crypto/tls" "errors" "io" "net" @@ -15,6 +16,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/pdata/pcommon" @@ -183,3 +185,55 @@ func TestSyslogExportFail(t *testing.T) { assert.ErrorContains(t, consumerErr, "dial tcp 127.0.0.1:112: connect") assert.Equal(t, droppedLog, originalForm) } + +func TestTLSConfig(t *testing.T) { + + tests := []struct { + name string + network string + tlsSettings configtls.ClientConfig + tlsConfig *tls.Config + }{ + {name: "TCP with TLS configuration", + network: "tcp", + tlsSettings: configtls.ClientConfig{}, + tlsConfig: &tls.Config{}, + }, + {name: "TCP insecure", + network: "tcp", + tlsSettings: configtls.ClientConfig{Insecure: true}, + tlsConfig: nil, + }, + {name: "UDP with TLS configuration", + network: "udp", + tlsSettings: configtls.ClientConfig{}, + tlsConfig: nil, + }, + {name: "UDP insecure", + network: "udp", + tlsSettings: configtls.ClientConfig{Insecure: true}, + tlsConfig: nil, + }, + } + + for _, testInstance := range tests { + t.Run(testInstance.name, func(t *testing.T) { + + exporter, err := initExporter( + &Config{Endpoint: "test.com", + Network: testInstance.network, + Port: 514, + Protocol: "rfc5424", + TLSSetting: testInstance.tlsSettings}, + createExporterCreateSettings()) + + assert.NoError(t, err) + if testInstance.tlsConfig != nil { + assert.NotNil(t, exporter.tlsConfig) + } else { + assert.Nil(t, exporter.tlsConfig) + } + + }) + } +} diff --git a/exporter/syslogexporter/factory.go b/exporter/syslogexporter/factory.go index d922688b437b..6234c41347de 100644 --- a/exporter/syslogexporter/factory.go +++ b/exporter/syslogexporter/factory.go @@ -8,6 +8,7 @@ import ( "fmt" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -31,7 +32,7 @@ func createDefaultConfig() component.Config { Port: DefaultPort, Network: DefaultNetwork, Protocol: DefaultProtocol, - RetrySettings: exporterhelper.NewDefaultRetrySettings(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: qs, TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), } diff --git a/exporter/syslogexporter/factory_test.go b/exporter/syslogexporter/factory_test.go index 3f547388e353..47cfc42a35d2 100644 --- a/exporter/syslogexporter/factory_test.go +++ b/exporter/syslogexporter/factory_test.go @@ -9,14 +9,16 @@ import ( "github.com/cenkalti/backoff/v4" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" + + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter/internal/metadata" ) func TestType(t *testing.T) { factory := NewFactory() pType := factory.Type() - assert.Equal(t, pType, component.Type("syslog")) + assert.Equal(t, pType, metadata.Type) } func TestCreateDefaultConfig(t *testing.T) { @@ -31,7 +33,7 @@ func TestCreateDefaultConfig(t *testing.T) { NumConsumers: 10, QueueSize: 1000, }, - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 5 * time.Second, RandomizationFactor: backoff.DefaultRandomizationFactor, diff --git a/exporter/syslogexporter/formatter.go b/exporter/syslogexporter/formatter.go index c184ce2813e6..2b0a127aca46 100644 --- a/exporter/syslogexporter/formatter.go +++ b/exporter/syslogexporter/formatter.go @@ -7,9 +7,9 @@ import ( "go.opentelemetry.io/collector/pdata/plog" ) -func createFormatter(protocol string) formatter { +func createFormatter(protocol string, octetCounting bool) formatter { if protocol == protocolRFC5424Str { - return newRFC5424Formatter() + return newRFC5424Formatter(octetCounting) } return newRFC3164Formatter() } diff --git a/exporter/syslogexporter/generated_component_test.go b/exporter/syslogexporter/generated_component_test.go new file mode 100644 index 000000000000..4acdd30f1a29 --- /dev/null +++ b/exporter/syslogexporter/generated_component_test.go @@ -0,0 +1,87 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package syslogexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/syslogexporter/go.mod b/exporter/syslogexporter/go.mod index a0b104a038fb..0ac751bf3c43 100644 --- a/exporter/syslogexporter/go.mod +++ b/exporter/syslogexporter/go.mod @@ -1,53 +1,65 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/google/uuid v1.6.0 // 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 - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 + github.com/cenkalti/backoff/v4 v4.3.0 github.com/davecgh/go-spew v1.1.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 go.uber.org/multierr v1.11.0 - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/syslogexporter/go.sum b/exporter/syslogexporter/go.sum index cf50e9a2e581..e9f1365b1ff0 100644 --- a/exporter/syslogexporter/go.sum +++ b/exporter/syslogexporter/go.sum @@ -1,56 +1,32 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -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/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -59,15 +35,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -77,104 +52,90 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -182,38 +143,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/syslogexporter/internal/metadata/generated_status.go b/exporter/syslogexporter/internal/metadata/generated_status.go index 7b226c8c8706..4d8055eb7c1f 100644 --- a/exporter/syslogexporter/internal/metadata/generated_status.go +++ b/exporter/syslogexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("syslog") ) const ( - Type = "syslog" LogsStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/syslog") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/syslog") +} diff --git a/exporter/syslogexporter/metadata.yaml b/exporter/syslogexporter/metadata.yaml index 35ac5f4da970..8c0c3204e25f 100644 --- a/exporter/syslogexporter/metadata.yaml +++ b/exporter/syslogexporter/metadata.yaml @@ -1,8 +1,14 @@ type: syslog +scope_name: otelcol/syslog status: class: exporter stability: alpha: [logs] + distributions: [contrib] codeowners: active: [kkujawa-sumo, rnishtala-sumo, astencel-sumo] + +# TODO: Update the exporter to pass the tests +tests: + skip_lifecycle: true diff --git a/exporter/syslogexporter/package_test.go b/exporter/syslogexporter/package_test.go new file mode 100644 index 000000000000..70ac459041ec --- /dev/null +++ b/exporter/syslogexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package syslogexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/syslogexporter/rfc5424_formatter.go b/exporter/syslogexporter/rfc5424_formatter.go index 53e1bb872cc1..f13398f84703 100644 --- a/exporter/syslogexporter/rfc5424_formatter.go +++ b/exporter/syslogexporter/rfc5424_formatter.go @@ -13,10 +13,13 @@ import ( ) type rfc5424Formatter struct { + octetCounting bool } -func newRFC5424Formatter() *rfc5424Formatter { - return &rfc5424Formatter{} +func newRFC5424Formatter(octetCounting bool) *rfc5424Formatter { + return &rfc5424Formatter{ + octetCounting: octetCounting, + } } func (f *rfc5424Formatter) format(logRecord plog.LogRecord) string { @@ -30,6 +33,11 @@ func (f *rfc5424Formatter) format(logRecord plog.LogRecord) string { structuredData := f.formatStructuredData(logRecord) messageString := f.formatMessage(logRecord) formatted := fmt.Sprintf("<%s>%s %s %s %s %s %s %s%s\n", priorityString, versionString, timestampString, hostnameString, appnameString, pidString, messageIDString, structuredData, messageString) + + if f.octetCounting { + formatted = fmt.Sprintf("%d %s", len(formatted), formatted) + } + return formatted } diff --git a/exporter/syslogexporter/rfc5424_formatter_test.go b/exporter/syslogexporter/rfc5424_formatter_test.go index d88fb9f53a88..e74a052e2e13 100644 --- a/exporter/syslogexporter/rfc5424_formatter_test.go +++ b/exporter/syslogexporter/rfc5424_formatter_test.go @@ -29,8 +29,10 @@ func TestRFC5424Formatter(t *testing.T) { require.NoError(t, err) logRecord.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) - actual := newRFC5424Formatter().format(logRecord) + actual := newRFC5424Formatter(false).format(logRecord) assert.Equal(t, expected, actual) + octetCounting := newRFC5424Formatter(true).format(logRecord) + assert.Equal(t, fmt.Sprintf("%d %s", len(expected), expected), octetCounting) expected = "<165>1 2003-10-11T22:14:15.003Z mymachine.example.com evntslog 111 ID47 - BOMAn application event log entry...\n" logRecord = plog.NewLogRecord() @@ -45,8 +47,10 @@ func TestRFC5424Formatter(t *testing.T) { require.NoError(t, err) logRecord.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) - actual = newRFC5424Formatter().format(logRecord) + actual = newRFC5424Formatter(false).format(logRecord) assert.Equal(t, expected, actual) + octetCounting = newRFC5424Formatter(true).format(logRecord) + assert.Equal(t, fmt.Sprintf("%d %s", len(expected), expected), octetCounting) // Test structured data expectedRegex := "\\<165\\>1 2003-08-24T12:14:15.000003Z 192\\.0\\.2\\.1 myproc 8710 - " + @@ -72,7 +76,7 @@ func TestRFC5424Formatter(t *testing.T) { require.NoError(t, err) logRecord.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) - actual = newRFC5424Formatter().format(logRecord) + actual = newRFC5424Formatter(false).format(logRecord) assert.NoError(t, err) matched, err := regexp.MatchString(expectedRegex, actual) assert.NoError(t, err) @@ -89,6 +93,6 @@ func TestRFC5424Formatter(t *testing.T) { require.NoError(t, err) logRecord.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) - actual = newRFC5424Formatter().format(logRecord) + actual = newRFC5424Formatter(false).format(logRecord) assert.Equal(t, expected, actual) } diff --git a/exporter/syslogexporter/sender.go b/exporter/syslogexporter/sender.go index cd3d5d700963..cd70b2ed8163 100644 --- a/exporter/syslogexporter/sender.go +++ b/exporter/syslogexporter/sender.go @@ -78,8 +78,8 @@ func (s *sender) dial() error { s.conn = nil } var err error - if s.tlsConfig != nil { - s.conn, err = tls.Dial("tcp", s.addr, s.tlsConfig) + if s.tlsConfig != nil && s.network == "tcp" { + s.conn, err = tls.Dial(s.network, s.addr, s.tlsConfig) } else { s.conn, err = net.Dial(s.network, s.addr) } diff --git a/exporter/tanzuobservabilityexporter/README.md b/exporter/tanzuobservabilityexporter/README.md deleted file mode 100644 index 65016f80d9e5..000000000000 --- a/exporter/tanzuobservabilityexporter/README.md +++ /dev/null @@ -1,264 +0,0 @@ -# Deprecated Tanzu Observability (Wavefront) Exporter - -> [!WARNING] -> Tanzu Observability (Wavefront) Proxy v11.3 supports native OpenTelemetry protocol (OTLP) ingestion of traces and metrics, released in June 2022. -> This vendor specific exporter is deprecated and will become unavailable after the end of 2023. -> -> Refer to our [documentation](https://docs.wavefront.com/opentelemetry_overview.html) for configuring the Proxy to receive traces and metrics via OTLP gRPC or OTLP HTTP. -> - - - -| Status | | -| ------------- |-----------| -| Stability | [deprecated]: traces, metrics | -| Distributions | [contrib] | -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Ftanzuobservability%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Ftanzuobservability) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Ftanzuobservability%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Ftanzuobservability) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@oppegard](https://www.github.com/oppegard), [@thepeterstone](https://www.github.com/thepeterstone), [@keep94](https://www.github.com/keep94) | - -[deprecated]: https://github.com/open-telemetry/opentelemetry-collector#deprecated -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib - - - -This exporter supports sending metrics and traces to [Tanzu Observability](https://tanzu.vmware.com/observability). - -## Prerequisites - -- [Obtain the Tanzu Observability by Wavefront API token.](https://docs.wavefront.com/wavefront_api.html#generating-an-api-token) -- [Set up and start a Tanzu Observability by Wavefront proxy](https://docs.wavefront.com/proxies_installing.html) and - configure it with the API token you obtained. -- To have the proxy generate [span RED metrics](https://docs.wavefront.com/trace_data_details.html#red-metrics) from - trace data, [configure](https://docs.wavefront.com/proxies_configuring.html) the proxy to receive traces by - setting `customTracingListenerPorts=30001`. For metrics, the proxy listens on port 2878 by default. - -## Configuration - -Given a Wavefront proxy at 10.10.10.10 configured with `customTracingListenerPorts=30001`, a basic configuration of -the Tanzu Observability exporter follows: - -```yaml -receivers: - examplereceiver: - -processors: - batch: - timeout: 10s - -exporters: - tanzuobservability: - traces: - endpoint: "http://10.10.10.10:30001" - metrics: - endpoint: "http://10.10.10.10:2878" - -service: - pipelines: - traces: - receivers: [ examplereceiver ] - processors: [ batch ] - exporters: [ tanzuobservability ] - metrics: - receivers: [ examplereceiver ] - processors: [ batch ] - exporters: [ tanzuobservability ] -``` - -## Advanced Configuration - -### Resource Attributes on Metrics - -Client programs using an OpenTelemetry SDK can be configured to wrap all emitted telemetry (metrics, spans, logs) with -a set of global key-value pairs, -called [resource attributes](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md) -. -By default, the Tanzu Observability Exporter includes resource attributes on spans but _excludes_ them on metrics. To -include resource attributes as tags on metrics, set the flag `resource_attrs_included` to `true` as per the example -below. - -**Note:** Tanzu Observability has a 254-character limit on tag key-value pairs. If a resource attribute exceeds this -limit, the metric will not show up in Tanzu Observability. - -### Application Resource Attributes on Metrics - -The Tanzu Observability Exporter will -include [application resource attributes](https://docs.wavefront.com/trace_data_details.html#application-tags) on -metrics (`application`, `service.name` -, `cluster`, and `shard`). To exclude these resource -attributes as tags on metrics, set the flag `app_tags_excluded` to `true` as per the example -below. - -**Note:** A tag `service.name`(if provided) becomes `service` on the transformed wavefront metric. However, if both the -tags (`service` & `service.name`) are provided then the `service` tag will be included. - -### Queuing and Retries - -This exporter uses OpenTelemetry Collector helpers to queue data and retry on failures. - -* `retry_on_failure` [Details and defaults here](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md#configuration) - . -* `sending_queue` [Details and defaults here](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md#configuration) - -### Recommended Pipeline Processors - -The memory_limiter processor is recommended to prevent out of memory situations on the collector. It allows performing -periodic checks of memory usage – if it exceeds defined limits it will begin dropping data and forcing garbage -collection to reduce memory -consumption. [Details and defaults here](https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/memorylimiterprocessor/README.md) -. - -**Note:** The order matters when enabling multiple processors in a pipeline (e.g. the memory limiter and batch -processors in the example config below). Please refer to the -processors' [documentation](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor) -for more information. - -### Example Advanced Configuration - -```yaml -receivers: - examplereceiver: - -processors: - memory_limiter: - check_interval: 1s - limit_percentage: 50 - spike_limit_percentage: 30 - batch: - timeout: 10s - -exporters: - tanzuobservability: - traces: - endpoint: "http://10.10.10.10:30001" - metrics: - endpoint: "http://10.10.10.10:2878" - resource_attrs_included: true - app_tags_excluded: true - retry_on_failure: - max_elapsed_time: 3m - sending_queue: - queue_size: 10000 - -service: - pipelines: - traces: - receivers: [ examplereceiver ] - processors: [ memory_limiter, batch ] - exporters: [ tanzuobservability ] - metrics: - receivers: [ examplereceiver ] - processors: [ memory_limiter, batch ] - exporters: [ tanzuobservability ] -``` - -## Attributes Required by Tanzu Observability - -### Source - -A `source` field is required in Tanzu -Observability [spans](https://docs.wavefront.com/trace_data_details.html#span-fields) -and [metrics](https://docs.wavefront.com/wavefront_data_format.html#wavefront-data-format-fields). The source is set to -the -first matching OpenTelemetry Resource Attribute: - -1. `source` -2. `host.name` -3. `hostname` -4. `host.id` - -To reduce duplicate data, the matched attribute is excluded from the tags on the exported Tanzu Observability span or -metric. -If none of the above resource attributes exist, the OpenTelemetry Collector's hostname is used as a fallback for source. - -### Application Identity Tags on Spans - -[Application identity tags](https://docs.wavefront.com/trace_data_details.html#how-wavefront-uses-application-tags) of -`application` and `service` are required for all spans in Tanzu Observability. - -- `application` is set to the value of the attribute `application` on the OpenTelemetry Span or Resource. Default is " - defaultApp". -- `service` is set the value of the attribute `service` or `service.name` on the OpenTelemetry Span or Resource. Default - is "defaultService". - -## Data Conversion for Traces - -- Trace IDs and Span IDs are converted to UUIDs. For example, span IDs are left-padded with zeros to fit the correct - size. -- Events are converted to [Span Logs](https://docs.wavefront.com/trace_data_details.html#span-logs). -- Kind is converted to the `span.kind` tag. -- If a Span's status code is error, a tag of `error=true` is added. If the status also has a description, it's set - to `otel.status_description`. -- TraceState is converted to the `w3c.tracestate` tag. - -## Data Conversion for Metrics - -This section describes the process used by the Exporter when converting from -[OpenTelemetry Metrics](https://opentelemetry.io/docs/reference/specification/metrics/datamodel) to -[Tanzu Observability by Wavefront Metrics](https://docs.wavefront.com/metric_types.html). - -| OpenTelemetry Metric Type | Wavefront Metric Type | Notes | -| ------ | ------ | ------ | -| Gauge | Gauge | -| Cumulative Sum | Cumulative Counter | -| Delta Sum | Delta Counter | -| Cumulative Histogram (incl. Exponential) | Cumulative Counters | [Details below](#cumulative-histogram-conversion-incl-exponential). | -| Delta Histogram (incl. Exponential) | Histogram | -| Summary | Gauges | [Details below](#summary-conversion). - -### Cumulative Histogram Conversion (incl. Exponential) - -A cumulative histogram is converted to multiple counter metrics: one counter per bucket in the histogram. Each counter -has a special "le" tag that matches the upper bound of the corresponding bucket. The value of the counter metric is the -sum of the histogram's corresponding bucket and all the buckets before it. - -When working with OpenTelemetry Cumulative Histograms that have been converted to Wavefront Counters, these functions -will be of use: - -- [cumulativeHisto()](https://docs.wavefront.com/ts_cumulativeHisto.html) -- [cumulativePercentile()](https://docs.wavefront.com/ts_cumulativePercentile.html) - -#### Example - -Suppose a cumulative histogram named "http.response_times" has -the following buckets and values: - -| Bucket | Value | -| ------ | ----- | -| ≤ 100ms | 5 | -| > 100ms to ≤ 200ms | 20 | -| > 200ms | 100 | - -The exporter sends the following metrics to tanzuobservability: - -| Name | Tags | Value | -| ---- | ---- | ----- | -| http.response_times | le="100" | 5 | -| http.response_times | le="200" | 25 | -| http.response_times | le="+Inf" | 125 | - -#### Example WQL Query on a Cumulative Histogram - -Using the cumulative histogram from the section above, this WQL query will produce a graph showing -the 95th percentile of http response times in the last 15 minutes. - -``` -cumulativePercentile(95, mavg(15m, deriv(sum(ts(http.reponse_times), le)))) -``` - -The sum function aggregates the http response times and groups them by the le tag. Since -http.response_times has three buckets, the sum() function will graph three lines, one for each bucket. -deriv() shows the per second rate of change in the three lines from sum. The mavg function averages -the rates of change of the three lines over the last 15 minutes. Since the rates of change are per -second, if you multiply the average rate of change for a bucket by 900, you get the number of new -http requests falling into that bucket in the last 15 minutes. Finally, cumulativePercentile -uses the values of the `le` tags, which are http response times, and linear interpolation of the -bucket counts to estimate the 95th percentile of http.response_times over the last 15 minutes. - -### Summary Conversion - -A summary is converted to multiple gauge metrics: one gauge for every quantile in the summary. A special "quantile" tag -contains avalue between 0 and 1 indicating the quantile for which the value belongs. - -[beta]:https://github.com/open-telemetry/opentelemetry-collector#beta - -[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/exporter/tanzuobservabilityexporter/config.go b/exporter/tanzuobservabilityexporter/config.go deleted file mode 100644 index cbf01377cbc2..000000000000 --- a/exporter/tanzuobservabilityexporter/config.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package tanzuobservabilityexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter" - -import ( - "errors" - "fmt" - "net/url" - "strconv" - - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/exporter/exporterhelper" -) - -type TracesConfig struct { - confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. -} - -type MetricsConfig struct { - confighttp.HTTPClientSettings `mapstructure:",squash"` - ResourceAttrsIncluded bool `mapstructure:"resource_attrs_included"` - // AppTagsExcluded will exclude the Resource Attributes `application`, `service.name` -> (service), - // `cluster`, and `shard` from the transformed TObs metric if set to true. - AppTagsExcluded bool `mapstructure:"app_tags_excluded"` -} - -// Config defines configuration options for the exporter. -type Config struct { - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` - - // Traces defines the Traces exporter specific configuration - Traces TracesConfig `mapstructure:"traces"` - Metrics MetricsConfig `mapstructure:"metrics"` -} - -func (c *Config) hasMetricsEndpoint() bool { - return c.Metrics.Endpoint != "" -} - -func (c *Config) hasTracesEndpoint() bool { - return c.Traces.Endpoint != "" -} - -func (c *Config) parseMetricsEndpoint() (hostName string, port int, err error) { - return parseEndpoint(c.Metrics.Endpoint) -} - -func (c *Config) parseTracesEndpoint() (hostName string, port int, err error) { - return parseEndpoint(c.Traces.Endpoint) -} - -func (c *Config) Validate() error { - var tracesHostName, metricsHostName string - var err error - if c.hasTracesEndpoint() { - tracesHostName, _, err = c.parseTracesEndpoint() - if err != nil { - return fmt.Errorf("failed to parse traces.endpoint: %w", err) - } - } - if c.hasMetricsEndpoint() { - metricsHostName, _, err = c.parseMetricsEndpoint() - if err != nil { - return fmt.Errorf("failed to parse metrics.endpoint: %w", err) - } - } - if c.hasTracesEndpoint() && c.hasMetricsEndpoint() && tracesHostName != metricsHostName { - return errors.New("host for metrics and traces must be the same") - } - return nil -} - -func parseEndpoint(endpoint string) (hostName string, port int, err error) { - if endpoint == "" { - return "", 0, errors.New("a non-empty endpoint is required") - } - u, err := url.Parse(endpoint) - if err != nil { - return "", 0, err - } - port, err = strconv.Atoi(u.Port()) - if err != nil { - return "", 0, errors.New("valid port required") - } - hostName = u.Hostname() - return hostName, port, nil -} diff --git a/exporter/tanzuobservabilityexporter/config_test.go b/exporter/tanzuobservabilityexporter/config_test.go deleted file mode 100644 index 6e31d90a97cf..000000000000 --- a/exporter/tanzuobservabilityexporter/config_test.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package tanzuobservabilityexporter - -import ( - "path/filepath" - "testing" - "time" - - "github.com/cenkalti/backoff/v4" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/exporter/exporterhelper" - "go.opentelemetry.io/collector/otelcol/otelcoltest" -) - -func TestLoadConfig(t *testing.T) { - factories, err := otelcoltest.NopFactories() - require.NoError(t, err) - - factory := NewFactory() - factories.Exporters[exporterType] = factory - cfg, err := otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "config.yaml"), factories) - - require.NoError(t, err) - require.NotNil(t, cfg) - - actual, ok := cfg.Exporters[component.NewID("tanzuobservability")] - require.True(t, ok) - expected := &Config{ - Traces: TracesConfig{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: "http://localhost:40001"}, - }, - Metrics: MetricsConfig{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: "http://localhost:2916"}, - ResourceAttrsIncluded: true, - AppTagsExcluded: true, - }, - QueueSettings: exporterhelper.QueueSettings{ - Enabled: true, - NumConsumers: 2, - QueueSize: 10, - }, - RetrySettings: exporterhelper.RetrySettings{ - Enabled: true, - InitialInterval: 10 * time.Second, - MaxInterval: 60 * time.Second, - MaxElapsedTime: 10 * time.Minute, - RandomizationFactor: backoff.DefaultRandomizationFactor, - Multiplier: backoff.DefaultMultiplier, - }, - } - assert.Equal(t, expected, actual) -} - -func TestConfigRequiresValidEndpointUrl(t *testing.T) { - c := &Config{ - Traces: TracesConfig{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: "http#$%^&#$%&#"}, - }, - } - assert.Error(t, c.Validate()) -} - -func TestMetricsConfigRequiresValidEndpointUrl(t *testing.T) { - c := &Config{ - Metrics: MetricsConfig{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: "http#$%^&#$%&#"}, - }, - } - - assert.Error(t, c.Validate()) -} - -func TestDifferentHostNames(t *testing.T) { - c := &Config{ - Traces: TracesConfig{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: "http://localhost:30001"}, - }, - Metrics: MetricsConfig{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: "http://foo.com:2878"}, - }, - } - assert.Error(t, c.Validate()) -} - -func TestConfigNormal(t *testing.T) { - c := &Config{ - Traces: TracesConfig{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: "http://localhost:40001"}, - }, - Metrics: MetricsConfig{ - HTTPClientSettings: confighttp.HTTPClientSettings{Endpoint: "http://localhost:2916"}, - }, - } - assert.NoError(t, c.Validate()) -} - -func TestMetricConfig(t *testing.T) { - c := &Config{ - Metrics: MetricsConfig{}, - } - assert.NoError(t, c.Validate()) - assert.False(t, c.Metrics.ResourceAttrsIncluded) - assert.False(t, c.Metrics.AppTagsExcluded) - - c = &Config{ - Metrics: MetricsConfig{ - ResourceAttrsIncluded: true, - AppTagsExcluded: true, - }, - } - assert.NoError(t, c.Validate()) - assert.True(t, c.Metrics.ResourceAttrsIncluded) - assert.True(t, c.Metrics.AppTagsExcluded) -} diff --git a/exporter/tanzuobservabilityexporter/factory.go b/exporter/tanzuobservabilityexporter/factory.go deleted file mode 100644 index a978899cb28a..000000000000 --- a/exporter/tanzuobservabilityexporter/factory.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:generate mdatagen metadata.yaml - -package tanzuobservabilityexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter" - -import ( - "context" - "fmt" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exporterhelper" - - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter/internal/metadata" -) - -const ( - exporterType = "tanzuobservability" -) - -// NewFactory creates a factory for the exporter. -func NewFactory() exporter.Factory { - return exporter.NewFactory( - exporterType, - createDefaultConfig, - exporter.WithTraces(createTracesExporter, metadata.TracesStability), - exporter.WithMetrics(createMetricsExporter, metadata.MetricsStability), - ) -} - -func createDefaultConfig() component.Config { - return &Config{ - QueueSettings: exporterhelper.NewDefaultQueueSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), - } -} - -// createTracesExporter implements exporterhelper.CreateTracesExporter and creates -// an exporter for traces using this configuration -func createTracesExporter( - ctx context.Context, - set exporter.CreateSettings, - cfg component.Config, -) (exporter.Traces, error) { - exp, err := newTracesExporter(set, cfg) - if err != nil { - return nil, err - } - - tobsCfg, ok := cfg.(*Config) - if !ok { - return nil, fmt.Errorf("invalid config: %#v", cfg) - } - - return exporterhelper.NewTracesExporter( - ctx, - set, - cfg, - exp.pushTraceData, - exporterhelper.WithQueue(tobsCfg.QueueSettings), - exporterhelper.WithRetry(tobsCfg.RetrySettings), - exporterhelper.WithShutdown(exp.shutdown), - ) -} - -func createMetricsExporter( - ctx context.Context, - set exporter.CreateSettings, - cfg component.Config, -) (exporter.Metrics, error) { - tobsCfg, ok := cfg.(*Config) - if !ok { - return nil, fmt.Errorf("invalid config: %#v", cfg) - } - exp, err := newMetricsExporter(set, tobsCfg, createMetricsConsumer) - if err != nil { - return nil, err - } - - exporter, err := exporterhelper.NewMetricsExporter( - ctx, - set, - cfg, - exp.pushMetricsData, - exporterhelper.WithQueue(tobsCfg.QueueSettings), - exporterhelper.WithRetry(tobsCfg.RetrySettings), - exporterhelper.WithShutdown(exp.shutdown), - ) - if err != nil { - return nil, err - } - - return exporter, nil -} diff --git a/exporter/tanzuobservabilityexporter/factory_test.go b/exporter/tanzuobservabilityexporter/factory_test.go deleted file mode 100644 index ea3f7e175ff1..000000000000 --- a/exporter/tanzuobservabilityexporter/factory_test.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package tanzuobservabilityexporter - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/exporter/exportertest" -) - -func TestCreateDefaultConfig(t *testing.T) { - cfg := createDefaultConfig() - assert.NotNil(t, cfg, "failed to create default config") - require.NoError(t, componenttest.CheckConfigStruct(cfg)) - - actual, ok := cfg.(*Config) - require.True(t, ok, "invalid Config: %#v", cfg) - assert.False(t, actual.hasMetricsEndpoint()) - assert.False(t, actual.hasTracesEndpoint()) - assert.False(t, actual.Metrics.ResourceAttrsIncluded) - assert.False(t, actual.Metrics.AppTagsExcluded) -} - -func TestCreateExporter(t *testing.T) { - defaultConfig := createDefaultConfig() - cfg := defaultConfig.(*Config) - params := exportertest.NewNopCreateSettings() - cfg.Traces.Endpoint = "http://localhost:30001" - te, err := createTracesExporter(context.Background(), params, cfg) - assert.Nil(t, err) - assert.NotNil(t, te, "failed to create trace exporter") -} - -func TestCreateMetricsExporter(t *testing.T) { - defaultConfig := createDefaultConfig() - cfg := defaultConfig.(*Config) - params := exportertest.NewNopCreateSettings() - cfg.Metrics.Endpoint = "http://localhost:2878" - te, err := createMetricsExporter(context.Background(), params, cfg) - assert.NoError(t, err) - assert.NotNil(t, te, "failed to create metrics exporter") -} - -func TestCreateTraceExporterNilConfigError(t *testing.T) { - params := exportertest.NewNopCreateSettings() - _, err := createTracesExporter(context.Background(), params, nil) - assert.Error(t, err) -} - -func TestCreateMetricsExporterNilConfigError(t *testing.T) { - params := exportertest.NewNopCreateSettings() - _, err := createMetricsExporter(context.Background(), params, nil) - assert.Error(t, err) -} - -func TestCreateTraceExporterInvalidEndpointError(t *testing.T) { - params := exportertest.NewNopCreateSettings() - defaultConfig := createDefaultConfig() - cfg := defaultConfig.(*Config) - cfg.Traces.Endpoint = "http:#$%^&#$%&#" - _, err := createTracesExporter(context.Background(), params, cfg) - assert.Error(t, err) -} - -func TestCreateMetricsExporterInvalidEndpointError(t *testing.T) { - params := exportertest.NewNopCreateSettings() - defaultConfig := createDefaultConfig() - cfg := defaultConfig.(*Config) - cfg.Metrics.Endpoint = "http:#$%^&#$%&#" - _, err := createMetricsExporter(context.Background(), params, cfg) - assert.Error(t, err) -} - -func TestCreateTraceExporterMissingPortError(t *testing.T) { - params := exportertest.NewNopCreateSettings() - defaultConfig := createDefaultConfig() - cfg := defaultConfig.(*Config) - cfg.Traces.Endpoint = "http://localhost" - _, err := createTracesExporter(context.Background(), params, cfg) - assert.Error(t, err) -} - -func TestCreateMetricsExporterMissingPortError(t *testing.T) { - params := exportertest.NewNopCreateSettings() - defaultConfig := createDefaultConfig() - cfg := defaultConfig.(*Config) - cfg.Metrics.Endpoint = "http://localhost" - _, err := createMetricsExporter(context.Background(), params, cfg) - assert.Error(t, err) -} - -func TestCreateTraceExporterInvalidPortError(t *testing.T) { - params := exportertest.NewNopCreateSettings() - defaultConfig := createDefaultConfig() - cfg := defaultConfig.(*Config) - cfg.Traces.Endpoint = "http://localhost:c42a" - _, err := createTracesExporter(context.Background(), params, cfg) - assert.Error(t, err) -} - -func TestCreateMetricsExporterInvalidPortError(t *testing.T) { - params := exportertest.NewNopCreateSettings() - defaultConfig := createDefaultConfig() - cfg := defaultConfig.(*Config) - cfg.Metrics.Endpoint = "http://localhost:c42a" - _, err := createMetricsExporter(context.Background(), params, cfg) - assert.Error(t, err) -} diff --git a/exporter/tanzuobservabilityexporter/go.mod b/exporter/tanzuobservabilityexporter/go.mod deleted file mode 100644 index e3fa1a173767..000000000000 --- a/exporter/tanzuobservabilityexporter/go.mod +++ /dev/null @@ -1,127 +0,0 @@ -// Deprecated: the Tanzu Observability Exporter is deprecated and will be removed in future versions. Please see the README for more information. -module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter - -go 1.20 - -require ( - github.com/cenkalti/backoff/v4 v4.2.1 - github.com/google/uuid v1.4.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - github.com/wavefronthq/wavefront-sdk-go v0.15.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/otelcol v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 -) - -require ( - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/caio/go-tdigest/v4 v4.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.3.0 // 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/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.2 // 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/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect - github.com/rs/cors v1.10.1 // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // 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.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/connector v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/processor v0.89.0 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/collector/service v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk v1.20.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.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-20231030173426-d783a09b4405 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) - -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal - -retract ( - v0.76.2 - v0.76.1 - v0.65.0 -) - -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/exporter/tanzuobservabilityexporter/go.sum b/exporter/tanzuobservabilityexporter/go.sum deleted file mode 100644 index e31a80359be5..000000000000 --- a/exporter/tanzuobservabilityexporter/go.sum +++ /dev/null @@ -1,713 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/caio/go-tdigest/v4 v4.0.1 h1:sx4ZxjmIEcLROUPs2j1BGe2WhOtHD6VSe6NNbBdKYh4= -github.com/caio/go-tdigest/v4 v4.0.1/go.mod h1:Wsa+f0EZnV2gShdj1adgl0tQSoXRxtM0QioTgukFw8U= -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.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/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/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-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/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/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/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.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/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/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/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -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/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.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/leesper/go_rng v0.0.0-20190531154944-a612b043e353 h1:X/79QL0b4YJVO5+OsPH9rF2u428CIrGL/jLmPsoOQQ4= -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/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/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 v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/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.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= -github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= -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/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/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.1.1/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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/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/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= -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/wavefronthq/wavefront-sdk-go v0.15.0 h1:po9E3vh/0y7kOx8D9EtFp7kbSLLLKbmu/w/s1xGJAQU= -github.com/wavefronthq/wavefront-sdk-go v0.15.0/go.mod h1:V72c8e+bXuLK8HpA6ioW0ll5mK9IPD+4IHNNDY75ksA= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 h1:opvHcGANx+dS4HJwGTPtRMd6dZdOmmGn6c3PfW/bihQ= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/otelcol v0.89.0 h1:b3kC0zM9T6GxjhTcNEHIzXDd4zTIc7cBpexCPZ9nPzg= -go.opentelemetry.io/collector/otelcol v0.89.0/go.mod h1:BILxDcJe32wK+paX7ssnt4jyjOmTkIHvXe9JNjlHUk8= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/collector/service v0.89.0/go.mod h1:6IAr9Asn6t6YxSw6Qv5LwA+ilVUtP0nQsu1xzc9+mZA= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0 h1:Yty9Vs4F3D6/liF1o6FNt0PvN85h/BJJ6DQKJ3nrcM0= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0/go.mod h1:On4VgbkqYL18kbJlWsa18+cMNe6rYpBnPi1ARI/BrsU= -go.opentelemetry.io/contrib/zpages v0.45.0 h1:jIwHHGoWzJoZdbIUtWdErjL85Gni6BignnAFqDtMRL4= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0 h1:E/sf+2slCUb7wqh5FHwhdwKWTA+VXyMMAcFNlKVf4yw= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0/go.mod h1:2xuXI78Xp9cttLsJMF/Y08cJUqckLt0kLasn+vcHR5w= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0/go.mod h1:hbzqqcIxyywu6UQ5J1wb4ntla8nCwCfNBZnMo2Dgh48= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0/go.mod h1:qmFtGlXhoa9qPt5RrZgMp4f5RfRagucrdriI+hb3yWQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0/go.mod h1:CMJYNAfooOwSZSAmAeMUV1M+TXld3BiK++z9fqIm2xk= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0/go.mod h1:nZStMoc1H/YJpRjSx9IEX4abBMekORTLQcTUT1CgLkg= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 h1:vcSjcjn/BTeM6abI5CDymZdtd1m24quD1Mx4VE3N3fM= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0/go.mod h1:HblEnlZQNsVuuDpszdKTWcrHBI09OjBn2pWSzBx1goM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 h1:4s9HxB4azeeQkhY0GE5wZlMj4/pz8tE5gx2OQpGUw58= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0/go.mod h1:djVA3TUJ2fSdMX0JE5XxFBOaZzprElJoP7fD4vnV2SU= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -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/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-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/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/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -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-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/exporter/tanzuobservabilityexporter/internal/metadata/generated_status.go b/exporter/tanzuobservabilityexporter/internal/metadata/generated_status.go deleted file mode 100644 index a5a6b8f99230..000000000000 --- a/exporter/tanzuobservabilityexporter/internal/metadata/generated_status.go +++ /dev/null @@ -1,13 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/collector/component" -) - -const ( - Type = "tanzuobservability" - TracesStability = component.StabilityLevelDeprecated - MetricsStability = component.StabilityLevelDeprecated -) diff --git a/exporter/tanzuobservabilityexporter/metadata.yaml b/exporter/tanzuobservabilityexporter/metadata.yaml deleted file mode 100644 index c934fb5585b1..000000000000 --- a/exporter/tanzuobservabilityexporter/metadata.yaml +++ /dev/null @@ -1,9 +0,0 @@ -type: tanzuobservability - -status: - class: exporter - stability: - deprecated: [traces, metrics] - distributions: [contrib] - codeowners: - active: [oppegard, thepeterstone, keep94] diff --git a/exporter/tanzuobservabilityexporter/metrics.go b/exporter/tanzuobservabilityexporter/metrics.go deleted file mode 100644 index f406f9fbb0be..000000000000 --- a/exporter/tanzuobservabilityexporter/metrics.go +++ /dev/null @@ -1,867 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package tanzuobservabilityexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter" - -import ( - "context" - "errors" - "fmt" - "math" - "strconv" - "sync/atomic" - - "github.com/wavefronthq/wavefront-sdk-go/histogram" - "github.com/wavefronthq/wavefront-sdk-go/senders" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/pmetric" - "go.uber.org/multierr" - "go.uber.org/zap" -) - -const ( - missingValueMetricName = "~sdk.otel.collector.missing_values" - metricNameString = "metric name" - metricTypeString = "metric type" - malformedHistogramMetricName = "~sdk.otel.collector.malformed_histogram" - noAggregationTemporalityMetricName = "~sdk.otel.collector.no_aggregation_temporality" -) - -const ( - histogramDataPointInvalid = "Histogram data point invalid" -) - -var ( - typeIsGaugeTags = map[string]string{"type": "gauge"} - typeIsSumTags = map[string]string{"type": "sum"} - typeIsHistogramTags = map[string]string{"type": "histogram"} -) - -var ( - allGranularity = map[histogram.Granularity]bool{histogram.DAY: true, histogram.HOUR: true, histogram.MINUTE: true} -) - -var ( - regularHistogram histogramSpecification = regularHistogramSpecification{} - exponentialHistogram histogramSpecification = exponentialHistogramSpecification{} -) - -// metricsConsumer instances consume OTEL metrics -type metricsConsumer struct { - consumerMap map[pmetric.MetricType]typedMetricConsumer - sender flushCloser - reportInternalMetrics bool - config MetricsConfig -} - -type metricInfo struct { - pmetric.Metric - Source string - SourceKey string - ResourceAttrs map[string]string -} - -// newMetricsConsumer returns a new metricsConsumer. consumers are the -// consumers responsible for consuming each type of metric. The Consume method -// of returned consumer calls the Flush method on sender after consuming -// all the metrics. Calling Close on the returned metricsConsumer calls Close -// on sender. sender can be nil. reportInternalMetrics controls whether -// returned metricsConsumer reports internal metrics. -func newMetricsConsumer( - consumers []typedMetricConsumer, - sender flushCloser, - reportInternalMetrics bool, - config MetricsConfig, -) *metricsConsumer { - consumerMap := make(map[pmetric.MetricType]typedMetricConsumer, len(consumers)) - for _, consumer := range consumers { - if consumerMap[consumer.Type()] != nil { - panic("duplicate consumer type detected: " + consumer.Type().String()) - } - consumerMap[consumer.Type()] = consumer - } - return &metricsConsumer{ - consumerMap: consumerMap, - sender: sender, - reportInternalMetrics: reportInternalMetrics, - config: config, - } -} - -// Consume consumes OTEL metrics. For each metric in md, it delegates to the -// typedMetricConsumer that consumes that type of metric. Once Consume consumes -// all the metrics, it calls Flush() on the sender passed to -// newMetricsConsumer. -func (c *metricsConsumer) Consume(ctx context.Context, md pmetric.Metrics) error { - var errs []error - rms := md.ResourceMetrics() - for i := 0; i < rms.Len(); i++ { - resAttrs := rms.At(i).Resource().Attributes() - source, sourceKey := getSourceAndKey(resAttrs) - ilms := rms.At(i).ScopeMetrics() - for j := 0; j < ilms.Len(); j++ { - ms := ilms.At(j).Metrics() - for k := 0; k < ms.Len(); k++ { - m := ms.At(k) - var resAttrsMap map[string]string - if c.config.ResourceAttrsIncluded { - resAttrsMap = attributesToTags(resAttrs) - } else if !c.config.AppTagsExcluded { - resAttrsMap = appAttributesToTags(resAttrs) - } - mi := metricInfo{Metric: m, Source: source, SourceKey: sourceKey, ResourceAttrs: resAttrsMap} - select { - case <-ctx.Done(): - return multierr.Combine(append(errs, errors.New("context canceled"))...) - default: - c.pushSingleMetric(mi, &errs) - } - } - } - } - if c.reportInternalMetrics { - c.pushInternalMetrics(&errs) - } - if c.sender != nil { - if err := c.sender.Flush(); err != nil { - errs = append(errs, err) - } - } - return multierr.Combine(errs...) -} - -// Close closes this metricsConsumer by calling Close on the sender passed -// to newMetricsConsumer. -func (c *metricsConsumer) Close() { - if c.sender != nil { - c.sender.Close() - } -} - -func (c *metricsConsumer) pushInternalMetrics(errs *[]error) { - for _, consumer := range c.consumerMap { - consumer.PushInternalMetrics(errs) - } -} - -func (c *metricsConsumer) pushSingleMetric(mi metricInfo, errs *[]error) { - dataType := mi.Type() - consumer := c.consumerMap[dataType] - if consumer == nil { - *errs = append( - *errs, fmt.Errorf("no support for metric type %v", dataType)) - - } else { - consumer.Consume(mi, errs) - } -} - -// typedMetricConsumer consumes one specific type of OTEL metric -type typedMetricConsumer interface { - - // Type returns the type of metric this consumer consumes. For example - // Gauge, Sum, or Histogram - Type() pmetric.MetricType - - // Consume consumes the metric from the metricInfo and appends any errors encountered to errs - Consume(mi metricInfo, errs *[]error) - - // PushInternalMetrics sends internal metrics for this consumer to tanzu observability - // and appends any errors encountered to errs. The Consume method of metricsConsumer calls - // PushInternalMetrics on each registered typedMetricConsumer after it has consumed all the - // metrics but before it calls Flush on the sender. - PushInternalMetrics(errs *[]error) -} - -// flushCloser is the interface for the Flush and Close method -type flushCloser interface { - Flush() error - Close() -} - -// report the counter to tanzu observability. name is the name of -// the metric to be reported. tags is the tags for the metric. sender is what -// sends the metric to tanzu observability. Any errors get added to errs. -func report(count *atomic.Int64, name string, tags map[string]string, sender gaugeSender, errs *[]error) { - err := sender.SendMetric(name, float64(count.Load()), 0, "", tags) - if err != nil { - *errs = append(*errs, err) - } -} - -// logMissingValue keeps track of metrics with missing values. metric is the -// metric with the missing value. settings logs the missing value. count counts -// metrics with missing values. -func logMissingValue(metric pmetric.Metric, settings component.TelemetrySettings, count *atomic.Int64) { - namef := zap.String(metricNameString, metric.Name()) - typef := zap.String(metricTypeString, metric.Type().String()) - settings.Logger.Debug("Metric missing value", namef, typef) - count.Add(1) -} - -// getValue gets the floating point value out of a NumberDataPoint -func getValue(numberDataPoint pmetric.NumberDataPoint) (float64, error) { - switch numberDataPoint.ValueType() { - case pmetric.NumberDataPointValueTypeInt: - return float64(numberDataPoint.IntValue()), nil - case pmetric.NumberDataPointValueTypeDouble: - return numberDataPoint.DoubleValue(), nil - default: - return 0.0, errors.New("unsupported metric value type") - } -} - -// pushGaugeNumberDataPoint sends a metric as a gauge metric to tanzu -// observability. metric is the metric to send. numberDataPoint is the value -// of the metric. Any errors get appended to errs. sender is what sends the -// gauge metric to tanzu observability. settings logs problems. missingValues -// keeps track of metrics with missing values. -func pushGaugeNumberDataPoint( - mi metricInfo, - numberDataPoint pmetric.NumberDataPoint, - errs *[]error, - sender gaugeSender, - settings component.TelemetrySettings, - missingValues *atomic.Int64, -) { - tags := pointAndResAttrsToTagsAndFixSource(mi.SourceKey, numberDataPoint.Attributes(), newMap(mi.ResourceAttrs)) - ts := numberDataPoint.Timestamp().AsTime().Unix() - value, err := getValue(numberDataPoint) - if err != nil { - logMissingValue(mi.Metric, settings, missingValues) - return - } - err = sender.SendMetric(mi.Name(), value, ts, mi.Source, tags) - if err != nil { - *errs = append(*errs, err) - } -} - -// gaugeSender sends gauge metrics to tanzu observability -type gaugeSender interface { - SendMetric(name string, value float64, ts int64, source string, tags map[string]string) error -} - -type gaugeConsumer struct { - sender gaugeSender - settings component.TelemetrySettings - missingValues *atomic.Int64 -} - -// newGaugeConsumer returns a typedMetricConsumer that consumes gauge metrics -// by sending them to tanzu observability. -func newGaugeConsumer( - sender gaugeSender, settings component.TelemetrySettings) typedMetricConsumer { - return &gaugeConsumer{ - sender: sender, - settings: settings, - missingValues: &atomic.Int64{}, - } -} - -func (g *gaugeConsumer) Type() pmetric.MetricType { - return pmetric.MetricTypeGauge -} - -func (g *gaugeConsumer) Consume(mi metricInfo, errs *[]error) { - gauge := mi.Gauge() - numberDataPoints := gauge.DataPoints() - for i := 0; i < numberDataPoints.Len(); i++ { - pushGaugeNumberDataPoint( - mi, - numberDataPoints.At(i), - errs, - g.sender, - g.settings, - g.missingValues) - } -} - -func (g *gaugeConsumer) PushInternalMetrics(errs *[]error) { - report(g.missingValues, missingValueMetricName, typeIsGaugeTags, g.sender, errs) -} - -type sumConsumer struct { - sender senders.MetricSender - settings component.TelemetrySettings - missingValues *atomic.Int64 -} - -// newSumConsumer returns a typedMetricConsumer that consumes sum metrics -// by sending them to tanzu observability. -func newSumConsumer( - sender senders.MetricSender, settings component.TelemetrySettings) typedMetricConsumer { - return &sumConsumer{ - sender: sender, - settings: settings, - missingValues: &atomic.Int64{}, - } -} - -func (s *sumConsumer) Type() pmetric.MetricType { - return pmetric.MetricTypeSum -} - -func (s *sumConsumer) Consume(mi metricInfo, errs *[]error) { - sum := mi.Sum() - isDelta := sum.AggregationTemporality() == pmetric.AggregationTemporalityDelta - numberDataPoints := sum.DataPoints() - for i := 0; i < numberDataPoints.Len(); i++ { - // If sum is a delta type, send it to tanzu observability as a - // delta counter. Otherwise, send it to tanzu observability as a gauge - // metric. - if isDelta { - s.pushNumberDataPoint(mi, numberDataPoints.At(i), errs) - } else { - pushGaugeNumberDataPoint( - mi, numberDataPoints.At(i), errs, s.sender, s.settings, s.missingValues) - } - } -} - -func (s *sumConsumer) PushInternalMetrics(errs *[]error) { - report(s.missingValues, missingValueMetricName, typeIsSumTags, s.sender, errs) -} - -func (s *sumConsumer) pushNumberDataPoint(mi metricInfo, numberDataPoint pmetric.NumberDataPoint, errs *[]error) { - tags := pointAndResAttrsToTagsAndFixSource(mi.SourceKey, numberDataPoint.Attributes(), newMap(mi.ResourceAttrs)) - value, err := getValue(numberDataPoint) - if err != nil { - logMissingValue(mi.Metric, s.settings, s.missingValues) - return - } - err = s.sender.SendDeltaCounter(mi.Name(), value, mi.Source, tags) - if err != nil { - *errs = append(*errs, err) - } -} - -// histogramReporting takes care of logging and internal metrics for histograms -type histogramReporting struct { - settings component.TelemetrySettings - malformedHistograms *atomic.Int64 - noAggregationTemporality *atomic.Int64 -} - -// newHistogramReporting returns a new histogramReporting instance. -func newHistogramReporting(settings component.TelemetrySettings) *histogramReporting { - return &histogramReporting{ - settings: settings, - malformedHistograms: &atomic.Int64{}, - noAggregationTemporality: &atomic.Int64{}, - } -} - -// Malformed returns the number of malformed histogram data points. -func (r *histogramReporting) Malformed() int64 { - return r.malformedHistograms.Load() -} - -// NoAggregationTemporality returns the number of histogram metrics that have no -// aggregation temporality. -func (r *histogramReporting) NoAggregationTemporality() int64 { - return r.noAggregationTemporality.Load() -} - -// LogMalformed logs seeing one malformed data point. -func (r *histogramReporting) LogMalformed(metric pmetric.Metric) { - namef := zap.String(metricNameString, metric.Name()) - r.settings.Logger.Debug("Malformed histogram", namef) - r.malformedHistograms.Add(1) -} - -// LogNoAggregationTemporality logs seeing a histogram metric with no aggregation temporality -func (r *histogramReporting) LogNoAggregationTemporality(metric pmetric.Metric) { - namef := zap.String(metricNameString, metric.Name()) - r.settings.Logger.Debug("histogram metric missing aggregation temporality", namef) - r.noAggregationTemporality.Add(1) -} - -// Report sends the counts in this instance to wavefront. -// sender is what sends to wavefront. Any errors sending get added to errs. -func (r *histogramReporting) Report(sender gaugeSender, errs *[]error) { - report(r.malformedHistograms, malformedHistogramMetricName, nil, sender, errs) - report(r.noAggregationTemporality, noAggregationTemporalityMetricName, typeIsHistogramTags, sender, errs) -} - -type histogramConsumer struct { - cumulative histogramDataPointConsumer - delta histogramDataPointConsumer - sender gaugeSender - reporting *histogramReporting - spec histogramSpecification -} - -// newHistogramConsumer returns a metricConsumer that consumes histograms. -// cumulative and delta handle cumulative and delta histograms respectively. -// sender sends internal metrics to wavefront. -func newHistogramConsumer( - cumulative, delta histogramDataPointConsumer, - sender gaugeSender, - spec histogramSpecification, - settings component.TelemetrySettings, -) typedMetricConsumer { - return &histogramConsumer{ - cumulative: cumulative, - delta: delta, - sender: sender, - reporting: newHistogramReporting(settings), - spec: spec, - } -} - -func (h *histogramConsumer) Type() pmetric.MetricType { - return h.spec.Type() -} - -func (h *histogramConsumer) Consume(mi metricInfo, errs *[]error) { - aggregationTemporality := h.spec.AggregationTemporality(mi.Metric) - var consumer histogramDataPointConsumer - switch aggregationTemporality { - case pmetric.AggregationTemporalityDelta: - consumer = h.delta - case pmetric.AggregationTemporalityCumulative: - consumer = h.cumulative - default: - h.reporting.LogNoAggregationTemporality(mi.Metric) - return - } - points := h.spec.DataPoints(mi.Metric) - for _, point := range points { - consumer.Consume(mi, point, errs, h.reporting) - } -} - -func (h *histogramConsumer) PushInternalMetrics(errs *[]error) { - h.reporting.Report(h.sender, errs) -} - -// histogramDataPointConsumer consumes one histogram data point. There is one -// implementation for delta histograms and one for cumulative histograms. -type histogramDataPointConsumer interface { - - // Consume consumes a BucketHistogramDataPoint. - // mi is the metricInfo which encloses metric; point is the BucketHistogramDataPoint; - // errors get appended to errs; reporting keeps track of special situations - Consume( - mi metricInfo, - point bucketHistogramDataPoint, - errs *[]error, - reporting *histogramReporting, - ) -} - -type cumulativeHistogramDataPointConsumer struct { - sender gaugeSender -} - -// newCumulativeHistogramDataPointConsumer returns a consumer for cumulative -// histogram data points. -func newCumulativeHistogramDataPointConsumer(sender gaugeSender) histogramDataPointConsumer { - return &cumulativeHistogramDataPointConsumer{sender: sender} -} - -func (c *cumulativeHistogramDataPointConsumer) Consume( - mi metricInfo, - point bucketHistogramDataPoint, - errs *[]error, - reporting *histogramReporting, -) { - if !point.Valid() { - reporting.LogMalformed(mi.Metric) - return - } - name := mi.Name() - tags := pointAndResAttrsToTagsAndFixSource(mi.SourceKey, point.Attributes, newMap(mi.ResourceAttrs)) - if leTag, ok := tags["le"]; ok { - tags["_le"] = leTag - } - buckets := point.AsCumulative() - for _, bucket := range buckets { - tags["le"] = bucket.Tag - err := c.sender.SendMetric( - name, float64(bucket.Count), point.SecondsSinceEpoch, mi.Source, tags) - if err != nil { - *errs = append(*errs, err) - } - } -} - -type deltaHistogramDataPointConsumer struct { - sender senders.DistributionSender -} - -// newDeltaHistogramDataPointConsumer returns a consumer for delta -// histogram data points. -func newDeltaHistogramDataPointConsumer( - sender senders.DistributionSender) histogramDataPointConsumer { - return &deltaHistogramDataPointConsumer{sender: sender} -} - -func (d *deltaHistogramDataPointConsumer) Consume( - mi metricInfo, - point bucketHistogramDataPoint, - errs *[]error, - reporting *histogramReporting) { - if !point.Valid() { - reporting.LogMalformed(mi.Metric) - return - } - name := mi.Name() - tags := pointAndResAttrsToTagsAndFixSource(mi.SourceKey, point.Attributes, newMap(mi.ResourceAttrs)) - err := d.sender.SendDistribution( - name, point.AsDelta(), allGranularity, point.SecondsSinceEpoch, mi.Source, tags) - if err != nil { - *errs = append(*errs, err) - } -} - -type summaryConsumer struct { - sender gaugeSender - settings component.TelemetrySettings -} - -// newSummaryConsumer returns a typedMetricConsumer that consumes summary metrics -// by sending them to tanzu observability. -func newSummaryConsumer( - sender gaugeSender, settings component.TelemetrySettings, -) typedMetricConsumer { - return &summaryConsumer{sender: sender, settings: settings} -} - -func (s *summaryConsumer) Type() pmetric.MetricType { - return pmetric.MetricTypeSummary -} - -func (s *summaryConsumer) Consume(mi metricInfo, errs *[]error) { - summary := mi.Summary() - summaryDataPoints := summary.DataPoints() - for i := 0; i < summaryDataPoints.Len(); i++ { - s.sendSummaryDataPoint(mi, summaryDataPoints.At(i), errs) - } -} - -// PushInternalMetrics is here so that summaryConsumer implements typedMetricConsumer -func (*summaryConsumer) PushInternalMetrics(*[]error) { - // Do nothing -} - -func (s *summaryConsumer) sendSummaryDataPoint( - mi metricInfo, summaryDataPoint pmetric.SummaryDataPoint, errs *[]error, -) { - name := mi.Name() - ts := summaryDataPoint.Timestamp().AsTime().Unix() - tags := pointAndResAttrsToTagsAndFixSource(mi.SourceKey, summaryDataPoint.Attributes(), newMap(mi.ResourceAttrs)) - count := summaryDataPoint.Count() - sum := summaryDataPoint.Sum() - - if quantileTag, ok := tags["quantile"]; ok { - tags["_quantile"] = quantileTag - delete(tags, "quantile") - } - s.sendMetric(name+"_count", float64(count), ts, tags, errs, mi.Source) - s.sendMetric(name+"_sum", sum, ts, tags, errs, mi.Source) - quantileValues := summaryDataPoint.QuantileValues() - for i := 0; i < quantileValues.Len(); i++ { - quantileValue := quantileValues.At(i) - tags["quantile"] = quantileTagValue(quantileValue.Quantile()) - s.sendMetric(name, quantileValue.Value(), ts, tags, errs, mi.Source) - } -} - -func (s *summaryConsumer) sendMetric( - name string, - value float64, - ts int64, - tags map[string]string, - errs *[]error, - source string) { - err := s.sender.SendMetric(name, value, ts, source, tags) - if err != nil { - *errs = append(*errs, err) - } -} - -func quantileTagValue(quantile float64) string { - return strconv.FormatFloat(quantile, 'f', -1, 64) -} - -// cumulativeBucket represents a cumulative histogram bucket -type cumulativeBucket struct { - - // The value of the "le" tag - Tag string - - // The count of values less than or equal to the "le" tag - Count uint64 -} - -// bucketHistogramDataPoint represents a single histogram data point -type bucketHistogramDataPoint struct { - Attributes pcommon.Map - SecondsSinceEpoch int64 - - // The bucket counts. For exponential histograms, the first and last element of bucketCounts - // are always 0. - bucketCounts []uint64 - - // The explicit bounds len(explicitBounds) + 1 == len(bucketCounts) - // If explicitBounds = {10, 20} and bucketCounts = {1, 2, 3} it means that 1 value is <= 10; - // 2 values are between 10 and 20; and 3 values are > 20 - explicitBounds []float64 - - // true if data point came from an exponential histogram. - exponential bool -} - -// Valid returns true if this is a valid data point. -func (b *bucketHistogramDataPoint) Valid() bool { - return len(b.bucketCounts) == len(b.explicitBounds)+1 -} - -// AsCumulative returns the buckets for a cumulative histogram -func (b *bucketHistogramDataPoint) AsCumulative() []cumulativeBucket { - if !b.Valid() { - panic(histogramDataPointInvalid) - } - - // For exponential histograms, we ignore the first bucket which always has count 0 - // but include the last bucket for +Inf. - if b.exponential { - return b.asCumulative(1, len(b.bucketCounts)) - } - return b.asCumulative(0, len(b.bucketCounts)) -} - -// AsDelta returns the centroids for a delta histogram -func (b *bucketHistogramDataPoint) AsDelta() []histogram.Centroid { - if !b.Valid() { - panic(histogramDataPointInvalid) - } - - // For exponential histograms, we ignore the first and last centroids which always have a - // count of 0. - if b.exponential { - return b.asDelta(1, len(b.bucketCounts)-1) - } - return b.asDelta(0, len(b.bucketCounts)) -} - -func (b *bucketHistogramDataPoint) asCumulative( - startBucketIndex, endBucketIndex int) []cumulativeBucket { - result := make([]cumulativeBucket, 0, endBucketIndex-startBucketIndex) - var leCount uint64 - for i := startBucketIndex; i < endBucketIndex; i++ { - leCount += b.bucketCounts[i] - result = append(result, cumulativeBucket{Tag: b.leTagValue(i), Count: leCount}) - } - return result -} - -func (b *bucketHistogramDataPoint) asDelta( - startBucketIndex, endBucketIndex int) []histogram.Centroid { - result := make([]histogram.Centroid, 0, endBucketIndex-startBucketIndex) - for i := startBucketIndex; i < endBucketIndex; i++ { - result = append( - result, - histogram.Centroid{Value: b.centroidValue(i), Count: int(b.bucketCounts[i])}) - } - return result -} - -func (b *bucketHistogramDataPoint) leTagValue(bucketIndex int) string { - if bucketIndex == len(b.explicitBounds) { - return "+Inf" - } - return strconv.FormatFloat(b.explicitBounds[bucketIndex], 'f', -1, 64) -} - -func (b *bucketHistogramDataPoint) centroidValue(index int) float64 { - length := len(b.explicitBounds) - if length == 0 { - // This is the best we can do. - return 0.0 - } - if index == 0 { - return b.explicitBounds[0] - } - if index == length { - return b.explicitBounds[length-1] - } - return (b.explicitBounds[index-1] + b.explicitBounds[index]) / 2.0 -} - -type histogramSpecification interface { - Type() pmetric.MetricType - AggregationTemporality(metric pmetric.Metric) pmetric.AggregationTemporality - DataPoints(metric pmetric.Metric) []bucketHistogramDataPoint -} - -type regularHistogramSpecification struct { -} - -func (regularHistogramSpecification) Type() pmetric.MetricType { - return pmetric.MetricTypeHistogram -} - -func (regularHistogramSpecification) AggregationTemporality( - metric pmetric.Metric) pmetric.AggregationTemporality { - return metric.Histogram().AggregationTemporality() -} - -func (regularHistogramSpecification) DataPoints(metric pmetric.Metric) []bucketHistogramDataPoint { - return fromOtelHistogram(metric.Histogram().DataPoints()) -} - -type exponentialHistogramSpecification struct { -} - -func (exponentialHistogramSpecification) Type() pmetric.MetricType { - return pmetric.MetricTypeExponentialHistogram -} - -func (exponentialHistogramSpecification) AggregationTemporality( - metric pmetric.Metric) pmetric.AggregationTemporality { - return metric.ExponentialHistogram().AggregationTemporality() -} - -func (exponentialHistogramSpecification) DataPoints( - metric pmetric.Metric) []bucketHistogramDataPoint { - return fromOtelExponentialHistogram(metric.ExponentialHistogram().DataPoints()) -} - -// fromOtelHistogram converts a regular histogram metric into a slice of data points. -func fromOtelHistogram(points pmetric.HistogramDataPointSlice) []bucketHistogramDataPoint { - result := make([]bucketHistogramDataPoint, points.Len()) - for i := 0; i < points.Len(); i++ { - result[i] = fromOtelHistogramDataPoint(points.At(i)) - } - return result -} - -// fromOtelExponentialHistogram converts an exponential histogram into a slice of data points. -func fromOtelExponentialHistogram( - points pmetric.ExponentialHistogramDataPointSlice) []bucketHistogramDataPoint { - result := make([]bucketHistogramDataPoint, points.Len()) - for i := 0; i < points.Len(); i++ { - result[i] = fromOtelExponentialHistogramDataPoint(points.At(i)) - } - return result -} - -func fromOtelHistogramDataPoint(point pmetric.HistogramDataPoint) bucketHistogramDataPoint { - return bucketHistogramDataPoint{ - Attributes: point.Attributes(), - SecondsSinceEpoch: point.Timestamp().AsTime().Unix(), - bucketCounts: point.BucketCounts().AsRaw(), - explicitBounds: point.ExplicitBounds().AsRaw(), - } -} - -func fromOtelExponentialHistogramDataPoint( - point pmetric.ExponentialHistogramDataPoint) bucketHistogramDataPoint { - - // Base is the factor by which the explicit bounds increase from bucket to bucket. - // This formula comes from the documentation here: - // https://github.com/open-telemetry/opentelemetry-proto/blob/8ba33cceb4a6704af68a4022d17868a7ac1d94f4/opentelemetry/proto/metrics/v1/metrics.proto#L487 - base := math.Pow(2.0, math.Pow(2.0, -float64(point.Scale()))) - - // ExponentialHistogramDataPoints have buckets with negative explicit bounds, buckets with - // positive explicit bounds, and a "zero" bucket. Our job is to merge these bucket groups into - // a single list of buckets and explicit bounds. - negativeBucketCounts := point.Negative().BucketCounts().AsRaw() - positiveBucketCounts := point.Positive().BucketCounts().AsRaw() - - // The total number of buckets is the number of negative buckets + the number of positive - // buckets + 1 for the zero bucket + 1 bucket for negative infinity up to the smallest negative explicit bound - // + 1 bucket for the largest positive explicit bound up to positive infinity. - numBucketCounts := 1 + len(negativeBucketCounts) + 1 + len(positiveBucketCounts) + 1 - - // We pre-allocate the slice setting its length to 0 so that GO doesn't have to keep - // re-allocating the slice as it grows. - bucketCounts := make([]uint64, 0, numBucketCounts) - - // The number of explicit bounds is always 1 less than the number of buckets. This is how - // explicit bounds work. If you have 2 explicit bounds say {2.0, 5.0} then you have 3 buckets: - // one for values less than 2.0; one for values between 2.0 and 5.0; and one for values greater - // than 5.0. - explicitBounds := make([]float64, 0, numBucketCounts-1) - - appendNegativeBucketsAndExplicitBounds( - point.Negative().Offset(), base, negativeBucketCounts, &bucketCounts, &explicitBounds) - appendZeroBucketAndExplicitBound( - point.Positive().Offset(), base, point.ZeroCount(), &bucketCounts, &explicitBounds) - appendPositiveBucketsAndExplicitBounds( - point.Positive().Offset(), base, positiveBucketCounts, &bucketCounts, &explicitBounds) - return bucketHistogramDataPoint{ - Attributes: point.Attributes(), - SecondsSinceEpoch: point.Timestamp().AsTime().Unix(), - bucketCounts: bucketCounts, - explicitBounds: explicitBounds, - exponential: true, - } -} - -// appendNegativeBucketsAndExplicitBounds appends negative buckets and explicit bounds to -// bucketCounts and explicitBounds respectively. The largest negative explicit bound (the one -// with the smallest magnitude) is -1*base^negativeOffset -func appendNegativeBucketsAndExplicitBounds( - negativeOffset int32, - base float64, - negativeBucketCounts []uint64, - bucketCounts *[]uint64, - explicitBounds *[]float64, -) { - // The count in the first bucket which includes negative infinity is always 0. - *bucketCounts = append(*bucketCounts, 0) - - // The smallest negative explicit bound. - le := -math.Pow(base, float64(negativeOffset)+float64(len(negativeBucketCounts))) - *explicitBounds = append(*explicitBounds, le) - - // The first negativeBucketCount has a negative explicit bound with the smallest magnitude; - // the last negativeBucketCount has a negative explicit bound with the largest magnitude. - // Therefore, to go in order from smallest to largest explicit bound, we have to start with - // the last element in the negativeBucketCounts array. - for i := len(negativeBucketCounts) - 1; i >= 0; i-- { - *bucketCounts = append(*bucketCounts, negativeBucketCounts[i]) - le /= base // We divide by base because our explicit bounds are getting larger as we go - *explicitBounds = append(*explicitBounds, le) - } -} - -// appendZeroBucketAndExplicitBound appends the "zero" bucket and explicit bound to bucketCounts -// and explicitBounds respectively. The smallest positive explicit bound is base^positiveOffset. -func appendZeroBucketAndExplicitBound( - positiveOffset int32, - base float64, - zeroBucketCount uint64, - bucketCounts *[]uint64, - explicitBounds *[]float64, -) { - *bucketCounts = append(*bucketCounts, zeroBucketCount) - - // The explicit bound of the zeroBucketCount is the smallest positive explicit bound - *explicitBounds = append(*explicitBounds, math.Pow(base, float64(positiveOffset))) -} - -// appendPositiveBucketsAndExplicitBounds appends positive buckets and explicit bounds to -// bucketCounts and explicitBounds respectively. The smallest positive explicit bound is -// base^positiveOffset. -func appendPositiveBucketsAndExplicitBounds( - positiveOffset int32, - base float64, - positiveBucketCounts []uint64, - bucketCounts *[]uint64, - explicitBounds *[]float64, -) { - le := math.Pow(base, float64(positiveOffset)) - for _, bucketCount := range positiveBucketCounts { - *bucketCounts = append(*bucketCounts, bucketCount) - le *= base - *explicitBounds = append(*explicitBounds, le) - } - // Last bucket count for positive infinity is always 0. - *bucketCounts = append(*bucketCounts, 0) -} diff --git a/exporter/tanzuobservabilityexporter/metrics_exporter.go b/exporter/tanzuobservabilityexporter/metrics_exporter.go deleted file mode 100644 index ba2f248f5f20..000000000000 --- a/exporter/tanzuobservabilityexporter/metrics_exporter.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package tanzuobservabilityexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter" - -import ( - "context" - "fmt" - - "github.com/wavefronthq/wavefront-sdk-go/senders" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/pdata/pmetric" -) - -type metricsExporter struct { - consumer *metricsConsumer -} - -func createMetricsConsumer(config MetricsConfig, settings component.TelemetrySettings, otelVersion string) (*metricsConsumer, error) { - s, err := senders.NewSender(config.Endpoint, - senders.FlushIntervalSeconds(60), - senders.SDKMetricsTags(map[string]string{"otel.metrics.collector_version": otelVersion}), - ) - if err != nil { - return nil, fmt.Errorf("failed to create proxy sender: %w", err) - } - cumulative := newCumulativeHistogramDataPointConsumer(s) - delta := newDeltaHistogramDataPointConsumer(s) - return newMetricsConsumer( - []typedMetricConsumer{ - newGaugeConsumer(s, settings), - newSumConsumer(s, settings), - newHistogramConsumer(cumulative, delta, s, regularHistogram, settings), - newHistogramConsumer(cumulative, delta, s, exponentialHistogram, settings), - newSummaryConsumer(s, settings), - }, - s, - true, config), nil -} - -type metricsConsumerCreator func(config MetricsConfig, settings component.TelemetrySettings, otelVersion string) ( - *metricsConsumer, error) - -func newMetricsExporter(settings exporter.CreateSettings, c component.Config, creator metricsConsumerCreator) (*metricsExporter, error) { - cfg, ok := c.(*Config) - if !ok { - return nil, fmt.Errorf("invalid config: %#v", c) - } - if !cfg.hasMetricsEndpoint() { - return nil, fmt.Errorf("metrics.endpoint required") - } - if _, _, err := cfg.parseMetricsEndpoint(); err != nil { - return nil, fmt.Errorf("failed to parse metrics.endpoint: %w", err) - } - consumer, err := creator(cfg.Metrics, settings.TelemetrySettings, settings.BuildInfo.Version) - if err != nil { - return nil, err - } - return &metricsExporter{ - consumer: consumer, - }, nil -} - -func (e *metricsExporter) pushMetricsData(ctx context.Context, md pmetric.Metrics) error { - return e.consumer.Consume(ctx, md) -} - -func (e *metricsExporter) shutdown(_ context.Context) error { - e.consumer.Close() - return nil -} diff --git a/exporter/tanzuobservabilityexporter/metrics_exporter_test.go b/exporter/tanzuobservabilityexporter/metrics_exporter_test.go deleted file mode 100644 index 77eca0a5c020..000000000000 --- a/exporter/tanzuobservabilityexporter/metrics_exporter_test.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package tanzuobservabilityexporter - -import ( - "context" - "errors" - "log" - "testing" - - "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exporterhelper" - "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/pdata/pmetric" -) - -func TestPushMetricsData(t *testing.T) { - assert.NoError(t, verifyPushMetricsData(t, false)) -} - -func TestPushMetricsDataErrorOnSend(t *testing.T) { - assert.Error(t, verifyPushMetricsData(t, true)) -} - -func verifyPushMetricsData(t *testing.T, errorOnSend bool) error { - metric := newMetric("test.metric", pmetric.MetricTypeGauge) - dataPoints := metric.Gauge().DataPoints() - dataPoints.EnsureCapacity(1) - addDataPoint( - 7, - 1631205001, - map[string]any{ - "env": "prod", - "bucket": 73, - }, - dataPoints, - ) - metrics := constructMetrics(metric) - sender := &mockMetricSender{errorOnSend: errorOnSend} - result := consumeMetrics(metrics, sender) - assert.Equal(t, 1, sender.numFlushCalls) - assert.Equal(t, 1, sender.numCloseCalls) - assert.Equal(t, 1, sender.numSendMetricCalls) - return result -} - -func createMockMetricsExporter( - sender *mockMetricSender) (exporter.Metrics, error) { - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - tobsConfig.Metrics.Endpoint = "http://localhost:2878" - creator := func( - metricsConfig MetricsConfig, settings component.TelemetrySettings, otelVersion string) (*metricsConsumer, error) { - return newMetricsConsumer( - []typedMetricConsumer{ - newGaugeConsumer(sender, settings), - }, - sender, - false, - tobsConfig.Metrics, - ), nil - } - - exp, err := newMetricsExporter(exportertest.NewNopCreateSettings(), exporterConfig, creator) - if err != nil { - return nil, err - } - return exporterhelper.NewMetricsExporter( - context.Background(), - exportertest.NewNopCreateSettings(), - exporterConfig, - exp.pushMetricsData, - exporterhelper.WithShutdown(exp.shutdown), - ) -} - -func consumeMetrics(metrics pmetric.Metrics, sender *mockMetricSender) error { - ctx := context.Background() - mockOTelMetricsExporter, err := createMockMetricsExporter(sender) - if err != nil { - return err - } - defer func() { - if err := mockOTelMetricsExporter.Shutdown(ctx); err != nil { - log.Fatalln(err) - } - }() - return mockOTelMetricsExporter.ConsumeMetrics(ctx, metrics) -} - -type mockMetricSender struct { - errorOnSend bool - numFlushCalls int - numCloseCalls int - numSendMetricCalls int -} - -func (m *mockMetricSender) SendMetric( - _ string, _ float64, _ int64, _ string, _ map[string]string) error { - m.numSendMetricCalls++ - if m.errorOnSend { - return errors.New("error sending") - } - return nil -} - -func (m *mockMetricSender) Flush() error { - m.numFlushCalls++ - return nil -} - -func (m *mockMetricSender) Close() { m.numCloseCalls++ } diff --git a/exporter/tanzuobservabilityexporter/metrics_test.go b/exporter/tanzuobservabilityexporter/metrics_test.go deleted file mode 100644 index d37f85942894..000000000000 --- a/exporter/tanzuobservabilityexporter/metrics_test.go +++ /dev/null @@ -1,1688 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package tanzuobservabilityexporter - -import ( - "context" - "errors" - "math" - "strconv" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/wavefronthq/wavefront-sdk-go/histogram" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/pmetric" - "go.uber.org/zap" - "go.uber.org/zap/zaptest/observer" -) - -func TestEndToEndGaugeConsumer(t *testing.T) { - gauge := newMetric("gauge", pmetric.MetricTypeGauge) - dataPoints := gauge.Gauge().DataPoints() - dataPoints.EnsureCapacity(1) - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - // Here we test what happens with default config. ResourceAttrsIncluded = false AppTagsExcluded = false - addDataPoint( - 432.25, - 1640123456, - map[string]any{"source": "renamed", "host.name": "my_source", "env": "prod"}, - dataPoints, - ) - // test if service.name gets converted to service - resourceAttributes := map[string]string{"host.name": "my_source", "res_attr_key": "res_attr_value", "application": "test_app", "service.name": "test_service", "shard": "test_shard", "cluster": "test_cluster"} - metrics := constructMetricsWithTags(resourceAttributes, gauge) - sender := &mockGaugeSender{} - gaugeConsumer := newGaugeConsumer(sender, componenttest.NewNopTelemetrySettings()) - consumer := newMetricsConsumer( - []typedMetricConsumer{gaugeConsumer}, &mockFlushCloser{}, true, tobsConfig.Metrics) - assert.NoError(t, consumer.Consume(context.Background(), metrics)) - - // The "host.name" tag gets filtered out as it contains our source, and the "source" - // tag gets renamed to "_source" - assert.Contains( - t, - sender.metrics, - tobsMetric{ - Name: "gauge", - Ts: 1640123456, - Value: 432.25, - Tags: map[string]string{"_source": "renamed", "env": "prod", "application": "test_app", "service": "test_service", "shard": "test_shard", "cluster": "test_cluster"}, - Source: "my_source", - }, - ) - - // Since internal metrics are coming from the exporter itself, we send - // them with an empty source which defaults to the host name of the - // exporter. - assert.Contains( - t, - sender.metrics, - tobsMetric{ - Name: missingValueMetricName, - Ts: 0, - Value: 0.0, - Tags: typeIsGaugeTags, - Source: "", - }, - ) -} - -func TestEndToEndGaugeConsumerWithResAttrsIncluded(t *testing.T) { - gauge := newMetric("gauge", pmetric.MetricTypeGauge) - dataPoints := gauge.Gauge().DataPoints() - dataPoints.EnsureCapacity(1) - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - tobsConfig.Metrics.ResourceAttrsIncluded = true - // Here we test what happens if ResourceAttrsIncluded = true - addDataPoint( - 432.25, - 1640123456, - map[string]any{"source": "renamed", "host.name": "my_source", "env": "prod"}, - dataPoints, - ) - // test if service.name gets converted to service - resourceAttributes := map[string]string{"host.name": "my_source", "res_attr_key": "res_attr_value", "service.name": "test_service"} - metrics := constructMetricsWithTags(resourceAttributes, gauge) - sender := &mockGaugeSender{} - gaugeConsumer := newGaugeConsumer(sender, componenttest.NewNopTelemetrySettings()) - consumer := newMetricsConsumer( - []typedMetricConsumer{gaugeConsumer}, &mockFlushCloser{}, true, tobsConfig.Metrics) - assert.NoError(t, consumer.Consume(context.Background(), metrics)) - - // The "host.name" tag gets filtered out as it contains our source, and the "source" - // tag gets renamed to "_source" - assert.Contains( - t, - sender.metrics, - tobsMetric{ - Name: "gauge", - Ts: 1640123456, - Value: 432.25, - Tags: map[string]string{"_source": "renamed", "env": "prod", "res_attr_key": "res_attr_value", "service": "test_service"}, - Source: "my_source", - }, - ) - - // Since internal metrics are coming from the exporter itself, we send - // them with an empty source which defaults to the host name of the - // exporter. - assert.Contains( - t, - sender.metrics, - tobsMetric{ - Name: missingValueMetricName, - Ts: 0, - Value: 0.0, - Tags: typeIsGaugeTags, - Source: "", - }, - ) -} - -func TestEndToEndGaugeConsumerWithAppResAttrsExcluded(t *testing.T) { - gauge := newMetric("gauge", pmetric.MetricTypeGauge) - dataPoints := gauge.Gauge().DataPoints() - dataPoints.EnsureCapacity(1) - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - tobsConfig.Metrics.AppTagsExcluded = true - // Here we test what happens if ResourceAttrsIncluded = false AppTagsExcluded = true - addDataPoint( - 432.25, - 1640123456, - map[string]any{"source": "renamed", "host.name": "my_source", "env": "prod"}, - dataPoints, - ) - // test if service.name gets converted to service - resourceAttributes := map[string]string{"host.name": "my_source", "res_attr_key": "res_attr_value", "application": "test_app", "service": "test_service", "service.name": "test_service.name", "shard": "test_shard", "cluster": "test_cluster"} - metrics := constructMetricsWithTags(resourceAttributes, gauge) - sender := &mockGaugeSender{} - gaugeConsumer := newGaugeConsumer(sender, componenttest.NewNopTelemetrySettings()) - consumer := newMetricsConsumer( - []typedMetricConsumer{gaugeConsumer}, &mockFlushCloser{}, true, tobsConfig.Metrics) - assert.NoError(t, consumer.Consume(context.Background(), metrics)) - - // The "host.name" tag gets filtered out as it contains our source, and the "source" - // tag gets renamed to "_source" - assert.Contains( - t, - sender.metrics, - tobsMetric{ - Name: "gauge", - Ts: 1640123456, - Value: 432.25, - Tags: map[string]string{"_source": "renamed", "env": "prod"}, - Source: "my_source", - }, - ) - - // Since internal metrics are coming from the exporter itself, we send - // them with an empty source which defaults to the host name of the - // exporter. - assert.Contains( - t, - sender.metrics, - tobsMetric{ - Name: missingValueMetricName, - Ts: 0, - Value: 0.0, - Tags: typeIsGaugeTags, - Source: "", - }, - ) -} - -func TestMetricsConsumerNormal(t *testing.T) { - gauge1 := newMetric("gauge1", pmetric.MetricTypeGauge) - sum1 := newMetric("sum1", pmetric.MetricTypeSum) - gauge2 := newMetric("gauge2", pmetric.MetricTypeGauge) - sum2 := newMetric("sum2", pmetric.MetricTypeSum) - mockGaugeConsumer := &mockTypedMetricConsumer{typ: pmetric.MetricTypeGauge} - mockSumConsumer := &mockTypedMetricConsumer{typ: pmetric.MetricTypeSum} - sender := &mockFlushCloser{} - metrics := constructMetrics(gauge1, sum1, gauge2, sum2) - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - - consumer := newMetricsConsumer( - []typedMetricConsumer{mockGaugeConsumer, mockSumConsumer}, sender, true, tobsConfig.Metrics) - - assert.NoError(t, consumer.Consume(context.Background(), metrics)) - - assert.ElementsMatch(t, []string{"gauge1", "gauge2"}, mockGaugeConsumer.names) - assert.ElementsMatch(t, []string{"sum1", "sum2"}, mockSumConsumer.names) - assert.Equal(t, 1, mockGaugeConsumer.pushInternalMetricsCallCount) - assert.Equal(t, 1, mockSumConsumer.pushInternalMetricsCallCount) - assert.Equal(t, 1, sender.numFlushCalls) - assert.Equal(t, 0, sender.numCloseCalls) - - consumer.Close() - assert.Equal(t, 1, sender.numCloseCalls) -} - -func TestMetricsConsumerNormalWithSourceTag(t *testing.T) { - sum := newMetric("sum", pmetric.MetricTypeSum) - mockSumConsumer := &mockTypedMetricConsumer{typ: pmetric.MetricTypeSum} - sender := &mockFlushCloser{} - tags := map[string]string{"source": "test_source", "test_key": "test_value"} - metrics := constructMetricsWithTags(tags, sum) - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - - consumer := newMetricsConsumer( - []typedMetricConsumer{mockSumConsumer}, sender, true, tobsConfig.Metrics) - assert.NoError(t, consumer.Consume(context.Background(), metrics)) - - assert.ElementsMatch(t, []string{"sum"}, mockSumConsumer.names) - assert.ElementsMatch(t, []string{"test_source"}, mockSumConsumer.sources) - assert.ElementsMatch(t, []string{"source"}, mockSumConsumer.sourceKeys) - - assert.Equal(t, 1, mockSumConsumer.pushInternalMetricsCallCount) - assert.Equal(t, 1, sender.numFlushCalls) - assert.Equal(t, 0, sender.numCloseCalls) - - consumer.Close() - assert.Equal(t, 1, sender.numCloseCalls) -} - -func TestMetricsConsumerNormalWithHostnameTag(t *testing.T) { - sum := newMetric("sum", pmetric.MetricTypeSum) - mockSumConsumer := &mockTypedMetricConsumer{typ: pmetric.MetricTypeSum} - sender := &mockFlushCloser{} - tags := map[string]string{"host.name": "test_host.name", "hostname": "test_hostname"} - metrics := constructMetricsWithTags(tags, sum) - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - - consumer := newMetricsConsumer( - []typedMetricConsumer{mockSumConsumer}, sender, true, tobsConfig.Metrics) - - assert.NoError(t, consumer.Consume(context.Background(), metrics)) - - assert.ElementsMatch(t, []string{"sum"}, mockSumConsumer.names) - assert.ElementsMatch(t, []string{"test_host.name"}, mockSumConsumer.sources) - assert.ElementsMatch(t, []string{"host.name"}, mockSumConsumer.sourceKeys) - - assert.Equal(t, 1, mockSumConsumer.pushInternalMetricsCallCount) - assert.Equal(t, 1, sender.numFlushCalls) - assert.Equal(t, 0, sender.numCloseCalls) - - consumer.Close() - assert.Equal(t, 1, sender.numCloseCalls) -} - -func TestMetricsConsumerNone(t *testing.T) { - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - - consumer := newMetricsConsumer(nil, nil, true, tobsConfig.Metrics) - metrics := constructMetrics() - - assert.NoError(t, consumer.Consume(context.Background(), metrics)) - - consumer.Close() -} - -func TestNewMetricsConsumerPanicsWithDuplicateMetricType(t *testing.T) { - mockGaugeConsumer1 := &mockTypedMetricConsumer{typ: pmetric.MetricTypeGauge} - mockGaugeConsumer2 := &mockTypedMetricConsumer{typ: pmetric.MetricTypeGauge} - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - - assert.Panics(t, func() { - newMetricsConsumer( - []typedMetricConsumer{mockGaugeConsumer1, mockGaugeConsumer2}, - nil, - true, tobsConfig.Metrics) - }) -} - -func TestMetricsConsumerPropagatesErrorsOnFlush(t *testing.T) { - sender := &mockFlushCloser{errorOnFlush: true} - metrics := constructMetrics() - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - - consumer := newMetricsConsumer(nil, sender, true, tobsConfig.Metrics) - - assert.Error(t, consumer.Consume(context.Background(), metrics)) - assert.Equal(t, 1, sender.numFlushCalls) -} - -func TestMetricsConsumerErrorsWithUnregisteredMetricType(t *testing.T) { - gauge1 := newMetric("gauge1", pmetric.MetricTypeGauge) - metrics := constructMetrics(gauge1) - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - - consumer := newMetricsConsumer(nil, nil, true, tobsConfig.Metrics) - - assert.Error(t, consumer.Consume(context.Background(), metrics)) -} - -func TestMetricsConsumerErrorConsuming(t *testing.T) { - gauge1 := newMetric("gauge1", pmetric.MetricTypeGauge) - mockGaugeConsumer := &mockTypedMetricConsumer{ - typ: pmetric.MetricTypeGauge, - errorOnConsume: true} - metrics := constructMetrics(gauge1) - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - - consumer := newMetricsConsumer( - []typedMetricConsumer{mockGaugeConsumer}, nil, true, tobsConfig.Metrics) - - assert.Error(t, consumer.Consume(context.Background(), metrics)) - assert.Len(t, mockGaugeConsumer.names, 1) - assert.Equal(t, 1, mockGaugeConsumer.pushInternalMetricsCallCount) -} - -func TestMetricsConsumerNoReportingInternalMetrics(t *testing.T) { - gauge1 := newMetric("gauge1", pmetric.MetricTypeGauge) - mockGaugeConsumer := &mockTypedMetricConsumer{typ: pmetric.MetricTypeGauge} - metrics := constructMetrics(gauge1) - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - - consumer := newMetricsConsumer( - []typedMetricConsumer{mockGaugeConsumer}, nil, false, tobsConfig.Metrics) - assert.NoError(t, consumer.Consume(context.Background(), metrics)) - assert.Len(t, mockGaugeConsumer.names, 1) - assert.Equal(t, 0, mockGaugeConsumer.pushInternalMetricsCallCount) -} - -func TestMetricsConsumerErrorConsumingInternal(t *testing.T) { - gauge1 := newMetric("gauge1", pmetric.MetricTypeGauge) - mockGaugeConsumer := &mockTypedMetricConsumer{ - typ: pmetric.MetricTypeGauge, errorOnPushInternalMetrics: true} - metrics := constructMetrics(gauge1) - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - - consumer := newMetricsConsumer( - []typedMetricConsumer{mockGaugeConsumer}, nil, true, tobsConfig.Metrics) - - assert.Error(t, consumer.Consume(context.Background(), metrics)) - assert.Len(t, mockGaugeConsumer.names, 1) - assert.Equal(t, 1, mockGaugeConsumer.pushInternalMetricsCallCount) -} - -func TestMetricsConsumerRespectContext(t *testing.T) { - sender := &mockFlushCloser{} - gauge1 := newMetric("gauge1", pmetric.MetricTypeGauge) - mockGaugeConsumer := &mockTypedMetricConsumer{typ: pmetric.MetricTypeGauge} - exporterConfig := createDefaultConfig() - tobsConfig := exporterConfig.(*Config) - - consumer := newMetricsConsumer( - []typedMetricConsumer{mockGaugeConsumer}, sender, true, tobsConfig.Metrics) - ctx, cancel := context.WithCancel(context.Background()) - - cancel() - assert.Error(t, consumer.Consume(ctx, constructMetrics(gauge1))) - - assert.Zero(t, sender.numFlushCalls) - assert.Empty(t, mockGaugeConsumer.names) - assert.Zero(t, mockGaugeConsumer.pushInternalMetricsCallCount) -} - -func TestGaugeConsumerNormal(t *testing.T) { - verifyGaugeConsumer(t, false) -} - -func TestGaugeConsumerErrorSending(t *testing.T) { - verifyGaugeConsumer(t, true) -} - -func TestGaugeConsumerMissingValue(t *testing.T) { - metric := newMetric("missing.value.metric", pmetric.MetricTypeGauge) - mi := metricInfo{Metric: metric, Source: "test_source", SourceKey: "host.name"} - dataPoints := metric.Gauge().DataPoints() - dataPoints.EnsureCapacity(1) - addDataPoint( - nil, - 1633123456, - nil, - dataPoints, - ) - // Sending to tanzu observability should fail - sender := &mockGaugeSender{errorOnSend: true} - observedZapCore, observedLogs := observer.New(zap.DebugLevel) - settings := componenttest.NewNopTelemetrySettings() - settings.Logger = zap.New(observedZapCore) - consumer := newGaugeConsumer(sender, settings) - var errs []error - expectedMissingValueCount := 2 - for i := 0; i < expectedMissingValueCount; i++ { - // This call to Consume does not emit any metrics to tanzuobservability - // because the metric is missing its value. - consumer.Consume(mi, &errs) - } - assert.Empty(t, errs) - - // This call adds one error to errs because it emits a metric to - // tanzu observability and emitting there is set up to fail. - consumer.PushInternalMetrics(&errs) - - // One error from emitting the internal metric - assert.Len(t, errs, 1) - assert.Contains( - t, - sender.metrics, - tobsMetric{ - Name: missingValueMetricName, - Value: float64(expectedMissingValueCount), - Tags: map[string]string{"type": "gauge"}, - }, - ) - allLogs := observedLogs.All() - assert.Len(t, allLogs, expectedMissingValueCount) -} - -func TestSumConsumerDelta(t *testing.T) { - deltaMetric := newMetric( - "test.delta.metric", pmetric.MetricTypeSum) - sum := deltaMetric.Sum() - mi := metricInfo{Metric: deltaMetric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - sum.SetAggregationTemporality(pmetric.AggregationTemporalityDelta) - dataPoints := sum.DataPoints() - dataPoints.EnsureCapacity(2) - addDataPoint( - 35, - 1635205001, - map[string]any{ - "env": "dev", - }, - dataPoints, - ) - addDataPoint( - 52.375, - 1635205002, - map[string]any{ - "env": "prod", - }, - dataPoints, - ) - - sender := &mockSumSender{} - consumer := newSumConsumer(sender, componenttest.NewNopTelemetrySettings()) - assert.Equal(t, pmetric.MetricTypeSum, consumer.Type()) - var errs []error - - // delta sums get treated as delta counters - consumer.Consume(mi, &errs) - - expected := []tobsMetric{ - { - Name: "test.delta.metric", - Value: 35.0, - Source: "test_source", - Tags: map[string]string{"env": "dev", "res_attr_key": "res_attr_value"}, - }, - { - Name: "test.delta.metric", - Value: 52.375, - Source: "test_source", - Tags: map[string]string{"env": "prod", "res_attr_key": "res_attr_value"}, - }, - } - assert.ElementsMatch(t, expected, sender.deltaMetrics) - assert.Empty(t, sender.metrics) - assert.Empty(t, errs) -} - -func TestSumConsumerErrorOnSend(t *testing.T) { - deltaMetric := newMetric( - "test.delta.metric", pmetric.MetricTypeSum) - sum := deltaMetric.Sum() - mi := metricInfo{Metric: deltaMetric, Source: "test_source", SourceKey: "host.name"} - sum.SetAggregationTemporality(pmetric.AggregationTemporalityDelta) - dataPoints := sum.DataPoints() - dataPoints.EnsureCapacity(2) - addDataPoint( - 35, - 1635205001, - map[string]any{ - "env": "dev", - }, - dataPoints, - ) - addDataPoint( - 52.375, - 1635205002, - map[string]any{ - "env": "prod", - }, - dataPoints, - ) - - sender := &mockSumSender{errorOnSend: true} - consumer := newSumConsumer(sender, componenttest.NewNopTelemetrySettings()) - assert.Equal(t, pmetric.MetricTypeSum, consumer.Type()) - var errs []error - - // delta sums get treated as delta counters - consumer.Consume(mi, &errs) - - assert.Len(t, errs, 2) -} - -func TestSumConsumerCumulative(t *testing.T) { - cumulativeMetric := newMetric( - "test.cumulative.metric", pmetric.MetricTypeSum) - sum := cumulativeMetric.Sum() - mi := metricInfo{Metric: cumulativeMetric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - sum.SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) - dataPoints := sum.DataPoints() - dataPoints.EnsureCapacity(1) - addDataPoint( - 62.25, - 1634205001, - map[string]any{ - "env": "dev", - }, - dataPoints, - ) - sender := &mockSumSender{} - consumer := newSumConsumer(sender, componenttest.NewNopTelemetrySettings()) - assert.Equal(t, pmetric.MetricTypeSum, consumer.Type()) - var errs []error - - // cumulative sums get treated as regular wavefront metrics - consumer.Consume(mi, &errs) - - expected := []tobsMetric{ - { - Name: "test.cumulative.metric", - Value: 62.25, - Ts: 1634205001, - Source: "test_source", - Tags: map[string]string{"env": "dev", "res_attr_key": "res_attr_value"}, - }, - } - assert.ElementsMatch(t, expected, sender.metrics) - assert.Empty(t, sender.deltaMetrics) - assert.Empty(t, errs) -} - -func TestSumConsumerUnspecified(t *testing.T) { - cumulativeMetric := newMetric( - "test.unspecified.metric", pmetric.MetricTypeSum) - sum := cumulativeMetric.Sum() - mi := metricInfo{Metric: cumulativeMetric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - sum.SetAggregationTemporality(pmetric.AggregationTemporalityUnspecified) - dataPoints := sum.DataPoints() - dataPoints.EnsureCapacity(1) - addDataPoint( - 72.25, - 1634206001, - map[string]any{ - "env": "qa", - }, - dataPoints, - ) - sender := &mockSumSender{} - consumer := newSumConsumer(sender, componenttest.NewNopTelemetrySettings()) - assert.Equal(t, pmetric.MetricTypeSum, consumer.Type()) - var errs []error - - // unspecified sums get treated as regular wavefront metrics - consumer.Consume(mi, &errs) - - expected := []tobsMetric{ - { - Name: "test.unspecified.metric", - Value: 72.25, - Ts: 1634206001, - Source: "test_source", - Tags: map[string]string{"env": "qa", "res_attr_key": "res_attr_value"}, - }, - } - assert.ElementsMatch(t, expected, sender.metrics) - assert.Empty(t, sender.deltaMetrics) - assert.Empty(t, errs) -} - -func TestSumConsumerMissingValue(t *testing.T) { - metric := newMetric("missing.value.metric", pmetric.MetricTypeSum) - sum := metric.Sum() - mi := metricInfo{Metric: metric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - sum.SetAggregationTemporality(pmetric.AggregationTemporalityDelta) - dataPoints := sum.DataPoints() - dataPoints.EnsureCapacity(1) - addDataPoint( - nil, - 1633123456, - nil, - dataPoints, - ) - sender := &mockSumSender{} - observedZapCore, observedLogs := observer.New(zap.DebugLevel) - settings := componenttest.NewNopTelemetrySettings() - settings.Logger = zap.New(observedZapCore) - consumer := newSumConsumer(sender, settings) - var errs []error - - expectedMissingValueCount := 2 - for i := 0; i < expectedMissingValueCount; i++ { - consumer.Consume(mi, &errs) - } - consumer.PushInternalMetrics(&errs) - - assert.Len(t, errs, 0) - assert.Empty(t, sender.deltaMetrics) - assert.Contains(t, sender.metrics, tobsMetric{ - Name: missingValueMetricName, - Value: float64(expectedMissingValueCount), - Tags: map[string]string{"type": "sum"}, - }) - allLogs := observedLogs.All() - assert.Len(t, allLogs, expectedMissingValueCount) -} - -// Tests that the histogramConsumer correctly delegates to its -// histogramDataPointConsumers. This tests delta histograms -func TestHistogramConsumerDeltaAggregation(t *testing.T) { - numBucketCountsForEachDataPoint := []int{2, 5, 10} - deltaMetric := newHistogramMetricWithDataPoints( - "delta.metric", - pmetric.AggregationTemporalityDelta, - numBucketCountsForEachDataPoint) - mi := metricInfo{Metric: deltaMetric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - sender := &mockGaugeSender{} - cumulativeConsumer := &mockHistogramDataPointConsumer{} - deltaConsumer := &mockHistogramDataPointConsumer{} - consumer := newHistogramConsumer( - cumulativeConsumer, - deltaConsumer, - sender, - regularHistogram, - componenttest.NewNopTelemetrySettings()) - var errs []error - consumer.Consume(mi, &errs) - - assert.Empty(t, errs) - - // We had three datapoints. Our mock just captures the metric name of - // each data point consumed. - assert.Equal( - t, []string{"delta.metric", "delta.metric", "delta.metric"}, deltaConsumer.names) - assert.Equal(t, numBucketCountsForEachDataPoint, deltaConsumer.counts) - assert.Empty(t, cumulativeConsumer.names) - assert.Empty(t, cumulativeConsumer.counts) -} - -// Tests that the histogramConsumer correctly delegates to its -// histogramDataPointConsumers. This tests cumulative histograms -func TestHistogramConsumerCumulativeAggregation(t *testing.T) { - numBucketCountsForEachDataPoint := []int{2, 5, 10} - cumulativeMetric := newHistogramMetricWithDataPoints( - "cumulative.metric", - pmetric.AggregationTemporalityCumulative, - numBucketCountsForEachDataPoint) - mi := metricInfo{Metric: cumulativeMetric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - sender := &mockGaugeSender{} - cumulativeConsumer := &mockHistogramDataPointConsumer{} - deltaConsumer := &mockHistogramDataPointConsumer{} - consumer := newHistogramConsumer( - cumulativeConsumer, - deltaConsumer, - sender, - regularHistogram, - componenttest.NewNopTelemetrySettings()) - var errs []error - - consumer.Consume(mi, &errs) - - assert.Empty(t, errs) - - // We had three datapoints. Our mock just captures the metric name of - // each data point consumed. - assert.Equal( - t, - []string{"cumulative.metric", "cumulative.metric", "cumulative.metric"}, - cumulativeConsumer.names) - assert.Equal(t, numBucketCountsForEachDataPoint, cumulativeConsumer.counts) - assert.Empty(t, deltaConsumer.names) - assert.Empty(t, deltaConsumer.counts) -} - -// This tests that the histogram consumer correctly counts and logs -// histogram metrics with missing aggregation attribute. -func TestHistogramConsumerNoAggregation(t *testing.T) { - - // Create a histogram metric with missing aggregation attribute - metric := newHistogramMetricWithDataPoints( - "missing.aggregation.metric", - pmetric.AggregationTemporalityUnspecified, - nil) - mi := metricInfo{Metric: metric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - sender := &mockGaugeSender{} - observedZapCore, observedLogs := observer.New(zap.DebugLevel) - settings := componenttest.NewNopTelemetrySettings() - settings.Logger = zap.New(observedZapCore) - consumer := newHistogramConsumer( - &mockHistogramDataPointConsumer{}, - &mockHistogramDataPointConsumer{}, - sender, - regularHistogram, - settings, - ) - assert.Equal(t, pmetric.MetricTypeHistogram, consumer.Type()) - var errs []error - expectedNoAggregationCount := 3 - for i := 0; i < expectedNoAggregationCount; i++ { - consumer.Consume(mi, &errs) - } - consumer.PushInternalMetrics(&errs) - - assert.Len(t, errs, 0) - assert.Contains(t, sender.metrics, tobsMetric{ - Name: noAggregationTemporalityMetricName, - Value: float64(expectedNoAggregationCount), - Tags: map[string]string{"type": "histogram"}, - }) - allLogs := observedLogs.All() - assert.Len(t, allLogs, expectedNoAggregationCount) -} - -func TestHistogramReporting(t *testing.T) { - observedZapCore, observedLogs := observer.New(zap.DebugLevel) - settings := componenttest.NewNopTelemetrySettings() - settings.Logger = zap.New(observedZapCore) - report := newHistogramReporting(settings) - metric := newMetric("a.metric", pmetric.MetricTypeHistogram) - malformedCount := 3 - for i := 0; i < malformedCount; i++ { - report.LogMalformed(metric) - } - noAggregationTemporalityCount := 5 - for i := 0; i < noAggregationTemporalityCount; i++ { - report.LogNoAggregationTemporality(metric) - } - - assert.Equal(t, int64(malformedCount), report.Malformed()) - assert.Equal(t, int64(noAggregationTemporalityCount), report.NoAggregationTemporality()) - assert.Equal( - t, - malformedCount+noAggregationTemporalityCount, - observedLogs.Len()) - - sender := &mockGaugeSender{} - var errs []error - - report.Report(sender, &errs) - - assert.Empty(t, errs) - assert.Contains( - t, - sender.metrics, - tobsMetric{ - Name: malformedHistogramMetricName, - Value: float64(malformedCount), - }) - assert.Contains( - t, - sender.metrics, - tobsMetric{ - Name: noAggregationTemporalityMetricName, - Value: float64(noAggregationTemporalityCount), - Tags: typeIsHistogramTags, - }) -} - -func TestHistogramReportingError(t *testing.T) { - report := newHistogramReporting(componenttest.NewNopTelemetrySettings()) - sender := &mockGaugeSender{errorOnSend: true} - var errs []error - - report.Report(sender, &errs) - - assert.NotEmpty(t, errs) -} - -func TestCumulativeHistogramDataPointConsumer(t *testing.T) { - metric := newMetric("a.metric", pmetric.MetricTypeHistogram) - histogramDataPoint := pmetric.NewHistogramDataPoint() - mi := metricInfo{Metric: metric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - // Creates bounds of -Inf to <=2.0; >2.0 to <=5.0; >5.0 to <=10.0; >10.0 to +Inf - histogramDataPoint.ExplicitBounds().FromRaw([]float64{2.0, 5.0, 10.0}) - histogramDataPoint.BucketCounts().FromRaw([]uint64{5, 1, 3, 2}) - histogramDataPoint.Attributes().PutStr("foo", "bar") - sender := &mockGaugeSender{} - report := newHistogramReporting(componenttest.NewNopTelemetrySettings()) - consumer := newCumulativeHistogramDataPointConsumer(sender) - var errs []error - - consumer.Consume(mi, fromOtelHistogramDataPoint(histogramDataPoint), &errs, report) - - assert.Empty(t, errs) - assert.Equal( - t, - []tobsMetric{ - { - Name: "a.metric", - Value: 5.0, - Source: "test_source", - Tags: map[string]string{"foo": "bar", "le": "2", "res_attr_key": "res_attr_value"}, - }, - { - Name: "a.metric", - Value: 6.0, - Source: "test_source", - Tags: map[string]string{"foo": "bar", "le": "5", "res_attr_key": "res_attr_value"}, - }, - { - Name: "a.metric", - Value: 9.0, - Source: "test_source", - Tags: map[string]string{"foo": "bar", "le": "10", "res_attr_key": "res_attr_value"}, - }, - { - Name: "a.metric", - Value: 11.0, - Source: "test_source", - Tags: map[string]string{"foo": "bar", "le": "+Inf", "res_attr_key": "res_attr_value"}, - }, - }, - sender.metrics, - ) -} - -func TestCumulativeHistogramDataPointConsumerError(t *testing.T) { - metric := newMetric("a.metric", pmetric.MetricTypeHistogram) - histogramDataPoint := pmetric.NewHistogramDataPoint() - mi := metricInfo{Metric: metric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - // Creates bounds of -Inf to <=2.0; >2.0 to <=5.0; >5.0 to <=10.0; >10.0 to +Inf - histogramDataPoint.ExplicitBounds().FromRaw([]float64{2.0, 5.0, 10.0}) - histogramDataPoint.BucketCounts().FromRaw([]uint64{5, 1, 3, 2}) - sender := &mockGaugeSender{errorOnSend: true} - report := newHistogramReporting(componenttest.NewNopTelemetrySettings()) - consumer := newCumulativeHistogramDataPointConsumer(sender) - var errs []error - - consumer.Consume(mi, fromOtelHistogramDataPoint(histogramDataPoint), &errs, report) - - // We tried to send 4 metrics. We get 4 errors. - assert.Len(t, errs, 4) -} - -func TestCumulativeHistogramDataPointConsumerLeInUse(t *testing.T) { - metric := newMetric("a.metric", pmetric.MetricTypeHistogram) - mi := metricInfo{Metric: metric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - histogramDataPoint := pmetric.NewHistogramDataPoint() - histogramDataPoint.ExplicitBounds().FromRaw([]float64{10.0}) - histogramDataPoint.BucketCounts().FromRaw([]uint64{4, 12}) - histogramDataPoint.Attributes().PutInt("le", 8) - sender := &mockGaugeSender{} - report := newHistogramReporting(componenttest.NewNopTelemetrySettings()) - consumer := newCumulativeHistogramDataPointConsumer(sender) - var errs []error - - consumer.Consume(mi, fromOtelHistogramDataPoint(histogramDataPoint), &errs, report) - - assert.Empty(t, errs) - assert.Equal( - t, - []tobsMetric{ - { - Name: "a.metric", - Value: 4.0, - Source: "test_source", - Tags: map[string]string{"_le": "8", "le": "10", "res_attr_key": "res_attr_value"}, - }, - { - Name: "a.metric", - Value: 16.0, - Source: "test_source", - Tags: map[string]string{"_le": "8", "le": "+Inf", "res_attr_key": "res_attr_value"}, - }, - }, - sender.metrics, - ) -} - -func TestCumulativeHistogramDataPointConsumerMissingBuckets(t *testing.T) { - metric := newMetric("a.metric", pmetric.MetricTypeHistogram) - mi := metricInfo{Metric: metric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - histogramDataPoint := pmetric.NewHistogramDataPoint() - sender := &mockGaugeSender{} - report := newHistogramReporting(componenttest.NewNopTelemetrySettings()) - consumer := newCumulativeHistogramDataPointConsumer(sender) - var errs []error - - consumer.Consume(mi, fromOtelHistogramDataPoint(histogramDataPoint), &errs, report) - - assert.Empty(t, errs) - assert.Empty(t, sender.metrics) - assert.Equal(t, int64(1), report.Malformed()) -} - -func TestDeltaHistogramDataPointConsumer(t *testing.T) { - metric := newMetric("a.delta.histogram", pmetric.MetricTypeHistogram) - histogramDataPoint := pmetric.NewHistogramDataPoint() - mi := metricInfo{Metric: metric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - // Creates bounds of -Inf to <=2.0; >2.0 to <=5.0; >5.0 to <=10.0; >10.0 to +Inf - histogramDataPoint.ExplicitBounds().FromRaw([]float64{2.0, 5.0, 10.0}) - histogramDataPoint.BucketCounts().FromRaw([]uint64{5, 1, 3, 2}) - setDataPointTimestamp(1631234567, histogramDataPoint) - histogramDataPoint.Attributes().PutStr("bar", "baz") - sender := &mockDistributionSender{} - report := newHistogramReporting(componenttest.NewNopTelemetrySettings()) - consumer := newDeltaHistogramDataPointConsumer(sender) - var errs []error - - consumer.Consume(mi, fromOtelHistogramDataPoint(histogramDataPoint), &errs, report) - - assert.Empty(t, errs) - - assert.Equal( - t, - []tobsDistribution{ - { - Name: "a.delta.histogram", - Centroids: []histogram.Centroid{ - {Value: 2.0, Count: 5}, - {Value: 3.5, Count: 1}, - {Value: 7.5, Count: 3}, - {Value: 10.0, Count: 2}}, - Granularity: allGranularity, - Ts: 1631234567, - Source: "test_source", - Tags: map[string]string{"bar": "baz", "res_attr_key": "res_attr_value"}, - }, - }, - sender.distributions, - ) - assert.Equal(t, int64(0), report.Malformed()) -} - -func TestDeltaHistogramDataPointConsumer_OneBucket(t *testing.T) { - metric := newMetric("one.bucket.delta.histogram", pmetric.MetricTypeHistogram) - histogramDataPoint := pmetric.NewHistogramDataPoint() - mi := metricInfo{Metric: metric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - // Creates bounds of -Inf to <=2.0; >2.0 to <=5.0; >5.0 to <=10.0; >10.0 to +Inf - histogramDataPoint.ExplicitBounds().FromRaw([]float64{}) - histogramDataPoint.BucketCounts().FromRaw([]uint64{17}) - setDataPointTimestamp(1641234567, histogramDataPoint) - sender := &mockDistributionSender{} - report := newHistogramReporting(componenttest.NewNopTelemetrySettings()) - consumer := newDeltaHistogramDataPointConsumer(sender) - var errs []error - - consumer.Consume(mi, fromOtelHistogramDataPoint(histogramDataPoint), &errs, report) - - assert.Empty(t, errs) - - assert.Equal( - t, - []tobsDistribution{ - { - Name: "one.bucket.delta.histogram", - Centroids: []histogram.Centroid{{Value: 0.0, Count: 17}}, - Granularity: allGranularity, - Ts: 1641234567, - Source: "test_source", - Tags: map[string]string{"res_attr_key": "res_attr_value"}, - }, - }, - sender.distributions, - ) - assert.Equal(t, int64(0), report.Malformed()) -} - -func TestDeltaHistogramDataPointConsumerError(t *testing.T) { - metric := newMetric("a.delta.histogram", pmetric.MetricTypeHistogram) - histogramDataPoint := pmetric.NewHistogramDataPoint() - mi := metricInfo{Metric: metric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - // Creates bounds of -Inf to <=2.0; >2.0 to <=5.0; >5.0 to <=10.0; >10.0 to +Inf - histogramDataPoint.ExplicitBounds().FromRaw([]float64{2.0, 5.0, 10.0}) - histogramDataPoint.BucketCounts().FromRaw([]uint64{5, 1, 3, 2}) - sender := &mockDistributionSender{errorOnSend: true} - report := newHistogramReporting(componenttest.NewNopTelemetrySettings()) - consumer := newDeltaHistogramDataPointConsumer(sender) - var errs []error - - consumer.Consume(mi, fromOtelHistogramDataPoint(histogramDataPoint), &errs, report) - - assert.Len(t, errs, 1) -} - -func TestDeltaHistogramDataPointConsumerMissingBuckets(t *testing.T) { - metric := newMetric("a.metric", pmetric.MetricTypeHistogram) - mi := metricInfo{Metric: metric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - histogramDataPoint := pmetric.NewHistogramDataPoint() - sender := &mockDistributionSender{} - report := newHistogramReporting(componenttest.NewNopTelemetrySettings()) - consumer := newDeltaHistogramDataPointConsumer(sender) - var errs []error - - consumer.Consume(mi, fromOtelHistogramDataPoint(histogramDataPoint), &errs, report) - - assert.Empty(t, errs) - assert.Empty(t, sender.distributions) - assert.Equal(t, int64(1), report.Malformed()) -} - -func TestSummaries(t *testing.T) { - summaryMetric := newMetric("test.summary", pmetric.MetricTypeSummary) - summary := summaryMetric.Summary() - dataPoints := summary.DataPoints() - dataPoints.EnsureCapacity(2) - - mi := metricInfo{Metric: summaryMetric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - dataPoint := dataPoints.AppendEmpty() - setQuantileValues(dataPoint, 0.1, 100.0, 0.5, 200.0, 0.9, 300.0, 0.99, 400.0) - dataPoint.Attributes().PutStr("foo", "bar") - dataPoint.SetCount(10) - dataPoint.SetSum(5000.0) - setDataPointTimestamp(1645123456, dataPoint) - - dataPoint = dataPoints.AppendEmpty() - setQuantileValues(dataPoint, 0.2, 75.0, 0.5, 125.0, 0.8, 175.0, 0.95, 225.0) - dataPoint.Attributes().PutStr("bar", "baz") - dataPoint.SetCount(15) - dataPoint.SetSum(3000.0) - setDataPointTimestamp(1645123556, dataPoint) - - sender := &mockGaugeSender{} - consumer := newSummaryConsumer(sender, componenttest.NewNopTelemetrySettings()) - - assert.Equal(t, pmetric.MetricTypeSummary, consumer.Type()) - - var errs []error - consumer.Consume(mi, &errs) - - assert.Empty(t, errs) - - expected := []tobsMetric{ - { - Name: "test.summary", - Value: 100.0, - Source: "test_source", - Tags: map[string]string{"foo": "bar", "quantile": "0.1", "res_attr_key": "res_attr_value"}, - Ts: 1645123456, - }, - { - Name: "test.summary", - Value: 200.0, - Source: "test_source", - Tags: map[string]string{"foo": "bar", "quantile": "0.5", "res_attr_key": "res_attr_value"}, - Ts: 1645123456, - }, - { - Name: "test.summary", - Value: 300.0, - Source: "test_source", - Tags: map[string]string{"foo": "bar", "quantile": "0.9", "res_attr_key": "res_attr_value"}, - Ts: 1645123456, - }, - { - Name: "test.summary", - Value: 400.0, - Source: "test_source", - Tags: map[string]string{"foo": "bar", "quantile": "0.99", "res_attr_key": "res_attr_value"}, - Ts: 1645123456, - }, - { - Name: "test.summary_count", - Value: 10.0, - Source: "test_source", - Tags: map[string]string{"foo": "bar", "res_attr_key": "res_attr_value"}, - Ts: 1645123456, - }, - { - Name: "test.summary_sum", - Value: 5000.0, - Source: "test_source", - Tags: map[string]string{"foo": "bar", "res_attr_key": "res_attr_value"}, - Ts: 1645123456, - }, - { - Name: "test.summary", - Value: 75.0, - Source: "test_source", - Tags: map[string]string{"bar": "baz", "quantile": "0.2", "res_attr_key": "res_attr_value"}, - Ts: 1645123556, - }, - { - Name: "test.summary", - Value: 125.0, - Source: "test_source", - Tags: map[string]string{"bar": "baz", "quantile": "0.5", "res_attr_key": "res_attr_value"}, - Ts: 1645123556, - }, - { - Name: "test.summary", - Value: 175.0, - Source: "test_source", - Tags: map[string]string{"bar": "baz", "quantile": "0.8", "res_attr_key": "res_attr_value"}, - Ts: 1645123556, - }, - { - Name: "test.summary", - Value: 225.0, - Source: "test_source", - Tags: map[string]string{"bar": "baz", "quantile": "0.95", "res_attr_key": "res_attr_value"}, - Ts: 1645123556, - }, - { - Name: "test.summary_count", - Value: 15.0, - Source: "test_source", - Tags: map[string]string{"bar": "baz", "res_attr_key": "res_attr_value"}, - Ts: 1645123556, - }, - { - Name: "test.summary_sum", - Value: 3000.0, - Source: "test_source", - Tags: map[string]string{"bar": "baz", "res_attr_key": "res_attr_value"}, - Ts: 1645123556, - }, - } - assert.ElementsMatch(t, expected, sender.metrics) -} - -func TestSummaries_QuantileTagExists(t *testing.T) { - summaryMetric := newMetric("test.summary.quantile.tag", pmetric.MetricTypeSummary) - summary := summaryMetric.Summary() - dataPoints := summary.DataPoints() - dataPoints.EnsureCapacity(1) - - mi := metricInfo{Metric: summaryMetric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - dataPoint := dataPoints.AppendEmpty() - setQuantileValues(dataPoint, 0.5, 300.0) - dataPoint.Attributes().PutStr("quantile", "exists") - dataPoint.SetCount(12) - dataPoint.SetSum(4000.0) - setDataPointTimestamp(1650123456, dataPoint) - - sender := &mockGaugeSender{} - consumer := newSummaryConsumer(sender, componenttest.NewNopTelemetrySettings()) - var errs []error - consumer.Consume(mi, &errs) - assert.Empty(t, errs) - - expected := []tobsMetric{ - { - Name: "test.summary.quantile.tag", - Value: 300.0, - Source: "test_source", - Tags: map[string]string{"_quantile": "exists", "quantile": "0.5", "res_attr_key": "res_attr_value"}, - Ts: 1650123456, - }, - { - Name: "test.summary.quantile.tag_count", - Value: 12.0, - Source: "test_source", - Tags: map[string]string{"_quantile": "exists", "res_attr_key": "res_attr_value"}, - Ts: 1650123456, - }, - { - Name: "test.summary.quantile.tag_sum", - Value: 4000.0, - Source: "test_source", - Tags: map[string]string{"_quantile": "exists", "res_attr_key": "res_attr_value"}, - Ts: 1650123456, - }, - } - assert.ElementsMatch(t, expected, sender.metrics) -} - -func TestSummariesConsumer_ErrorSending(t *testing.T) { - summaryMetric := newMetric("test.summary.error", pmetric.MetricTypeSummary) - summary := summaryMetric.Summary() - mi := metricInfo{Metric: summaryMetric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - dataPoints := summary.DataPoints() - dataPoints.EnsureCapacity(1) - - dataPoint := dataPoints.AppendEmpty() - dataPoint.SetCount(13) - dataPoint.SetSum(3900.0) - - sender := &mockGaugeSender{errorOnSend: true} - consumer := newSummaryConsumer(sender, componenttest.NewNopTelemetrySettings()) - var errs []error - consumer.Consume(mi, &errs) - assert.NotEmpty(t, errs) -} - -// Sets quantile values for a summary data point -func setQuantileValues(dataPoint pmetric.SummaryDataPoint, quantileValues ...float64) { - if len(quantileValues)%2 != 0 { - panic("quantileValues must be quantile, value, quantile, value, ...") - } - length := len(quantileValues) / 2 - quantileValuesSlice := dataPoint.QuantileValues() - quantileValuesSlice.EnsureCapacity(length) - for i := 0; i < length; i++ { - quantileValueObj := quantileValuesSlice.AppendEmpty() - quantileValueObj.SetQuantile(quantileValues[2*i]) - quantileValueObj.SetValue(quantileValues[2*i+1]) - } -} - -func TestExponentialHistogramConsumerSpec(t *testing.T) { - metric := newExponentialHistogramMetricWithDataPoints( - "a.metric", pmetric.AggregationTemporalityDelta, []uint64{4, 7, 11}) - assert.Equal(t, pmetric.MetricTypeExponentialHistogram, exponentialHistogram.Type()) - assert.Equal( - t, - pmetric.AggregationTemporalityDelta, - exponentialHistogram.AggregationTemporality(metric)) - points := exponentialHistogram.DataPoints(metric) - assert.Len(t, points, 3) - - // 4 + 4 + 2 - assert.Len(t, points[0].AsCumulative(), 10) - - // 7 + 7 + 2 - assert.Len(t, points[1].AsCumulative(), 16) - - // 11 + 11 + 2 - assert.Len(t, points[2].AsCumulative(), 24) -} - -func TestExponentialHistogramDataPoint(t *testing.T) { - dataPoint := pmetric.NewExponentialHistogramDataPoint() - dataPoint.SetScale(1) - dataPoint.Negative().SetOffset(6) - dataPoint.Negative().BucketCounts().FromRaw([]uint64{15, 16, 17}) - dataPoint.Positive().SetOffset(3) - dataPoint.Positive().BucketCounts().FromRaw([]uint64{5, 6, 7, 8}) - dataPoint.SetZeroCount(2) - dataPoint.Attributes().PutStr("foo", "bar") - dataPoint.Attributes().PutStr("baz", "7") - setDataPointTimestamp(1640198765, dataPoint) - point := fromOtelExponentialHistogramDataPoint(dataPoint) - assertBuckets( - t, - []cumulativeBucket{ - {Tag: "-16", Count: 17}, - {Tag: "-11.3137", Count: 33}, - {Tag: "-8", Count: 48}, - {Tag: "2.8284", Count: 50}, - {Tag: "4", Count: 55}, - {Tag: "5.6569", Count: 61}, - {Tag: "8", Count: 68}, - {Tag: "11.3137", Count: 76}, - {Tag: "+Inf", Count: 76}, - }, - point.AsCumulative()) - assertCentroids( - t, - []histogram.Centroid{ - {Value: -19.3137, Count: 17}, - {Value: -13.6569, Count: 16}, - {Value: -9.6569, Count: 15}, - {Value: -2.5858, Count: 2}, - {Value: 3.4142, Count: 5}, - {Value: 4.8284, Count: 6}, - {Value: 6.8284, Count: 7}, - {Value: 9.6569, Count: 8}, - }, - point.AsDelta()) - assert.Equal(t, map[string]string{"foo": "bar", "baz": "7"}, attributesToTags(point.Attributes)) - assert.Equal(t, int64(1640198765), point.SecondsSinceEpoch) -} - -func TestExponentialHistogramDataPoint_ZeroOnly(t *testing.T) { - dataPoint := pmetric.NewExponentialHistogramDataPoint() - dataPoint.SetScale(0) - dataPoint.Negative().SetOffset(2) - dataPoint.Positive().SetOffset(1) - dataPoint.SetZeroCount(5) - point := fromOtelExponentialHistogramDataPoint(dataPoint) - assertBuckets( - t, - []cumulativeBucket{ - {Tag: "2.0", Count: 5}, - {Tag: "+Inf", Count: 5}, - }, - point.AsCumulative()) - assertCentroids( - t, - []histogram.Centroid{ - {Value: -1.0, Count: 5}, - }, - point.AsDelta()) -} - -// Creates a histogram metric with len(numBucketCountsForEachDataPoint) -// datapoints. name is the name of the histogram metric; temporality -// is the temporality of the histogram metric; -// numBucketCountsForEachDataPoint contains the number of buckets for each -// data point. -func newHistogramMetricWithDataPoints( - name string, - temporality pmetric.AggregationTemporality, - numBucketCountsForEachDataPoint []int, -) pmetric.Metric { - result := newMetric(name, pmetric.MetricTypeHistogram) - aHistogram := result.Histogram() - aHistogram.SetAggregationTemporality(temporality) - aHistogram.DataPoints().EnsureCapacity(len(numBucketCountsForEachDataPoint)) - for _, count := range numBucketCountsForEachDataPoint { - point := aHistogram.DataPoints().AppendEmpty() - point.BucketCounts().FromRaw(make([]uint64, count)) - point.ExplicitBounds().FromRaw(make([]float64, count-1)) - } - return result -} - -// Works like newHistogramMetricWithDataPoints but creates an exponential histogram metric -func newExponentialHistogramMetricWithDataPoints( - name string, - temporality pmetric.AggregationTemporality, - positiveAndNegativeBucketCountsForEachDataPoint []uint64, -) pmetric.Metric { - result := newMetric(name, pmetric.MetricTypeExponentialHistogram) - aHistogram := result.ExponentialHistogram() - aHistogram.SetAggregationTemporality(temporality) - aHistogram.DataPoints().EnsureCapacity(len(positiveAndNegativeBucketCountsForEachDataPoint)) - for _, count := range positiveAndNegativeBucketCountsForEachDataPoint { - point := aHistogram.DataPoints().AppendEmpty() - point.Negative().BucketCounts().FromRaw(make([]uint64, count)) - point.Positive().BucketCounts().FromRaw(make([]uint64, count)) - } - return result -} - -func verifyGaugeConsumer(t *testing.T, errorOnSend bool) { - metric := newMetric("test.metric", pmetric.MetricTypeGauge) - mi := metricInfo{Metric: metric, Source: "test_source", SourceKey: "host.name", ResourceAttrs: map[string]string{"res_attr_key": "res_attr_value"}} - dataPoints := metric.Gauge().DataPoints() - dataPoints.EnsureCapacity(2) - addDataPoint( - 7, - 1631205001, - map[string]any{"env": "prod", "bucket": 73}, - dataPoints, - ) - addDataPoint( - 7.5, - 1631205002, - map[string]any{"env": "prod", "bucket": 73}, - dataPoints, - ) - expected := []tobsMetric{ - { - Name: "test.metric", - Value: 7.0, - Ts: 1631205001, - Source: "test_source", - Tags: map[string]string{"env": "prod", "bucket": "73", "res_attr_key": "res_attr_value"}, - }, - { - Name: "test.metric", - Value: 7.5, - Ts: 1631205002, - Source: "test_source", - Tags: map[string]string{"env": "prod", "bucket": "73", "res_attr_key": "res_attr_value"}, - }, - } - sender := &mockGaugeSender{errorOnSend: errorOnSend} - consumer := newGaugeConsumer(sender, componenttest.NewNopTelemetrySettings()) - - assert.Equal(t, pmetric.MetricTypeGauge, consumer.Type()) - var errs []error - consumer.Consume(mi, &errs) - assert.ElementsMatch(t, expected, sender.metrics) - if errorOnSend { - assert.Len(t, errs, len(expected)) - } else { - assert.Empty(t, errs) - } -} - -func constructMetrics(metricList ...pmetric.Metric) pmetric.Metrics { - result := pmetric.NewMetrics() - result.ResourceMetrics().EnsureCapacity(1) - rm := result.ResourceMetrics().AppendEmpty() - rm.ScopeMetrics().EnsureCapacity(1) - ilm := rm.ScopeMetrics().AppendEmpty() - ilm.Metrics().EnsureCapacity(len(metricList)) - for _, metric := range metricList { - metric.CopyTo(ilm.Metrics().AppendEmpty()) - } - return result -} - -func constructMetricsWithTags(tags map[string]string, metricList ...pmetric.Metric) pmetric.Metrics { - result := pmetric.NewMetrics() - result.ResourceMetrics().EnsureCapacity(1) - rm := result.ResourceMetrics().AppendEmpty() - for key, val := range tags { - rm.Resource().Attributes().PutStr(key, val) - } - rm.ScopeMetrics().EnsureCapacity(1) - ilm := rm.ScopeMetrics().AppendEmpty() - ilm.Metrics().EnsureCapacity(len(metricList)) - for _, metric := range metricList { - metric.CopyTo(ilm.Metrics().AppendEmpty()) - } - return result -} - -func newMetric(name string, typ pmetric.MetricType) pmetric.Metric { - result := pmetric.NewMetric() - result.SetName(name) - switch typ { - case pmetric.MetricTypeGauge: - result.SetEmptyGauge() - case pmetric.MetricTypeSum: - result.SetEmptySum() - case pmetric.MetricTypeHistogram: - result.SetEmptyHistogram() - case pmetric.MetricTypeExponentialHistogram: - result.SetEmptyExponentialHistogram() - case pmetric.MetricTypeSummary: - result.SetEmptySummary() - } - return result -} - -func addDataPoint( - value any, - ts int64, - tags map[string]any, - slice pmetric.NumberDataPointSlice, -) { - dataPoint := slice.AppendEmpty() - if value != nil { - setDataPointValue(value, dataPoint) - } - setDataPointTimestamp(ts, dataPoint) - //nolint:errcheck - dataPoint.Attributes().FromRaw(tags) -} - -type dataPointWithTimestamp interface { - SetTimestamp(v pcommon.Timestamp) -} - -func setDataPointTimestamp(ts int64, dataPoint dataPointWithTimestamp) { - dataPoint.SetTimestamp( - pcommon.NewTimestampFromTime(time.Unix(ts, 0))) -} - -func setDataPointValue(value any, dataPoint pmetric.NumberDataPoint) { - switch v := value.(type) { - case int: - dataPoint.SetIntValue(int64(v)) - case int64: - dataPoint.SetIntValue(v) - case float64: - dataPoint.SetDoubleValue(v) - default: - panic("Unsupported value type") - } -} - -type tobsMetric struct { - Name string - Value float64 - Ts int64 - Source string - Tags map[string]string -} - -type mockGaugeSender struct { - errorOnSend bool - metrics []tobsMetric -} - -func (m *mockGaugeSender) SendMetric( - name string, value float64, ts int64, source string, tags map[string]string, -) error { - m.metrics = append(m.metrics, tobsMetric{ - Name: name, - Value: value, - Ts: ts, - Source: source, - Tags: copyTags(tags), - }) - if m.errorOnSend { - return errors.New("error sending") - } - return nil -} - -type tobsDistribution struct { - Name string - Centroids []histogram.Centroid - Granularity map[histogram.Granularity]bool - Ts int64 - Source string - Tags map[string]string -} - -type mockDistributionSender struct { - errorOnSend bool - distributions []tobsDistribution -} - -func (m *mockDistributionSender) SendDistribution( - name string, - centroids []histogram.Centroid, - granularity map[histogram.Granularity]bool, - ts int64, - source string, - tags map[string]string, -) error { - m.distributions = append(m.distributions, tobsDistribution{ - Name: name, - Centroids: copyCentroids(centroids), - Granularity: copyGranularity(granularity), - Ts: ts, - Source: source, - Tags: copyTags(tags), - }) - if m.errorOnSend { - return errors.New("error sending") - } - return nil -} - -type mockTypedMetricConsumer struct { - typ pmetric.MetricType - errorOnConsume bool - errorOnPushInternalMetrics bool - names []string - sources []string - sourceKeys []string - pushInternalMetricsCallCount int -} - -func (m *mockTypedMetricConsumer) Type() pmetric.MetricType { - return m.typ -} - -func (m *mockTypedMetricConsumer) Consume(mi metricInfo, errs *[]error) { - m.names = append(m.names, mi.Name()) - m.sources = append(m.sources, mi.Source) - m.sourceKeys = append(m.sourceKeys, mi.SourceKey) - if m.errorOnConsume { - *errs = append(*errs, errors.New("error in consume")) - } -} - -func (m *mockTypedMetricConsumer) PushInternalMetrics(errs *[]error) { - m.pushInternalMetricsCallCount++ - if m.errorOnPushInternalMetrics { - *errs = append(*errs, errors.New("error in consume")) - } -} - -type mockFlushCloser struct { - errorOnFlush bool - numFlushCalls int - numCloseCalls int -} - -func (m *mockFlushCloser) Flush() error { - m.numFlushCalls++ - if m.errorOnFlush { - return errors.New("error flushing") - } - return nil -} - -func (m *mockFlushCloser) Close() { - m.numCloseCalls++ -} - -type mockHistogramDataPointConsumer struct { - names []string - counts []int -} - -func (m *mockHistogramDataPointConsumer) Consume( - mi metricInfo, point bucketHistogramDataPoint, _ *[]error, _ *histogramReporting) { - m.names = append(m.names, mi.Name()) - m.counts = append(m.counts, len(point.AsCumulative())) -} - -func copyTags(tags map[string]string) map[string]string { - if len(tags) == 0 { - return nil - } - tagsCopy := make(map[string]string, len(tags)) - for k, v := range tags { - tagsCopy[k] = v - } - return tagsCopy -} - -type mockSumSender struct { - errorOnSend bool - metrics []tobsMetric - deltaMetrics []tobsMetric -} - -func (m *mockSumSender) SendMetric( - name string, value float64, ts int64, source string, tags map[string]string, -) error { - m.metrics = append(m.metrics, tobsMetric{ - Name: name, - Value: value, - Ts: ts, - Source: source, - Tags: copyTags(tags), - }) - if m.errorOnSend { - return errors.New("error sending") - } - return nil -} - -func (m *mockSumSender) SendDeltaCounter( - name string, value float64, source string, tags map[string]string, -) error { - m.deltaMetrics = append(m.deltaMetrics, tobsMetric{ - Name: name, - Value: value, - Source: source, - Tags: copyTags(tags), - }) - if m.errorOnSend { - return errors.New("error sending") - } - return nil -} - -func copyCentroids(centroids []histogram.Centroid) []histogram.Centroid { - if centroids == nil { - return nil - } - result := make([]histogram.Centroid, len(centroids)) - copy(result, centroids) - return result -} - -func copyGranularity( - granularity map[histogram.Granularity]bool) map[histogram.Granularity]bool { - if granularity == nil { - return nil - } - result := make(map[histogram.Granularity]bool, len(granularity)) - for k, v := range granularity { - result[k] = v - } - return result -} - -func assertBuckets(t *testing.T, expected, actual []cumulativeBucket) { - assert.Equal(t, len(expected), len(actual), "len") - for i := range expected { - assert.Equal(t, expected[i].Count, actual[i].Count, "count") - assert.True(t, tagsEqual(expected[i].Tag, actual[i].Tag), "tag") - } -} - -func tagsEqual(expected, actual string) bool { - if expected == actual { - return true - } - expectedF, errE := strconv.ParseFloat(expected, 64) - actualF, errF := strconv.ParseFloat(actual, 64) - if errE != nil || errF != nil { - return false - } - return math.Abs(expectedF-actualF) < 0.0001 -} - -func assertCentroids(t *testing.T, expected, actual []histogram.Centroid) { - assert.Equal(t, len(expected), len(actual), "len") - for i := range expected { - assert.Equal(t, expected[i].Count, actual[i].Count, "count") - assert.InDelta(t, expected[i].Value, actual[i].Value, 0.0001, "value") - } -} diff --git a/exporter/tanzuobservabilityexporter/testdata/config.yaml b/exporter/tanzuobservabilityexporter/testdata/config.yaml deleted file mode 100644 index d2893dd98b9e..000000000000 --- a/exporter/tanzuobservabilityexporter/testdata/config.yaml +++ /dev/null @@ -1,30 +0,0 @@ -receivers: - nop: - -processors: - nop: - -exporters: - tanzuobservability: - traces: - endpoint: "http://localhost:40001" - metrics: - endpoint: "http://localhost:2916" - resource_attrs_included: true - app_tags_excluded: true - retry_on_failure: - enabled: true - initial_interval: 10s - max_interval: 60s - max_elapsed_time: 10m - sending_queue: - enabled: true - num_consumers: 2 - queue_size: 10 - -service: - pipelines: - traces: - receivers: [ nop ] - processors: [ nop ] - exporters: [ tanzuobservability ] diff --git a/exporter/tanzuobservabilityexporter/trace_exporter.go b/exporter/tanzuobservabilityexporter/trace_exporter.go deleted file mode 100644 index a8989b62374f..000000000000 --- a/exporter/tanzuobservabilityexporter/trace_exporter.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package tanzuobservabilityexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter" - -import ( - "context" - "errors" - "fmt" - - "github.com/google/uuid" - "github.com/wavefronthq/wavefront-sdk-go/senders" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/pdata/ptrace" - "go.uber.org/multierr" - "go.uber.org/zap" -) - -const ( - defaultApplicationName = "defaultApp" - defaultServiceName = "defaultService" - defaultMetricsPort = 2878 - labelApplication = "application" - labelCluster = "cluster" - labelShard = "shard" - labelError = "error" - labelEventName = "name" - labelService = "service" - labelSpanKind = "span.kind" - labelSource = "source" - labelDroppedEventsCount = "otel.dropped_events_count" - labelDroppedLinksCount = "otel.dropped_links_count" - labelDroppedAttrsCount = "otel.dropped_attributes_count" - labelOtelScopeName = "otel.scope.name" - labelOtelScopeVersion = "otel.scope.version" -) - -// spanSender Interface for sending tracing spans to Tanzu Observability -type spanSender interface { - // SendSpan mirrors sender.SpanSender from wavefront-sdk-go. - // traceId, spanId, parentIds and preceding spanIds are expected to be UUID strings. - // parents and preceding spans can be empty for a root span. - // span tag keys can be repeated (example: "user"="foo" and "user"="bar") - SendSpan(name string, startMillis, durationMillis int64, source, traceID, spanID string, parents, followsFrom []string, tags []senders.SpanTag, spanLogs []senders.SpanLog) error - Flush() error - Close() -} - -type tracesExporter struct { - cfg *Config - sender spanSender - logger *zap.Logger -} - -func newTracesExporter(settings exporter.CreateSettings, c component.Config) (*tracesExporter, error) { - cfg, ok := c.(*Config) - if !ok { - return nil, fmt.Errorf("invalid config: %#v", c) - } - if !cfg.hasTracesEndpoint() { - return nil, fmt.Errorf("traces.endpoint required") - } - _, _, err := cfg.parseTracesEndpoint() - if err != nil { - return nil, fmt.Errorf("failed to parse traces.endpoint: %w", err) - } - metricsPort := defaultMetricsPort - if cfg.hasMetricsEndpoint() { - _, metricsPort, err = cfg.parseMetricsEndpoint() - if err != nil { - return nil, fmt.Errorf("failed to parse metrics.endpoint: %w", err) - } - } - - // we specify a MetricsPort so the SDK can report its internal metrics - // but don't currently export any metrics from the pipeline - s, err := senders.NewSender(cfg.Traces.Endpoint, - senders.MetricsPort(metricsPort), - senders.FlushIntervalSeconds(60), - senders.SDKMetricsTags(map[string]string{"otel.traces.collector_version": settings.BuildInfo.Version}), - ) - if err != nil { - return nil, fmt.Errorf("failed to create proxy sender: %w", err) - } - - return &tracesExporter{ - cfg: cfg, - sender: s, - logger: settings.Logger, - }, nil -} - -func (e *tracesExporter) pushTraceData(ctx context.Context, td ptrace.Traces) error { - var errs error - - for i := 0; i < td.ResourceSpans().Len(); i++ { - rspans := td.ResourceSpans().At(i) - resource := rspans.Resource() - for j := 0; j < rspans.ScopeSpans().Len(); j++ { - ispans := rspans.ScopeSpans().At(j) - transform := newTraceTransformer(resource) - - libraryName := ispans.Scope().Name() - libraryVersion := ispans.Scope().Version() - - for k := 0; k < ispans.Spans().Len(); k++ { - select { - case <-ctx.Done(): - return multierr.Append(errs, errors.New("context canceled")) - default: - transformedSpan, err := transform.Span(ispans.Spans().At(k)) - if err != nil { - errs = multierr.Append(errs, err) - continue - } - - if libraryName != "" { - transformedSpan.Tags[labelOtelScopeName] = libraryName - } - - if libraryVersion != "" { - transformedSpan.Tags[labelOtelScopeVersion] = libraryVersion - } - - if err := e.recordSpan(transformedSpan); err != nil { - errs = multierr.Append(errs, err) - continue - } - } - } - } - } - - errs = multierr.Append(errs, e.sender.Flush()) - return errs -} - -func (e *tracesExporter) recordSpan(span span) error { - var parents []string - if span.ParentSpanID != uuid.Nil { - parents = []string{span.ParentSpanID.String()} - } - - return e.sender.SendSpan( - span.Name, - span.StartMillis, - span.DurationMillis, - span.Source, - span.TraceID.String(), - span.SpanID.String(), - parents, - nil, - mapToSpanTags(span.Tags), - span.SpanLogs, - ) -} - -func (e *tracesExporter) shutdown(_ context.Context) error { - e.sender.Close() - return nil -} - -func mapToSpanTags(tags map[string]string) []senders.SpanTag { - spanTags := make([]senders.SpanTag, 0, len(tags)) - for k, v := range tags { - spanTags = append(spanTags, senders.SpanTag{ - Key: k, - Value: v, - }) - } - return spanTags -} diff --git a/exporter/tanzuobservabilityexporter/trace_exporter_test.go b/exporter/tanzuobservabilityexporter/trace_exporter_test.go deleted file mode 100644 index ec85f5328b0e..000000000000 --- a/exporter/tanzuobservabilityexporter/trace_exporter_test.go +++ /dev/null @@ -1,331 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package tanzuobservabilityexporter - -import ( - "context" - "strings" - "testing" - - "github.com/google/uuid" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/wavefronthq/wavefront-sdk-go/senders" - "go.opentelemetry.io/collector/exporter/exporterhelper" - "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" - "go.uber.org/zap" -) - -func TestSpansRequireTraceAndSpanIDs(t *testing.T) { - spanWithNoTraceID := ptrace.NewSpan() - spanWithNoTraceID.SetSpanID([8]byte{9, 9, 9, 9, 9, 9, 9, 9}) - spanWithNoSpanID := ptrace.NewSpan() - spanWithNoSpanID.SetTraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) - traces := constructTraces([]ptrace.Span{spanWithNoTraceID, spanWithNoSpanID}) - - _, err := consumeTraces(traces) - require.Error(t, err) - assert.True(t, strings.Contains(err.Error(), errInvalidSpanID.Error())) - assert.True(t, strings.Contains(err.Error(), errInvalidTraceID.Error())) -} - -func TestExportTraceDataMinimum(t *testing.T) { - // source= - // getAllUsers source=localhost traceId=7b3bf470-9456-11e8-9eb6-529269fb1459 spanId=0313bafe-9457-11e8-9eb6-529269fb1459 parent=2f64e538-9457-11e8-9eb6-529269fb1459 application=Wavefront service=auth cluster=us-west-2 shard=secondary http.method=GET 1552949776000 343 - minSpan := createSpan( - "root", - [16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, - [8]byte{9, 9, 9, 9, 9, 9, 9, 9}, - pcommon.SpanID{}, - ) - traces := constructTraces([]ptrace.Span{minSpan}) - - expected := []*span{{ - Name: "root", - TraceID: uuid.MustParse("01010101-0101-0101-0101-010101010101"), - SpanID: uuid.MustParse("00000000-0000-0000-0909-090909090909"), - Tags: map[string]string{ - labelApplication: "defaultApp", - labelService: "defaultService", - }, - }} - - validateTraces(t, expected, traces) -} - -func TestExportTraceDataFullTrace(t *testing.T) { - traceID := pcommon.TraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) - - rootSpan := createSpan( - "root", - traceID, - [8]byte{0, 0, 0, 0, 0, 0, 0, 1}, - pcommon.SpanID{}, - ) - - clientSpan := createSpan( - "client", - traceID, - [8]byte{0, 0, 0, 0, 0, 0, 0, 2}, - rootSpan.SpanID(), - ) - - clientSpan.SetKind(ptrace.SpanKindClient) - event := ptrace.NewSpanEvent() - event.SetName("client-event") - event.CopyTo(clientSpan.Events().AppendEmpty()) - - status := ptrace.NewStatus() - status.SetCode(ptrace.StatusCodeError) - status.SetMessage("an error event occurred") - status.CopyTo(clientSpan.Status()) - - clientSpan.Attributes().PutStr(labelApplication, "test-app") - - serverSpan := createSpan( - "server", - traceID, - pcommon.SpanID([8]byte{0, 0, 0, 0, 0, 0, 0, 3}), - clientSpan.SpanID(), - ) - serverSpan.SetKind(ptrace.SpanKindServer) - serverSpan.TraceState().FromRaw("key=val") - serverAttrs := serverSpan.Attributes() - serverAttrs.PutStr(conventions.AttributeServiceName, "the-server") - serverAttrs.PutStr(conventions.AttributeHTTPMethod, "POST") - serverAttrs.PutInt(conventions.AttributeHTTPStatusCode, 403) - serverAttrs.PutStr(labelSource, "test_source") - - traces := constructTraces([]ptrace.Span{rootSpan, clientSpan, serverSpan}) - resourceAttrs := traces.ResourceSpans().At(0).Resource().Attributes() - resourceAttrs.PutStr("resource", "R1") - resourceAttrs.PutStr(conventions.AttributeServiceName, "test-service") - resourceAttrs.PutStr(labelSource, "test-source") - - expected := []*span{ - { - Name: "root", - SpanID: uuid.MustParse("00000000000000000000000000000001"), - TraceID: uuid.MustParse("01010101010101010101010101010101"), - Source: "test-source", - Tags: map[string]string{ - "resource": "R1", - labelApplication: "defaultApp", - labelService: "test-service", - }, - }, - { - Name: "client", - SpanID: uuid.MustParse("00000000000000000000000000000002"), - TraceID: uuid.MustParse("01010101010101010101010101010101"), - ParentSpanID: uuid.MustParse("00000000000000000000000000000001"), - Source: "test-source", - Tags: map[string]string{ - "resource": "R1", - labelApplication: "test-app", - labelService: "test-service", - "otel.status_description": "an error event occurred", - "error": "true", - labelSpanKind: "client", - }, - SpanLogs: []senders.SpanLog{{ - Fields: map[string]string{labelEventName: "client-event"}, - }}, - }, - { - Name: "server", - SpanID: uuid.MustParse("00000000000000000000000000000003"), - TraceID: uuid.MustParse("01010101010101010101010101010101"), - ParentSpanID: uuid.MustParse("00000000000000000000000000000002"), - Source: "test-source", - Tags: map[string]string{ - "resource": "R1", - labelApplication: "defaultApp", - labelService: "the-server", - labelSpanKind: "server", - conventions.AttributeHTTPStatusCode: "403", - conventions.AttributeHTTPMethod: "POST", - "w3c.tracestate": "key=val", - }, - }, - } - - validateTraces(t, expected, traces) -} - -func validateTraces(t *testing.T, expected []*span, traces ptrace.Traces) { - actual, err := consumeTraces(traces) - require.NoError(t, err) - require.Equal(t, len(expected), len(actual)) - for i := 0; i < len(expected); i++ { - assert.Equal(t, expected[i].Name, actual[i].Name) - assert.Equal(t, expected[i].TraceID, actual[i].TraceID) - assert.Equal(t, expected[i].SpanID, actual[i].SpanID) - assert.Equal(t, expected[i].ParentSpanID, actual[i].ParentSpanID) - for k, v := range expected[i].Tags { - a, ok := actual[i].Tags[k] - assert.True(t, ok, "tag '"+k+"' not found") - assert.Equal(t, v, a) - } - assert.Equal(t, expected[i].StartMillis, actual[i].StartMillis) - assert.Equal(t, expected[i].DurationMillis, actual[i].DurationMillis) - assert.Equal(t, expected[i].SpanLogs, actual[i].SpanLogs) - assert.Equal(t, expected[i].Source, actual[i].Source) - } -} - -func TestExportTraceDataWithInstrumentationDetails(t *testing.T) { - minSpan := createSpan( - "root", - pcommon.TraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}), - pcommon.SpanID([8]byte{9, 9, 9, 9, 9, 9, 9, 9}), - pcommon.SpanID{}, - ) - traces := constructTraces([]ptrace.Span{minSpan}) - - scope := traces.ResourceSpans().At(0).ScopeSpans().At(0).Scope() - scope.SetName("instrumentation_name") - scope.SetVersion("v0.0.1") - - expected := []*span{{ - Name: "root", - TraceID: uuid.MustParse("01010101-0101-0101-0101-010101010101"), - SpanID: uuid.MustParse("00000000-0000-0000-0909-090909090909"), - Tags: map[string]string{ - labelApplication: "defaultApp", - labelService: "defaultService", - labelOtelScopeName: "instrumentation_name", - labelOtelScopeVersion: "v0.0.1", - }, - }} - - validateTraces(t, expected, traces) -} - -func TestExportTraceDataRespectsContext(t *testing.T) { - traces := constructTraces([]ptrace.Span{createSpan( - "root", - pcommon.TraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}), - pcommon.SpanID([8]byte{9, 9, 9, 9, 9, 9, 9, 9}), - pcommon.SpanID{}, - )}) - - sender := &mockSender{} - cfg := createDefaultConfig() - exp := tracesExporter{ - cfg: cfg.(*Config), - sender: sender, - logger: zap.NewNop(), - } - mockOTelTracesExporter, err := exporterhelper.NewTracesExporter( - context.Background(), - exportertest.NewNopCreateSettings(), - cfg, - exp.pushTraceData, - exporterhelper.WithShutdown(exp.shutdown), - ) - require.NoError(t, err) - - ctx, cancel := context.WithCancel(context.Background()) - cancel() - require.Error(t, mockOTelTracesExporter.ConsumeTraces(ctx, traces)) -} - -func createSpan( - name string, - traceID pcommon.TraceID, - spanID pcommon.SpanID, - parentSpanID pcommon.SpanID, -) ptrace.Span { - span := ptrace.NewSpan() - span.SetName(name) - span.SetTraceID(traceID) - span.SetSpanID(spanID) - span.SetParentSpanID(parentSpanID) - return span -} - -func constructTraces(spans []ptrace.Span) ptrace.Traces { - traces := ptrace.NewTraces() - traces.ResourceSpans().EnsureCapacity(1) - rs := traces.ResourceSpans().AppendEmpty() - rs.ScopeSpans().EnsureCapacity(1) - ils := rs.ScopeSpans().AppendEmpty() - ils.Spans().EnsureCapacity(len(spans)) - for _, span := range spans { - span.CopyTo(ils.Spans().AppendEmpty()) - } - return traces -} - -func consumeTraces(ptrace ptrace.Traces) ([]*span, error) { - ctx := context.Background() - sender := &mockSender{} - - cfg := createDefaultConfig() - exp := tracesExporter{ - cfg: cfg.(*Config), - sender: sender, - logger: zap.NewNop(), - } - mockOTelTracesExporter, err := exporterhelper.NewTracesExporter( - context.Background(), - exportertest.NewNopCreateSettings(), - cfg, - exp.pushTraceData, - exporterhelper.WithShutdown(exp.shutdown), - ) - - if err != nil { - return nil, err - } - if err := mockOTelTracesExporter.ConsumeTraces(ctx, ptrace); err != nil { - return nil, err - } - if err := mockOTelTracesExporter.Shutdown(ctx); err != nil { - return nil, err - } - return sender.spans, nil -} - -// implements the spanSender interface -type mockSender struct { - spans []*span -} - -func (m *mockSender) SendSpan( - name string, - startMillis, durationMillis int64, - source, traceID, spanID string, - parents, _ []string, - spanTags []senders.SpanTag, - spanLogs []senders.SpanLog, -) error { - var parentSpanID uuid.UUID - if len(parents) == 1 { - parentSpanID = uuid.MustParse(parents[0]) - } - tags := map[string]string{} - for _, pair := range spanTags { - tags[pair.Key] = pair.Value - } - span := &span{ - Name: name, - TraceID: uuid.MustParse(traceID), - SpanID: uuid.MustParse(spanID), - ParentSpanID: parentSpanID, - Tags: tags, - StartMillis: startMillis, - DurationMillis: durationMillis, - SpanLogs: spanLogs, - Source: source, - } - m.spans = append(m.spans, span) - return nil -} -func (m *mockSender) Flush() error { return nil } -func (m *mockSender) Close() {} diff --git a/exporter/tanzuobservabilityexporter/transformer.go b/exporter/tanzuobservabilityexporter/transformer.go deleted file mode 100644 index 9e5d0613bd04..000000000000 --- a/exporter/tanzuobservabilityexporter/transformer.go +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package tanzuobservabilityexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter" - -import ( - "errors" - "strconv" - "time" - - "github.com/google/uuid" - "github.com/wavefronthq/wavefront-sdk-go/senders" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" - - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/tracetranslator" -) - -type traceTransformer struct { - resAttrs pcommon.Map -} - -func newTraceTransformer(resource pcommon.Resource) *traceTransformer { - t := &traceTransformer{ - resAttrs: resource.Attributes(), - } - return t -} - -var ( - errInvalidSpanID = errors.New("SpanID is invalid") - errInvalidTraceID = errors.New("TraceID is invalid") -) - -var appResAttrsKeys = []string{labelApplication, conventions.AttributeServiceName, labelService, labelShard, labelCluster} - -type span struct { - Name string - TraceID uuid.UUID - SpanID uuid.UUID - ParentSpanID uuid.UUID - Tags map[string]string - StartMillis int64 - DurationMillis int64 - SpanLogs []senders.SpanLog - Source string -} - -func (t *traceTransformer) Span(orig ptrace.Span) (span, error) { - traceID, err := traceIDtoUUID(orig.TraceID()) - if err != nil { - return span{}, errInvalidTraceID - } - - spanID, err := spanIDtoUUID(orig.SpanID()) - if err != nil { - return span{}, errInvalidSpanID - } - - startMillis, durationMillis := calculateTimes(orig) - - source, attributesWithoutSource := getSourceAndResourceTags(t.resAttrs) - tags := attributesToTagsReplaceSource( - newMap(attributesWithoutSource), orig.Attributes()) - fixServiceTag(tags) - t.setRequiredTags(tags) - - tags[labelSpanKind] = spanKind(orig) - - if droppedEventsCount := orig.DroppedEventsCount(); droppedEventsCount > 0 { - tags[labelDroppedEventsCount] = strconv.FormatUint(uint64(droppedEventsCount), 10) - } - - if droppedLinksCount := orig.DroppedLinksCount(); droppedLinksCount > 0 { - tags[labelDroppedLinksCount] = strconv.FormatUint(uint64(droppedLinksCount), 10) - } - - if droppedAttrsCount := orig.DroppedAttributesCount(); droppedAttrsCount > 0 { - tags[labelDroppedAttrsCount] = strconv.FormatUint(uint64(droppedAttrsCount), 10) - } - - errorTags := errorTagsFromStatus(orig.Status()) - for k, v := range errorTags { - tags[k] = v - } - - traceState := orig.TraceState().AsRaw() - if orig.TraceState().AsRaw() != "" { - tags[tracetranslator.TagW3CTraceState] = traceState - } - - return span{ - Name: orig.Name(), - TraceID: traceID, - SpanID: spanID, - ParentSpanID: parentSpanIDtoUUID(orig.ParentSpanID()), - Tags: tags, - Source: source, - StartMillis: startMillis, - DurationMillis: durationMillis, - SpanLogs: eventsToLogs(orig.Events()), - }, nil -} - -func getSourceAndResourceTagsAndSourceKey(attributes pcommon.Map) ( - string, map[string]string, string) { - attributesWithoutSource := map[string]string{} - attributes.Range(func(k string, v pcommon.Value) bool { - attributesWithoutSource[k] = v.AsString() - return true - }) - candidateKeys := []string{labelSource, conventions.AttributeHostName, "hostname", conventions.AttributeHostID} - var source string - var sourceKey string - for _, key := range candidateKeys { - if value, isFound := attributesWithoutSource[key]; isFound { - source = value - sourceKey = key - delete(attributesWithoutSource, key) - break - } - } - - // returning an empty source is fine as wavefront.go.sdk will set it up to a default value(os.hostname()) - return source, attributesWithoutSource, sourceKey -} - -func getSourceAndResourceTags(attributes pcommon.Map) (string, map[string]string) { - source, attributesWithoutSource, _ := getSourceAndResourceTagsAndSourceKey(attributes) - return source, attributesWithoutSource -} - -func getSourceAndKey(attributes pcommon.Map) (string, string) { - source, _, sourceKey := getSourceAndResourceTagsAndSourceKey(attributes) - return source, sourceKey -} - -func spanKind(span ptrace.Span) string { - switch span.Kind() { - case ptrace.SpanKindClient: - return "client" - case ptrace.SpanKindServer: - return "server" - case ptrace.SpanKindProducer: - return "producer" - case ptrace.SpanKindConsumer: - return "consumer" - case ptrace.SpanKindInternal: - return "internal" - case ptrace.SpanKindUnspecified: - return "unspecified" - default: - return "unknown" - } -} - -func (t *traceTransformer) setRequiredTags(tags map[string]string) { - if _, ok := tags[labelService]; !ok { - tags[labelService] = defaultServiceName - } - - if _, ok := tags[labelApplication]; !ok { - tags[labelApplication] = defaultApplicationName - } -} - -func eventsToLogs(events ptrace.SpanEventSlice) []senders.SpanLog { - var result []senders.SpanLog - for i := 0; i < events.Len(); i++ { - e := events.At(i) - fields := attributesToTagsReplaceSource(e.Attributes()) - fields[labelEventName] = e.Name() - result = append(result, senders.SpanLog{ - Timestamp: int64(e.Timestamp()) / time.Microsecond.Nanoseconds(), // Timestamp is in microseconds - Fields: fields, - }) - } - - return result -} - -func calculateTimes(span ptrace.Span) (int64, int64) { - startMillis := int64(span.StartTimestamp()) / time.Millisecond.Nanoseconds() - endMillis := int64(span.EndTimestamp()) / time.Millisecond.Nanoseconds() - durationMillis := endMillis - startMillis - // it's possible end time is unset, so default to 0 rather than using a negative number - if span.EndTimestamp() == 0 { - durationMillis = 0 - } - return startMillis, durationMillis -} - -func fixServiceTag(tags map[string]string) { - // tag `service` will take preference over `service.name` if both are provided - if _, ok := tags[labelService]; !ok { - if svcName, svcNameOk := tags[conventions.AttributeServiceName]; svcNameOk { - tags[labelService] = svcName - delete(tags, conventions.AttributeServiceName) - } - } -} - -func fixSourceKey(sourceKey string, tags map[string]string) { - delete(tags, sourceKey) - replaceSource(tags) -} - -func attributesToTags(attributes ...pcommon.Map) map[string]string { - tags := map[string]string{} - for _, att := range attributes { - att.Range(func(k string, v pcommon.Value) bool { - tags[k] = v.AsString() - return true - }) - } - return tags -} - -func appAttributesToTags(attributes pcommon.Map) map[string]string { - tags := map[string]string{} - for _, resAttrsKey := range appResAttrsKeys { - if resAttrVal, ok := attributes.Get(resAttrsKey); ok { - tags[resAttrsKey] = resAttrVal.AsString() - } - } - - return tags -} - -func replaceSource(tags map[string]string) { - if value, isFound := tags[labelSource]; isFound { - delete(tags, labelSource) - tags["_source"] = value - } -} - -func attributesToTagsReplaceSource(attributes ...pcommon.Map) map[string]string { - tags := attributesToTags(attributes...) - replaceSource(tags) - return tags -} - -func pointAndResAttrsToTagsAndFixSource(sourceKey string, attributes ...pcommon.Map) map[string]string { - tags := attributesToTags(attributes...) - fixServiceTag(tags) - fixSourceKey(sourceKey, tags) - return tags -} - -func newMap(tags map[string]string) pcommon.Map { - m := pcommon.NewMap() - for key, value := range tags { - m.PutStr(key, value) - } - return m -} - -func errorTagsFromStatus(status ptrace.Status) map[string]string { - tags := make(map[string]string) - - if status.Code() != ptrace.StatusCodeError { - return tags - } - - tags[labelError] = "true" - - if status.Message() != "" { - msg := status.Message() - const maxLength = 255 - len(conventions.OtelStatusDescription+"=") - if len(msg) > maxLength { - msg = msg[:maxLength] - } - tags[conventions.OtelStatusDescription] = msg - } - return tags -} - -func traceIDtoUUID(id pcommon.TraceID) (uuid.UUID, error) { - formatted, err := uuid.FromBytes(id[:]) - if err != nil || id.IsEmpty() { - return uuid.Nil, errInvalidTraceID - } - return formatted, nil -} - -func spanIDtoUUID(id pcommon.SpanID) (uuid.UUID, error) { - formatted, err := uuid.FromBytes(padTo16Bytes(id)) - if err != nil || id.IsEmpty() { - return uuid.Nil, errInvalidSpanID - } - return formatted, nil -} - -func parentSpanIDtoUUID(id pcommon.SpanID) uuid.UUID { - if id.IsEmpty() { - return uuid.Nil - } - // FromBytes only returns an error if the length is not 16 bytes, so the error case is unreachable - formatted, _ := uuid.FromBytes(padTo16Bytes(id)) - return formatted -} - -func padTo16Bytes(b [8]byte) []byte { - as16bytes := make([]byte, 16) - copy(as16bytes[16-len(b):], b[:]) - return as16bytes -} diff --git a/exporter/tanzuobservabilityexporter/transformer_test.go b/exporter/tanzuobservabilityexporter/transformer_test.go deleted file mode 100644 index d171336b9565..000000000000 --- a/exporter/tanzuobservabilityexporter/transformer_test.go +++ /dev/null @@ -1,470 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package tanzuobservabilityexporter - -import ( - "testing" - "time" - - "github.com/google/uuid" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" -) - -func TestSpanStartTimeIsConvertedToMilliseconds(t *testing.T) { - inNanos := int64(50000000) - att := pcommon.NewMap() - transform := transformerFromAttributes(att) - span := ptrace.NewSpan() - span.SetSpanID([8]byte{0, 0, 0, 0, 0, 0, 0, 1}) - span.SetTraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) - span.SetStartTimestamp(pcommon.Timestamp(inNanos)) - - actual, err := transform.Span(span) - require.NoError(t, err, "transforming span to wavefront format") - - assert.Equal(t, inNanos/time.Millisecond.Nanoseconds(), actual.StartMillis) -} - -func TestSpanDurationIsCalculatedFromStartAndEndTimes(t *testing.T) { - startNanos := int64(50000000) - endNanos := int64(60000000) - att := pcommon.NewMap() - transform := transformerFromAttributes(att) - span := ptrace.NewSpan() - span.SetSpanID([8]byte{0, 0, 0, 0, 0, 0, 0, 1}) - span.SetTraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) - span.SetStartTimestamp(pcommon.Timestamp(startNanos)) - span.SetEndTimestamp(pcommon.Timestamp(endNanos)) - - actual, err := transform.Span(span) - require.NoError(t, err, "transforming span to wavefront format") - - assert.Equal(t, int64(10), actual.DurationMillis) -} - -func TestSpanDurationIsZeroIfEndTimeIsUnset(t *testing.T) { - startNanos := int64(50000000) - att := pcommon.NewMap() - transform := transformerFromAttributes(att) - span := ptrace.NewSpan() - span.SetSpanID([8]byte{0, 0, 0, 0, 0, 0, 0, 1}) - span.SetTraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) - span.SetStartTimestamp(pcommon.Timestamp(startNanos)) - - actual, err := transform.Span(span) - require.NoError(t, err, "transforming span to wavefront format") - - assert.Equal(t, int64(0), actual.DurationMillis) -} - -func TestSpanStatusCodeErrorAddsErrorTag(t *testing.T) { - transform := transformerFromAttributes(pcommon.NewMap()) - actual, err := transform.Span(spanWithStatus(ptrace.StatusCodeError, "")) - require.NoError(t, err, "transforming span to wavefront format") - - errorTag, ok := actual.Tags["error"] - assert.True(t, ok) - assert.Equal(t, "true", errorTag) -} - -func TestSpanStatusCodeOkDoesNotAddErrorTag(t *testing.T) { - transform := transformerFromAttributes(pcommon.NewMap()) - actual, err := transform.Span(spanWithStatus(ptrace.StatusCodeOk, "")) - require.NoError(t, err, "transforming span to wavefront format") - - _, ok := actual.Tags["error"] - assert.False(t, ok) -} - -func TestSpanStatusCodeUnsetDoesNotAddErrorTag(t *testing.T) { - transform := transformerFromAttributes(pcommon.NewMap()) - actual, err := transform.Span(spanWithStatus(ptrace.StatusCodeUnset, "")) - require.NoError(t, err, "transforming span to wavefront format") - - _, ok := actual.Tags["error"] - assert.False(t, ok) -} - -func TestSpanStatusMessageIsConvertedToTag(t *testing.T) { - transform := transformerFromAttributes(pcommon.NewMap()) - message := "some error message" - actual, err := transform.Span(spanWithStatus(ptrace.StatusCodeError, message)) - - require.NoError(t, err, "transforming span to wavefront format") - - msgVal, ok := actual.Tags["otel.status_description"] - assert.True(t, ok) - assert.Equal(t, message, msgVal) -} - -func TestSpanStatusMessageIsIgnoredIfStatusIsNotError(t *testing.T) { - transform := transformerFromAttributes(pcommon.NewMap()) - actual, err := transform.Span(spanWithStatus(ptrace.StatusCodeOk, "not a real error message")) - - require.NoError(t, err, "transforming span to wavefront format") - - _, ok := actual.Tags["status.message"] - assert.False(t, ok) -} - -func TestSpanStatusMessageIsTruncatedToValidLength(t *testing.T) { - /* - * Maximum allowed length for a combination of a point tag key and value is 254 characters - * (255 including the "=" separating key and value). If the value is longer, the point is rejected and logged. - * Keep the number of distinct time series per metric and host to under 1000. - * -- https://docs.wavefront.com/wavefront_data_format.html - */ - transform := transformerFromAttributes(pcommon.NewMap()) - message := "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" - message += "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" - message += "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" - actual, err := transform.Span(spanWithStatus(ptrace.StatusCodeError, message)) - - require.NoError(t, err, "transforming span to wavefront format") - - msgVal, ok := actual.Tags["otel.status_description"] - assert.True(t, ok) - assert.Equal(t, 255-1-len("otel.status_description"), len(msgVal), "message value truncated") -} - -func TestSpanEventsAreTranslatedToSpanLogs(t *testing.T) { - transform := transformerFromAttributes(pcommon.NewMap()) - now := time.Now() - span := ptrace.NewSpan() - span.SetSpanID([8]byte{0, 0, 0, 0, 0, 0, 0, 1}) - span.SetTraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) - event := span.Events().AppendEmpty() - event.SetName("eventName") - event.SetTimestamp(pcommon.NewTimestampFromTime(now)) - event.Attributes().PutStr("attrKey", "attrVal") - - result, err := transform.Span(span) - require.NoError(t, err, "transforming span to wavefront format") - - require.Equal(t, 1, len(result.SpanLogs)) - actual := result.SpanLogs[0] - assert.Equal(t, now.UnixNano()/time.Microsecond.Nanoseconds(), actual.Timestamp) - name, ok := actual.Fields[labelEventName] - assert.True(t, ok) - assert.Equal(t, "eventName", name) - attrVal, ok := actual.Fields["attrKey"] - assert.True(t, ok) - assert.Equal(t, "attrVal", attrVal) -} - -func TestSpanKindIsTranslatedToTag(t *testing.T) { - transform := transformerFromAttributes(pcommon.NewMap()) - - internalSpan, err := transform.Span(spanWithKind(ptrace.SpanKindInternal)) - require.NoError(t, err, "transforming span to wavefront format") - kind, ok := internalSpan.Tags["span.kind"] - assert.True(t, ok) - assert.Equal(t, "internal", kind) - - serverSpan, err := transform.Span(spanWithKind(ptrace.SpanKindServer)) - require.NoError(t, err, "transforming span to wavefront format") - kind, ok = serverSpan.Tags["span.kind"] - assert.True(t, ok) - assert.Equal(t, "server", kind) - - clientSpan, err := transform.Span(spanWithKind(ptrace.SpanKindClient)) - require.NoError(t, err, "transforming span to wavefront format") - kind, ok = clientSpan.Tags["span.kind"] - assert.True(t, ok) - assert.Equal(t, "client", kind) - - consumerSpan, err := transform.Span(spanWithKind(ptrace.SpanKindConsumer)) - require.NoError(t, err, "transforming span to wavefront format") - kind, ok = consumerSpan.Tags["span.kind"] - assert.True(t, ok) - assert.Equal(t, "consumer", kind) - - producerSpan, err := transform.Span(spanWithKind(ptrace.SpanKindProducer)) - require.NoError(t, err, "transforming span to wavefront format") - kind, ok = producerSpan.Tags["span.kind"] - assert.True(t, ok) - assert.Equal(t, "producer", kind) - - unspecifiedSpan, err := transform.Span(spanWithKind(ptrace.SpanKindUnspecified)) - require.NoError(t, err, "transforming span to wavefront format") - kind, ok = unspecifiedSpan.Tags["span.kind"] - assert.True(t, ok) - assert.Equal(t, "unspecified", kind) -} - -func TestTraceStateTranslatedToTag(t *testing.T) { - transform := transformerFromAttributes(pcommon.NewMap()) - - spanWithState, err := transform.Span(spanWithTraceState("key=val")) - require.NoError(t, err, "transforming span to wavefront format") - stateVal, ok := spanWithState.Tags["w3c.tracestate"] - assert.True(t, ok) - assert.Equal(t, "key=val", stateVal) - - spanWithEmptyState, err := transform.Span(spanWithTraceState("")) - require.NoError(t, err, "transforming span to wavefront format") - _, ok = spanWithEmptyState.Tags["w3c.tracestate"] - assert.False(t, ok) -} - -func TestSpanForSourceTag(t *testing.T) { - inNanos := int64(50000000) - - //TestCase1: default value for source - resAttrs := pcommon.NewMap() - transform := transformerFromAttributes(resAttrs) - span := ptrace.NewSpan() - span.SetSpanID([8]byte{0, 0, 0, 0, 0, 0, 0, 1}) - span.SetTraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) - span.SetStartTimestamp(pcommon.Timestamp(inNanos)) - - actual, err := transform.Span(span) - require.NoError(t, err, "transforming span to wavefront format") - assert.Equal(t, "", actual.Source) - - //TestCase2: source value from resAttrs.source - resAttrs = pcommon.NewMap() - resAttrs.PutStr(labelSource, "test_source") - resAttrs.PutStr(conventions.AttributeHostName, "test_host.name") - transform = transformerFromAttributes(resAttrs) - span = ptrace.NewSpan() - span.SetSpanID([8]byte{0, 0, 0, 0, 0, 0, 0, 1}) - span.SetTraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) - span.SetStartTimestamp(pcommon.Timestamp(inNanos)) - - actual, err = transform.Span(span) - require.NoError(t, err, "transforming span to wavefront format") - assert.Equal(t, "test_source", actual.Source) - assert.Equal(t, "test_host.name", actual.Tags[conventions.AttributeHostName]) - require.NotContains(t, actual.Tags, labelSource) - - //TestCase2: source value from resAttrs.host.name when source is not present - resAttrs = pcommon.NewMap() - resAttrs.PutStr("hostname", "test_hostname") - resAttrs.PutStr(conventions.AttributeHostName, "test_host.name") - transform = transformerFromAttributes(resAttrs) - span = ptrace.NewSpan() - span.SetSpanID([8]byte{0, 0, 0, 0, 0, 0, 0, 1}) - span.SetTraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) - span.SetStartTimestamp(pcommon.Timestamp(inNanos)) - - actual, err = transform.Span(span) - require.NoError(t, err, "transforming span to wavefront format") - assert.Equal(t, "test_host.name", actual.Source) - assert.Equal(t, "test_hostname", actual.Tags["hostname"]) - require.NotContains(t, actual.Tags, conventions.AttributeHostName) - - //TestCase4: source value from resAttrs.source when spanAttrs.source is present - resAttrs = pcommon.NewMap() - span.Attributes().PutStr(labelSource, "source_from_span_attribute") - resAttrs.PutStr(labelSource, "test_source") - resAttrs.PutStr(conventions.AttributeHostName, "test_host.name") - transform = transformerFromAttributes(resAttrs) - actual, err = transform.Span(span) - require.NoError(t, err, "transforming span to wavefront format") - assert.Equal(t, "test_source", actual.Source) - assert.Equal(t, "test_host.name", actual.Tags[conventions.AttributeHostName]) - require.NotContains(t, actual.Tags, labelSource) - assert.Equal(t, "source_from_span_attribute", actual.Tags["_source"]) -} - -func TestSpanForDroppedCount(t *testing.T) { - inNanos := int64(50000000) - - //TestCase: 1 count tags are not set - resAttrs := pcommon.NewMap() - transform := transformerFromAttributes(resAttrs) - span := ptrace.NewSpan() - span.SetSpanID([8]byte{0, 0, 0, 0, 0, 0, 0, 1}) - span.SetTraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) - span.SetStartTimestamp(pcommon.Timestamp(inNanos)) - - actual, err := transform.Span(span) - require.NoError(t, err, "transforming span to wavefront format") - assert.NotContains(t, actual.Tags, "otel.dropped_events_count") - assert.NotContains(t, actual.Tags, "otel.dropped_links_count") - assert.NotContains(t, actual.Tags, "otel.dropped_attributes_count") - - //TestCase2: count tags are set - span.SetDroppedEventsCount(123) - span.SetDroppedLinksCount(456) - span.SetDroppedAttributesCount(789) - - actual, err = transform.Span(span) - require.NoError(t, err, "transforming span to wavefront format") - assert.Equal(t, "123", actual.Tags["otel.dropped_events_count"]) - assert.Equal(t, "456", actual.Tags["otel.dropped_links_count"]) - assert.Equal(t, "789", actual.Tags["otel.dropped_attributes_count"]) -} - -func TestGetSourceAndResourceTags(t *testing.T) { - resAttrs := pcommon.NewMap() - resAttrs.PutStr(labelSource, "test_source") - resAttrs.PutStr(conventions.AttributeHostName, "test_host.name") - - actualSource, actualAttrsWithoutSource := getSourceAndResourceTags(resAttrs) - assert.Equal(t, "test_source", actualSource) - require.NotContains(t, actualAttrsWithoutSource, labelSource) -} - -func TestGetSourceAndKey(t *testing.T) { - resAttrs := pcommon.NewMap() - resAttrs.PutStr(labelSource, "some_source") - resAttrs.PutStr(conventions.AttributeHostName, "test_host.name") - - source, sourceKey := getSourceAndKey(resAttrs) - assert.Equal(t, "some_source", source) - assert.Equal(t, labelSource, sourceKey) -} - -func TestGetSourceAndKeyNotFound(t *testing.T) { - resAttrs := pcommon.NewMap() - resAttrs.PutStr("foo", "some_source") - resAttrs.PutStr("bar", "test_host.name") - - source, sourceKey := getSourceAndKey(resAttrs) - assert.Equal(t, "", source) - assert.Equal(t, "", sourceKey) -} - -func TestAttributesToTagsReplaceSource(t *testing.T) { - attrMap1 := newMap(map[string]string{"customer": "aws", "env": "dev"}) - attrMap2 := newMap(map[string]string{"env": "prod", "source": "ethernet"}) - result := attributesToTagsReplaceSource(attrMap1, attrMap2) - - // attrMap2 takes precedence because it is last, so "env"->"prod" not "dev" - assert.Equal( - t, - map[string]string{"env": "prod", "customer": "aws", "_source": "ethernet"}, - result) -} - -func spanWithKind(kind ptrace.SpanKind) ptrace.Span { - span := ptrace.NewSpan() - span.SetSpanID([8]byte{0, 0, 0, 0, 0, 0, 0, 1}) - span.SetTraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) - span.SetKind(kind) - return span -} - -func spanWithTraceState(state string) ptrace.Span { - span := ptrace.NewSpan() - span.SetSpanID([8]byte{0, 0, 0, 0, 0, 0, 0, 1}) - span.SetTraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) - span.TraceState().FromRaw(state) - return span -} - -func transformerFromAttributes(attrs pcommon.Map) *traceTransformer { - return &traceTransformer{ - resAttrs: attrs, - } -} - -func spanWithStatus(statusCode ptrace.StatusCode, message string) ptrace.Span { - span := ptrace.NewSpan() - span.SetSpanID([8]byte{0, 0, 0, 0, 0, 0, 0, 1}) - span.SetTraceID([16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) - status := ptrace.NewStatus() - status.SetCode(statusCode) - if message != "" { - status.SetMessage(message) - } - status.CopyTo(span.Status()) - return span -} - -func TestAppAttributesToTags(t *testing.T) { - // 1. other attributes provided - attrMap := newMap(map[string]string{"k": "v"}) - tags := appAttributesToTags(attrMap) - assert.Equal(t, map[string]string{}, tags) - - // 2. service.name provided - attrMap = newMap(map[string]string{"k": "v", "application": "test_app", "service.name": "test_service.name", "shard": "test_shard", "cluster": "test_cluster"}) - tags1 := appAttributesToTags(attrMap) - assert.Equal(t, map[string]string{"application": "test_app", "service.name": "test_service.name", "shard": "test_shard", "cluster": "test_cluster"}, tags1) - - // 3. service and service.name both provided - attrMap = newMap(map[string]string{"k": "v", "application": "test_app", "service.name": "test_service.name", "shard": "test_shard", "cluster": "test_cluster", "service": "test_service"}) - tags2 := appAttributesToTags(attrMap) - assert.Equal(t, map[string]string{"application": "test_app", "service": "test_service", "shard": "test_shard", "cluster": "test_cluster", "service.name": "test_service.name"}, tags2) -} - -func TestFixServiceTag(t *testing.T) { - // service get picked up when both the tags are provided - attrMap := map[string]string{"application": "test_app", "shard": "test_shard", "cluster": "test_cluster", "service.name": "test_service"} - fixServiceTag(attrMap) - assert.Equal(t, map[string]string{"application": "test_app", "service": "test_service", "shard": "test_shard", "cluster": "test_cluster"}, attrMap) -} - -func TestPointAndResAttrsToTagsAndFixSource(t *testing.T) { - // 1. service.name provided - attrMap := newMap(map[string]string{"application": "test_app", "service.name": "test_service.name", "source": "test_source"}) - tags := pointAndResAttrsToTagsAndFixSource("source", attrMap) - assert.Equal(t, map[string]string{"application": "test_app", "service": "test_service.name"}, tags) - - // 2. service and service.name both provided - attrMap = newMap(map[string]string{"application": "test_app", "service.name": "test_service.name", "source": "test_source", "service": "test_service"}) - tags = pointAndResAttrsToTagsAndFixSource("source", attrMap) - assert.Equal(t, map[string]string{"application": "test_app", "service": "test_service", "service.name": "test_service.name"}, tags) - - // 3. service.name provided sourceKey other than "source" - attrMap = newMap(map[string]string{"application": "test_app", "service.name": "test_service.name", "source": "test_source", "other_source": "test_other_source"}) - tags = pointAndResAttrsToTagsAndFixSource("other_source", attrMap) - assert.Equal(t, map[string]string{"application": "test_app", "service": "test_service.name", "_source": "test_source"}, tags) - - // 2. service and service.name both provided - attrMap = newMap(map[string]string{"application": "test_app", "service.name": "test_service.name", "source": "test_source", "service": "test_service", "other_source": "test_other_source"}) - tags = pointAndResAttrsToTagsAndFixSource("other_source", attrMap) - assert.Equal(t, map[string]string{"application": "test_app", "service": "test_service", "service.name": "test_service.name", "_source": "test_source"}, tags) -} - -func TestTraceIDtoUUID(t *testing.T) { - tests := []struct { - name string - in pcommon.TraceID - out uuid.UUID - error bool - }{ - { - name: "empty", - in: pcommon.NewTraceIDEmpty(), - out: uuid.UUID{}, - error: true, - }, - { - name: "one", - in: pcommon.TraceID([16]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}), - out: uuid.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, - }, - { - name: "all_bytes", - in: pcommon.TraceID([16]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}), - out: uuid.UUID{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := traceIDtoUUID(tt.in) - if tt.error { - assert.Error(t, err) - } else { - assert.NoError(t, err) - } - assert.Equal(t, tt.out, got) - }) - } -} - -func BenchmarkTraceIDtoUUID(b *testing.B) { - for n := 0; n < b.N; n++ { - _, err := traceIDtoUUID([16]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}) - assert.NoError(b, err) - } -} diff --git a/exporter/tencentcloudlogserviceexporter/generated_component_test.go b/exporter/tencentcloudlogserviceexporter/generated_component_test.go new file mode 100644 index 000000000000..d8ca76aee854 --- /dev/null +++ b/exporter/tencentcloudlogserviceexporter/generated_component_test.go @@ -0,0 +1,87 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package tencentcloudlogserviceexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + 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) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/tencentcloudlogserviceexporter/go.mod b/exporter/tencentcloudlogserviceexporter/go.mod index 7160ba6b1bf2..e94d7486cef1 100644 --- a/exporter/tencentcloudlogserviceexporter/go.mod +++ b/exporter/tencentcloudlogserviceexporter/go.mod @@ -1,55 +1,65 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 github.com/pierrec/lz4 v2.6.1+incompatible - github.com/stretchr/testify v1.8.4 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.792 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 - google.golang.org/protobuf v1.31.0 + github.com/stretchr/testify v1.9.0 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.896 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/zap v1.27.0 + google.golang.org/protobuf v1.33.0 ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/frankban/quicktest v1.14.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/tencentcloudlogserviceexporter/go.sum b/exporter/tencentcloudlogserviceexporter/go.sum index cef8fe82fc6c..00bd18734ff6 100644 --- a/exporter/tencentcloudlogserviceexporter/go.sum +++ b/exporter/tencentcloudlogserviceexporter/go.sum @@ -1,58 +1,34 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/frankban/quicktest v1.14.0 h1:+cqqvzZV87b4adx/5ayVOaYZ2CrvM4ejQvUdBzPPUss= github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -61,20 +37,18 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -86,108 +60,93 @@ github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9F github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.792 h1:MwUEEkppjl0GIiz/rovNF54PG+RBwdfk1/+Rys8NUko= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.792/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.896 h1:24LJSJctlcXa6KzV5quttY8R8NmmF4hTbeWgqKm6clw= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.896/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -195,40 +154,18 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/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= -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/exporter/tencentcloudlogserviceexporter/internal/metadata/generated_status.go b/exporter/tencentcloudlogserviceexporter/internal/metadata/generated_status.go index f6b1e640367d..13b3321afeeb 100644 --- a/exporter/tencentcloudlogserviceexporter/internal/metadata/generated_status.go +++ b/exporter/tencentcloudlogserviceexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("tencentcloud_logservice") ) const ( - Type = "tencentcloud_logservice" LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/tencentcloudlogservice") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/tencentcloudlogservice") +} diff --git a/exporter/tencentcloudlogserviceexporter/metadata.yaml b/exporter/tencentcloudlogserviceexporter/metadata.yaml index 028015509293..6a2fc2964c46 100644 --- a/exporter/tencentcloudlogserviceexporter/metadata.yaml +++ b/exporter/tencentcloudlogserviceexporter/metadata.yaml @@ -1,4 +1,5 @@ type: tencentcloud_logservice +scope_name: otelcol/tencentcloudlogservice status: class: exporter @@ -8,3 +9,6 @@ status: codeowners: active: [wgliang, yiyang5055] +# TODO: Update the exporter to pass the tests +tests: + skip_lifecycle: true diff --git a/exporter/zipkinexporter/README.md b/exporter/zipkinexporter/README.md index eb48214da361..7ba35c39b6b1 100644 --- a/exporter/zipkinexporter/README.md +++ b/exporter/zipkinexporter/README.md @@ -4,14 +4,13 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces | -| Distributions | [core], [contrib], [observiq] | +| Distributions | [core], [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fzipkin%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fzipkin) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fzipkin%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fzipkin) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@MovieStoreGuy](https://www.github.com/MovieStoreGuy), [@astencel-sumo](https://www.github.com/astencel-sumo), [@crobert-1](https://www.github.com/crobert-1) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector Exports data to a [Zipkin](https://zipkin.io/) back-end. diff --git a/exporter/zipkinexporter/config.go b/exporter/zipkinexporter/config.go index 0b9438cb0d12..5f18554fa174 100644 --- a/exporter/zipkinexporter/config.go +++ b/exporter/zipkinexporter/config.go @@ -4,19 +4,22 @@ package zipkinexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter" import ( + "errors" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) // Config defines configuration settings for the Zipkin exporter. type Config struct { exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // Configures the exporter client. // The Endpoint to send the Zipkin trace data to (e.g.: http://some.url:9411/api/v2/spans). - confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + confighttp.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. Format string `mapstructure:"format"` @@ -27,5 +30,8 @@ var _ component.Config = (*Config)(nil) // Validate checks if the exporter configuration is valid func (cfg *Config) Validate() error { + if cfg.ClientConfig.Endpoint == "" { + return errors.New("endpoint required") + } return nil } diff --git a/exporter/zipkinexporter/config_test.go b/exporter/zipkinexporter/config_test.go index fdc56c71184a..db89e0619f7a 100644 --- a/exporter/zipkinexporter/config_test.go +++ b/exporter/zipkinexporter/config_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -29,6 +30,8 @@ func TestLoadConfig(t *testing.T) { // URL doesn't have a default value so set it directly. defaultCfg := createDefaultConfig().(*Config) defaultCfg.Endpoint = "http://some.location.org:9411/api/v2/spans" + maxIdleConns := 50 + idleConnTimeout := 5 * time.Second tests := []struct { id component.ID @@ -41,7 +44,7 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "2"), expected: &Config{ - RetrySettings: exporterhelper.RetrySettings{ + BackOffConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, MaxInterval: 1 * time.Minute, @@ -54,13 +57,15 @@ func TestLoadConfig(t *testing.T) { NumConsumers: 2, QueueSize: 10, }, - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "https://somedest:1234/api/v2/spans", WriteBufferSize: 524288, Timeout: 5 * time.Second, - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ InsecureSkipVerify: true, }, + MaxIdleConns: &maxIdleConns, + IdleConnTimeout: &idleConnTimeout, }, Format: "proto", DefaultServiceName: "test_name", diff --git a/exporter/zipkinexporter/factory.go b/exporter/zipkinexporter/factory.go index 198c400ff2e2..d3d7f423f226 100644 --- a/exporter/zipkinexporter/factory.go +++ b/exporter/zipkinexporter/factory.go @@ -5,11 +5,11 @@ package zipkinexporter // import "github.com/open-telemetry/opentelemetry-collec import ( "context" - "errors" "time" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -33,14 +33,13 @@ func NewFactory() exporter.Factory { } func createDefaultConfig() component.Config { + defaultClientHTTPSettings := confighttp.NewDefaultClientConfig() + defaultClientHTTPSettings.Timeout = defaultTimeout + defaultClientHTTPSettings.WriteBufferSize = 512 * 1024 return &Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), - HTTPClientSettings: confighttp.HTTPClientSettings{ - Timeout: defaultTimeout, - // We almost read 0 bytes, so no need to tune ReadBufferSize. - WriteBufferSize: 512 * 1024, - }, + BackOffConfig: configretry.NewDefaultBackOffConfig(), + QueueSettings: exporterhelper.NewDefaultQueueSettings(), + ClientConfig: defaultClientHTTPSettings, Format: defaultFormat, DefaultServiceName: defaultServiceName, } @@ -53,11 +52,6 @@ func createTracesExporter( ) (exporter.Traces, error) { zc := cfg.(*Config) - if zc.Endpoint == "" { - // TODO https://github.com/open-telemetry/opentelemetry-collector/issues/215 - return nil, errors.New("exporter config requires a non-empty 'endpoint'") - } - ze, err := createZipkinExporter(zc, set.TelemetrySettings) if err != nil { return nil, err @@ -71,5 +65,5 @@ func createTracesExporter( // explicitly disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), exporterhelper.WithQueue(zc.QueueSettings), - exporterhelper.WithRetry(zc.RetrySettings)) + exporterhelper.WithRetry(zc.BackOffConfig)) } diff --git a/exporter/zipkinexporter/factory_test.go b/exporter/zipkinexporter/factory_test.go index b20ed9ababe0..808e02eef52d 100644 --- a/exporter/zipkinexporter/factory_test.go +++ b/exporter/zipkinexporter/factory_test.go @@ -21,16 +21,10 @@ func TestCreateDefaultConfig(t *testing.T) { func TestCreateInstanceViaFactory(t *testing.T) { cfg := createDefaultConfig() - // Default config doesn't have default endpoint so creating from it should - // fail. - ze, err := createTracesExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) - assert.Error(t, err) - assert.Nil(t, ze) - // URL doesn't have a default value so set it directly. zeCfg := cfg.(*Config) zeCfg.Endpoint = "http://some.location.org:9411/api/v2/spans" - ze, err = createTracesExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + ze, err := createTracesExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) assert.NoError(t, err) assert.NotNil(t, ze) } diff --git a/exporter/zipkinexporter/generated_component_test.go b/exporter/zipkinexporter/generated_component_test.go new file mode 100644 index 000000000000..226279eed4ab --- /dev/null +++ b/exporter/zipkinexporter/generated_component_test.go @@ -0,0 +1,128 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package zipkinexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + 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(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + 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 test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + require.NoError(t, err) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/zipkinexporter/go.mod b/exporter/zipkinexporter/go.mod index 54e77e8b5c81..2902460073d8 100644 --- a/exporter/zipkinexporter/go.mod +++ b/exporter/zipkinexporter/go.mod @@ -1,76 +1,83 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter -go 1.20 +go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.1 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.89.0 + github.com/cenkalti/backoff/v4 v4.3.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.98.0 github.com/openzipkin/zipkin-go v0.4.2 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/receiver v0.89.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configretry v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/receiver v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 ) require ( github.com/apache/thrift v0.19.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.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.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/jaegertracing/jaeger v1.48.0 // indirect + github.com/jaegertracing/jaeger v1.55.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/atomic v1.11.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/zipkinexporter/go.sum b/exporter/zipkinexporter/go.sum index 49370bc929e6..684b96f67522 100644 --- a/exporter/zipkinexporter/go.sum +++ b/exporter/zipkinexporter/go.sum @@ -1,89 +1,61 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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 v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/jaegertracing/jaeger v1.48.0 h1:YuKooQ7qJsjgxws9xuf8C/BLNTPx8qTAJz4wv7IHhSc= -github.com/jaegertracing/jaeger v1.48.0/go.mod h1:BoAPkdCAIEuLsVz/EDhjXd+GSVpHtJhiGqWoFEvBCKg= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= 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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -91,134 +63,113 @@ 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/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDOCg/jA= github.com/openzipkin/zipkin-go v0.4.2/go.mod h1:ZeVkFjuuBiSy13y8vpSDCjMi9GoI3hPpCJSBx/EYFhY= -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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= +github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +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/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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.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/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -226,38 +177,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/exporter/zipkinexporter/internal/metadata/generated_status.go b/exporter/zipkinexporter/internal/metadata/generated_status.go index 7304d293cd3f..359f387990bc 100644 --- a/exporter/zipkinexporter/internal/metadata/generated_status.go +++ b/exporter/zipkinexporter/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("zipkin") ) const ( - Type = "zipkin" TracesStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/zipkin") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/zipkin") +} diff --git a/exporter/zipkinexporter/metadata.yaml b/exporter/zipkinexporter/metadata.yaml index cbc06d45c8ca..4948166770c6 100644 --- a/exporter/zipkinexporter/metadata.yaml +++ b/exporter/zipkinexporter/metadata.yaml @@ -1,10 +1,10 @@ type: zipkin +scope_name: otelcol/zipkin status: class: exporter stability: beta: [traces] - distributions: [core, contrib, observiq] + distributions: [core, contrib] codeowners: active: [MovieStoreGuy, astencel-sumo, crobert-1] - diff --git a/exporter/zipkinexporter/package_test.go b/exporter/zipkinexporter/package_test.go new file mode 100644 index 000000000000..5c3fa898c42c --- /dev/null +++ b/exporter/zipkinexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package zipkinexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/zipkinexporter/testdata/config.yaml b/exporter/zipkinexporter/testdata/config.yaml index 0ee2f186907d..33466c2f2298 100644 --- a/exporter/zipkinexporter/testdata/config.yaml +++ b/exporter/zipkinexporter/testdata/config.yaml @@ -4,6 +4,8 @@ zipkin/2: endpoint: "https://somedest:1234/api/v2/spans" format: proto default_service_name: test_name + idle_conn_timeout: 5s + max_idle_conns: 50 sending_queue: enabled: true num_consumers: 2 diff --git a/exporter/zipkinexporter/zipkin.go b/exporter/zipkinexporter/zipkin.go index 0de3452de4a1..1e5ee372f8c3 100644 --- a/exporter/zipkinexporter/zipkin.go +++ b/exporter/zipkinexporter/zipkin.go @@ -32,7 +32,7 @@ type zipkinExporter struct { url string client *http.Client serializer zipkinreporter.SpanSerializer - clientSettings *confighttp.HTTPClientSettings + clientSettings *confighttp.ClientConfig settings component.TelemetrySettings } @@ -40,7 +40,7 @@ func createZipkinExporter(cfg *Config, settings component.TelemetrySettings) (*z ze := &zipkinExporter{ defaultServiceName: cfg.DefaultServiceName, url: cfg.Endpoint, - clientSettings: &cfg.HTTPClientSettings, + clientSettings: &cfg.ClientConfig, client: nil, settings: settings, } @@ -58,8 +58,8 @@ func createZipkinExporter(cfg *Config, settings component.TelemetrySettings) (*z } // start creates the http client -func (ze *zipkinExporter) start(_ context.Context, host component.Host) (err error) { - ze.client, err = ze.clientSettings.ToClient(host, ze.settings) +func (ze *zipkinExporter) start(ctx context.Context, host component.Host) (err error) { + ze.client, err = ze.clientSettings.ToClientContext(ctx, host, ze.settings) return } diff --git a/exporter/zipkinexporter/zipkin_test.go b/exporter/zipkinexporter/zipkin_test.go index 457aaf4db3c9..ac1753ab9f93 100644 --- a/exporter/zipkinexporter/zipkin_test.go +++ b/exporter/zipkinexporter/zipkin_test.go @@ -40,7 +40,7 @@ import ( func TestZipkinExporter_roundtripJSON(t *testing.T) { buf := new(bytes.Buffer) var sizes []int64 - cst := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + cst := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { s, _ := io.Copy(buf, r.Body) sizes = append(sizes, s) r.Body.Close() @@ -48,7 +48,7 @@ func TestZipkinExporter_roundtripJSON(t *testing.T) { defer cst.Close() cfg := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: cst.URL, }, Format: "json", @@ -66,7 +66,7 @@ func TestZipkinExporter_roundtripJSON(t *testing.T) { // Run the Zipkin receiver to "receive spans upload from a client application" addr := testutil.GetAvailableLocalAddress(t) recvCfg := &zipkinreceiver.Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: addr, }, } @@ -271,7 +271,7 @@ const zipkinSpansJSONJavaLibrary = ` func TestZipkinExporter_invalidFormat(t *testing.T) { config := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "1.2.3.4", }, Format: "foobar", @@ -286,7 +286,7 @@ func TestZipkinExporter_invalidFormat(t *testing.T) { func TestZipkinExporter_roundtripProto(t *testing.T) { buf := new(bytes.Buffer) var contentType string - cst := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + cst := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { _, err := io.Copy(buf, r.Body) assert.NoError(t, err) contentType = r.Header.Get("Content-Type") @@ -295,7 +295,7 @@ func TestZipkinExporter_roundtripProto(t *testing.T) { defer cst.Close() cfg := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: cst.URL, }, Format: "proto", @@ -314,7 +314,7 @@ func TestZipkinExporter_roundtripProto(t *testing.T) { // Run the Zipkin receiver to "receive spans upload from a client application" addr := testutil.GetAvailableLocalAddress(t) recvCfg := &zipkinreceiver.Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: addr, }, } diff --git a/processor/datadogprocessor/Makefile b/extension/ackextension/Makefile similarity index 100% rename from processor/datadogprocessor/Makefile rename to extension/ackextension/Makefile diff --git a/extension/ackextension/README.md b/extension/ackextension/README.md new file mode 100644 index 000000000000..68d93b51ba89 --- /dev/null +++ b/extension/ackextension/README.md @@ -0,0 +1,34 @@ +# Ack Extension + +| Status | | +| ------------- |-----------| +| Stability | [development] | +| Distributions | [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fack%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fack) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fack%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fack) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@zpzhuSplunk](https://www.github.com/zpzhuSplunk), [@splunkericl](https://www.github.com/splunkericl) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + + +This extension allows acking of data upon successful processing. The upstream agent can choose to send event again +if ack fails. +## Configuration + +```yaml +extensions: + ack: + storage: + max_number_of_partition: 1000000 + max_number_of_pending_acks_per_partition: 1000000 + +receivers: + splunk_hec: + ack_extension: ack + +service: + extensions: [ack] + pipelines: + logs: + receivers: [splunk_hec] +``` \ No newline at end of file diff --git a/extension/ackextension/ackextension.go b/extension/ackextension/ackextension.go new file mode 100644 index 000000000000..c1fa30ca3fa8 --- /dev/null +++ b/extension/ackextension/ackextension.go @@ -0,0 +1,19 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ackextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension" + +// AckExtension is an extension that can be used by other otel components to support acking of data and can be queried against +// to check the status of given ack ids. +type AckExtension interface { + // ProcessEvent marks the beginning of processing an event. It generates an ack ID for the associated partition ID. + // ACK IDs are only unique within a partition. Two partitions can have the same ACK IDs, but they are generated for different events. + ProcessEvent(partitionID string) (ackID uint64) + + // Ack acknowledges an event has been processed. + Ack(partitionID string, ackID uint64) + + // QueryAcks checks the statuses of given ackIDs for a partition. + // ackIDs that are not generated from ProcessEvent or have been removed as a result of previous calls to QueryAcks will return false. + QueryAcks(partitionID string, ackIDs []uint64) map[uint64]bool +} diff --git a/extension/ackextension/config.go b/extension/ackextension/config.go new file mode 100644 index 000000000000..8c363cd5ab14 --- /dev/null +++ b/extension/ackextension/config.go @@ -0,0 +1,18 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ackextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension" +import ( + "go.opentelemetry.io/collector/component" +) + +// Config defines configuration for ack extension +type Config struct { + // StorageID defines the storage type of the extension. In-memory type is set by default (if not provided). Future consideration is disk type. + StorageID *component.ID `mapstructure:"storage"` + // MaxNumPartition Specifies the maximum number of partitions that clients can acquire for this extension instance. + // Implementation defines how limit exceeding should be handled. + MaxNumPartition uint64 `mapstructure:"max_number_of_partition"` + // MaxNumPendingAcksPerPartition Specifies the maximum number of ackIDs and their corresponding status information that are waiting to be queried in each partition. + MaxNumPendingAcksPerPartition uint64 `mapstructure:"max_number_of_pending_acks_per_partition"` +} diff --git a/extension/ackextension/doc.go b/extension/ackextension/doc.go new file mode 100644 index 000000000000..c48fcb95161c --- /dev/null +++ b/extension/ackextension/doc.go @@ -0,0 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +package ackextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension" diff --git a/extension/ackextension/factory.go b/extension/ackextension/factory.go new file mode 100644 index 000000000000..048d754423d2 --- /dev/null +++ b/extension/ackextension/factory.go @@ -0,0 +1,46 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ackextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension/internal/metadata" +) + +var defaultStorageType = (*component.ID)(nil) + +const ( + defaultMaxNumPartition uint64 = 1_000_000 + defaultMaxNumPendingAcksPerPartition uint64 = 1_000_000 +) + +// NewFactory creates a factory for ack extension. +func NewFactory() extension.Factory { + return extension.NewFactory( + metadata.Type, + createDefaultConfig, + createExtension, + metadata.ExtensionStability, + ) +} + +func createDefaultConfig() component.Config { + return &Config{ + StorageID: defaultStorageType, + MaxNumPartition: defaultMaxNumPartition, + MaxNumPendingAcksPerPartition: defaultMaxNumPendingAcksPerPartition, + } +} + +func createExtension(_ context.Context, _ extension.CreateSettings, cfg component.Config) (extension.Extension, error) { + if cfg.(*Config).StorageID == nil { + return newInMemoryAckExtension(cfg.(*Config)), nil + } + + return nil, nil +} diff --git a/extension/ackextension/factory_test.go b/extension/ackextension/factory_test.go new file mode 100644 index 000000000000..c2c2401f3fbd --- /dev/null +++ b/extension/ackextension/factory_test.go @@ -0,0 +1,22 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ackextension + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" +) + +func TestFactory(t *testing.T) { + f := NewFactory() + expectType := component.MustNewType("ack") + require.Equal(t, expectType, f.Type()) + + cfg := f.CreateDefaultConfig().(*Config) + require.Equal(t, defaultStorageType, cfg.StorageID) + require.Equal(t, defaultMaxNumPendingAcksPerPartition, cfg.MaxNumPendingAcksPerPartition) + require.Equal(t, defaultMaxNumPartition, cfg.MaxNumPartition) +} diff --git a/extension/ackextension/go.mod b/extension/ackextension/go.mod new file mode 100644 index 000000000000..ef5c3b9834d8 --- /dev/null +++ b/extension/ackextension/go.mod @@ -0,0 +1,39 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension + +go 1.21 + +require ( + github.com/hashicorp/golang-lru/v2 v2.0.7 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // 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.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/extension/ackextension/go.sum b/extension/ackextension/go.sum new file mode 100644 index 000000000000..417a9f7988cb --- /dev/null +++ b/extension/ackextension/go.sum @@ -0,0 +1,126 @@ +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/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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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/extension/ackextension/inmemory.go b/extension/ackextension/inmemory.go new file mode 100644 index 000000000000..e9eb87e404aa --- /dev/null +++ b/extension/ackextension/inmemory.go @@ -0,0 +1,109 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ackextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension" + +import ( + "context" + "sync/atomic" + + lru "github.com/hashicorp/golang-lru/v2" + "go.opentelemetry.io/collector/component" +) + +// inMemoryAckExtension is the in-memory implementation of the AckExtension +// When MaxNumPartition is reached, the acks associated with the least recently used partition are evicted. +// When MaxNumPendingAcksPerPartition is reached, the least recently used ack is evicted +type inMemoryAckExtension struct { + partitionMap *lru.Cache[string, *ackPartition] + maxNumPendingAcksPerPartition uint64 +} + +func newInMemoryAckExtension(conf *Config) *inMemoryAckExtension { + cache, _ := lru.New[string, *ackPartition](int(conf.MaxNumPartition)) + return &inMemoryAckExtension{ + partitionMap: cache, + maxNumPendingAcksPerPartition: conf.MaxNumPendingAcksPerPartition, + } +} + +type ackPartition struct { + id atomic.Uint64 + ackMap *lru.Cache[uint64, bool] +} + +func newAckPartition(maxPendingAcks uint64) *ackPartition { + cache, _ := lru.New[uint64, bool](int(maxPendingAcks)) + return &ackPartition{ + ackMap: cache, + } +} + +func (as *ackPartition) nextAck() uint64 { + id := as.id.Add(1) + as.ackMap.Add(id, false) + return id +} + +func (as *ackPartition) ack(key uint64) { + if _, ok := as.ackMap.Get(key); ok { + as.ackMap.Add(key, true) + } +} + +func (as *ackPartition) computeAcks(ackIDs []uint64) map[uint64]bool { + result := make(map[uint64]bool, len(ackIDs)) + for _, val := range ackIDs { + if isAcked, ok := as.ackMap.Get(val); ok && isAcked { + result[val] = true + as.ackMap.Remove(val) + } else { + result[val] = false + } + } + + return result +} + +// Start of inMemoryAckExtension does nothing and returns nil +func (i *inMemoryAckExtension) Start(_ context.Context, _ component.Host) error { + return nil +} + +// Shutdown of inMemoryAckExtension does nothing and returns nil +func (i *inMemoryAckExtension) Shutdown(_ context.Context) error { + return nil +} + +// ProcessEvent marks the beginning of processing an event. It generates an ack ID for the associated partition ID. +func (i *inMemoryAckExtension) ProcessEvent(partitionID string) (ackID uint64) { + if val, ok := i.partitionMap.Get(partitionID); ok { + return val.nextAck() + } + + i.partitionMap.ContainsOrAdd(partitionID, newAckPartition(i.maxNumPendingAcksPerPartition)) + val, _ := i.partitionMap.Get(partitionID) + return val.nextAck() +} + +// Ack acknowledges an event has been processed. +func (i *inMemoryAckExtension) Ack(partitionID string, ackID uint64) { + if val, ok := i.partitionMap.Get(partitionID); ok { + val.ack(ackID) + } +} + +// QueryAcks checks the statuses of given ackIDs for a partition. +// ackIDs that are not generated from ProcessEvent or have been removed as a result of previous calls to QueryAcks will return false. +func (i *inMemoryAckExtension) QueryAcks(partitionID string, ackIDs []uint64) map[uint64]bool { + if val, ok := i.partitionMap.Get(partitionID); ok { + return val.computeAcks(ackIDs) + } + + result := make(map[uint64]bool, len(ackIDs)) + for _, ackID := range ackIDs { + result[ackID] = false + } + + return result +} diff --git a/extension/ackextension/inmemory_test.go b/extension/ackextension/inmemory_test.go new file mode 100644 index 000000000000..8e893866a5f7 --- /dev/null +++ b/extension/ackextension/inmemory_test.go @@ -0,0 +1,293 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ackextension + +import ( + "fmt" + "maps" + "sync" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestAckPartitionNextAckConcurrency(t *testing.T) { + ackSize := 1_000_000 + ap := newAckPartition(uint64(ackSize)) + map1 := map[uint64]struct{}{} + map2 := map[uint64]struct{}{} + wg := sync.WaitGroup{} + wg.Add(2) + go func() { + for i := 0; i < ackSize/2; i++ { + map1[ap.nextAck()] = struct{}{} + } + wg.Done() + }() + go func() { + for i := 0; i < ackSize/2; i++ { + map2[ap.nextAck()] = struct{}{} + } + wg.Done() + }() + + wg.Wait() + + maps.Copy(map1, map2) + require.Equal(t, len(map1), ackSize) +} + +func TestExtensionAck_ProcessEvents_Concurrency(t *testing.T) { + partitionName := "partition-name" + conf := Config{ + MaxNumPartition: defaultMaxNumPartition, + MaxNumPendingAcksPerPartition: defaultMaxNumPendingAcksPerPartition, + } + ext := newInMemoryAckExtension(&conf) + + var wg sync.WaitGroup + wg.Add(3) + + map1 := map[uint64]struct{}{} + map2 := map[uint64]struct{}{} + map3 := map[uint64]struct{}{} + + // send events through different partitions + go func() { + for i := 0; i < 100; i++ { + // each partition has 3 events + map1[ext.ProcessEvent(fmt.Sprint(partitionName))] = struct{}{} + } + wg.Done() + }() + + go func() { + for i := 0; i < 100; i++ { + // each partition has 3 events + map2[ext.ProcessEvent(fmt.Sprint(partitionName))] = struct{}{} + } + wg.Done() + }() + + go func() { + for i := 0; i < 100; i++ { + // each partition has 3 events + map3[ext.ProcessEvent(fmt.Sprint(partitionName))] = struct{}{} + } + wg.Done() + }() + + wg.Wait() + + maps.Copy(map1, map2) + maps.Copy(map1, map3) + + require.Equal(t, len(map1), 300) +} + +func TestExtensionAck_ProcessEvents_EventsUnAcked(t *testing.T) { + conf := Config{ + MaxNumPartition: defaultMaxNumPartition, + MaxNumPendingAcksPerPartition: defaultMaxNumPendingAcksPerPartition, + } + ext := newInMemoryAckExtension(&conf) + + // send events through different partitions + for i := 0; i < 100; i++ { + // each partition has 3 events + for j := 0; j < 3; j++ { + ext.ProcessEvent(fmt.Sprintf("part-%d", i)) + } + } + + // non-acked events should be return false + for i := 0; i < 100; i++ { + result := ext.QueryAcks(fmt.Sprintf("part-%d", i), []uint64{0, 1, 2}) + require.Equal(t, len(result), 3) + require.Equal(t, result[0], false) + require.Equal(t, result[1], false) + require.Equal(t, result[2], false) + } +} + +func TestExtensionAck_ProcessEvents_EventsAcked(t *testing.T) { + conf := Config{ + MaxNumPartition: defaultMaxNumPartition, + MaxNumPendingAcksPerPartition: defaultMaxNumPendingAcksPerPartition, + } + ext := newInMemoryAckExtension(&conf) + + // send events through different partitions + for i := 0; i < 100; i++ { + // each partition has 3 events + for j := 0; j < 3; j++ { + ext.ProcessEvent(fmt.Sprintf("part-%d", i)) + } + } + + // ack the second event of all even partitions and first and third events of all odd partitions + for i := 0; i < 100; i++ { + if i%2 == 0 { + ext.Ack(fmt.Sprintf("part-%d", i), 2) + } else { + ext.Ack(fmt.Sprintf("part-%d", i), 1) + ext.Ack(fmt.Sprintf("part-%d", i), 3) + } + } + + // second event of even partitions should be acked, and first and third events of odd partitions should be acked + for i := 0; i < 100; i++ { + if i%2 == 0 { + result := ext.QueryAcks(fmt.Sprintf("part-%d", i), []uint64{1, 2, 3}) + require.Equal(t, len(result), 3) + require.Equal(t, result[1], false) + require.Equal(t, result[2], true) + require.Equal(t, result[3], false) + } else { + result := ext.QueryAcks(fmt.Sprintf("part-%d", i), []uint64{1, 2, 3}) + require.Equal(t, len(result), 3) + require.Equal(t, result[1], true) + require.Equal(t, result[2], false) + require.Equal(t, result[3], true) + } + } +} + +func TestExtensionAck_QueryAcks_Unidempotent(t *testing.T) { + conf := Config{ + MaxNumPartition: defaultMaxNumPartition, + MaxNumPendingAcksPerPartition: defaultMaxNumPendingAcksPerPartition, + } + ext := newInMemoryAckExtension(&conf) + + // send events through different partitions + for i := 0; i < 100; i++ { + // each partition has 3 events + for j := 0; j < 3; j++ { + ext.ProcessEvent(fmt.Sprintf("part-%d", i)) + } + } + + // ack the second event of all even partitions and first and third events of all odd partitions + for i := 0; i < 100; i++ { + if i%2 == 0 { + ext.Ack(fmt.Sprintf("part-%d", i), 2) + } else { + ext.Ack(fmt.Sprintf("part-%d", i), 1) + ext.Ack(fmt.Sprintf("part-%d", i), 3) + } + } + + // second event of even partitions should be acked, and first and third events of odd partitions should be acked + for i := 0; i < 100; i++ { + if i%2 == 0 { + result := ext.QueryAcks(fmt.Sprintf("part-%d", i), []uint64{1, 2, 3}) + require.Equal(t, len(result), 3) + require.Equal(t, result[1], false) + require.Equal(t, result[2], true) + require.Equal(t, result[3], false) + } else { + result := ext.QueryAcks(fmt.Sprintf("part-%d", i), []uint64{1, 2, 3}) + require.Equal(t, len(result), 3) + require.Equal(t, result[1], true) + require.Equal(t, result[2], false) + require.Equal(t, result[3], true) + } + } + + // querying the same acked events should result in false + for i := 0; i < 100; i++ { + result := ext.QueryAcks(fmt.Sprintf("part-%d", i), []uint64{1, 2, 3}) + require.Equal(t, len(result), 3) + require.Equal(t, result[1], false) + require.Equal(t, result[2], false) + require.Equal(t, result[3], false) + } +} + +func TestExtensionAckAsync(t *testing.T) { + conf := Config{ + MaxNumPartition: defaultMaxNumPartition, + MaxNumPendingAcksPerPartition: defaultMaxNumPendingAcksPerPartition, + } + ext := newInMemoryAckExtension(&conf) + + partitionCount := 100 + var wg sync.WaitGroup + wg.Add(partitionCount) + // send events through different partitions + for i := 0; i < partitionCount; i++ { + i := i + go func() { + // each partition has 3 events + for j := 0; j < 3; j++ { + ext.ProcessEvent(fmt.Sprintf("part-%d", i)) + } + wg.Done() + }() + } + + wg.Wait() + + // non-acked events should be return false + for i := 0; i < partitionCount; i++ { + result := ext.QueryAcks(fmt.Sprintf("part-%d", i), []uint64{1, 2, 3}) + require.Equal(t, len(result), 3) + require.Equal(t, result[1], false) + require.Equal(t, result[2], false) + require.Equal(t, result[3], false) + } + + wg.Add(partitionCount) + // ack the second event of all even partitions and first and third events of all odd partitions + for i := 0; i < partitionCount; i++ { + i := i + go func() { + if i%2 == 0 { + ext.Ack(fmt.Sprintf("part-%d", i), 2) + } else { + ext.Ack(fmt.Sprintf("part-%d", i), 1) + ext.Ack(fmt.Sprintf("part-%d", i), 3) + } + wg.Done() + }() + } + + wg.Wait() + // second event of even partitions should be acked, and first and third events of odd partitions should be acked + for i := 0; i < partitionCount; i++ { + if i%2 == 0 { + result := ext.QueryAcks(fmt.Sprintf("part-%d", i), []uint64{1, 2, 3}) + require.Equal(t, len(result), 3) + require.Equal(t, result[1], false) + require.Equal(t, result[2], true) + require.Equal(t, result[3], false) + } else { + result := ext.QueryAcks(fmt.Sprintf("part-%d", i), []uint64{1, 2, 3}) + require.Equal(t, len(result), 3) + require.Equal(t, result[1], true) + require.Equal(t, result[2], false) + require.Equal(t, result[3], true) + } + } + wg.Add(100) + resultChan := make(chan map[uint64]bool, partitionCount) + // querying the same acked events should result in false + for i := 0; i < partitionCount; i++ { + i := i + go func() { + resultChan <- ext.QueryAcks(fmt.Sprintf("part-%d", i), []uint64{1, 2, 3}) + wg.Done() + }() + } + wg.Wait() + + for i := 0; i < partitionCount; i++ { + result := <-resultChan + require.Equal(t, len(result), 3) + require.Equal(t, result[1], false) + require.Equal(t, result[2], false) + require.Equal(t, result[3], false) + } +} diff --git a/extension/ackextension/internal/metadata/generated_status.go b/extension/ackextension/internal/metadata/generated_status.go new file mode 100644 index 000000000000..2485390108f2 --- /dev/null +++ b/extension/ackextension/internal/metadata/generated_status.go @@ -0,0 +1,25 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("ack") +) + +const ( + ExtensionStability = component.StabilityLevelDevelopment +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/ack") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/ack") +} diff --git a/extension/ackextension/metadata.yaml b/extension/ackextension/metadata.yaml new file mode 100644 index 000000000000..35a56090e9dc --- /dev/null +++ b/extension/ackextension/metadata.yaml @@ -0,0 +1,14 @@ +type: ack +scope_name: otelcol/ack + +status: + class: extension + stability: + development: [extension] + distributions: [contrib] + codeowners: + active: [zpzhuSplunk, splunkericl] + +tests: + skip_lifecycle: true + skip_shutdown: true diff --git a/extension/ackextension/package_test.go b/extension/ackextension/package_test.go new file mode 100644 index 000000000000..97b324bc2f00 --- /dev/null +++ b/extension/ackextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ackextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/ackextension/testdata/config.yaml b/extension/ackextension/testdata/config.yaml new file mode 100644 index 000000000000..6e8aeff0ebfa --- /dev/null +++ b/extension/ackextension/testdata/config.yaml @@ -0,0 +1,10 @@ +ack: + +ack/withmemorystorage: + storage: + + +ack/withpersistentstorage: + storage: file_storage/otc + max_number_of_partition: 200000 + max_number_of_pending_acks_per_partition: 3000000 \ No newline at end of file diff --git a/extension/asapauthextension/README.md b/extension/asapauthextension/README.md index 8656c1ca98be..2496ce6549b4 100644 --- a/extension/asapauthextension/README.md +++ b/extension/asapauthextension/README.md @@ -3,13 +3,12 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [contrib], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fasapauth%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fasapauth) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fasapauth%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fasapauth) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jamesmoessis](https://www.github.com/jamesmoessis), [@MovieStoreGuy](https://www.github.com/MovieStoreGuy) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector This extension provides [Atlassian Service Authentication Protocol](https://s2sauth.bitbucket.io/) (ASAP) client diff --git a/extension/asapauthextension/factory_test.go b/extension/asapauthextension/factory_test.go index c60888038739..03af51dba516 100644 --- a/extension/asapauthextension/factory_test.go +++ b/extension/asapauthextension/factory_test.go @@ -76,7 +76,7 @@ func TestCreateExtension(t *testing.T) { if testcase.shouldError { assert.Error(t, err) } else { - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, ext) } }) diff --git a/extension/asapauthextension/go.mod b/extension/asapauthextension/go.mod index d79a7ec06bca..6a04894ca27b 100644 --- a/extension/asapauthextension/go.mod +++ b/extension/asapauthextension/go.mod @@ -1,47 +1,55 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension -go 1.20 +go 1.21 require ( - bitbucket.org/atlassian/go-asap/v2 v2.6.0 - github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/extension/auth v0.89.0 + bitbucket.org/atlassian/go-asap/v2 v2.8.0 + github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/extension/auth v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 go.uber.org/multierr v1.11.0 - google.golang.org/grpc v1.59.0 + google.golang.org/grpc v1.63.2 ) 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.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.4.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pquerna/cachecontrol v0.1.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/vincent-petithory/dataurl v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/asapauthextension/go.sum b/extension/asapauthextension/go.sum index 07545249166d..31612fdebd3d 100644 --- a/extension/asapauthextension/go.sum +++ b/extension/asapauthextension/go.sum @@ -1,80 +1,99 @@ -bitbucket.org/atlassian/go-asap/v2 v2.6.0 h1:KiLw3IgbzFLqNxCrVZoKUDJKMxUGoOd+NEOYXGEBhJ0= -bitbucket.org/atlassian/go-asap/v2 v2.6.0/go.mod h1:cuRgWb7eeGtsocKmqY2kPlMMlwpkeNh+QOIkjAMlUBc= -github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 h1:koK7z0nSsRiRiBWwa+E714Puh+DO+ZRdIyAXiXzL+lg= +bitbucket.org/atlassian/go-asap/v2 v2.8.0 h1:JL4jktrZT3H8GHkkeJ1RCdhJ5YcOyVccA/2TJ4ae3I0= +bitbucket.org/atlassian/go-asap/v2 v2.8.0/go.mod h1:cuRgWb7eeGtsocKmqY2kPlMMlwpkeNh+QOIkjAMlUBc= github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= +github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc h1:MhBvG7RLaLqlyjxMR6of35vt6MVQ+eXMcgn9X/sy0FE= +github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= +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/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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8cTqKc= github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/vincent-petithory/dataurl v1.0.0 h1:cXw+kPto8NLuJtlMsI152irrVw9fRDX8AbShPRpg2CI= github.com/vincent-petithory/dataurl v1.0.0/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -84,18 +103,19 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -108,16 +128,15 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/asapauthextension/internal/metadata/generated_status.go b/extension/asapauthextension/internal/metadata/generated_status.go index ae4abcd49b64..35b0278f952e 100644 --- a/extension/asapauthextension/internal/metadata/generated_status.go +++ b/extension/asapauthextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("asapclient") ) const ( - Type = "asapclient" ExtensionStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/asapauth") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/asapauth") +} diff --git a/extension/asapauthextension/metadata.yaml b/extension/asapauthextension/metadata.yaml index e513253ee2af..0aabe19a5dc4 100644 --- a/extension/asapauthextension/metadata.yaml +++ b/extension/asapauthextension/metadata.yaml @@ -1,9 +1,15 @@ type: asapclient +scope_name: otelcol/asapauth status: class: extension stability: beta: [extension] - distributions: [contrib, sumo] + distributions: [contrib] codeowners: active: [jamesmoessis, MovieStoreGuy] + +# TODO: Update the extension to make the tests pass +tests: + skip_lifecycle: true + skip_shutdown: true diff --git a/extension/awsmiddleware/config_test.go b/extension/awsmiddleware/config_test.go index fbdd773dbfbf..3b9040c8ec0b 100644 --- a/extension/awsmiddleware/config_test.go +++ b/extension/awsmiddleware/config_test.go @@ -14,7 +14,7 @@ import ( ) func TestGetConfigurer(t *testing.T) { - id := component.NewID("test") + id := component.NewID(component.DataTypeMetrics) nopExtension, err := extensiontest.NewNopBuilder().Create(context.Background(), extensiontest.NewNopCreateSettings()) require.Error(t, err) middlewareExtension := new(MockMiddlewareExtension) diff --git a/extension/awsmiddleware/go.mod b/extension/awsmiddleware/go.mod index 9e4f727112e9..ef5874ef1512 100644 --- a/extension/awsmiddleware/go.mod +++ b/extension/awsmiddleware/go.mod @@ -1,17 +1,19 @@ module github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware -go 1.20 +go 1.21 + +toolchain go1.22.2 require ( github.com/aws/aws-sdk-go v1.47.10 github.com/aws/aws-sdk-go-v2 v1.22.2 github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0 github.com/aws/smithy-go v1.16.0 - github.com/google/uuid v1.3.1 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.uber.org/zap v1.26.0 + github.com/google/uuid v1.6.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.uber.org/zap v1.27.0 ) require ( @@ -23,32 +25,41 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 // indirect + github.com/beorn7/perks v1.0.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/awsmiddleware/go.sum b/extension/awsmiddleware/go.sum index 660c7723d2bc..ca5f4fd7a00b 100644 --- a/extension/awsmiddleware/go.sum +++ b/extension/awsmiddleware/go.sum @@ -24,11 +24,20 @@ github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0/go.mod h1:rDGMZA7f4pbmTtPOk5v5UM github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.16.0 h1:gJZEH/Fqh+RsvlJ1Zt4tVAtV6bKkp3cC+R6FCZMNzik= github.com/aws/smithy-go v1.16.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +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/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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -37,10 +46,9 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu 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/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -51,52 +59,63 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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.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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -106,20 +125,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +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= @@ -128,18 +147,19 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/extension/awsmiddleware/helper_test.go b/extension/awsmiddleware/helper_test.go index bd5f5adc535a..aa799295c17f 100644 --- a/extension/awsmiddleware/helper_test.go +++ b/extension/awsmiddleware/helper_test.go @@ -17,7 +17,7 @@ import ( func TestTryConfigure(t *testing.T) { testCases := []SDKVersion{SDKv1(&request.Handlers{}), SDKv2(&aws.Config{})} for _, testCase := range testCases { - id := component.NewID("test") + id := component.NewID(component.DataTypeMetrics) host := new(MockExtensionsHost) host.On("GetExtensions").Return(nil).Once() core, observed := observer.New(zap.DebugLevel) diff --git a/extension/awsproxy/README.md b/extension/awsproxy/README.md index bb58c7803aaa..02ac527f9932 100644 --- a/extension/awsproxy/README.md +++ b/extension/awsproxy/README.md @@ -3,14 +3,12 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [contrib], [aws], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fawsproxy%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fawsproxy) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fawsproxy%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fawsproxy) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@mxiamxia](https://www.github.com/mxiamxia) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector @@ -35,6 +33,7 @@ extensions: role_arn: "" aws_endpoint: "" local_mode: false + service_name: "xray" ``` ### endpoint (Optional) @@ -42,6 +41,9 @@ The TCP address and port on which this proxy listens for requests. Default: `0.0.0.0:2000` +The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:2000. This will become the default in a future release. + + ### proxy_address (Optional) Defines the proxy address that this extension forwards HTTP requests to the AWS backend through. If left unconfigured, requests will be sent directly. This will generally be set to a NAT gateway when the collector is running on a network without public internet. @@ -63,3 +65,5 @@ The IAM role used by this proxy when communicating with the AWS service. If non- ### aws_endpoint (Optional) The AWS service endpoint which this proxy forwards requests to. If not set, will default to the AWS X-Ray endpoint. +### service_name (Optional) +The AWS service name which this proxy forwards requests to. If not set, will default to "xray" diff --git a/extension/awsproxy/config_test.go b/extension/awsproxy/config_test.go index 1a703ab5869d..a6171a652990 100644 --- a/extension/awsproxy/config_test.go +++ b/extension/awsproxy/config_test.go @@ -33,17 +33,18 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, "1"), expected: &Config{ ProxyConfig: proxy.Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "0.0.0.0:1234", }, ProxyAddress: "https://proxy.proxy.com", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, ServerName: "something", }, Region: "us-west-1", RoleARN: "arn:aws:iam::123456789012:role/awesome_role", AWSEndpoint: "https://another.aws.endpoint.com", + ServiceName: "es", }, }, }, diff --git a/extension/awsproxy/extension.go b/extension/awsproxy/extension.go index 7e703bc6cefc..8d8517fa51ba 100644 --- a/extension/awsproxy/extension.go +++ b/extension/awsproxy/extension.go @@ -16,38 +16,42 @@ import ( ) type xrayProxy struct { - logger *zap.Logger - config *Config - server proxy.Server + logger *zap.Logger + config *Config + server proxy.Server + settings component.TelemetrySettings } var _ extension.Extension = (*xrayProxy)(nil) -func (x xrayProxy) Start(_ context.Context, host component.Host) error { +func (x *xrayProxy) Start(_ context.Context, _ component.Host) error { + srv, err := proxy.NewServer(&x.config.ProxyConfig, x.settings.Logger) + + if err != nil { + return err + } + x.server = srv go func() { if err := x.server.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) && err != nil { - host.ReportFatalError(err) + x.settings.ReportStatus(component.NewFatalErrorEvent(err)) } }() x.logger.Info("X-Ray proxy server started on " + x.config.ProxyConfig.Endpoint) return nil } -func (x xrayProxy) Shutdown(ctx context.Context) error { - return x.server.Shutdown(ctx) -} - -func newXrayProxy(config *Config, logger *zap.Logger) (extension.Extension, error) { - srv, err := proxy.NewServer(&config.ProxyConfig, logger) - - if err != nil { - return nil, err +func (x *xrayProxy) Shutdown(ctx context.Context) error { + if x.server != nil { + return x.server.Shutdown(ctx) } + return nil +} +func newXrayProxy(config *Config, telemetrySettings component.TelemetrySettings) (extension.Extension, error) { p := &xrayProxy{ - config: config, - logger: logger, - server: srv, + config: config, + logger: telemetrySettings.Logger, + settings: telemetrySettings, } return p, nil diff --git a/extension/awsproxy/extension_test.go b/extension/awsproxy/extension_test.go index 68461317a447..c3bf31605395 100644 --- a/extension/awsproxy/extension_test.go +++ b/extension/awsproxy/extension_test.go @@ -4,25 +4,29 @@ package awsproxy import ( + "context" "testing" "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/confignet" - "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy" ) func TestInvalidEndpoint(t *testing.T) { - _, err := newXrayProxy( + x, err := newXrayProxy( &Config{ ProxyConfig: proxy.Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddrConfig: confignet.TCPAddrConfig{ Endpoint: "invalidEndpoint", }, }, }, - zap.NewNop(), + componenttest.NewNopTelemetrySettings(), ) + assert.NoError(t, err) + err = x.Start(context.Background(), componenttest.NewNopHost()) + defer assert.NoError(t, x.Shutdown(context.Background())) assert.Error(t, err) } diff --git a/extension/awsproxy/factory.go b/extension/awsproxy/factory.go index 0ce6b02ab76c..9c56133faceb 100644 --- a/extension/awsproxy/factory.go +++ b/extension/awsproxy/factory.go @@ -13,10 +13,11 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/internal/metadata" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/localhostgate" ) const ( - defaultEndpoint = "0.0.0.0:2000" + defaultPort = 2000 ) // NewFactory creates a factory for awsproxy extension. @@ -32,10 +33,10 @@ func NewFactory() extension.Factory { func createDefaultConfig() component.Config { return &Config{ ProxyConfig: proxy.Config{ - TCPAddr: confignet.TCPAddr{ - Endpoint: defaultEndpoint, + TCPAddrConfig: confignet.TCPAddrConfig{ + Endpoint: localhostgate.EndpointForPort(defaultPort), }, - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: false, }, }, @@ -43,5 +44,5 @@ func createDefaultConfig() component.Config { } func createExtension(_ context.Context, params extension.CreateSettings, cfg component.Config) (extension.Extension, error) { - return newXrayProxy(cfg.(*Config), params.Logger) + return newXrayProxy(cfg.(*Config), params.TelemetrySettings) } diff --git a/extension/awsproxy/factory_test.go b/extension/awsproxy/factory_test.go index 24918dc245fa..79b5e8de33f9 100644 --- a/extension/awsproxy/factory_test.go +++ b/extension/awsproxy/factory_test.go @@ -27,8 +27,8 @@ func TestFactory_CreateDefaultConfig(t *testing.T) { cfg := createDefaultConfig() assert.Equal(t, &Config{ ProxyConfig: proxy.Config{ - TCPAddr: confignet.TCPAddr{ - Endpoint: defaultEndpoint, + TCPAddrConfig: confignet.TCPAddrConfig{ + Endpoint: "0.0.0.0:2000", }, }, }, cfg) @@ -53,7 +53,7 @@ func TestFactory_CreateExtension(t *testing.T) { cfg := createDefaultConfig().(*Config) address := testutil.GetAvailableLocalAddress(t) cfg.ProxyConfig.AWSEndpoint = backend.URL - cfg.ProxyConfig.TCPAddr.Endpoint = address + cfg.ProxyConfig.TCPAddrConfig.Endpoint = address cfg.ProxyConfig.Region = "us-east-2" // Simplest way to get SDK to use fake credentials @@ -61,12 +61,15 @@ func TestFactory_CreateExtension(t *testing.T) { t.Setenv("AWS_SECRET_ACCESS_KEY", "fakeSecretAccessKey") ctx := context.Background() - ext, err := createExtension(ctx, extensiontest.NewNopCreateSettings(), cfg) + cs := extensiontest.NewNopCreateSettings() + cs.ReportStatus = func(event *component.StatusEvent) { + assert.NoError(t, event.Err()) + } + ext, err := createExtension(ctx, cs, cfg) assert.NoError(t, err) assert.NotNil(t, ext) - mh := newAssertNoErrorHost(t) - err = ext.Start(ctx, mh) + err = ext.Start(ctx, componenttest.NewNopHost()) assert.NoError(t, err) var resp *http.Response @@ -86,21 +89,3 @@ func TestFactory_CreateExtension(t *testing.T) { err = ext.Shutdown(ctx) assert.NoError(t, err) } - -// assertNoErrorHost implements a component.Host that asserts that there were no errors. -type assertNoErrorHost struct { - component.Host - *testing.T -} - -// newAssertNoErrorHost returns a new instance of assertNoErrorHost. -func newAssertNoErrorHost(t *testing.T) component.Host { - return &assertNoErrorHost{ - Host: componenttest.NewNopHost(), - T: t, - } -} - -func (aneh *assertNoErrorHost) ReportFatalError(err error) { - assert.NoError(aneh, err) -} diff --git a/extension/awsproxy/generated_component_test.go b/extension/awsproxy/generated_component_test.go new file mode 100644 index 000000000000..a8cd2782de76 --- /dev/null +++ b/extension/awsproxy/generated_component_test.go @@ -0,0 +1,30 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package awsproxy + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) +} diff --git a/extension/awsproxy/go.mod b/extension/awsproxy/go.mod index f58f440290b7..10d297cc0399 100644 --- a/extension/awsproxy/go.mod +++ b/extension/awsproxy/go.mod @@ -1,50 +1,62 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confignet v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confignet v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/zap v1.27.0 ) require ( github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-00010101000000-000000000000 // indirect - github.com/aws/aws-sdk-go v1.47.10 // indirect + github.com/aws/aws-sdk-go v1.51.17 // indirect + github.com/beorn7/perks v1.0.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/awsproxy/go.sum b/extension/awsproxy/go.sum index d3aa7e0df1dc..1827d86307a9 100644 --- a/extension/awsproxy/go.sum +++ b/extension/awsproxy/go.sum @@ -1,12 +1,21 @@ -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +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/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/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -14,6 +23,9 @@ 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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -26,54 +38,71 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -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/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -83,16 +112,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -105,17 +134,19 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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/extension/awsproxy/internal/metadata/generated_status.go b/extension/awsproxy/internal/metadata/generated_status.go index 8c305a556020..839a546933cf 100644 --- a/extension/awsproxy/internal/metadata/generated_status.go +++ b/extension/awsproxy/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("awsproxy") ) const ( - Type = "awsproxy" ExtensionStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/awsproxy") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/awsproxy") +} diff --git a/extension/awsproxy/metadata.yaml b/extension/awsproxy/metadata.yaml index a2987a86d0fa..591679a36385 100644 --- a/extension/awsproxy/metadata.yaml +++ b/extension/awsproxy/metadata.yaml @@ -1,9 +1,13 @@ type: awsproxy +scope_name: otelcol/awsproxy status: class: extension stability: beta: [extension] - distributions: [contrib, aws, sumo] + distributions: [contrib] codeowners: active: [Aneurysm9, mxiamxia] + +tests: + skip_lifecycle: true diff --git a/extension/awsproxy/testdata/config.yaml b/extension/awsproxy/testdata/config.yaml index 4c49c01f9f05..95a454c45979 100644 --- a/extension/awsproxy/testdata/config.yaml +++ b/extension/awsproxy/testdata/config.yaml @@ -8,3 +8,4 @@ awsproxy/1: region: "us-west-1" role_arn: "arn:aws:iam::123456789012:role/awesome_role" aws_endpoint: "https://another.aws.endpoint.com" + service_name: "es" diff --git a/extension/basicauthextension/README.md b/extension/basicauthextension/README.md index b53d78dc061f..08d6e99bbd46 100644 --- a/extension/basicauthextension/README.md +++ b/extension/basicauthextension/README.md @@ -3,17 +3,13 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [contrib], [grafana], [observiq], [redhat], [splunk], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fbasicauth%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fbasicauth) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fbasicauth%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fbasicauth) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling), [@svrakitin](https://www.github.com/svrakitin), [@frzifus](https://www.github.com/frzifus) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling), [@frzifus](https://www.github.com/frzifus) | +| Emeritus | [@svrakitin](https://www.github.com/svrakitin) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[grafana]: https://github.com/grafana/agent -[observiq]: https://github.com/observIQ/observiq-otel-collector -[redhat]: https://github.com/os-observability/redhat-opentelemetry-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector This extension implements both `configauth.ServerAuthenticator` and `configauth.ClientAuthenticator` to authenticate clients and servers using Basic Authentication. The authenticator type has to be set to `basicauth`. diff --git a/extension/basicauthextension/extension.go b/extension/basicauthextension/extension.go index b7f49b018568..08114aae258b 100644 --- a/extension/basicauthextension/extension.go +++ b/extension/basicauthextension/extension.go @@ -33,18 +33,14 @@ type basicAuth struct { matchFunc func(username, password string) bool } -func newClientAuthExtension(cfg *Config) (auth.Client, error) { - if cfg.ClientAuth == nil || cfg.ClientAuth.Username == "" { - return nil, errNoCredentialSource - } - +func newClientAuthExtension(cfg *Config) auth.Client { ba := basicAuth{ clientAuth: cfg.ClientAuth, } return auth.NewClient( auth.WithClientRoundTripper(ba.roundTripper), auth.WithClientPerRPCCredentials(ba.perRPCCredentials), - ), nil + ) } func newServerAuthExtension(cfg *Config) (auth.Server, error) { diff --git a/extension/basicauthextension/extension_test.go b/extension/basicauthextension/extension_test.go index a255c120d370..265689d0b6c6 100644 --- a/extension/basicauthextension/extension_test.go +++ b/extension/basicauthextension/extension_test.go @@ -228,14 +228,13 @@ func (m *mockRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) } func TestBasicAuth_ClientValid(t *testing.T) { - ext, err := newClientAuthExtension(&Config{ + ext := newClientAuthExtension(&Config{ ClientAuth: &ClientAuthSettings{ Username: "username", Password: "password", }, }) require.NotNil(t, ext) - require.NoError(t, err) require.NoError(t, ext.Start(context.Background(), componenttest.NewNopHost())) @@ -274,29 +273,20 @@ func TestBasicAuth_ClientValid(t *testing.T) { } func TestBasicAuth_ClientInvalid(t *testing.T) { - t.Run("no username", func(t *testing.T) { - _, err := newClientAuthExtension(&Config{ - ClientAuth: &ClientAuthSettings{ - Username: "", - }, - }) - assert.Error(t, err) - }) t.Run("invalid username format", func(t *testing.T) { - ext, err := newClientAuthExtension(&Config{ + ext := newClientAuthExtension(&Config{ ClientAuth: &ClientAuthSettings{ Username: "user:name", Password: "password", }, }) require.NotNil(t, ext) - require.NoError(t, err) require.NoError(t, ext.Start(context.Background(), componenttest.NewNopHost())) base := &mockRoundTripper{} - _, err = ext.RoundTripper(base) + _, err := ext.RoundTripper(base) assert.Error(t, err) _, err = ext.PerRPCCredentials() diff --git a/extension/basicauthextension/factory.go b/extension/basicauthextension/factory.go index 4a7442e7ec30..b58e6b1dda5f 100644 --- a/extension/basicauthextension/factory.go +++ b/extension/basicauthextension/factory.go @@ -31,5 +31,5 @@ func createExtension(_ context.Context, _ extension.CreateSettings, cfg componen if cfg.(*Config).Htpasswd != nil { return newServerAuthExtension(cfg.(*Config)) } - return newClientAuthExtension(cfg.(*Config)) + return newClientAuthExtension(cfg.(*Config)), nil } diff --git a/extension/basicauthextension/factory_test.go b/extension/basicauthextension/factory_test.go index 39c6bc824744..29511d05e31d 100644 --- a/extension/basicauthextension/factory_test.go +++ b/extension/basicauthextension/factory_test.go @@ -8,7 +8,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/extension/extensiontest" @@ -22,14 +21,6 @@ func TestCreateDefaultConfig(t *testing.T) { assert.NoError(t, componenttest.CheckConfigStruct(actual)) } -func TestCreateExtension_DefaultConfig(t *testing.T) { - cfg := createDefaultConfig() - - ext, err := createExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) - assert.Equal(t, err, errNoCredentialSource) - assert.Nil(t, ext) -} - func TestCreateExtension_ValidConfig(t *testing.T) { cfg := &Config{ Htpasswd: &HtpasswdSettings{ @@ -45,5 +36,5 @@ func TestCreateExtension_ValidConfig(t *testing.T) { func TestNewFactory(t *testing.T) { f := NewFactory() assert.NotNil(t, f) - assert.Equal(t, f.Type(), component.Type(metadata.Type)) + assert.Equal(t, f.Type(), metadata.Type) } diff --git a/extension/basicauthextension/generated_component_test.go b/extension/basicauthextension/generated_component_test.go new file mode 100644 index 000000000000..c507fb7186ee --- /dev/null +++ b/extension/basicauthextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package basicauthextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/basicauthextension/go.mod b/extension/basicauthextension/go.mod index 15b5d9deaa26..a4434fdb6fa6 100644 --- a/extension/basicauthextension/go.mod +++ b/extension/basicauthextension/go.mod @@ -1,46 +1,56 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - github.com/tg123/go-htpasswd v1.2.1 - go.opentelemetry.io/collector v0.89.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/extension/auth v0.89.0 - google.golang.org/grpc v1.59.0 + github.com/stretchr/testify v1.9.0 + github.com/tg123/go-htpasswd v1.2.2 + go.opentelemetry.io/collector v0.98.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/extension/auth v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + google.golang.org/grpc v1.63.2 ) require ( github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 // indirect + github.com/beorn7/perks v1.0.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/basicauthextension/go.sum b/extension/basicauthextension/go.sum index 109ec0ce1b2e..ae59f645bd0f 100644 --- a/extension/basicauthextension/go.sum +++ b/extension/basicauthextension/go.sum @@ -1,97 +1,121 @@ github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 h1:KeNholpO2xKjgaaSyd+DyQRrsQjhbSeS7qe4nEw8aQw= github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962/go.mod h1:kC29dT1vFpj7py2OvG1khBdQpo3kInWP+6QipLbdngo= +github.com/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/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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tg123/go-htpasswd v1.2.1 h1:i4wfsX1KvvkyoMiHZzjS0VzbAPWfxzI8INcZAKtutoU= -github.com/tg123/go-htpasswd v1.2.1/go.mod h1:erHp1B86KXdwQf1X5ZrLb7erXZnWueEQezb2dql4q58= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/tg123/go-htpasswd v1.2.2 h1:tmNccDsQ+wYsoRfiONzIhDm5OkVHQzN3w4FOBAlN6BY= +github.com/tg123/go-htpasswd v1.2.2/go.mod h1:FcIrK0J+6zptgVwK1JDlqyajW/1B4PtuJ/FLWl7nx8A= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -104,15 +128,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/basicauthextension/internal/metadata/generated_status.go b/extension/basicauthextension/internal/metadata/generated_status.go index 5b11a88fbacf..cbbc289b72ca 100644 --- a/extension/basicauthextension/internal/metadata/generated_status.go +++ b/extension/basicauthextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("basicauth") ) const ( - Type = "basicauth" ExtensionStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/basicauth") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/basicauth") +} diff --git a/extension/basicauthextension/metadata.yaml b/extension/basicauthextension/metadata.yaml index 4949c241e720..ffdcd2cf47b7 100644 --- a/extension/basicauthextension/metadata.yaml +++ b/extension/basicauthextension/metadata.yaml @@ -1,4 +1,5 @@ type: basicauth +scope_name: otelcol/basicauth status: class: extension @@ -6,10 +7,9 @@ status: beta: [extension] distributions: - contrib - - grafana - - observiq - - redhat - - splunk - - sumo codeowners: - active: [jpkrohling, svrakitin, frzifus] + active: [jpkrohling, frzifus] + emeritus: [svrakitin] + +tests: + config: diff --git a/extension/basicauthextension/package_test.go b/extension/basicauthextension/package_test.go new file mode 100644 index 000000000000..a36b3b9fe820 --- /dev/null +++ b/extension/basicauthextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package basicauthextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/bearertokenauthextension/README.md b/extension/bearertokenauthextension/README.md index 0454851fab9b..44683de5786a 100644 --- a/extension/bearertokenauthextension/README.md +++ b/extension/bearertokenauthextension/README.md @@ -3,17 +3,13 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [contrib], [grafana], [observiq], [redhat], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fbearertokenauth%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fbearertokenauth) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fbearertokenauth%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fbearertokenauth) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling), [@frzifus](https://www.github.com/frzifus) | | Emeritus | [@pavankrish123](https://www.github.com/pavankrish123) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[grafana]: https://github.com/grafana/agent -[observiq]: https://github.com/observIQ/observiq-otel-collector -[redhat]: https://github.com/os-observability/redhat-opentelemetry-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector diff --git a/extension/bearertokenauthextension/bearertokenauth.go b/extension/bearertokenauthextension/bearertokenauth.go index c4d420db2cc6..b41521925142 100644 --- a/extension/bearertokenauthextension/bearertokenauth.go +++ b/extension/bearertokenauthextension/bearertokenauth.go @@ -180,6 +180,9 @@ func (b *BearerTokenAuth) RoundTripper(base http.RoundTripper) (http.RoundTrippe // Authenticate checks whether the given context contains valid auth data. func (b *BearerTokenAuth) Authenticate(ctx context.Context, headers map[string][]string) (context.Context, error) { auth, ok := headers["authorization"] + if !ok { + auth, ok = headers["Authorization"] + } if !ok || len(auth) == 0 { return ctx, errors.New("authentication didn't succeed") } diff --git a/extension/bearertokenauthextension/bearertokenauth_test.go b/extension/bearertokenauthextension/bearertokenauth_test.go index d014afd08c7d..0a92de80d952 100644 --- a/extension/bearertokenauthextension/bearertokenauth_test.go +++ b/extension/bearertokenauthextension/bearertokenauth_test.go @@ -60,7 +60,7 @@ func TestBearerAuthenticatorHttp(t *testing.T) { resp, err := c.RoundTrip(request) assert.NoError(t, err) authHeaderValue := resp.Header.Get("Authorization") - assert.Equal(t, authHeaderValue, fmt.Sprintf("%s %s", scheme, cfg.BearerToken)) + assert.Equal(t, authHeaderValue, fmt.Sprintf("%s %s", scheme, string(cfg.BearerToken))) } @@ -79,7 +79,7 @@ func TestBearerAuthenticator(t *testing.T) { md, err := credential.GetRequestMetadata(context.Background()) expectedMd := map[string]string{ - "authorization": fmt.Sprintf("Bearer %s", cfg.BearerToken), + "authorization": fmt.Sprintf("Bearer %s", string(cfg.BearerToken)), } assert.Equal(t, md, expectedMd) assert.NoError(t, err) @@ -160,6 +160,7 @@ func TestBearerTokenFileContentUpdate(t *testing.T) { assert.Nil(t, bauth.Start(context.Background(), componenttest.NewNopHost())) assert.Error(t, bauth.Start(context.Background(), componenttest.NewNopHost())) + defer func() { assert.NoError(t, bauth.Shutdown(context.Background())) }() token, err := os.ReadFile(bauth.filename) assert.NoError(t, err) diff --git a/extension/bearertokenauthextension/generated_component_test.go b/extension/bearertokenauthextension/generated_component_test.go new file mode 100644 index 000000000000..e4c98d4bbfa0 --- /dev/null +++ b/extension/bearertokenauthextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package bearertokenauthextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/bearertokenauthextension/go.mod b/extension/bearertokenauthextension/go.mod index 4b75babe0337..1330c07d9cc3 100644 --- a/extension/bearertokenauthextension/go.mod +++ b/extension/bearertokenauthextension/go.mod @@ -1,43 +1,53 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension -go 1.20 +go 1.21 require ( github.com/fsnotify/fsnotify v1.7.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/extension/auth v0.89.0 - go.uber.org/zap v1.26.0 - google.golang.org/grpc v1.59.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/extension/auth v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + google.golang.org/grpc v1.63.2 ) 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.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/bearertokenauthextension/go.sum b/extension/bearertokenauthextension/go.sum index 7d7881a47798..9c2617c4650a 100644 --- a/extension/bearertokenauthextension/go.sum +++ b/extension/bearertokenauthextension/go.sum @@ -1,68 +1,88 @@ +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/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/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -72,16 +92,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -94,15 +114,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/bearertokenauthextension/internal/metadata/generated_status.go b/extension/bearertokenauthextension/internal/metadata/generated_status.go index 0017ef5c73f8..82f27d3b29f7 100644 --- a/extension/bearertokenauthextension/internal/metadata/generated_status.go +++ b/extension/bearertokenauthextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("bearertokenauth") ) const ( - Type = "bearertokenauth" ExtensionStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/bearertokenauth") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/bearertokenauth") +} diff --git a/extension/bearertokenauthextension/metadata.yaml b/extension/bearertokenauthextension/metadata.yaml index 1d21f125da00..f32f31ad1a0e 100644 --- a/extension/bearertokenauthextension/metadata.yaml +++ b/extension/bearertokenauthextension/metadata.yaml @@ -1,4 +1,5 @@ type: bearertokenauth +scope_name: otelcol/bearertokenauth status: class: extension @@ -6,10 +7,9 @@ status: beta: [extension] distributions: - contrib - - grafana - - observiq - - redhat - - sumo codeowners: active: [jpkrohling, frzifus] emeritus: [pavankrish123] + +tests: + config: diff --git a/extension/bearertokenauthextension/package_test.go b/extension/bearertokenauthextension/package_test.go new file mode 100644 index 000000000000..ead9722da4a3 --- /dev/null +++ b/extension/bearertokenauthextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package bearertokenauthextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/encoding/README.md b/extension/encoding/README.md index e588856b780e..624e4b044994 100644 --- a/extension/encoding/README.md +++ b/extension/encoding/README.md @@ -13,7 +13,7 @@ worked towards. ### Development -- Add endcoding extensions support additionally to the existing ways of configuring encodings (where applicable) +- Add encoding extensions support additionally to the existing ways of configuring encodings (where applicable) to the following components: - `file receiver` - `file exporter` @@ -31,8 +31,8 @@ worked towards. ```yaml extensions: zipkin_encoding: - format: proto - version: v1 + protocol: zipkin_proto + version: v2 receivers: kafka: diff --git a/extension/encoding/avrologencodingextension/Makefile b/extension/encoding/avrologencodingextension/Makefile new file mode 100644 index 000000000000..bdd863a203be --- /dev/null +++ b/extension/encoding/avrologencodingextension/Makefile @@ -0,0 +1 @@ +include ../../../Makefile.Common diff --git a/extension/encoding/avrologencodingextension/README.md b/extension/encoding/avrologencodingextension/README.md new file mode 100644 index 000000000000..9f600132bf18 --- /dev/null +++ b/extension/encoding/avrologencodingextension/README.md @@ -0,0 +1,14 @@ +# AVRO Log encoding extension + + +| Status | | +| ------------- |-----------| +| Stability | [development] | +| Distributions | [] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Favrologencoding%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Favrologencoding) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Favrologencoding%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Favrologencoding) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@thmshmm](https://www.github.com/thmshmm) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development + + +The `avrolog` encoding extension is used to unmarshal AVRO and insert it into the body of a log record. Marshalling is not supported. diff --git a/extension/encoding/avrologencodingextension/avro.go b/extension/encoding/avrologencodingextension/avro.go new file mode 100644 index 000000000000..bc4bf9d77dd2 --- /dev/null +++ b/extension/encoding/avrologencodingextension/avro.go @@ -0,0 +1,38 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package avrologencodingextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/avrologencodingextension" + +import ( + "fmt" + + "github.com/linkedin/goavro/v2" +) + +type avroDeserializer interface { + Deserialize([]byte) (map[string]any, error) +} + +type avroStaticSchemaDeserializer struct { + codec *goavro.Codec +} + +func newAVROStaticSchemaDeserializer(schema string) (avroDeserializer, error) { + codec, err := goavro.NewCodec(schema) + if err != nil { + return nil, fmt.Errorf("failed to create avro codec: %w", err) + } + + return &avroStaticSchemaDeserializer{ + codec: codec, + }, nil +} + +func (d *avroStaticSchemaDeserializer) Deserialize(data []byte) (map[string]any, error) { + native, _, err := d.codec.NativeFromBinary(data) + if err != nil { + return nil, fmt.Errorf("failed to deserialize avro record: %w", err) + } + + return native.(map[string]any), nil +} diff --git a/extension/encoding/avrologencodingextension/avro_test.go b/extension/encoding/avrologencodingextension/avro_test.go new file mode 100644 index 000000000000..aa947845c828 --- /dev/null +++ b/extension/encoding/avrologencodingextension/avro_test.go @@ -0,0 +1,42 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package avrologencodingextension + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func TestNewAvroLogsUnmarshaler(t *testing.T) { + schema, data := createAVROTestData(t) + + deserializer, err := newAVROStaticSchemaDeserializer(schema) + if err != nil { + t.Errorf("Did not expect an error, got %q", err.Error()) + } + + logMap, err := deserializer.Deserialize(data) + if err != nil { + t.Fatalf("Did not expect an error, got %q", err.Error()) + } + + assert.Equal(t, int64(1697187201488000000), logMap["timestamp"].(time.Time).UnixNano()) + assert.Equal(t, "host1", logMap["hostname"]) + assert.Equal(t, int64(12), logMap["nestedRecord"].(map[string]any)["field1"]) + + props := logMap["properties"].([]any) + propsStr := make([]string, len(props)) + for i, prop := range props { + propsStr[i] = prop.(string) + } + + assert.Equal(t, []string{"prop1", "prop2"}, propsStr) +} + +func TestNewAvroLogsUnmarshalerInvalidSchema(t *testing.T) { + _, err := newAVROStaticSchemaDeserializer("invalid schema") + assert.Error(t, err) +} diff --git a/extension/encoding/avrologencodingextension/config.go b/extension/encoding/avrologencodingextension/config.go new file mode 100644 index 000000000000..88b9c3ea3972 --- /dev/null +++ b/extension/encoding/avrologencodingextension/config.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package avrologencodingextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/avrologencodingextension" + +import "errors" + +var errNoSchema = errors.New("no schema provided") + +type Config struct { + Schema string `mapstructure:"schema"` +} + +func (c *Config) Validate() error { + if c.Schema == "" { + return errNoSchema + } + + return nil +} diff --git a/extension/encoding/avrologencodingextension/config_test.go b/extension/encoding/avrologencodingextension/config_test.go new file mode 100644 index 000000000000..e40d748b1878 --- /dev/null +++ b/extension/encoding/avrologencodingextension/config_test.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package avrologencodingextension + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestConfigValidate(t *testing.T) { + cfg := &Config{} + err := cfg.Validate() + assert.ErrorIs(t, err, errNoSchema) + + cfg.Schema = "schema1" + err = cfg.Validate() + assert.NoError(t, err) +} diff --git a/extension/encoding/avrologencodingextension/doc.go b/extension/encoding/avrologencodingextension/doc.go new file mode 100644 index 000000000000..da19aa0cfa70 --- /dev/null +++ b/extension/encoding/avrologencodingextension/doc.go @@ -0,0 +1,5 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml +package avrologencodingextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/avrologencodingextension" diff --git a/extension/encoding/avrologencodingextension/extension.go b/extension/encoding/avrologencodingextension/extension.go new file mode 100644 index 000000000000..522421823cec --- /dev/null +++ b/extension/encoding/avrologencodingextension/extension.go @@ -0,0 +1,89 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package avrologencodingextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/avrologencodingextension" + +import ( + "context" + "fmt" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding" +) + +var ( + _ encoding.LogsUnmarshalerExtension = (*avroLogExtension)(nil) +) + +type avroLogExtension struct { + deserializer avroDeserializer +} + +func newExtension(config *Config) (*avroLogExtension, error) { + deserializer, err := newAVROStaticSchemaDeserializer(config.Schema) + if err != nil { + return nil, err + } + + return &avroLogExtension{deserializer: deserializer}, nil +} + +func (e *avroLogExtension) UnmarshalLogs(buf []byte) (plog.Logs, error) { + p := plog.NewLogs() + + avroLog, err := e.deserializer.Deserialize(buf) + if err != nil { + return p, fmt.Errorf("failed to deserialize avro log: %w", err) + } + + logRecords := p.ResourceLogs().AppendEmpty().ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + logRecords.SetObservedTimestamp(pcommon.NewTimestampFromTime(time.Now())) + + // removes time.Time values as FromRaw does not support it + replaceLogicalTypes(avroLog) + + // Set the unmarshaled avro as the body of the log record + if err := logRecords.Body().SetEmptyMap().FromRaw(avroLog); err != nil { + return p, err + } + + return p, nil +} + +func replaceLogicalTypes(m map[string]any) { + for k, v := range m { + m[k] = transformValue(v) + } +} + +func transformValue(value any) any { + if timeValue, ok := value.(time.Time); ok { + return timeValue.UnixNano() + } + + if mapValue, ok := value.(map[string]any); ok { + replaceLogicalTypes(mapValue) + return mapValue + } + + if arrayValue, ok := value.([]any); ok { + for i, v := range arrayValue { + arrayValue[i] = transformValue(v) + } + return arrayValue + } + + return value +} + +func (e *avroLogExtension) Start(_ context.Context, _ component.Host) error { + return nil +} + +func (e *avroLogExtension) Shutdown(_ context.Context) error { + return nil +} diff --git a/extension/encoding/avrologencodingextension/extension_test.go b/extension/encoding/avrologencodingextension/extension_test.go new file mode 100644 index 000000000000..c8b44021dc47 --- /dev/null +++ b/extension/encoding/avrologencodingextension/extension_test.go @@ -0,0 +1,53 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package avrologencodingextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" +) + +func TestExtension_Start_Shutdown(t *testing.T) { + avroExtention := &avroLogExtension{} + + err := avroExtention.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) + + err = avroExtention.Shutdown(context.Background()) + require.NoError(t, err) +} + +func TestUnmarshal(t *testing.T) { + t.Parallel() + + schema, data := createAVROTestData(t) + + e, err := newExtension(&Config{Schema: schema}) + assert.NoError(t, err) + + logs, err := e.UnmarshalLogs(data) + logRecord := logs.ResourceLogs().At(0).ScopeLogs().At(0).LogRecords().At(0) + + assert.NoError(t, err) + assert.Equal(t, "{\"count\":5,\"hostname\":\"host1\",\"level\":\"warn\",\"levelEnum\":\"INFO\",\"mapField\":{},\"message\":\"log message\",\"nestedRecord\":{\"field1\":12,\"field2\":\"val2\"},\"properties\":[\"prop1\",\"prop2\"],\"severity\":1,\"timestamp\":1697187201488000000}", logRecord.Body().AsString()) +} + +func TestInvalidUnmarshal(t *testing.T) { + t.Parallel() + + schema, err := loadAVROSchemaFromFile("testdata/schema1.avro") + if err != nil { + t.Fatalf("Failed to read avro schema file: %q", err.Error()) + } + + e, err := newExtension(&Config{Schema: string(schema)}) + assert.NoError(t, err) + + _, err = e.UnmarshalLogs([]byte("NOT A AVRO")) + assert.Error(t, err) +} diff --git a/extension/encoding/avrologencodingextension/factory.go b/extension/encoding/avrologencodingextension/factory.go new file mode 100644 index 000000000000..898a2a884796 --- /dev/null +++ b/extension/encoding/avrologencodingextension/factory.go @@ -0,0 +1,30 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package avrologencodingextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/avrologencodingextension" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/avrologencodingextension/internal/metadata" +) + +func NewFactory() extension.Factory { + return extension.NewFactory( + metadata.Type, + createDefaultConfig, + createExtension, + metadata.ExtensionStability, + ) +} + +func createExtension(_ context.Context, _ extension.CreateSettings, config component.Config) (extension.Extension, error) { + return newExtension(config.(*Config)) +} + +func createDefaultConfig() component.Config { + return &Config{Schema: ""} +} diff --git a/extension/encoding/avrologencodingextension/generated_component_test.go b/extension/encoding/avrologencodingextension/generated_component_test.go new file mode 100644 index 000000000000..4f44380062bd --- /dev/null +++ b/extension/encoding/avrologencodingextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package avrologencodingextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/encoding/avrologencodingextension/go.mod b/extension/encoding/avrologencodingextension/go.mod new file mode 100644 index 000000000000..85c2c03b997d --- /dev/null +++ b/extension/encoding/avrologencodingextension/go.mod @@ -0,0 +1,58 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/avrologencodingextension + +go 1.21 + +require ( + github.com/linkedin/goavro/v2 v2.9.8 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.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/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/snappy v0.0.1 // indirect + github.com/google/uuid v1.6.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.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding => ../ diff --git a/extension/encoding/avrologencodingextension/go.sum b/extension/encoding/avrologencodingextension/go.sum new file mode 100644 index 000000000000..f0e600b2645e --- /dev/null +++ b/extension/encoding/avrologencodingextension/go.sum @@ -0,0 +1,144 @@ +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/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= +github.com/golang/snappy v0.0.1/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/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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/linkedin/goavro/v2 v2.9.8 h1:jN50elxBsGBDGVDEKqUlDuU1cFwJ11K/yrJCBMe/7Wg= +github.com/linkedin/goavro/v2 v2.9.8/go.mod h1:UgQUb2N/pmueQYH9bfqFioWxzYCZXSfF8Jw03O5sjqA= +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/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/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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/extension/encoding/avrologencodingextension/internal/metadata/generated_status.go b/extension/encoding/avrologencodingextension/internal/metadata/generated_status.go new file mode 100644 index 000000000000..5e245b936ec8 --- /dev/null +++ b/extension/encoding/avrologencodingextension/internal/metadata/generated_status.go @@ -0,0 +1,25 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("avro_log_encoding") +) + +const ( + ExtensionStability = component.StabilityLevelDevelopment +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/avrologencoding") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/avrologencoding") +} diff --git a/extension/encoding/avrologencodingextension/metadata.yaml b/extension/encoding/avrologencodingextension/metadata.yaml new file mode 100644 index 000000000000..4ddfa9f57b3e --- /dev/null +++ b/extension/encoding/avrologencodingextension/metadata.yaml @@ -0,0 +1,22 @@ +type: avro_log_encoding +scope_name: otelcol/avrologencoding + +status: + class: extension + stability: + development: [extension] + distributions: [] + codeowners: + active: [thmshmm] + +tests: + config: + schema: | + { + "type" : "record", + "namespace" : "com.example", + "name" : "LogMsg", + "fields" : [ + { "name" : "message" , "type" : "string" } + ] + } diff --git a/extension/encoding/avrologencodingextension/package_test.go b/extension/encoding/avrologencodingextension/package_test.go new file mode 100644 index 000000000000..e1c7356c0cf7 --- /dev/null +++ b/extension/encoding/avrologencodingextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package avrologencodingextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/encoding/avrologencodingextension/testdata/schema1.avro b/extension/encoding/avrologencodingextension/testdata/schema1.avro new file mode 100644 index 000000000000..2cd410935ea6 --- /dev/null +++ b/extension/encoding/avrologencodingextension/testdata/schema1.avro @@ -0,0 +1,53 @@ +{ + "type" : "record", + "namespace" : "com.example", + "name" : "LogMsg", + "fields" : [ + { + "name": "timestamp", + "type": "long", + "logicalType": "timestamp-millis" + }, + { "name" : "message" , "type" : "string" }, + { "name" : "hostname" , "type" : "string" }, + { "name" : "count" , "type" : "int" }, + { + "name": "levelEnum", + "type": { + "type": "enum", + "namespace": "com.example", + "name": "Level", + "symbols": [ + "DEBUG", + "INFO", + "ERROR" + ] + }, + "default": "INFO" + }, + { "name" : "severity" , "type" : "int", "default": 0 }, + { "name" : "level" , "type" : "string", "default": "warn" }, + { + "name": "properties", + "type": { "type": "array", "items": "string" }, + "default": [] + }, + { + "name": "nestedRecord", + "type": { + "type": "record", + "name": "NestedRecord", + "fields": [ + { "name": "field1", "type": "long", "default": 0 }, + { "name": "field2", "type": "string", "default": "val2" } + ] + }, + "default": {} + }, + { + "name": "mapField", + "type": { "type": "map", "values": "string" }, + "default": {} + } + ] +} \ No newline at end of file diff --git a/extension/encoding/avrologencodingextension/testutil.go b/extension/encoding/avrologencodingextension/testutil.go new file mode 100644 index 000000000000..d2a1944a24b4 --- /dev/null +++ b/extension/encoding/avrologencodingextension/testutil.go @@ -0,0 +1,66 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package avrologencodingextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/avrologencodingextension" + +import ( + "fmt" + "os" + "path/filepath" + "testing" + + "github.com/linkedin/goavro/v2" +) + +func encodeAVROLogTestData(codec *goavro.Codec, data string) []byte { + textual := []byte(data) + native, _, err := codec.NativeFromTextual(textual) + if err != nil { + fmt.Println(err) + } + + binary, err := codec.BinaryFromNative(nil, native) + if err != nil { + fmt.Println(err) + } + + return binary +} + +func loadAVROSchemaFromFile(path string) ([]byte, error) { + cleanedPath := filepath.Clean(path) + schema, err := os.ReadFile(cleanedPath) + if err != nil { + return []byte{}, fmt.Errorf("failed to read schema from file: %w", err) + } + + return schema, nil +} + +func createAVROTestData(t *testing.T) (string, []byte) { + t.Helper() + + schema, err := loadAVROSchemaFromFile("testdata/schema1.avro") + if err != nil { + t.Fatalf("Failed to read avro schema file: %q", err.Error()) + } + + codec, err := goavro.NewCodec(string(schema)) + if err != nil { + t.Fatalf("Failed to create avro code from schema: %q", err.Error()) + } + + data := encodeAVROLogTestData(codec, `{ + "timestamp": 1697187201488, + "hostname": "host1", + "message": "log message", + "count": 5, + "nestedRecord": { + "field1": 12 + }, + "properties": ["prop1", "prop2"], + "severity": 1 + }`) + + return string(schema), data +} diff --git a/extension/encoding/go.mod b/extension/encoding/go.mod index c6c117de095d..61557a5b655d 100644 --- a/extension/encoding/go.mod +++ b/extension/encoding/go.mod @@ -1,38 +1,38 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding -go 1.20 +go 1.21 require ( - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 ) require ( + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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 - go.opentelemetry.io/collector/component v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + go.opentelemetry.io/collector/component v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect ) diff --git a/extension/encoding/go.sum b/extension/encoding/go.sum index 25abf14c40f0..2c48c24d4df0 100644 --- a/extension/encoding/go.sum +++ b/extension/encoding/go.sum @@ -1,8 +1,17 @@ +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/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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -10,9 +19,8 @@ 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/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/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/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/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -21,12 +29,10 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -34,36 +40,51 @@ 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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -73,16 +94,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -95,12 +116,13 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/extension/encoding/jaegerencodingextension/config.go b/extension/encoding/jaegerencodingextension/config.go index 4647b10ab371..4a44b62b5958 100644 --- a/extension/encoding/jaegerencodingextension/config.go +++ b/extension/encoding/jaegerencodingextension/config.go @@ -10,6 +10,7 @@ type JaegerProtocol string const ( JaegerProtocolProtobuf JaegerProtocol = "protobuf" + JaegerProtocolJSON JaegerProtocol = "json" ) type Config struct { @@ -19,6 +20,7 @@ type Config struct { func (c *Config) Validate() error { switch c.Protocol { case JaegerProtocolProtobuf: + case JaegerProtocolJSON: default: return fmt.Errorf("invalid protocol %q", c.Protocol) } diff --git a/extension/encoding/jaegerencodingextension/extension.go b/extension/encoding/jaegerencodingextension/extension.go index cb36cfcd8f6e..a035a589b970 100644 --- a/extension/encoding/jaegerencodingextension/extension.go +++ b/extension/encoding/jaegerencodingextension/extension.go @@ -14,6 +14,7 @@ import ( ) var _ encoding.TracesUnmarshalerExtension = &jaegerExtension{} +var _ ptrace.Unmarshaler = &jaegerExtension{} type jaegerExtension struct { config *Config @@ -28,6 +29,8 @@ func (e *jaegerExtension) Start(_ context.Context, _ component.Host) error { switch e.config.Protocol { case JaegerProtocolProtobuf: e.unmarshaler = jaegerProtobufTrace{} + case JaegerProtocolJSON: + e.unmarshaler = jaegerJSONTrace{} default: return fmt.Errorf("unsupported protocol: %q", e.config.Protocol) } diff --git a/extension/encoding/jaegerencodingextension/extension_test.go b/extension/encoding/jaegerencodingextension/extension_test.go index c99859e06814..735f8d79c63c 100644 --- a/extension/encoding/jaegerencodingextension/extension_test.go +++ b/extension/encoding/jaegerencodingextension/extension_test.go @@ -9,12 +9,48 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/extension" + "go.opentelemetry.io/collector/extension/extensiontest" ) func TestExtension_Start(t *testing.T) { - j := &jaegerExtension{ - config: createDefaultConfig().(*Config), + tests := []struct { + name string + getExtension func() (extension.Extension, error) + expectedErr string + }{ + { + name: "jaegerProtobuf", + getExtension: func() (extension.Extension, error) { + factory := NewFactory() + return factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), factory.CreateDefaultConfig()) + }, + }, + { + name: "jaeger_invalid", + getExtension: func() (extension.Extension, error) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + cfg.(*Config).Protocol = "xyz" + return factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + }, + expectedErr: "unsupported protocol: \"xyz\"", + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + ext, err := test.getExtension() + if test.expectedErr != "" && err != nil { + require.ErrorContains(t, err, test.expectedErr) + } else { + require.NoError(t, err) + } + err = ext.Start(context.Background(), componenttest.NewNopHost()) + if test.expectedErr != "" && err != nil { + require.ErrorContains(t, err, test.expectedErr) + } else { + require.NoError(t, err) + } + }) } - err := j.Start(context.Background(), componenttest.NewNopHost()) - require.NoError(t, err) } diff --git a/extension/encoding/jaegerencodingextension/generated_component_test.go b/extension/encoding/jaegerencodingextension/generated_component_test.go new file mode 100644 index 000000000000..25002d065f4f --- /dev/null +++ b/extension/encoding/jaegerencodingextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package jaegerencodingextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/encoding/jaegerencodingextension/go.mod b/extension/encoding/jaegerencodingextension/go.mod index e469bbe947d1..7b1f29ba9cc9 100644 --- a/extension/encoding/jaegerencodingextension/go.mod +++ b/extension/encoding/jaegerencodingextension/go.mod @@ -1,49 +1,60 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jaegerencodingextension -go 1.20 +go 1.21 require ( - github.com/jaegertracing/jaeger v1.49.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/gogo/protobuf v1.3.2 + github.com/jaegertracing/jaeger v1.55.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 ) require ( github.com/apache/thrift v0.19.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/gogo/protobuf v1.3.2 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/encoding/jaegerencodingextension/go.sum b/extension/encoding/jaegerencodingextension/go.sum index cf8070b5ef66..b4306beaac82 100644 --- a/extension/encoding/jaegerencodingextension/go.sum +++ b/extension/encoding/jaegerencodingextension/go.sum @@ -1,10 +1,20 @@ github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= +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.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -12,11 +22,12 @@ 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/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/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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/jaegertracing/jaeger v1.49.0 h1:3XI8ZOK6oncyoAxCiKakC9sRaeDTdDwmxmaSN+KQBo8= -github.com/jaegertracing/jaeger v1.49.0/go.mod h1:gU5wCSJSwk5MJHO/uWEBYKklT80oqEc2ixj3ssbwloQ= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= 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= @@ -25,14 +36,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -40,40 +51,55 @@ 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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= +github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +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/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -83,16 +109,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -105,15 +131,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/encoding/jaegerencodingextension/internal/metadata/generated_status.go b/extension/encoding/jaegerencodingextension/internal/metadata/generated_status.go index f04bd76b80c4..e042a149fe8a 100644 --- a/extension/encoding/jaegerencodingextension/internal/metadata/generated_status.go +++ b/extension/encoding/jaegerencodingextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("jaeger_encoding") ) const ( - Type = "jaeger_encoding" ExtensionStability = component.StabilityLevelDevelopment ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/jaegerencoding") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/jaegerencoding") +} diff --git a/extension/encoding/jaegerencodingextension/jaeger.go b/extension/encoding/jaegerencodingextension/jaeger.go index d48e9dbb3253..c3321882a9ff 100644 --- a/extension/encoding/jaegerencodingextension/jaeger.go +++ b/extension/encoding/jaegerencodingextension/jaeger.go @@ -4,6 +4,9 @@ package jaegerencodingextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jaegerencodingextension" import ( + "bytes" + + "github.com/gogo/protobuf/jsonpb" jaegerproto "github.com/jaegertracing/jaeger/model" "go.opentelemetry.io/collector/pdata/ptrace" @@ -19,6 +22,22 @@ func (j jaegerProtobufTrace) UnmarshalTraces(buf []byte) (ptrace.Traces, error) if err != nil { return ptrace.NewTraces(), err } + return jaegerSpanToTraces(span) +} + +type jaegerJSONTrace struct { +} + +func (j jaegerJSONTrace) UnmarshalTraces(buf []byte) (ptrace.Traces, error) { + span := &jaegerproto.Span{} + err := jsonpb.Unmarshal(bytes.NewReader(buf), span) + if err != nil { + return ptrace.NewTraces(), err + } + return jaegerSpanToTraces(span) +} + +func jaegerSpanToTraces(span *jaegerproto.Span) (ptrace.Traces, error) { batch := jaegerproto.Batch{ Spans: []*jaegerproto.Span{span}, Process: span.Process, diff --git a/extension/encoding/jaegerencodingextension/jaeger_test.go b/extension/encoding/jaegerencodingextension/jaeger_test.go new file mode 100644 index 000000000000..674b0c0ba82f --- /dev/null +++ b/extension/encoding/jaegerencodingextension/jaeger_test.go @@ -0,0 +1,60 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package jaegerencodingextension + +import ( + "bytes" + "testing" + + "github.com/gogo/protobuf/jsonpb" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/ptrace" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger" +) + +func TestUnmarshalJaeger(t *testing.T) { + td := ptrace.NewTraces() + span := td.ResourceSpans().AppendEmpty().ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.SetName("foo") + span.SetStartTimestamp(pcommon.Timestamp(10)) + span.SetEndTimestamp(pcommon.Timestamp(20)) + span.SetTraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}) + span.SetSpanID([8]byte{1, 2, 3, 4, 5, 6, 7, 8}) + batches, err := jaeger.ProtoFromTraces(td) + require.NoError(t, err) + + protoBytes, err := batches[0].Spans[0].Marshal() + require.NoError(t, err) + + jsonMarshaler := &jsonpb.Marshaler{} + jsonBytes := new(bytes.Buffer) + require.NoError(t, jsonMarshaler.Marshal(jsonBytes, batches[0].Spans[0])) + + tests := []struct { + unmarshaler ptrace.Unmarshaler + encoding string + bytes []byte + }{ + { + unmarshaler: jaegerProtobufTrace{}, + encoding: "jaeger_proto", + bytes: protoBytes, + }, + { + unmarshaler: jaegerJSONTrace{}, + encoding: "jaeger_json", + bytes: jsonBytes.Bytes(), + }, + } + for _, test := range tests { + t.Run(test.encoding, func(t *testing.T) { + got, err := test.unmarshaler.UnmarshalTraces(test.bytes) + require.NoError(t, err) + assert.Equal(t, td, got) + }) + } +} diff --git a/extension/encoding/jaegerencodingextension/metadata.yaml b/extension/encoding/jaegerencodingextension/metadata.yaml index 7f1bd86a55aa..7f03b8ab948d 100644 --- a/extension/encoding/jaegerencodingextension/metadata.yaml +++ b/extension/encoding/jaegerencodingextension/metadata.yaml @@ -1,4 +1,5 @@ type: jaeger_encoding +scope_name: otelcol/jaegerencoding status: class: extension @@ -6,4 +7,7 @@ status: development: [extension] distributions: [] codeowners: - active: [MovieStoreGuy, atoulme] \ No newline at end of file + active: [MovieStoreGuy, atoulme] + +tests: + config: diff --git a/extension/encoding/jaegerencodingextension/package_test.go b/extension/encoding/jaegerencodingextension/package_test.go new file mode 100644 index 000000000000..46d492d1ec17 --- /dev/null +++ b/extension/encoding/jaegerencodingextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package jaegerencodingextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/encoding/jsonlogencodingextension/doc.go b/extension/encoding/jsonlogencodingextension/doc.go new file mode 100644 index 000000000000..476aad42b918 --- /dev/null +++ b/extension/encoding/jsonlogencodingextension/doc.go @@ -0,0 +1,5 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml +package jsonlogencodingextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jsonlogencodingextension" diff --git a/extension/encoding/jsonlogencodingextension/generated_component_test.go b/extension/encoding/jsonlogencodingextension/generated_component_test.go new file mode 100644 index 000000000000..06031169f8a6 --- /dev/null +++ b/extension/encoding/jsonlogencodingextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package jsonlogencodingextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/encoding/jsonlogencodingextension/go.mod b/extension/encoding/jsonlogencodingextension/go.mod index 01803cecc574..74499fae2a0f 100644 --- a/extension/encoding/jsonlogencodingextension/go.mod +++ b/extension/encoding/jsonlogencodingextension/go.mod @@ -1,44 +1,55 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jsonlogencodingextension -go 1.20 +go 1.21 require ( github.com/json-iterator/go v1.1.12 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 ) require ( - github.com/davecgh/go-spew v1.1.1 // indirect + 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/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/encoding/jsonlogencodingextension/go.sum b/extension/encoding/jsonlogencodingextension/go.sum index 79ef34a04a46..9156c1f6ebc1 100644 --- a/extension/encoding/jsonlogencodingextension/go.sum +++ b/extension/encoding/jsonlogencodingextension/go.sum @@ -1,8 +1,18 @@ +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/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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -10,9 +20,10 @@ 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/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/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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -21,14 +32,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -36,38 +47,53 @@ 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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -77,16 +103,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -99,15 +125,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/encoding/jsonlogencodingextension/internal/metadata/generated_status.go b/extension/encoding/jsonlogencodingextension/internal/metadata/generated_status.go index 5d46d9848a56..6583bd83ea1c 100644 --- a/extension/encoding/jsonlogencodingextension/internal/metadata/generated_status.go +++ b/extension/encoding/jsonlogencodingextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("json_log_encoding") ) const ( - Type = "json_log_encoding" ExtensionStability = component.StabilityLevelDevelopment ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/jsonlogencoding") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/jsonlogencoding") +} diff --git a/extension/encoding/jsonlogencodingextension/metadata.yaml b/extension/encoding/jsonlogencodingextension/metadata.yaml index 81b0d53df9af..ebd365668bfe 100644 --- a/extension/encoding/jsonlogencodingextension/metadata.yaml +++ b/extension/encoding/jsonlogencodingextension/metadata.yaml @@ -1,4 +1,5 @@ type: json_log_encoding +scope_name: otelcol/jsonlogencoding status: class: extension @@ -7,3 +8,6 @@ status: distributions: [] codeowners: active: [VihasMakwana, atoulme] + +tests: + config: diff --git a/extension/encoding/jsonlogencodingextension/package_test.go b/extension/encoding/jsonlogencodingextension/package_test.go new file mode 100644 index 000000000000..77f361442507 --- /dev/null +++ b/extension/encoding/jsonlogencodingextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package jsonlogencodingextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/encoding/otlpencodingextension/extension_test.go b/extension/encoding/otlpencodingextension/extension_test.go index 411e6c8ef542..f4a9a082ea39 100644 --- a/extension/encoding/otlpencodingextension/extension_test.go +++ b/extension/encoding/otlpencodingextension/extension_test.go @@ -8,12 +8,59 @@ import ( "time" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/extension" + "go.opentelemetry.io/collector/extension/extensiontest" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" ) +func TestExtension_Start(t *testing.T) { + tests := []struct { + name string + getExtension func() (extension.Extension, error) + expectedErr string + }{ + { + name: "otlpJson", + getExtension: func() (extension.Extension, error) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + cfg.(*Config).Protocol = "otlp_json" + return factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + }, + }, + + { + name: "otlpProtobuf", + getExtension: func() (extension.Extension, error) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + cfg.(*Config).Protocol = "otlp_proto" + return factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + }, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + ext, err := test.getExtension() + if test.expectedErr != "" && err != nil { + require.ErrorContains(t, err, test.expectedErr) + } else { + require.NoError(t, err) + } + err = ext.Start(context.Background(), componenttest.NewNopHost()) + if test.expectedErr != "" && err != nil { + require.ErrorContains(t, err, test.expectedErr) + } else { + require.NoError(t, err) + } + }) + } +} + func testOTLPMarshal(ex *otlpExtension, t *testing.T) { traces := generateTraces() _, err := ex.MarshalTraces(traces) diff --git a/extension/encoding/otlpencodingextension/generated_component_test.go b/extension/encoding/otlpencodingextension/generated_component_test.go new file mode 100644 index 000000000000..0d8dcf68c223 --- /dev/null +++ b/extension/encoding/otlpencodingextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package otlpencodingextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/encoding/otlpencodingextension/go.mod b/extension/encoding/otlpencodingextension/go.mod index 62c02f86be3d..2ec9da3f9b8e 100644 --- a/extension/encoding/otlpencodingextension/go.mod +++ b/extension/encoding/otlpencodingextension/go.mod @@ -1,44 +1,55 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 ) require ( - github.com/davecgh/go-spew v1.1.1 // indirect + 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/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/encoding/otlpencodingextension/go.sum b/extension/encoding/otlpencodingextension/go.sum index 79ef34a04a46..9156c1f6ebc1 100644 --- a/extension/encoding/otlpencodingextension/go.sum +++ b/extension/encoding/otlpencodingextension/go.sum @@ -1,8 +1,18 @@ +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/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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -10,9 +20,10 @@ 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/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/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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -21,14 +32,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -36,38 +47,53 @@ 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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -77,16 +103,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -99,15 +125,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/encoding/otlpencodingextension/internal/metadata/generated_status.go b/extension/encoding/otlpencodingextension/internal/metadata/generated_status.go index a0b350bda0c2..7dd0e1680578 100644 --- a/extension/encoding/otlpencodingextension/internal/metadata/generated_status.go +++ b/extension/encoding/otlpencodingextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("otlp_encoding") ) const ( - Type = "otlp_encoding" ExtensionStability = component.StabilityLevelDevelopment ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/otlpencoding") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/otlpencoding") +} diff --git a/extension/encoding/otlpencodingextension/metadata.yaml b/extension/encoding/otlpencodingextension/metadata.yaml index e989b7554911..82770d041eec 100644 --- a/extension/encoding/otlpencodingextension/metadata.yaml +++ b/extension/encoding/otlpencodingextension/metadata.yaml @@ -1,4 +1,5 @@ type: otlp_encoding +scope_name: otelcol/otlpencoding status: class: extension @@ -6,4 +7,7 @@ status: development: [ extension ] distributions: [ ] codeowners: - active: [ dao-jun, VihasMakwana ] \ No newline at end of file + active: [ dao-jun, VihasMakwana ] + +tests: + config: diff --git a/extension/encoding/otlpencodingextension/package_test.go b/extension/encoding/otlpencodingextension/package_test.go new file mode 100644 index 000000000000..00ac9884c61a --- /dev/null +++ b/extension/encoding/otlpencodingextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlpencodingextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/encoding/textencodingextension/extension_test.go b/extension/encoding/textencodingextension/extension_test.go new file mode 100644 index 000000000000..26141dd8b0ac --- /dev/null +++ b/extension/encoding/textencodingextension/extension_test.go @@ -0,0 +1,65 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package textencodingextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/textencodingextension" + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/extension" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestExtension_Start(t *testing.T) { + tests := []struct { + name string + getExtension func() (extension.Extension, error) + expectedErr string + }{ + { + name: "text", + getExtension: func() (extension.Extension, error) { + factory := NewFactory() + return factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), factory.CreateDefaultConfig()) + }, + }, + { + name: "text_gbk", + getExtension: func() (extension.Extension, error) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + cfg.(*Config).Encoding = "gbk" + return factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + }, + }, + { + name: "text_blabla", + getExtension: func() (extension.Extension, error) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + cfg.(*Config).Encoding = "blabla" + return factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + }, + expectedErr: "unsupported encoding 'blabla'", + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + ext, err := test.getExtension() + if test.expectedErr != "" && err != nil { + require.ErrorContains(t, err, test.expectedErr) + } else { + require.NoError(t, err) + } + err = ext.Start(context.Background(), componenttest.NewNopHost()) + if test.expectedErr != "" && err != nil { + require.ErrorContains(t, err, test.expectedErr) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/extension/encoding/textencodingextension/generated_component_test.go b/extension/encoding/textencodingextension/generated_component_test.go new file mode 100644 index 000000000000..24c3489a465f --- /dev/null +++ b/extension/encoding/textencodingextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package textencodingextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/encoding/textencodingextension/go.mod b/extension/encoding/textencodingextension/go.mod index d1b449b31c35..11c7818a1517 100644 --- a/extension/encoding/textencodingextension/go.mod +++ b/extension/encoding/textencodingextension/go.mod @@ -1,45 +1,56 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/textencodingextension -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 ) require ( - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/encoding/textencodingextension/go.sum b/extension/encoding/textencodingextension/go.sum index 79ef34a04a46..e4969c4aa8a2 100644 --- a/extension/encoding/textencodingextension/go.sum +++ b/extension/encoding/textencodingextension/go.sum @@ -1,8 +1,18 @@ +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.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -10,9 +20,10 @@ 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/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/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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -21,14 +32,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -36,38 +47,53 @@ 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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -77,16 +103,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -99,15 +125,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/encoding/textencodingextension/internal/metadata/generated_status.go b/extension/encoding/textencodingextension/internal/metadata/generated_status.go index 5b0c8d846c36..5a410cb93134 100644 --- a/extension/encoding/textencodingextension/internal/metadata/generated_status.go +++ b/extension/encoding/textencodingextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("text_encoding") ) const ( - Type = "text_encoding" ExtensionStability = component.StabilityLevelDevelopment ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/textencoding") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/textencoding") +} diff --git a/extension/encoding/textencodingextension/metadata.yaml b/extension/encoding/textencodingextension/metadata.yaml index 415a091f7464..3de7e84d16c5 100644 --- a/extension/encoding/textencodingextension/metadata.yaml +++ b/extension/encoding/textencodingextension/metadata.yaml @@ -1,4 +1,5 @@ type: text_encoding +scope_name: otelcol/textencoding status: class: extension @@ -6,4 +7,7 @@ status: development: [extension] distributions: [] codeowners: - active: [MovieStoreGuy, atoulme] \ No newline at end of file + active: [MovieStoreGuy, atoulme] + +tests: + config: diff --git a/extension/encoding/textencodingextension/package_test.go b/extension/encoding/textencodingextension/package_test.go new file mode 100644 index 000000000000..63a324f4d837 --- /dev/null +++ b/extension/encoding/textencodingextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package textencodingextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/encoding/zipkinencodingextension/extension_test.go b/extension/encoding/zipkinencodingextension/extension_test.go index f4d258464b85..5bd7d511b9e6 100644 --- a/extension/encoding/zipkinencodingextension/extension_test.go +++ b/extension/encoding/zipkinencodingextension/extension_test.go @@ -9,22 +9,70 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/extension" "go.opentelemetry.io/collector/extension/extensiontest" ) func TestExtension_Start(t *testing.T) { - j := &zipkinExtension{ - config: createDefaultConfig().(*Config), + tests := []struct { + name string + getExtension func() (extension.Extension, error) + expectedErr string + }{ + { + name: "zipkinJSON", + getExtension: func() (extension.Extension, error) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + cfg.(*Config).Protocol = "zipkin_json" + return factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + }, + }, + { + name: "zipkinProtobuf", + getExtension: func() (extension.Extension, error) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + cfg.(*Config).Protocol = "zipkin_proto" + return factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + }, + }, + { + name: "zipkinProtobuf", + getExtension: func() (extension.Extension, error) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + cfg.(*Config).Protocol = "zipkin_thrift" + cfg.(*Config).Version = "v1" + return factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + }, + }, + { + name: "zipkinThriftVersion_invalid", + getExtension: func() (extension.Extension, error) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + cfg.(*Config).Protocol = "zipkin_thrift" + cfg.(*Config).Version = "v2" + return factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + }, + expectedErr: "unsupported version: \"v2\"", + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + ext, err := test.getExtension() + if test.expectedErr != "" && err != nil { + require.ErrorContains(t, err, test.expectedErr) + } else { + require.NoError(t, err) + } + err = ext.Start(context.Background(), componenttest.NewNopHost()) + if test.expectedErr != "" && err != nil { + require.ErrorContains(t, err, test.expectedErr) + } else { + require.NoError(t, err) + } + }) } - err := j.Start(context.Background(), componenttest.NewNopHost()) - require.NoError(t, err) -} - -func TestExtension_Err(t *testing.T) { - factory := NewFactory() - cfg := createDefaultConfig().(*Config) - cfg.Protocol = "v3" - _, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) - require.NotNil(t, err) - require.ErrorContains(t, err, "unsupported protocol: \"v3\"") } diff --git a/extension/encoding/zipkinencodingextension/generated_component_test.go b/extension/encoding/zipkinencodingextension/generated_component_test.go new file mode 100644 index 000000000000..88fba0d4d201 --- /dev/null +++ b/extension/encoding/zipkinencodingextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package zipkinencodingextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/encoding/zipkinencodingextension/go.mod b/extension/encoding/zipkinencodingextension/go.mod index cf9dd8a87282..c163364cccff 100644 --- a/extension/encoding/zipkinencodingextension/go.mod +++ b/extension/encoding/zipkinencodingextension/go.mod @@ -1,54 +1,61 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/zipkinencodingextension -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 ) require ( github.com/apache/thrift v0.19.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect - github.com/jaegertracing/jaeger v1.48.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/jaegertracing/jaeger v1.55.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect github.com/openzipkin/zipkin-go v0.4.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/atomic v1.11.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/encoding/zipkinencodingextension/go.sum b/extension/encoding/zipkinencodingextension/go.sum index bbd1312d57b1..ea2be097747a 100644 --- a/extension/encoding/zipkinencodingextension/go.sum +++ b/extension/encoding/zipkinencodingextension/go.sum @@ -1,11 +1,20 @@ -github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= +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.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -13,11 +22,12 @@ 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/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/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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/jaegertracing/jaeger v1.48.0 h1:YuKooQ7qJsjgxws9xuf8C/BLNTPx8qTAJz4wv7IHhSc= -github.com/jaegertracing/jaeger v1.48.0/go.mod h1:BoAPkdCAIEuLsVz/EDhjXd+GSVpHtJhiGqWoFEvBCKg= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= 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= @@ -26,14 +36,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -41,51 +51,57 @@ 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/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDOCg/jA= github.com/openzipkin/zipkin-go v0.4.2/go.mod h1:ZeVkFjuuBiSy13y8vpSDCjMi9GoI3hPpCJSBx/EYFhY= -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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= +github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +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/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -95,16 +111,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -117,15 +133,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/encoding/zipkinencodingextension/internal/metadata/generated_status.go b/extension/encoding/zipkinencodingextension/internal/metadata/generated_status.go index 5c297f34b405..b3f2c89d6b4a 100644 --- a/extension/encoding/zipkinencodingextension/internal/metadata/generated_status.go +++ b/extension/encoding/zipkinencodingextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("zipkin_encoding") ) const ( - Type = "zipkin_encoding" ExtensionStability = component.StabilityLevelDevelopment ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/zipkinencoding") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/zipkinencoding") +} diff --git a/extension/encoding/zipkinencodingextension/metadata.yaml b/extension/encoding/zipkinencodingextension/metadata.yaml index 7d3e5f324e10..4f2c95a5e394 100644 --- a/extension/encoding/zipkinencodingextension/metadata.yaml +++ b/extension/encoding/zipkinencodingextension/metadata.yaml @@ -1,4 +1,5 @@ type: zipkin_encoding +scope_name: otelcol/zipkinencoding status: class: extension @@ -6,4 +7,7 @@ status: development: [extension] distributions: [] codeowners: - active: [MovieStoreGuy, dao-jun] \ No newline at end of file + active: [MovieStoreGuy, dao-jun] + +tests: + config: diff --git a/extension/encoding/zipkinencodingextension/package_test.go b/extension/encoding/zipkinencodingextension/package_test.go new file mode 100644 index 000000000000..af5ba928dcf1 --- /dev/null +++ b/extension/encoding/zipkinencodingextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package zipkinencodingextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/receiver/filereceiver/Makefile b/extension/googleclientauthextension/Makefile similarity index 100% rename from receiver/filereceiver/Makefile rename to extension/googleclientauthextension/Makefile diff --git a/extension/googleclientauthextension/README.md b/extension/googleclientauthextension/README.md new file mode 100644 index 000000000000..caa890e41899 --- /dev/null +++ b/extension/googleclientauthextension/README.md @@ -0,0 +1,45 @@ +# Google Client Auth Extension + +| Status | | +| ------------- |-----------| +| Stability | [development] | +| Distributions | [] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fgoogleclientauth%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fgoogleclientauth) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fgoogleclientauth%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fgoogleclientauth) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dashpole](https://www.github.com/dashpole), [@damemi](https://www.github.com/damemi), [@aabmass](https://www.github.com/aabmass), [@jsuereth](https://www.github.com/jsuereth), [@punya](https://www.github.com/punya), [@psx95](https://www.github.com/psx95) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development + + +This extension provides Google OAuth2 Client Credentials and Metadata for gRPC and http based exporters. + +## Configuration + +```yaml +extensions: + googleclientauth: + +receivers: + otlp: + protocols: + grpc: + +exporters: + otlp/withauth: + endpoint: 0.0.0.0:5000 + ca_file: /tmp/certs/ca.pem + auth: + authenticator: googleclientauth + +service: + extensions: [googleclientauth] + pipelines: + metrics: + receivers: [otlp] + processors: [] + exporters: [otlp/withauth] +``` + +The following optional config fields are available: +- `project` - The Google Cloud Project telemetry is sent to if the `gcp.project.id` resource attribute is not set. If unspecified, this is determined using application default credentials. +- `scopes` - The oauth 2.0 [scopes](https://datatracker.ietf.org/doc/html/rfc6749#section-3.3) requested by the extension. +- `quota_project` - The [project](https://cloud.google.com/apis/docs/system-parameters) for quota and billing purposes. The caller must have `serviceusage.services.use` permission on the project. diff --git a/extension/googleclientauthextension/config.go b/extension/googleclientauthextension/config.go new file mode 100644 index 000000000000..e7d8fa3b4745 --- /dev/null +++ b/extension/googleclientauthextension/config.go @@ -0,0 +1,12 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package googleclientauthextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension" + +// Config defines configuration for the Google client auth extension. +type Config struct { +} + +func (cfg *Config) Validate() error { + return nil +} diff --git a/extension/googleclientauthextension/doc.go b/extension/googleclientauthextension/doc.go new file mode 100644 index 000000000000..c1ea608d728b --- /dev/null +++ b/extension/googleclientauthextension/doc.go @@ -0,0 +1,7 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +// Package googleclientauthextension implements an extension that provides authentication with Google Cloud. +package googleclientauthextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension" diff --git a/extension/googleclientauthextension/factory.go b/extension/googleclientauthextension/factory.go new file mode 100644 index 000000000000..5fbcad8089a5 --- /dev/null +++ b/extension/googleclientauthextension/factory.go @@ -0,0 +1,27 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +package googleclientauthextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" + "go.opentelemetry.io/collector/extension/auth" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension/internal/metadata" +) + +func NewFactory() extension.Factory { + return extension.NewFactory( + metadata.Type, + func() component.Config { return &Config{} }, + func(context.Context, extension.CreateSettings, component.Config) (extension.Extension, error) { + return auth.NewClient(), nil + }, + metadata.ExtensionStability, + ) +} diff --git a/extension/googleclientauthextension/generated_component_test.go b/extension/googleclientauthextension/generated_component_test.go new file mode 100644 index 000000000000..2b1cb41e314f --- /dev/null +++ b/extension/googleclientauthextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package googleclientauthextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/googleclientauthextension/go.mod b/extension/googleclientauthextension/go.mod new file mode 100644 index 000000000000..404f2afe54bb --- /dev/null +++ b/extension/googleclientauthextension/go.mod @@ -0,0 +1,53 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension + +go 1.21 + +exclude github.com/knadh/koanf v1.5.0 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/extension/auth v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.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.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // 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.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/extension/googleclientauthextension/go.sum b/extension/googleclientauthextension/go.sum new file mode 100644 index 000000000000..1d46d54f8df7 --- /dev/null +++ b/extension/googleclientauthextension/go.sum @@ -0,0 +1,129 @@ +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/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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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/extension/googleclientauthextension/internal/metadata/generated_status.go b/extension/googleclientauthextension/internal/metadata/generated_status.go new file mode 100644 index 000000000000..93b63bdf4104 --- /dev/null +++ b/extension/googleclientauthextension/internal/metadata/generated_status.go @@ -0,0 +1,25 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("googleclientauth") +) + +const ( + ExtensionStability = component.StabilityLevelDevelopment +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension") +} diff --git a/extension/googleclientauthextension/metadata.yaml b/extension/googleclientauthextension/metadata.yaml new file mode 100644 index 000000000000..eb4466302c7b --- /dev/null +++ b/extension/googleclientauthextension/metadata.yaml @@ -0,0 +1,12 @@ +type: googleclientauth + +status: + class: extension + stability: + development: [extension] + codeowners: + active: [dashpole, damemi, aabmass, jsuereth, punya, psx95] + +tests: + skip_lifecycle: true # in development + skip_shutdown: true # in development diff --git a/extension/googleclientauthextension/package_test.go b/extension/googleclientauthextension/package_test.go new file mode 100644 index 000000000000..8c08d262c3a7 --- /dev/null +++ b/extension/googleclientauthextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package googleclientauthextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/headerssetterextension/README.md b/extension/headerssetterextension/README.md index 3b0f1f5701b1..98fb3d5e93a9 100644 --- a/extension/headerssetterextension/README.md +++ b/extension/headerssetterextension/README.md @@ -3,14 +3,12 @@ | Status | | | ------------- |-----------| | Stability | [alpha] | -| Distributions | [contrib], [grafana], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fheaderssetter%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fheaderssetter) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fheaderssetter%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fheaderssetter) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling) | [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[grafana]: https://github.com/grafana/agent -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector The `headers_setter` extension implements `ClientAuthenticator` and is used to @@ -42,6 +40,11 @@ The following settings are required: The `value` and `from_context` properties are mutually exclusive. +In order for `from_context` to work, other components in the pipeline also need to be configured appropriately: +* If a [batch processor][batch-processor] is present in the pipeline, it must be configured to [preserve client metadata][batch-processor-preserve-metadata]. + Add the value which `from_context` needs to the `metadata_keys` of the batch processor. +* Receivers must be configured with `include_metadata: true` so that metadata keys are available to the pipeline. + #### Configuration Example ```yaml @@ -67,7 +70,10 @@ receivers: include_metadata: true processors: - nop: + batch: + # Preserve the tenant-id metadata. + metadata_keys: + - tenant_id exporters: loki: @@ -84,10 +90,13 @@ service: pipelines: traces: receivers: [ otlp ] - processors: [ nop ] + processors: [ batch ] exporters: [ loki ] ``` +[batch-processor]: https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor/README.md +[batch-processor-preserve-metadata]: https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor/README.md#batching-and-client-metadata + [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib [Mimir]: https://grafana.com/oss/mimir/ diff --git a/extension/headerssetterextension/generated_component_test.go b/extension/headerssetterextension/generated_component_test.go new file mode 100644 index 000000000000..6bfc0c1c3413 --- /dev/null +++ b/extension/headerssetterextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package headerssetterextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/headerssetterextension/go.mod b/extension/headerssetterextension/go.mod index 29fdc1e05316..a9d20abdc95c 100644 --- a/extension/headerssetterextension/go.mod +++ b/extension/headerssetterextension/go.mod @@ -1,42 +1,52 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.89.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/extension/auth v0.89.0 - go.uber.org/zap v1.26.0 - google.golang.org/grpc v1.59.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.98.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/extension/auth v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + google.golang.org/grpc v1.63.2 ) 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.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/headerssetterextension/go.sum b/extension/headerssetterextension/go.sum index 7b6f6f0df20d..19534449858a 100644 --- a/extension/headerssetterextension/go.sum +++ b/extension/headerssetterextension/go.sum @@ -1,70 +1,94 @@ +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/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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -74,16 +98,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -96,15 +120,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/headerssetterextension/internal/action/package_test.go b/extension/headerssetterextension/internal/action/package_test.go new file mode 100644 index 000000000000..acbc01696e93 --- /dev/null +++ b/extension/headerssetterextension/internal/action/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package action + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/headerssetterextension/internal/metadata/generated_status.go b/extension/headerssetterextension/internal/metadata/generated_status.go index 2c4aab24ea27..cb5364d41852 100644 --- a/extension/headerssetterextension/internal/metadata/generated_status.go +++ b/extension/headerssetterextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("headers_setter") ) const ( - Type = "headers_setter" ExtensionStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/headerssetter") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/headerssetter") +} diff --git a/extension/headerssetterextension/internal/source/package_test.go b/extension/headerssetterextension/internal/source/package_test.go new file mode 100644 index 000000000000..073346679235 --- /dev/null +++ b/extension/headerssetterextension/internal/source/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package source + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/headerssetterextension/metadata.yaml b/extension/headerssetterextension/metadata.yaml index 9382e6c68779..e207984e3db2 100644 --- a/extension/headerssetterextension/metadata.yaml +++ b/extension/headerssetterextension/metadata.yaml @@ -1,4 +1,5 @@ type: headers_setter +scope_name: otelcol/headerssetter status: class: extension @@ -6,7 +7,7 @@ status: alpha: [extension] distributions: - contrib - - grafana - - sumo codeowners: active: [jpkrohling] +tests: + config: diff --git a/extension/headerssetterextension/package_test.go b/extension/headerssetterextension/package_test.go new file mode 100644 index 000000000000..5df914832567 --- /dev/null +++ b/extension/headerssetterextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package headerssetterextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/healthcheckextension/README.md b/extension/healthcheckextension/README.md index 8c94345e1f5b..27112d9acf5d 100644 --- a/extension/healthcheckextension/README.md +++ b/extension/healthcheckextension/README.md @@ -1,21 +1,25 @@ # Health Check +> ⚠️⚠️⚠️ **Warning** ⚠️⚠️⚠️ +> +> The `check_collector_pipeline` feature of this extension is not working as expected. It +> is recommended to not use the feature. The work to add a new version of the healthcheck extension +> that relies on individual component status is in progress. To avoid breaking backwards compatibility, +> the configuration will not be changed until the new extension is available as a replacement for this +> one. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11780 for more +> details. + | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [core], [contrib], [aws], [observiq], [redhat], [splunk], [sumo] | +| Distributions | [core], [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fhealthcheck%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fhealthcheck) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fhealthcheck%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fhealthcheck) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector -[redhat]: https://github.com/os-observability/redhat-opentelemetry-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector Health Check extension enables an HTTP url that can be probed to check the @@ -30,7 +34,7 @@ processors in the future. The following settings are required: -- `endpoint` (default = 0.0.0.0:13133): Address to publish the health check status. For full list of `HTTPServerSettings` refer [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). +- `endpoint` (default = 0.0.0.0:13133): Address to publish the health check status. For full list of `ServerConfig` refer [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:13133. This will become the default in a future release. - `path` (default = "/"): Specifies the path to be configured for the health check server. - `response_body` (default = ""): Specifies a static body that overrides the default response returned by the health check service. - `check_collector_pipeline:` (optional): Settings of collector pipeline health check diff --git a/extension/healthcheckextension/config.go b/extension/healthcheckextension/config.go index ac55386d1d19..cd9526d7f21f 100644 --- a/extension/healthcheckextension/config.go +++ b/extension/healthcheckextension/config.go @@ -25,7 +25,7 @@ type ResponseBodySettings struct { // Config has the configuration for the extension enabling the health check // extension, used to report the health status of the service. type Config struct { - confighttp.HTTPServerSettings `mapstructure:",squash"` + confighttp.ServerConfig `mapstructure:",squash"` // Path represents the path the health check service will serve. // The default path is "/". diff --git a/extension/healthcheckextension/config_test.go b/extension/healthcheckextension/config_test.go index 96001b2988d8..2b9515b95f27 100644 --- a/extension/healthcheckextension/config_test.go +++ b/extension/healthcheckextension/config_test.go @@ -32,10 +32,10 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "1"), expected: &Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: "localhost:13", - TLSSetting: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: &configtls.ServerConfig{ + Config: configtls.Config{ CAFile: "/path/to/ca", CertFile: "/path/to/cert", KeyFile: "/path/to/key", diff --git a/extension/healthcheckextension/factory.go b/extension/healthcheckextension/factory.go index bf0c8efa238e..0ebbd1726b78 100644 --- a/extension/healthcheckextension/factory.go +++ b/extension/healthcheckextension/factory.go @@ -11,13 +11,10 @@ import ( "go.opentelemetry.io/collector/extension" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/localhostgate" ) -const ( - // Use 0.0.0.0 to make the health check endpoint accessible - // in container orchestration environments like Kubernetes. - defaultEndpoint = "0.0.0.0:13133" -) +const defaultPort = 13133 // NewFactory creates a factory for HealthCheck extension. func NewFactory() extension.Factory { @@ -31,8 +28,8 @@ func NewFactory() extension.Factory { func createDefaultConfig() component.Config { return &Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ - Endpoint: defaultEndpoint, + ServerConfig: confighttp.ServerConfig{ + Endpoint: localhostgate.EndpointForPort(defaultPort), }, CheckCollectorPipeline: defaultCheckCollectorPipelineSettings(), Path: "/", diff --git a/extension/healthcheckextension/factory_test.go b/extension/healthcheckextension/factory_test.go index 904b4a1c65a7..e0c3a83982d1 100644 --- a/extension/healthcheckextension/factory_test.go +++ b/extension/healthcheckextension/factory_test.go @@ -19,8 +19,8 @@ import ( func TestFactory_CreateDefaultConfig(t *testing.T) { cfg := createDefaultConfig() assert.Equal(t, &Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ - Endpoint: defaultEndpoint, + ServerConfig: confighttp.ServerConfig{ + Endpoint: "0.0.0.0:13133", }, CheckCollectorPipeline: defaultCheckCollectorPipelineSettings(), Path: "/", diff --git a/extension/healthcheckextension/generated_component_test.go b/extension/healthcheckextension/generated_component_test.go new file mode 100644 index 000000000000..977fe6e5a838 --- /dev/null +++ b/extension/healthcheckextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package healthcheckextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/healthcheckextension/go.mod b/extension/healthcheckextension/go.mod index e99c0adede48..9edf0981bb01 100644 --- a/extension/healthcheckextension/go.mod +++ b/extension/healthcheckextension/go.mod @@ -1,58 +1,71 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/stretchr/testify v1.8.4 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/stretchr/testify v1.9.0 go.opencensus.io v0.24.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.uber.org/zap v1.26.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/davecgh/go-spew v1.1.1 // indirect + 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.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/healthcheckextension/go.sum b/extension/healthcheckextension/go.sum index 0ea182d3d8fc..c1e312638635 100644 --- a/extension/healthcheckextension/go.sum +++ b/extension/healthcheckextension/go.sum @@ -1,11 +1,16 @@ 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/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/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/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/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= @@ -15,15 +20,18 @@ github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw 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.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -47,34 +55,50 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ 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.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -83,54 +107,62 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -149,8 +181,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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= @@ -161,8 +193,8 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -184,15 +216,15 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= 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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -204,10 +236,11 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/healthcheckextension/healthcheckextension.go b/extension/healthcheckextension/healthcheckextension.go index b3c0634bec97..abebd3b485b9 100644 --- a/extension/healthcheckextension/healthcheckextension.go +++ b/extension/healthcheckextension/healthcheckextension.go @@ -30,15 +30,15 @@ type healthCheckExtension struct { var _ extension.PipelineWatcher = (*healthCheckExtension)(nil) -func (hc *healthCheckExtension) Start(_ context.Context, host component.Host) error { +func (hc *healthCheckExtension) Start(ctx context.Context, host component.Host) error { hc.logger.Info("Starting health_check extension", zap.Any("config", hc.config)) - ln, err := hc.config.ToListener() + ln, err := hc.config.ToListenerContext(ctx) if err != nil { return fmt.Errorf("failed to bind to address %s: %w", hc.config.Endpoint, err) } - hc.server, err = hc.config.ToServer(host, hc.settings, nil) + hc.server, err = hc.config.ToServerContext(ctx, host, hc.settings, nil) if err != nil { return err } @@ -54,7 +54,7 @@ func (hc *healthCheckExtension) Start(_ context.Context, host component.Host) er // The listener ownership goes to the server. if err = hc.server.Serve(ln); !errors.Is(err, http.ErrServerClosed) && err != nil { - host.ReportFatalError(err) + hc.settings.ReportStatus(component.NewFatalErrorEvent(err)) } }() } else { @@ -90,7 +90,7 @@ func (hc *healthCheckExtension) Start(_ context.Context, host component.Host) er }() if errHTTP := hc.server.Serve(ln); !errors.Is(errHTTP, http.ErrServerClosed) && errHTTP != nil { - host.ReportFatalError(errHTTP) + hc.settings.ReportStatus(component.NewFatalErrorEvent(errHTTP)) } }() diff --git a/extension/healthcheckextension/healthcheckextension_test.go b/extension/healthcheckextension/healthcheckextension_test.go index ee2298714df4..eb094ad82a09 100644 --- a/extension/healthcheckextension/healthcheckextension_test.go +++ b/extension/healthcheckextension/healthcheckextension_test.go @@ -12,10 +12,8 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opencensus.io/stats/view" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/confighttp" @@ -49,7 +47,7 @@ func TestHealthCheckExtensionUsage(t *testing.T) { { name: "WithoutCheckCollectorPipeline", config: Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, CheckCollectorPipeline: defaultCheckCollectorPipelineSettings(), @@ -76,7 +74,7 @@ func TestHealthCheckExtensionUsage(t *testing.T) { { name: "WithCustomizedPathWithoutCheckCollectorPipeline", config: Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, CheckCollectorPipeline: defaultCheckCollectorPipelineSettings(), @@ -99,7 +97,7 @@ func TestHealthCheckExtensionUsage(t *testing.T) { { name: "WithBothCustomResponseBodyWithoutCheckCollectorPipeline", config: Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, CheckCollectorPipeline: defaultCheckCollectorPipelineSettings(), @@ -126,7 +124,7 @@ func TestHealthCheckExtensionUsage(t *testing.T) { { name: "WithHealthyCustomResponseBodyWithoutCheckCollectorPipeline", config: Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, CheckCollectorPipeline: defaultCheckCollectorPipelineSettings(), @@ -153,7 +151,7 @@ func TestHealthCheckExtensionUsage(t *testing.T) { { name: "WithUnhealthyCustomResponseBodyWithoutCheckCollectorPipeline", config: Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, CheckCollectorPipeline: defaultCheckCollectorPipelineSettings(), @@ -180,7 +178,7 @@ func TestHealthCheckExtensionUsage(t *testing.T) { { name: "WithCheckCollectorPipeline", config: Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, CheckCollectorPipeline: checkCollectorPipelineSettings{ @@ -221,7 +219,7 @@ func TestHealthCheckExtensionUsage(t *testing.T) { { name: "WithCustomPathWithCheckCollectorPipeline", config: Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, CheckCollectorPipeline: checkCollectorPipelineSettings{ @@ -262,7 +260,7 @@ func TestHealthCheckExtensionUsage(t *testing.T) { { name: "WithCustomStaticResponseBodyWithCheckCollectorPipeline", config: Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, CheckCollectorPipeline: checkCollectorPipelineSettings{ @@ -355,7 +353,7 @@ func TestHealthCheckExtensionPortAlreadyInUse(t *testing.T) { defer ln.Close() config := Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: endpoint, }, CheckCollectorPipeline: defaultCheckCollectorPipelineSettings(), @@ -363,13 +361,12 @@ func TestHealthCheckExtensionPortAlreadyInUse(t *testing.T) { hcExt := newServer(config, componenttest.NewNopTelemetrySettings()) require.NotNil(t, hcExt) - mh := newAssertNoErrorHost(t) - require.Error(t, hcExt.Start(context.Background(), mh)) + require.Error(t, hcExt.Start(context.Background(), componenttest.NewNopHost())) } func TestHealthCheckMultipleStarts(t *testing.T) { config := Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, CheckCollectorPipeline: defaultCheckCollectorPipelineSettings(), @@ -379,16 +376,15 @@ func TestHealthCheckMultipleStarts(t *testing.T) { hcExt := newServer(config, componenttest.NewNopTelemetrySettings()) require.NotNil(t, hcExt) - mh := newAssertNoErrorHost(t) - require.NoError(t, hcExt.Start(context.Background(), mh)) + require.NoError(t, hcExt.Start(context.Background(), componenttest.NewNopHost())) t.Cleanup(func() { require.NoError(t, hcExt.Shutdown(context.Background())) }) - require.Error(t, hcExt.Start(context.Background(), mh)) + require.Error(t, hcExt.Start(context.Background(), componenttest.NewNopHost())) } func TestHealthCheckMultipleShutdowns(t *testing.T) { config := Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, CheckCollectorPipeline: defaultCheckCollectorPipelineSettings(), @@ -405,7 +401,7 @@ func TestHealthCheckMultipleShutdowns(t *testing.T) { func TestHealthCheckShutdownWithoutStart(t *testing.T) { config := Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, CheckCollectorPipeline: defaultCheckCollectorPipelineSettings(), @@ -427,21 +423,3 @@ func viewData() *view.Data { } return vd } - -// assertNoErrorHost implements a component.Host that asserts that there were no errors. -type assertNoErrorHost struct { - component.Host - *testing.T -} - -// newAssertNoErrorHost returns a new instance of assertNoErrorHost. -func newAssertNoErrorHost(t *testing.T) component.Host { - return &assertNoErrorHost{ - Host: componenttest.NewNopHost(), - T: t, - } -} - -func (aneh *assertNoErrorHost) ReportFatalError(err error) { - assert.NoError(aneh, err) -} diff --git a/extension/healthcheckextension/integration_test.go b/extension/healthcheckextension/integration_test.go new file mode 100644 index 000000000000..83df1ced7968 --- /dev/null +++ b/extension/healthcheckextension/integration_test.go @@ -0,0 +1,50 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package healthcheckextension + +import ( + "bytes" + "context" + "fmt" + "io" + "net/http" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/extension/extensiontest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" +) + +func Test_SimpleHealthCheck(t *testing.T) { + f := NewFactory() + port := testutil.GetAvailablePort(t) + cfg := f.CreateDefaultConfig().(*Config) + cfg.Endpoint = fmt.Sprintf("localhost:%d", port) + e, err := f.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, e.Shutdown(context.Background())) + }) + resp, err := http.DefaultClient.Get(fmt.Sprintf("http://localhost:%d/", port)) + require.NoError(t, err) + assert.Equal(t, "503 Service Unavailable", resp.Status) + var buf bytes.Buffer + _, err = io.Copy(&buf, resp.Body) + require.NoError(t, err) + assert.Equal(t, `{"status":"Server not available","upSince":"0001-01-01T00:00:00Z","uptime":""}`, buf.String()) + err = e.(*healthCheckExtension).Ready() + require.NoError(t, err) + resp, err = http.DefaultClient.Get(fmt.Sprintf("http://localhost:%d/", port)) + require.NoError(t, err) + assert.Equal(t, "200 OK", resp.Status) + buf.Reset() + _, err = io.Copy(&buf, resp.Body) + require.NoError(t, err) + assert.Contains(t, buf.String(), `{"status":"Server available","upSince":"`) +} diff --git a/extension/healthcheckextension/internal/metadata/generated_status.go b/extension/healthcheckextension/internal/metadata/generated_status.go index ea6c8c94e349..64a946c0e4fe 100644 --- a/extension/healthcheckextension/internal/metadata/generated_status.go +++ b/extension/healthcheckextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("health_check") ) const ( - Type = "health_check" ExtensionStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/healthcheck") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/healthcheck") +} diff --git a/extension/healthcheckextension/metadata.yaml b/extension/healthcheckextension/metadata.yaml index b92081833048..2286ebf7a320 100644 --- a/extension/healthcheckextension/metadata.yaml +++ b/extension/healthcheckextension/metadata.yaml @@ -1,9 +1,14 @@ type: health_check +scope_name: otelcol/healthcheck status: class: extension stability: beta: [extension] - distributions: [core, contrib, splunk, observiq, sumo, aws, redhat] + distributions: [core, contrib] codeowners: active: [jpkrohling] + +tests: + config: + endpoint: localhost:0 diff --git a/extension/healthcheckextension/package_test.go b/extension/healthcheckextension/package_test.go new file mode 100644 index 000000000000..b811f5a02168 --- /dev/null +++ b/extension/healthcheckextension/package_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package healthcheckextension + +import ( + "testing" + + "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")) +} diff --git a/extension/httpforwarder/README.md b/extension/httpforwarder/README.md deleted file mode 100644 index 16960febdc81..000000000000 --- a/extension/httpforwarder/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# HTTP Forwarder Extension - -| Status | | -| ------------- |-----------| -| Stability | [beta] | -| Distributions | [contrib], [splunk], [sumo] | -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fhttpforwarder%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fhttpforwarder) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fhttpforwarder%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fhttpforwarder) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@atoulme](https://www.github.com/atoulme), [@rmfitzpatrick](https://www.github.com/rmfitzpatrick) | - -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector - - -This extension accepts HTTP requests, optionally adds headers to them and forwards them. -The RequestURIs of the original requests are preserved by the extension. - -## Configuration - -The following settings are required: - -- `egress`: HTTP config settings to use for forwarding requests. - - `endpoint` (no default): The target to which requests should be forwarded to. - -The following settings can be optionally configured: - -- `ingress`: HTTP config settings for HTTP server listening to requests. - - `endpoint` (default = `0.0.0.0:6060`): The host to which requests should be forwarded to. -- `egress`: HTTP config settings to use for forwarding requests. - - `headers` (default = `nil`): Additional headers to be added to all requests passing through the extension. - - `timeout` (default = `10s`): How long to wait for each request to complete. - -### Example - -```yaml - http_forwarder: - ingress: - endpoint: localhost:7070 - egress: - endpoint: http://target/ - headers: - otel_http_forwarder: dev - timeout: 5s -``` - -The full list of settings exposed for this exporter are documented [here](config.go) -with detailed sample configurations [here](testdata/config.yaml). diff --git a/extension/httpforwarder/config.go b/extension/httpforwarder/config.go deleted file mode 100644 index 06f05c32c672..000000000000 --- a/extension/httpforwarder/config.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package httpforwarder // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder" - -import ( - "go.opentelemetry.io/collector/config/confighttp" -) - -// Config defines configuration for http forwarder extension. -type Config struct { - - // Ingress holds config settings for HTTP server listening for requests. - Ingress confighttp.HTTPServerSettings `mapstructure:"ingress"` - - // Egress holds config settings to use for forwarded requests. - Egress confighttp.HTTPClientSettings `mapstructure:"egress"` -} diff --git a/extension/httpforwarder/config_test.go b/extension/httpforwarder/config_test.go deleted file mode 100644 index f0b47906fcd7..000000000000 --- a/extension/httpforwarder/config_test.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package httpforwarder - -import ( - "path/filepath" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configopaque" - "go.opentelemetry.io/collector/confmap/confmaptest" - - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder/internal/metadata" -) - -func TestLoadConfig(t *testing.T) { - t.Parallel() - - tests := []struct { - id component.ID - expected component.Config - }{ - { - id: component.NewID(metadata.Type), - expected: NewFactory().CreateDefaultConfig(), - }, - { - id: component.NewIDWithName(metadata.Type, "1"), - expected: &Config{ - Ingress: confighttp.HTTPServerSettings{ - Endpoint: "http://localhost:7070", - }, - Egress: confighttp.HTTPClientSettings{ - Endpoint: "http://target/", - Headers: map[string]configopaque.String{ - "otel_http_forwarder": "dev", - }, - Timeout: 5 * time.Second, - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.id.String(), func(t *testing.T) { - cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) - require.NoError(t, err) - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - sub, err := cm.Sub(tt.id.String()) - require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) - assert.NoError(t, component.ValidateConfig(cfg)) - assert.Equal(t, tt.expected, cfg) - }) - } -} diff --git a/extension/httpforwarder/doc.go b/extension/httpforwarder/doc.go deleted file mode 100644 index bbef5feebb63..000000000000 --- a/extension/httpforwarder/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:generate mdatagen metadata.yaml - -// Package httpforwarder accepts HTTP requests, optionally adds headers to them and forwards them. -package httpforwarder // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder" diff --git a/extension/httpforwarder/extension.go b/extension/httpforwarder/extension.go deleted file mode 100644 index 308fda9dda15..000000000000 --- a/extension/httpforwarder/extension.go +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package httpforwarder // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder" - -import ( - "context" - "errors" - "fmt" - "io" - "net/http" - "net/url" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/extension" - "go.uber.org/zap" -) - -type httpForwarder struct { - forwardTo *url.URL - httpClient *http.Client - server *http.Server - settings component.TelemetrySettings - config *Config -} - -var _ extension.Extension = (*httpForwarder)(nil) - -func (h *httpForwarder) Start(_ context.Context, host component.Host) error { - listener, err := h.config.Ingress.ToListener() - if err != nil { - return fmt.Errorf("failed to bind to address %s: %w", h.config.Ingress.Endpoint, err) - } - - httpClient, err := h.config.Egress.ToClient(host, h.settings) - if err != nil { - return fmt.Errorf("failed to create HTTP Client: %w", err) - } - h.httpClient = httpClient - - handler := http.NewServeMux() - handler.HandleFunc("/", h.forwardRequest) - - h.server, err = h.config.Ingress.ToServer(host, h.settings, handler) - if err != nil { - return fmt.Errorf("failed to create HTTP Client: %w", err) - } - - go func() { - if errHTTP := h.server.Serve(listener); !errors.Is(errHTTP, http.ErrServerClosed) && errHTTP != nil { - host.ReportFatalError(errHTTP) - } - }() - - return nil -} - -func (h *httpForwarder) Shutdown(_ context.Context) error { - if h.server == nil { - return nil - } - return h.server.Close() -} - -func (h *httpForwarder) forwardRequest(writer http.ResponseWriter, request *http.Request) { - forwarderRequest := request.Clone(request.Context()) - forwarderRequest.URL.Host = h.forwardTo.Host - forwarderRequest.URL.Scheme = h.forwardTo.Scheme - forwarderRequest.Host = h.forwardTo.Host - // Clear RequestURI to avoid getting "http: Request.RequestURI can't be set in client requests" error. - forwarderRequest.RequestURI = "" - - // Add additional headers. - for k, v := range h.config.Egress.Headers { - forwarderRequest.Header.Add(k, string(v)) - } - - // Add "Via" header for tracking purposes on both the outgoing requests and responses. - // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Via. - addViaHeader(forwarderRequest.Header, request.Proto, request.Host) - - response, err := h.httpClient.Do(forwarderRequest) - if err != nil { - http.Error(writer, err.Error(), http.StatusBadGateway) - } - - if response == nil { - return - } - defer response.Body.Close() - - // Copy over response from the final destination. - for k := range response.Header { - writer.Header().Set(k, response.Header.Get(k)) - } - addViaHeader(writer.Header(), response.Proto, request.Host) - - writer.WriteHeader(response.StatusCode) - written, err := io.Copy(writer, response.Body) - if err != nil { - h.settings.Logger.Warn("Error writing HTTP response message", zap.Error(err)) - } - - if response.ContentLength != written { - h.settings.Logger.Warn("Response from target not fully copied, body might be corrupted") - } -} - -func addViaHeader(header http.Header, protocol string, host string) { - header.Add("Via", fmt.Sprintf("%s %s", protocol, host)) -} - -func newHTTPForwarder(config *Config, settings component.TelemetrySettings) (extension.Extension, error) { - if config.Egress.Endpoint == "" { - return nil, errors.New("'egress.endpoint' config option cannot be empty") - } - - var url, err = url.Parse(config.Egress.Endpoint) - if err != nil { - return nil, fmt.Errorf("enter a valid URL for 'egress.endpoint': %w", err) - } - - h := &httpForwarder{ - config: config, - forwardTo: url, - settings: settings, - } - - return h, nil -} diff --git a/extension/httpforwarder/extension_test.go b/extension/httpforwarder/extension_test.go deleted file mode 100644 index 9864c6aa71c6..000000000000 --- a/extension/httpforwarder/extension_test.go +++ /dev/null @@ -1,272 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package httpforwarder - -import ( - "context" - "fmt" - "io" - "net/http" - "net/http/httptest" - "net/url" - "strings" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configopaque" - "go.opentelemetry.io/collector/config/configtls" - - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" -) - -type clientRequestArgs struct { - method string - url string - headers map[string]string - body string -} - -func TestExtension(t *testing.T) { - listenAt := testutil.GetAvailableLocalAddress(t) - tests := []struct { - name string - config *Config - expectedbackendStatusCode int - expectedBackendResponseBody []byte - expectedHeaders map[string]configopaque.String - httpErrorFromBackend bool - requestErrorAtForwarder bool - clientRequestArgs clientRequestArgs - startUpError bool - startUpErrorMessage string - }{ - { - name: "No additional headers", - config: &Config{ - Ingress: confighttp.HTTPServerSettings{ - Endpoint: listenAt, - }, - }, - expectedbackendStatusCode: http.StatusAccepted, - expectedBackendResponseBody: []byte("hello world"), - expectedHeaders: map[string]configopaque.String{ - "header": "value", - }, - clientRequestArgs: clientRequestArgs{ - method: "GET", - url: fmt.Sprintf("http://%s/api/dosomething", listenAt), - headers: map[string]string{ - "client_header": "val1", - }, - body: "client_body", - }, - }, - { - name: "With additional headers", - config: &Config{ - Ingress: confighttp.HTTPServerSettings{ - Endpoint: listenAt, - }, - Egress: confighttp.HTTPClientSettings{ - Headers: map[string]configopaque.String{ - "key": "value", - }, - }, - }, - expectedbackendStatusCode: http.StatusAccepted, - expectedBackendResponseBody: []byte("hello world with additional headers"), - expectedHeaders: map[string]configopaque.String{ - "header": "value", - }, - clientRequestArgs: clientRequestArgs{ - method: "PUT", - url: fmt.Sprintf("http://%s/api/dosomething", listenAt), - }, - }, - { - name: "Error code from backend", - config: &Config{ - Ingress: confighttp.HTTPServerSettings{ - Endpoint: listenAt, - }, - Egress: confighttp.HTTPClientSettings{ - Headers: map[string]configopaque.String{ - "key": "value", - }, - }, - }, - expectedbackendStatusCode: http.StatusInternalServerError, - expectedBackendResponseBody: []byte("\n"), - httpErrorFromBackend: true, - clientRequestArgs: clientRequestArgs{ - method: "PATCH", - url: fmt.Sprintf("http://%s/api/dosomething", listenAt), - }, - }, - { - name: "Error making request at forwarder", - config: &Config{ - Ingress: confighttp.HTTPServerSettings{ - Endpoint: listenAt, - }, - Egress: confighttp.HTTPClientSettings{ - Headers: map[string]configopaque.String{ - "key": "value", - }, - }, - }, - expectedbackendStatusCode: http.StatusBadGateway, - expectedBackendResponseBody: []byte("\n"), - requestErrorAtForwarder: true, - clientRequestArgs: clientRequestArgs{ - method: "GET", - url: fmt.Sprintf("http://%s/api/dosomething", listenAt), - }, - }, - { - name: "Invalid config - HTTP Client creation fails", - config: &Config{ - Egress: confighttp.HTTPClientSettings{ - Endpoint: "localhost:9090", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ - CAFile: "/non/existent", - }, - }, - }, - }, - startUpError: true, - startUpErrorMessage: "failed to create HTTP Client: ", - }, - { - name: "Error on Startup", - config: &Config{ - Ingress: confighttp.HTTPServerSettings{ - Endpoint: "invalid", // to mock error setting up listener. - }, - }, - startUpError: true, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - backend := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if test.httpErrorFromBackend { - http.Error(w, "", http.StatusInternalServerError) - return - } - - assert.Equal(t, getParsedURL(t, test.clientRequestArgs.url).RequestURI(), r.RequestURI) - assert.Equal(t, test.clientRequestArgs.method, r.Method) - assert.Equal(t, test.clientRequestArgs.body, string(readBody(r.Body))) - - // Assert headers originating from client. - for k, v := range test.clientRequestArgs.headers { - got := r.Header.Get(k) - assert.Equal(t, v, got) - } - - // Assert additional headers added by forwarder. - for k, v := range test.config.Egress.Headers { - got := r.Header.Get(k) - assert.Equal(t, string(v), got) - } - - // Assert Via header added by the forwarder on all requests. - assert.Equal(t, fmt.Sprintf("%s %s", r.Proto, listenAt), r.Header.Get("Via")) - - for k, v := range test.expectedHeaders { - w.Header().Set(k, string(v)) - } - w.WriteHeader(test.expectedbackendStatusCode) - _, err := w.Write(test.expectedBackendResponseBody) - assert.NoError(t, err) - })) - defer backend.Close() - - // Fill in final destination URL. - backendURL, _ := url.Parse(backend.URL) - test.config.Egress.Endpoint = backendURL.String() - - // Setup forwarder with wrong final address to mock failures. - if test.requestErrorAtForwarder { - test.config.Egress.Endpoint = "http://" + testutil.GetAvailableLocalAddress(t) - } - - hf, err := newHTTPForwarder(test.config, componenttest.NewNopTelemetrySettings()) - require.NoError(t, err) - - ctx := context.Background() - if test.startUpError { - err = hf.Start(ctx, componenttest.NewNopHost()) - if test.startUpErrorMessage != "" { - require.True(t, strings.Contains(err.Error(), test.startUpErrorMessage)) - } - require.Error(t, err) - - return - } - require.NoError(t, hf.Start(ctx, componenttest.NewNopHost())) - - // Mock a client trying to talk to backend using the forwarder. - httpClient := http.Client{} - - // Assert responses received by client. - response, err := httpClient.Do(httpRequest(t, test.clientRequestArgs)) - require.NoError(t, err) - require.NotNil(t, response) - defer response.Body.Close() - - assert.Equal(t, test.expectedbackendStatusCode, response.StatusCode) - if !test.requestErrorAtForwarder { - assert.Equal(t, string(test.expectedBackendResponseBody), string(readBody(response.Body))) - assert.Equal(t, fmt.Sprintf("%s %s", response.Proto, listenAt), response.Header.Get("Via")) - } - - for k := range response.Header { - got := response.Header.Get(k) - header := strings.ToLower(k) - if want, ok := test.expectedHeaders[header]; ok { - assert.Equal(t, want, configopaque.String(got)) - continue - } - - if k == "Content-Length" || k == "Content-Type" || k == "X-Content-Type-Options" || k == "Date" || k == "Via" { - // Content-Length, Content-Type, X-Content-Type-Options and Date are certain headers added by default. - // Assertion for Via is done above. - continue - } - t.Error("unexpected header found in response: ", k) - } - - require.NoError(t, hf.Shutdown(ctx)) - }) - } -} - -func httpRequest(t *testing.T, args clientRequestArgs) *http.Request { - r, err := http.NewRequest(args.method, args.url, io.NopCloser(strings.NewReader(args.body))) - require.NoError(t, err) - - for k, v := range args.headers { - r.Header.Set(k, v) - } - - return r -} - -func readBody(body io.ReadCloser) []byte { - out, _ := io.ReadAll(body) - return out -} - -func getParsedURL(t *testing.T, rawURL string) *url.URL { - var url, err = url.Parse(rawURL) - require.NoError(t, err) - return url -} diff --git a/extension/httpforwarder/factory.go b/extension/httpforwarder/factory.go deleted file mode 100644 index aa29d7d477ad..000000000000 --- a/extension/httpforwarder/factory.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package httpforwarder // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder" - -import ( - "context" - "time" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/extension" - - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder/internal/metadata" -) - -const ( - // Default endpoints to bind to. - defaultEndpoint = ":6060" -) - -// NewFactory creates a factory for HostObserver extension. -func NewFactory() extension.Factory { - return extension.NewFactory( - metadata.Type, - createDefaultConfig, - createExtension, - metadata.ExtensionStability) -} - -func createDefaultConfig() component.Config { - return &Config{ - Ingress: confighttp.HTTPServerSettings{ - Endpoint: defaultEndpoint, - }, - Egress: confighttp.HTTPClientSettings{ - Timeout: 10 * time.Second, - }, - } -} - -func createExtension( - _ context.Context, - params extension.CreateSettings, - cfg component.Config, -) (extension.Extension, error) { - return newHTTPForwarder(cfg.(*Config), params.TelemetrySettings) -} diff --git a/extension/httpforwarder/factory_test.go b/extension/httpforwarder/factory_test.go deleted file mode 100644 index ce74e6f3fadc..000000000000 --- a/extension/httpforwarder/factory_test.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package httpforwarder - -import ( - "context" - "strings" - "testing" - "time" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/extension/extensiontest" -) - -func TestFactory(t *testing.T) { - f := NewFactory() - expectType := "http_forwarder" - require.Equal(t, component.Type(expectType), f.Type()) - - cfg := f.CreateDefaultConfig().(*Config) - require.Equal(t, ":6060", cfg.Ingress.Endpoint) - require.Equal(t, 10*time.Second, cfg.Egress.Timeout) - - tests := []struct { - name string - config *Config - wantErr bool - wantErrMessage string - }{ - { - name: "Default config", - config: cfg, - wantErr: true, - wantErrMessage: "'egress.endpoint' config option cannot be empty", - }, - { - name: "Invalid config", - config: &Config{Egress: confighttp.HTTPClientSettings{Endpoint: "123.456.7.89:9090"}}, - wantErr: true, - wantErrMessage: "enter a valid URL for 'egress.endpoint': parse \"123.456.7.89:9090\": first path segment in URL cannot", - }, - { - name: "Valid config", - config: &Config{Egress: confighttp.HTTPClientSettings{Endpoint: "localhost:9090"}}, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - e, err := f.CreateExtension( - context.Background(), - extensiontest.NewNopCreateSettings(), - test.config, - ) - if test.wantErr { - if test.wantErrMessage != "" { - require.True(t, strings.Contains(err.Error(), test.wantErrMessage)) - } - require.Error(t, err) - require.Nil(t, e) - } else { - require.NoError(t, err) - require.NotNil(t, e) - ctx := context.Background() - require.NoError(t, e.Start(ctx, componenttest.NewNopHost())) - require.NoError(t, e.Shutdown(ctx)) - } - }) - } -} diff --git a/extension/httpforwarder/go.mod b/extension/httpforwarder/go.mod deleted file mode 100644 index 263f0ccb058a..000000000000 --- a/extension/httpforwarder/go.mod +++ /dev/null @@ -1,64 +0,0 @@ -module github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder - -go 1.20 - -require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.uber.org/zap v1.26.0 -) - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // 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.2 // 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.20220423185008-bf980b35cac4 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rs/cors v1.10.1 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) - -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => ../../internal/common - -retract ( - v0.76.2 - v0.76.1 - v0.65.0 -) diff --git a/extension/httpforwarder/go.sum b/extension/httpforwarder/go.sum deleted file mode 100644 index d46c35f86573..000000000000 --- a/extension/httpforwarder/go.sum +++ /dev/null @@ -1,137 +0,0 @@ -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/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.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.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-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -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/extension/httpforwarder/internal/metadata/generated_status.go b/extension/httpforwarder/internal/metadata/generated_status.go deleted file mode 100644 index 652f394f99f8..000000000000 --- a/extension/httpforwarder/internal/metadata/generated_status.go +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/collector/component" -) - -const ( - Type = "http_forwarder" - ExtensionStability = component.StabilityLevelBeta -) diff --git a/extension/httpforwarder/metadata.yaml b/extension/httpforwarder/metadata.yaml deleted file mode 100644 index 0b8eebc2cbbe..000000000000 --- a/extension/httpforwarder/metadata.yaml +++ /dev/null @@ -1,9 +0,0 @@ -type: http_forwarder - -status: - class: extension - stability: - beta: [extension] - distributions: [contrib, splunk, sumo] - codeowners: - active: [atoulme, rmfitzpatrick] diff --git a/extension/httpforwarder/testdata/config.yaml b/extension/httpforwarder/testdata/config.yaml deleted file mode 100644 index 1501cdd95903..000000000000 --- a/extension/httpforwarder/testdata/config.yaml +++ /dev/null @@ -1,9 +0,0 @@ -http_forwarder: -http_forwarder/1: - ingress: - endpoint: http://localhost:7070 - egress: - endpoint: http://target/ - headers: - otel_http_forwarder: dev - timeout: 5s diff --git a/processor/servicegraphprocessor/Makefile b/extension/httpforwarderextension/Makefile similarity index 100% rename from processor/servicegraphprocessor/Makefile rename to extension/httpforwarderextension/Makefile diff --git a/extension/httpforwarderextension/README.md b/extension/httpforwarderextension/README.md new file mode 100644 index 000000000000..bde8f0f080db --- /dev/null +++ b/extension/httpforwarderextension/README.md @@ -0,0 +1,45 @@ +# HTTP Forwarder Extension + +| Status | | +| ------------- |-----------| +| Stability | [beta] | +| Distributions | [] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fhttpforwarder%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fhttpforwarder) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fhttpforwarder%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fhttpforwarder) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@atoulme](https://www.github.com/atoulme), [@rmfitzpatrick](https://www.github.com/rmfitzpatrick) | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta + + +This extension accepts HTTP requests, optionally adds headers to them and forwards them. +The RequestURIs of the original requests are preserved by the extension. + +## Configuration + +The following settings are required: + +- `egress`: HTTP config settings to use for forwarding requests. + - `endpoint` (no default): The target to which requests should be forwarded to. + +The following settings can be optionally configured: + +- `ingress`: HTTP config settings for HTTP server listening to requests. + - `endpoint` (default = `0.0.0.0:6060`): The host to which requests should be forwarded to. +- `egress`: HTTP config settings to use for forwarding requests. + - `headers` (default = `nil`): Additional headers to be added to all requests passing through the extension. + - `timeout` (default = `10s`): How long to wait for each request to complete. + +### Example + +```yaml + http_forwarder: + ingress: + endpoint: localhost:7070 + egress: + endpoint: http://target/ + headers: + otel_http_forwarder: dev + timeout: 5s +``` + +The full list of settings exposed for this exporter are documented [here](config.go) +with detailed sample configurations [here](testdata/config.yaml). diff --git a/extension/httpforwarderextension/config.go b/extension/httpforwarderextension/config.go new file mode 100644 index 000000000000..96d5b3f0a155 --- /dev/null +++ b/extension/httpforwarderextension/config.go @@ -0,0 +1,18 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package httpforwarderextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension" + +import ( + "go.opentelemetry.io/collector/config/confighttp" +) + +// Config defines configuration for http forwarder extension. +type Config struct { + + // Ingress holds config settings for HTTP server listening for requests. + Ingress confighttp.ServerConfig `mapstructure:"ingress"` + + // Egress holds config settings to use for forwarded requests. + Egress confighttp.ClientConfig `mapstructure:"egress"` +} diff --git a/extension/httpforwarderextension/config_test.go b/extension/httpforwarderextension/config_test.go new file mode 100644 index 000000000000..9837e27f84bc --- /dev/null +++ b/extension/httpforwarderextension/config_test.go @@ -0,0 +1,65 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package httpforwarderextension + +import ( + "path/filepath" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/confmap/confmaptest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension/internal/metadata" +) + +func TestLoadConfig(t *testing.T) { + t.Parallel() + maxIdleConns := 42 + idleConnTimeout := 80 * time.Second + + tests := []struct { + id component.ID + expected component.Config + }{ + { + id: component.NewID(metadata.Type), + expected: NewFactory().CreateDefaultConfig(), + }, + { + id: component.NewIDWithName(metadata.Type, "1"), + expected: &Config{ + Ingress: confighttp.ServerConfig{ + Endpoint: "http://localhost:7070", + }, + Egress: confighttp.ClientConfig{ + Endpoint: "http://target/", + Headers: map[string]configopaque.String{ + "otel_http_forwarder": "dev", + }, + MaxIdleConns: &maxIdleConns, + IdleConnTimeout: &idleConnTimeout, + Timeout: 5 * time.Second, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.id.String(), func(t *testing.T) { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub(tt.id.String()) + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + assert.NoError(t, component.ValidateConfig(cfg)) + assert.Equal(t, tt.expected, cfg) + }) + } +} diff --git a/extension/httpforwarderextension/doc.go b/extension/httpforwarderextension/doc.go new file mode 100644 index 000000000000..0e6f5dcb5d86 --- /dev/null +++ b/extension/httpforwarderextension/doc.go @@ -0,0 +1,7 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +// Package httpforwarderextension accepts HTTP requests, optionally adds headers to them and forwards them. +package httpforwarderextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension" diff --git a/extension/httpforwarderextension/extension.go b/extension/httpforwarderextension/extension.go new file mode 100644 index 000000000000..806e38325cfc --- /dev/null +++ b/extension/httpforwarderextension/extension.go @@ -0,0 +1,130 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package httpforwarderextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension" + +import ( + "context" + "errors" + "fmt" + "io" + "net/http" + "net/url" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" + "go.uber.org/zap" +) + +type httpForwarder struct { + forwardTo *url.URL + httpClient *http.Client + server *http.Server + settings component.TelemetrySettings + config *Config +} + +var _ extension.Extension = (*httpForwarder)(nil) + +func (h *httpForwarder) Start(ctx context.Context, host component.Host) error { + listener, err := h.config.Ingress.ToListenerContext(ctx) + if err != nil { + return fmt.Errorf("failed to bind to address %s: %w", h.config.Ingress.Endpoint, err) + } + + httpClient, err := h.config.Egress.ToClientContext(ctx, host, h.settings) + if err != nil { + return fmt.Errorf("failed to create HTTP Client: %w", err) + } + h.httpClient = httpClient + + handler := http.NewServeMux() + handler.HandleFunc("/", h.forwardRequest) + + h.server, err = h.config.Ingress.ToServerContext(ctx, host, h.settings, handler) + if err != nil { + return fmt.Errorf("failed to create HTTP Client: %w", err) + } + + go func() { + if errHTTP := h.server.Serve(listener); !errors.Is(errHTTP, http.ErrServerClosed) && errHTTP != nil { + h.settings.ReportStatus(component.NewFatalErrorEvent(errHTTP)) + } + }() + + return nil +} + +func (h *httpForwarder) Shutdown(_ context.Context) error { + if h.server == nil { + return nil + } + return h.server.Close() +} + +func (h *httpForwarder) forwardRequest(writer http.ResponseWriter, request *http.Request) { + forwarderRequest := request.Clone(request.Context()) + forwarderRequest.URL.Host = h.forwardTo.Host + forwarderRequest.URL.Scheme = h.forwardTo.Scheme + forwarderRequest.Host = h.forwardTo.Host + // Clear RequestURI to avoid getting "http: Request.RequestURI can't be set in client requests" error. + forwarderRequest.RequestURI = "" + + // Add additional headers. + for k, v := range h.config.Egress.Headers { + forwarderRequest.Header.Add(k, string(v)) + } + + // Add "Via" header for tracking purposes on both the outgoing requests and responses. + // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Via. + addViaHeader(forwarderRequest.Header, request.Proto, request.Host) + + response, err := h.httpClient.Do(forwarderRequest) + if err != nil { + http.Error(writer, err.Error(), http.StatusBadGateway) + } + + if response == nil { + return + } + defer response.Body.Close() + + // Copy over response from the final destination. + for k := range response.Header { + writer.Header().Set(k, response.Header.Get(k)) + } + addViaHeader(writer.Header(), response.Proto, request.Host) + + writer.WriteHeader(response.StatusCode) + written, err := io.Copy(writer, response.Body) + if err != nil { + h.settings.Logger.Warn("Error writing HTTP response message", zap.Error(err)) + } + + if response.ContentLength != written { + h.settings.Logger.Warn("Response from target not fully copied, body might be corrupted") + } +} + +func addViaHeader(header http.Header, protocol string, host string) { + header.Add("Via", fmt.Sprintf("%s %s", protocol, host)) +} + +func newHTTPForwarder(config *Config, settings component.TelemetrySettings) (extension.Extension, error) { + if config.Egress.Endpoint == "" { + return nil, errors.New("'egress.endpoint' config option cannot be empty") + } + + var url, err = url.Parse(config.Egress.Endpoint) + if err != nil { + return nil, fmt.Errorf("enter a valid URL for 'egress.endpoint': %w", err) + } + + h := &httpForwarder{ + config: config, + forwardTo: url, + settings: settings, + } + + return h, nil +} diff --git a/extension/httpforwarderextension/extension_test.go b/extension/httpforwarderextension/extension_test.go new file mode 100644 index 000000000000..7e3563bf6fe8 --- /dev/null +++ b/extension/httpforwarderextension/extension_test.go @@ -0,0 +1,272 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package httpforwarderextension + +import ( + "context" + "fmt" + "io" + "net/http" + "net/http/httptest" + "net/url" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configtls" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" +) + +type clientRequestArgs struct { + method string + url string + headers map[string]string + body string +} + +func TestExtension(t *testing.T) { + listenAt := testutil.GetAvailableLocalAddress(t) + tests := []struct { + name string + config *Config + expectedbackendStatusCode int + expectedBackendResponseBody []byte + expectedHeaders map[string]configopaque.String + httpErrorFromBackend bool + requestErrorAtForwarder bool + clientRequestArgs clientRequestArgs + startUpError bool + startUpErrorMessage string + }{ + { + name: "No additional headers", + config: &Config{ + Ingress: confighttp.ServerConfig{ + Endpoint: listenAt, + }, + }, + expectedbackendStatusCode: http.StatusAccepted, + expectedBackendResponseBody: []byte("hello world"), + expectedHeaders: map[string]configopaque.String{ + "header": "value", + }, + clientRequestArgs: clientRequestArgs{ + method: "GET", + url: fmt.Sprintf("http://%s/api/dosomething", listenAt), + headers: map[string]string{ + "client_header": "val1", + }, + body: "client_body", + }, + }, + { + name: "With additional headers", + config: &Config{ + Ingress: confighttp.ServerConfig{ + Endpoint: listenAt, + }, + Egress: confighttp.ClientConfig{ + Headers: map[string]configopaque.String{ + "key": "value", + }, + }, + }, + expectedbackendStatusCode: http.StatusAccepted, + expectedBackendResponseBody: []byte("hello world with additional headers"), + expectedHeaders: map[string]configopaque.String{ + "header": "value", + }, + clientRequestArgs: clientRequestArgs{ + method: "PUT", + url: fmt.Sprintf("http://%s/api/dosomething", listenAt), + }, + }, + { + name: "Error code from backend", + config: &Config{ + Ingress: confighttp.ServerConfig{ + Endpoint: listenAt, + }, + Egress: confighttp.ClientConfig{ + Headers: map[string]configopaque.String{ + "key": "value", + }, + }, + }, + expectedbackendStatusCode: http.StatusInternalServerError, + expectedBackendResponseBody: []byte("\n"), + httpErrorFromBackend: true, + clientRequestArgs: clientRequestArgs{ + method: "PATCH", + url: fmt.Sprintf("http://%s/api/dosomething", listenAt), + }, + }, + { + name: "Error making request at forwarder", + config: &Config{ + Ingress: confighttp.ServerConfig{ + Endpoint: listenAt, + }, + Egress: confighttp.ClientConfig{ + Headers: map[string]configopaque.String{ + "key": "value", + }, + }, + }, + expectedbackendStatusCode: http.StatusBadGateway, + expectedBackendResponseBody: []byte("\n"), + requestErrorAtForwarder: true, + clientRequestArgs: clientRequestArgs{ + method: "GET", + url: fmt.Sprintf("http://%s/api/dosomething", listenAt), + }, + }, + { + name: "Invalid config - HTTP Client creation fails", + config: &Config{ + Egress: confighttp.ClientConfig{ + Endpoint: "localhost:9090", + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ + CAFile: "/non/existent", + }, + }, + }, + }, + startUpError: true, + startUpErrorMessage: "failed to create HTTP Client: ", + }, + { + name: "Error on Startup", + config: &Config{ + Ingress: confighttp.ServerConfig{ + Endpoint: "invalid", // to mock error setting up listener. + }, + }, + startUpError: true, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + backend := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if test.httpErrorFromBackend { + http.Error(w, "", http.StatusInternalServerError) + return + } + + assert.Equal(t, getParsedURL(t, test.clientRequestArgs.url).RequestURI(), r.RequestURI) + assert.Equal(t, test.clientRequestArgs.method, r.Method) + assert.Equal(t, test.clientRequestArgs.body, string(readBody(r.Body))) + + // Assert headers originating from client. + for k, v := range test.clientRequestArgs.headers { + got := r.Header.Get(k) + assert.Equal(t, v, got) + } + + // Assert additional headers added by forwarder. + for k, v := range test.config.Egress.Headers { + got := r.Header.Get(k) + assert.Equal(t, string(v), got) + } + + // Assert Via header added by the forwarder on all requests. + assert.Equal(t, fmt.Sprintf("%s %s", r.Proto, listenAt), r.Header.Get("Via")) + + for k, v := range test.expectedHeaders { + w.Header().Set(k, string(v)) + } + w.WriteHeader(test.expectedbackendStatusCode) + _, err := w.Write(test.expectedBackendResponseBody) + assert.NoError(t, err) + })) + defer backend.Close() + + // Fill in final destination URL. + backendURL, _ := url.Parse(backend.URL) + test.config.Egress.Endpoint = backendURL.String() + + // Setup forwarder with wrong final address to mock failures. + if test.requestErrorAtForwarder { + test.config.Egress.Endpoint = "http://" + testutil.GetAvailableLocalAddress(t) + } + + hf, err := newHTTPForwarder(test.config, componenttest.NewNopTelemetrySettings()) + require.NoError(t, err) + + ctx := context.Background() + if test.startUpError { + err = hf.Start(ctx, componenttest.NewNopHost()) + if test.startUpErrorMessage != "" { + require.True(t, strings.Contains(err.Error(), test.startUpErrorMessage)) + } + require.Error(t, err) + + return + } + require.NoError(t, hf.Start(ctx, componenttest.NewNopHost())) + + // Mock a client trying to talk to backend using the forwarder. + httpClient := http.Client{} + + // Assert responses received by client. + response, err := httpClient.Do(httpRequest(t, test.clientRequestArgs)) + require.NoError(t, err) + require.NotNil(t, response) + defer response.Body.Close() + + assert.Equal(t, test.expectedbackendStatusCode, response.StatusCode) + if !test.requestErrorAtForwarder { + assert.Equal(t, string(test.expectedBackendResponseBody), string(readBody(response.Body))) + assert.Equal(t, fmt.Sprintf("%s %s", response.Proto, listenAt), response.Header.Get("Via")) + } + + for k := range response.Header { + got := response.Header.Get(k) + header := strings.ToLower(k) + if want, ok := test.expectedHeaders[header]; ok { + assert.Equal(t, want, configopaque.String(got)) + continue + } + + if k == "Content-Length" || k == "Content-Type" || k == "X-Content-Type-Options" || k == "Date" || k == "Via" { + // Content-Length, Content-Type, X-Content-Type-Options and Date are certain headers added by default. + // Assertion for Via is done above. + continue + } + t.Error("unexpected header found in response: ", k) + } + + require.NoError(t, hf.Shutdown(ctx)) + }) + } +} + +func httpRequest(t *testing.T, args clientRequestArgs) *http.Request { + r, err := http.NewRequest(args.method, args.url, io.NopCloser(strings.NewReader(args.body))) + require.NoError(t, err) + + for k, v := range args.headers { + r.Header.Set(k, v) + } + + return r +} + +func readBody(body io.ReadCloser) []byte { + out, _ := io.ReadAll(body) + return out +} + +func getParsedURL(t *testing.T, rawURL string) *url.URL { + var url, err = url.Parse(rawURL) + require.NoError(t, err) + return url +} diff --git a/extension/httpforwarderextension/factory.go b/extension/httpforwarderextension/factory.go new file mode 100644 index 000000000000..57ce1eb3a576 --- /dev/null +++ b/extension/httpforwarderextension/factory.go @@ -0,0 +1,48 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package httpforwarderextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension" + +import ( + "context" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/extension" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension/internal/metadata" +) + +const ( + // Default endpoints to bind to. + defaultEndpoint = ":6060" +) + +// NewFactory creates a factory for HostObserver extension. +func NewFactory() extension.Factory { + return extension.NewFactory( + metadata.Type, + createDefaultConfig, + createExtension, + metadata.ExtensionStability) +} + +func createDefaultConfig() component.Config { + httpClientSettings := confighttp.NewDefaultClientConfig() + httpClientSettings.Timeout = 10 * time.Second + return &Config{ + Ingress: confighttp.ServerConfig{ + Endpoint: defaultEndpoint, + }, + Egress: httpClientSettings, + } +} + +func createExtension( + _ context.Context, + params extension.CreateSettings, + cfg component.Config, +) (extension.Extension, error) { + return newHTTPForwarder(cfg.(*Config), params.TelemetrySettings) +} diff --git a/extension/httpforwarderextension/factory_test.go b/extension/httpforwarderextension/factory_test.go new file mode 100644 index 000000000000..3eef3c3330f2 --- /dev/null +++ b/extension/httpforwarderextension/factory_test.go @@ -0,0 +1,73 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package httpforwarderextension + +import ( + "context" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestFactory(t *testing.T) { + f := NewFactory() + expectType := component.MustNewType("http_forwarder") + require.Equal(t, expectType, f.Type()) + + cfg := f.CreateDefaultConfig().(*Config) + require.Equal(t, ":6060", cfg.Ingress.Endpoint) + require.Equal(t, 10*time.Second, cfg.Egress.Timeout) + + tests := []struct { + name string + config *Config + wantErr bool + wantErrMessage string + }{ + { + name: "Default config", + config: cfg, + wantErr: true, + wantErrMessage: "'egress.endpoint' config option cannot be empty", + }, + { + name: "Invalid config", + config: &Config{Egress: confighttp.ClientConfig{Endpoint: "123.456.7.89:9090"}}, + wantErr: true, + wantErrMessage: "enter a valid URL for 'egress.endpoint': parse \"123.456.7.89:9090\": first path segment in URL cannot", + }, + { + name: "Valid config", + config: &Config{Egress: confighttp.ClientConfig{Endpoint: "localhost:9090"}}, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + e, err := f.CreateExtension( + context.Background(), + extensiontest.NewNopCreateSettings(), + test.config, + ) + if test.wantErr { + if test.wantErrMessage != "" { + require.True(t, strings.Contains(err.Error(), test.wantErrMessage)) + } + require.Error(t, err) + require.Nil(t, e) + } else { + require.NoError(t, err) + require.NotNil(t, e) + ctx := context.Background() + require.NoError(t, e.Start(ctx, componenttest.NewNopHost())) + require.NoError(t, e.Shutdown(ctx)) + } + }) + } +} diff --git a/extension/httpforwarderextension/generated_component_test.go b/extension/httpforwarderextension/generated_component_test.go new file mode 100644 index 000000000000..9b0d80b0414e --- /dev/null +++ b/extension/httpforwarderextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package httpforwarderextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/httpforwarderextension/go.mod b/extension/httpforwarderextension/go.mod new file mode 100644 index 000000000000..83d120b55011 --- /dev/null +++ b/extension/httpforwarderextension/go.mod @@ -0,0 +1,69 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension + +go 1.21 + +require ( + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.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.1 // 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/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.6.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect + github.com/klauspost/compress v1.17.8 // 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.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rs/cors v1.10.1 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => ../../internal/common diff --git a/extension/httpforwarderextension/go.sum b/extension/httpforwarderextension/go.sum new file mode 100644 index 000000000000..f740c8c3d17a --- /dev/null +++ b/extension/httpforwarderextension/go.sum @@ -0,0 +1,167 @@ +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/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/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +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/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.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/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/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +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.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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/extension/httpforwarderextension/internal/metadata/generated_status.go b/extension/httpforwarderextension/internal/metadata/generated_status.go new file mode 100644 index 000000000000..973a3a3135ed --- /dev/null +++ b/extension/httpforwarderextension/internal/metadata/generated_status.go @@ -0,0 +1,25 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("http_forwarder") +) + +const ( + ExtensionStability = component.StabilityLevelBeta +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/httpforwarder") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/httpforwarder") +} diff --git a/extension/httpforwarderextension/metadata.yaml b/extension/httpforwarderextension/metadata.yaml new file mode 100644 index 000000000000..566cda76d1e3 --- /dev/null +++ b/extension/httpforwarderextension/metadata.yaml @@ -0,0 +1,17 @@ +type: http_forwarder +scope_name: otelcol/httpforwarder + +status: + class: extension + stability: + beta: [extension] + distributions: [] + codeowners: + active: [atoulme, rmfitzpatrick] + +tests: + config: + ingress: + endpoint: localhost:7070 + egress: + endpoint: http://target/ \ No newline at end of file diff --git a/extension/httpforwarderextension/package_test.go b/extension/httpforwarderextension/package_test.go new file mode 100644 index 000000000000..0a8c3ea182f1 --- /dev/null +++ b/extension/httpforwarderextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package httpforwarderextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/httpforwarderextension/testdata/config.yaml b/extension/httpforwarderextension/testdata/config.yaml new file mode 100644 index 000000000000..2d6e17e95d9a --- /dev/null +++ b/extension/httpforwarderextension/testdata/config.yaml @@ -0,0 +1,11 @@ +http_forwarder: +http_forwarder/1: + ingress: + endpoint: http://localhost:7070 + egress: + endpoint: http://target/ + headers: + otel_http_forwarder: dev + idle_conn_timeout: 80s + max_idle_conns: 42 + timeout: 5s diff --git a/extension/jaegerremotesampling/README.md b/extension/jaegerremotesampling/README.md index 99cf83823d2a..74b45961535e 100644 --- a/extension/jaegerremotesampling/README.md +++ b/extension/jaegerremotesampling/README.md @@ -3,22 +3,22 @@ | Status | | | ------------- |-----------| | Stability | [alpha] | -| Distributions | [contrib], [grafana], [redhat], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fjaegerremotesampling%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fjaegerremotesampling) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fjaegerremotesampling%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fjaegerremotesampling) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling), [@frzifus](https://www.github.com/frzifus) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@yurishkuro](https://www.github.com/yurishkuro), [@frzifus](https://www.github.com/frzifus) | [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[grafana]: https://github.com/grafana/agent -[redhat]: https://github.com/os-observability/redhat-opentelemetry-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector This extension allows serving sampling strategies following the Jaeger's remote sampling API. This extension can be configured to proxy requests to a backing remote sampling server, which could potentially be a Jaeger Collector down the pipeline, or a static JSON file from the local file system. By default, two listeners are made available: -- `localhost:5778`, following the legacy remote sampling endpoint as defined by Jaeger -- `localhost:14250`, following the gRPC remote sampling endpoint, also defined by Jaeger +- `0.0.0.0:5778`, following the legacy remote sampling endpoint as defined by Jaeger +- `0.0.0.0:14250`, following the gRPC remote sampling endpoint, also defined by Jaeger + +The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:9943. This will become the default in a future release. + Note that the port `14250` will clash with the Jaeger Receiver. When both are used, it's recommended to change this extension to use another port. diff --git a/extension/jaegerremotesampling/config.go b/extension/jaegerremotesampling/config.go index 4847e323cd41..ae7520aaca15 100644 --- a/extension/jaegerremotesampling/config.go +++ b/extension/jaegerremotesampling/config.go @@ -21,8 +21,8 @@ var ( // Config has the configuration for the extension enabling the health check // extension, used to report the health status of the service. type Config struct { - *confighttp.HTTPServerSettings `mapstructure:"http"` - *configgrpc.GRPCServerSettings `mapstructure:"grpc"` + HTTPServerConfig *confighttp.ServerConfig `mapstructure:"http"` + GRPCServerConfig *configgrpc.ServerConfig `mapstructure:"grpc"` // Source configures the source for the strategies file. One of `remote` or `file` has to be specified. Source Source `mapstructure:"source"` @@ -30,7 +30,7 @@ type Config struct { type Source struct { // Remote defines the remote location for the file - Remote *configgrpc.GRPCClientSettings `mapstructure:"remote"` + Remote *configgrpc.ClientConfig `mapstructure:"remote"` // File specifies a local file as the strategies source File string `mapstructure:"file"` @@ -43,7 +43,7 @@ var _ component.Config = (*Config)(nil) // Validate checks if the extension configuration is valid func (cfg *Config) Validate() error { - if cfg.HTTPServerSettings == nil && cfg.GRPCServerSettings == nil { + if cfg.HTTPServerConfig == nil && cfg.GRPCServerConfig == nil { return errAtLeastOneProtocol } diff --git a/extension/jaegerremotesampling/config_test.go b/extension/jaegerremotesampling/config_test.go index fb36f1abd6cf..cd9ef017e888 100644 --- a/extension/jaegerremotesampling/config_test.go +++ b/extension/jaegerremotesampling/config_test.go @@ -29,13 +29,13 @@ func TestLoadConfig(t *testing.T) { { id: component.NewID(metadata.Type), expected: &Config{ - HTTPServerSettings: &confighttp.HTTPServerSettings{Endpoint: ":5778"}, - GRPCServerSettings: &configgrpc.GRPCServerSettings{NetAddr: confignet.NetAddr{ - Endpoint: ":14250", - Transport: "tcp", + HTTPServerConfig: &confighttp.ServerConfig{Endpoint: "0.0.0.0:5778"}, + GRPCServerConfig: &configgrpc.ServerConfig{NetAddr: confignet.AddrConfig{ + Endpoint: "0.0.0.0:14250", + Transport: confignet.TransportTypeTCP, }}, Source: Source{ - Remote: &configgrpc.GRPCClientSettings{ + Remote: &configgrpc.ClientConfig{ Endpoint: "jaeger-collector:14250", }, }, @@ -44,10 +44,10 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "1"), expected: &Config{ - HTTPServerSettings: &confighttp.HTTPServerSettings{Endpoint: ":5778"}, - GRPCServerSettings: &configgrpc.GRPCServerSettings{NetAddr: confignet.NetAddr{ - Endpoint: ":14250", - Transport: "tcp", + HTTPServerConfig: &confighttp.ServerConfig{Endpoint: "0.0.0.0:5778"}, + GRPCServerConfig: &configgrpc.ServerConfig{NetAddr: confignet.AddrConfig{ + Endpoint: "0.0.0.0:14250", + Transport: confignet.TransportTypeTCP, }}, Source: Source{ ReloadInterval: time.Second, @@ -86,16 +86,16 @@ func TestValidate(t *testing.T) { { desc: "no sources", cfg: Config{ - GRPCServerSettings: &configgrpc.GRPCServerSettings{}, + GRPCServerConfig: &configgrpc.ServerConfig{}, }, expected: errNoSources, }, { desc: "too many sources", cfg: Config{ - GRPCServerSettings: &configgrpc.GRPCServerSettings{}, + GRPCServerConfig: &configgrpc.ServerConfig{}, Source: Source{ - Remote: &configgrpc.GRPCClientSettings{}, + Remote: &configgrpc.ClientConfig{}, File: "/tmp/some-file", }, }, diff --git a/extension/jaegerremotesampling/extension.go b/extension/jaegerremotesampling/extension.go index f383262a78fe..0b3577a7d270 100644 --- a/extension/jaegerremotesampling/extension.go +++ b/extension/jaegerremotesampling/extension.go @@ -73,8 +73,8 @@ func (jrse *jrsExtension) Start(ctx context.Context, host component.Host) error jrse.samplingStore = remoteStore } - if jrse.cfg.HTTPServerSettings != nil { - httpServer, err := internal.NewHTTP(jrse.telemetry, *jrse.cfg.HTTPServerSettings, jrse.samplingStore) + if jrse.cfg.HTTPServerConfig != nil { + httpServer, err := internal.NewHTTP(jrse.telemetry, *jrse.cfg.HTTPServerConfig, jrse.samplingStore) if err != nil { return fmt.Errorf("error while creating the HTTP server: %w", err) } @@ -85,8 +85,8 @@ func (jrse *jrsExtension) Start(ctx context.Context, host component.Host) error } } - if jrse.cfg.GRPCServerSettings != nil { - grpcServer, err := internal.NewGRPC(jrse.telemetry, *jrse.cfg.GRPCServerSettings, jrse.samplingStore) + if jrse.cfg.GRPCServerConfig != nil { + grpcServer, err := internal.NewGRPC(jrse.telemetry, *jrse.cfg.GRPCServerConfig, jrse.samplingStore) if err != nil { return fmt.Errorf("error while creating the gRPC server: %w", err) } diff --git a/extension/jaegerremotesampling/extension_test.go b/extension/jaegerremotesampling/extension_test.go index 8a1fdc5008c1..072b45268e76 100644 --- a/extension/jaegerremotesampling/extension_test.go +++ b/extension/jaegerremotesampling/extension_test.go @@ -94,14 +94,15 @@ func TestRemote(t *testing.T) { err = server.Serve(lis) require.NoError(t, err) }() + defer func() { server.Stop() }() // create the config, pointing to the mock server cfg := testConfig() - cfg.GRPCServerSettings.NetAddr.Endpoint = "127.0.0.1:0" + cfg.GRPCServerConfig.NetAddr.Endpoint = "127.0.0.1:0" cfg.Source.ReloadInterval = tc.reloadInterval - cfg.Source.Remote = &configgrpc.GRPCClientSettings{ + cfg.Source.Remote = &configgrpc.ClientConfig{ Endpoint: fmt.Sprintf("127.0.0.1:%d", lis.Addr().(*net.TCPAddr).Port), - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, // test only }, WaitForReady: true, @@ -120,6 +121,7 @@ func TestRemote(t *testing.T) { resp, err := http.Get("http://127.0.0.1:5778/sampling?service=foo") assert.NoError(t, err) assert.Equal(t, 200, resp.StatusCode) + assert.NoError(t, resp.Body.Close()) } // shut down the server @@ -163,7 +165,7 @@ func (s *samplingServer) GetSamplingStrategy(ctx context.Context, params *api_v2 func testConfig() *Config { cfg := createDefaultConfig().(*Config) - cfg.HTTPServerSettings.Endpoint = "127.0.0.1:5778" - cfg.GRPCServerSettings.NetAddr.Endpoint = "127.0.0.1:14250" + cfg.HTTPServerConfig.Endpoint = "127.0.0.1:5778" + cfg.GRPCServerConfig.NetAddr.Endpoint = "127.0.0.1:14250" return cfg } diff --git a/extension/jaegerremotesampling/factory.go b/extension/jaegerremotesampling/factory.go index 5e58da518306..a952674da6ef 100644 --- a/extension/jaegerremotesampling/factory.go +++ b/extension/jaegerremotesampling/factory.go @@ -15,16 +15,12 @@ import ( "go.opentelemetry.io/collector/featuregate" "go.uber.org/zap" - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/localhostgate" ) // NewFactory creates a factory for the jaeger remote sampling extension. func NewFactory() extension.Factory { - if !protoGate.IsEnabled() { - return jaegerremotesamplingdeprecated.NewFactory() - } - return extension.NewFactory( metadata.Type, createDefaultConfig, @@ -35,13 +31,13 @@ func NewFactory() extension.Factory { func createDefaultConfig() component.Config { return &Config{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ - Endpoint: ":5778", + HTTPServerConfig: &confighttp.ServerConfig{ + Endpoint: localhostgate.EndpointForPort(5778), }, - GRPCServerSettings: &configgrpc.GRPCServerSettings{ - NetAddr: confignet.NetAddr{ - Endpoint: ":14250", - Transport: "tcp", + GRPCServerConfig: &configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ + Endpoint: localhostgate.EndpointForPort(14250), + Transport: confignet.TransportTypeTCP, }, }, Source: Source{}, @@ -56,14 +52,14 @@ func logDeprecation(logger *zap.Logger) { }) } -const protoInsteadOfThrift = "extension.jaegerremotesampling.replaceThriftWithProto" - +// nolint var protoGate = featuregate.GlobalRegistry().MustRegister( - protoInsteadOfThrift, - featuregate.StageBeta, + "extension.jaegerremotesampling.replaceThriftWithProto", + featuregate.StageStable, featuregate.WithRegisterDescription( "When enabled, the jaegerremotesampling will use Proto-gen over Thrift-gen.", ), + featuregate.WithRegisterToVersion("0.92.0"), ) func createExtension(_ context.Context, set extension.CreateSettings, cfg component.Config) (extension.Extension, error) { diff --git a/extension/jaegerremotesampling/factory_test.go b/extension/jaegerremotesampling/factory_test.go index 36588b59c9d1..10b37cec0f09 100644 --- a/extension/jaegerremotesampling/factory_test.go +++ b/extension/jaegerremotesampling/factory_test.go @@ -18,10 +18,10 @@ import ( func TestCreateDefaultConfig(t *testing.T) { // prepare and test expected := &Config{ - HTTPServerSettings: &confighttp.HTTPServerSettings{Endpoint: ":5778"}, - GRPCServerSettings: &configgrpc.GRPCServerSettings{NetAddr: confignet.NetAddr{ - Endpoint: ":14250", - Transport: "tcp", + HTTPServerConfig: &confighttp.ServerConfig{Endpoint: "0.0.0.0:5778"}, + GRPCServerConfig: &configgrpc.ServerConfig{NetAddr: confignet.AddrConfig{ + Endpoint: "0.0.0.0:14250", + Transport: confignet.TransportTypeTCP, }}, } diff --git a/extension/jaegerremotesampling/generated_component_test.go b/extension/jaegerremotesampling/generated_component_test.go new file mode 100644 index 000000000000..33dedb1680c5 --- /dev/null +++ b/extension/jaegerremotesampling/generated_component_test.go @@ -0,0 +1,30 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package jaegerremotesampling + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) +} diff --git a/extension/jaegerremotesampling/go.mod b/extension/jaegerremotesampling/go.mod index fec1ba8f2315..be3be59d0afe 100644 --- a/extension/jaegerremotesampling/go.mod +++ b/extension/jaegerremotesampling/go.mod @@ -1,78 +1,89 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling -go 1.20 +go 1.21 require ( github.com/fortytw2/leaktest v1.3.0 - github.com/jaegertracing/jaeger v1.48.0 - github.com/spf13/viper v1.16.0 - github.com/stretchr/testify v1.8.4 + github.com/jaegertracing/jaeger v1.55.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/stretchr/testify v1.9.0 github.com/tilinna/clock v1.1.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configgrpc v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/confignet v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 - google.golang.org/grpc v1.59.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configgrpc v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/confignet v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/featuregate v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + google.golang.org/grpc v1.63.2 ) require ( github.com/apache/thrift v0.19.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + 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.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/googleapis v1.4.1 // 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/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect + github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/mostynb/go-grpc-compression v1.2.2 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/subosito/gotenv v1.4.2 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/atomic v1.11.0 // indirect + github.com/spf13/viper v1.18.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -82,3 +93,5 @@ retract ( v0.76.1 v0.65.0 ) + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => ../../internal/common diff --git a/extension/jaegerremotesampling/go.sum b/extension/jaegerremotesampling/go.sum index 4c15a4993115..5b0806ab09c8 100644 --- a/extension/jaegerremotesampling/go.sum +++ b/extension/jaegerremotesampling/go.sum @@ -1,627 +1,229 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/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/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/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/jaegertracing/jaeger v1.48.0 h1:YuKooQ7qJsjgxws9xuf8C/BLNTPx8qTAJz4wv7IHhSc= -github.com/jaegertracing/jaeger v1.48.0/go.mod h1:BoAPkdCAIEuLsVz/EDhjXd+GSVpHtJhiGqWoFEvBCKg= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +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/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/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= +github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +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/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +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/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= 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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.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.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -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/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/tilinna/clock v1.1.0 h1:6IQQQCo6KoBxVudv6gwtY8o4eDfhHo8ojA5dP0MfhSs= github.com/tilinna/clock v1.1.0/go.mod h1:ZsP7BcY7sEEz7ktc0IVy8Us6boDrK8VradlKRUGfOao= -github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opentelemetry.io/collector v0.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/configgrpc v0.89.0/go.mod h1:2GuAxpU34a1X19kCZ8Kw3FUsxOIiFcWHiYorRCyhnCc= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a h1:a2MQQVoTo96JC9PMGtGBymLp7+/RzpFc2yX/9WfFg1c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/yaml.v2 v2.2.2/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= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/extension/jaegerremotesampling/internal/grpc.go b/extension/jaegerremotesampling/internal/grpc.go index 75864dc00b2b..d3afc1b7e9d3 100644 --- a/extension/jaegerremotesampling/internal/grpc.go +++ b/extension/jaegerremotesampling/internal/grpc.go @@ -33,7 +33,7 @@ type grpcServer interface { // NewGRPC returns a new sampling gRPC Server. func NewGRPC( telemetry component.TelemetrySettings, - settings configgrpc.GRPCServerSettings, + settings configgrpc.ServerConfig, strategyStore strategystore.StrategyStore, ) (*SamplingGRPCServer, error) { if strategyStore == nil { @@ -50,14 +50,14 @@ func NewGRPC( // SamplingGRPCServer implements component.Component to make the life cycle easy to manage. type SamplingGRPCServer struct { telemetry component.TelemetrySettings - settings configgrpc.GRPCServerSettings + settings configgrpc.ServerConfig strategyStore strategystore.StrategyStore grpcServer grpcServer } -func (s *SamplingGRPCServer) Start(_ context.Context, host component.Host) error { - server, err := s.settings.ToServer(host, s.telemetry) +func (s *SamplingGRPCServer) Start(ctx context.Context, host component.Host) error { + server, err := s.settings.ToServer(ctx, host, s.telemetry) if err != nil { return err } @@ -70,7 +70,7 @@ func (s *SamplingGRPCServer) Start(_ context.Context, host component.Host) error healthServer.SetServingStatus("jaeger.api_v2.SamplingManager", grpc_health_v1.HealthCheckResponse_SERVING) grpc_health_v1.RegisterHealthServer(server, healthServer) - listener, err := s.settings.ToListener() + listener, err := s.settings.NetAddr.Listen(ctx) if err != nil { return fmt.Errorf("failed to listen on gRPC port: %w", err) } @@ -90,7 +90,7 @@ func (s *SamplingGRPCServer) Shutdown(ctx context.Context) error { return errGRPCServerNotRunning } - ch := make(chan struct{}) + ch := make(chan struct{}, 1) go func() { s.grpcServer.GracefulStop() ch <- struct{}{} diff --git a/extension/jaegerremotesampling/internal/grpc_test.go b/extension/jaegerremotesampling/internal/grpc_test.go index 9d93aff32fd8..931a88b08af0 100644 --- a/extension/jaegerremotesampling/internal/grpc_test.go +++ b/extension/jaegerremotesampling/internal/grpc_test.go @@ -17,17 +17,17 @@ import ( ) func TestMissingClientConfigManagerGRPC(t *testing.T) { - s, err := NewGRPC(componenttest.NewNopTelemetrySettings(), configgrpc.GRPCServerSettings{}, nil) + s, err := NewGRPC(componenttest.NewNopTelemetrySettings(), configgrpc.ServerConfig{}, nil) assert.Equal(t, errMissingStrategyStore, err) assert.Nil(t, s) } func TestStartAndStopGRPC(t *testing.T) { // prepare - srvSettings := configgrpc.GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + srvSettings := configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "127.0.0.1:0", - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, } s, err := NewGRPC(componenttest.NewNopTelemetrySettings(), srvSettings, &mockCfgMgr{}) @@ -54,7 +54,7 @@ func TestSamplingGRPCServer_Shutdown(t *testing.T) { { name: "graceful stop is successful with delay", grpcServer: &grpcServerMock{ - timeToGracefulStop: 5 * time.Second, + timeToGracefulStop: time.Millisecond, }, timeout: time.Minute, }, @@ -63,12 +63,7 @@ func TestSamplingGRPCServer_Shutdown(t *testing.T) { grpcServer: &grpcServerMock{ timeToGracefulStop: time.Minute, }, - timeout: 5 * time.Second, - }, - { - name: "grpc server not started", - timeout: time.Minute, - expect: errGRPCServerNotRunning, + timeout: time.Millisecond, }, } @@ -76,16 +71,37 @@ func TestSamplingGRPCServer_Shutdown(t *testing.T) { t.Run(tc.name, func(t *testing.T) { srv := &SamplingGRPCServer{grpcServer: tc.grpcServer} ctx, cancel := context.WithTimeout(context.Background(), tc.timeout) + assert.NoError(t, tc.grpcServer.Serve(nil)) defer cancel() assert.Equal(t, tc.expect, srv.Shutdown(ctx)) }) } } +func TestSamplingGRPCServerNotStarted_Shutdown(t *testing.T) { + srv := &SamplingGRPCServer{} + assert.Equal(t, errGRPCServerNotRunning, srv.Shutdown(context.Background())) +} + type grpcServerMock struct { timeToGracefulStop time.Duration + timer *time.Timer + quit chan bool } -func (g *grpcServerMock) Serve(_ net.Listener) error { return nil } -func (g *grpcServerMock) Stop() {} -func (g *grpcServerMock) GracefulStop() { time.Sleep(g.timeToGracefulStop) } +func (g *grpcServerMock) Serve(_ net.Listener) error { + g.timer = time.NewTimer(g.timeToGracefulStop) + g.quit = make(chan bool) + return nil +} +func (g *grpcServerMock) Stop() { + g.quit <- true +} +func (g *grpcServerMock) GracefulStop() { + select { + case <-g.quit: + return + case <-g.timer.C: + return + } +} diff --git a/extension/jaegerremotesampling/internal/http.go b/extension/jaegerremotesampling/internal/http.go index 9f848d0106d5..5da9ac828248 100644 --- a/extension/jaegerremotesampling/internal/http.go +++ b/extension/jaegerremotesampling/internal/http.go @@ -25,7 +25,7 @@ var _ component.Component = (*SamplingHTTPServer)(nil) type SamplingHTTPServer struct { telemetry component.TelemetrySettings - settings confighttp.HTTPServerSettings + settings confighttp.ServerConfig strategyStore strategystore.StrategyStore mux *http.ServeMux @@ -33,7 +33,7 @@ type SamplingHTTPServer struct { shutdownWG *sync.WaitGroup } -func NewHTTP(telemetry component.TelemetrySettings, settings confighttp.HTTPServerSettings, strategyStore strategystore.StrategyStore) (*SamplingHTTPServer, error) { +func NewHTTP(telemetry component.TelemetrySettings, settings confighttp.ServerConfig, strategyStore strategystore.StrategyStore) (*SamplingHTTPServer, error) { if strategyStore == nil { return nil, errMissingStrategyStore } @@ -54,15 +54,15 @@ func NewHTTP(telemetry component.TelemetrySettings, settings confighttp.HTTPServ return srv, nil } -func (h *SamplingHTTPServer) Start(_ context.Context, host component.Host) error { +func (h *SamplingHTTPServer) Start(ctx context.Context, host component.Host) error { var err error - h.srv, err = h.settings.ToServer(host, h.telemetry, h.mux) + h.srv, err = h.settings.ToServerContext(ctx, host, h.telemetry, h.mux) if err != nil { return err } var hln net.Listener - hln, err = h.settings.ToListener() + hln, err = h.settings.ToListenerContext(ctx) if err != nil { return err } @@ -72,7 +72,7 @@ func (h *SamplingHTTPServer) Start(_ context.Context, host component.Host) error defer h.shutdownWG.Done() if err := h.srv.Serve(hln); err != nil && !errors.Is(err, http.ErrServerClosed) { - host.ReportFatalError(err) + h.telemetry.ReportStatus(component.NewFatalErrorEvent(err)) } }() diff --git a/extension/jaegerremotesampling/internal/http_test.go b/extension/jaegerremotesampling/internal/http_test.go index c4397c4c54d9..0ad7a113e9a5 100644 --- a/extension/jaegerremotesampling/internal/http_test.go +++ b/extension/jaegerremotesampling/internal/http_test.go @@ -21,14 +21,14 @@ import ( ) func TestMissingClientConfigManagerHTTP(t *testing.T) { - s, err := NewHTTP(componenttest.NewNopTelemetrySettings(), confighttp.HTTPServerSettings{}, nil) + s, err := NewHTTP(componenttest.NewNopTelemetrySettings(), confighttp.ServerConfig{}, nil) assert.Equal(t, errMissingStrategyStore, err) assert.Nil(t, s) } func TestStartAndStopHTTP(t *testing.T) { // prepare - srvSettings := confighttp.HTTPServerSettings{ + srvSettings := confighttp.ServerConfig{ Endpoint: "127.0.0.1:0", } s, err := NewHTTP(componenttest.NewNopTelemetrySettings(), srvSettings, &mockCfgMgr{}) @@ -53,8 +53,8 @@ func TestEndpointsAreWired(t *testing.T) { for _, tC := range testCases { t.Run(tC.desc, func(t *testing.T) { // prepare - s, err := NewHTTP(componenttest.NewNopTelemetrySettings(), confighttp.HTTPServerSettings{}, &mockCfgMgr{ - getSamplingStrategyFunc: func(ctx context.Context, serviceName string) (*api_v2.SamplingStrategyResponse, error) { + s, err := NewHTTP(componenttest.NewNopTelemetrySettings(), confighttp.ServerConfig{}, &mockCfgMgr{ + getSamplingStrategyFunc: func(_ context.Context, _ string) (*api_v2.SamplingStrategyResponse, error) { return &api_v2.SamplingStrategyResponse{ ProbabilisticSampling: &api_v2.ProbabilisticSamplingStrategy{ SamplingRate: 1, @@ -87,7 +87,7 @@ func TestEndpointsAreWired(t *testing.T) { func TestServiceNameIsRequired(t *testing.T) { // prepare - s, err := NewHTTP(componenttest.NewNopTelemetrySettings(), confighttp.HTTPServerSettings{}, &mockCfgMgr{}) + s, err := NewHTTP(componenttest.NewNopTelemetrySettings(), confighttp.ServerConfig{}, &mockCfgMgr{}) require.NoError(t, err) require.NotNil(t, s) @@ -105,12 +105,12 @@ func TestServiceNameIsRequired(t *testing.T) { } func TestErrorFromClientConfigManager(t *testing.T) { - s, err := NewHTTP(componenttest.NewNopTelemetrySettings(), confighttp.HTTPServerSettings{}, &mockCfgMgr{}) + s, err := NewHTTP(componenttest.NewNopTelemetrySettings(), confighttp.ServerConfig{}, &mockCfgMgr{}) require.NoError(t, err) require.NotNil(t, s) s.strategyStore = &mockCfgMgr{ - getSamplingStrategyFunc: func(ctx context.Context, serviceName string) (*api_v2.SamplingStrategyResponse, error) { + getSamplingStrategyFunc: func(_ context.Context, _ string) (*api_v2.SamplingStrategyResponse, error) { return nil, errors.New("some error") }, } diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/README.md b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/README.md deleted file mode 100644 index 7dae0b40c1b9..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# DO NOT USE THIS PACKAGE - -This package is a workaround to bump the jaeger dependency and will be removed soon. - -For more details see: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/18485 diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/config.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/config.go deleted file mode 100644 index e7730c9791c5..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/config.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package jaegerremotesamplingdeprecated // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated" - -import ( - "errors" - "time" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configgrpc" - "go.opentelemetry.io/collector/config/confighttp" -) - -var ( - errTooManySources = errors.New("too many sources specified, has to be either 'file' or 'remote'") - errNoSources = errors.New("no sources specified, has to be either 'file' or 'remote'") - errAtLeastOneProtocol = errors.New("no protocols selected to serve the strategies, use 'grpc', 'http', or both") -) - -// Config has the configuration for the extension enabling the health check -// extension, used to report the health status of the service. -type Config struct { - *confighttp.HTTPServerSettings `mapstructure:"http"` - *configgrpc.GRPCServerSettings `mapstructure:"grpc"` - - // Source configures the source for the strategies file. One of `remote` or `file` has to be specified. - Source Source `mapstructure:"source"` -} - -type Source struct { - // Remote defines the remote location for the file - Remote *configgrpc.GRPCClientSettings `mapstructure:"remote"` - - // File specifies a local file as the strategies source - File string `mapstructure:"file"` - - // ReloadInterval determines the periodicity to refresh the strategies - ReloadInterval time.Duration `mapstructure:"reload_interval"` -} - -var _ component.Config = (*Config)(nil) - -// Validate checks if the extension configuration is valid -func (cfg *Config) Validate() error { - if cfg.HTTPServerSettings == nil && cfg.GRPCServerSettings == nil { - return errAtLeastOneProtocol - } - - if cfg.Source.File != "" && cfg.Source.Remote != nil { - return errTooManySources - } - - if cfg.Source.File == "" && cfg.Source.Remote == nil { - return errNoSources - } - - return nil -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/config_test.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/config_test.go deleted file mode 100644 index ec1081657ba8..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/config_test.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package jaegerremotesamplingdeprecated - -import ( - "path/filepath" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configgrpc" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/confignet" - "go.opentelemetry.io/collector/confmap/confmaptest" - - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/metadata" -) - -func TestLoadConfig(t *testing.T) { - t.Parallel() - - tests := []struct { - id component.ID - expected component.Config - }{ - { - id: component.NewID(metadata.Type), - expected: &Config{ - HTTPServerSettings: &confighttp.HTTPServerSettings{Endpoint: ":5778"}, - GRPCServerSettings: &configgrpc.GRPCServerSettings{NetAddr: confignet.NetAddr{ - Endpoint: ":14250", - Transport: "tcp", - }}, - Source: Source{ - Remote: &configgrpc.GRPCClientSettings{ - Endpoint: "jaeger-collector:14250", - }, - }, - }, - }, - { - id: component.NewIDWithName(metadata.Type, "1"), - expected: &Config{ - HTTPServerSettings: &confighttp.HTTPServerSettings{Endpoint: ":5778"}, - GRPCServerSettings: &configgrpc.GRPCServerSettings{NetAddr: confignet.NetAddr{ - Endpoint: ":14250", - Transport: "tcp", - }}, - Source: Source{ - ReloadInterval: time.Second, - File: "/etc/otelcol/sampling_strategies.json", - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.id.String(), func(t *testing.T) { - cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) - require.NoError(t, err) - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - sub, err := cm.Sub(tt.id.String()) - require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) - assert.NoError(t, component.ValidateConfig(cfg)) - assert.Equal(t, tt.expected, cfg) - }) - } -} - -func TestValidate(t *testing.T) { - - testCases := []struct { - desc string - cfg Config - expected error - }{ - { - desc: "no receiving protocols", - cfg: Config{}, - expected: errAtLeastOneProtocol, - }, - { - desc: "no sources", - cfg: Config{ - GRPCServerSettings: &configgrpc.GRPCServerSettings{}, - }, - expected: errNoSources, - }, - { - desc: "too many sources", - cfg: Config{ - GRPCServerSettings: &configgrpc.GRPCServerSettings{}, - Source: Source{ - Remote: &configgrpc.GRPCClientSettings{}, - File: "/tmp/some-file", - }, - }, - expected: errTooManySources, - }, - } - for _, tC := range testCases { - t.Run(tC.desc, func(t *testing.T) { - res := tC.cfg.Validate() - assert.Equal(t, tC.expected, res) - }) - } -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/extension.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/extension.go deleted file mode 100644 index b1ab4ef9ae50..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/extension.go +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package jaegerremotesamplingdeprecated // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated" - -import ( - "context" - "fmt" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/extension" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal" - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore" - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static" -) - -var _ extension.Extension = (*jrsExtension)(nil) - -type jrsExtension struct { - cfg *Config - telemetry component.TelemetrySettings - - httpServer component.Component - grpcServer component.Component - samplingStore strategystore.StrategyStore - - closers []func() error -} - -func newExtension(cfg *Config, telemetry component.TelemetrySettings) *jrsExtension { - jrse := &jrsExtension{ - cfg: cfg, - telemetry: telemetry, - } - return jrse -} - -func (jrse *jrsExtension) Start(ctx context.Context, host component.Host) error { - // the config validation will take care of ensuring we have one and only one of the following about the - // source of the sampling config: - // - remote (gRPC) - // - local file - // we can then use a simplified logic here to assign the appropriate store - if jrse.cfg.Source.File != "" { - opts := static.Options{ - StrategiesFile: jrse.cfg.Source.File, - ReloadInterval: jrse.cfg.Source.ReloadInterval, - } - ss, err := static.NewStrategyStore(opts, jrse.telemetry.Logger) - if err != nil { - return fmt.Errorf("failed to create the local file strategy store: %w", err) - } - - // there's a Close function on the concrete type, which is not visible to us... - // how can we close it then? - jrse.samplingStore = ss - } - - if jrse.cfg.Source.Remote != nil { - conn, err := jrse.cfg.Source.Remote.ToClientConn(ctx, host, jrse.telemetry) - if err != nil { - return fmt.Errorf("failed to create the remote strategy store: %w", err) - } - jrse.closers = append(jrse.closers, conn.Close) - remoteStore, closer := internal.NewRemoteStrategyStore( - conn, - jrse.cfg.Source.Remote, - jrse.cfg.Source.ReloadInterval, - ) - jrse.closers = append(jrse.closers, closer.Close) - jrse.samplingStore = remoteStore - } - - if jrse.cfg.HTTPServerSettings != nil { - httpServer, err := internal.NewHTTP(jrse.telemetry, *jrse.cfg.HTTPServerSettings, jrse.samplingStore) - if err != nil { - return fmt.Errorf("error while creating the HTTP server: %w", err) - } - jrse.httpServer = httpServer - // then we start our own server interfaces, starting with the HTTP one - if err := jrse.httpServer.Start(ctx, host); err != nil { - return fmt.Errorf("error while starting the HTTP server: %w", err) - } - } - - if jrse.cfg.GRPCServerSettings != nil { - grpcServer, err := internal.NewGRPC(jrse.telemetry, *jrse.cfg.GRPCServerSettings, jrse.samplingStore) - if err != nil { - return fmt.Errorf("error while creating the gRPC server: %w", err) - } - jrse.grpcServer = grpcServer - // start our gRPC server interface - if err := jrse.grpcServer.Start(ctx, host); err != nil { - return fmt.Errorf("error while starting the gRPC server: %w", err) - } - } - - return nil -} - -func (jrse *jrsExtension) Shutdown(ctx context.Context) error { - // we probably don't want to break whenever an error occurs, we want to continue and close the other resources - if jrse.httpServer != nil { - if err := jrse.httpServer.Shutdown(ctx); err != nil { - jrse.telemetry.Logger.Error("error while shutting down the HTTP server", zap.Error(err)) - } - } - - if jrse.grpcServer != nil { - if err := jrse.grpcServer.Shutdown(ctx); err != nil { - jrse.telemetry.Logger.Error("error while shutting down the gRPC server", zap.Error(err)) - } - } - - for _, closer := range jrse.closers { - if err := closer(); err != nil { - jrse.telemetry.Logger.Error("error while shutting down the sampling store", zap.Error(err)) - } - } - - return nil -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/extension_test.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/extension_test.go deleted file mode 100644 index 7497ce089457..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/extension_test.go +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package jaegerremotesamplingdeprecated - -import ( - "context" - "fmt" - "net" - "net/http" - "path/filepath" - "testing" - "time" - - "github.com/jaegertracing/jaeger/proto-gen/api_v2" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configgrpc" - "go.opentelemetry.io/collector/config/configopaque" - "go.opentelemetry.io/collector/config/configtls" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" -) - -func TestNewExtension(t *testing.T) { - // test - cfg := testConfig() - cfg.Source.File = filepath.Join("testdata", "strategy.json") - e := newExtension(cfg, componenttest.NewNopTelemetrySettings()) - - // verify - assert.NotNil(t, e) -} - -func TestStartAndShutdownLocalFile(t *testing.T) { - // prepare - cfg := testConfig() - cfg.Source.File = filepath.Join("testdata", "strategy.json") - - e := newExtension(cfg, componenttest.NewNopTelemetrySettings()) - require.NotNil(t, e) - require.NoError(t, e.Start(context.Background(), componenttest.NewNopHost())) - - // test and verify - assert.NoError(t, e.Shutdown(context.Background())) -} - -func TestRemote(t *testing.T) { - for _, tc := range []struct { - name string - remoteClientHeaderConfig map[string]configopaque.String - performedClientCallCount int - expectedOutboundGrpcCallCount int - reloadInterval time.Duration - }{ - { - name: "no configured header additions and no configured reload_interval", - performedClientCallCount: 3, - expectedOutboundGrpcCallCount: 3, - }, - { - name: "configured header additions", - performedClientCallCount: 3, - expectedOutboundGrpcCallCount: 3, - remoteClientHeaderConfig: map[string]configopaque.String{ - "testheadername": "testheadervalue", - "anotherheadername": "anotherheadervalue", - }, - }, - { - name: "reload_interval set to nonzero value caching outbound same-service gRPC calls", - reloadInterval: time.Minute * 5, - performedClientCallCount: 3, - expectedOutboundGrpcCallCount: 1, - remoteClientHeaderConfig: map[string]configopaque.String{ - "somecoolheader": "some-more-coverage-whynot", - }, - }, - } { - t.Run(tc.name, func(t *testing.T) { - // prepare the socket the mock server will listen at - lis, err := net.Listen("tcp", "127.0.0.1:0") - require.NoError(t, err) - - // create the mock server - server := grpc.NewServer() - - // register the service - mockServer := &samplingServer{} - api_v2.RegisterSamplingManagerServer(server, mockServer) - - go func() { - err = server.Serve(lis) - require.NoError(t, err) - }() - - // create the config, pointing to the mock server - cfg := testConfig() - cfg.GRPCServerSettings.NetAddr.Endpoint = "127.0.0.1:0" - cfg.Source.ReloadInterval = tc.reloadInterval - cfg.Source.Remote = &configgrpc.GRPCClientSettings{ - Endpoint: fmt.Sprintf("127.0.0.1:%d", lis.Addr().(*net.TCPAddr).Port), - TLSSetting: configtls.TLSClientSetting{ - Insecure: true, // test only - }, - WaitForReady: true, - Headers: tc.remoteClientHeaderConfig, - } - - // create the extension - e := newExtension(cfg, componenttest.NewNopTelemetrySettings()) - require.NotNil(t, e) - - // start the server - assert.NoError(t, e.Start(context.Background(), componenttest.NewNopHost())) - - // make test case defined number of calls - for i := 0; i < tc.performedClientCallCount; i++ { - resp, err := http.Get("http://127.0.0.1:5779/sampling?service=foo") - assert.NoError(t, err) - assert.Equal(t, 200, resp.StatusCode) - } - - // shut down the server - assert.NoError(t, e.Shutdown(context.Background())) - - // verify observed calls - assert.Len(t, mockServer.observedCalls, tc.expectedOutboundGrpcCallCount) - for _, singleCall := range mockServer.observedCalls { - assert.Equal(t, &api_v2.SamplingStrategyParameters{ - ServiceName: "foo", - }, singleCall.params) - md, ok := metadata.FromIncomingContext(singleCall.ctx) - assert.True(t, ok) - for expectedHeaderName, expectedHeaderValue := range tc.remoteClientHeaderConfig { - assert.Equal(t, []string{string(expectedHeaderValue)}, md.Get(expectedHeaderName)) - } - } - }) - } -} - -type samplingServer struct { - api_v2.UnimplementedSamplingManagerServer - observedCalls []observedCall -} - -type observedCall struct { - ctx context.Context - params *api_v2.SamplingStrategyParameters -} - -func (s *samplingServer) GetSamplingStrategy(ctx context.Context, params *api_v2.SamplingStrategyParameters) (*api_v2.SamplingStrategyResponse, error) { - s.observedCalls = append(s.observedCalls, observedCall{ - ctx: ctx, - params: params, - }) - return &api_v2.SamplingStrategyResponse{ - StrategyType: api_v2.SamplingStrategyType_PROBABILISTIC, - }, nil -} - -func testConfig() *Config { - cfg := createDefaultConfig().(*Config) - cfg.HTTPServerSettings.Endpoint = "127.0.0.1:5779" - cfg.GRPCServerSettings.NetAddr.Endpoint = "127.0.0.1:14251" - return cfg -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/factory.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/factory.go deleted file mode 100644 index 0d0d2269cd0c..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/factory.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package jaegerremotesamplingdeprecated // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated" - -import ( - "context" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configgrpc" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/confignet" - "go.opentelemetry.io/collector/extension" - - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/metadata" -) - -// NewFactory creates a factory for the OIDC Authenticator extension. -func NewFactory() extension.Factory { - return extension.NewFactory( - metadata.Type, - createDefaultConfig, - createExtension, - metadata.ExtensionStability, - ) -} - -func createDefaultConfig() component.Config { - return &Config{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ - Endpoint: ":5778", - }, - GRPCServerSettings: &configgrpc.GRPCServerSettings{ - NetAddr: confignet.NetAddr{ - Endpoint: ":14250", - Transport: "tcp", - }, - }, - Source: Source{}, - } -} - -func createExtension(_ context.Context, set extension.CreateSettings, cfg component.Config) (extension.Extension, error) { - return newExtension(cfg.(*Config), set.TelemetrySettings), nil -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/factory_test.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/factory_test.go deleted file mode 100644 index 826378250c60..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/factory_test.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package jaegerremotesamplingdeprecated - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configgrpc" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/confignet" - "go.opentelemetry.io/collector/extension/extensiontest" -) - -func TestCreateDefaultConfig(t *testing.T) { - // prepare and test - expected := &Config{ - HTTPServerSettings: &confighttp.HTTPServerSettings{Endpoint: ":5778"}, - GRPCServerSettings: &configgrpc.GRPCServerSettings{NetAddr: confignet.NetAddr{ - Endpoint: ":14250", - Transport: "tcp", - }}, - } - - // test - cfg := createDefaultConfig() - - // verify - assert.Equal(t, expected, cfg) - assert.NoError(t, componenttest.CheckConfigStruct(cfg)) -} - -func TestCreateExtension(t *testing.T) { - cfg := createDefaultConfig().(*Config) - - ext, err := createExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) - assert.NoError(t, err) - assert.NotNil(t, ext) -} - -func TestNewFactory(t *testing.T) { - f := NewFactory() - assert.NotNil(t, f) -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/grpc.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/grpc.go deleted file mode 100644 index 3b4546f3f3da..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/grpc.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal" - -import ( - "context" - "errors" - "fmt" - "net" - - "github.com/jaegertracing/jaeger/proto-gen/api_v2" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configgrpc" - "go.uber.org/zap" - "google.golang.org/grpc/health" - "google.golang.org/grpc/health/grpc_health_v1" - "google.golang.org/grpc/reflection" - - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling" - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore" -) - -var _ component.Component = (*SamplingGRPCServer)(nil) - -var errGRPCServerNotRunning = errors.New("gRPC server is not running") - -type grpcServer interface { - Serve(lis net.Listener) error - GracefulStop() - Stop() -} - -// NewGRPC returns a new sampling gRPC Server. -func NewGRPC( - telemetry component.TelemetrySettings, - settings configgrpc.GRPCServerSettings, - strategyStore strategystore.StrategyStore, -) (*SamplingGRPCServer, error) { - if strategyStore == nil { - return nil, errMissingStrategyStore - } - - return &SamplingGRPCServer{ - telemetry: telemetry, - settings: settings, - strategyStore: strategyStore, - }, nil -} - -// SamplingGRPCServer implements component.Component to make the life cycle easy to manage. -type SamplingGRPCServer struct { - telemetry component.TelemetrySettings - settings configgrpc.GRPCServerSettings - strategyStore strategystore.StrategyStore - - grpcServer grpcServer -} - -func (s *SamplingGRPCServer) Start(_ context.Context, host component.Host) error { - server, err := s.settings.ToServer(host, s.telemetry) - if err != nil { - return err - } - reflection.Register(server) - s.grpcServer = server - - api_v2.RegisterSamplingManagerServer(server, sampling.NewGRPCHandler(s.strategyStore)) - - healthServer := health.NewServer() - healthServer.SetServingStatus("jaeger.api_v2.SamplingManager", grpc_health_v1.HealthCheckResponse_SERVING) - grpc_health_v1.RegisterHealthServer(server, healthServer) - - listener, err := s.settings.ToListener() - if err != nil { - return fmt.Errorf("failed to listen on gRPC port: %w", err) - } - - go func() { - if err := s.grpcServer.Serve(listener); err != nil { - s.telemetry.Logger.Error("could not launch gRPC service", zap.Error(err)) - } - }() - - return nil -} - -// Shutdown tries to terminate connections gracefully as long as the passed context is valid. -func (s *SamplingGRPCServer) Shutdown(ctx context.Context) error { - if s.grpcServer == nil { - return errGRPCServerNotRunning - } - - ch := make(chan struct{}) - go func() { - s.grpcServer.GracefulStop() - ch <- struct{}{} - }() - - select { - case <-ctx.Done(): - s.grpcServer.Stop() - case <-ch: - } - - return nil -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/grpc/manager.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/grpc/manager.go deleted file mode 100644 index 9468968dd07c..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/grpc/manager.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 -// -// Copyright (c) 2018 The Jaeger Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package grpc // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/grpc" - -import ( - "context" - "errors" - - "github.com/jaegertracing/jaeger/model/converter/thrift/jaeger" - "github.com/jaegertracing/jaeger/proto-gen/api_v2" - "github.com/jaegertracing/jaeger/thrift-gen/baggage" - "github.com/jaegertracing/jaeger/thrift-gen/sampling" - "google.golang.org/grpc" -) - -// SamplingManager returns sampling decisions from collector over gRPC. -type SamplingManager struct { - client api_v2.SamplingManagerClient -} - -// NewConfigManager creates gRPC sampling manager. -func NewConfigManager(conn *grpc.ClientConn) *SamplingManager { - return &SamplingManager{ - client: api_v2.NewSamplingManagerClient(conn), - } -} - -// GetSamplingStrategy returns sampling strategies from collector. -func (s *SamplingManager) GetSamplingStrategy(ctx context.Context, serviceName string) (*sampling.SamplingStrategyResponse, error) { - r, err := s.client.GetSamplingStrategy(ctx, &api_v2.SamplingStrategyParameters{ServiceName: serviceName}) - if err != nil { - return nil, err - } - return jaeger.ConvertSamplingResponseFromDomain(r) -} - -// GetBaggageRestrictions returns baggage restrictions from collector. -func (s *SamplingManager) GetBaggageRestrictions(_ context.Context, _ string) ([]*baggage.BaggageRestriction, error) { - return nil, errors.New("baggage not implemented") -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/grpc_test.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/grpc_test.go deleted file mode 100644 index 9d93aff32fd8..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/grpc_test.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal - -import ( - "context" - "net" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configgrpc" - "go.opentelemetry.io/collector/config/confignet" -) - -func TestMissingClientConfigManagerGRPC(t *testing.T) { - s, err := NewGRPC(componenttest.NewNopTelemetrySettings(), configgrpc.GRPCServerSettings{}, nil) - assert.Equal(t, errMissingStrategyStore, err) - assert.Nil(t, s) -} - -func TestStartAndStopGRPC(t *testing.T) { - // prepare - srvSettings := configgrpc.GRPCServerSettings{ - NetAddr: confignet.NetAddr{ - Endpoint: "127.0.0.1:0", - Transport: "tcp", - }, - } - s, err := NewGRPC(componenttest.NewNopTelemetrySettings(), srvSettings, &mockCfgMgr{}) - require.NoError(t, err) - require.NotNil(t, s) - - // test - assert.NoError(t, s.Start(context.Background(), componenttest.NewNopHost())) - assert.NoError(t, s.Shutdown(context.Background())) -} - -func TestSamplingGRPCServer_Shutdown(t *testing.T) { - tt := []struct { - name string - grpcServer grpcServer - timeout time.Duration - expect error - }{ - { - name: "graceful stop is successful without delay", - grpcServer: &grpcServerMock{}, - timeout: time.Minute, - }, - { - name: "graceful stop is successful with delay", - grpcServer: &grpcServerMock{ - timeToGracefulStop: 5 * time.Second, - }, - timeout: time.Minute, - }, - { - name: "context timed out", - grpcServer: &grpcServerMock{ - timeToGracefulStop: time.Minute, - }, - timeout: 5 * time.Second, - }, - { - name: "grpc server not started", - timeout: time.Minute, - expect: errGRPCServerNotRunning, - }, - } - - for _, tc := range tt { - t.Run(tc.name, func(t *testing.T) { - srv := &SamplingGRPCServer{grpcServer: tc.grpcServer} - ctx, cancel := context.WithTimeout(context.Background(), tc.timeout) - defer cancel() - assert.Equal(t, tc.expect, srv.Shutdown(ctx)) - }) - } -} - -type grpcServerMock struct { - timeToGracefulStop time.Duration -} - -func (g *grpcServerMock) Serve(_ net.Listener) error { return nil } -func (g *grpcServerMock) Stop() {} -func (g *grpcServerMock) GracefulStop() { time.Sleep(g.timeToGracefulStop) } diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/http.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/http.go deleted file mode 100644 index 569c5cf71f3c..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/http.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal" - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "net" - "net/http" - "sync" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/confighttp" - - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore" -) - -var ( - errMissingStrategyStore = errors.New("the strategy store has not been provided") -) - -var _ component.Component = (*SamplingHTTPServer)(nil) - -type SamplingHTTPServer struct { - telemetry component.TelemetrySettings - settings confighttp.HTTPServerSettings - strategyStore strategystore.StrategyStore - - mux *http.ServeMux - srv *http.Server - shutdownWG *sync.WaitGroup -} - -func NewHTTP(telemetry component.TelemetrySettings, settings confighttp.HTTPServerSettings, strategyStore strategystore.StrategyStore) (*SamplingHTTPServer, error) { - if strategyStore == nil { - return nil, errMissingStrategyStore - } - - srv := &SamplingHTTPServer{ - telemetry: telemetry, - settings: settings, - strategyStore: strategyStore, - - shutdownWG: &sync.WaitGroup{}, - } - - srv.mux = http.NewServeMux() - - // SEE: https://www.jaegertracing.io/docs/1.41/apis/#remote-sampling-configuration-stable - srv.mux.Handle("/sampling", http.HandlerFunc(srv.samplingStrategyHandler)) - - return srv, nil -} - -func (h *SamplingHTTPServer) Start(_ context.Context, host component.Host) error { - var err error - h.srv, err = h.settings.ToServer(host, h.telemetry, h.mux) - if err != nil { - return err - } - - var hln net.Listener - hln, err = h.settings.ToListener() - if err != nil { - return err - } - - h.shutdownWG.Add(1) - go func() { - defer h.shutdownWG.Done() - - if err := h.srv.Serve(hln); err != nil && !errors.Is(err, http.ErrServerClosed) { - host.ReportFatalError(err) - } - }() - - return nil -} - -func (h *SamplingHTTPServer) Shutdown(ctx context.Context) error { - err := h.srv.Shutdown(ctx) - h.shutdownWG.Wait() - return err -} - -func (h *SamplingHTTPServer) samplingStrategyHandler(rw http.ResponseWriter, r *http.Request) { - svc := r.URL.Query().Get("service") - if len(svc) == 0 { - err := errors.New("'service' parameter must be provided") - http.Error(rw, err.Error(), http.StatusBadRequest) - return - } - - resp, err := h.strategyStore.GetSamplingStrategy(r.Context(), svc) - if err != nil { - err = fmt.Errorf("failed to get sampling strategy for service %q: %w", svc, err) - http.Error(rw, err.Error(), http.StatusInternalServerError) - return - } - - jsonBytes, err := json.Marshal(resp) - if err != nil { - err = fmt.Errorf("cannot convert sampling strategy to JSON: %w", err) - http.Error(rw, err.Error(), http.StatusInternalServerError) - return - } - - rw.Header().Add("Content-Type", "application/json") - if _, err := rw.Write(jsonBytes); err != nil { - err = fmt.Errorf("cannot write response to client: %w", err) - http.Error(rw, err.Error(), http.StatusInternalServerError) - return - } -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/http_test.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/http_test.go deleted file mode 100644 index 1ba09da63752..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/http_test.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal - -import ( - "context" - "errors" - "fmt" - "io" - "net/http" - "net/http/httptest" - "net/url" - "testing" - - "github.com/jaegertracing/jaeger/thrift-gen/sampling" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/confighttp" -) - -func TestMissingClientConfigManagerHTTP(t *testing.T) { - s, err := NewHTTP(componenttest.NewNopTelemetrySettings(), confighttp.HTTPServerSettings{}, nil) - assert.Equal(t, errMissingStrategyStore, err) - assert.Nil(t, s) -} - -func TestStartAndStopHTTP(t *testing.T) { - // prepare - srvSettings := confighttp.HTTPServerSettings{ - Endpoint: "127.0.0.1:0", - } - s, err := NewHTTP(componenttest.NewNopTelemetrySettings(), srvSettings, &mockCfgMgr{}) - require.NoError(t, err) - require.NotNil(t, s) - - // test - assert.NoError(t, s.Start(context.Background(), componenttest.NewNopHost())) - assert.NoError(t, s.Shutdown(context.Background())) -} - -func TestEndpointsAreWired(t *testing.T) { - testCases := []struct { - desc string - endpoint string - }{ - { - desc: "new", - endpoint: "/sampling", - }, - } - for _, tC := range testCases { - t.Run(tC.desc, func(t *testing.T) { - // prepare - s, err := NewHTTP(componenttest.NewNopTelemetrySettings(), confighttp.HTTPServerSettings{}, &mockCfgMgr{}) - require.NoError(t, err) - require.NotNil(t, s) - - srv := httptest.NewServer(s.mux) - defer func() { - srv.Close() - }() - - // test - resp, err := srv.Client().Get(fmt.Sprintf("%s%s?service=foo", srv.URL, tC.endpoint)) - require.NoError(t, err) - - // verify - samplingStrategiesBytes, err := io.ReadAll(resp.Body) - require.NoError(t, err) - resp.Body.Close() - - body := string(samplingStrategiesBytes) - assert.Equal(t, `{"strategyType":"PROBABILISTIC"}`, body) - }) - } -} - -func TestServiceNameIsRequired(t *testing.T) { - // prepare - s, err := NewHTTP(componenttest.NewNopTelemetrySettings(), confighttp.HTTPServerSettings{}, &mockCfgMgr{}) - require.NoError(t, err) - require.NotNil(t, s) - - rw := httptest.NewRecorder() - req := &http.Request{ - URL: &url.URL{}, - } - - // test - s.samplingStrategyHandler(rw, req) - - // verify - body, _ := io.ReadAll(rw.Body) - assert.Contains(t, string(body), "'service' parameter must be provided") -} - -func TestErrorFromClientConfigManager(t *testing.T) { - s, err := NewHTTP(componenttest.NewNopTelemetrySettings(), confighttp.HTTPServerSettings{}, &mockCfgMgr{}) - require.NoError(t, err) - require.NotNil(t, s) - - s.strategyStore = &mockCfgMgr{ - getSamplingStrategyFunc: func(ctx context.Context, serviceName string) (*sampling.SamplingStrategyResponse, error) { - return nil, errors.New("some error") - }, - } - - rw := httptest.NewRecorder() - req := &http.Request{ - URL: &url.URL{ - RawQuery: "service=foo", - }, - } - - // test - s.samplingStrategyHandler(rw, req) - - // verify - body, _ := io.ReadAll(rw.Body) - assert.Contains(t, string(body), "failed to get sampling strategy for service") -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/internal_test.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/internal_test.go deleted file mode 100644 index bc93e72db672..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/internal_test.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal - -import ( - "context" - - "github.com/jaegertracing/jaeger/thrift-gen/sampling" -) - -type mockCfgMgr struct { - getSamplingStrategyFunc func(ctx context.Context, serviceName string) (*sampling.SamplingStrategyResponse, error) -} - -func (m *mockCfgMgr) GetSamplingStrategy(ctx context.Context, serviceName string) (*sampling.SamplingStrategyResponse, error) { - if m.getSamplingStrategyFunc != nil { - return m.getSamplingStrategyFunc(ctx, serviceName) - } - return sampling.NewSamplingStrategyResponse(), nil -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/metadata/generated_status.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/metadata/generated_status.go deleted file mode 100644 index 7a0b3224ccbc..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/metadata/generated_status.go +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/collector/component" -) - -const ( - Type = "jaegerremotesampling" - ExtensionStability = component.StabilityLevelAlpha -) diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/remote_strategy_cache.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/remote_strategy_cache.go deleted file mode 100644 index 6c723d1601ac..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/remote_strategy_cache.go +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal" - -import ( - "context" - "sync" - "time" - - "github.com/jaegertracing/jaeger/thrift-gen/sampling" - "github.com/tilinna/clock" -) - -type serviceStrategyCache interface { - get(ctx context.Context, serviceName string) (*sampling.SamplingStrategyResponse, bool) - put(ctx context.Context, serviceName string, response *sampling.SamplingStrategyResponse) - Close() error -} - -// serviceStrategyCacheEntry is a timestamped sampling strategy response -type serviceStrategyCacheEntry struct { - retrievedAt time.Time - strategyResponse *sampling.SamplingStrategyResponse -} - -// serviceStrategyTTLCache is a naive in-memory TTL serviceStrategyTTLCache of service-specific sampling strategies -// returned from the remote source. Each cached item has its own TTL used to determine whether it is valid for read -// usage (based on the time of write). -type serviceStrategyTTLCache struct { - itemTTL time.Duration - - stopCh chan struct{} - rw sync.RWMutex - items map[string]serviceStrategyCacheEntry -} - -// Initial size of cache's underlying map -const initialRemoteResponseCacheSize = 32 - -func newServiceStrategyCache(itemTTL time.Duration) serviceStrategyCache { - result := &serviceStrategyTTLCache{ - itemTTL: itemTTL, - items: make(map[string]serviceStrategyCacheEntry, initialRemoteResponseCacheSize), - stopCh: make(chan struct{}), - } - - // Launches a "cleaner" goroutine that naively blows away stale items with a frequency equal to the item TTL. - // Note that this is for memory usage and not for correctness (the get() function checks item validity). - go result.periodicallyClearCache(context.Background(), itemTTL) - return result -} - -// get returns a cached sampling strategy if one is present and is no older than the serviceStrategyTTLCache's per-item TTL. -func (c *serviceStrategyTTLCache) get( - ctx context.Context, - serviceName string, -) (*sampling.SamplingStrategyResponse, bool) { - c.rw.RLock() - defer c.rw.RUnlock() - found, ok := c.items[serviceName] - if !ok { - return nil, false - } - if c.staleItem(ctx, found) { - return nil, false - } - return found.strategyResponse, true -} - -// put unconditionally overwrites the given service's serviceStrategyTTLCache item entry and resets its timestamp used for TTL checks. -func (c *serviceStrategyTTLCache) put( - ctx context.Context, - serviceName string, - response *sampling.SamplingStrategyResponse, -) { - c.rw.Lock() - defer c.rw.Unlock() - c.items[serviceName] = serviceStrategyCacheEntry{ - strategyResponse: response, - retrievedAt: clock.Now(ctx), - } -} - -// periodicallyClearCache periodically clears expired items from the cache and replaces the backing map with only -// valid (fresh) items. Note that this is not necessary for correctness, just preferred for memory usage hygiene. -// Client request activity drives the replacement of stale items with fresh items upon cache misses for any service. -func (c *serviceStrategyTTLCache) periodicallyClearCache( - ctx context.Context, - schedulingPeriod time.Duration, -) { - ticker := clock.NewTicker(ctx, schedulingPeriod) - for { - select { - case <-ticker.C: - c.rw.Lock() - newItems := make(map[string]serviceStrategyCacheEntry, initialRemoteResponseCacheSize) - for serviceName, item := range c.items { - if !c.staleItem(ctx, item) { - newItems[serviceName] = item - } - } - // Notice that we swap the map rather than using map's delete (which doesn't reduce its allocated size). - c.items = newItems - c.rw.Unlock() - case <-c.stopCh: - return - } - } -} - -func (c *serviceStrategyTTLCache) Close() error { - close(c.stopCh) - return nil -} - -func (c *serviceStrategyTTLCache) staleItem(ctx context.Context, item serviceStrategyCacheEntry) bool { - return clock.Now(ctx).After(item.retrievedAt.Add(c.itemTTL)) -} - -type noopStrategyCache struct{} - -func (n *noopStrategyCache) get(_ context.Context, _ string) (*sampling.SamplingStrategyResponse, bool) { - return nil, false -} - -func (n *noopStrategyCache) put(_ context.Context, _ string, _ *sampling.SamplingStrategyResponse) { -} - -func (n *noopStrategyCache) Close() error { - return nil -} - -func newNoopStrategyCache() serviceStrategyCache { - return &noopStrategyCache{} -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/remote_strategy_cache_test.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/remote_strategy_cache_test.go deleted file mode 100644 index b1d037aba01e..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/remote_strategy_cache_test.go +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal - -import ( - "context" - "fmt" - "sync" - "testing" - "time" - - "github.com/fortytw2/leaktest" - "github.com/jaegertracing/jaeger/thrift-gen/sampling" - "github.com/stretchr/testify/assert" - "github.com/tilinna/clock" -) - -const cacheTestItemTTL = 50 * time.Millisecond - -var testStrategyResponseA = &sampling.SamplingStrategyResponse{ - ProbabilisticSampling: &sampling.ProbabilisticSamplingStrategy{ - SamplingRate: 0.1337, - }, -} - -var testStrategyResponseB = &sampling.SamplingStrategyResponse{ - OperationSampling: &sampling.PerOperationSamplingStrategies{ - DefaultSamplingProbability: 0.001, - PerOperationStrategies: []*sampling.OperationSamplingStrategy{ - { - Operation: "always-sampled-op", - ProbabilisticSampling: &sampling.ProbabilisticSamplingStrategy{ - SamplingRate: 1.0, - }, - }, - { - Operation: "never-sampled-op", - ProbabilisticSampling: &sampling.ProbabilisticSamplingStrategy{ - SamplingRate: 0, - }, - }, - }, - }, -} - -func Test_serviceStrategyCache_ReadWriteSequence(t *testing.T) { - testTime := time.Date(2023, 1, 1, 10, 0, 0, 0, time.UTC) - mock := clock.NewMock(testTime) - ctx, cfn := mock.DeadlineContext(context.Background(), testTime.Add(3*time.Minute)) - defer cfn() - - cache := newServiceStrategyCache(cacheTestItemTTL).(*serviceStrategyTTLCache) - defer func() { - assert.NoError(t, cache.Close()) - }() - - // initial read returns nothing - result, ok := cache.get(ctx, "fooSvc") - assert.False(t, ok) - assert.Nil(t, result) - result, ok = cache.get(ctx, "barSvc") - assert.False(t, ok) - assert.Nil(t, result) - - // perform a write for fooSvc at testTime - firstWriteTime := mock.Now() - cache.put(ctx, "fooSvc", testStrategyResponseA) - - // whitebox assert for internal timestamp tracking (we don't want a caching bug manifesting as stale data serving) - // (post-write) - assert.Equal(t, serviceStrategyCacheEntry{ - retrievedAt: firstWriteTime, - strategyResponse: testStrategyResponseA, - }, cache.items["fooSvc"]) - - // read without time advancing - result, ok = cache.get(ctx, "fooSvc") - assert.True(t, ok) - assert.Equal(t, testStrategyResponseA, result) - result, ok = cache.get(ctx, "barSvc") - assert.False(t, ok) - assert.Nil(t, result) - - // reading does not mutate internal cache state - assert.Equal(t, serviceStrategyCacheEntry{ - retrievedAt: firstWriteTime, - strategyResponse: testStrategyResponseA, - }, cache.items["fooSvc"]) - - // advance time (still within TTL time range) - mock.Add(20 * time.Millisecond) - - // the written item is still available - result, ok = cache.get(ctx, "fooSvc") - assert.True(t, ok) - assert.Equal(t, testStrategyResponseA, result) - result, ok = cache.get(ctx, "barSvc") - assert.False(t, ok) - assert.Nil(t, result) - - // advance time (just before end of TTL time range) - mock.Add(30 * time.Millisecond) - - // the written item is still available - result, ok = cache.get(ctx, "fooSvc") - assert.True(t, ok) - assert.Equal(t, testStrategyResponseA, result) - result, ok = cache.get(ctx, "barSvc") - assert.False(t, ok) - assert.Nil(t, result) - - // advance time (across TTL range) - mock.Add(1 * time.Millisecond) - - // the (now stale) cached item is no longer available - result, ok = cache.get(ctx, "fooSvc") - assert.False(t, ok) - assert.Nil(t, result) - result, ok = cache.get(ctx, "barSvc") - assert.False(t, ok) - assert.Nil(t, result) - - assert.Equal(t, serviceStrategyCacheEntry{ - retrievedAt: firstWriteTime, - strategyResponse: testStrategyResponseA, - }, cache.items["fooSvc"]) -} - -func Test_serviceStrategyCache_WritesUpdateTimestamp(t *testing.T) { - startTime := time.Date(2023, 1, 1, 10, 0, 0, 0, time.UTC) - mock := clock.NewMock(startTime) - ctx, cfn := mock.DeadlineContext(context.Background(), startTime.Add(3*time.Minute)) - defer cfn() - - cache := newServiceStrategyCache(cacheTestItemTTL).(*serviceStrategyTTLCache) - defer func() { - assert.NoError(t, cache.Close()) - }() - - // initial read returns nothing - result, ok := cache.get(ctx, "fooSvc") - assert.False(t, ok) - assert.Nil(t, result) - result, ok = cache.get(ctx, "barSvc") - assert.False(t, ok) - assert.Nil(t, result) - - // perform a write for barSvc at startTime + 10ms - firstWriteTime := mock.Add(10 * time.Millisecond) - cache.put(ctx, "barSvc", testStrategyResponseA) - - // whitebox assert for internal timestamp tracking - assert.Equal(t, serviceStrategyCacheEntry{ - retrievedAt: firstWriteTime, - strategyResponse: testStrategyResponseA, - }, cache.items["barSvc"]) - - // read without time advancing - result, ok = cache.get(ctx, "fooSvc") - assert.False(t, ok) - assert.Nil(t, result) - result, ok = cache.get(ctx, "barSvc") - assert.True(t, ok) - assert.Equal(t, testStrategyResponseA, result) - - // advance time (still within TTL time range) - mock.Add(10 * time.Millisecond) - - // the written item is still available - result, ok = cache.get(ctx, "fooSvc") - assert.False(t, ok) - assert.Nil(t, result) - result, ok = cache.get(ctx, "barSvc") - assert.True(t, ok) - assert.Equal(t, testStrategyResponseA, result) - - // perform a write for barSvc at startTime + 30ms (still within TTL, but we retain this more recent data) - secondWriteTime := mock.Add(10 * time.Millisecond) - cache.put(ctx, "barSvc", testStrategyResponseB) - - // whitebox assert for internal timestamp tracking (post-write, still-fresh cache entry replaced with newer data) - assert.Equal(t, serviceStrategyCacheEntry{ - retrievedAt: secondWriteTime, - strategyResponse: testStrategyResponseB, - }, cache.items["barSvc"]) - - // the written item is still available - result, ok = cache.get(ctx, "fooSvc") - assert.False(t, ok) - assert.Nil(t, result) - result, ok = cache.get(ctx, "barSvc") - assert.True(t, ok) - assert.Equal(t, testStrategyResponseB, result) - - // advance time (to end of what is now a new/full TTL for the new fresh item) - mock.Add(cacheTestItemTTL) - - result, ok = cache.get(ctx, "fooSvc") - assert.False(t, ok) - assert.Nil(t, result) - result, ok = cache.get(ctx, "barSvc") - assert.True(t, ok) - assert.Equal(t, testStrategyResponseB, result) - - // advance time beyond the newer item's TTL - mock.Add(1) - - // the (now stale) cached item is no longer available - result, ok = cache.get(ctx, "fooSvc") - assert.False(t, ok) - assert.Nil(t, result) - result, ok = cache.get(ctx, "barSvc") - assert.False(t, ok) - assert.Nil(t, result) - - // internal state for now-stale second written item is still maintained - assert.Equal(t, serviceStrategyCacheEntry{ - retrievedAt: secondWriteTime, - strategyResponse: testStrategyResponseB, - }, cache.items["barSvc"]) -} - -func Test_serviceStrategyCache_Concurrency(t *testing.T) { - defer leaktest.CheckTimeout(t, time.Minute*3) - - cache := newServiceStrategyCache(cacheTestItemTTL).(*serviceStrategyTTLCache) - defer func() { - assert.NoError(t, cache.Close()) - }() - - // newServiceStrategyCache invokes this as well but with a practically-motivated period that is too long for tests. - // We should at least exercise it for consideration by the race detector. - // NB: We don't use a mock clock in this concurrency test case. - go cache.periodicallyClearCache(context.Background(), time.Millisecond*1) - - numThreads := 4 - numIterationsPerThread := 32 - - wg := sync.WaitGroup{} - wg.Add(numThreads) - for i := 0; i < numThreads; i++ { - ii := i - go func() { - for j := 0; j < numIterationsPerThread; j++ { - for _, svcName := range []string{ - fmt.Sprintf("thread-specific-service-%d", ii), - "contended-for-service", - } { - if _, ok := cache.get(context.Background(), svcName); !ok { - cache.put(context.Background(), svcName, &sampling.SamplingStrategyResponse{}) - } - } - } - wg.Done() - }() - } - wg.Wait() -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/remote_strategy_store.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/remote_strategy_store.go deleted file mode 100644 index ed8caa73c440..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/remote_strategy_store.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal" - -import ( - "context" - "fmt" - "io" - "time" - - "github.com/jaegertracing/jaeger/thrift-gen/sampling" - "go.opentelemetry.io/collector/config/configgrpc" - "go.opentelemetry.io/collector/config/configopaque" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - - grpcstore "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/grpc" - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore" -) - -type grpcRemoteStrategyStore struct { - headerAdditions map[string]configopaque.String - delegate *grpcstore.SamplingManager - cache serviceStrategyCache -} - -// NewRemoteStrategyStore returns a StrategyStore that delegates to the configured Jaeger gRPC endpoint, making -// extension-configured enhancements (header additions only for now) to the gRPC context of every outbound gRPC call. -// Note: it would be nice to expand the configuration surface to include an optional TTL-based caching behavior -// for service-specific outbound GetSamplingStrategy calls. -func NewRemoteStrategyStore( - conn *grpc.ClientConn, - grpcClientSettings *configgrpc.GRPCClientSettings, - reloadInterval time.Duration, -) (strategystore.StrategyStore, io.Closer) { - cache := newNoopStrategyCache() - if reloadInterval > 0 { - cache = newServiceStrategyCache(reloadInterval) - } - - return &grpcRemoteStrategyStore{ - headerAdditions: grpcClientSettings.Headers, - delegate: grpcstore.NewConfigManager(conn), - cache: cache, - }, cache -} - -func (g *grpcRemoteStrategyStore) GetSamplingStrategy( - ctx context.Context, - serviceName string, -) (*sampling.SamplingStrategyResponse, error) { - if cachedResponse, ok := g.cache.get(ctx, serviceName); ok { - return cachedResponse, nil - } - freshResult, err := g.delegate.GetSamplingStrategy(g.enhanceContext(ctx), serviceName) - if err != nil { - return nil, fmt.Errorf("remote call failed: %w", err) - } - g.cache.put(ctx, serviceName, freshResult) - return freshResult, nil -} - -// This function is used to add the extension configuration defined HTTP headers to a given outbound gRPC call's context. -func (g *grpcRemoteStrategyStore) enhanceContext(ctx context.Context) context.Context { - md := metadata.New(nil) - for k, v := range g.headerAdditions { - md.Set(k, string(v)) - } - return metadata.NewOutgoingContext(ctx, md) -} - -func (g *grpcRemoteStrategyStore) Close() error { - return g.cache.Close() -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/grpc_handler.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/grpc_handler.go deleted file mode 100644 index f2e7fd094034..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/grpc_handler.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 -// -// Copyright (c) 2018 The Jaeger Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package sampling // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling" - -import ( - "context" - - "github.com/jaegertracing/jaeger/model/converter/thrift/jaeger" - "github.com/jaegertracing/jaeger/proto-gen/api_v2" - - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore" -) - -// GRPCHandler is sampling strategy handler for gRPC. -type GRPCHandler struct { - store strategystore.StrategyStore -} - -// NewGRPCHandler creates a handler that controls sampling strategies for services. -func NewGRPCHandler(store strategystore.StrategyStore) GRPCHandler { - return GRPCHandler{ - store: store, - } -} - -// GetSamplingStrategy returns sampling decision from store. -func (s GRPCHandler) GetSamplingStrategy(ctx context.Context, param *api_v2.SamplingStrategyParameters) (*api_v2.SamplingStrategyResponse, error) { - r, err := s.store.GetSamplingStrategy(ctx, param.GetServiceName()) - if err != nil { - return nil, err - } - return jaeger.ConvertSamplingResponseToDomain(r) -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/model/sampling.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/model/sampling.go deleted file mode 100644 index 264c4f68c53a..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/model/sampling.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 -// -// Copyright (c) 2019 The Jaeger Authors. -// Copyright (c) 2017 Uber Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package model // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/model" - -// Throughput keeps track of the queries an operation received. -type Throughput struct { - Service string - Operation string - Count int64 - Probabilities map[string]struct{} -} - -// ServiceOperationProbabilities contains the sampling probabilities for all operations in a service. -// ie [service][operation] = probability -type ServiceOperationProbabilities map[string]map[string]float64 - -// ServiceOperationQPS contains the qps for all operations in a service. -// ie [service][operation] = qps -type ServiceOperationQPS map[string]map[string]float64 - -// ProbabilityAndQPS contains the sampling probability and measured qps for an operation. -type ProbabilityAndQPS struct { - Probability float64 - QPS float64 -} - -// ServiceOperationData contains the sampling probabilities and measured qps for all operations in a service. -// ie [service][operation] = ProbabilityAndQPS -type ServiceOperationData map[string]map[string]*ProbabilityAndQPS diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore/factory.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore/factory.go deleted file mode 100644 index fcc04bff2c7e..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore/factory.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 -// -// Copyright (c) 2018 The Jaeger Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package strategystore // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore" - -import ( - "github.com/jaegertracing/jaeger/pkg/metrics" - "github.com/jaegertracing/jaeger/storage" - "go.uber.org/zap" -) - -// Factory defines an interface for a factory that can create implementations of different strategy storage components. -// Implementations are also encouraged to implement plugin.Configurable interface. -// -// # See also -// -// plugin.Configurable -type Factory interface { //nolint:gci - // Initialize performs internal initialization of the factory. - Initialize(metricsFactory metrics.Factory, ssFactory storage.SamplingStoreFactory, logger *zap.Logger) error - - // CreateStrategyStore initializes the StrategyStore and returns it. - CreateStrategyStore() (StrategyStore, Aggregator, error) -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore/interface.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore/interface.go deleted file mode 100644 index ca0b38ec8ca2..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore/interface.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 -// -// Copyright (c) 2018 The Jaeger Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package strategystore // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore" - -import ( - "context" - "io" - - "github.com/jaegertracing/jaeger/thrift-gen/sampling" -) - -// StrategyStore keeps track of service specific sampling strategies. -type StrategyStore interface { - // GetSamplingStrategy retrieves the sampling strategy for the specified service. - GetSamplingStrategy(ctx context.Context, serviceName string) (*sampling.SamplingStrategyResponse, error) -} - -// Aggregator defines an interface used to aggregate operation throughput. -type Aggregator interface { - // Close() from io.Closer stops the aggregator from aggregating throughput. - io.Closer - - // RecordThroughput records throughput for an operation for aggregation. - RecordThroughput(service, operation, samplerType string, probability float64) - - // Start starts aggregating operation throughput. - Start() -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/constants.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/constants.go deleted file mode 100644 index c5d4b299ed25..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/constants.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 -// -// Copyright (c) 2018 The Jaeger Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package static // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static" - -import ( - "github.com/jaegertracing/jaeger/thrift-gen/sampling" -) - -const ( - // samplerTypeProbabilistic is the type of sampler that samples traces - // with a certain fixed probability. - samplerTypeProbabilistic = "probabilistic" - - // samplerTypeRateLimiting is the type of sampler that samples - // only up to a fixed number of traces per second. - samplerTypeRateLimiting = "ratelimiting" - - // defaultSamplingProbability is the default sampling probability the - // Strategy Store will use if none is provided. - defaultSamplingProbability = 0.001 -) - -// defaultStrategy is the default sampling strategy the Strategy Store will return -// if none is provided. -func defaultStrategyResponse() *sampling.SamplingStrategyResponse { - return &sampling.SamplingStrategyResponse{ - StrategyType: sampling.SamplingStrategyType_PROBABILISTIC, - ProbabilisticSampling: &sampling.ProbabilisticSamplingStrategy{ - SamplingRate: defaultSamplingProbability, - }, - } -} - -func defaultStrategies() *storedStrategies { - s := &storedStrategies{ - serviceStrategies: make(map[string]*sampling.SamplingStrategyResponse), - } - s.defaultStrategy = defaultStrategyResponse() - return s -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/factory.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/factory.go deleted file mode 100644 index 81f55ea8feb7..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/factory.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 -// -// Copyright (c) 2018 The Jaeger Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package static // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static" - -import ( - "flag" - - "github.com/jaegertracing/jaeger/pkg/metrics" - "github.com/jaegertracing/jaeger/plugin" - "github.com/jaegertracing/jaeger/storage" - "github.com/spf13/viper" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore" -) - -var _ plugin.Configurable = (*Factory)(nil) - -// Factory implements strategystore.Factory for a static strategy store. -type Factory struct { - options *Options - logger *zap.Logger -} - -// NewFactory creates a new Factory. -func NewFactory() *Factory { - return &Factory{ - options: &Options{}, - logger: zap.NewNop(), - } -} - -// AddFlags implements plugin.Configurable -func (f *Factory) AddFlags(flagSet *flag.FlagSet) { - AddFlags(flagSet) -} - -// InitFromViper implements plugin.Configurable -func (f *Factory) InitFromViper(v *viper.Viper, _ *zap.Logger) { - f.options.InitFromViper(v) -} - -// Initialize implements strategystore.Factory -func (f *Factory) Initialize(_ metrics.Factory, _ storage.SamplingStoreFactory, logger *zap.Logger) error { - f.logger = logger - return nil -} - -// CreateStrategyStore implements strategystore.Factory -func (f *Factory) CreateStrategyStore() (strategystore.StrategyStore, strategystore.Aggregator, error) { - s, err := NewStrategyStore(*f.options, f.logger) - if err != nil { - return nil, nil, err - } - - return s, nil, nil -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/options.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/options.go deleted file mode 100644 index 32d3312ec463..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/options.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 -// -// Copyright (c) 2018 The Jaeger Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package static // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static" - -import ( - "flag" - "time" - - "github.com/spf13/viper" -) - -const ( - // samplingStrategiesFile contains the name of CLI option for config file. - samplingStrategiesFile = "sampling.strategies-file" - samplingStrategiesReloadInterval = "sampling.strategies-reload-interval" -) - -// Options holds configuration for the static sampling strategy store. -type Options struct { - // StrategiesFile is the path for the sampling strategies file in JSON format - StrategiesFile string - // ReloadInterval is the time interval to check and reload sampling strategies file - ReloadInterval time.Duration -} - -// AddFlags adds flags for Options -func AddFlags(flagSet *flag.FlagSet) { - flagSet.Duration(samplingStrategiesReloadInterval, 0, "Reload interval to check and reload sampling strategies file. Zero value means no reloading") - flagSet.String(samplingStrategiesFile, "", "The path for the sampling strategies file in JSON format. See sampling documentation to see format of the file") -} - -// InitFromViper initializes Options with properties from viper -func (opts *Options) InitFromViper(v *viper.Viper) *Options { - opts.StrategiesFile = v.GetString(samplingStrategiesFile) - opts.ReloadInterval = v.GetDuration(samplingStrategiesReloadInterval) - return opts -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/strategy.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/strategy.go deleted file mode 100644 index 8dddbebb2846..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/strategy.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 -// -// Copyright (c) 2018 The Jaeger Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package static // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static" - -// strategy defines a sampling strategy. Type can be "probabilistic" or "ratelimiting" -// and Param will represent "sampling probability" and "max traces per second" respectively. -type strategy struct { - Type string `json:"type"` - Param float64 `json:"param"` -} - -// operationStrategy defines an operation specific sampling strategy. -type operationStrategy struct { - Operation string `json:"operation"` - strategy -} - -// serviceStrategy defines a service specific sampling strategy. -type serviceStrategy struct { - Service string `json:"service"` - OperationStrategies []*operationStrategy `json:"operation_strategies"` - strategy -} - -// strategies holds a default sampling strategy and service specific sampling strategies. -type strategies struct { - DefaultStrategy *serviceStrategy `json:"default_strategy"` - ServiceStrategies []*serviceStrategy `json:"service_strategies"` -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/strategy_store.go b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/strategy_store.go deleted file mode 100644 index 5b64519a3d16..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static/strategy_store.go +++ /dev/null @@ -1,339 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 -// -// Copyright (c) 2018 The Jaeger Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package static // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/static" - -import ( - "bytes" - "context" - "encoding/gob" - "encoding/json" - "fmt" - "net/http" - "net/url" - "os" - "path/filepath" - "sync/atomic" - "time" - - "github.com/jaegertracing/jaeger/thrift-gen/sampling" - "go.uber.org/zap" - - ss "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/internal/sampling/strategystore" -) - -// null represents "null" JSON value and -// it un-marshals to nil pointer. -var nullJSON = []byte("null") - -type strategyStore struct { - logger *zap.Logger - - storedStrategies atomic.Value // holds *storedStrategies - - cancelFunc context.CancelFunc -} - -type storedStrategies struct { - defaultStrategy *sampling.SamplingStrategyResponse - serviceStrategies map[string]*sampling.SamplingStrategyResponse -} - -type strategyLoader func() ([]byte, error) - -// NewStrategyStore creates a strategy store that holds static sampling strategies. -func NewStrategyStore(options Options, logger *zap.Logger) (ss.StrategyStore, error) { - ctx, cancelFunc := context.WithCancel(context.Background()) - h := &strategyStore{ - logger: logger, - cancelFunc: cancelFunc, - } - h.storedStrategies.Store(defaultStrategies()) - - if options.StrategiesFile == "" { - h.parseStrategies(nil) - return h, nil - } - - loadFn := h.samplingStrategyLoader(options.StrategiesFile) - strategies, err := loadStrategies(loadFn) - if err != nil { - return nil, err - } - h.parseStrategies(strategies) - - if options.ReloadInterval > 0 { - go h.autoUpdateStrategies(ctx, options.ReloadInterval, loadFn) - } - return h, nil -} - -// GetSamplingStrategy implements StrategyStore#GetSamplingStrategy. -func (h *strategyStore) GetSamplingStrategy(_ context.Context, serviceName string) (*sampling.SamplingStrategyResponse, error) { - ss := h.storedStrategies.Load().(*storedStrategies) - serviceStrategies := ss.serviceStrategies - if strategy, ok := serviceStrategies[serviceName]; ok { - return strategy, nil - } - h.logger.Debug("sampling strategy not found, using default", zap.String("service", serviceName)) - return ss.defaultStrategy, nil -} - -// Close stops updating the strategies -func (h *strategyStore) Close() { - h.cancelFunc() -} - -func (h *strategyStore) downloadSamplingStrategies(url string) ([]byte, error) { - h.logger.Info("Downloading sampling strategies", zap.String("url", url)) - resp, err := http.Get(url) //nolint:gosec - if err != nil { - return nil, fmt.Errorf("failed to download sampling strategies: %w", err) - } - - defer resp.Body.Close() - buf := new(bytes.Buffer) - if _, err = buf.ReadFrom(resp.Body); err != nil { - return nil, fmt.Errorf("failed to read sampling strategies HTTP response body: %w", err) - } - - if resp.StatusCode == http.StatusServiceUnavailable { - return nullJSON, nil - } - if resp.StatusCode != http.StatusOK { - return nil, fmt.Errorf( - "receiving %s while downloading strategies file: %s", - resp.Status, - buf.String(), - ) - } - - return buf.Bytes(), nil -} - -func isURL(str string) bool { - u, err := url.Parse(str) - return err == nil && u.Scheme != "" && u.Host != "" -} - -func (h *strategyStore) samplingStrategyLoader(strategiesFile string) strategyLoader { - if isURL(strategiesFile) { - return func() ([]byte, error) { - return h.downloadSamplingStrategies(strategiesFile) - } - } - - return func() ([]byte, error) { - h.logger.Info("Loading sampling strategies", zap.String("filename", strategiesFile)) - currBytes, err := os.ReadFile(filepath.Clean(strategiesFile)) - if err != nil { - return nil, fmt.Errorf("failed to read strategies file %s: %w", strategiesFile, err) - } - return currBytes, nil - } -} - -func (h *strategyStore) autoUpdateStrategies(ctx context.Context, interval time.Duration, loader strategyLoader) { - lastValue := string(nullJSON) - ticker := time.NewTicker(interval) - defer ticker.Stop() - for { - select { - case <-ticker.C: - lastValue = h.reloadSamplingStrategy(loader, lastValue) - case <-ctx.Done(): - return - } - } -} - -func (h *strategyStore) reloadSamplingStrategy(loadFn strategyLoader, lastValue string) string { - newValue, err := loadFn() - if err != nil { - h.logger.Error("failed to re-load sampling strategies", zap.Error(err)) - return lastValue - } - if lastValue == string(newValue) { - return lastValue - } - if err := h.updateSamplingStrategy(newValue); err != nil { - h.logger.Error("failed to update sampling strategies", zap.Error(err)) - return lastValue - } - return string(newValue) -} - -func (h *strategyStore) updateSamplingStrategy(bytes []byte) error { - var strategies strategies //nolint:govet - if err := json.Unmarshal(bytes, &strategies); err != nil { - return fmt.Errorf("failed to unmarshal sampling strategies: %w", err) - } - h.parseStrategies(&strategies) - h.logger.Info("Updated sampling strategies:" + string(bytes)) - return nil -} - -// TODO good candidate for a global util function -func loadStrategies(loadFn strategyLoader) (*strategies, error) { - strategyBytes, err := loadFn() - if err != nil { - return nil, err - } - - var strategies *strategies - if err := json.Unmarshal(strategyBytes, &strategies); err != nil { - return nil, fmt.Errorf("failed to unmarshal strategies: %w", err) - } - return strategies, nil -} - -func (h *strategyStore) parseStrategies(strategies *strategies) { - if strategies == nil { - h.logger.Info("No sampling strategies provided or URL is unavailable, using defaults") - return - } - newStore := defaultStrategies() - if strategies.DefaultStrategy != nil { - newStore.defaultStrategy = h.parseServiceStrategies(strategies.DefaultStrategy) - } - - merge := true - if newStore.defaultStrategy.OperationSampling == nil || - newStore.defaultStrategy.OperationSampling.PerOperationStrategies == nil { - merge = false - } - - for _, s := range strategies.ServiceStrategies { - newStore.serviceStrategies[s.Service] = h.parseServiceStrategies(s) - - // Merge with the default operation strategies, because only merging with - // the default strategy has no effect on service strategies (the default strategy - // is not merged with and only used as a fallback). - opS := newStore.serviceStrategies[s.Service].OperationSampling - if opS == nil { - if newStore.defaultStrategy.OperationSampling == nil || - newStore.serviceStrategies[s.Service].ProbabilisticSampling == nil { - continue - } - // Service has no per-operation strategies, so just reference the default settings and change default samplingRate. - newOpS := *newStore.defaultStrategy.OperationSampling - newOpS.DefaultSamplingProbability = newStore.serviceStrategies[s.Service].ProbabilisticSampling.SamplingRate - newStore.serviceStrategies[s.Service].OperationSampling = &newOpS - continue - } - if merge { - opS.PerOperationStrategies = mergePerOperationSamplingStrategies( - opS.PerOperationStrategies, - newStore.defaultStrategy.OperationSampling.PerOperationStrategies) - } - } - h.storedStrategies.Store(newStore) -} - -// mergePerOperationStrategies merges two operation strategies a and b, where a takes precedence over b. -func mergePerOperationSamplingStrategies( - a, b []*sampling.OperationSamplingStrategy, -) []*sampling.OperationSamplingStrategy { - m := make(map[string]bool) - for _, aOp := range a { - m[aOp.Operation] = true - } - for _, bOp := range b { - if m[bOp.Operation] { - continue - } - a = append(a, bOp) - } - return a -} - -func (h *strategyStore) parseServiceStrategies(strategy *serviceStrategy) *sampling.SamplingStrategyResponse { - resp := h.parseStrategy(&strategy.strategy) - if len(strategy.OperationStrategies) == 0 { - return resp - } - opS := &sampling.PerOperationSamplingStrategies{ - DefaultSamplingProbability: defaultSamplingProbability, - } - if resp.StrategyType == sampling.SamplingStrategyType_PROBABILISTIC { - opS.DefaultSamplingProbability = resp.ProbabilisticSampling.SamplingRate - } - for _, operationStrategy := range strategy.OperationStrategies { - s, ok := h.parseOperationStrategy(operationStrategy, opS) - if !ok { - continue - } - - opS.PerOperationStrategies = append(opS.PerOperationStrategies, - &sampling.OperationSamplingStrategy{ - Operation: operationStrategy.Operation, - ProbabilisticSampling: s.ProbabilisticSampling, - }) - } - resp.OperationSampling = opS - return resp -} - -func (h *strategyStore) parseOperationStrategy( - strategy *operationStrategy, - parent *sampling.PerOperationSamplingStrategies, -) (s *sampling.SamplingStrategyResponse, ok bool) { - s = h.parseStrategy(&strategy.strategy) - if s.StrategyType == sampling.SamplingStrategyType_RATE_LIMITING { - // TODO OperationSamplingStrategy only supports probabilistic sampling - h.logger.Warn( - fmt.Sprintf( - "Operation strategies only supports probabilistic sampling at the moment,"+ - "'%s' defaulting to probabilistic sampling with probability %f", - strategy.Operation, parent.DefaultSamplingProbability), - zap.Any("strategy", strategy)) - return nil, false - } - return s, true -} - -func (h *strategyStore) parseStrategy(strategy *strategy) *sampling.SamplingStrategyResponse { - switch strategy.Type { - case samplerTypeProbabilistic: - return &sampling.SamplingStrategyResponse{ - StrategyType: sampling.SamplingStrategyType_PROBABILISTIC, - ProbabilisticSampling: &sampling.ProbabilisticSamplingStrategy{ - SamplingRate: strategy.Param, - }, - } - case samplerTypeRateLimiting: - return &sampling.SamplingStrategyResponse{ - StrategyType: sampling.SamplingStrategyType_RATE_LIMITING, - RateLimitingSampling: &sampling.RateLimitingSamplingStrategy{ - MaxTracesPerSecond: int16(strategy.Param), - }, - } - default: - h.logger.Warn("Failed to parse sampling strategy", zap.Any("strategy", strategy)) - return defaultStrategyResponse() - } -} - -func deepCopy(s *sampling.SamplingStrategyResponse) *sampling.SamplingStrategyResponse { //nolint:unused - var buf bytes.Buffer - enc := gob.NewEncoder(&buf) - dec := gob.NewDecoder(&buf) - _ = enc.Encode(*s) - var result sampling.SamplingStrategyResponse //nolint:revive - _ = dec.Decode(&result) - return &result -} diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/metadata.yaml b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/metadata.yaml deleted file mode 100644 index 73a23a66c216..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/metadata.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: jaegerremotesampling - -status: - class: extension - stability: - alpha: [extension] - distributions: - - contrib - - grafana - - redhat - - sumo - codeowners: - active: [jpkrohling, frzifus] diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/testdata/config.yaml b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/testdata/config.yaml deleted file mode 100644 index ec8bd9d9814a..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/testdata/config.yaml +++ /dev/null @@ -1,8 +0,0 @@ -jaegerremotesampling: - source: - remote: - endpoint: jaeger-collector:14250 -jaegerremotesampling/1: - source: - reload_interval: 1s - file: /etc/otelcol/sampling_strategies.json diff --git a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/testdata/strategy.json b/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/testdata/strategy.json deleted file mode 100644 index d086c64042db..000000000000 --- a/extension/jaegerremotesampling/internal/jaegerremotesamplingdeprecated/testdata/strategy.json +++ /dev/null @@ -1 +0,0 @@ -{"strategyType":"PROBABILISTIC"} \ No newline at end of file diff --git a/extension/jaegerremotesampling/internal/metadata/generated_status.go b/extension/jaegerremotesampling/internal/metadata/generated_status.go index 7a0b3224ccbc..39c6512de616 100644 --- a/extension/jaegerremotesampling/internal/metadata/generated_status.go +++ b/extension/jaegerremotesampling/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("jaegerremotesampling") ) const ( - Type = "jaegerremotesampling" ExtensionStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/jaegerremotesampling") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/jaegerremotesampling") +} diff --git a/extension/jaegerremotesampling/internal/package_test.go b/extension/jaegerremotesampling/internal/package_test.go new file mode 100644 index 000000000000..4486cdb28aa6 --- /dev/null +++ b/extension/jaegerremotesampling/internal/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/jaegerremotesampling/internal/remote_strategy_store.go b/extension/jaegerremotesampling/internal/remote_strategy_store.go index 1c0a052f33bd..2f452ec364c3 100644 --- a/extension/jaegerremotesampling/internal/remote_strategy_store.go +++ b/extension/jaegerremotesampling/internal/remote_strategy_store.go @@ -30,7 +30,7 @@ type grpcRemoteStrategyStore struct { // for service-specific outbound GetSamplingStrategy calls. func NewRemoteStrategyStore( conn *grpc.ClientConn, - grpcClientSettings *configgrpc.GRPCClientSettings, + grpcClientSettings *configgrpc.ClientConfig, reloadInterval time.Duration, ) (strategystore.StrategyStore, io.Closer) { cache := newNoopStrategyCache() diff --git a/extension/jaegerremotesampling/metadata.yaml b/extension/jaegerremotesampling/metadata.yaml index 73a23a66c216..f1b9a3350faf 100644 --- a/extension/jaegerremotesampling/metadata.yaml +++ b/extension/jaegerremotesampling/metadata.yaml @@ -1,4 +1,5 @@ type: jaegerremotesampling +scope_name: otelcol/jaegerremotesampling status: class: extension @@ -6,8 +7,9 @@ status: alpha: [extension] distributions: - contrib - - grafana - - redhat - - sumo codeowners: - active: [jpkrohling, frzifus] + active: [yurishkuro, frzifus] + +# TODO: Update the extension to make the tests pass +tests: + skip_lifecycle: true diff --git a/extension/jaegerremotesampling/package_test.go b/extension/jaegerremotesampling/package_test.go new file mode 100644 index 000000000000..1084b9ea4a9e --- /dev/null +++ b/extension/jaegerremotesampling/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package jaegerremotesampling + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/oauth2clientauthextension/README.md b/extension/oauth2clientauthextension/README.md index f52040a97db4..28fc4a916313 100644 --- a/extension/oauth2clientauthextension/README.md +++ b/extension/oauth2clientauthextension/README.md @@ -3,15 +3,12 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [contrib], [grafana], [redhat], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Foauth2clientauth%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Foauth2clientauth) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Foauth2clientauth%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Foauth2clientauth) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@pavankrish123](https://www.github.com/pavankrish123), [@jpkrohling](https://www.github.com/jpkrohling) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[grafana]: https://github.com/grafana/agent -[redhat]: https://github.com/os-observability/redhat-opentelemetry-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector @@ -57,7 +54,8 @@ exporters: otlp/withauth: endpoint: 0.0.0.0:5000 - ca_file: /tmp/certs/ca.pem + tls: + ca_file: /tmp/certs/ca.pem auth: authenticator: oauth2client diff --git a/extension/oauth2clientauthextension/config.go b/extension/oauth2clientauthextension/config.go index c5e31064070a..ea99916f4d73 100644 --- a/extension/oauth2clientauthextension/config.go +++ b/extension/oauth2clientauthextension/config.go @@ -49,7 +49,7 @@ type Config struct { Scopes []string `mapstructure:"scopes,omitempty"` // TLSSetting struct exposes TLS client configuration for the underneath client to authorization server. - TLSSetting configtls.TLSClientSetting `mapstructure:"tls,omitempty"` + TLSSetting configtls.ClientConfig `mapstructure:"tls,omitempty"` // Timeout parameter configures `http.Client.Timeout` for the underneath client to authorization // server while fetching and refreshing tokens. diff --git a/extension/oauth2clientauthextension/config_test.go b/extension/oauth2clientauthextension/config_test.go index 288b4340c567..2d2a9b73fa84 100644 --- a/extension/oauth2clientauthextension/config_test.go +++ b/extension/oauth2clientauthextension/config_test.go @@ -45,8 +45,8 @@ func TestLoadConfig(t *testing.T) { Scopes: []string{"api.metrics"}, TokenURL: "https://example2.com/oauth2/default/v1/token", Timeout: time.Second, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: "cafile", CertFile: "certfile", KeyFile: "keyfile", diff --git a/extension/oauth2clientauthextension/extension.go b/extension/oauth2clientauthextension/extension.go index 7f263154440f..2c2e80fdef25 100644 --- a/extension/oauth2clientauthextension/extension.go +++ b/extension/oauth2clientauthextension/extension.go @@ -36,16 +36,6 @@ var _ oauth2.TokenSource = (*errorWrappingTokenSource)(nil) var errFailedToGetSecurityToken = fmt.Errorf("failed to get security token from token endpoint") func newClientAuthenticator(cfg *Config, logger *zap.Logger) (*clientAuthenticator, error) { - if cfg.ClientID == "" && cfg.ClientIDFile == "" { - return nil, errNoClientIDProvided - } - if cfg.ClientSecret == "" && cfg.ClientSecretFile == "" { - return nil, errNoClientSecretProvided - } - if cfg.TokenURL == "" { - return nil, errNoTokenURLProvided - } - transport := http.DefaultTransport.(*http.Transport).Clone() tlsCfg, err := cfg.TLSSetting.LoadTLSConfig() diff --git a/extension/oauth2clientauthextension/extension_test.go b/extension/oauth2clientauthextension/extension_test.go index d2ce4a6be4f3..a24d869705e9 100644 --- a/extension/oauth2clientauthextension/extension_test.go +++ b/extension/oauth2clientauthextension/extension_test.go @@ -43,8 +43,8 @@ func TestOAuthClientSettings(t *testing.T) { TokenURL: "https://example.com/v1/token", Scopes: []string{"resource.read"}, Timeout: 2, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: testCAFile, CertFile: testCertFile, KeyFile: testKeyFile, @@ -64,8 +64,8 @@ func TestOAuthClientSettings(t *testing.T) { TokenURL: "https://example.com/v1/token", Scopes: []string{"resource.read"}, Timeout: 2, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + Config: configtls.Config{ CAFile: testCAFile, CertFile: "doestexist.cert", KeyFile: testKeyFile, @@ -77,43 +77,13 @@ func TestOAuthClientSettings(t *testing.T) { shouldError: true, expectedError: "failed to load TLS config: failed to load TLS cert and key", }, - { - name: "missing_client_id", - settings: &Config{ - ClientSecret: "testsecret", - TokenURL: "https://example.com/v1/token", - Scopes: []string{"resource.read"}, - }, - shouldError: true, - expectedError: errNoClientIDProvided.Error(), - }, - { - name: "missing_client_secret", - settings: &Config{ - ClientID: "testclientid", - TokenURL: "https://example.com/v1/token", - Scopes: []string{"resource.read"}, - }, - shouldError: true, - expectedError: errNoClientSecretProvided.Error(), - }, - { - name: "missing_token_url", - settings: &Config{ - ClientID: "testclientid", - ClientSecret: "testsecret", - Scopes: []string{"resource.read"}, - }, - shouldError: true, - expectedError: errNoTokenURLProvided.Error(), - }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { rc, err := newClientAuthenticator(test.settings, zap.NewNop()) if test.shouldError { - assert.NotNil(t, err) + assert.Error(t, err) assert.Contains(t, err.Error(), test.expectedError) return } @@ -129,7 +99,7 @@ func TestOAuthClientSettings(t *testing.T) { transport := rc.client.Transport.(*http.Transport) tlsClientConfig := transport.TLSClientConfig tlsTestSettingConfig, err := test.settings.TLSSetting.LoadTLSConfig() - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tlsClientConfig.Certificates, tlsTestSettingConfig.Certificates) }) } @@ -209,7 +179,7 @@ func TestOAuthClientSettingsCredsConfig(t *testing.T) { rc, _ := newClientAuthenticator(test.settings, zap.NewNop()) cfg, err := rc.clientCredentials.createConfig() if test.shouldError { - assert.NotNil(t, err) + assert.Error(t, err) assert.ErrorAs(t, err, test.expectedError) return } @@ -221,7 +191,7 @@ func TestOAuthClientSettingsCredsConfig(t *testing.T) { transport := rc.client.Transport.(*http.Transport) tlsClientConfig := transport.TLSClientConfig tlsTestSettingConfig, err := test.settings.TLSSetting.LoadTLSConfig() - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tlsClientConfig.Certificates, tlsTestSettingConfig.Certificates) }) } @@ -251,15 +221,6 @@ func TestRoundTripper(t *testing.T) { }, shouldError: false, }, - { - name: "invalid_client_settings_should_error", - settings: &Config{ - ClientID: "testclientid", - TokenURL: "https://example.com/v1/token", - Scopes: []string{"resource.read"}, - }, - shouldError: true, - }, } testString := "TestString" @@ -276,7 +237,7 @@ func TestRoundTripper(t *testing.T) { assert.NotNil(t, oauth2Authenticator) roundTripper, err := oauth2Authenticator.roundTripper(baseRoundTripper) - assert.Nil(t, err) + assert.NoError(t, err) // test roundTripper is an OAuth RoundTripper oAuth2Transport, ok := roundTripper.(*oauth2.Transport) @@ -308,15 +269,6 @@ func TestOAuth2PerRPCCredentials(t *testing.T) { }, shouldError: false, }, - { - name: "invalid_client_settings_should_error", - settings: &Config{ - ClientID: "testclientid", - TokenURL: "https://example.com/v1/token", - Scopes: []string{"resource.read"}, - }, - shouldError: true, - }, } for _, testcase := range tests { @@ -329,7 +281,7 @@ func TestOAuth2PerRPCCredentials(t *testing.T) { } assert.NoError(t, err) perRPCCredentials, err := oauth2Authenticator.perRPCCredentials() - assert.Nil(t, err) + assert.NoError(t, err) // test perRPCCredentials is an grpc OAuthTokenSource _, ok := perRPCCredentials.(grpcOAuth.TokenSource) assert.True(t, ok) @@ -338,7 +290,7 @@ func TestOAuth2PerRPCCredentials(t *testing.T) { } func TestFailContactingOAuth(t *testing.T) { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) _, err := w.Write([]byte("not-json")) assert.NoError(t, err) @@ -353,25 +305,25 @@ func TestFailContactingOAuth(t *testing.T) { ClientSecret: "ABC", TokenURL: serverURL.String(), }, zap.NewNop()) - assert.Nil(t, err) + assert.NoError(t, err) // Test for gRPC connections credential, err := oauth2Authenticator.perRPCCredentials() - assert.Nil(t, err) + assert.NoError(t, err) _, err = credential.GetRequestMetadata(context.Background()) assert.ErrorIs(t, err, errFailedToGetSecurityToken) assert.Contains(t, err.Error(), serverURL.String()) // Test for HTTP connections - setting := confighttp.HTTPClientSettings{ + setting := confighttp.ClientConfig{ Endpoint: "http://example.com/", CustomRoundTripper: func(next http.RoundTripper) (http.RoundTripper, error) { return oauth2Authenticator.roundTripper(next) }, } - client, _ := setting.ToClient(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + client, _ := setting.ToClientContext(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) req, err := http.NewRequest("POST", setting.Endpoint, nil) assert.NoError(t, err) _, err = client.Do(req) diff --git a/extension/oauth2clientauthextension/factory_test.go b/extension/oauth2clientauthextension/factory_test.go index 98ea6c7c1121..76a23f690d46 100644 --- a/extension/oauth2clientauthextension/factory_test.go +++ b/extension/oauth2clientauthextension/factory_test.go @@ -43,15 +43,6 @@ func TestCreateExtension(t *testing.T) { }, shouldError: false, }, - { - name: "invalid_client_settings_should_error", - settings: &Config{ - ClientID: "testclientid", - TokenURL: "https://example.com/v1/token", - Scopes: []string{"resource.read"}, - }, - shouldError: true, - }, } for _, testcase := range tests { @@ -65,7 +56,7 @@ func TestCreateExtension(t *testing.T) { assert.Error(t, err) assert.Nil(t, ext) } else { - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, ext) } }) diff --git a/extension/oauth2clientauthextension/generated_component_test.go b/extension/oauth2clientauthextension/generated_component_test.go new file mode 100644 index 000000000000..b3941a495e84 --- /dev/null +++ b/extension/oauth2clientauthextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package oauth2clientauthextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/oauth2clientauthextension/go.mod b/extension/oauth2clientauthextension/go.mod index de6062df59e8..bd30229c92df 100644 --- a/extension/oauth2clientauthextension/go.mod +++ b/extension/oauth2clientauthextension/go.mod @@ -1,60 +1,71 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/extension/auth v0.89.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/extension/auth v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 - golang.org/x/oauth2 v0.14.0 - google.golang.org/grpc v1.59.0 + go.uber.org/zap v1.27.0 + golang.org/x/oauth2 v0.18.0 + google.golang.org/grpc v1.63.2 ) require ( - cloud.google.com/go/compute v1.23.0 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/oauth2clientauthextension/go.sum b/extension/oauth2clientauthextension/go.sum index f2ac1178be8f..c52f00e98af2 100644 --- a/extension/oauth2clientauthextension/go.sum +++ b/extension/oauth2clientauthextension/go.sum @@ -1,7 +1,11 @@ -cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +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/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/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -9,140 +13,179 @@ github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw 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.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 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/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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/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/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +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.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= 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/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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= 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/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/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/oauth2clientauthextension/internal/metadata/generated_status.go b/extension/oauth2clientauthextension/internal/metadata/generated_status.go index 47de0aaab60f..942359512b13 100644 --- a/extension/oauth2clientauthextension/internal/metadata/generated_status.go +++ b/extension/oauth2clientauthextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("oauth2client") ) const ( - Type = "oauth2client" ExtensionStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/oauth2clientauth") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/oauth2clientauth") +} diff --git a/extension/oauth2clientauthextension/metadata.yaml b/extension/oauth2clientauthextension/metadata.yaml index 34b06d6b498b..a3cc07c1a3d7 100644 --- a/extension/oauth2clientauthextension/metadata.yaml +++ b/extension/oauth2clientauthextension/metadata.yaml @@ -1,4 +1,5 @@ type: oauth2client +scope_name: otelcol/oauth2clientauth status: class: extension @@ -6,8 +7,8 @@ status: beta: [extension] distributions: - contrib - - grafana - - redhat - - sumo codeowners: active: [pavankrish123, jpkrohling] + +tests: + config: diff --git a/extension/oauth2clientauthextension/package_test.go b/extension/oauth2clientauthextension/package_test.go new file mode 100644 index 000000000000..640d0f11df3c --- /dev/null +++ b/extension/oauth2clientauthextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package oauth2clientauthextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/observer/dockerobserver/README.md b/extension/observer/dockerobserver/README.md index 54be0640ea69..66c77fd5aa64 100644 --- a/extension/observer/dockerobserver/README.md +++ b/extension/observer/dockerobserver/README.md @@ -4,21 +4,19 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [contrib], [splunk], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fdockerobserver%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fdockerobserver) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fdockerobserver%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fdockerobserver) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@MovieStoreGuy](https://www.github.com/MovieStoreGuy) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector The Docker observer extension is a [Receiver Creator](../../../receiver/receivercreator/README.md)-compatible "watch observer" that will detect and report container endpoints discovered through the Docker API. Only containers that are in the state of `Running` and not `Paused` will emit endpoints. This observer watches the Docker engine's stream of events to dynamically create, update, and remove endpoints as events are processed. -Requires Docker API Version 1.22+. +Requires Docker API Version 1.24+. The collector will need permissions to access the Docker Engine API, specifically it will need read access to the Docker socket (default `unix:///var/run/docker.sock`). @@ -33,8 +31,8 @@ extensions: endpoint: my/path/to/docker.sock # list of container image names to exclude excluded_images: ['redis', 'another_image_name'] - # client API version, default to 1.22 - api_version: 1.24 + # client API version, default to 1.24 + api_version: 1.25 # max amount of time to wait for a response from Docker API , default to 5s timeout: 15s @@ -63,6 +61,12 @@ The maximum amount of time to wait for docker API responses. default: `5s` +### `api_version` + +The client API version. If using one with a terminating zero, input as a string to prevent undesired truncation (e.g. `"1.40"` instead of `1.40`, which is parsed as `1.4`). + +default: `1.24` + ### `excluded_images` A list of filters whose matching images are to be excluded. Supports literals, globs, and regex. diff --git a/extension/observer/dockerobserver/config.go b/extension/observer/dockerobserver/config.go index a3d62b072412..743a7cd9025a 100644 --- a/extension/observer/dockerobserver/config.go +++ b/extension/observer/dockerobserver/config.go @@ -7,6 +7,8 @@ import ( "errors" "fmt" "time" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker" ) // Config defines configuration for docker observer @@ -44,15 +46,15 @@ type Config struct { CacheSyncInterval time.Duration `mapstructure:"cache_sync_interval"` // Docker client API version. Default is 1.22 - DockerAPIVersion float64 `mapstructure:"api_version"` + DockerAPIVersion string `mapstructure:"api_version"` } func (config Config) Validate() error { if config.Endpoint == "" { return errors.New("endpoint must be specified") } - if config.DockerAPIVersion < minimalRequiredDockerAPIVersion { - return fmt.Errorf("api_version must be at least %v", minimalRequiredDockerAPIVersion) + if err := docker.VersionIsValidAndGTE(config.DockerAPIVersion, minimumRequiredDockerAPIVersion); err != nil { + return err } if config.Timeout == 0 { return fmt.Errorf("timeout must be specified") diff --git a/extension/observer/dockerobserver/config_test.go b/extension/observer/dockerobserver/config_test.go index a30ffdc5f058..45c47720e063 100644 --- a/extension/observer/dockerobserver/config_test.go +++ b/extension/observer/dockerobserver/config_test.go @@ -16,12 +16,15 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver/internal/metadata" ) +var version = "1.40" + func TestLoadConfig(t *testing.T) { t.Parallel() tests := []struct { - id component.ID - expected component.Config + id component.ID + expected component.Config + expectedError string }{ { id: component.NewID(metadata.Type), @@ -37,14 +40,28 @@ func TestLoadConfig(t *testing.T) { UseHostnameIfPresent: true, UseHostBindings: true, IgnoreNonHostBindings: true, - DockerAPIVersion: 1.22, + DockerAPIVersion: version, + }, + }, + { + id: component.NewIDWithName(metadata.Type, "unsupported_api_version"), + expected: &Config{ + Endpoint: "unix:///var/run/docker.sock", + CacheSyncInterval: time.Hour, + Timeout: 5 * time.Second, + DockerAPIVersion: "1.4", }, + expectedError: `"api_version" 1.4 must be at least 1.24`, }, } for _, tt := range tests { t.Run(tt.id.String(), func(t *testing.T) { cfg := loadConfig(t, tt.id) - assert.NoError(t, component.ValidateConfig(cfg)) + if tt.expectedError != "" { + assert.EqualError(t, component.ValidateConfig(cfg), tt.expectedError) + } else { + assert.NoError(t, component.ValidateConfig(cfg)) + } assert.Equal(t, tt.expected, cfg) }) } @@ -54,16 +71,16 @@ func TestValidateConfig(t *testing.T) { cfg := &Config{} assert.Equal(t, "endpoint must be specified", component.ValidateConfig(cfg).Error()) - cfg = &Config{Endpoint: "someEndpoint"} - assert.Equal(t, "api_version must be at least 1.22", component.ValidateConfig(cfg).Error()) + cfg = &Config{Endpoint: "someEndpoint", DockerAPIVersion: "1.23"} + assert.Equal(t, `"api_version" 1.23 must be at least 1.24`, component.ValidateConfig(cfg).Error()) - cfg = &Config{Endpoint: "someEndpoint", DockerAPIVersion: 1.22} + cfg = &Config{Endpoint: "someEndpoint", DockerAPIVersion: version} assert.Equal(t, "timeout must be specified", component.ValidateConfig(cfg).Error()) - cfg = &Config{Endpoint: "someEndpoint", DockerAPIVersion: 1.22, Timeout: 5 * time.Minute} + cfg = &Config{Endpoint: "someEndpoint", DockerAPIVersion: version, Timeout: 5 * time.Minute} assert.Equal(t, "cache_sync_interval must be specified", component.ValidateConfig(cfg).Error()) - cfg = &Config{Endpoint: "someEndpoint", DockerAPIVersion: 1.22, Timeout: 5 * time.Minute, CacheSyncInterval: 5 * time.Minute} + cfg = &Config{Endpoint: "someEndpoint", DockerAPIVersion: version, Timeout: 5 * time.Minute, CacheSyncInterval: 5 * time.Minute} assert.Nil(t, component.ValidateConfig(cfg)) } diff --git a/extension/observer/dockerobserver/extension.go b/extension/observer/dockerobserver/extension.go index b171b3eb8fe7..4d7932f2ddcf 100644 --- a/extension/observer/dockerobserver/extension.go +++ b/extension/observer/dockerobserver/extension.go @@ -21,9 +21,9 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker" ) -const ( - defaultDockerAPIVersion = 1.22 - minimalRequiredDockerAPIVersion = 1.22 +var ( + defaultDockerAPIVersion = "1.24" + minimumRequiredDockerAPIVersion = docker.MustNewAPIVersion(defaultDockerAPIVersion) ) var _ extension.Extension = (*dockerObserver)(nil) diff --git a/extension/observer/dockerobserver/go.mod b/extension/observer/dockerobserver/go.mod index a6051d094c55..ce982a667c4f 100644 --- a/extension/observer/dockerobserver/go.mod +++ b/extension/observer/dockerobserver/go.mod @@ -1,81 +1,91 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver -go 1.20 +go 1.21 require ( - github.com/docker/docker v24.0.7+incompatible - github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.89.0 - github.com/stretchr/testify v1.8.4 - github.com/testcontainers/testcontainers-go v0.26.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.uber.org/zap v1.26.0 + github.com/docker/docker v25.0.5+incompatible + github.com/docker/go-connections v0.5.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.98.0 + github.com/stretchr/testify v1.9.0 + github.com/testcontainers/testcontainers-go v0.29.1 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/zap v1.27.0 ) require ( dario.cat/mergo v1.0.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/Microsoft/hcsshim v0.11.1 // indirect + github.com/Microsoft/hcsshim v0.11.4 // indirect + github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/containerd/containerd v1.7.7 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/containerd/containerd v1.7.12 // indirect github.com/containerd/log v0.1.0 // indirect github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect + github.com/distribution/reference v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // 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/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.4.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/klauspost/compress v1.17.2 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect - github.com/opencontainers/runc v1.1.12 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.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/sirupsen/logrus v1.9.3 // 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.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/goleak v1.3.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.15.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -88,9 +98,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/commo // see https://github.com/distribution/distribution/issues/3590 exclude github.com/docker/distribution v2.8.0+incompatible -// see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/24240 -replace github.com/docker/docker v24.0.4+incompatible => github.com/docker/docker v24.0.5-0.20230719162248-f022632503d1+incompatible - retract ( v0.76.2 v0.76.1 diff --git a/extension/observer/dockerobserver/go.sum b/extension/observer/dockerobserver/go.sum index 75c13b93f759..1285c9061e4d 100644 --- a/extension/observer/dockerobserver/go.sum +++ b/extension/observer/dockerobserver/go.sum @@ -1,37 +1,49 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/hcsshim v0.11.1 h1:hJ3s7GbWlGK4YVV92sO88BQSyF4ZLVy7/awqOlPxFbA= -github.com/Microsoft/hcsshim v0.11.1/go.mod h1:nFJmaO4Zr5Y7eADdFOpYswDDlNVbvcIJJNJLECr5JQg= +github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= +github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= +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/containerd/containerd v1.7.7 h1:QOC2K4A42RQpcrZyptP6z9EJZnlHfHJUfZrAAHe15q4= -github.com/containerd/containerd v1.7.7/go.mod h1:3c4XZv6VeT9qgf9GMTxNTMFxGJrGpI2vz1yk4ye+YY8= +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/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= +github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 h1:IPrmumsT9t5BS7XcPhgsCTlkWbYg80SEXUzDpReaU6Y= -github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11/go.mod h1:a6bNUGTbQBsY6VRHTr4h/rkOXjl244DyRD0tx3fgq4Q= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -44,10 +56,10 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ 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/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= 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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= @@ -56,65 +68,71 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= -github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +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/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/testcontainers/testcontainers-go v0.26.0 h1:uqcYdoOHBy1ca7gKODfBd9uTHVK3a7UL848z09MVZ0c= -github.com/testcontainers/testcontainers-go v0.26.0/go.mod h1:ICriE9bLX5CLxL9OFQ2N+2N+f+803LNJ1utJb1+Inx0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/testcontainers/testcontainers-go v0.29.1 h1:z8kxdFlovA2y97RWx98v/TQ+tR+SXZm6p35M+xB92zk= +github.com/testcontainers/testcontainers-go v0.29.1/go.mod h1:SnKnKQav8UcgtKqjp/AD8bE1MqZm+3TDb/B8crE3XnI= 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= @@ -123,30 +141,42 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de 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.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -154,22 +184,21 @@ golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea h1:vLCWI/yYrdEHyN2JzIzPO3aaQ golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= 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.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.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-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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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-20190507160741-ecd444e8653b/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= @@ -177,14 +206,15 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= +golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= @@ -195,17 +225,22 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= diff --git a/extension/observer/dockerobserver/integration_test.go b/extension/observer/dockerobserver/integration_test.go index d9cf2e720935..26362af8b12e 100644 --- a/extension/observer/dockerobserver/integration_test.go +++ b/extension/observer/dockerobserver/integration_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build integration -// +build integration package dockerobserver @@ -17,24 +16,12 @@ import ( "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" - "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer" ) -type testHost struct { - component.Host - t *testing.T -} - -// ReportFatalError causes the test to be run to fail. -func (h *testHost) ReportFatalError(err error) { - h.t.Fatalf("Receiver reported a fatal error: %v", err) -} - -var _ component.Host = (*testHost)(nil) - func TestObserverEmitsEndpointsIntegration(t *testing.T) { image := "docker.io/library/nginx" tag := "1.17" @@ -50,10 +37,10 @@ func TestObserverEmitsEndpointsIntegration(t *testing.T) { ContainerRequest: req, Started: true, }) - require.Nil(t, err) + require.NoError(t, err) defer func() { err := container.Terminate(ctx) - require.Nil(t, err) + require.NoError(t, err) }() require.NotNil(t, container) @@ -95,10 +82,10 @@ func TestObserverUpdatesEndpointsIntegration(t *testing.T) { ContainerRequest: req, Started: true, }) - require.Nil(t, err) + require.NoError(t, err) defer func() { err = container.Terminate(ctx) - require.Nil(t, err) + require.NoError(t, err) }() require.NotNil(t, container) @@ -119,7 +106,7 @@ func TestObserverUpdatesEndpointsIntegration(t *testing.T) { require.True(t, found, "No nginx container found") tcDockerClient, err := testcontainers.NewDockerClientWithOpts(ctx) - require.Nil(t, err) + require.NoError(t, err) require.NoError(t, tcDockerClient.ContainerRename(context.Background(), container.GetContainerID(), "nginx-updated")) @@ -155,7 +142,7 @@ func TestObserverRemovesEndpointsIntegration(t *testing.T) { ContainerRequest: req, Started: true, }) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, container) mn := &mockNotifier{endpointsMap: map[observer.EndpointID]observer.Endpoint{}} @@ -175,7 +162,7 @@ func TestObserverRemovesEndpointsIntegration(t *testing.T) { require.True(t, found, "No nginx container found") err = container.Terminate(ctx) - require.Nil(t, err) + require.NoError(t, err) require.Eventually(t, func() bool { return mn.RemoveCount() == 1 }, 3*time.Second, 10*time.Millisecond) } @@ -192,10 +179,10 @@ func TestObserverExcludesImagesIntegration(t *testing.T) { ContainerRequest: req, Started: true, }) - require.Nil(t, err) + require.NoError(t, err) defer func() { err := container.Terminate(ctx) - require.Nil(t, err) + require.NoError(t, err) }() require.NotNil(t, container) @@ -227,9 +214,7 @@ func startObserverWithConfig(t *testing.T, listener observer.Notify, c *Config) obvs, ok := ext.(*dockerObserver) require.True(t, ok) require.NoError(t, err, "failed creating extension") - require.NoError(t, obvs.Start(ctx, &testHost{ - t: t, - })) + require.NoError(t, obvs.Start(ctx, componenttest.NewNopHost())) go obvs.ListAndWatch(listener) return obvs diff --git a/extension/observer/dockerobserver/internal/metadata/generated_status.go b/extension/observer/dockerobserver/internal/metadata/generated_status.go index 37cb96c3ff7b..b57ac2a8dc28 100644 --- a/extension/observer/dockerobserver/internal/metadata/generated_status.go +++ b/extension/observer/dockerobserver/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("docker_observer") ) const ( - Type = "docker_observer" ExtensionStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/dockerobserver") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/dockerobserver") +} diff --git a/extension/observer/dockerobserver/metadata.yaml b/extension/observer/dockerobserver/metadata.yaml index c2bf7666a112..18524b5d25e8 100644 --- a/extension/observer/dockerobserver/metadata.yaml +++ b/extension/observer/dockerobserver/metadata.yaml @@ -1,9 +1,15 @@ type: docker_observer +scope_name: otelcol/dockerobserver status: class: extension stability: beta: [extension] - distributions: [contrib, splunk, sumo] + distributions: [contrib] codeowners: active: [MovieStoreGuy] + +# TODO: The tests are not passing on Windows. Either fix them or mark component as not supported on Windows. +tests: + skip_lifecycle: true + skip_shutdown: true \ No newline at end of file diff --git a/extension/observer/dockerobserver/testdata/config.yaml b/extension/observer/dockerobserver/testdata/config.yaml index cb9440041ac8..1e27aa54fdf0 100644 --- a/extension/observer/dockerobserver/testdata/config.yaml +++ b/extension/observer/dockerobserver/testdata/config.yaml @@ -7,6 +7,7 @@ docker_observer/all_settings: use_host_bindings: true ignore_non_host_bindings: true cache_sync_interval: 5m + api_version: '1.40' docker_observer/use_hostname_if_present: use_hostname_if_present: true docker_observer/use_host_bindings: @@ -15,3 +16,6 @@ docker_observer/ignore_non_host_bindings: ignore_non_host_bindings: true docker_observer/exclude_nginx: excluded_images: ["nginx"] +docker_observer/unsupported_api_version: + # intentionally a float since it will be parsed as 1.4 + api_version: 1.40 diff --git a/extension/observer/ecsobserver/README.md b/extension/observer/ecsobserver/README.md index 73bb1119e302..9d0bfc4462c4 100644 --- a/extension/observer/ecsobserver/README.md +++ b/extension/observer/ecsobserver/README.md @@ -4,15 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [contrib], [aws], [splunk], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fecsobserver%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fecsobserver) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fecsobserver%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fecsobserver) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dmitryax](https://www.github.com/dmitryax), [@rmfitzpatrick](https://www.github.com/rmfitzpatrick) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector The `ecsobserver` uses the ECS/EC2 API to discover prometheus scrape targets from all running tasks and filter them @@ -443,7 +440,7 @@ otel's own /metrics. ### Error Handling -- Auth and cluster not found error will cause the extension to stop (calling `host.ReportFatalError`). Although IAM role +- Auth and cluster not found error will cause the extension to stop (calling `ReportStatus`). Although IAM role can be updated at runtime without restarting the collector, it's better to fail to make the problem obvious. Same applies to cluster not found. In the future we can add config to downgrade those errors if user want to monitor an ECS cluster with collector running outside the cluster, the collector can run anywhere as long as it can reach scrape diff --git a/extension/observer/ecsobserver/extension.go b/extension/observer/ecsobserver/extension.go index b3f832544f84..abb4da7cee7a 100644 --- a/extension/observer/ecsobserver/extension.go +++ b/extension/observer/ecsobserver/extension.go @@ -15,31 +15,31 @@ var _ extension.Extension = (*ecsObserver)(nil) // ecsObserver implements component.ServiceExtension interface. type ecsObserver struct { - logger *zap.Logger - sd *serviceDiscovery + telemetrySettings component.TelemetrySettings + sd *serviceDiscovery // for Shutdown cancel func() } // Start runs the service discovery in background -func (e *ecsObserver) Start(_ context.Context, host component.Host) error { - e.logger.Info("Starting ECSDiscovery") +func (e *ecsObserver) Start(_ context.Context, _ component.Host) error { + e.telemetrySettings.Logger.Info("Starting ECSDiscovery") // Ignore the ctx parameter as it is not for long running operation ctx, cancel := context.WithCancel(context.Background()) e.cancel = cancel go func() { if err := e.sd.runAndWriteFile(ctx); err != nil { - e.logger.Error("ECSDiscovery stopped by error", zap.Error(err)) + e.telemetrySettings.Logger.Error("ECSDiscovery stopped by error", zap.Error(err)) // Stop the collector - host.ReportFatalError(err) + e.telemetrySettings.ReportStatus(component.NewFatalErrorEvent(err)) } }() return nil } func (e *ecsObserver) Shutdown(_ context.Context) error { - e.logger.Info("Stopping ECSDiscovery") + e.telemetrySettings.Logger.Info("Stopping ECSDiscovery") e.cancel() return nil } diff --git a/extension/observer/ecsobserver/extension_test.go b/extension/observer/ecsobserver/extension_test.go index 28b69ea3b628..cbf02b8d5215 100644 --- a/extension/observer/ecsobserver/extension_test.go +++ b/extension/observer/ecsobserver/extension_test.go @@ -6,7 +6,6 @@ package ecsobserver import ( "context" "runtime" - "sync" "testing" "time" @@ -20,49 +19,6 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/internal/ecsmock" ) -// inspectErrorHost implements component.Host. -// btw: I only find assertNoErrorHost in other components, seems there is no exported util struct. -type inspectErrorHost struct { - component.Host - - // Why we need a mutex here? Our extension only has one go routine so it seems - // we don't need to protect the error as our extension is the only component for this 'host'. - // But without the lock the test actually fails on race detector. - // There is no actual concurrency in our test, when we read the error in test assertion, - // we know the extension has already stopped because we provided invalided config and waited long enough. - // However, (I assume) from race detector's perspective, race between a stopped goroutine and a running one - // is same as two running goroutines. A goroutine's stop condition is uncertain at runtime, and the data - // access order may varies, goroutine A can stop before B in first run and reverse in next run. - // As long as there is some read/write of one memory area without protection from multiple go routines, - // it means the code can have data race, but it does not mean this race always happen. - // In our case, the race never happens because we hard coded the sleep time of two go routines. - // - // btw: assertNoErrorHost does not have mutex because it never saves the error. Its ReportFatalError - // just call assertion and forget about nil error. For unexpected error it call helpers to fail the test - // and those helper func all have mutex. https://golang.org/src/testing/testing.go - mu sync.Mutex - err error -} - -func newInspectErrorHost() component.Host { - return &inspectErrorHost{ - Host: componenttest.NewNopHost(), - } -} - -func (h *inspectErrorHost) ReportFatalError(err error) { - h.mu.Lock() - h.err = err - h.mu.Unlock() -} - -func (h *inspectErrorHost) getError() error { - h.mu.Lock() - cp := h.err - h.mu.Unlock() - return cp -} - // Simply start and stop, the actual test logic is in sd_test.go until we implement the ListWatcher interface. // In that case sd itself does not use timer and relies on caller to trigger List. func TestExtensionStartStop(t *testing.T) { @@ -71,7 +27,6 @@ func TestExtensionStartStop(t *testing.T) { "https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/4042") } refreshInterval := 100 * time.Millisecond - waitDuration := 2 * refreshInterval createTestExt := func(c *ecsmock.Cluster, output string) extension.Extension { f := newTestTaskFetcher(t, c) @@ -79,7 +34,11 @@ func TestExtensionStartStop(t *testing.T) { sdCfg := cfg.(*Config) sdCfg.RefreshInterval = refreshInterval sdCfg.ResultFile = output - ext, err := createExtensionWithFetcher(extensiontest.NewNopCreateSettings(), sdCfg, f) + cs := extensiontest.NewNopCreateSettings() + cs.ReportStatus = func(event *component.StatusEvent) { + require.NoError(t, event.Err()) + } + ext, err := createExtensionWithFetcher(cs, sdCfg, f) require.NoError(t, err) return ext } @@ -88,21 +47,28 @@ func TestExtensionStartStop(t *testing.T) { c := ecsmock.NewCluster() ext := createTestExt(c, "testdata/ut_ext_noop.actual.yaml") require.IsType(t, &ecsObserver{}, ext) - host := newInspectErrorHost() - require.NoError(t, ext.Start(context.TODO(), host)) - time.Sleep(waitDuration) - require.NoError(t, host.(*inspectErrorHost).getError()) + require.NoError(t, ext.Start(context.TODO(), componenttest.NewNopHost())) require.NoError(t, ext.Shutdown(context.TODO())) }) t.Run("critical error", func(t *testing.T) { c := ecsmock.NewClusterWithName("different than default config") - ext := createTestExt(c, "testdata/ut_ext_critical_error.actual.yaml") - host := newInspectErrorHost() - require.NoError(t, ext.Start(context.TODO(), host)) - time.Sleep(waitDuration) - err := host.(*inspectErrorHost).getError() - require.Error(t, err) - require.Error(t, hasCriticalError(zap.NewExample(), err)) + f := newTestTaskFetcher(t, c) + cfg := createDefaultConfig() + sdCfg := cfg.(*Config) + sdCfg.RefreshInterval = 100 * time.Millisecond + sdCfg.ResultFile = "testdata/ut_ext_critical_error.actual.yaml" + cs := extensiontest.NewNopCreateSettings() + statusEventChan := make(chan *component.StatusEvent) + cs.TelemetrySettings.ReportStatus = func(e *component.StatusEvent) { + statusEventChan <- e + } + ext, err := createExtensionWithFetcher(cs, sdCfg, f) + require.NoError(t, err) + err = ext.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) + e := <-statusEventChan + require.Error(t, e.Err()) + require.Error(t, hasCriticalError(zap.NewExample(), e.Err())) }) } diff --git a/extension/observer/ecsobserver/factory.go b/extension/observer/ecsobserver/factory.go index 7e444f7c3c82..615136d0f6f8 100644 --- a/extension/observer/ecsobserver/factory.go +++ b/extension/observer/ecsobserver/factory.go @@ -44,7 +44,7 @@ func createExtensionWithFetcher(params extension.CreateSettings, sdCfg *Config, return nil, err } return &ecsObserver{ - logger: params.Logger, - sd: sd, + telemetrySettings: params.TelemetrySettings, + sd: sd, }, nil } diff --git a/extension/observer/ecsobserver/go.mod b/extension/observer/ecsobserver/go.mod index df4d78a5b533..6dc7c1bf9e0f 100644 --- a/extension/observer/ecsobserver/go.mod +++ b/extension/observer/ecsobserver/go.mod @@ -1,44 +1,55 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver -go 1.20 +go 1.21 require ( - github.com/aws/aws-sdk-go v1.47.10 + github.com/aws/aws-sdk-go v1.51.17 github.com/hashicorp/golang-lru v1.0.2 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 gopkg.in/yaml.v2 v2.4.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.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/observer/ecsobserver/go.sum b/extension/observer/ecsobserver/go.sum index ce30b0610689..a36183c10f5e 100644 --- a/extension/observer/ecsobserver/go.sum +++ b/extension/observer/ecsobserver/go.sum @@ -1,10 +1,19 @@ -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +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/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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -12,8 +21,9 @@ 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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -26,47 +36,61 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -76,16 +100,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -98,16 +122,17 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/extension/observer/ecsobserver/internal/ecsmock/package_test.go b/extension/observer/ecsobserver/internal/ecsmock/package_test.go new file mode 100644 index 000000000000..95bdf1a820e1 --- /dev/null +++ b/extension/observer/ecsobserver/internal/ecsmock/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ecsmock + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/observer/ecsobserver/internal/ecsmock/service_test.go b/extension/observer/ecsobserver/internal/ecsmock/service_test.go index 525be268ff3a..acaec6b13426 100644 --- a/extension/observer/ecsobserver/internal/ecsmock/service_test.go +++ b/extension/observer/ecsobserver/internal/ecsmock/service_test.go @@ -63,7 +63,7 @@ func TestCluster_DescribeTasksWithContext(t *testing.T) { ctx := context.Background() c := NewClusterWithName("c1") count := 10 - c.SetTasks(GenTasks("p", count, func(i int, task *ecs.Task) { + c.SetTasks(GenTasks("p", count, func(_ int, task *ecs.Task) { task.LastStatus = aws.String("running") })) @@ -95,7 +95,7 @@ func TestCluster_DescribeTaskDefinitionWithContext(t *testing.T) { ctx := context.Background() c := NewClusterWithName("c1") c.SetTaskDefinitions(GenTaskDefinitions("foo", 10, 1, nil)) // accept nil - c.SetTaskDefinitions(GenTaskDefinitions("foo", 10, 1, func(i int, def *ecs.TaskDefinition) { + c.SetTaskDefinitions(GenTaskDefinitions("foo", 10, 1, func(_ int, def *ecs.TaskDefinition) { def.NetworkMode = aws.String(ecs.NetworkModeBridge) })) @@ -151,14 +151,14 @@ func TestCluster_DescribeInstancesWithContext(t *testing.T) { t.Run("get by id", func(t *testing.T) { var ids []*string - nIds := 100 - for i := 0; i < nIds; i++ { + nIDs := 100 + for i := 0; i < nIDs; i++ { ids = append(ids, aws.String(fmt.Sprintf("i-%d", i*10))) } req := &ec2.DescribeInstancesInput{InstanceIds: ids} res, err := c.DescribeInstancesWithContext(ctx, req) require.NoError(t, err) - assert.Equal(t, nIds, len(res.Reservations[0].Instances)) + assert.Equal(t, nIDs, len(res.Reservations[0].Instances)) }) t.Run("invalid id", func(t *testing.T) { @@ -191,14 +191,14 @@ func TestCluster_DescribeContainerInstancesWithContext(t *testing.T) { t.Run("get by id", func(t *testing.T) { var ids []*string - nIds := count - for i := 0; i < nIds; i++ { + nIDs := count + for i := 0; i < nIDs; i++ { ids = append(ids, aws.String(fmt.Sprintf("foo%d", i))) } req := &ecs.DescribeContainerInstancesInput{ContainerInstances: ids} res, err := c.DescribeContainerInstancesWithContext(ctx, req) require.NoError(t, err) - assert.Equal(t, nIds, len(res.ContainerInstances)) + assert.Equal(t, nIDs, len(res.ContainerInstances)) assert.Equal(t, 0, len(res.Failures)) }) diff --git a/extension/observer/ecsobserver/internal/errctx/package_test.go b/extension/observer/ecsobserver/internal/errctx/package_test.go new file mode 100644 index 000000000000..f2ed6739bf5c --- /dev/null +++ b/extension/observer/ecsobserver/internal/errctx/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package errctx + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/observer/ecsobserver/internal/metadata/generated_status.go b/extension/observer/ecsobserver/internal/metadata/generated_status.go index 6379aea62869..4f90e8eaf23e 100644 --- a/extension/observer/ecsobserver/internal/metadata/generated_status.go +++ b/extension/observer/ecsobserver/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("ecs_observer") ) const ( - Type = "ecs_observer" ExtensionStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/ecsobserver") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/ecsobserver") +} diff --git a/extension/observer/ecsobserver/metadata.yaml b/extension/observer/ecsobserver/metadata.yaml index 9f1e59fb8419..bcdde84ff919 100644 --- a/extension/observer/ecsobserver/metadata.yaml +++ b/extension/observer/ecsobserver/metadata.yaml @@ -1,9 +1,15 @@ type: ecs_observer +scope_name: otelcol/ecsobserver status: class: extension stability: beta: [extension] - distributions: [contrib, aws, splunk, sumo] + distributions: [contrib] codeowners: active: [dmitryax, rmfitzpatrick] + +# TODO: Update the extension to make the tests pass +tests: + skip_lifecycle: true + skip_shutdown: true diff --git a/extension/observer/ecsobserver/package_test.go b/extension/observer/ecsobserver/package_test.go new file mode 100644 index 000000000000..7613546053ea --- /dev/null +++ b/extension/observer/ecsobserver/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ecsobserver + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/observer/ecsobserver/sd_test.go b/extension/observer/ecsobserver/sd_test.go index c302602f70f1..7fbf7c9328cd 100644 --- a/extension/observer/ecsobserver/sd_test.go +++ b/extension/observer/ecsobserver/sd_test.go @@ -220,7 +220,7 @@ func newTestTaskFetcher(t *testing.T, c *ecsmock.Cluster, opts ...func(options * Region: "not used", ecsOverride: c, ec2Override: c, - serviceNameFilter: func(name string) bool { + serviceNameFilter: func(_ string) bool { return true }, } diff --git a/extension/observer/ecsobserver/service.go b/extension/observer/ecsobserver/service.go index 3f63317fd294..75bf480306e7 100644 --- a/extension/observer/ecsobserver/service.go +++ b/extension/observer/ecsobserver/service.go @@ -96,7 +96,7 @@ func (s *serviceMatcher) matchTargets(t *taskAnnotated, c *ecs.ContainerDefiniti func serviceConfigsToFilter(cfgs []ServiceConfig) (serviceNameFilter, error) { // If no service config, don't describe any services if len(cfgs) == 0 { - return func(name string) bool { + return func(_ string) bool { return false }, nil } diff --git a/extension/observer/ecsobserver/task_test.go b/extension/observer/ecsobserver/task_test.go index b9d0a1875e42..2daea1bdb2a6 100644 --- a/extension/observer/ecsobserver/task_test.go +++ b/extension/observer/ecsobserver/task_test.go @@ -118,10 +118,10 @@ func TestTask_MappedPort(t *testing.T) { EC2: &ec2.Instance{PrivateIpAddress: aws.String("172.168.1.1")}, } ip, err := task.PrivateIP() - require.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "172.168.1.1", ip) p, err := task.MappedPort(&ecs.ContainerDefinition{Name: aws.String("c1")}, 2112) - require.Nil(t, err) + require.NoError(t, err) assert.Equal(t, int64(2345), p) }) @@ -132,7 +132,7 @@ func TestTask_MappedPort(t *testing.T) { EC2: &ec2.Instance{PrivateIpAddress: aws.String("172.168.1.1")}, } p, err := task.MappedPort(&ecs.ContainerDefinition{Name: aws.String("c1")}, 2112) - require.Nil(t, err) + require.NoError(t, err) assert.Equal(t, int64(2345), p) }) @@ -156,7 +156,7 @@ func TestTask_MappedPort(t *testing.T) { Definition: vpcTaskDef, } p, err := task.MappedPort(vpcTaskDef.ContainerDefinitions[0], 2112) - require.Nil(t, err) + require.NoError(t, err) assert.Equal(t, int64(2345), p) }) @@ -168,7 +168,7 @@ func TestTask_MappedPort(t *testing.T) { Definition: def, } p, err := task.MappedPort(def.ContainerDefinitions[0], 2112) - require.Nil(t, err) + require.NoError(t, err) assert.Equal(t, int64(2345), p) }) diff --git a/extension/observer/ecstaskobserver/README.md b/extension/observer/ecstaskobserver/README.md index b74e4621a011..2e6c0940a10e 100644 --- a/extension/observer/ecstaskobserver/README.md +++ b/extension/observer/ecstaskobserver/README.md @@ -4,14 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [contrib], [splunk], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fecstaskobserver%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fecstaskobserver) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fecstaskobserver%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fecstaskobserver) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@rmfitzpatrick](https://www.github.com/rmfitzpatrick) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector The `ecs_task_observer` is a [Receiver Creator](../../../receiver/receivercreator/README.md)-compatible "watch observer" that will detect and report diff --git a/extension/observer/ecstaskobserver/config.go b/extension/observer/ecstaskobserver/config.go index 9a9060f508bb..7d3a0a218d84 100644 --- a/extension/observer/ecstaskobserver/config.go +++ b/extension/observer/ecstaskobserver/config.go @@ -17,7 +17,7 @@ const ( ) type Config struct { - confighttp.HTTPClientSettings `mapstructure:",squash"` + confighttp.ClientConfig `mapstructure:",squash"` // RefreshInterval determines the frequency at which the observer // needs to poll for collecting new information about task containers. diff --git a/extension/observer/ecstaskobserver/config_test.go b/extension/observer/ecstaskobserver/config_test.go index 01f4559259d6..4a9da20bf93b 100644 --- a/extension/observer/ecstaskobserver/config_test.go +++ b/extension/observer/ecstaskobserver/config_test.go @@ -32,7 +32,7 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "with-endpoint"), expected: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "http://a.valid.url:1234/path", }, PortLabels: []string{"ECS_TASK_OBSERVER_PORT"}, diff --git a/extension/observer/ecstaskobserver/factory.go b/extension/observer/ecstaskobserver/factory.go index fbb843770635..366b8635d38b 100644 --- a/extension/observer/ecstaskobserver/factory.go +++ b/extension/observer/ecstaskobserver/factory.go @@ -74,7 +74,7 @@ func metadataProviderFromEndpoint(config *Config, settings component.TelemetrySe return nil, fmt.Errorf("failed to parse task metadata endpoint: %w", err) } - restClient, err := ecsutil.NewRestClient(*parsed, config.HTTPClientSettings, settings) + restClient, err := ecsutil.NewRestClient(*parsed, config.ClientConfig, settings) if err != nil { return nil, fmt.Errorf("failed to create ECS Task Observer rest client: %w", err) } diff --git a/extension/observer/ecstaskobserver/go.mod b/extension/observer/ecstaskobserver/go.mod index 4bb948ddcc40..b59f04d43f35 100644 --- a/extension/observer/ecstaskobserver/go.mod +++ b/extension/observer/ecstaskobserver/go.mod @@ -1,59 +1,70 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecstaskobserver -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.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.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/observer/ecstaskobserver/go.sum b/extension/observer/ecstaskobserver/go.sum index 0106466d8402..80d714d67290 100644 --- a/extension/observer/ecstaskobserver/go.sum +++ b/extension/observer/ecstaskobserver/go.sum @@ -1,3 +1,7 @@ +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/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/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -5,10 +9,12 @@ github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw 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.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -18,81 +24,105 @@ 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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -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/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -102,16 +132,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -124,15 +154,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/observer/ecstaskobserver/internal/metadata/generated_status.go b/extension/observer/ecstaskobserver/internal/metadata/generated_status.go index 809117881999..2822e6ffdf90 100644 --- a/extension/observer/ecstaskobserver/internal/metadata/generated_status.go +++ b/extension/observer/ecstaskobserver/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("ecs_task_observer") ) const ( - Type = "ecs_task_observer" ExtensionStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/ecstaskobserver") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/ecstaskobserver") +} diff --git a/extension/observer/ecstaskobserver/metadata.yaml b/extension/observer/ecstaskobserver/metadata.yaml index 21882823f67f..fc96988b8c52 100644 --- a/extension/observer/ecstaskobserver/metadata.yaml +++ b/extension/observer/ecstaskobserver/metadata.yaml @@ -1,9 +1,15 @@ type: ecs_task_observer +scope_name: otelcol/ecstaskobserver status: class: extension stability: beta: [extension] - distributions: [contrib, splunk, sumo] + distributions: [contrib] codeowners: active: [rmfitzpatrick] + +# TODO: Update the extension to make the tests pass +tests: + skip_lifecycle: true + skip_shutdown: true diff --git a/extension/observer/ecstaskobserver/package_test.go b/extension/observer/ecstaskobserver/package_test.go new file mode 100644 index 000000000000..d4e58f741e3c --- /dev/null +++ b/extension/observer/ecstaskobserver/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ecstaskobserver + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/observer/endpoints.go b/extension/observer/endpoints.go index 7754841bc758..89a57b255a89 100644 --- a/extension/observer/endpoints.go +++ b/extension/observer/endpoints.go @@ -23,6 +23,8 @@ const ( PortType EndpointType = "port" // PodType is a pod endpoint. PodType EndpointType = "pod" + // K8sServiceType is a service endpoint. + K8sServiceType EndpointType = "k8s.service" // K8sNodeType is a Kubernetes Node endpoint. K8sNodeType EndpointType = "k8s.node" // HostPortType is a hostport endpoint. @@ -34,6 +36,7 @@ const ( var ( _ EndpointDetails = (*Pod)(nil) _ EndpointDetails = (*Port)(nil) + _ EndpointDetails = (*K8sService)(nil) _ EndpointDetails = (*K8sNode)(nil) _ EndpointDetails = (*HostPort)(nil) _ EndpointDetails = (*Container)(nil) @@ -92,6 +95,40 @@ func (e Endpoint) equals(other Endpoint) bool { } } +// K8sService is a discovered k8s service. +type K8sService struct { + // Name of the service. + Name string + // UID is the unique ID in the cluster for the service. + UID string + // Labels is a map of user-specified metadata. + Labels map[string]string + // Annotations is a map of user-specified metadata. + Annotations map[string]string + // Namespace must be unique for services with same name. + Namespace string + // ClusterIP is the IP under which the service is reachable within the cluster. + ClusterIP string + // ServiceType is the type of the service: ClusterIP, NodePort, LoadBalancer, ExternalName + ServiceType string +} + +func (s *K8sService) Env() EndpointEnv { + return map[string]any{ + "uid": s.UID, + "name": s.Name, + "labels": s.Labels, + "annotations": s.Annotations, + "namespace": s.Namespace, + "cluster_ip": s.ClusterIP, + "service_type": s.ServiceType, + } +} + +func (s *K8sService) Type() EndpointType { + return K8sServiceType +} + // Pod is a discovered k8s pod. type Pod struct { // Name of the pod. diff --git a/extension/observer/endpoints_test.go b/extension/observer/endpoints_test.go index b81e9440049b..c90be0900d34 100644 --- a/extension/observer/endpoints_test.go +++ b/extension/observer/endpoints_test.go @@ -49,7 +49,7 @@ func TestEndpointEnv(t *testing.T) { }, }, { - name: "K8s port", + name: "K8s pod port", endpoint: Endpoint{ ID: EndpointID("port_id"), Target: "192.68.73.2", @@ -90,6 +90,42 @@ func TestEndpointEnv(t *testing.T) { "transport": ProtocolTCP, }, }, + { + name: "Service", + endpoint: Endpoint{ + ID: EndpointID("service_id"), + Target: "service.namespace", + Details: &K8sService{ + Name: "service_name", + UID: "service-uid", + Labels: map[string]string{ + "label_key": "label_val", + }, + Annotations: map[string]string{ + "annotation_1": "value_1", + }, + Namespace: "service-namespace", + ServiceType: "LoadBalancer", + ClusterIP: "192.68.73.2", + }, + }, + want: EndpointEnv{ + "type": "k8s.service", + "endpoint": "service.namespace", + "id": "service_id", + "name": "service_name", + "labels": map[string]string{ + "label_key": "label_val", + }, + "annotations": map[string]string{ + "annotation_1": "value_1", + }, + "uid": "service-uid", + "namespace": "service-namespace", + "cluster_ip": "192.68.73.2", + "service_type": "LoadBalancer", + }, + }, { name: "Host port", endpoint: Endpoint{ diff --git a/extension/observer/go.mod b/extension/observer/go.mod index c15448785634..68cc60fca8f9 100644 --- a/extension/observer/go.mod +++ b/extension/observer/go.mod @@ -1,16 +1,17 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.uber.org/zap v1.26.0 + github.com/stretchr/testify v1.9.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect go.uber.org/multierr v1.11.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/observer/go.sum b/extension/observer/go.sum index 942699698d77..7891d9c3ae5c 100644 --- a/extension/observer/go.sum +++ b/extension/observer/go.sum @@ -1,23 +1,23 @@ -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/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/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.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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 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/extension/observer/hostobserver/README.md b/extension/observer/hostobserver/README.md index eb0b2d7b3bec..f18e7019e930 100644 --- a/extension/observer/hostobserver/README.md +++ b/extension/observer/hostobserver/README.md @@ -4,14 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [contrib], [splunk], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fhostobserver%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fhostobserver) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fhostobserver%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fhostobserver) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@MovieStoreGuy](https://www.github.com/MovieStoreGuy) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector The `host_observer` looks at the current host for listening network endpoints. diff --git a/extension/observer/hostobserver/extension_test.go b/extension/observer/hostobserver/extension_test.go index 5666735ff55c..2c010619fa2e 100644 --- a/extension/observer/hostobserver/extension_test.go +++ b/extension/observer/hostobserver/extension_test.go @@ -510,7 +510,7 @@ func TestCollectEndpoints(t *testing.T) { newProc: func(pid int32) (*process.Process, error) { return &process.Process{Pid: pid}, nil }, - procDetails: func(proc *process.Process) (*processDetails, error) { + procDetails: func(_ *process.Process) (*processDetails, error) { return nil, errors.New("always fail") }, want: []observer.Endpoint{}, diff --git a/extension/observer/hostobserver/generated_component_test.go b/extension/observer/hostobserver/generated_component_test.go new file mode 100644 index 000000000000..fc8046c1668d --- /dev/null +++ b/extension/observer/hostobserver/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package hostobserver + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/observer/hostobserver/go.mod b/extension/observer/hostobserver/go.mod index 121a1421862e..188ccd1d2162 100644 --- a/extension/observer/hostobserver/go.mod +++ b/extension/observer/hostobserver/go.mod @@ -1,49 +1,60 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.89.0 - github.com/shirou/gopsutil/v3 v3.23.10 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.98.0 + github.com/shirou/gopsutil/v3 v3.24.3 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.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.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/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // 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/knadh/koanf/v2 v2.1.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.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk 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.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/shoenig/go-m1cpu v0.1.6 // 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.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/observer/hostobserver/go.sum b/extension/observer/hostobserver/go.sum index 6c74d1c126de..448f01c61172 100644 --- a/extension/observer/hostobserver/go.sum +++ b/extension/observer/hostobserver/go.sum @@ -1,10 +1,19 @@ +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/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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -15,76 +24,92 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ 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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -94,8 +119,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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= @@ -106,9 +131,8 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -121,16 +145,17 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/observer/hostobserver/internal/metadata/generated_status.go b/extension/observer/hostobserver/internal/metadata/generated_status.go index 0a782df70f39..0ebc8aad7a69 100644 --- a/extension/observer/hostobserver/internal/metadata/generated_status.go +++ b/extension/observer/hostobserver/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("host_observer") ) const ( - Type = "host_observer" ExtensionStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/hostobserver") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/hostobserver") +} diff --git a/extension/observer/hostobserver/metadata.yaml b/extension/observer/hostobserver/metadata.yaml index ec27148d5cd2..31f491184b7b 100644 --- a/extension/observer/hostobserver/metadata.yaml +++ b/extension/observer/hostobserver/metadata.yaml @@ -1,9 +1,10 @@ type: host_observer +scope_name: otelcol/hostobserver status: class: extension stability: beta: [extension] - distributions: [contrib, splunk, sumo] + distributions: [contrib] codeowners: active: [MovieStoreGuy] diff --git a/extension/observer/hostobserver/package_test.go b/extension/observer/hostobserver/package_test.go new file mode 100644 index 000000000000..05d2b3ee3144 --- /dev/null +++ b/extension/observer/hostobserver/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package hostobserver + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/observer/k8sobserver/README.md b/extension/observer/k8sobserver/README.md index 3f31e393ed18..ea77d04dc120 100644 --- a/extension/observer/k8sobserver/README.md +++ b/extension/observer/k8sobserver/README.md @@ -4,18 +4,16 @@ | Status | | | ------------- |-----------| | Stability | [alpha] | -| Distributions | [contrib], [splunk], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fk8sobserver%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fk8sobserver) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fk8sobserver%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fk8sobserver) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@rmfitzpatrick](https://www.github.com/rmfitzpatrick), [@dmitryax](https://www.github.com/dmitryax) | [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector The `k8s_observer` is a [Receiver Creator](../../../receiver/receivercreator/README.md)-compatible "watch observer" that will detect and report -Kubernetes pod, port, and node endpoints via the Kubernetes API. +Kubernetes pod, port, service and node endpoints via the Kubernetes API. ## Example Config @@ -26,6 +24,7 @@ extensions: node: ${env:K8S_NODE_NAME} observe_pods: true observe_nodes: true + observe_services: true receivers: receiver_creator: @@ -71,3 +70,4 @@ All fields are optional. | node | string | | The node name to limit the discovery of pod, port, and node endpoints. Providing no value (the default) results in discovering endpoints for all available nodes. | | observe_pods | bool | `true` | Whether to report observer pod and port endpoints. If `true` and `node` is specified it will only discover pod and port endpoints whose `spec.nodeName` matches the provided node name. If `true` and `node` isn't specified, it will discover all available pod and port endpoints. Please note that Collector connectivity to pods from other nodes is dependent on your cluster configuration and isn't guaranteed. | | observe_nodes | bool | `false` | Whether to report observer k8s.node endpoints. If `true` and `node` is specified it will only discover node endpoints whose `metadata.name` matches the provided node name. If `true` and `node` isn't specified, it will discover all available node endpoints. Please note that Collector connectivity to nodes is dependent on your cluster configuration and isn't guaranteed.| +| observe_services | bool | `false` | Whether to report observer k8s.service endpoints.| diff --git a/extension/observer/k8sobserver/config.go b/extension/observer/k8sobserver/config.go index 8dbfa38efaea..9f202be4c246 100644 --- a/extension/observer/k8sobserver/config.go +++ b/extension/observer/k8sobserver/config.go @@ -34,12 +34,14 @@ type Config struct { // it will only discover node endpoints whose `metadata.name` matches the provided node name. If `true` and // Node isn't specified, it will discover all available node endpoints. `false` by default. ObserveNodes bool `mapstructure:"observe_nodes"` + // ObserveServices determines whether to report observer service and port endpoints. `false` by default. + ObserveServices bool `mapstructure:"observe_services"` } // Validate checks if the extension configuration is valid func (cfg *Config) Validate() error { - if !cfg.ObservePods && !cfg.ObserveNodes { - return fmt.Errorf("one of observe_pods and observe_nodes must be true") + if !cfg.ObservePods && !cfg.ObserveNodes && !cfg.ObserveServices { + return fmt.Errorf("one of observe_pods, observe_nodes and observe_services must be true") } return nil } diff --git a/extension/observer/k8sobserver/config_test.go b/extension/observer/k8sobserver/config_test.go index 28db85945589..20f29407a4da 100644 --- a/extension/observer/k8sobserver/config_test.go +++ b/extension/observer/k8sobserver/config_test.go @@ -39,10 +39,11 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "observe-all"), expected: &Config{ - Node: "", - APIConfig: k8sconfig.APIConfig{AuthType: k8sconfig.AuthTypeNone}, - ObservePods: true, - ObserveNodes: true, + Node: "", + APIConfig: k8sconfig.APIConfig{AuthType: k8sconfig.AuthTypeNone}, + ObservePods: true, + ObserveNodes: true, + ObserveServices: true, }, }, { @@ -51,7 +52,7 @@ func TestLoadConfig(t *testing.T) { }, { id: component.NewIDWithName(metadata.Type, "invalid_no_observing"), - expectedErr: "one of observe_pods and observe_nodes must be true", + expectedErr: "one of observe_pods, observe_nodes and observe_services must be true", }, } for _, tt := range tests { diff --git a/extension/observer/k8sobserver/extension.go b/extension/observer/k8sobserver/extension.go index 4ee3579e920e..80f4a4ad3efd 100644 --- a/extension/observer/k8sobserver/extension.go +++ b/extension/observer/k8sobserver/extension.go @@ -25,13 +25,14 @@ var _ observer.Observable = (*k8sObserver)(nil) type k8sObserver struct { *observer.EndpointsWatcher - telemetry component.TelemetrySettings - podListerWatcher cache.ListerWatcher - nodeListerWatcher cache.ListerWatcher - handler *handler - once *sync.Once - stop chan struct{} - config *Config + telemetry component.TelemetrySettings + podListerWatcher cache.ListerWatcher + serviceListerWatcher cache.ListerWatcher + nodeListerWatcher cache.ListerWatcher + handler *handler + once *sync.Once + stop chan struct{} + config *Config } // Start will populate the cache.SharedInformers for pods and nodes as configured and run them as goroutines. @@ -52,6 +53,14 @@ func (k *k8sObserver) Start(_ context.Context, _ component.Host) error { } go podInformer.Run(k.stop) } + if k.serviceListerWatcher != nil { + k.telemetry.Logger.Debug("creating and starting service informer") + serviceInformer := cache.NewSharedInformer(k.serviceListerWatcher, &v1.Service{}, 0) + if _, err := serviceInformer.AddEventHandler(k.handler); err != nil { + k.telemetry.Logger.Error("error adding event handler to service informer", zap.Error(err)) + } + go serviceInformer.Run(k.stop) + } if k.nodeListerWatcher != nil { k.telemetry.Logger.Debug("creating and starting node informer") nodeInformer := cache.NewSharedInformer(k.nodeListerWatcher, &v1.Node{}, 0) @@ -90,6 +99,13 @@ func newObserver(config *Config, set extension.CreateSettings) (extension.Extens podListerWatcher = cache.NewListWatchFromClient(restClient, "pods", v1.NamespaceAll, podSelector) } + var serviceListerWatcher cache.ListerWatcher + if config.ObserveServices { + var serviceSelector = fields.Everything() + set.Logger.Debug("observing services") + serviceListerWatcher = cache.NewListWatchFromClient(restClient, "services", v1.NamespaceAll, serviceSelector) + } + var nodeListerWatcher cache.ListerWatcher if config.ObserveNodes { var nodeSelector fields.Selector @@ -103,14 +119,15 @@ func newObserver(config *Config, set extension.CreateSettings) (extension.Extens } h := &handler{idNamespace: set.ID.String(), endpoints: &sync.Map{}, logger: set.TelemetrySettings.Logger} obs := &k8sObserver{ - EndpointsWatcher: observer.NewEndpointsWatcher(h, time.Second, set.TelemetrySettings.Logger), - telemetry: set.TelemetrySettings, - podListerWatcher: podListerWatcher, - nodeListerWatcher: nodeListerWatcher, - stop: make(chan struct{}), - config: config, - handler: h, - once: &sync.Once{}, + EndpointsWatcher: observer.NewEndpointsWatcher(h, time.Second, set.TelemetrySettings.Logger), + telemetry: set.TelemetrySettings, + podListerWatcher: podListerWatcher, + serviceListerWatcher: serviceListerWatcher, + nodeListerWatcher: nodeListerWatcher, + stop: make(chan struct{}), + config: config, + handler: h, + once: &sync.Once{}, } return obs, nil diff --git a/extension/observer/k8sobserver/extension_test.go b/extension/observer/k8sobserver/extension_test.go index 726ec58382e6..259234e69cbd 100644 --- a/extension/observer/k8sobserver/extension_test.go +++ b/extension/observer/k8sobserver/extension_test.go @@ -40,6 +40,95 @@ func TestNewExtension(t *testing.T) { require.NotNil(t, ext) } +func TestExtensionObserveServices(t *testing.T) { + factory := NewFactory() + config := factory.CreateDefaultConfig().(*Config) + config.ObservePods = false // avoid causing data race when multiple test cases running in the same process using podListerWatcher + mockServiceHost(t, config) + + set := extensiontest.NewNopCreateSettings() + set.ID = component.NewID(metadata.Type) + ext, err := newObserver(config, set) + require.NoError(t, err) + require.NotNil(t, ext) + + obs := ext.(*k8sObserver) + serviceListerWatcher := framework.NewFakeControllerSource() + obs.serviceListerWatcher = serviceListerWatcher + + serviceListerWatcher.Add(serviceWithClusterIP) + + require.NoError(t, ext.Start(context.Background(), componenttest.NewNopHost())) + + sink := &endpointSink{} + obs.ListAndWatch(sink) + + requireSink(t, sink, func() bool { + return len(sink.added) == 1 + }) + + assert.Equal(t, observer.Endpoint{ + ID: "k8s_observer/service-1-UID", + Target: "service-1.default.svc.cluster.local", + Details: &observer.K8sService{ + Name: "service-1", + Namespace: "default", + UID: "service-1-UID", + Labels: map[string]string{ + "env": "prod", + }, + ClusterIP: "1.2.3.4", + ServiceType: "ClusterIP", + }, + }, sink.added[0]) + + serviceListerWatcher.Modify(serviceWithClusterIPV2) + + requireSink(t, sink, func() bool { + return len(sink.changed) == 1 + }) + + assert.Equal(t, observer.Endpoint{ + ID: "k8s_observer/service-1-UID", + Target: "service-1.default.svc.cluster.local", + Details: &observer.K8sService{ + Name: "service-1", + Namespace: "default", + UID: "service-1-UID", + Labels: map[string]string{ + "env": "prod", + "service-version": "2", + }, + ClusterIP: "1.2.3.4", + ServiceType: "ClusterIP", + }, + }, sink.changed[0]) + + serviceListerWatcher.Delete(serviceWithClusterIPV2) + + requireSink(t, sink, func() bool { + return len(sink.removed) == 1 + }) + + assert.Equal(t, observer.Endpoint{ + ID: "k8s_observer/service-1-UID", + Target: "service-1.default.svc.cluster.local", + Details: &observer.K8sService{ + Name: "service-1", + Namespace: "default", + UID: "service-1-UID", + Labels: map[string]string{ + "env": "prod", + "service-version": "2", + }, + ClusterIP: "1.2.3.4", + ServiceType: "ClusterIP", + }, + }, sink.removed[0]) + + require.NoError(t, ext.Shutdown(context.Background())) +} + func TestExtensionObservePods(t *testing.T) { factory := NewFactory() config := factory.CreateDefaultConfig().(*Config) @@ -125,6 +214,7 @@ func TestExtensionObservePods(t *testing.T) { func TestExtensionObserveNodes(t *testing.T) { factory := NewFactory() config := factory.CreateDefaultConfig().(*Config) + config.ObservePods = false // avoid causing data race when multiple test cases running in the same process using podListerWatcher mockServiceHost(t, config) set := extensiontest.NewNopCreateSettings() diff --git a/extension/observer/k8sobserver/go.mod b/extension/observer/k8sobserver/go.mod index 7147039183f3..60f052034f82 100644 --- a/extension/observer/k8sobserver/go.mod +++ b/extension/observer/k8sobserver/go.mod @@ -1,43 +1,47 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.uber.org/zap v1.26.0 - k8s.io/api v0.28.3 - k8s.io/apimachinery v0.28.3 - k8s.io/client-go v0.28.3 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/zap v1.27.0 + k8s.io/api v0.29.3 + k8s.io/apimachinery v0.29.3 + k8s.io/client-go v0.29.3 ) 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.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.4.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/imdario/mergo v0.3.11 // indirect github.com/josharian/intern v1.0.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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 @@ -45,32 +49,36 @@ require ( github.com/openshift/api v3.9.0+incompatible // indirect github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.4.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/extension/observer/k8sobserver/go.sum b/extension/observer/k8sobserver/go.sum index 88f54be1925b..6967a1cceeab 100644 --- a/extension/observer/k8sobserver/go.sum +++ b/extension/observer/k8sobserver/go.sum @@ -34,7 +34,11 @@ github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb0 github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +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/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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -47,8 +51,8 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -60,10 +64,12 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= @@ -79,6 +85,9 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -103,8 +112,9 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq 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/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= @@ -116,6 +126,7 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/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= @@ -129,18 +140,17 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -162,12 +172,13 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -181,8 +192,6 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ 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.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= @@ -202,10 +211,12 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/openshift/api v0.0.0-20180801171038-322a19404e37 h1:05irGU4HK4IauGGDbsk+ZHrm1wOzMLYjMlfaiqMrBYc= github.com/openshift/api v0.0.0-20180801171038-322a19404e37/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/api v0.0.0-20210521075222-e273a339932a/go.mod h1:izBmoXbUu3z5kUa4FjZhvekTsyzIWiOoaIgJiZBBMQs= @@ -216,9 +227,18 @@ github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -226,45 +246,52 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= 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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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.6.1/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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -273,6 +300,7 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -304,6 +332,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB 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.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -327,15 +356,17 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -343,6 +374,7 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ 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/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -369,19 +401,25 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/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-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= 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/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -425,7 +463,9 @@ golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= 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= @@ -445,8 +485,8 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -466,8 +506,8 @@ google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -475,8 +515,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -488,8 +528,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -518,28 +558,28 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= @@ -547,8 +587,8 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/extension/observer/k8sobserver/handler.go b/extension/observer/k8sobserver/handler.go index d39dabbafe26..859738a5c9c0 100644 --- a/extension/observer/k8sobserver/handler.go +++ b/extension/observer/k8sobserver/handler.go @@ -47,6 +47,8 @@ func (h *handler) OnAdd(objectInterface any, _ bool) { switch object := objectInterface.(type) { case *v1.Pod: endpoints = convertPodToEndpoints(h.idNamespace, object) + case *v1.Service: + endpoints = convertServiceToEndpoints(h.idNamespace, object) case *v1.Node: endpoints = append(endpoints, convertNodeToEndpoint(h.idNamespace, object)) default: // unsupported @@ -67,6 +69,7 @@ func (h *handler) OnUpdate(oldObjectInterface, newObjectInterface any) { case *v1.Pod: newPod, ok := newObjectInterface.(*v1.Pod) if !ok { + h.logger.Warn("skip updating endpoint for pod as the update is of different type", zap.Any("oldPod", oldObjectInterface), zap.Any("newObject", newObjectInterface)) return } for _, e := range convertPodToEndpoints(h.idNamespace, oldObject) { @@ -76,9 +79,23 @@ func (h *handler) OnUpdate(oldObjectInterface, newObjectInterface any) { newEndpoints[e.ID] = e } + case *v1.Service: + newService, ok := newObjectInterface.(*v1.Service) + if !ok { + h.logger.Warn("skip updating endpoint for service as the update is of different type", zap.Any("oldService", oldObjectInterface), zap.Any("newObject", newObjectInterface)) + return + } + for _, e := range convertServiceToEndpoints(h.idNamespace, oldObject) { + oldEndpoints[e.ID] = e + } + for _, e := range convertServiceToEndpoints(h.idNamespace, newService) { + newEndpoints[e.ID] = e + } + case *v1.Node: newNode, ok := newObjectInterface.(*v1.Node) if !ok { + h.logger.Warn("skip updating endpoint for node as the update is of different type", zap.Any("oldNode", oldObjectInterface), zap.Any("newObject", newObjectInterface)) return } oldEndpoint := convertNodeToEndpoint(h.idNamespace, oldObject) @@ -144,6 +161,10 @@ func (h *handler) OnDelete(objectInterface any) { if object != nil { endpoints = convertPodToEndpoints(h.idNamespace, object) } + case *v1.Service: + if object != nil { + endpoints = convertServiceToEndpoints(h.idNamespace, object) + } case *v1.Node: if object != nil { endpoints = append(endpoints, convertNodeToEndpoint(h.idNamespace, object)) diff --git a/extension/observer/k8sobserver/handler_test.go b/extension/observer/k8sobserver/handler_test.go index 793800907567..402b5fcc4213 100644 --- a/extension/observer/k8sobserver/handler_test.go +++ b/extension/observer/k8sobserver/handler_test.go @@ -104,6 +104,67 @@ func TestPodEndpointsChanged(t *testing.T) { }, th.ListEndpoints()) } +func TestServiceEndpointsAdded(t *testing.T) { + th := newTestHandler() + th.OnAdd(serviceWithClusterIP, true) + assert.ElementsMatch(t, []observer.Endpoint{ + { + ID: "test-1/service-1-UID", + Target: "service-1.default.svc.cluster.local", + Details: &observer.K8sService{ + Name: "service-1", + Namespace: "default", + UID: "service-1-UID", + Labels: map[string]string{"env": "prod"}, + ServiceType: "ClusterIP", + ClusterIP: "1.2.3.4", + }, + }}, th.ListEndpoints()) +} + +func TestServiceEndpointsRemoved(t *testing.T) { + th := newTestHandler() + th.OnAdd(serviceWithClusterIP, true) + th.OnDelete(serviceWithClusterIP) + assert.Empty(t, th.ListEndpoints()) +} + +func TestServiceEndpointsChanged(t *testing.T) { + th := newTestHandler() + // Nothing changed. + th.OnUpdate(serviceWithClusterIP, serviceWithClusterIP) + require.Empty(t, th.ListEndpoints()) + + // Labels changed. + changedLabels := serviceWithClusterIP.DeepCopy() + changedLabels.Labels["new-label"] = "value" + th.OnUpdate(serviceWithClusterIP, changedLabels) + + endpoints := th.ListEndpoints() + require.ElementsMatch(t, + []observer.EndpointID{"test-1/service-1-UID"}, + []observer.EndpointID{endpoints[0].ID}, + ) + + // Running state changed, one added and one removed. + updatedService := serviceWithClusterIP.DeepCopy() + updatedService.Labels["updated-label"] = "true" + th.OnUpdate(serviceWithClusterIP, updatedService) + require.ElementsMatch(t, []observer.Endpoint{ + { + ID: "test-1/service-1-UID", + Target: "service-1.default.svc.cluster.local", + Details: &observer.K8sService{ + Name: "service-1", + Namespace: "default", + UID: "service-1-UID", + Labels: map[string]string{"env": "prod", "updated-label": "true"}, + ServiceType: "ClusterIP", + ClusterIP: "1.2.3.4", + }}, + }, th.ListEndpoints()) +} + func TestNodeEndpointsAdded(t *testing.T) { th := newTestHandler() th.OnAdd(node1V1, true) diff --git a/extension/observer/k8sobserver/internal/metadata/generated_status.go b/extension/observer/k8sobserver/internal/metadata/generated_status.go index 43b785971030..056a6f1f9fd1 100644 --- a/extension/observer/k8sobserver/internal/metadata/generated_status.go +++ b/extension/observer/k8sobserver/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("k8s_observer") ) const ( - Type = "k8s_observer" ExtensionStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/k8sobserver") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/k8sobserver") +} diff --git a/extension/observer/k8sobserver/k8s_fixtures_test.go b/extension/observer/k8sobserver/k8s_fixtures_test.go index 10153c4d6a52..4f0acd4aa273 100644 --- a/extension/observer/k8sobserver/k8s_fixtures_test.go +++ b/extension/observer/k8sobserver/k8s_fixtures_test.go @@ -104,6 +104,36 @@ func pointerBool(val bool) *bool { return &val } +// newService is a helper function for creating Services for testing. +func newService(name string) *v1.Service { + service := &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "default", + Name: name, + UID: types.UID(name + "-UID"), + Labels: map[string]string{ + "env": "prod", + }, + }, + Spec: v1.ServiceSpec{ + Type: v1.ServiceTypeClusterIP, + ClusterIP: "1.2.3.4", + }, + } + + return service +} + +var serviceWithClusterIP = func() *v1.Service { + return newService("service-1") +}() + +var serviceWithClusterIPV2 = func() *v1.Service { + service := serviceWithClusterIP.DeepCopy() + service.Labels["service-version"] = "2" + return service +}() + // newNode is a helper function for creating Nodes for testing. func newNode(name, hostname string) *v1.Node { return &v1.Node{ diff --git a/extension/observer/k8sobserver/metadata.yaml b/extension/observer/k8sobserver/metadata.yaml index db0065725397..c0a1b3e06460 100644 --- a/extension/observer/k8sobserver/metadata.yaml +++ b/extension/observer/k8sobserver/metadata.yaml @@ -1,9 +1,15 @@ type: k8s_observer +scope_name: otelcol/k8sobserver status: class: extension stability: alpha: [extension] - distributions: [contrib, splunk, sumo] + distributions: [contrib] codeowners: active: [rmfitzpatrick, dmitryax] + +# TODO: Update the extension to make the tests pass +tests: + skip_lifecycle: true + skip_shutdown: true diff --git a/extension/observer/k8sobserver/service_endpoint.go b/extension/observer/k8sobserver/service_endpoint.go new file mode 100644 index 000000000000..ee8957cd3ef4 --- /dev/null +++ b/extension/observer/k8sobserver/service_endpoint.go @@ -0,0 +1,40 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package k8sobserver // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver" + +import ( + "fmt" + + v1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer" +) + +// convertServiceToEndpoints converts a service instance into a slice of endpoints. The endpoints +// include the service itself only. +func convertServiceToEndpoints(idNamespace string, service *v1.Service) []observer.Endpoint { + serviceID := observer.EndpointID(fmt.Sprintf("%s/%s", idNamespace, service.UID)) + + serviceDetails := observer.K8sService{ + UID: string(service.UID), + Annotations: service.Annotations, + Labels: service.Labels, + Name: service.Name, + Namespace: service.Namespace, + ClusterIP: service.Spec.ClusterIP, + ServiceType: string(service.Spec.Type), + } + + endpoints := []observer.Endpoint{{ + ID: serviceID, + Target: generateServiceTarget(&serviceDetails), + Details: &serviceDetails, + }} + + return endpoints +} + +func generateServiceTarget(service *observer.K8sService) string { + return fmt.Sprintf("%s.%s.svc.cluster.local", service.Name, service.Namespace) +} diff --git a/extension/observer/k8sobserver/service_endpoint_test.go b/extension/observer/k8sobserver/service_endpoint_test.go new file mode 100644 index 000000000000..391fd448b633 --- /dev/null +++ b/extension/observer/k8sobserver/service_endpoint_test.go @@ -0,0 +1,31 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package k8sobserver // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver" + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer" +) + +func TestServiceObjectToEndpoint(t *testing.T) { + expectedEndpoints := []observer.Endpoint{ + { + ID: "namespace/service-1-UID", + Target: "service-1.default.svc.cluster.local", + Details: &observer.K8sService{ + Name: "service-1", + Namespace: "default", + UID: "service-1-UID", + Labels: map[string]string{"env": "prod"}, + ServiceType: "ClusterIP", + ClusterIP: "1.2.3.4", + }}, + } + + endpoints := convertServiceToEndpoints("namespace", serviceWithClusterIP) + require.Equal(t, expectedEndpoints, endpoints) +} diff --git a/extension/observer/k8sobserver/testdata/config.yaml b/extension/observer/k8sobserver/testdata/config.yaml index b1f1205cce8c..8e6163829025 100644 --- a/extension/observer/k8sobserver/testdata/config.yaml +++ b/extension/observer/k8sobserver/testdata/config.yaml @@ -6,8 +6,10 @@ k8s_observer/observe-all: auth_type: none observe_nodes: true observe_pods: true + observe_services: true k8s_observer/invalid_auth: auth_type: not a real auth type k8s_observer/invalid_no_observing: observe_nodes: false observe_pods: false + observe_services: false diff --git a/extension/observer/package_test.go b/extension/observer/package_test.go new file mode 100644 index 000000000000..c39acbcb5243 --- /dev/null +++ b/extension/observer/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package observer + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/oidcauthextension/README.md b/extension/oidcauthextension/README.md index 68e4877f6587..7b1ffe46e24e 100644 --- a/extension/oidcauthextension/README.md +++ b/extension/oidcauthextension/README.md @@ -4,14 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [contrib], [observiq], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Foidcauth%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Foidcauth) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Foidcauth%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Foidcauth) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector This extension implements a `configauth.ServerAuthenticator`, to be used in receivers inside the `auth` settings. The authenticator type has to be set to `oidc`. diff --git a/extension/oidcauthextension/config.go b/extension/oidcauthextension/config.go index e08efc3018dd..327baea5365f 100644 --- a/extension/oidcauthextension/config.go +++ b/extension/oidcauthextension/config.go @@ -30,3 +30,13 @@ type Config struct { // Optional. GroupsClaim string `mapstructure:"groups_claim"` } + +func (c *Config) Validate() error { + if c.Audience == "" { + return errNoAudienceProvided + } + if c.IssuerURL == "" { + return errNoIssuerURL + } + return nil +} diff --git a/extension/oidcauthextension/extension.go b/extension/oidcauthextension/extension.go index 49c7e1b1ecd8..a9b537b02d8a 100644 --- a/extension/oidcauthextension/extension.go +++ b/extension/oidcauthextension/extension.go @@ -17,7 +17,7 @@ import ( "strings" "time" - "github.com/coreos/go-oidc" + "github.com/coreos/go-oidc/v3/oidc" "go.opentelemetry.io/collector/client" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/extension/auth" @@ -44,14 +44,7 @@ var ( errNotAuthenticated = errors.New("authentication didn't succeed") ) -func newExtension(cfg *Config, logger *zap.Logger) (auth.Server, error) { - if cfg.Audience == "" { - return nil, errNoAudienceProvided - } - if cfg.IssuerURL == "" { - return nil, errNoIssuerURL - } - +func newExtension(cfg *Config, logger *zap.Logger) auth.Server { if cfg.Attribute == "" { cfg.Attribute = defaultAttribute } @@ -60,7 +53,7 @@ func newExtension(cfg *Config, logger *zap.Logger) (auth.Server, error) { cfg: cfg, logger: logger, } - return auth.NewServer(auth.WithServerStart(oe.start), auth.WithServerAuthenticate(oe.authenticate)), nil + return auth.NewServer(auth.WithServerStart(oe.start), auth.WithServerAuthenticate(oe.authenticate)) } func (e *oidcExtension) start(context.Context, component.Host) error { diff --git a/extension/oidcauthextension/extension_test.go b/extension/oidcauthextension/extension_test.go index fff0f83e7370..72931882a19a 100644 --- a/extension/oidcauthextension/extension_test.go +++ b/extension/oidcauthextension/extension_test.go @@ -36,8 +36,7 @@ func TestOIDCAuthenticationSucceeded(t *testing.T) { Audience: "unit-test", GroupsClaim: "memberships", } - p, err := newExtension(config, zap.NewNop()) - require.NoError(t, err) + p := newExtension(config, zap.NewNop()) err = p.Start(context.Background(), componenttest.NewNopHost()) require.NoError(t, err) @@ -195,11 +194,10 @@ func TestOIDCFailedToLoadIssuerCAFromPathInvalidContent(t *testing.T) { func TestOIDCInvalidAuthHeader(t *testing.T) { // prepare - p, err := newExtension(&Config{ + p := newExtension(&Config{ Audience: "some-audience", IssuerURL: "http://example.com", }, zap.NewNop()) - require.NoError(t, err) // test ctx, err := p.Authenticate(context.Background(), map[string][]string{"authorization": {"some-value"}}) @@ -211,11 +209,10 @@ func TestOIDCInvalidAuthHeader(t *testing.T) { func TestOIDCNotAuthenticated(t *testing.T) { // prepare - p, err := newExtension(&Config{ + p := newExtension(&Config{ Audience: "some-audience", IssuerURL: "http://example.com", }, zap.NewNop()) - require.NoError(t, err) // test ctx, err := p.Authenticate(context.Background(), make(map[string][]string)) @@ -227,14 +224,13 @@ func TestOIDCNotAuthenticated(t *testing.T) { func TestProviderNotReacheable(t *testing.T) { // prepare - p, err := newExtension(&Config{ + p := newExtension(&Config{ Audience: "some-audience", IssuerURL: "http://example.com", }, zap.NewNop()) - require.NoError(t, err) // test - err = p.Start(context.Background(), componenttest.NewNopHost()) + err := p.Start(context.Background(), componenttest.NewNopHost()) // verify assert.Error(t, err) @@ -247,11 +243,10 @@ func TestFailedToVerifyToken(t *testing.T) { oidcServer.Start() defer oidcServer.Close() - p, err := newExtension(&Config{ + p := newExtension(&Config{ IssuerURL: oidcServer.URL, Audience: "unit-test", }, zap.NewNop()) - require.NoError(t, err) err = p.Start(context.Background(), componenttest.NewNopHost()) require.NoError(t, err) @@ -305,8 +300,7 @@ func TestFailedToGetGroupsClaimFromToken(t *testing.T) { }, } { t.Run(tt.casename, func(t *testing.T) { - p, err := newExtension(tt.config, zap.NewNop()) - require.NoError(t, err) + p := newExtension(tt.config, zap.NewNop()) err = p.Start(context.Background(), componenttest.NewNopHost()) require.NoError(t, err) @@ -414,10 +408,9 @@ func TestMissingClient(t *testing.T) { } // test - p, err := newExtension(config, zap.NewNop()) + err := config.Validate() // verify - assert.Nil(t, p) assert.Equal(t, errNoAudienceProvided, err) } @@ -428,10 +421,9 @@ func TestMissingIssuerURL(t *testing.T) { } // test - p, err := newExtension(config, zap.NewNop()) + err := config.Validate() // verify - assert.Nil(t, p) assert.Equal(t, errNoIssuerURL, err) } @@ -441,12 +433,11 @@ func TestShutdown(t *testing.T) { Audience: "some-audience", IssuerURL: "http://example.com/", } - p, err := newExtension(config, zap.NewNop()) - require.NoError(t, err) + p := newExtension(config, zap.NewNop()) require.NotNil(t, p) // test - err = p.Shutdown(context.Background()) // for now, we never fail + err := p.Shutdown(context.Background()) // for now, we never fail // verify assert.NoError(t, err) diff --git a/extension/oidcauthextension/factory.go b/extension/oidcauthextension/factory.go index e4faf4eaab30..fee2c4352b6d 100644 --- a/extension/oidcauthextension/factory.go +++ b/extension/oidcauthextension/factory.go @@ -33,5 +33,5 @@ func createDefaultConfig() component.Config { } func createExtension(_ context.Context, set extension.CreateSettings, cfg component.Config) (extension.Extension, error) { - return newExtension(cfg.(*Config), set.Logger) + return newExtension(cfg.(*Config), set.Logger), nil } diff --git a/extension/oidcauthextension/generated_component_test.go b/extension/oidcauthextension/generated_component_test.go new file mode 100644 index 000000000000..9ea4072ff751 --- /dev/null +++ b/extension/oidcauthextension/generated_component_test.go @@ -0,0 +1,30 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package oidcauthextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) +} diff --git a/extension/oidcauthextension/go.mod b/extension/oidcauthextension/go.mod index 737426f1abf5..4f2a4f5f0f1e 100644 --- a/extension/oidcauthextension/go.mod +++ b/extension/oidcauthextension/go.mod @@ -1,48 +1,57 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/oidcauthextension -go 1.20 +go 1.21 require ( - github.com/coreos/go-oidc v2.2.1+incompatible - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.89.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/extension/auth v0.89.0 - go.uber.org/zap v1.26.0 + github.com/coreos/go-oidc/v3 v3.10.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.98.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/extension/auth v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/zap v1.27.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.1 // indirect + github.com/go-jose/go-jose/v4 v4.0.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/pquerna/cachecontrol v0.1.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/square/go-jose.v2 v2.5.1 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/oidcauthextension/go.sum b/extension/oidcauthextension/go.sum index 37119eaef189..0e068b5c657c 100644 --- a/extension/oidcauthextension/go.sum +++ b/extension/oidcauthextension/go.sum @@ -1,129 +1,165 @@ -github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk= -github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +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/coreos/go-oidc/v3 v3.10.0 h1:tDnXHnLyiTVyT/2zLDGj09pFPkhND8Gl8lnTRhoEaJU= +github.com/coreos/go-oidc/v3 v3.10.0/go.mod h1:5j11xcw0D3+SGxn6Z/WFADsgcWVMyNAlSQupk0KK3ac= 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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-jose/go-jose/v4 v4.0.1 h1:QVEPDE3OluqXBQZDcnNvQrInro2h0e4eqNbnZSWqS6U= +github.com/go-jose/go-jose/v4 v4.0.1/go.mod h1:WVf9LFMHh/QVrmqrOfqun0C45tMe3RoiKJMPvgWwLfY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8cTqKc= -github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= 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/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= 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/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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= 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/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/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/oidcauthextension/internal/metadata/generated_status.go b/extension/oidcauthextension/internal/metadata/generated_status.go index 066f76118d5a..e7df447ddfdd 100644 --- a/extension/oidcauthextension/internal/metadata/generated_status.go +++ b/extension/oidcauthextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("oidc") ) const ( - Type = "oidc" ExtensionStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/oidcauth") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/oidcauth") +} diff --git a/extension/oidcauthextension/metadata.yaml b/extension/oidcauthextension/metadata.yaml index e498713fa6c7..f6c88ea8acef 100644 --- a/extension/oidcauthextension/metadata.yaml +++ b/extension/oidcauthextension/metadata.yaml @@ -1,9 +1,14 @@ type: oidc +scope_name: otelcol/oidcauth status: class: extension stability: beta: [extension] - distributions: [contrib, observiq, sumo] + distributions: [contrib] codeowners: active: [jpkrohling] + +tests: + config: + skip_lifecycle: true diff --git a/extension/oidcauthextension/oidc_server_test.go b/extension/oidcauthextension/oidc_server_test.go index 920205b6ad8a..9ba9b7e56cc0 100644 --- a/extension/oidcauthextension/oidc_server_test.go +++ b/extension/oidcauthextension/oidc_server_test.go @@ -36,7 +36,7 @@ func newOIDCServer() (*oidcServer, error) { mux := http.NewServeMux() server := httptest.NewUnstartedServer(mux) - mux.HandleFunc("/.well-known/openid-configuration", func(w http.ResponseWriter, req *http.Request) { + mux.HandleFunc("/.well-known/openid-configuration", func(w http.ResponseWriter, _ *http.Request) { w.Header().Set("Content-Type", "application/json; charset=utf-8") err := json.NewEncoder(w).Encode(map[string]any{ "issuer": server.URL, @@ -47,7 +47,7 @@ func newOIDCServer() (*oidcServer, error) { return } }) - mux.HandleFunc("/.well-known/jwks.json", func(w http.ResponseWriter, req *http.Request) { + mux.HandleFunc("/.well-known/jwks.json", func(w http.ResponseWriter, _ *http.Request) { w.Header().Set("Content-Type", "application/json; charset=utf-8") if err := json.NewEncoder(w).Encode(jwks); err != nil { w.WriteHeader(http.StatusInternalServerError) diff --git a/extension/opampextension/README.md b/extension/opampextension/README.md index 40ec053883a7..51ea597afc9f 100644 --- a/extension/opampextension/README.md +++ b/extension/opampextension/README.md @@ -2,12 +2,13 @@ | Status | | | ------------- |-----------| -| Stability | [development] | -| Distributions | [] | +| Stability | [alpha] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fopamp%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fopamp) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fopamp%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fopamp) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@portertech](https://www.github.com/portertech), [@evan-bradley](https://www.github.com/evan-bradley), [@tigrannajaryan](https://www.github.com/tigrannajaryan) | -[development]: https://github.com/open-telemetry/opentelemetry-collector#development +[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib ## Configuration @@ -27,6 +28,8 @@ The following settings are optional: - `instance_uid`: A ULID formatted as a 26 character string in canonical representation. Auto-generated on start if missing. Setting this ensures the instance UID remains constant across process restarts. +- `capabilities`: Keys with boolean true/false values that enable a particular OpAMP capability. + - `reports_effective_config`: Whether to enable the OpAMP ReportsEffectiveConfig capability. Default is `true`. ### Example diff --git a/extension/opampextension/config.go b/extension/opampextension/config.go index 6ff9946fc4b3..7756b1e1164a 100644 --- a/extension/opampextension/config.go +++ b/extension/opampextension/config.go @@ -5,10 +5,14 @@ package opampextension // import "github.com/open-telemetry/opentelemetry-collec import ( "errors" + "net/url" "github.com/oklog/ulid/v2" + "github.com/open-telemetry/opamp-go/client" + "github.com/open-telemetry/opamp-go/protobufs" "go.opentelemetry.io/collector/config/configopaque" "go.opentelemetry.io/collector/config/configtls" + "go.uber.org/zap" ) // Config contains the configuration for the opamp extension. Trying to mirror @@ -19,24 +23,103 @@ type Config struct { // InstanceUID is a ULID formatted as a 26 character string in canonical // representation. Auto-generated on start if missing. InstanceUID string `mapstructure:"instance_uid"` + + // Capabilities contains options to enable a particular OpAMP capability + Capabilities Capabilities `mapstructure:"capabilities"` } -// OpAMPServer contains the OpAMP transport configuration. -type OpAMPServer struct { - WS *OpAMPWebsocket `mapstructure:"ws"` +type Capabilities struct { + // ReportsEffectiveConfig enables the OpAMP ReportsEffectiveConfig Capability. (default: true) + ReportsEffectiveConfig bool `mapstructure:"reports_effective_config"` } -// OpAMPWebsocket contains the OpAMP websocket transport configuration. -type OpAMPWebsocket struct { +func (caps Capabilities) toAgentCapabilities() protobufs.AgentCapabilities { + // All Agents MUST report status. + agentCapabilities := protobufs.AgentCapabilities_AgentCapabilities_ReportsStatus + + if caps.ReportsEffectiveConfig { + agentCapabilities |= protobufs.AgentCapabilities_AgentCapabilities_ReportsEffectiveConfig + } + + return agentCapabilities +} + +type commonFields struct { Endpoint string `mapstructure:"endpoint"` - TLSSetting configtls.TLSClientSetting `mapstructure:"tls,omitempty"` + TLSSetting configtls.ClientConfig `mapstructure:"tls,omitempty"` Headers map[string]configopaque.String `mapstructure:"headers,omitempty"` } +// OpAMPServer contains the OpAMP transport configuration. +type OpAMPServer struct { + WS *commonFields `mapstructure:"ws,omitempty"` + HTTP *commonFields `mapstructure:"http,omitempty"` +} + +func (c *commonFields) Scheme() string { + uri, err := url.ParseRequestURI(c.Endpoint) + if err != nil { + return "" + } + return uri.Scheme +} + +func (c *commonFields) Validate() error { + if c.Endpoint == "" { + return errors.New("opamp server endpoint must be provided") + } + return nil +} + +func (s OpAMPServer) GetClient(logger *zap.Logger) client.OpAMPClient { + if s.WS != nil { + return client.NewWebSocket(newLoggerFromZap(logger.With(zap.String("client", "ws")))) + } + return client.NewHTTP(newLoggerFromZap(logger.With(zap.String("client", "http")))) +} + +func (s OpAMPServer) GetHeaders() map[string]configopaque.String { + if s.WS != nil { + return s.WS.Headers + } else if s.HTTP != nil { + return s.HTTP.Headers + } + return map[string]configopaque.String{} +} + +func (s OpAMPServer) GetTLSSetting() configtls.ClientConfig { + if s.WS != nil { + return s.WS.TLSSetting + } else if s.HTTP != nil { + return s.HTTP.TLSSetting + } + return configtls.ClientConfig{} +} + +func (s OpAMPServer) GetEndpoint() string { + if s.WS != nil { + return s.WS.Endpoint + } else if s.HTTP != nil { + return s.HTTP.Endpoint + } + return "" +} + // Validate checks if the extension configuration is valid func (cfg *Config) Validate() error { - if cfg.Server.WS.Endpoint == "" { - return errors.New("opamp server websocket endpoint must be provided") + switch { + case cfg.Server.WS == nil && cfg.Server.HTTP == nil: + return errors.New("opamp server must have at least ws or http set") + case cfg.Server.WS != nil && cfg.Server.HTTP != nil: + return errors.New("opamp server must have only ws or http set") + case cfg.Server.WS != nil: + if err := cfg.Server.WS.Validate(); err != nil { + return err + } + case cfg.Server.HTTP != nil: + if err := cfg.Server.HTTP.Validate(); err != nil { + return err + } } if cfg.InstanceUID != "" { diff --git a/extension/opampextension/config_test.go b/extension/opampextension/config_test.go index 44a33dbcf46e..7a0d0ddd4461 100644 --- a/extension/opampextension/config_test.go +++ b/extension/opampextension/config_test.go @@ -10,6 +10,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" ) @@ -30,28 +32,229 @@ func TestUnmarshalConfig(t *testing.T) { assert.Equal(t, &Config{ Server: &OpAMPServer{ - WS: &OpAMPWebsocket{ + WS: &commonFields{ Endpoint: "wss://127.0.0.1:4320/v1/opamp", }, }, InstanceUID: "01BX5ZZKBKACTAV9WEVGEMMVRZ", + Capabilities: Capabilities{ + ReportsEffectiveConfig: true, + }, + }, cfg) +} + +func TestUnmarshalHttpConfig(t *testing.T) { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config_http.yaml")) + require.NoError(t, err) + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.Equal(t, + &Config{ + Server: &OpAMPServer{ + HTTP: &commonFields{ + Endpoint: "https://127.0.0.1:4320/v1/opamp", + }, + }, + InstanceUID: "01BX5ZZKBKACTAV9WEVGEMMVRZ", + Capabilities: Capabilities{ + ReportsEffectiveConfig: true, + }, }, cfg) } -func TestConfigValidate(t *testing.T) { - cfg := &Config{ - Server: &OpAMPServer{ - WS: &OpAMPWebsocket{}, +func TestConfig_Getters(t *testing.T) { + type fields struct { + Server *OpAMPServer + } + type expected struct { + headers assert.ValueAssertionFunc + tls assert.ValueAssertionFunc + endpoint assert.ValueAssertionFunc + } + tests := []struct { + name string + fields fields + expected expected + }{ + { + name: "nothing set", + fields: fields{ + Server: &OpAMPServer{}, + }, + expected: expected{ + headers: assert.Empty, + tls: assert.Empty, + endpoint: assert.Empty, + }, + }, + { + name: "WS valid endpoint, headers, tls", + fields: fields{ + Server: &OpAMPServer{ + WS: &commonFields{ + Endpoint: "wss://127.0.0.1:4320/v1/opamp", + Headers: map[string]configopaque.String{ + "test": configopaque.String("test"), + }, + TLSSetting: configtls.ClientConfig{ + Insecure: true, + }, + }, + }, + }, + expected: expected{ + headers: assert.NotEmpty, + tls: assert.NotEmpty, + endpoint: assert.NotEmpty, + }, + }, + { + name: "HTTP valid endpoint and valid instance id", + fields: fields{ + Server: &OpAMPServer{ + HTTP: &commonFields{ + Endpoint: "https://127.0.0.1:4320/v1/opamp", + Headers: map[string]configopaque.String{ + "test": configopaque.String("test"), + }, + TLSSetting: configtls.ClientConfig{ + Insecure: true, + }, + }, + }, + }, + expected: expected{ + headers: assert.NotEmpty, + tls: assert.NotEmpty, + endpoint: assert.NotEmpty, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tt.expected.headers(t, tt.fields.Server.GetHeaders()) + tt.expected.tls(t, tt.fields.Server.GetTLSSetting()) + tt.expected.endpoint(t, tt.fields.Server.GetEndpoint()) + }) + } +} + +func TestConfig_Validate(t *testing.T) { + type fields struct { + Server *OpAMPServer + InstanceUID string + Capabilities Capabilities + } + tests := []struct { + name string + fields fields + wantErr assert.ErrorAssertionFunc + }{ + { + name: "WS must have endpoint", + fields: fields{ + Server: &OpAMPServer{ + WS: &commonFields{}, + }, + }, + wantErr: func(t assert.TestingT, err error, _ ...any) bool { + return assert.Equal(t, "opamp server endpoint must be provided", err.Error()) + }, + }, + { + name: "WS valid endpoint and invalid instance id", + fields: fields{ + Server: &OpAMPServer{ + WS: &commonFields{ + Endpoint: "wss://127.0.0.1:4320/v1/opamp", + }, + }, + InstanceUID: "01BX5ZZKBKACTAV9WEVGEMMVRZFAIL", + }, + wantErr: func(t assert.TestingT, err error, _ ...any) bool { + return assert.Equal(t, "opamp instance_uid is invalid", err.Error()) + }, + }, + { + name: "WS valid endpoint and valid instance id", + fields: fields{ + Server: &OpAMPServer{ + WS: &commonFields{ + Endpoint: "wss://127.0.0.1:4320/v1/opamp", + }, + }, + InstanceUID: "01BX5ZZKBKACTAV9WEVGEMMVRZ", + }, + wantErr: assert.NoError, + }, + { + name: "HTTP must have endpoint", + fields: fields{ + Server: &OpAMPServer{ + HTTP: &commonFields{}, + }, + }, + wantErr: func(t assert.TestingT, err error, _ ...any) bool { + return assert.Equal(t, "opamp server endpoint must be provided", err.Error()) + }, }, + { + name: "HTTP valid endpoint and invalid instance id", + fields: fields{ + Server: &OpAMPServer{ + HTTP: &commonFields{ + Endpoint: "https://127.0.0.1:4320/v1/opamp", + }, + }, + InstanceUID: "01BX5ZZKBKACTAV9WEVGEMMVRZFAIL", + }, + wantErr: func(t assert.TestingT, err error, _ ...any) bool { + return assert.Equal(t, "opamp instance_uid is invalid", err.Error()) + }, + }, + { + name: "HTTP valid endpoint and valid instance id", + fields: fields{ + Server: &OpAMPServer{ + HTTP: &commonFields{ + Endpoint: "https://127.0.0.1:4320/v1/opamp", + }, + }, + InstanceUID: "01BX5ZZKBKACTAV9WEVGEMMVRZ", + }, + wantErr: assert.NoError, + }, + { + name: "neither config set", + fields: fields{ + Server: &OpAMPServer{}, + }, + wantErr: func(t assert.TestingT, err error, _ ...any) bool { + return assert.Equal(t, "opamp server must have at least ws or http set", err.Error()) + }, + }, + { + name: "both config set", + fields: fields{ + Server: &OpAMPServer{ + WS: &commonFields{}, + HTTP: &commonFields{}, + }, + }, + wantErr: func(t assert.TestingT, err error, _ ...any) bool { + return assert.Equal(t, "opamp server must have only ws or http set", err.Error()) + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + cfg := &Config{ + Server: tt.fields.Server, + InstanceUID: tt.fields.InstanceUID, + Capabilities: tt.fields.Capabilities, + } + tt.wantErr(t, cfg.Validate()) + }) } - err := cfg.Validate() - assert.Equal(t, "opamp server websocket endpoint must be provided", err.Error()) - cfg.Server.WS.Endpoint = "wss://127.0.0.1:4320/v1/opamp" - assert.NoError(t, cfg.Validate()) - cfg.InstanceUID = "01BX5ZZKBKACTAV9WEVGEMMVRZFAIL" - err = cfg.Validate() - require.Error(t, err) - assert.Equal(t, "opamp instance_uid is invalid", err.Error()) - cfg.InstanceUID = "01BX5ZZKBKACTAV9WEVGEMMVRZ" - require.NoError(t, cfg.Validate()) } diff --git a/extension/opampextension/factory.go b/extension/opampextension/factory.go index a468fe48f141..0974399752c4 100644 --- a/extension/opampextension/factory.go +++ b/extension/opampextension/factory.go @@ -23,8 +23,9 @@ func NewFactory() extension.Factory { func createDefaultConfig() component.Config { return &Config{ - Server: &OpAMPServer{ - WS: &OpAMPWebsocket{}, + Server: &OpAMPServer{}, + Capabilities: Capabilities{ + ReportsEffectiveConfig: true, }, } } diff --git a/extension/opampextension/generated_component_test.go b/extension/opampextension/generated_component_test.go new file mode 100644 index 000000000000..9f981c640967 --- /dev/null +++ b/extension/opampextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package opampextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/opampextension/go.mod b/extension/opampextension/go.mod index 8dab516477d4..9ce6c90f0502 100644 --- a/extension/opampextension/go.mod +++ b/extension/opampextension/go.mod @@ -1,48 +1,59 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension -go 1.20 +go 1.21 require ( - github.com/google/uuid v1.4.0 + github.com/google/uuid v1.6.0 github.com/oklog/ulid/v2 v2.1.0 - github.com/open-telemetry/opamp-go v0.9.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configopaque v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opamp-go v0.14.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + gopkg.in/yaml.v3 v3.0.1 ) require ( + github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/davecgh/go-spew v1.1.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/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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/gorilla/websocket v1.4.2 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect - github.com/knadh/koanf v1.5.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/gorilla/websocket v1.5.1 // 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.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/goleak v1.3.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect ) diff --git a/extension/opampextension/go.sum b/extension/opampextension/go.sum index c4c5d20703af..b6366c25a740 100644 --- a/extension/opampextension/go.sum +++ b/extension/opampextension/go.sum @@ -1,447 +1,144 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= -github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= -github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= -github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= -github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= -github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= -github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/cenkalti/backoff/v4 v4.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.1.1/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/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -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/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +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/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 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.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= 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.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.13.0/go.mod h1:ZlVrynguJKcYr54zGaDbaL3fOvKC9m72FhPvA8T35KQ= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= -github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= -github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= -github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hjson/hjson-go/v4 v4.0.0/go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEFTse3rH13E= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs= -github.com/knadh/koanf v1.5.0/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs= -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/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= -github.com/open-telemetry/opamp-go v0.9.0 h1:S6Mwn8uxYjcttE6ZJ6AXoiOuryU67zjKysz3xRfYL9k= -github.com/open-telemetry/opamp-go v0.9.0/go.mod h1:Pfmm5EdWqZCG0dZAJjAinlra3yEpqK5StCblxpbEp6Q= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/open-telemetry/opamp-go v0.14.0 h1:KoziIK+wsFojhUXNTkCSTnCPf0eCMqFAaccOs0HrWIY= +github.com/open-telemetry/opamp-go v0.14.0/go.mod h1:XOGCigljsLSTZ8FfLwvat0M1QDj3conIIgRa77BWrKs= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= -github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= -go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= 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.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= 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.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -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-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/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-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-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-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 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.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/extension/opampextension/internal/metadata/generated_status.go b/extension/opampextension/internal/metadata/generated_status.go index cf21386a85ea..9766658bcbec 100644 --- a/extension/opampextension/internal/metadata/generated_status.go +++ b/extension/opampextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("opamp") ) const ( - Type = "opamp" - ExtensionStability = component.StabilityLevelDevelopment + ExtensionStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/opamp") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/opamp") +} diff --git a/extension/opampextension/logger.go b/extension/opampextension/logger.go new file mode 100644 index 000000000000..379486a187e3 --- /dev/null +++ b/extension/opampextension/logger.go @@ -0,0 +1,33 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package opampextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension" + +import ( + "context" + + "github.com/open-telemetry/opamp-go/client/types" + "go.uber.org/zap" +) + +var _ types.Logger = &opAMPLogger{} + +type opAMPLogger struct { + l *zap.SugaredLogger +} + +// Debugf implements types.Logger. +func (o *opAMPLogger) Debugf(_ context.Context, format string, v ...any) { + o.l.Debugf(format, v...) +} + +// Errorf implements types.Logger. +func (o *opAMPLogger) Errorf(_ context.Context, format string, v ...any) { + o.l.Errorf(format, v...) +} + +func newLoggerFromZap(l *zap.Logger) types.Logger { + return &opAMPLogger{ + l: l.Sugar(), + } +} diff --git a/extension/opampextension/metadata.yaml b/extension/opampextension/metadata.yaml index 7b40247eb63a..99944a1fee1a 100644 --- a/extension/opampextension/metadata.yaml +++ b/extension/opampextension/metadata.yaml @@ -1,8 +1,13 @@ type: opamp +scope_name: otelcol/opamp status: class: extension stability: - development: [extension] + alpha: [extension] + distributions: [contrib] codeowners: active: [portertech, evan-bradley, tigrannajaryan] + +tests: + config: diff --git a/extension/opampextension/opamp_agent.go b/extension/opampextension/opamp_agent.go index aba04a7edeaf..99156d790d05 100644 --- a/extension/opampextension/opamp_agent.go +++ b/extension/opampextension/opamp_agent.go @@ -8,6 +8,8 @@ import ( "net/http" "os" "runtime" + "strings" + "sync" "github.com/google/uuid" "github.com/oklog/ulid/v2" @@ -15,29 +17,13 @@ import ( "github.com/open-telemetry/opamp-go/client/types" "github.com/open-telemetry/opamp-go/protobufs" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/pdata/pcommon" semconv "go.opentelemetry.io/collector/semconv/v1.18.0" "go.uber.org/zap" + "gopkg.in/yaml.v3" ) -// TODO: Replace with https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27293 -const localConfig = ` -exporters: - otlp: - endpoint: localhost:1111 -receivers: - otlp: - protocols: - grpc: {} - http: {} -service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [otlp] -` - type opampAgent struct { cfg *Config logger *zap.Logger @@ -47,7 +33,10 @@ type opampAgent struct { instanceID ulid.ULID - effectiveConfig string + eclk sync.RWMutex + effectiveConfig *confmap.Conf + + capabilities Capabilities agentDescription *protobufs.AgentDescription @@ -55,15 +44,12 @@ type opampAgent struct { } func (o *opampAgent) Start(_ context.Context, _ component.Host) error { - // TODO: Add OpAMP HTTP transport support. - o.opampClient = client.NewWebSocket(o.logger.Sugar()) - header := http.Header{} - for k, v := range o.cfg.Server.WS.Headers { + for k, v := range o.cfg.Server.GetHeaders() { header.Set(k, string(v)) } - tls, err := o.cfg.Server.WS.TLSSetting.LoadTLSConfig() + tls, err := o.cfg.Server.GetTLSSetting().LoadTLSConfig() if err != nil { return err } @@ -71,26 +57,24 @@ func (o *opampAgent) Start(_ context.Context, _ component.Host) error { settings := types.StartSettings{ Header: header, TLSConfig: tls, - OpAMPServerURL: o.cfg.Server.WS.Endpoint, + OpAMPServerURL: o.cfg.Server.GetEndpoint(), InstanceUid: o.instanceID.String(), Callbacks: types.CallbacksStruct{ - OnConnectFunc: func() { + OnConnectFunc: func(_ context.Context) { o.logger.Debug("Connected to the OpAMP server") }, - OnConnectFailedFunc: func(err error) { + OnConnectFailedFunc: func(_ context.Context, err error) { o.logger.Error("Failed to connect to the OpAMP server", zap.Error(err)) }, - OnErrorFunc: func(err *protobufs.ServerErrorResponse) { + OnErrorFunc: func(_ context.Context, err *protobufs.ServerErrorResponse) { o.logger.Error("OpAMP server returned an error response", zap.String("message", err.ErrorMessage)) }, - GetEffectiveConfigFunc: func(ctx context.Context) (*protobufs.EffectiveConfig, error) { + GetEffectiveConfigFunc: func(_ context.Context) (*protobufs.EffectiveConfig, error) { return o.composeEffectiveConfig(), nil }, OnMessageFunc: o.onMessage, }, - // TODO: Include ReportsEffectiveConfig once the extension has access to the - // collector's effective configuration. - Capabilities: protobufs.AgentCapabilities_AgentCapabilities_ReportsStatus, + Capabilities: o.capabilities.toAgentCapabilities(), } if err := o.createAgentDescription(); err != nil { @@ -118,7 +102,28 @@ func (o *opampAgent) Shutdown(ctx context.Context) error { return nil } o.logger.Debug("Stopping OpAMP client...") - return o.opampClient.Stop(ctx) + err := o.opampClient.Stop(ctx) + // Opamp-go considers this an error, but the collector does not. + // https://github.com/open-telemetry/opamp-go/issues/255 + if err != nil && strings.EqualFold(err.Error(), "cannot stop because not started") { + return nil + } + return err +} + +func (o *opampAgent) NotifyConfig(ctx context.Context, conf *confmap.Conf) error { + if o.capabilities.ReportsEffectiveConfig { + o.updateEffectiveConfig(conf) + return o.opampClient.UpdateEffectiveConfig(ctx) + } + return nil +} + +func (o *opampAgent) updateEffectiveConfig(conf *confmap.Conf) { + o.eclk.Lock() + defer o.eclk.Unlock() + + o.effectiveConfig = conf } func newOpampAgent(cfg *Config, logger *zap.Logger, build component.BuildInfo, res pcommon.Resource) (*opampAgent, error) { @@ -147,21 +152,22 @@ func newOpampAgent(cfg *Config, logger *zap.Logger, build component.BuildInfo, r } else { sid, ok := res.Attributes().Get(semconv.AttributeServiceInstanceID) if ok { - uuid, err := uuid.Parse(sid.AsString()) + parsedUUID, err := uuid.Parse(sid.AsString()) if err != nil { return nil, err } - uid = ulid.ULID(uuid) + uid = ulid.ULID(parsedUUID) } } agent := &opampAgent{ - cfg: cfg, - logger: logger, - agentType: agentType, - agentVersion: agentVersion, - instanceID: uid, - effectiveConfig: localConfig, // TODO: Replace with https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27293 + cfg: cfg, + logger: logger, + agentType: agentType, + agentVersion: agentVersion, + instanceID: uid, + capabilities: cfg.Capabilities, + opampClient: cfg.Server.GetClient(logger), } return agent, nil @@ -210,10 +216,23 @@ func (o *opampAgent) updateAgentIdentity(instanceID ulid.ULID) { } func (o *opampAgent) composeEffectiveConfig() *protobufs.EffectiveConfig { + o.eclk.RLock() + defer o.eclk.RUnlock() + + if !o.capabilities.ReportsEffectiveConfig || o.effectiveConfig == nil { + return nil + } + + conf, err := yaml.Marshal(o.effectiveConfig.ToStringMap()) + if err != nil { + o.logger.Error("cannot unmarshal effectiveConfig", zap.Any("conf", o.effectiveConfig), zap.Error(err)) + return nil + } + return &protobufs.EffectiveConfig{ ConfigMap: &protobufs.AgentConfigMap{ ConfigMap: map[string]*protobufs.AgentConfigFile{ - "": {Body: []byte(o.effectiveConfig)}, + "": {Body: conf}, }, }, } diff --git a/extension/opampextension/opamp_agent_test.go b/extension/opampextension/opamp_agent_test.go index c6bcede0f733..bc6c26735ac0 100644 --- a/extension/opampextension/opamp_agent_test.go +++ b/extension/opampextension/opamp_agent_test.go @@ -5,12 +5,15 @@ package opampextension import ( "context" + "os" + "path/filepath" "testing" "github.com/oklog/ulid/v2" "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/extension/extensiontest" semconv "go.opentelemetry.io/collector/semconv/v1.18.0" ) @@ -24,7 +27,8 @@ func TestNewOpampAgent(t *testing.T) { assert.Equal(t, "otelcoltest", o.agentType) assert.Equal(t, "test version", o.agentVersion) assert.NotEmpty(t, o.instanceID.String()) - assert.NotEmpty(t, o.effectiveConfig) + assert.True(t, o.capabilities.ReportsEffectiveConfig) + assert.Empty(t, o.effectiveConfig) assert.Nil(t, o.agentDescription) } @@ -75,10 +79,21 @@ func TestComposeEffectiveConfig(t *testing.T) { set := extensiontest.NewNopCreateSettings() o, err := newOpampAgent(cfg.(*Config), set.Logger, set.BuildInfo, set.Resource) assert.NoError(t, err) - assert.NotEmpty(t, o.effectiveConfig) + assert.Empty(t, o.effectiveConfig) ec := o.composeEffectiveConfig() + assert.Nil(t, ec) + + ecFileName := filepath.Join("testdata", "effective.yaml") + cm, err := confmaptest.LoadConf(ecFileName) + assert.NoError(t, err) + expected, err := os.ReadFile(ecFileName) + assert.NoError(t, err) + + o.updateEffectiveConfig(cm) + ec = o.composeEffectiveConfig() assert.NotNil(t, ec) + assert.YAMLEq(t, string(expected), string(ec.ConfigMap.ConfigMap[""].Body)) } func TestShutdown(t *testing.T) { @@ -98,4 +113,5 @@ func TestStart(t *testing.T) { assert.NoError(t, err) assert.NoError(t, o.Start(context.TODO(), componenttest.NewNopHost())) + assert.NoError(t, o.Shutdown(context.TODO())) } diff --git a/extension/opampextension/package_test.go b/extension/opampextension/package_test.go new file mode 100644 index 000000000000..c15f00e62f80 --- /dev/null +++ b/extension/opampextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package opampextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/opampextension/testdata/config_http.yaml b/extension/opampextension/testdata/config_http.yaml new file mode 100644 index 000000000000..c97da589a392 --- /dev/null +++ b/extension/opampextension/testdata/config_http.yaml @@ -0,0 +1,4 @@ +server: + http: + endpoint: https://127.0.0.1:4320/v1/opamp +instance_uid: 01BX5ZZKBKACTAV9WEVGEMMVRZ diff --git a/extension/opampextension/testdata/effective.yaml b/extension/opampextension/testdata/effective.yaml new file mode 100644 index 000000000000..69261ddf6dd3 --- /dev/null +++ b/extension/opampextension/testdata/effective.yaml @@ -0,0 +1,14 @@ +exporters: + otlp: + endpoint: localhost:1111 +receivers: + otlp: + protocols: + grpc: {} + http: {} +service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [otlp] diff --git a/extension/pprofextension/README.md b/extension/pprofextension/README.md index 6b3a35891cca..d8558017e602 100644 --- a/extension/pprofextension/README.md +++ b/extension/pprofextension/README.md @@ -4,18 +4,13 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [core], [contrib], [aws], [observiq], [redhat], [splunk], [sumo] | +| Distributions | [core], [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fpprof%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fpprof) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fpprof%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fpprof) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@MovieStoreGuy](https://www.github.com/MovieStoreGuy) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector -[redhat]: https://github.com/os-observability/redhat-opentelemetry-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector Performance Profiler extension enables the golang `net/http/pprof` endpoint. @@ -48,3 +43,60 @@ extensions: The full list of settings exposed for this exporter are documented [here](./config.go) with detailed sample configurations [here](./testdata/config.yaml). + + +### Go Profiling with pprof basics + +The profiler can be used to improve a program. +The most common usage is a CPU profile, which determines where the program spends the most time while actively consuming resources. +After generating a profile, we can interpret it in different ways. +Go's _pprof_ offers a text, visualization, or web-based analysis. +To collect a meaningful profile, it should run on an idle machine and if that is not possible, it is best to generate the profile several times to get consistent results. + +The profiler stops the program multiple times per second and collects information (such as program counters) at that point in time. +This is called a sample, and a profile is a collection of those samples. + +#### Generating a profile +The extension enables the collection of profiling data expected by _pprof_. +To generate a profile, include the extension in your program and run it to start the server. +If you are using the default config, it will listen on `localhost:1777`. +To save a CPU profile on your machine, run `go tool pprof http://localhost:1777/debug/pprof/profile\?seconds\=30`. +This will enter the interactive mode of _pprof_, where you can analyze the profile. + +There are different endpoints for other types of profiles. +For instance, the memory can be analyzed using `go tool pprof http://localhost:1777/debug/pprof/heap`. +To see all available profiles, visit `http://localhost:1777/debug/pprof/` in your browser. + +#### Analyzing a profile + +After running the above command to save the profile, _pprof_ will enter the interactive mode. +From here, the profiles can be analyzed. + +Use the command `web` to open an image of the complete call graph in your browser. +Each box corresponds to a function in the program, and it is sized according to the number of samples in which this function was running. +This means, if the box of a function is bigger, it was executed more often than a function in a smaller box. +The arrows between boxes show the connectivity of the functions. +If there is an arrow from box A to B, A called B. +The numbers along the edges represent how often that call happened. +This includes every call of a recursive function. +The color of the edges also represents that number. +A red edge means more resources were used, whereas grey indicates the used resources were close to zero. + +However, the complete call graph can be a bit noisy. +A good place to start breaking it down is using the `topN` command. +It will show you the top `N` nodes, consuming the most resources. +The output is a table, where the first two columns show the number and percentage of total samples where the function was running (`flat`). +The third column shows the total percentage, for instance stating that function X was running in 20% of the samples. +The two remaining columns show the cumulative (`cum`) numbers of the profile. + +From here, the results can be filtered. +Choose one of the top consuming functions which you would like to analyze. +_pprof_ uses a regex-based search to filter for functions matching the input. +Type `web ` to show the call graph for this specific function. +The image in your browser should now be more clear and less cluttered. + +The `list` command is also useful. +Type `list ` to see the source code of your function, annotated with the resource consumption (`flat` and `cum` columns like in the `topN` command). +If you prefer to view it in your browser, use the `weblist ` command instead. +In this view, you can see which line exactly used the most resources and start to improve it. + diff --git a/extension/pprofextension/config.go b/extension/pprofextension/config.go index 8d99601ebb4e..b289e2a05b52 100644 --- a/extension/pprofextension/config.go +++ b/extension/pprofextension/config.go @@ -15,7 +15,7 @@ type Config struct { // TCPAddr is the address and port in which the pprof will be listening to. // Use localhost: to make it available only locally, or ":" to // make it available on all network interfaces. - TCPAddr confignet.TCPAddr `mapstructure:",squash"` + TCPAddr confignet.TCPAddrConfig `mapstructure:",squash"` // Fraction of blocking events that are profiled. A value <= 0 disables // profiling. See https://golang.org/pkg/runtime/#SetBlockProfileRate for details. diff --git a/extension/pprofextension/config_test.go b/extension/pprofextension/config_test.go index f9485b9f181b..b3086a366ef1 100644 --- a/extension/pprofextension/config_test.go +++ b/extension/pprofextension/config_test.go @@ -30,7 +30,7 @@ func TestLoadConfig(t *testing.T) { { id: component.NewIDWithName(metadata.Type, "1"), expected: &Config{ - TCPAddr: confignet.TCPAddr{Endpoint: "127.0.0.1:1777"}, + TCPAddr: confignet.TCPAddrConfig{Endpoint: "127.0.0.1:1777"}, BlockProfileFraction: 3, MutexProfileFraction: 5, }, diff --git a/extension/pprofextension/factory.go b/extension/pprofextension/factory.go index aa4479163d59..e622a3f57720 100644 --- a/extension/pprofextension/factory.go +++ b/extension/pprofextension/factory.go @@ -30,7 +30,7 @@ func NewFactory() extension.Factory { func createDefaultConfig() component.Config { return &Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: defaultEndpoint, }, } @@ -42,5 +42,5 @@ func createExtension(_ context.Context, set extension.CreateSettings, cfg compon return nil, errors.New("\"endpoint\" is required when using the \"pprof\" extension") } - return newServer(*config, set.Logger), nil + return newServer(*config, set.TelemetrySettings), nil } diff --git a/extension/pprofextension/factory_test.go b/extension/pprofextension/factory_test.go index 665e2f439c5b..b11a1bb4493c 100644 --- a/extension/pprofextension/factory_test.go +++ b/extension/pprofextension/factory_test.go @@ -19,7 +19,7 @@ import ( func TestFactory_CreateDefaultConfig(t *testing.T) { cfg := createDefaultConfig() assert.Equal(t, &Config{ - TCPAddr: confignet.TCPAddr{Endpoint: defaultEndpoint}, + TCPAddr: confignet.TCPAddrConfig{Endpoint: defaultEndpoint}, }, cfg) diff --git a/extension/pprofextension/generated_component_test.go b/extension/pprofextension/generated_component_test.go new file mode 100644 index 000000000000..60fd77ba6b37 --- /dev/null +++ b/extension/pprofextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package pprofextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/pprofextension/go.mod b/extension/pprofextension/go.mod index c745aa783c43..aa6bc045a4a4 100644 --- a/extension/pprofextension/go.mod +++ b/extension/pprofextension/go.mod @@ -1,42 +1,55 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confignet v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confignet v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.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.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/pprofextension/go.sum b/extension/pprofextension/go.sum index dc7ed2305f6f..32a4e944357c 100644 --- a/extension/pprofextension/go.sum +++ b/extension/pprofextension/go.sum @@ -1,7 +1,16 @@ +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/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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -9,6 +18,9 @@ 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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -17,48 +29,64 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -68,16 +96,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -90,15 +118,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/pprofextension/internal/metadata/generated_status.go b/extension/pprofextension/internal/metadata/generated_status.go index 2eee7f5e63dc..7d8649738038 100644 --- a/extension/pprofextension/internal/metadata/generated_status.go +++ b/extension/pprofextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("pprof") ) const ( - Type = "pprof" ExtensionStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/pprof") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/pprof") +} diff --git a/extension/pprofextension/metadata.yaml b/extension/pprofextension/metadata.yaml index e96abd2d0738..047b5adb49a9 100644 --- a/extension/pprofextension/metadata.yaml +++ b/extension/pprofextension/metadata.yaml @@ -1,9 +1,13 @@ type: pprof +scope_name: otelcol/pprof status: class: extension stability: beta: [extension] - distributions: [core, contrib, splunk, observiq, sumo, aws, redhat] + distributions: [core, contrib] codeowners: active: [MovieStoreGuy] + +tests: + config: diff --git a/extension/pprofextension/package_test.go b/extension/pprofextension/package_test.go new file mode 100644 index 000000000000..92b5b0fec95d --- /dev/null +++ b/extension/pprofextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package pprofextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/pprofextension/pprofextension.go b/extension/pprofextension/pprofextension.go index 55f8889849ae..fcb488d29ffb 100644 --- a/extension/pprofextension/pprofextension.go +++ b/extension/pprofextension/pprofextension.go @@ -21,14 +21,14 @@ import ( var running = &atomic.Bool{} type pprofExtension struct { - config Config - logger *zap.Logger - file *os.File - server http.Server - stopCh chan struct{} + config Config + file *os.File + server http.Server + stopCh chan struct{} + telemetrySettings component.TelemetrySettings } -func (p *pprofExtension) Start(_ context.Context, host component.Host) error { +func (p *pprofExtension) Start(_ context.Context, _ component.Host) error { // The runtime settings are global to the application, so while in principle it // is possible to have more than one instance, running multiple will mean that // the settings of the last started instance will prevail. In order to avoid @@ -49,7 +49,7 @@ func (p *pprofExtension) Start(_ context.Context, host component.Host) error { // Start the listener here so we can have earlier failure if port is // already in use. var ln net.Listener - ln, startErr = p.config.TCPAddr.Listen() + ln, startErr = p.config.TCPAddr.Listen(context.Background()) if startErr != nil { return startErr } @@ -57,7 +57,7 @@ func (p *pprofExtension) Start(_ context.Context, host component.Host) error { runtime.SetBlockProfileRate(p.config.BlockProfileFraction) runtime.SetMutexProfileFraction(p.config.MutexProfileFraction) - p.logger.Info("Starting net/http/pprof server", zap.Any("config", p.config)) + p.telemetrySettings.Logger.Info("Starting net/http/pprof server", zap.Any("config", p.config)) p.stopCh = make(chan struct{}) go func() { defer func() { @@ -67,7 +67,7 @@ func (p *pprofExtension) Start(_ context.Context, host component.Host) error { // The listener ownership goes to the server. if errHTTP := p.server.Serve(ln); !errors.Is(errHTTP, http.ErrServerClosed) && errHTTP != nil { - host.ReportFatalError(errHTTP) + p.telemetrySettings.ReportStatus(component.NewFatalErrorEvent(errHTTP)) } }() @@ -97,9 +97,9 @@ func (p *pprofExtension) Shutdown(context.Context) error { return err } -func newServer(config Config, logger *zap.Logger) *pprofExtension { +func newServer(config Config, params component.TelemetrySettings) *pprofExtension { return &pprofExtension{ - config: config, - logger: logger, + config: config, + telemetrySettings: params, } } diff --git a/extension/pprofextension/pprofextension_test.go b/extension/pprofextension/pprofextension_test.go index f061585b374d..db6e91feafa7 100644 --- a/extension/pprofextension/pprofextension_test.go +++ b/extension/pprofextension/pprofextension_test.go @@ -12,23 +12,25 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/confignet" - "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" ) func TestPerformanceProfilerExtensionUsage(t *testing.T) { config := Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, BlockProfileFraction: 3, MutexProfileFraction: 5, } + tt, err := componenttest.SetupTelemetry(component.MustNewID("TestPprofExtension")) + require.NoError(t, err, "SetupTelemetry should succeed") - pprofExt := newServer(config, zap.NewNop()) + pprofExt := newServer(config, tt.TelemetrySettings()) require.NotNil(t, pprofExt) require.NoError(t, pprofExt.Start(context.Background(), componenttest.NewNopHost())) @@ -55,11 +57,13 @@ func TestPerformanceProfilerExtensionPortAlreadyInUse(t *testing.T) { defer ln.Close() config := Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: endpoint, }, } - pprofExt := newServer(config, zap.NewNop()) + tt, err := componenttest.SetupTelemetry(component.MustNewID("TestPprofExtension")) + require.NoError(t, err, "SetupTelemetry should succeed") + pprofExt := newServer(config, tt.TelemetrySettings()) require.NotNil(t, pprofExt) require.Error(t, pprofExt.Start(context.Background(), componenttest.NewNopHost())) @@ -67,12 +71,14 @@ func TestPerformanceProfilerExtensionPortAlreadyInUse(t *testing.T) { func TestPerformanceProfilerMultipleStarts(t *testing.T) { config := Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, } - pprofExt := newServer(config, zap.NewNop()) + tt, err := componenttest.SetupTelemetry(component.MustNewID("TestPprofExtension")) + require.NoError(t, err, "SetupTelemetry should succeed") + pprofExt := newServer(config, tt.TelemetrySettings()) require.NotNil(t, pprofExt) require.NoError(t, pprofExt.Start(context.Background(), componenttest.NewNopHost())) @@ -84,12 +90,14 @@ func TestPerformanceProfilerMultipleStarts(t *testing.T) { func TestPerformanceProfilerMultipleShutdowns(t *testing.T) { config := Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, } - pprofExt := newServer(config, zap.NewNop()) + tt, err := componenttest.SetupTelemetry(component.MustNewID("TestPprofExtension")) + require.NoError(t, err, "SetupTelemetry should succeed") + pprofExt := newServer(config, tt.TelemetrySettings()) require.NotNil(t, pprofExt) require.NoError(t, pprofExt.Start(context.Background(), componenttest.NewNopHost())) @@ -99,12 +107,13 @@ func TestPerformanceProfilerMultipleShutdowns(t *testing.T) { func TestPerformanceProfilerShutdownWithoutStart(t *testing.T) { config := Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, } - - pprofExt := newServer(config, zap.NewNop()) + tt, err := componenttest.SetupTelemetry(component.MustNewID("TestPprofExtension")) + require.NoError(t, err, "SetupTelemetry should succeed") + pprofExt := newServer(config, tt.TelemetrySettings()) require.NotNil(t, pprofExt) require.NoError(t, pprofExt.Shutdown(context.Background())) @@ -119,13 +128,14 @@ func TestPerformanceProfilerLifecycleWithFile(t *testing.T) { require.NoError(t, tmpFile.Close()) config := Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, SaveToFile: tmpFile.Name(), } - - pprofExt := newServer(config, zap.NewNop()) + tt, err := componenttest.SetupTelemetry(component.MustNewID("TestPprofExtension")) + require.NoError(t, err, "SetupTelemetry should succeed") + pprofExt := newServer(config, tt.TelemetrySettings()) require.NotNil(t, pprofExt) require.NoError(t, pprofExt.Start(context.Background(), componenttest.NewNopHost())) diff --git a/extension/remotetapextension/config.go b/extension/remotetapextension/config.go index c59609511cfd..a9942dc4977f 100644 --- a/extension/remotetapextension/config.go +++ b/extension/remotetapextension/config.go @@ -9,12 +9,12 @@ import ( ) type Config struct { - confighttp.HTTPServerSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct + confighttp.ServerConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct } func createDefaultConfig() component.Config { return &Config{ - HTTPServerSettings: confighttp.HTTPServerSettings{ + ServerConfig: confighttp.ServerConfig{ Endpoint: "127.0.0.1:11000", }, } diff --git a/extension/remotetapextension/extension.go b/extension/remotetapextension/extension.go index 229a2b5a6085..52892c77d8ad 100644 --- a/extension/remotetapextension/extension.go +++ b/extension/remotetapextension/extension.go @@ -23,7 +23,7 @@ type remoteObserverExtension struct { server *http.Server } -func (s *remoteObserverExtension) Start(_ context.Context, host component.Host) error { +func (s *remoteObserverExtension) Start(ctx context.Context, host component.Host) error { htmlContent, err := fs.Sub(httpFS, "html") if err != nil { @@ -31,7 +31,7 @@ func (s *remoteObserverExtension) Start(_ context.Context, host component.Host) } mux := http.NewServeMux() mux.Handle("/", http.FileServer(http.FS(htmlContent))) - s.server, err = s.config.HTTPServerSettings.ToServer(host, s.settings.TelemetrySettings, mux) + s.server, err = s.config.ServerConfig.ToServerContext(ctx, host, s.settings.TelemetrySettings, mux) if err != nil { return err } @@ -39,7 +39,7 @@ func (s *remoteObserverExtension) Start(_ context.Context, host component.Host) go func() { err := s.server.ListenAndServe() if err != nil && !errors.Is(err, http.ErrServerClosed) { - _ = s.settings.TelemetrySettings.ReportComponentStatus(component.NewFatalErrorEvent(err)) + s.settings.TelemetrySettings.ReportStatus(component.NewFatalErrorEvent(err)) } }() return nil diff --git a/extension/remotetapextension/generated_component_test.go b/extension/remotetapextension/generated_component_test.go new file mode 100644 index 000000000000..2252f12ca8d4 --- /dev/null +++ b/extension/remotetapextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package remotetapextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/remotetapextension/go.mod b/extension/remotetapextension/go.mod index 9846cf51e973..fc639f9445c1 100644 --- a/extension/remotetapextension/go.mod +++ b/extension/remotetapextension/go.mod @@ -1,51 +1,66 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/remotetapextension -go 1.20 +go 1.21 require ( - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.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.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/remotetapextension/go.sum b/extension/remotetapextension/go.sum index fc6a143e2a27..f740c8c3d17a 100644 --- a/extension/remotetapextension/go.sum +++ b/extension/remotetapextension/go.sum @@ -1,13 +1,20 @@ +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/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/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.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -17,75 +24,103 @@ 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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -95,16 +130,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -117,12 +152,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/remotetapextension/internal/metadata/generated_status.go b/extension/remotetapextension/internal/metadata/generated_status.go index 28b063c935ab..8fc93acf6805 100644 --- a/extension/remotetapextension/internal/metadata/generated_status.go +++ b/extension/remotetapextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("remotetap") ) const ( - Type = "remotetap" ExtensionStability = component.StabilityLevelDevelopment ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/remotetap") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/remotetap") +} diff --git a/extension/remotetapextension/metadata.yaml b/extension/remotetapextension/metadata.yaml index aedd5abc66c8..8c0236fbe535 100644 --- a/extension/remotetapextension/metadata.yaml +++ b/extension/remotetapextension/metadata.yaml @@ -1,4 +1,5 @@ type: remotetap +scope_name: otelcol/remotetap status: class: extension @@ -7,3 +8,6 @@ status: distributions: [] codeowners: active: [atoulme] + +tests: + config: diff --git a/extension/remotetapextension/package_test.go b/extension/remotetapextension/package_test.go new file mode 100644 index 000000000000..2d48968ad050 --- /dev/null +++ b/extension/remotetapextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package remotetapextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/sigv4authextension/README.md b/extension/sigv4authextension/README.md index f4b5fc979e26..2f9134c799ec 100644 --- a/extension/sigv4authextension/README.md +++ b/extension/sigv4authextension/README.md @@ -3,15 +3,12 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [contrib], [aws], [grafana], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fsigv4auth%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fsigv4auth) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fsigv4auth%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fsigv4auth) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@erichsueh3](https://www.github.com/erichsueh3) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[grafana]: https://github.com/grafana/agent -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector This extension provides Sigv4 authentication for making requests to AWS services. For more information on the Sigv4 process, please look [here](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). diff --git a/extension/sigv4authextension/design.md b/extension/sigv4authextension/design.md index c536edf86219..0613d917a933 100644 --- a/extension/sigv4authextension/design.md +++ b/extension/sigv4authextension/design.md @@ -563,7 +563,6 @@ Additionally, a few other files will be modified to reflect changes made, for ex * `go.sum` * `versions.yaml` * `.github/CODEOWNERS` -* `.github/dependabot.yml` will be generated with "make dependabot" and not modified directly * `cmd/configschema/go.mod` * `internal/components/components.go` * `internal/components/extensions_test.go` diff --git a/extension/sigv4authextension/extension_test.go b/extension/sigv4authextension/extension_test.go index 112d183f5ee1..68a21e9fd3b5 100644 --- a/extension/sigv4authextension/extension_test.go +++ b/extension/sigv4authextension/extension_test.go @@ -36,7 +36,7 @@ func TestRoundTripper(t *testing.T) { assert.NotNil(t, sa) rt, err := sa.RoundTripper(base) - assert.Nil(t, err) + assert.NoError(t, err) si := rt.(*signingRoundTripper) assert.Equal(t, base, si.transport) diff --git a/extension/sigv4authextension/factory_test.go b/extension/sigv4authextension/factory_test.go index cbde20dc73f3..74571b0e4410 100644 --- a/extension/sigv4authextension/factory_test.go +++ b/extension/sigv4authextension/factory_test.go @@ -34,7 +34,7 @@ func TestCreateExtension(t *testing.T) { cfg := createDefaultConfig().(*Config) ext, err := createExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, ext) } diff --git a/extension/sigv4authextension/generated_component_test.go b/extension/sigv4authextension/generated_component_test.go new file mode 100644 index 000000000000..d21f1d87dcc7 --- /dev/null +++ b/extension/sigv4authextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package sigv4authextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/sigv4authextension/go.mod b/extension/sigv4authextension/go.mod index 1891e1ef4830..1073f811cddc 100644 --- a/extension/sigv4authextension/go.mod +++ b/extension/sigv4authextension/go.mod @@ -1,53 +1,63 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension -go 1.20 +go 1.21 require ( - github.com/aws/aws-sdk-go-v2 v1.22.2 - github.com/aws/aws-sdk-go-v2/config v1.24.0 - github.com/aws/aws-sdk-go-v2/credentials v1.15.2 - github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/extension/auth v0.89.0 - go.uber.org/zap v1.26.0 - google.golang.org/grpc v1.59.0 + github.com/aws/aws-sdk-go-v2 v1.26.1 + github.com/aws/aws-sdk-go-v2/config v1.27.11 + github.com/aws/aws-sdk-go-v2/credentials v1.17.11 + github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/extension/auth v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/zap v1.27.0 + google.golang.org/grpc v1.63.2 ) require ( - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1 // indirect - github.com/aws/smithy-go v1.16.0 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect + github.com/aws/smithy-go v1.20.2 // indirect + github.com/beorn7/perks v1.0.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/sigv4authextension/go.sum b/extension/sigv4authextension/go.sum index ea7f41592ad9..fab2403fbc5e 100644 --- a/extension/sigv4authextension/go.sum +++ b/extension/sigv4authextension/go.sum @@ -1,88 +1,110 @@ -github.com/aws/aws-sdk-go-v2 v1.22.2 h1:lV0U8fnhAnPz8YcdmZVV60+tr6CakHzqA6P8T46ExJI= -github.com/aws/aws-sdk-go-v2 v1.22.2/go.mod h1:Kd0OJtkW3Q0M0lUWGszapWjEvrXDzRW+D21JNsroB+c= -github.com/aws/aws-sdk-go-v2/config v1.24.0 h1:4LEk29JO3w+y9dEo/5Tq5QTP7uIEw+KQrKiHOs4xlu4= -github.com/aws/aws-sdk-go-v2/config v1.24.0/go.mod h1:11nNDAuK86kOUHeuEQo8f3CkcV5xuUxvPwFjTZE/PnQ= -github.com/aws/aws-sdk-go-v2/credentials v1.15.2 h1:rKH7khRMxPdD0u3dHecd0Q7NOVw3EUe7AqdkUOkiOGI= -github.com/aws/aws-sdk-go-v2/credentials v1.15.2/go.mod h1:tXM8wmaeAhfC7nZoCxb0FzM/aRaB1m1WQ7x0qlBLq80= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3 h1:G5KawTAkyHH6WyKQCdHiW4h3PmAXNJpOgwKg3H7sDRE= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3/go.mod h1:hugKmSFnZB+HgNI1sYGT14BUPZkO6alC/e0AWu+0IAQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2 h1:AaQsr5vvGR7rmeSWBtTCcw16tT9r51mWijuCQhzLnq8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2/go.mod h1:o1IiRn7CWocIFTXJjGKJDOwxv1ibL53NpcvcqGWyRBA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 h1:UZx8SXZ0YtzRiALzYAWcjb9Y9hZUR7MBKaBQ5ouOjPs= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2/go.mod h1:ipuRpcSaklmxR6C39G187TpBAO132gUfleTGccUPs8c= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0 h1:usgqiJtamuGIBj+OvYmMq89+Z1hIKkMJToz1WpoeNUY= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 h1:h7j73yuAVVjic8pqswh+L/7r2IHP43QwRyOu6zcCDDE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2/go.mod h1:H07AHdK5LSy8F7EJUQhoxyiCNkePoHj2D8P2yGTWafo= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.1 h1:km+ZNjtLtpXYf42RdaDZnNHm9s7SYAuDGTafy6nd89A= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.1/go.mod h1:aHBr3pvBSD5MbzOvQtYutyPLLRPbl/y9x86XyJJnUXQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1 h1:iRFNqZH4a67IqPvK8xxtyQYnyrlsvwmpHOe9r55ggBA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1/go.mod h1:pTy5WM+6sNv2tB24JNKFtn6EvciQ5k40ZJ0pq/Iaxj0= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 h1:txgVXIXWPXyqdiVn92BV6a/rgtpX31HYdsOYj0sVQQQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.1/go.mod h1:VAiJiNaoP1L89STFlEMgmHX1bKixY+FaP+TpRFrmyZ4= -github.com/aws/smithy-go v1.16.0 h1:gJZEH/Fqh+RsvlJ1Zt4tVAtV6bKkp3cC+R6FCZMNzik= -github.com/aws/smithy-go v1.16.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA= +github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/aws/aws-sdk-go-v2/config v1.27.11 h1:f47rANd2LQEYHda2ddSCKYId18/8BhSRM4BULGmfgNA= +github.com/aws/aws-sdk-go-v2/config v1.27.11/go.mod h1:SMsV78RIOYdve1vf36z8LmnszlRWkwMQtomCAI0/mIE= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11 h1:YuIB1dJNf1Re822rriUOTxopaHHvIq0l/pX3fwO+Tzs= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6EKL+NcD7LG3dpKGMV4SShgo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= +github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= +github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +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/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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -92,16 +114,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -114,15 +136,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/extension/sigv4authextension/internal/metadata/generated_status.go b/extension/sigv4authextension/internal/metadata/generated_status.go index dc66d270b99e..b05c500dcba1 100644 --- a/extension/sigv4authextension/internal/metadata/generated_status.go +++ b/extension/sigv4authextension/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("sigv4auth") ) const ( - Type = "sigv4auth" ExtensionStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/sigv4auth") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/sigv4auth") +} diff --git a/extension/sigv4authextension/metadata.yaml b/extension/sigv4authextension/metadata.yaml index e96cc55e7afc..2371597889e0 100644 --- a/extension/sigv4authextension/metadata.yaml +++ b/extension/sigv4authextension/metadata.yaml @@ -1,4 +1,5 @@ type: sigv4auth +scope_name: otelcol/sigv4auth status: class: extension @@ -6,8 +7,8 @@ status: beta: [extension] distributions: - contrib - - aws - - grafana - - sumo codeowners: active: [Aneurysm9, erichsueh3] + +tests: + config: diff --git a/extension/sigv4authextension/signingroundtripper_test.go b/extension/sigv4authextension/signingroundtripper_test.go index 9e5fbd0de28f..4195faa297e3 100644 --- a/extension/sigv4authextension/signingroundtripper_test.go +++ b/extension/sigv4authextension/signingroundtripper_test.go @@ -161,7 +161,7 @@ func TestInferServiceAndRegion(t *testing.T) { assert.NotNil(t, sa) rt, err := sa.RoundTripper((http.RoundTripper)(http.DefaultTransport.(*http.Transport).Clone())) - assert.Nil(t, err) + assert.NoError(t, err) si := rt.(*signingRoundTripper) service, region := si.inferServiceAndRegion(testcase.request) diff --git a/extension/solarwindsapmsettingsextension/Makefile b/extension/solarwindsapmsettingsextension/Makefile new file mode 100644 index 000000000000..ded7a36092dc --- /dev/null +++ b/extension/solarwindsapmsettingsextension/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/extension/solarwindsapmsettingsextension/README.md b/extension/solarwindsapmsettingsextension/README.md new file mode 100644 index 000000000000..88f766bf985d --- /dev/null +++ b/extension/solarwindsapmsettingsextension/README.md @@ -0,0 +1,38 @@ +# Solarwinds APM Settings extension + + +| Status | | +| ------------- |-----------| +| Stability | [development] | +| Distributions | [] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fsolarwindsapmsettings%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fsolarwindsapmsettings) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fsolarwindsapmsettings%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fsolarwindsapmsettings) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jerrytfleung](https://www.github.com/jerrytfleung), [@cheempz](https://www.github.com/cheempz) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development + + +## Overview +The Solarwinds APM Settings extension gets Solarwinds APM specific settings from Solarwinds APM collector and `/tmp/solarwinds-apm-settings.json` & `/tmp/solarwinds-apm-settings-raw` periodically. + +## Configuration + +Example: + +```yaml +extensions: + solarwindsapmsettings: + endpoint: "" + key: ":" + interval: 1m +``` + +### endpoint (Required) +The APM collector endpoint which this extension calls `getSettings`. See [here](https://documentation.solarwinds.com/en/success_center/observability/content/system_requirements/endpoints.htm) for our APM collector endpoints. + +### key (Required) +The service key in format `:` for `getSettings` from Solarwinds APM collector. See [here](https://documentation.solarwinds.com/en/success_center/observability/content/configure/configure-services.htm) for configuring a service key. + +### interval (Optional) +Periodic interval to get Solarwinds APM specific settings from Solarwinds APM collector. + +Default: `1m` diff --git a/extension/solarwindsapmsettingsextension/config.go b/extension/solarwindsapmsettingsextension/config.go new file mode 100644 index 000000000000..af41f9722c47 --- /dev/null +++ b/extension/solarwindsapmsettingsextension/config.go @@ -0,0 +1,41 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package solarwindsapmsettingsextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/solarwindsapmsettingsextension" + +import ( + "errors" + "strconv" + "strings" + "time" +) + +type Config struct { + Endpoint string `mapstructure:"endpoint"` + Key string `mapstructure:"key"` + Interval string `mapstructure:"interval"` +} + +func (cfg *Config) Validate() error { + if len(cfg.Endpoint) == 0 { + return errors.New("endpoint must not be empty") + } + endpointArr := strings.Split(cfg.Endpoint, ":") + if len(endpointArr) != 2 { + return errors.New("endpoint should be in \":\" format") + } + if _, err := strconv.Atoi(endpointArr[1]); err != nil { + return errors.New("the portion of endpoint has to be an integer") + } + if len(cfg.Key) == 0 { + return errors.New("key must not be empty") + } + keyArr := strings.Split(cfg.Key, ":") + if len(keyArr) != 2 { + return errors.New("key should be in \":\" format") + } + if _, err := time.ParseDuration(cfg.Interval); err != nil { + return errors.New("interval has to be a duration string. Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\"") + } + return nil +} diff --git a/extension/solarwindsapmsettingsextension/config_test.go b/extension/solarwindsapmsettingsextension/config_test.go new file mode 100644 index 000000000000..b0860aeacb1f --- /dev/null +++ b/extension/solarwindsapmsettingsextension/config_test.go @@ -0,0 +1,66 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package solarwindsapmsettingsextension + +import ( + "errors" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestValidate(t *testing.T) { + tests := []struct { + name string + cfg *Config + err error + }{ + { + name: "nothing", + cfg: &Config{}, + err: errors.New("endpoint must not be empty"), + }, + { + name: "empty key", + cfg: &Config{ + Endpoint: "host:12345", + }, + err: errors.New("key must not be empty"), + }, + { + name: "invalid endpoint", + cfg: &Config{ + Endpoint: "invalid", + Key: "token:name", + }, + err: errors.New("endpoint should be in \":\" format"), + }, + { + name: "invalid endpoint format but port is not an integer", + cfg: &Config{ + Endpoint: "host:abc", + Key: "token:name", + }, + err: errors.New("the portion of endpoint has to be an integer"), + }, + { + name: "invalid key", + cfg: &Config{ + Endpoint: "host:12345", + Key: "invalid", + }, + err: errors.New("key should be in \":\" format"), + }, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + err := tc.cfg.Validate() + if tc.err != nil { + require.EqualError(t, err, tc.err.Error()) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/extension/solarwindsapmsettingsextension/doc.go b/extension/solarwindsapmsettingsextension/doc.go new file mode 100644 index 000000000000..d04ff831ad00 --- /dev/null +++ b/extension/solarwindsapmsettingsextension/doc.go @@ -0,0 +1,7 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +// Package solarwindsapmsettingsextension +package solarwindsapmsettingsextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/solarwindsapmsettingsextension" diff --git a/extension/solarwindsapmsettingsextension/extension.go b/extension/solarwindsapmsettingsextension/extension.go new file mode 100644 index 000000000000..b3a2b3bb4507 --- /dev/null +++ b/extension/solarwindsapmsettingsextension/extension.go @@ -0,0 +1,37 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package solarwindsapmsettingsextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/solarwindsapmsettingsextension" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" + "go.uber.org/zap" +) + +type solarwindsapmSettingsExtension struct { + logger *zap.Logger + config *Config + cancel context.CancelFunc +} + +func newSolarwindsApmSettingsExtension(extensionCfg *Config, logger *zap.Logger) (extension.Extension, error) { + settingsExtension := &solarwindsapmSettingsExtension{ + config: extensionCfg, + logger: logger, + } + return settingsExtension, nil +} + +func (extension *solarwindsapmSettingsExtension) Start(_ context.Context, _ component.Host) error { + extension.logger.Debug("Starting up solarwinds apm settings extension") + _, extension.cancel = context.WithCancel(context.Background()) + return nil +} + +func (extension *solarwindsapmSettingsExtension) Shutdown(_ context.Context) error { + extension.logger.Debug("Shutting down solarwinds apm settings extension") + return nil +} diff --git a/extension/solarwindsapmsettingsextension/extension_test.go b/extension/solarwindsapmsettingsextension/extension_test.go new file mode 100644 index 000000000000..8c6d177a1aa8 --- /dev/null +++ b/extension/solarwindsapmsettingsextension/extension_test.go @@ -0,0 +1,53 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package solarwindsapmsettingsextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/extension" + "go.uber.org/zap" +) + +func TestCreateExtension(t *testing.T) { + conf := &Config{ + Endpoint: "apm-testcollector.click:443", + Key: "valid:unittest", + Interval: "1s", + } + ex := createAnExtension(conf, t) + require.NoError(t, ex.Shutdown(context.TODO())) +} + +func TestCreateExtensionWrongEndpoint(t *testing.T) { + conf := &Config{ + Endpoint: "apm-testcollector.nothing:443", + Key: "valid:unittest", + Interval: "1s", + } + ex := createAnExtension(conf, t) + require.NoError(t, ex.Shutdown(context.TODO())) +} + +func TestCreateExtensionWrongKey(t *testing.T) { + conf := &Config{ + Endpoint: "apm-testcollector.click:443", + Key: "invalid", + Interval: "1s", + } + ex := createAnExtension(conf, t) + require.NoError(t, ex.Shutdown(context.TODO())) +} + +// create extension +func createAnExtension(c *Config, t *testing.T) extension.Extension { + logger, err := zap.NewProduction() + require.NoError(t, err) + ex, err := newSolarwindsApmSettingsExtension(c, logger) + require.NoError(t, err) + require.NoError(t, ex.Start(context.TODO(), nil)) + return ex +} diff --git a/extension/solarwindsapmsettingsextension/factory.go b/extension/solarwindsapmsettingsextension/factory.go new file mode 100644 index 000000000000..bb8aa2806501 --- /dev/null +++ b/extension/solarwindsapmsettingsextension/factory.go @@ -0,0 +1,36 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package solarwindsapmsettingsextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/solarwindsapmsettingsextension" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/solarwindsapmsettingsextension/internal/metadata" +) + +const ( + DefaultInterval = "1m" +) + +func createDefaultConfig() component.Config { + return &Config{ + Interval: DefaultInterval, + } +} + +func createExtension(_ context.Context, settings extension.CreateSettings, cfg component.Config) (extension.Extension, error) { + return newSolarwindsApmSettingsExtension(cfg.(*Config), settings.Logger) +} + +func NewFactory() extension.Factory { + return extension.NewFactory( + metadata.Type, + createDefaultConfig, + createExtension, + metadata.ExtensionStability, + ) +} diff --git a/extension/solarwindsapmsettingsextension/factory_test.go b/extension/solarwindsapmsettingsextension/factory_test.go new file mode 100644 index 000000000000..e5db55e6bc1a --- /dev/null +++ b/extension/solarwindsapmsettingsextension/factory_test.go @@ -0,0 +1,23 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package solarwindsapmsettingsextension + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/component/componenttest" +) + +func TestCreateDefaultConfig(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + assert.NotNil(t, cfg, "failed to create default config") + assert.NoError(t, componenttest.CheckConfigStruct(cfg)) + ocfg, ok := factory.CreateDefaultConfig().(*Config) + assert.True(t, ok) + assert.Empty(t, ocfg.Endpoint, "There is no default endpoint") + assert.Empty(t, ocfg.Key, "There is no default key") + assert.Equal(t, ocfg.Interval, DefaultInterval, "Wrong default interval") +} diff --git a/extension/solarwindsapmsettingsextension/generated_component_test.go b/extension/solarwindsapmsettingsextension/generated_component_test.go new file mode 100644 index 000000000000..afbaecbe570d --- /dev/null +++ b/extension/solarwindsapmsettingsextension/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package solarwindsapmsettingsextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/solarwindsapmsettingsextension/go.mod b/extension/solarwindsapmsettingsextension/go.mod new file mode 100644 index 000000000000..f19ef2f1f2f7 --- /dev/null +++ b/extension/solarwindsapmsettingsextension/go.mod @@ -0,0 +1,49 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/extension/solarwindsapmsettingsextension + +go 1.21 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/zap v1.27.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.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // 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.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/extension/solarwindsapmsettingsextension/go.sum b/extension/solarwindsapmsettingsextension/go.sum new file mode 100644 index 000000000000..bfe1d5d74015 --- /dev/null +++ b/extension/solarwindsapmsettingsextension/go.sum @@ -0,0 +1,127 @@ +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/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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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/extension/solarwindsapmsettingsextension/internal/metadata/generated_status.go b/extension/solarwindsapmsettingsextension/internal/metadata/generated_status.go new file mode 100644 index 000000000000..15bc618e72b2 --- /dev/null +++ b/extension/solarwindsapmsettingsextension/internal/metadata/generated_status.go @@ -0,0 +1,25 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("solarwindsapmsettings") +) + +const ( + ExtensionStability = component.StabilityLevelDevelopment +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/solarwindsapmsettings") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/solarwindsapmsettings") +} diff --git a/extension/solarwindsapmsettingsextension/metadata.yaml b/extension/solarwindsapmsettingsextension/metadata.yaml new file mode 100644 index 000000000000..694ffa7014bc --- /dev/null +++ b/extension/solarwindsapmsettingsextension/metadata.yaml @@ -0,0 +1,10 @@ +type: solarwindsapmsettings +scope_name: otelcol/solarwindsapmsettings + +status: + class: extension + stability: + development: [extension] + distributions: [] + codeowners: + active: [jerrytfleung, cheempz] diff --git a/extension/storage/dbstorage/Makefile b/extension/storage/dbstorage/Makefile new file mode 100644 index 000000000000..bdd863a203be --- /dev/null +++ b/extension/storage/dbstorage/Makefile @@ -0,0 +1 @@ +include ../../../Makefile.Common diff --git a/extension/storage/dbstorage/README.md b/extension/storage/dbstorage/README.md index 5369c8896c80..664fcc852c6b 100644 --- a/extension/storage/dbstorage/README.md +++ b/extension/storage/dbstorage/README.md @@ -4,13 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [alpha] | -| Distributions | [contrib], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fdbstorage%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fdbstorage) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fdbstorage%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fdbstorage) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dmitryax](https://www.github.com/dmitryax), [@atoulme](https://www.github.com/atoulme) | [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector > :construction: This extension is in alpha. Configuration and functionality are subject to change. diff --git a/extension/storage/dbstorage/config_test.go b/extension/storage/dbstorage/config_test.go index dc7dab4050c5..a04c1b8f7d84 100644 --- a/extension/storage/dbstorage/config_test.go +++ b/extension/storage/dbstorage/config_test.go @@ -1,10 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - package dbstorage // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage" import ( diff --git a/extension/storage/dbstorage/doc.go b/extension/storage/dbstorage/doc.go new file mode 100644 index 000000000000..4a381ce18fdd --- /dev/null +++ b/extension/storage/dbstorage/doc.go @@ -0,0 +1,5 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml +package dbstorage // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage" diff --git a/extension/storage/dbstorage/extension_test.go b/extension/storage/dbstorage/extension_test.go index 1ca76ae88ce1..e97b52c41068 100644 --- a/extension/storage/dbstorage/extension_test.go +++ b/extension/storage/dbstorage/extension_test.go @@ -1,10 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - package dbstorage import ( @@ -117,5 +113,5 @@ func newTestExtension(t *testing.T) storage.Extension { } func newTestEntity(name string) component.ID { - return component.NewIDWithName("nop", name) + return component.MustNewIDWithName("nop", name) } diff --git a/extension/storage/dbstorage/generated_component_test.go b/extension/storage/dbstorage/generated_component_test.go new file mode 100644 index 000000000000..65e7b5632143 --- /dev/null +++ b/extension/storage/dbstorage/generated_component_test.go @@ -0,0 +1,30 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package dbstorage + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) +} diff --git a/extension/storage/dbstorage/go.mod b/extension/storage/dbstorage/go.mod new file mode 100644 index 000000000000..348681957eeb --- /dev/null +++ b/extension/storage/dbstorage/go.mod @@ -0,0 +1,61 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage + +go 1.21 + +require ( + github.com/jackc/pgx/v4 v4.18.3 + github.com/mattn/go-sqlite3 v1.14.22 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.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.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/jackc/chunkreader/v2 v2.0.1 // indirect + github.com/jackc/pgconn v1.14.3 // indirect + github.com/jackc/pgio v1.0.0 // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgproto3/v2 v2.3.3 // indirect + github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect + github.com/jackc/pgtype v1.14.0 // 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.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/extension/storage/dbstorage/go.sum b/extension/storage/dbstorage/go.sum new file mode 100644 index 000000000000..6699f60955dc --- /dev/null +++ b/extension/storage/dbstorage/go.sum @@ -0,0 +1,284 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +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/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= +github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +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/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= +github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= +github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= +github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= +github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= +github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= +github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= +github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= +github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= +github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= +github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= +github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w= +github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM= +github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= +github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= +github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= +github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= +github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc= +github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= +github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= +github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= +github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= +github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= +github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag= +github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= +github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= +github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= +github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= +github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= +github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= +github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= +github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= +github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= +github.com/jackc/pgx/v4 v4.18.3 h1:dE2/TrEsGX3RBprb3qryqSV9Y60iZN1C6i8IrmW9/BA= +github.com/jackc/pgx/v4 v4.18.3/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= +github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8= +github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= +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/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= +github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= +github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +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.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +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/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/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-20190813141303-74dc4d7220e7/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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/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.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/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-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +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-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +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.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= diff --git a/extension/storage/dbstorage/internal/metadata/generated_status.go b/extension/storage/dbstorage/internal/metadata/generated_status.go index 057cd7cd31a2..1622c1dfac5f 100644 --- a/extension/storage/dbstorage/internal/metadata/generated_status.go +++ b/extension/storage/dbstorage/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("db_storage") ) const ( - Type = "db_storage" ExtensionStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/dbstorage") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/dbstorage") +} diff --git a/extension/storage/dbstorage/metadata.yaml b/extension/storage/dbstorage/metadata.yaml index 3142ebba4c29..24ed6d33a993 100644 --- a/extension/storage/dbstorage/metadata.yaml +++ b/extension/storage/dbstorage/metadata.yaml @@ -1,9 +1,14 @@ type: db_storage +scope_name: otelcol/dbstorage status: class: extension stability: alpha: [extension] - distributions: [contrib, sumo] + distributions: [contrib] codeowners: active: [dmitryax, atoulme] + +# TODO: Update the extension to make the tests pass +tests: + skip_lifecycle: true diff --git a/extension/storage/dbstorage/package_test.go b/extension/storage/dbstorage/package_test.go new file mode 100644 index 000000000000..81c633e3a345 --- /dev/null +++ b/extension/storage/dbstorage/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package dbstorage + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/storage/filestorage/Makefile b/extension/storage/filestorage/Makefile new file mode 100644 index 000000000000..bdd863a203be --- /dev/null +++ b/extension/storage/filestorage/Makefile @@ -0,0 +1 @@ +include ../../../Makefile.Common diff --git a/extension/storage/filestorage/README.md b/extension/storage/filestorage/README.md index 24d72e93b193..3a95f87ab286 100644 --- a/extension/storage/filestorage/README.md +++ b/extension/storage/filestorage/README.md @@ -4,15 +4,12 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [contrib], [observiq], [splunk], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Ffilestorage%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Ffilestorage) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Ffilestorage%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Ffilestorage) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@djaglowski](https://www.github.com/djaglowski) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@djaglowski](https://www.github.com/djaglowski) \| Seeking more code owners! | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector The File Storage extension can persist state to the local file system. @@ -131,7 +128,7 @@ For more details, see the following issues: The schedule for this feature gate is: - Introduced in v0.87.0 (October 2023) as `alpha` - disabled by default. -- Moved to `beta` in January 2024 - enabled by default. +- Moved to `beta` in v0.92.0 (January 2024) - enabled by default. - Moved to `stable` in April 2024 - cannot be disabled. - Removed three releases after `stable`. diff --git a/extension/storage/filestorage/client.go b/extension/storage/filestorage/client.go index a2819a5f2988..c8fca4ba0201 100644 --- a/extension/storage/filestorage/client.go +++ b/extension/storage/filestorage/client.go @@ -37,17 +37,17 @@ type fileStorageClient struct { closed bool } -func bboltOptions(timeout time.Duration, fSync bool) *bbolt.Options { +func bboltOptions(timeout time.Duration, noSync bool) *bbolt.Options { return &bbolt.Options{ Timeout: timeout, - NoSync: !fSync, + NoSync: noSync, NoFreelistSync: true, FreelistType: bbolt.FreelistMapType, } } -func newClient(logger *zap.Logger, filePath string, timeout time.Duration, compactionCfg *CompactionConfig, fSync bool) (*fileStorageClient, error) { - options := bboltOptions(timeout, fSync) +func newClient(logger *zap.Logger, filePath string, timeout time.Duration, compactionCfg *CompactionConfig, noSync bool) (*fileStorageClient, error) { + options := bboltOptions(timeout, noSync) db, err := bbolt.Open(filePath, 0600, options) if err != nil { return nil, err @@ -172,7 +172,7 @@ func (c *fileStorageClient) Compact(compactionDirectory string, timeout time.Dur }() // use temporary file as compaction target - options := bboltOptions(timeout, false) + options := bboltOptions(timeout, c.db.NoSync) c.compactionMutex.Lock() defer c.compactionMutex.Unlock() diff --git a/extension/storage/filestorage/default_others.go b/extension/storage/filestorage/default_others.go index c869880a32cd..971fecac7fd8 100644 --- a/extension/storage/filestorage/default_others.go +++ b/extension/storage/filestorage/default_others.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !windows -// +build !windows package filestorage // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage" diff --git a/extension/storage/filestorage/default_windows.go b/extension/storage/filestorage/default_windows.go index facd4179e0ec..fbd472a4ca4e 100644 --- a/extension/storage/filestorage/default_windows.go +++ b/extension/storage/filestorage/default_windows.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package filestorage // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage" diff --git a/extension/storage/filestorage/doc.go b/extension/storage/filestorage/doc.go new file mode 100644 index 000000000000..dfdef5356eea --- /dev/null +++ b/extension/storage/filestorage/doc.go @@ -0,0 +1,5 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml +package filestorage // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage" diff --git a/extension/storage/filestorage/extension.go b/extension/storage/filestorage/extension.go index fbac0e1ee7a6..2b74c5fa3dad 100644 --- a/extension/storage/filestorage/extension.go +++ b/extension/storage/filestorage/extension.go @@ -18,7 +18,7 @@ import ( var replaceUnsafeCharactersFeatureGate = featuregate.GlobalRegistry().MustRegister( "extension.filestorage.replaceUnsafeCharacters", - featuregate.StageAlpha, + featuregate.StageBeta, featuregate.WithRegisterDescription("When enabled, characters that are not safe in file paths are replaced in component name using the extension. For example, the data for component `filelog/logs/json` will be stored in file `receiver_filelog_logs~007Ejson` and not in `receiver_filelog_logs/json`."), featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/3148"), featuregate.WithRegisterFromVersion("v0.87.0"), @@ -64,7 +64,7 @@ func (lfs *localFileStorage) GetClient(_ context.Context, kind component.Kind, e rawName = sanitize(rawName) } absoluteName := filepath.Join(lfs.cfg.Directory, rawName) - client, err := newClient(lfs.logger, absoluteName, lfs.cfg.Timeout, lfs.cfg.Compaction, lfs.cfg.FSync) + client, err := newClient(lfs.logger, absoluteName, lfs.cfg.Timeout, lfs.cfg.Compaction, !lfs.cfg.FSync) if err != nil { return nil, err diff --git a/extension/storage/filestorage/extension_test.go b/extension/storage/filestorage/extension_test.go index c374b8d2e3c4..d808647b1293 100644 --- a/extension/storage/filestorage/extension_test.go +++ b/extension/storage/filestorage/extension_test.go @@ -16,7 +16,6 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/extension/experimental/storage" "go.opentelemetry.io/collector/extension/extensiontest" - "go.opentelemetry.io/collector/featuregate" ) func TestExtensionIntegrity(t *testing.T) { @@ -223,9 +222,6 @@ func TestSanitize(t *testing.T) { } func TestComponentNameWithUnsafeCharacters(t *testing.T) { - err := featuregate.GlobalRegistry().Set("extension.filestorage.replaceUnsafeCharacters", true) - require.NoError(t, err) - tempDir := t.TempDir() f := NewFactory() @@ -296,7 +292,7 @@ func newTestExtension(t *testing.T) storage.Extension { } func newTestEntity(name string) component.ID { - return component.NewIDWithName("nop", name) + return component.MustNewIDWithName("nop", name) } func TestCompaction(t *testing.T) { diff --git a/extension/storage/filestorage/generated_component_test.go b/extension/storage/filestorage/generated_component_test.go new file mode 100644 index 000000000000..de532e008c6b --- /dev/null +++ b/extension/storage/filestorage/generated_component_test.go @@ -0,0 +1,42 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package filestorage + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + 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)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/storage/filestorage/go.mod b/extension/storage/filestorage/go.mod new file mode 100644 index 000000000000..da04701849a1 --- /dev/null +++ b/extension/storage/filestorage/go.mod @@ -0,0 +1,54 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage + +go 1.21 + +require ( + github.com/stretchr/testify v1.9.0 + go.etcd.io/bbolt v1.3.9 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/featuregate v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 +) + +require github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + +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.1 // 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/google/uuid v1.6.0 // indirect + github.com/hashicorp/go-version v1.6.0 // 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.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/extension/storage/filestorage/go.sum b/extension/storage/filestorage/go.sum new file mode 100644 index 000000000000..d2f1890206ba --- /dev/null +++ b/extension/storage/filestorage/go.sum @@ -0,0 +1,135 @@ +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/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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +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/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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.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.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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/extension/storage/filestorage/internal/metadata/generated_status.go b/extension/storage/filestorage/internal/metadata/generated_status.go index 90881ccc1de1..7f4eae03a91c 100644 --- a/extension/storage/filestorage/internal/metadata/generated_status.go +++ b/extension/storage/filestorage/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("file_storage") ) const ( - Type = "file_storage" ExtensionStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/filestorage") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/filestorage") +} diff --git a/extension/storage/filestorage/metadata.yaml b/extension/storage/filestorage/metadata.yaml index 4a89b792335d..6707480d428a 100644 --- a/extension/storage/filestorage/metadata.yaml +++ b/extension/storage/filestorage/metadata.yaml @@ -1,9 +1,11 @@ type: file_storage +scope_name: otelcol/filestorage status: class: extension stability: beta: [extension] - distributions: [contrib, observiq, splunk, sumo] + distributions: [contrib] codeowners: active: [djaglowski] + seeking_new: true diff --git a/extension/storage/filestorage/package_test.go b/extension/storage/filestorage/package_test.go new file mode 100644 index 000000000000..725008ffc1bc --- /dev/null +++ b/extension/storage/filestorage/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filestorage + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/storage/go.mod b/extension/storage/go.mod index 222b2bd25dbf..19a9ef464c02 100644 --- a/extension/storage/go.mod +++ b/extension/storage/go.mod @@ -1,51 +1,50 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage -go 1.20 +go 1.21 require ( - github.com/jackc/pgx/v4 v4.18.1 - github.com/mattn/go-sqlite3 v1.14.18 - github.com/stretchr/testify v1.8.4 - go.etcd.io/bbolt v1.3.8 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.uber.org/goleak v1.3.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.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect - github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.14.0 // indirect - github.com/jackc/pgio v1.0.0 // indirect - github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgproto3/v2 v2.3.2 // indirect - github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect - github.com/jackc/pgtype v1.14.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/storage/go.sum b/extension/storage/go.sum index c21537ab0938..601cea84fadd 100644 --- a/extension/storage/go.sum +++ b/extension/storage/go.sum @@ -1,21 +1,16 @@ -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +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/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/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= -github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -23,259 +18,108 @@ 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/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/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -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/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= -github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= -github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= -github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= -github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= -github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= -github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= -github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= -github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= -github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= -github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= -github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= -github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= -github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc= -github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= -github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= -github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= -github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= -github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= -github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.2 h1:7eY55bdBeCz1F2fTzSz69QC+pG46jYq9/jtSPiJ5nn0= -github.com/jackc/pgproto3/v2 v2.3.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= -github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= -github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= -github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= -github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= -github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= -github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= -github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= -github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= -github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= -github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= -github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.18.1 h1:YP7G1KABtKpB5IHrO9vYwSrCOhs7p3uqhvhhQBptya0= -github.com/jackc/pgx/v4 v4.18.1/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE= -github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/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/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8= -github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI= -github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= -github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.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/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -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-20190813141303-74dc4d7220e7/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/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-20220520151302-bc2c85ada10a/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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.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-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 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/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= diff --git a/extension/storage/package_test.go b/extension/storage/package_test.go new file mode 100644 index 000000000000..e6ecebe791dc --- /dev/null +++ b/extension/storage/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package storage + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/storage/storagetest/extension.go b/extension/storage/storagetest/extension.go index 4815858cbab5..259b0a303891 100644 --- a/extension/storage/storagetest/extension.go +++ b/extension/storage/storagetest/extension.go @@ -11,7 +11,7 @@ import ( "go.opentelemetry.io/collector/extension/experimental/storage" ) -var testStorageType component.Type = "test_storage" +var testStorageType component.Type = component.MustNewType("test_storage") // TestStorage is an in memory storage extension designed for testing type TestStorage struct { @@ -54,7 +54,7 @@ func (s *TestStorage) GetClient(ctx context.Context, kind component.Kind, ent co return client, setCreatorID(ctx, client, s.ID) } -var nonStorageType component.Type = "non_storage" +var nonStorageType component.Type = component.MustNewType("non_storage") // NonStorage is useful for testing expected behaviors that involve // non-storage extensions diff --git a/extension/storage/storagetest/extension_test.go b/extension/storage/storagetest/extension_test.go index c2c445f21ef6..43a519f79f6a 100644 --- a/extension/storage/storagetest/extension_test.go +++ b/extension/storage/storagetest/extension_test.go @@ -36,7 +36,7 @@ func runExtensionLifecycle(t *testing.T, ext *TestStorage, expectPersistence boo ctx := context.Background() require.NoError(t, ext.Start(ctx, componenttest.NewNopHost())) - clientOne, err := ext.GetClient(ctx, component.KindProcessor, component.NewID("foo"), "client_one") + clientOne, err := ext.GetClient(ctx, component.KindProcessor, component.MustNewID("foo"), "client_one") require.NoError(t, err) creatorID, err := CreatorID(ctx, clientOne) @@ -65,7 +65,7 @@ func runExtensionLifecycle(t *testing.T, ext *TestStorage, expectPersistence boo require.NoError(t, clientOne.Close(ctx)) // Create new client to test persistence - clientTwo, err := ext.GetClient(ctx, component.KindProcessor, component.NewID("foo"), "client_one") + clientTwo, err := ext.GetClient(ctx, component.KindProcessor, component.MustNewID("foo"), "client_one") require.NoError(t, err) creatorID, err = CreatorID(ctx, clientTwo) diff --git a/extension/storage/storagetest/package_test.go b/extension/storage/storagetest/package_test.go new file mode 100644 index 000000000000..f8f1b14520e1 --- /dev/null +++ b/extension/storage/storagetest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package storagetest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + 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..302b3fb221a7 --- /dev/null +++ b/extension/sumologicextension/README.md @@ -0,0 +1,163 @@ +# Sumo Logic Extension + +| Status | | +| ------------- |-----------| +| Stability | [alpha] | +| Distributions | [] | +| 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) | + +[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha + + +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`) + - `sticky_session_enabled` - enable sticky session support (default: `false`) + +[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/api/error.go b/extension/sumologicextension/api/error.go new file mode 100644 index 000000000000..ae420b6a485c --- /dev/null +++ b/extension/sumologicextension/api/error.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package api // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/api" + +type ErrorResponsePayload struct { + ID string `json:"id"` + Errors []Error `json:"errors"` +} + +type Error struct { + Code string `json:"code"` + Message string `json:"message"` +} diff --git a/extension/sumologicextension/api/metadata.go b/extension/sumologicextension/api/metadata.go new file mode 100644 index 000000000000..87a16596c439 --- /dev/null +++ b/extension/sumologicextension/api/metadata.go @@ -0,0 +1,26 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package api // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/api" + +type OpenMetadataHostDetails struct { + Name string `json:"name"` + OsName string `json:"osName"` + OsVersion string `json:"osVersion"` + Environment string `json:"environment"` +} + +type OpenMetadataCollectorDetails struct { + RunningVersion string `json:"runningVersion"` +} + +type OpenMetadataNetworkDetails struct { + HostIPAddress string `json:"hostIpAddress"` +} + +type OpenMetadataRequestPayload struct { + HostDetails OpenMetadataHostDetails `json:"hostDetails"` + CollectorDetails OpenMetadataCollectorDetails `json:"collectorDetails"` + NetworkDetails OpenMetadataNetworkDetails `json:"networkDetails"` + TagDetails map[string]any `json:"tagDetails"` +} diff --git a/extension/sumologicextension/api/register.go b/extension/sumologicextension/api/register.go new file mode 100644 index 000000000000..005df63520d7 --- /dev/null +++ b/extension/sumologicextension/api/register.go @@ -0,0 +1,22 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package api // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/api" + +type OpenRegisterRequestPayload struct { + CollectorName string `json:"collectorName"` + Ephemeral bool `json:"ephemeral,omitempty"` + Description string `json:"description,omitempty"` + Hostname string `json:"hostname,omitempty"` + Category string `json:"category,omitempty"` + TimeZone string `json:"timeZone,omitempty"` + Clobber bool `json:"clobber,omitempty"` + Fields map[string]any `json:"fields,omitempty"` +} + +type OpenRegisterResponsePayload struct { + CollectorCredentialID string `json:"collectorCredentialID"` + CollectorCredentialKey string `json:"collectorCredentialKey"` + CollectorID string `json:"collectorId"` + CollectorName string `json:"collectorName"` +} diff --git a/extension/sumologicextension/config.go b/extension/sumologicextension/config.go new file mode 100644 index 000000000000..e1b231e2b971 --- /dev/null +++ b/extension/sumologicextension/config.go @@ -0,0 +1,99 @@ +// 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.ClientConfig `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"` + + // StickySessionEnabled defines if sticky session support is enable. + // By default this is false. + StickySessionEnabled bool `mapstructure:"sticky_session_enabled"` +} + +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/credentials/credentialsstore_localfs.go b/extension/sumologicextension/credentials/credentialsstore_localfs.go new file mode 100644 index 000000000000..4d6283681582 --- /dev/null +++ b/extension/sumologicextension/credentials/credentialsstore_localfs.go @@ -0,0 +1,257 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package credentials // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/credentials" + +import ( + "encoding/json" + "fmt" + "io" + "os" + "path" + + "go.uber.org/zap" +) + +const ( + DefaultCollectorDataDirectory = ".sumologic-otel-collector/" +) + +func GetDefaultCollectorCredentialsDirectory() (string, error) { + home, err := os.UserHomeDir() + if err != nil { + return "", err + } + + return path.Join(home, DefaultCollectorDataDirectory), nil +} + +// LocalFsStore implements Store interface and can be used to store and retrieve +// collector credentials from local file system. +// +// Files are stored locally in collectorCredentialsDirectory. +type LocalFsStore struct { + collectorCredentialsDirectory string + logger *zap.Logger +} + +type LocalFsStoreOpt func(*LocalFsStore) + +func WithLogger(l *zap.Logger) LocalFsStoreOpt { + return func(s *LocalFsStore) { + s.logger = l + } +} + +func WithCredentialsDirectory(dir string) LocalFsStoreOpt { + return func(s *LocalFsStore) { + s.collectorCredentialsDirectory = dir + } +} + +func NewLocalFsStore(opts ...LocalFsStoreOpt) (Store, error) { + defaultDir, err := GetDefaultCollectorCredentialsDirectory() + if err != nil { + return nil, err + } + + logger, err := zap.NewDevelopment() + if err != nil { + return nil, err + } + + store := LocalFsStore{ + collectorCredentialsDirectory: defaultDir, + logger: logger, + } + for _, opt := range opts { + opt(&store) + } + + return store, err +} + +// Check checks if collector credentials can be found under a name being a hash +// of provided key inside collectorCredentialsDirectory. +func (cr LocalFsStore) Check(key string) bool { + f := func(_ Hasher, key string) bool { + filenameHash, err := HashKeyToFilename(key) + if err != nil { + return false + } + path := path.Join(cr.collectorCredentialsDirectory, filenameHash) + if _, err := os.Stat(path); err != nil { + return false + } + return true + } + + return f(_getHasher(), key) +} + +// Get retrieves collector credentials stored in local file system and then +// decrypts it using a hash of provided key. +func (cr LocalFsStore) Get(key string) (CollectorCredentials, error) { + f := func(_ Hasher, key string) (CollectorCredentials, error) { + filenameHash, err := HashKeyToFilename(key) + if err != nil { + return CollectorCredentials{}, err + } + + path := path.Join(cr.collectorCredentialsDirectory, filenameHash) + creds, err := os.Open(path) + if err != nil { + return CollectorCredentials{}, err + } + defer creds.Close() + + encryptedCreds, err := io.ReadAll(creds) + if err != nil { + return CollectorCredentials{}, err + } + + encKey, err := HashKeyToEncryptionKey(key) + if err != nil { + return CollectorCredentials{}, err + } + + collectorCreds, err := decrypt(encryptedCreds, encKey) + if err != nil { + return CollectorCredentials{}, err + } + + var credentialsInfo CollectorCredentials + if err = json.Unmarshal(collectorCreds, &credentialsInfo); err != nil { + return CollectorCredentials{}, err + } + + cr.logger.Info("Collector registration credentials retrieved from local fs", + zap.String("path", path), + ) + + return credentialsInfo, nil + } + + creds, err := f(_getHasher(), key) + + if err != nil { + return CollectorCredentials{}, err + } + + return creds, nil +} + +// Store stores collector credentials in a file in directory as specified +// in CollectorCredentialsDirectory. +// The credentials are encrypted using the provided key. +func (cr LocalFsStore) Store(key string, creds CollectorCredentials) error { + if err := ensureDir(cr.collectorCredentialsDirectory); err != nil { + return err + } + + f := func(_ Hasher, key string, creds CollectorCredentials) error { + filenameHash, err := HashKeyToFilename(key) + if err != nil { + return err + } + path := path.Join(cr.collectorCredentialsDirectory, filenameHash) + collectorCreds, err := json.Marshal(creds) + if err != nil { + return fmt.Errorf("failed marshaling collector credentials: %w", err) + } + + encKey, err := HashKeyToEncryptionKey(key) + if err != nil { + return err + } + + encryptedCreds, err := encrypt(collectorCreds, encKey) + if err != nil { + return err + } + + if err = os.WriteFile(path, encryptedCreds, 0600); err != nil { + return fmt.Errorf("failed to save credentials file '%s': %w", + path, err, + ) + } + + cr.logger.Info("Collector registration credentials stored locally", + zap.String("path", path), + ) + + return nil + } + + err := f(_getHasher(), key, creds) + if err != nil { + return err + } + + return nil +} + +func (cr LocalFsStore) Delete(key string) error { + f := func(hasher Hasher, key string) error { + filenameHash, err := HashKeyToFilenameWith(hasher, key) + if err != nil { + return err + } + + path := path.Join(cr.collectorCredentialsDirectory, filenameHash) + + if _, err := os.Stat(path); err != nil { + return nil + } + if err := os.Remove(path); err != nil { + return fmt.Errorf("failed to remove credentials file '%s': %w", + path, err, + ) + } + + cr.logger.Debug("Collector registration credentials removed", + zap.String("path", path), + ) + + return nil + } + + err := f(_getHasher(), key) + if err != nil { + return err + } + + return nil +} + +// Validate checks if the store is operating correctly +// This mostly means file permissions and the like +func (cr LocalFsStore) Validate() error { + if err := ensureDir(cr.collectorCredentialsDirectory); err != nil { + return err + } + + return nil +} + +// ensureDir checks if the specified directory exists and has the right permissions +// if it doesn't then it tries to create it. +func ensureDir(path string) error { + fi, err := os.Stat(path) + if err != nil { + if err := os.Mkdir(path, 0700); err != nil { + return err + } + return nil + } + + // If the directory doesn't have the execution bit then + // set it so that we can 'exec' into it. + if fi.Mode().Perm() != 0700 { + if err := os.Chmod(path, 0700); err != nil { + return err + } + } + + return nil +} diff --git a/extension/sumologicextension/credentials/credentialsstore_localfs_test.go b/extension/sumologicextension/credentials/credentialsstore_localfs_test.go new file mode 100644 index 000000000000..c64599df7591 --- /dev/null +++ b/extension/sumologicextension/credentials/credentialsstore_localfs_test.go @@ -0,0 +1,87 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package credentials + +import ( + "io/fs" + "os" + "path/filepath" + "runtime" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/api" +) + +func TestCredentialsStoreLocalFs(t *testing.T) { + dir, err := os.MkdirTemp("", "otelcol-sumo-credentials-store-local-fs-test-*") + require.NoError(t, err) + t.Cleanup(func() { + os.RemoveAll(dir) + }) + + const key = "my_storage_key" + + creds := CollectorCredentials{ + CollectorName: "name", + Credentials: api.OpenRegisterResponsePayload{ + CollectorCredentialID: "credentialId", + CollectorCredentialKey: "credentialKey", + CollectorID: "id", + }, + } + + sut := LocalFsStore{ + collectorCredentialsDirectory: dir, + logger: zap.NewNop(), + } + + require.NoError(t, sut.Store(key, creds)) + + require.True(t, sut.Check(key)) + + actual, err := sut.Get(key) + require.NoError(t, err) + assert.Equal(t, creds, actual) + + require.NoError(t, sut.Delete(key)) + // Make sure the file got deleted and there is nothing in the credentials store dir. + var fileCounter int + require.NoError(t, + filepath.WalkDir(dir, + func(_ string, d fs.DirEntry, _ error) error { + if d.IsDir() { + return nil + } + fileCounter++ + return nil + }, + ), + ) + require.EqualValues(t, fileCounter, 0) +} + +func TestCredentialsStoreValidate(t *testing.T) { + var expectedFileMode fs.FileMode + dir := filepath.Join(t.TempDir(), "store") + if runtime.GOOS == "windows" { // on Windows, we get 0777 for writable directories + expectedFileMode = fs.FileMode(0777) + } else { + expectedFileMode = fs.FileMode(0700) + } + err := os.Mkdir(dir, 0400) + require.NoError(t, err) + + store, err := NewLocalFsStore(WithCredentialsDirectory(dir), WithLogger(zap.NewNop())) + require.NoError(t, err) + err = store.Validate() + require.NoError(t, err) + + stat, err := os.Stat(dir) + require.NoError(t, err) + require.Equal(t, expectedFileMode.Perm(), stat.Mode().Perm()) +} diff --git a/extension/sumologicextension/credentials/encrypt.go b/extension/sumologicextension/credentials/encrypt.go new file mode 100644 index 000000000000..986e1aa8a094 --- /dev/null +++ b/extension/sumologicextension/credentials/encrypt.go @@ -0,0 +1,124 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package credentials // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/credentials" + +import ( + "crypto/aes" + "crypto/cipher" + "crypto/rand" + "crypto/sha256" + "encoding/hex" + "fmt" + "io" +) + +func _getHasher() Hasher { + return sha256.New() +} + +const ( + filenamePrefix = "filename" + encryptionKeyPrefix = "encryption" +) + +type Hasher interface { + Write(p []byte) (n int, err error) + Sum(b []byte) []byte +} + +func hashWith(hasher Hasher, key []byte) (string, error) { + if _, err := hasher.Write(key); err != nil { + return "", err + } + return hex.EncodeToString(hasher.Sum(nil)), nil +} + +// HashKeyToFilename creates a filename using the default hasher and provided key +// as input. It returns this filename and an error. +func HashKeyToFilename(key string) (string, error) { + return HashKeyToFilenameWith(_getHasher(), key) +} + +// HashKeyToFilenameWith creates a filename using the provided key as input and +// using the provided hasher. +func HashKeyToFilenameWith(hasher Hasher, key string) (string, error) { + return hashWith(hasher, []byte(filenamePrefix+key)) +} + +// HashKeyToEncryptionKey creates an encryption key using a default hasher. +// It returns the created key and an error. +func HashKeyToEncryptionKey(key string) ([]byte, error) { + return HashKeyToEncryptionKeyWith(_getHasher(), key) +} + +// HashKeyToEncryptionKeyWith creates a 32 bytes long key from the provided +// key using the provided hasher. +func HashKeyToEncryptionKeyWith(hasher Hasher, key string) ([]byte, error) { + h, err := hashWith(hasher, []byte(encryptionKeyPrefix+key)) + if err != nil { + return nil, err + } + b := []byte(h) + return b[:32], nil +} + +// encrypt encrypts provided byte slice with AES using the encryption key. +func encrypt(data []byte, encryptionKey []byte) ([]byte, error) { + f := func(_ Hasher, data []byte, encryptionKey []byte) ([]byte, error) { + block, err := aes.NewCipher(encryptionKey) + if err != nil { + return nil, err + } + gcm, err := cipher.NewGCM(block) + if err != nil { + return nil, err + } + nonce := make([]byte, gcm.NonceSize()) + if _, err = io.ReadFull(rand.Reader, nonce); err != nil { + return nil, err + } + ciphertext := gcm.Seal(nonce, nonce, data, nil) + return ciphertext, nil + } + + ret, err := f(_getHasher(), data, encryptionKey) + + if err != nil { + return ret, err + } + + return ret, nil +} + +// decrypt decrypts provided byte slice with AES using the encryptionKey. +func decrypt(data []byte, encryptionKey []byte) ([]byte, error) { + f := func(_ Hasher, data []byte, encryptionKey []byte) ([]byte, error) { + block, err := aes.NewCipher(encryptionKey) + if err != nil { + return nil, fmt.Errorf("unable tocreate new aes cipher: %w", err) + } + gcm, err := cipher.NewGCM(block) + if err != nil { + return nil, fmt.Errorf("unable to create new cipher gcm: %w", err) + } + nonceSize := gcm.NonceSize() + if nonceSize > len(data) { + return nil, fmt.Errorf("unable to decrypt credentials") + } + nonce, ciphertext := data[:nonceSize], data[nonceSize:] + plaintext, err := gcm.Open(nil, nonce, ciphertext, nil) + if err != nil { + return nil, fmt.Errorf("unable to decrypt: %w", err) + } + return plaintext, nil + } + + ret, err := f(_getHasher(), data, encryptionKey) + + if err != nil { + return ret, err + } + + return ret, nil +} diff --git a/extension/sumologicextension/credentials/store.go b/extension/sumologicextension/credentials/store.go new file mode 100644 index 000000000000..738cd9a9bb7e --- /dev/null +++ b/extension/sumologicextension/credentials/store.go @@ -0,0 +1,43 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package credentials // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/credentials" + +import ( + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/api" +) + +// CollectorCredentials are used for storing the credentials received during +// collector registration. +type CollectorCredentials struct { + // CollectorName indicates what name was set in the configuration when + // registration has been made. + CollectorName string `json:"collectorName"` + Credentials api.OpenRegisterResponsePayload `json:"collectorCredentials"` + // APIBaseURL saves the destination API base URL which was used for registration. + // This is used for instance when the API redirects the collector to a different + // deployment due to the fact that the installation token being used for registration + // belongs to a different deployment. + // In order to make collector registration work, we save the destination + // API base URL so that when the collector starts up again it can use this + // API base URL for communication with the backend. + APIBaseURL string `json:"apiBaseUrl"` +} + +// Store is an interface to get collector authentication data +type Store interface { + // Check checks if collector credentials exist under the specified key. + Check(key string) bool + + // Get returns the collector credentials stored under a specified key. + Get(key string) (CollectorCredentials, error) + + // Store stores the provided collector credentials stored under a specified key. + Store(key string, creds CollectorCredentials) error + + // Delete deletes collector credentials stored under the specified key. + Delete(key string) error + + // Validate checks if the store is operating correctly + Validate() error +} diff --git a/extension/sumologicextension/extension.go b/extension/sumologicextension/extension.go new file mode 100644 index 000000000000..353a47f8a59a --- /dev/null +++ b/extension/sumologicextension/extension.go @@ -0,0 +1,1052 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sumologicextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension" + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "errors" + "fmt" + "io" + "net" + "net/http" + "net/url" + "os" + "strings" + "sync" + "time" + + "github.com/Showmax/go-fqdn" + "github.com/cenkalti/backoff/v4" + ps "github.com/mitchellh/go-ps" + "github.com/shirou/gopsutil/v3/host" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/extension/auth" + "go.opentelemetry.io/collector/featuregate" + "go.uber.org/zap" + grpccredentials "google.golang.org/grpc/credentials" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/api" + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/credentials" +) + +type SumologicExtension struct { + collectorName string + buildVersion string + + // The lock around baseURL is needed because sumologicexporter is using + // it as base URL for API requests and this access has to be coordinated. + baseURLLock sync.RWMutex + baseURL string + + credsNotifyLock sync.Mutex + credsNotifyUpdate chan struct{} + + host component.Host + conf *Config + origLogger *zap.Logger + logger *zap.Logger + credentialsStore credentials.Store + hashKey string + httpClient *http.Client + registrationInfo api.OpenRegisterResponsePayload + updateMetadata bool + + stickySessionCookieLock sync.RWMutex + stickySessionCookie string + + closeChan chan struct{} + closeOnce sync.Once + backOff *backoff.ExponentialBackOff + id component.ID +} + +const ( + heartbeatURL = "/api/v1/collector/heartbeat" + metadataURL = "/api/v1/otCollectors/metadata" + registerURL = "/api/v1/collector/register" + + collectorIDField = "collector_id" + collectorNameField = "collector_name" + collectorCredentialIDField = "collector_credential_id" + + stickySessionKey = "AWSALB" +) + +const ( + updateCollectorMetadataID = "extension.sumologic.updateCollectorMetadata" + updateCollectorMetadataStage = featuregate.StageAlpha + + DefaultHeartbeatInterval = 15 * time.Second +) + +var updateCollectorMetadataFeatureGate *featuregate.Gate + +func init() { + updateCollectorMetadataFeatureGate = featuregate.GlobalRegistry().MustRegister( + updateCollectorMetadataID, + updateCollectorMetadataStage, + featuregate.WithRegisterDescription("When enabled, the collector will update its Sumo Logic metadata on startup."), + featuregate.WithRegisterReferenceURL("https://github.com/SumoLogic/sumologic-otel-collector/pull/858"), + ) +} + +var errGRPCNotSupported = fmt.Errorf("gRPC is not supported by sumologicextension") + +// SumologicExtension implements ClientAuthenticator +var _ auth.Client = (*SumologicExtension)(nil) + +func newSumologicExtension(conf *Config, logger *zap.Logger, id component.ID, buildVersion string) (*SumologicExtension, error) { + if conf.Credentials.InstallationToken == "" { + return nil, errors.New("access credentials not provided: need installation_token") + } + + hostname, err := getHostname(logger) + if err != nil { + return nil, err + } + + credentialsStore, err := credentials.NewLocalFsStore( + credentials.WithCredentialsDirectory(conf.CollectorCredentialsDirectory), + credentials.WithLogger(logger), + ) + if err != nil { + return nil, fmt.Errorf("failed to initialize credentials store: %w", err) + } + + var ( + collectorName string + hashKey = createHashKey(conf) + ) + if conf.CollectorName == "" { + // If collector name is not set by the user, check if the collector was restarted + // and that we can reuse collector name save in credentials store. + if creds, err := credentialsStore.Get(hashKey); err != nil { + // If credentials file is not stored on filesystem generate collector name + collectorName = hostname + } else { + collectorName = creds.CollectorName + } + } else { + collectorName = conf.CollectorName + } + + if conf.HeartBeatInterval <= 0 { + conf.HeartBeatInterval = DefaultHeartbeatInterval + } + + // Prepare ExponentialBackoff + backOff := backoff.NewExponentialBackOff() + backOff.InitialInterval = conf.BackOff.InitialInterval + backOff.MaxElapsedTime = conf.BackOff.MaxElapsedTime + backOff.MaxInterval = conf.BackOff.MaxInterval + + return &SumologicExtension{ + collectorName: collectorName, + buildVersion: buildVersion, + baseURL: strings.TrimSuffix(conf.APIBaseURL, "/"), + credsNotifyUpdate: make(chan struct{}), + conf: conf, + origLogger: logger, + logger: logger, + hashKey: hashKey, + credentialsStore: credentialsStore, + updateMetadata: updateCollectorMetadataFeatureGate.IsEnabled(), + closeChan: make(chan struct{}), + backOff: backOff, + id: id, + }, nil +} + +func createHashKey(conf *Config) string { + return fmt.Sprintf("%s%s%s", + conf.CollectorName, + conf.Credentials.InstallationToken, + strings.TrimSuffix(conf.APIBaseURL, "/"), + ) +} + +func (se *SumologicExtension) Start(ctx context.Context, host component.Host) error { + var err error + se.host = host + + // if force registration is not enabled, verify that the store is correctly configured + if !se.conf.ForceRegistration { + err = se.credentialsStore.Validate() + if err != nil { + return err + } + } + + colCreds, err := se.getCredentials(ctx) + if err != nil { + return err + } + + if err = se.injectCredentials(ctx, colCreds); err != nil { + return err + } + + // Add logger fields based on actual collector name and ID. + se.logger = se.origLogger.With( + zap.String(collectorNameField, colCreds.Credentials.CollectorName), + zap.String(collectorIDField, colCreds.Credentials.CollectorID), + ) + + if se.updateMetadata { + err = se.updateMetadataWithBackoff(ctx) + if err != nil { + return err + } + } + + go se.heartbeatLoop() + + return nil +} + +// Shutdown is invoked during service shutdown. +func (se *SumologicExtension) Shutdown(ctx context.Context) error { + se.closeOnce.Do(func() { close(se.closeChan) }) + select { + case <-ctx.Done(): + return ctx.Err() + default: + return nil + } +} + +func (se *SumologicExtension) validateCredentials( + ctx context.Context, + colCreds credentials.CollectorCredentials, +) error { + se.logger.Info("Validating collector credentials...", + zap.String(collectorCredentialIDField, colCreds.Credentials.CollectorCredentialID), + zap.String(collectorIDField, colCreds.Credentials.CollectorID), + ) + + if err := se.injectCredentials(ctx, colCreds); err != nil { + return err + } + + se.backOff.Reset() + var err error + + for { + err = se.sendHeartbeatWithHTTPClient(ctx, se.httpClient) + + if errors.Is(err, errUnauthorizedHeartbeat) || err == nil { + return err + } + + nbo := se.backOff.NextBackOff() + var backOffErr *backoff.PermanentError + // Return error if backoff reaches the limit or uncoverable error is spotted + if ok := errors.As(err, &backOffErr); nbo == se.backOff.Stop || ok { + return err + } + + se.logger.Info(fmt.Sprintf("Retrying credentials validation due to error %s", err)) + + t := time.NewTimer(nbo) + defer t.Stop() + + select { + case <-t.C: + case <-ctx.Done(): + return fmt.Errorf("credential validation cancelled: %w", ctx.Err()) + } + } +} + +// injectCredentials injects the collector credentials: +// - into registration info that's stored in the extension and can be used by roundTripper +// - into http client and its transport so that each request is using collector +// credentials as authentication keys +func (se *SumologicExtension) injectCredentials(ctx context.Context, colCreds credentials.CollectorCredentials) error { + se.credsNotifyLock.Lock() + defer se.credsNotifyLock.Unlock() + + // Set the registration info so that it can be used in RoundTripper. + se.registrationInfo = colCreds.Credentials + + httpClient, err := se.getHTTPClient(ctx, se.conf.ClientConfig, colCreds.Credentials) + if err != nil { + return err + } + + se.httpClient = httpClient + + // Let components know that the credentials may have changed. + close(se.credsNotifyUpdate) + se.credsNotifyUpdate = make(chan struct{}) + + return nil +} + +func (se *SumologicExtension) getHTTPClient( + ctx context.Context, + httpClientSettings confighttp.ClientConfig, + _ api.OpenRegisterResponsePayload, +) (*http.Client, error) { + httpClient, err := httpClientSettings.ToClientContext( + ctx, + se.host, + component.TelemetrySettings{}, + ) + if err != nil { + return nil, fmt.Errorf("couldn't create HTTP client: %w", err) + } + + // Set the transport so that all requests from httpClient will contain + // the collector credentials. + httpClient.Transport, err = se.RoundTripper(httpClient.Transport) + if err != nil { + return nil, fmt.Errorf("couldn't create HTTP client transport: %w", err) + } + + return httpClient, nil +} + +// getCredentials retrieves the credentials for the collector. +// It does so by checking the local credentials store and by validating those credentials. +// In case they are invalid or are not available through local credentials store +// then it tries to register the collector using the provided access keys. +func (se *SumologicExtension) getCredentials(ctx context.Context) (credentials.CollectorCredentials, error) { + var ( + colCreds credentials.CollectorCredentials + err error + ) + + if !se.conf.ForceRegistration { + colCreds, err = se.getLocalCredentials(ctx) + if err == nil { + errV := se.validateCredentials(ctx, colCreds) + + if errV == nil { + se.logger.Info("Found stored credentials, skipping registration", + zap.String(collectorNameField, colCreds.Credentials.CollectorName), + ) + return colCreds, nil + } + + // We are unable to confirm if credentials are valid or not as we do not have (clear) response from the API + if !errors.Is(errV, errUnauthorizedHeartbeat) { + return credentials.CollectorCredentials{}, errV + } + + // Credentials might have ended up being invalid or the collector + // might have been removed in Sumo. + // Fall back to removing the credentials and recreating them by registering + // the collector. + if err = se.credentialsStore.Delete(se.hashKey); err != nil { + se.logger.Error( + "Unable to delete old collector credentials", zap.Error(err), + ) + } + + se.logger.Info("Locally stored credentials invalid. Trying to re-register...", + zap.String(collectorNameField, colCreds.Credentials.CollectorName), + zap.String(collectorIDField, colCreds.Credentials.CollectorID), + zap.Error(errV), + ) + } else { + se.logger.Info("Locally stored credentials not found, registering the collector") + } + } + + colCreds, err = se.getCredentialsByRegistering(ctx) + if err != nil { + return credentials.CollectorCredentials{}, err + } + + return colCreds, nil +} + +// getCredentialsByRegistering registers the collector and returns the credentials +// obtained from the API. +func (se *SumologicExtension) getCredentialsByRegistering(ctx context.Context) (credentials.CollectorCredentials, error) { + colCreds, err := se.registerCollectorWithBackoff(ctx, se.collectorName) + if err != nil { + return credentials.CollectorCredentials{}, err + } + if err := se.credentialsStore.Store(se.hashKey, colCreds); err != nil { + se.logger.Error( + "Unable to store collector credentials, they will be used now but won't be re-used on next run", + zap.Error(err), + ) + } + + se.collectorName = colCreds.CollectorName + + return colCreds, nil +} + +// getLocalCredentials returns the credentials retrieved from local credentials +// storage in case they are available there. +func (se *SumologicExtension) getLocalCredentials(_ context.Context) (credentials.CollectorCredentials, error) { + colCreds, err := se.credentialsStore.Get(se.hashKey) + if err != nil { + return credentials.CollectorCredentials{}, + fmt.Errorf("problem finding local collector credentials (hash key: %s): %w", + se.hashKey, err, + ) + } + + se.collectorName = colCreds.CollectorName + if colCreds.APIBaseURL != "" { + se.SetBaseURL(colCreds.APIBaseURL) + } + + return colCreds, nil +} + +// registerCollector registers the collector using registration API and returns +// the obtained collector credentials. +func (se *SumologicExtension) registerCollector(ctx context.Context, collectorName string) (credentials.CollectorCredentials, error) { + u, err := url.Parse(se.BaseURL()) + if err != nil { + return credentials.CollectorCredentials{}, err + } + u.Path = registerURL + + hostname, err := getHostname(se.logger) + if err != nil { + return credentials.CollectorCredentials{}, fmt.Errorf("cannot get hostname: %w", err) + } + + var buff bytes.Buffer + if err = json.NewEncoder(&buff).Encode(api.OpenRegisterRequestPayload{ + CollectorName: collectorName, + Description: se.conf.CollectorDescription, + Category: se.conf.CollectorCategory, + Fields: se.conf.CollectorFields, + Hostname: hostname, + Ephemeral: se.conf.Ephemeral, + Clobber: se.conf.Clobber, + TimeZone: se.conf.TimeZone, + }); err != nil { + return credentials.CollectorCredentials{}, err + } + + req, err := http.NewRequestWithContext(ctx, http.MethodPost, u.String(), &buff) + if err != nil { + return credentials.CollectorCredentials{}, err + } + + addClientCredentials(req, + se.conf.Credentials, + ) + addJSONHeaders(req) + + se.logger.Info("Calling register API", zap.String("URL", u.String())) + + client := *http.DefaultClient + client.CheckRedirect = func(_ *http.Request, _ []*http.Request) error { + return http.ErrUseLastResponse + } + res, err := client.Do(req) + if err != nil { + se.logger.Warn("Collector registration HTTP request failed", zap.Error(err)) + return credentials.CollectorCredentials{}, fmt.Errorf("failed to register the collector: %w", err) + } + + defer res.Body.Close() + + if res.StatusCode < 200 || res.StatusCode >= 400 { + return se.handleRegistrationError(res) + } else if res.StatusCode == 301 { + // Use the URL from Location header for subsequent requests. + u := strings.TrimSuffix(res.Header.Get("Location"), "/") + se.SetBaseURL(u) + se.logger.Info("Redirected to a different deployment", + zap.String("url", u), + ) + return se.registerCollector(ctx, collectorName) + } + + var resp api.OpenRegisterResponsePayload + if err := json.NewDecoder(res.Body).Decode(&resp); err != nil { + return credentials.CollectorCredentials{}, err + } + + if collectorName != resp.CollectorName { + se.logger.Warn("Collector name already in use, registered modified name", zap.String("registered_name", resp.CollectorName)) + } + + return credentials.CollectorCredentials{ + CollectorName: collectorName, + Credentials: resp, + APIBaseURL: se.BaseURL(), + }, nil +} + +// handleRegistrationError handles the collector registration errors and returns +// appropriate error for backoff handling and logging purposes. +func (se *SumologicExtension) handleRegistrationError(res *http.Response) (credentials.CollectorCredentials, error) { + var errResponse api.ErrorResponsePayload + if err := json.NewDecoder(res.Body).Decode(&errResponse); err != nil { + var buff bytes.Buffer + if _, errCopy := io.Copy(&buff, res.Body); errCopy != nil { + return credentials.CollectorCredentials{}, fmt.Errorf( + "failed to read the collector registration response body, status code: %d, err: %w", + res.StatusCode, errCopy, + ) + } + return credentials.CollectorCredentials{}, fmt.Errorf( + "failed to decode collector registration response body: %s, status code: %d, err: %w", + buff.String(), res.StatusCode, err, + ) + } + + se.logger.Warn("Collector registration failed", + zap.Int("status_code", res.StatusCode), + zap.String("error_id", errResponse.ID), + zap.Any("errors", errResponse.Errors), + ) + + // Return unrecoverable error for 4xx status codes except 429 + if res.StatusCode >= 400 && res.StatusCode < 500 && res.StatusCode != 429 { + return credentials.CollectorCredentials{}, backoff.Permanent(fmt.Errorf( + "failed to register the collector, got HTTP status code: %d", + res.StatusCode, + )) + } + + return credentials.CollectorCredentials{}, fmt.Errorf( + "failed to register the collector, got HTTP status code: %d", res.StatusCode, + ) +} + +// callRegisterWithBackoff calls registration using exponential backoff algorithm +// this loosely base on backoff.Retry function +func (se *SumologicExtension) registerCollectorWithBackoff(ctx context.Context, collectorName string) (credentials.CollectorCredentials, error) { + se.backOff.Reset() + for { + creds, err := se.registerCollector(ctx, collectorName) + if err == nil { + se.logger = se.origLogger.With( + zap.String(collectorNameField, creds.Credentials.CollectorName), + zap.String(collectorIDField, creds.Credentials.CollectorID), + ) + se.logger.Info("Collector registration finished successfully") + + return creds, nil + } + + nbo := se.backOff.NextBackOff() + var backOffErr *backoff.PermanentError + // Return error if backoff reaches the limit or uncoverable error is spotted + if ok := errors.As(err, &backOffErr); nbo == se.backOff.Stop || ok { + return credentials.CollectorCredentials{}, fmt.Errorf("collector registration failed: %w", err) + } + + t := time.NewTimer(nbo) + defer t.Stop() + + select { + case <-t.C: + case <-ctx.Done(): + return credentials.CollectorCredentials{}, fmt.Errorf("collector registration cancelled: %w", ctx.Err()) + } + } +} + +func (se *SumologicExtension) heartbeatLoop() { + if se.registrationInfo.CollectorCredentialID == "" || se.registrationInfo.CollectorCredentialKey == "" { + se.logger.Error("Collector not registered, cannot send heartbeat") + return + } + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + go func() { + // When the close channel is closed ... + <-se.closeChan + // ... cancel the ongoing heartbeat request. + cancel() + }() + + se.logger.Info("Heartbeat loop initialized. Starting to send hearbeat requests") + timer := time.NewTimer(se.conf.HeartBeatInterval) + for { + select { + case <-se.closeChan: + se.logger.Info("Heartbeat sender turned off") + return + + default: + err := se.sendHeartbeatWithHTTPClient(ctx, se.httpClient) + + if err != nil { + if errors.Is(err, errUnauthorizedHeartbeat) { + se.logger.Warn("Heartbeat request unauthorized, re-registering the collector") + var colCreds credentials.CollectorCredentials + colCreds, err = se.getCredentialsByRegistering(ctx) + if err != nil { + se.logger.Error("Heartbeat error, cannot register the collector", zap.Error(err)) + continue + } + + // Inject newly received credentials into extension's configuration. + if err = se.injectCredentials(ctx, colCreds); err != nil { + se.logger.Error("Heartbeat error, cannot inject new collector credentials", zap.Error(err)) + continue + } + + // Overwrite old logger fields with new collector name and ID. + se.logger = se.origLogger.With( + zap.String(collectorNameField, colCreds.Credentials.CollectorName), + zap.String(collectorIDField, colCreds.Credentials.CollectorID), + ) + + } else { + se.logger.Error("Heartbeat error", zap.Error(err)) + } + } else { + se.logger.Debug("Heartbeat sent") + } + + select { + case <-timer.C: + timer.Stop() + timer.Reset(se.conf.HeartBeatInterval) + case <-se.closeChan: + } + + } + } +} + +var errUnauthorizedHeartbeat = errors.New("heartbeat unauthorized") +var errUnauthorizedMetadata = errors.New("metadata update unauthorized") + +type ErrorAPI struct { + status int + body string +} + +func (e ErrorAPI) Error() string { + return fmt.Sprintf("API error (status code: %d): %s", e.status, e.body) +} + +func (se *SumologicExtension) sendHeartbeatWithHTTPClient(ctx context.Context, httpClient *http.Client) error { + u, err := url.Parse(se.BaseURL() + heartbeatURL) + if err != nil { + return fmt.Errorf("unable to parse heartbeat URL %w", err) + } + req, err := http.NewRequestWithContext(ctx, http.MethodPost, u.String(), nil) + if err != nil { + return fmt.Errorf("unable to create HTTP request %w", err) + } + + addJSONHeaders(req) + res, err := httpClient.Do(req) + if err != nil { + return fmt.Errorf("unable to send HTTP request: %w", err) + } + defer res.Body.Close() + + switch res.StatusCode { + default: + var buff bytes.Buffer + + if _, err := io.Copy(&buff, res.Body); err != nil { + return fmt.Errorf( + "failed to copy collector heartbeat response body, status code: %d, err: %w", + res.StatusCode, err, + ) + } + + return fmt.Errorf("collector heartbeat request failed: %w", + ErrorAPI{ + status: res.StatusCode, + body: buff.String(), + }, + ) + + case http.StatusUnauthorized: + return errUnauthorizedHeartbeat + + case http.StatusNoContent: + } + + return nil +} + +func baseURL() (string, error) { + // This doesn't connect, we just need the connection object. + c, err := net.Dial("udp", "255.255.255.255:53") + if err != nil { + return "", err + } + + defer c.Close() + a := c.LocalAddr().(*net.UDPAddr) + h, _, err := net.SplitHostPort(a.String()) + if err != nil { + return "", err + } + + return h, nil +} + +var sumoAppProcesses = map[string]string{ + "apache": "apache", + "apache2": "apache", + "httpd": "apache", + "docker": "docker", + "elasticsearch": "elasticsearch", + "mysql-server": "mysql", + "mysqld": "mysql", + "nginx": "nginx", + "postgresql": "postgres", + "postgresql-9.5": "postgres", + "rabbitmq-server": "rabbitmq", + "redis": "redis", + "tomcat": "tomcat", + "kafka-server-start.sh": "kafka", // Need to test this, most common shell wrapper. +} + +func filteredProcessList() ([]string, error) { + var pl []string + + p, err := ps.Processes() + if err != nil { + return pl, err + } + + for _, v := range p { + e := strings.ToLower(v.Executable()) + if a, i := sumoAppProcesses[e]; i { + pl = append(pl, a) + } + } + + return pl, nil +} + +func discoverTags() (map[string]any, error) { + t := map[string]any{ + "sumo.disco.enabled": "true", + } + + pl, err := filteredProcessList() + if err != nil { + return t, err + } + + for _, v := range pl { + t["sumo.disco."+v] = 1 // Sumo does not allow empty tag values, let's set it to anything. + } + + return t, nil +} + +func (se *SumologicExtension) updateMetadataWithHTTPClient(ctx context.Context, httpClient *http.Client) error { + u, err := url.Parse(se.BaseURL() + metadataURL) + if err != nil { + return fmt.Errorf("unable to parse metadata URL %w", err) + } + + info, err := host.Info() + if err != nil { + return err + } + + hostname, err := getHostname(se.logger) + if err != nil { + return err + } + + ip, err := baseURL() + if err != nil { + return err + } + + td := map[string]any{} + + if se.conf.DiscoverCollectorTags { + td, err = discoverTags() + if err != nil { + return err + } + } + + for k, v := range se.conf.CollectorFields { + td[k] = v + } + + var buff bytes.Buffer + if err = json.NewEncoder(&buff).Encode(api.OpenMetadataRequestPayload{ + HostDetails: api.OpenMetadataHostDetails{ + Name: hostname, + OsName: info.OS, + OsVersion: info.PlatformVersion, + Environment: se.conf.CollectorEnvironment, + }, + CollectorDetails: api.OpenMetadataCollectorDetails{ + RunningVersion: se.buildVersion, + }, + NetworkDetails: api.OpenMetadataNetworkDetails{ + HostIPAddress: ip, + }, + TagDetails: td, + }); err != nil { + return err + } + + req, err := http.NewRequestWithContext(ctx, http.MethodPost, u.String(), &buff) + if err != nil { + return fmt.Errorf("unable to create HTTP request %w", err) + } + + addJSONHeaders(req) + + se.logger.Info("Updating collector metadata", + zap.String("URL", u.String()), + zap.String("body", buff.String())) + + res, err := httpClient.Do(req) + if err != nil { + return fmt.Errorf("unable to send HTTP request: %w", err) + } + defer res.Body.Close() + + switch res.StatusCode { + default: + var buff bytes.Buffer + if _, err := io.Copy(&buff, res.Body); err != nil { + return fmt.Errorf( + "failed to copy collector metadata response body, status code: %d, err: %w", + res.StatusCode, err, + ) + } + + se.logger.Warn("Metadata API error response", + zap.Int("status", res.StatusCode), + zap.String("body", buff.String())) + + return fmt.Errorf("collector metadata request failed: %w", + ErrorAPI{ + status: res.StatusCode, + body: buff.String(), + }, + ) + + case http.StatusUnauthorized: + return errUnauthorizedMetadata + case http.StatusNoContent: + case http.StatusOK: + } + + return nil +} + +func (se *SumologicExtension) updateMetadataWithBackoff(ctx context.Context) error { + se.backOff.Reset() + for { + err := se.updateMetadataWithHTTPClient(ctx, se.httpClient) + if err == nil { + return nil + } + + se.logger.Warn(fmt.Sprintf("collector metadata update failed: %s", err)) + + nbo := se.backOff.NextBackOff() + var backOffErr *backoff.PermanentError + // Return error if backoff reaches the limit or uncoverable error is spotted + if ok := errors.As(err, &backOffErr); nbo == se.backOff.Stop || ok { + return fmt.Errorf("collector metadata update failed: %w", err) + } + + t := time.NewTimer(nbo) + defer t.Stop() + + select { + case <-t.C: + case <-ctx.Done(): + return fmt.Errorf("collector metadata update cancelled: %w", ctx.Err()) + } + } +} + +func (se *SumologicExtension) ComponentID() component.ID { + return se.id +} + +func (se *SumologicExtension) CollectorID() string { + return se.registrationInfo.CollectorID +} + +func (se *SumologicExtension) BaseURL() string { + se.baseURLLock.RLock() + defer se.baseURLLock.RUnlock() + return se.baseURL +} + +func (se *SumologicExtension) SetBaseURL(baseURL string) { + se.baseURLLock.Lock() + se.baseURL = baseURL + se.baseURLLock.Unlock() +} + +func (se *SumologicExtension) StickySessionCookie() string { + se.stickySessionCookieLock.RLock() + defer se.stickySessionCookieLock.RUnlock() + return se.stickySessionCookie +} + +func (se *SumologicExtension) SetStickySessionCookie(stickySessionCookie string) { + se.stickySessionCookieLock.Lock() + se.stickySessionCookie = stickySessionCookie + se.stickySessionCookieLock.Unlock() +} + +// WatchCredentialKey watches for credential key updates. It makes use of a +// channel close (done by injectCredentials) and string comparison with a +// known/previous credential key (old). This function allows components to be +// proactive when dealing with changes to authentication. +func (se *SumologicExtension) WatchCredentialKey(ctx context.Context, old string) string { + se.credsNotifyLock.Lock() + v, ch := se.registrationInfo.CollectorCredentialKey, se.credsNotifyUpdate + se.credsNotifyLock.Unlock() + + for v == old { + select { + case <-ctx.Done(): + return v + case <-ch: + se.credsNotifyLock.Lock() + v, ch = se.registrationInfo.CollectorCredentialKey, se.credsNotifyUpdate + se.credsNotifyLock.Unlock() + } + } + + return v +} + +// CreateCredentialsHeader produces an HTTP header containing authentication +// credentials. This function is for components that do not make use of the +// RoundTripper or have an HTTP request to build upon. +func (se *SumologicExtension) CreateCredentialsHeader() (http.Header, error) { + id, key := se.registrationInfo.CollectorCredentialID, se.registrationInfo.CollectorCredentialKey + + if id == "" || key == "" { + return nil, errors.New("collector credentials are not set") + } + + token := base64.StdEncoding.EncodeToString( + []byte(id + ":" + key), + ) + + header := http.Header{} + header.Set("Authorization", "Basic "+token) + + return header, nil +} + +// Implement [1] in order for this extension to be used as custom exporter +// authenticator. +// +// [1]: https://github.com/open-telemetry/opentelemetry-collector/blob/2e84285efc665798d76773b9901727e8836e9d8f/config/configauth/clientauth.go#L34-L39 +func (se *SumologicExtension) RoundTripper(base http.RoundTripper) (http.RoundTripper, error) { + return roundTripper{ + collectorCredentialID: se.registrationInfo.CollectorCredentialID, + collectorCredentialKey: se.registrationInfo.CollectorCredentialKey, + addStickySessionCookie: se.addStickySessionCookie, + updateStickySessionCookie: se.updateStickySessionCookie, + base: base, + }, nil +} + +func (se *SumologicExtension) PerRPCCredentials() (grpccredentials.PerRPCCredentials, error) { + return nil, errGRPCNotSupported +} + +func (se *SumologicExtension) addStickySessionCookie(req *http.Request) { + if !se.conf.StickySessionEnabled { + return + } + currectCookieValue := se.StickySessionCookie() + if currectCookieValue != "" { + cookie := &http.Cookie{ + Name: stickySessionKey, + Value: currectCookieValue, + } + req.AddCookie(cookie) + } +} + +func (se *SumologicExtension) updateStickySessionCookie(resp *http.Response) { + cookies := resp.Cookies() + if se.conf.StickySessionEnabled && len(cookies) > 0 { + for _, cookie := range cookies { + if cookie.Name == stickySessionKey { + if cookie.Value != se.StickySessionCookie() { + se.SetStickySessionCookie(cookie.Value) + } + return + } + } + } +} + +type roundTripper struct { + collectorCredentialID string + collectorCredentialKey string + addStickySessionCookie func(*http.Request) + updateStickySessionCookie func(*http.Response) + base http.RoundTripper +} + +func (rt roundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + addCollectorCredentials(req, rt.collectorCredentialID, rt.collectorCredentialKey) + rt.addStickySessionCookie(req) + resp, err := rt.base.RoundTrip(req) + if err != nil { + return nil, err + } + rt.updateStickySessionCookie(resp) + return resp, err +} + +func addCollectorCredentials(req *http.Request, collectorCredentialID string, collectorCredentialKey string) { + token := base64.StdEncoding.EncodeToString( + []byte(collectorCredentialID + ":" + collectorCredentialKey), + ) + + // Delete the existing Authorization header so prevent sending both the old one + // and the new one. + req.Header.Del("Authorization") + req.Header.Add("Authorization", "Basic "+token) +} + +func addClientCredentials(req *http.Request, credentials accessCredentials) { + var authHeaderValue string + if credentials.InstallationToken != "" { + authHeaderValue = fmt.Sprintf("Bearer %s", string(credentials.InstallationToken)) + } + + req.Header.Del("Authorization") + req.Header.Add("Authorization", authHeaderValue) +} + +// TODO(ck): hostname allows the darwin tests to bypass fqdn. +var hostname = fqdn.FqdnHostname + +// getHostname returns the host name consistently with the resource detection processor's defaults +// TODO: try to dynamically extract this from the resource processor in the pipeline +func getHostname(logger *zap.Logger) (string, error) { + fqdnHostname, err := hostname() + if err == nil { + return fqdnHostname, nil + } + logger.Debug("failed to get fqdn", zap.Error(err)) + + return os.Hostname() +} diff --git a/extension/sumologicextension/extension_darwin_test.go b/extension/sumologicextension/extension_darwin_test.go new file mode 100644 index 000000000000..d779824199d1 --- /dev/null +++ b/extension/sumologicextension/extension_darwin_test.go @@ -0,0 +1,13 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sumologicextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension" + +import "os" + +func init() { + // fqdn seems to hang running in github actions on darwin amd64. This + // bypasses it. + // https://github.com/SumoLogic/sumologic-otel-collector/issues/1295 + hostname = os.Hostname +} diff --git a/extension/sumologicextension/extension_test.go b/extension/sumologicextension/extension_test.go new file mode 100644 index 000000000000..4db2e5c106e8 --- /dev/null +++ b/extension/sumologicextension/extension_test.go @@ -0,0 +1,1574 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sumologicextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension" + +import ( + "context" + "crypto/sha256" + "encoding/base64" + "encoding/json" + "net/http" + "net/http/httptest" + "os" + "path" + "sync/atomic" + "testing" + "time" + + "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/featuregate" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/api" + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/credentials" + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/internal/metadata" +) + +func TestMain(m *testing.M) { + // Enable the feature gates before all tests to avoid flaky tests. + err := featuregate.GlobalRegistry().Set(updateCollectorMetadataID, true) + + if err != nil { + panic("unable to set feature gates") + } + + code := m.Run() + os.Exit(code) +} + +func TestBasicExtensionConstruction(t *testing.T) { + t.Parallel() + + testcases := []struct { + Name string + Config *Config + WantErr bool + }{ + { + Name: "no_collector_name_causes_error", + Config: createDefaultConfig().(*Config), + WantErr: true, + }, + { + Name: "no_credentials_causes_error", + Config: func() *Config { + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "collector_name" + return cfg + }(), + WantErr: true, + }, + { + Name: "basic", + Config: func() *Config { + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "collector_name" + cfg.Credentials.InstallationToken = "install_token_123456" + return cfg + }(), + }, + } + + for _, tc := range testcases { + t.Run(tc.Name, func(t *testing.T) { + se, err := newSumologicExtension(tc.Config, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + if tc.WantErr { + assert.Error(t, err) + } else { + assert.NoError(t, err) + assert.NotNil(t, se) + } + }) + } +} + +func TestBasicStart(t *testing.T) { + t.Parallel() + + srv := httptest.NewServer(func() http.HandlerFunc { + var reqCount int32 + + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + // TODO Add payload verification - verify if collectorName is set properly + reqNum := atomic.AddInt32(&reqCount, 1) + + switch reqNum { + + // register + case 1: + require.Equal(t, registerURL, req.URL.Path) + _, err := w.Write([]byte(`{ + "collectorCredentialID": "collectorId", + "collectorCredentialKey": "collectorKey", + "collectorId": "id" + }`)) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + } + + // metadata + case 2: + assert.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + + // heartbeat + case 3: + assert.Equal(t, heartbeatURL, req.URL.Path) + w.WriteHeader(204) + + // should not produce any more requests + default: + w.WriteHeader(http.StatusInternalServerError) + } + }) + }()) + t.Cleanup(func() { srv.Close() }) + + dir, err := os.MkdirTemp("", "otelcol-sumo-store-credentials-test-*") + require.NoError(t, err) + t.Cleanup(func() { os.RemoveAll(dir) }) + + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "collector_name" + cfg.APIBaseURL = srv.URL + cfg.Credentials.InstallationToken = "dummy_install_token" + cfg.CollectorCredentialsDirectory = dir + + se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + assert.NotEmpty(t, se.registrationInfo.CollectorCredentialID) + assert.NotEmpty(t, se.registrationInfo.CollectorCredentialKey) + assert.NotEmpty(t, se.registrationInfo.CollectorID) + require.NoError(t, se.Shutdown(context.Background())) +} + +func TestStoreCredentials(t *testing.T) { + t.Parallel() + + getServer := func() *httptest.Server { + var reqCount int32 + + return httptest.NewServer(http.HandlerFunc( + func(w http.ResponseWriter, req *http.Request) { + // TODO Add payload verification - verify if collectorName is set properly + reqNum := atomic.AddInt32(&reqCount, 1) + + switch reqNum { + + // register + case 1: + require.Equal(t, registerURL, req.URL.Path) + _, err := w.Write([]byte(`{ + "collectorCredentialID": "collectorId", + "collectorCredentialKey": "collectorKey", + "collectorId": "id" + }`)) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + } + + // metadata + case 2: + assert.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + + // heartbeat + case 3: + assert.Equal(t, heartbeatURL, req.URL.Path) + w.WriteHeader(204) + + // should not produce any more requests + default: + w.WriteHeader(http.StatusInternalServerError) + } + })) + } + + getConfig := func(url string) *Config { + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "collector_name" + cfg.APIBaseURL = url + cfg.Credentials.InstallationToken = "dummy_install_token" + return cfg + } + + logger, err := zap.NewDevelopment() + require.NoError(t, err) + + t.Run("dir does not exist", func(t *testing.T) { + dir, err := os.MkdirTemp("", "otelcol-sumo-store-credentials-test-*") + require.NoError(t, err) + t.Cleanup(func() { os.RemoveAll(dir) }) + + srv := getServer() + t.Cleanup(func() { srv.Close() }) + + cfg := getConfig(srv.URL) + cfg.CollectorCredentialsDirectory = dir + + // Ensure the directory doesn't exist before running the extension + require.NoError(t, os.RemoveAll(dir)) + + se, err := newSumologicExtension(cfg, logger, component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + key := createHashKey(cfg) + fileName, err := credentials.HashKeyToFilename(key) + require.NoError(t, err) + credsPath := path.Join(dir, fileName) + require.NoFileExists(t, credsPath) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, se.Shutdown(context.Background())) + require.FileExists(t, credsPath) + }) + + t.Run("dir exists before launch with 600 permissions", func(t *testing.T) { + dir, err := os.MkdirTemp("", "otelcol-sumo-store-credentials-test-*") + require.NoError(t, err) + t.Cleanup(func() { os.RemoveAll(dir) }) + + srv := getServer() + t.Cleanup(func() { srv.Close() }) + + cfg := getConfig(srv.URL) + cfg.CollectorCredentialsDirectory = dir + + // Ensure the directory has 600 permissions + require.NoError(t, os.Chmod(dir, 0600)) + + se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + key := createHashKey(cfg) + fileName, err := credentials.HashKeyToFilename(key) + require.NoError(t, err) + credsPath := path.Join(dir, fileName) + require.NoFileExists(t, credsPath) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, se.Shutdown(context.Background())) + require.FileExists(t, credsPath) + }) + + t.Run("ensure dir gets created with 700 permissions", func(t *testing.T) { + dir, err := os.MkdirTemp("", "otelcol-sumo-store-credentials-test-*") + require.NoError(t, err) + t.Cleanup(func() { os.RemoveAll(dir) }) + + srv := getServer() + t.Cleanup(func() { srv.Close() }) + cfg := getConfig(srv.URL) + cfg.CollectorCredentialsDirectory = dir + + // Ensure the directory has 700 permissions + require.NoError(t, os.Chmod(dir, 0700)) + + se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + key := createHashKey(cfg) + fileName, err := credentials.HashKeyToFilename(key) + require.NoError(t, err) + credsPath := path.Join(dir, fileName) + require.NoFileExists(t, credsPath) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, se.Shutdown(context.Background())) + require.FileExists(t, credsPath) + }) + + t.Run("by default use sha256 for hashing", func(t *testing.T) { + dir, err := os.MkdirTemp("", "otelcol-sumo-store-credentials-test-*") + require.NoError(t, err) + t.Cleanup(func() { os.RemoveAll(dir) }) + + srv := getServer() + t.Cleanup(func() { srv.Close() }) + + cfg := getConfig(srv.URL) + cfg.CollectorCredentialsDirectory = dir + + se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + key := createHashKey(cfg) + fileName, err := credentials.HashKeyToFilename(key) + require.NoError(t, err) + fileNameSha256, err := credentials.HashKeyToFilenameWith(sha256.New(), key) + require.NoError(t, err) + require.Equal(t, fileName, fileNameSha256) + + credsPath := path.Join(dir, fileName) + require.NoFileExists(t, credsPath) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, se.Shutdown(context.Background())) + require.FileExists(t, credsPath) + }) +} + +func TestStoreCredentials_PreexistingCredentialsAreUsed(t *testing.T) { + t.Parallel() + + var reqCount int32 + getServer := func() *httptest.Server { + return httptest.NewServer(http.HandlerFunc( + func(w http.ResponseWriter, req *http.Request) { + reqNum := atomic.AddInt32(&reqCount, 1) + + switch reqNum { + // heartbeat + case 1: + require.Equal(t, heartbeatURL, req.URL.Path) + w.WriteHeader(204) + + // metadata + case 2: + require.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + + // should not produce any more requests + default: + w.WriteHeader(http.StatusInternalServerError) + } + })) + } + + getConfig := func(url string) *Config { + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "collector_name" + cfg.APIBaseURL = url + cfg.Credentials.InstallationToken = "dummy_install_token" + return cfg + } + + logger, err := zap.NewDevelopment() + require.NoError(t, err) + + dir, err := os.MkdirTemp("", "otelcol-sumo-store-credentials-test-*") + require.NoError(t, err) + t.Cleanup(func() { os.RemoveAll(dir) }) + t.Logf("Using dir: %s", dir) + + store, err := credentials.NewLocalFsStore( + credentials.WithCredentialsDirectory(dir), + credentials.WithLogger(logger), + ) + require.NoError(t, err) + + srv := getServer() + t.Cleanup(func() { srv.Close() }) + + cfg := getConfig(srv.URL) + cfg.CollectorCredentialsDirectory = dir + + hashKey := createHashKey(cfg) + + require.NoError(t, + store.Store(hashKey, credentials.CollectorCredentials{ + CollectorName: "collector_name", + Credentials: api.OpenRegisterResponsePayload{ + CollectorCredentialID: "collectorId", + CollectorCredentialKey: "collectorKey", + CollectorID: "id", + }, + }), + ) + + se, err := newSumologicExtension(cfg, logger, component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + + fileName, err := credentials.HashKeyToFilename(hashKey) + require.NoError(t, err) + credsPath := path.Join(dir, fileName) + // Credentials file exists before starting the extension because we created + // it directly via store.Store() + require.FileExists(t, credsPath) + + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, se.Shutdown(context.Background())) + require.FileExists(t, credsPath) + + require.EqualValues(t, atomic.LoadInt32(&reqCount), 2) +} + +func TestLocalFSCredentialsStore_WorkCorrectlyForMultipleExtensions(t *testing.T) { + t.Parallel() + + getServer := func() *httptest.Server { + var reqCount int32 + + return httptest.NewServer(http.HandlerFunc( + func(w http.ResponseWriter, req *http.Request) { + // TODO Add payload verification - verify if collectorName is set properly + reqNum := atomic.AddInt32(&reqCount, 1) + + switch reqNum { + + // register + case 1: + require.Equal(t, registerURL, req.URL.Path) + _, err := w.Write([]byte(`{ + "collectorCredentialID": "collectorId", + "collectorCredentialKey": "collectorKey", + "collectorId": "id" + }`)) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + } + + // metadata + case 2: + assert.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + + // heartbeat + case 3: + assert.Equal(t, heartbeatURL, req.URL.Path) + w.WriteHeader(204) + + // should not produce any more requests + default: + w.WriteHeader(http.StatusInternalServerError) + } + })) + } + + getConfig := func(url string) *Config { + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "collector_name" + cfg.APIBaseURL = url + cfg.Credentials.InstallationToken = "dummy_install_token" + return cfg + } + + getDir := func(t *testing.T) string { + dir, err := os.MkdirTemp("", "otelcol-sumo-store-credentials-multiple-extensions-test-*") + require.NoError(t, err) + return dir + } + + dir1 := getDir(t) + t.Cleanup(func() { os.RemoveAll(dir1) }) + dir2 := getDir(t) + t.Cleanup(func() { os.RemoveAll(dir2) }) + + srv1 := getServer() + t.Cleanup(func() { srv1.Close() }) + srv2 := getServer() + t.Cleanup(func() { srv2.Close() }) + + cfg1 := getConfig(srv1.URL) + cfg1.CollectorCredentialsDirectory = dir1 + + cfg2 := getConfig(srv2.URL) + cfg2.CollectorCredentialsDirectory = dir2 + + logger1, err := zap.NewDevelopment(zap.Fields(zap.Int("#", 1))) + require.NoError(t, err) + + logger2, err := zap.NewDevelopment(zap.Fields(zap.Int("#", 2))) + require.NoError(t, err) + + se1, err := newSumologicExtension(cfg1, logger1, component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, se1.Shutdown(context.Background())) }) + fileName1, err := credentials.HashKeyToFilename(createHashKey(cfg1)) + require.NoError(t, err) + credsPath1 := path.Join(dir1, fileName1) + require.NoFileExists(t, credsPath1) + require.NoError(t, se1.Start(context.Background(), componenttest.NewNopHost())) + require.FileExists(t, credsPath1) + + se2, err := newSumologicExtension(cfg2, logger2, component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, se2.Shutdown(context.Background())) }) + fileName2, err := credentials.HashKeyToFilename(createHashKey(cfg2)) + require.NoError(t, err) + credsPath2 := path.Join(dir2, fileName2) + require.NoFileExists(t, credsPath2) + require.NoError(t, se2.Start(context.Background(), componenttest.NewNopHost())) + require.FileExists(t, credsPath2) + + require.NotEqual(t, credsPath1, credsPath2, + "credentials files should be different for configs with different apiBaseURLs", + ) +} + +func TestRegisterEmptyCollectorName(t *testing.T) { + t.Parallel() + + hostname, err := getHostname(zap.NewNop()) + require.NoError(t, err) + srv := httptest.NewServer(func() http.HandlerFunc { + var reqCount int32 + + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + // TODO Add payload verification - verify if collectorName is set properly + reqNum := atomic.AddInt32(&reqCount, 1) + + switch reqNum { + + // register + case 1: + require.Equal(t, registerURL, req.URL.Path) + + authHeader := req.Header.Get("Authorization") + assert.Equal(t, "Bearer dummy_install_token", authHeader, + "collector didn't send correct Authorization header with registration request") + + _, err = w.Write([]byte(`{ + "collectorCredentialID": "aaaaaaaaaaaaaaaaaaaa", + "collectorCredentialKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "collectorId": "000000000FFFFFFF" + }`)) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + } + + // metadata + case 2: + assert.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + + // heartbeat + case 3: + assert.Equal(t, heartbeatURL, req.URL.Path) + w.WriteHeader(204) + + // should not produce any more requests + default: + w.WriteHeader(http.StatusInternalServerError) + } + }) + }()) + + dir, err := os.MkdirTemp("", "otelcol-sumo-store-credentials-test-*") + t.Cleanup(func() { + srv.Close() + os.RemoveAll(dir) + }) + require.NoError(t, err) + + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "" + cfg.APIBaseURL = srv.URL + cfg.Credentials.InstallationToken = "dummy_install_token" + cfg.CollectorCredentialsDirectory = dir + + se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, err) + require.Equal(t, hostname, se.collectorName) +} + +func TestRegisterEmptyCollectorNameForceRegistration(t *testing.T) { + t.Parallel() + + hostname, err := getHostname(zap.NewNop()) + require.NoError(t, err) + srv := httptest.NewServer(func() http.HandlerFunc { + var reqCount int32 + + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + // TODO Add payload verification - verify if collectorName is set properly + reqNum := atomic.AddInt32(&reqCount, 1) + + switch reqNum { + + // register + case 1: + require.Equal(t, registerURL, req.URL.Path) + + authHeader := req.Header.Get("Authorization") + assert.Equal(t, "Bearer dummy_install_token", authHeader, + "collector didn't send correct Authorization header with registration request") + + _, err = w.Write([]byte(`{ + "collectorCredentialID": "aaaaaaaaaaaaaaaaaaaa", + "collectorCredentialKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "collectorId": "000000000FFFFFFF", + "collectorName": "hostname-test-123456123123" + }`)) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + } + + // metadata + case 2: + assert.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + + // register again because force registration was set + case 3: + require.Equal(t, registerURL, req.URL.Path) + + authHeader := req.Header.Get("Authorization") + assert.Equal(t, "Bearer dummy_install_token", authHeader, + "collector didn't send correct Authorization header with registration request") + + _, err = w.Write([]byte(`{ + "collectorCredentialID": "aaaaaaaaaaaaaaaaaaaa", + "collectorCredentialKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "collectorId": "000000000FFFFFFF", + "collectorName": "hostname-test-123456123123" + }`)) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + } + + // metadata + case 4: + assert.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + + // should not produce any more requests + default: + w.WriteHeader(http.StatusInternalServerError) + } + }) + }()) + + dir, err := os.MkdirTemp("", "otelcol-sumo-store-credentials-test-*") + t.Cleanup(func() { + srv.Close() + os.RemoveAll(dir) + }) + require.NoError(t, err) + + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "" + cfg.APIBaseURL = srv.URL + cfg.Credentials.InstallationToken = "dummy_install_token" + cfg.CollectorCredentialsDirectory = dir + cfg.ForceRegistration = true + + se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, se.Shutdown(context.Background())) + assert.NotEmpty(t, se.collectorName) + assert.Equal(t, hostname, se.collectorName) + colCreds, err := se.credentialsStore.Get(se.hashKey) + require.NoError(t, err) + colName := colCreds.CollectorName + se, err = newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + assert.Equal(t, se.collectorName, colName) +} + +func TestCollectorSendsBasicAuthHeadersOnRegistration(t *testing.T) { + t.Parallel() + + srv := httptest.NewServer(func() http.HandlerFunc { + var reqCount int32 + + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + // TODO Add payload verification - verify if collectorName is set properly + reqNum := atomic.AddInt32(&reqCount, 1) + + switch reqNum { + + // register + case 1: + require.Equal(t, registerURL, req.URL.Path) + + authHeader := req.Header.Get("Authorization") + assert.Equal(t, "Bearer dummy_install_token", authHeader, + "collector didn't send correct Authorization header with registration request") + + _, err := w.Write([]byte(`{ + "collectorCredentialID": "aaaaaaaaaaaaaaaaaaaa", + "collectorCredentialKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "collectorId": "000000000FFFFFFF" + }`)) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + } + + // metadata + case 2: + assert.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + + // heartbeat + case 3: + assert.Equal(t, heartbeatURL, req.URL.Path) + w.WriteHeader(204) + + // should not produce any more requests + default: + w.WriteHeader(http.StatusInternalServerError) + } + }) + }()) + + t.Cleanup(func() { srv.Close() }) + + dir, err := os.MkdirTemp("", "otelcol-sumo-store-credentials-test-*") + require.NoError(t, err) + t.Cleanup(func() { os.RemoveAll(dir) }) + + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "" + cfg.APIBaseURL = srv.URL + cfg.Credentials.InstallationToken = "dummy_install_token" + cfg.CollectorCredentialsDirectory = dir + + se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, se.Shutdown(context.Background())) +} + +func TestCollectorCheckingCredentialsFoundInLocalStorage(t *testing.T) { + t.Parallel() + + dir, err := os.MkdirTemp("", "otelcol-sumo-store-credentials-test-*") + require.NoError(t, err) + t.Cleanup(func() { os.RemoveAll(dir) }) + + cStore, err := credentials.NewLocalFsStore( + credentials.WithCredentialsDirectory(dir), + credentials.WithLogger(zap.NewNop()), + ) + require.NoError(t, err) + + storeCredentials := func(t *testing.T, url string) { + creds := credentials.CollectorCredentials{ + CollectorName: "test-name", + Credentials: api.OpenRegisterResponsePayload{ + CollectorName: "test-name", + CollectorID: "test-id", + CollectorCredentialID: "test-credential-id", + CollectorCredentialKey: "test-credential-key", + }, + APIBaseURL: url, + } + storageKey := createHashKey(&Config{ + CollectorName: "test-name", + Credentials: accessCredentials{ + InstallationToken: "dummy_install_token", + }, + APIBaseURL: url, + }) + t.Logf("Storing collector credentials in temp dir: %s", dir) + require.NoError(t, cStore.Store(storageKey, creds)) + } + + testcases := []struct { + name string + expectedReqCount int32 + srvFn func() (*httptest.Server, *int32) + configFn func(url string) *Config + }{ + { + name: "collector checks found credentials via heartbeat call - no registration is done", + expectedReqCount: 3, + srvFn: func() (*httptest.Server, *int32) { + var reqCount int32 + + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + reqNum := atomic.AddInt32(&reqCount, 1) + + switch reqNum { + + // heatbeat + case 1: + require.NotEqual(t, registerURL, req.URL.Path, + "collector shouldn't call the register API when credentials locally retrieved") + + assert.Equal(t, heartbeatURL, req.URL.Path) + + authHeader := req.Header.Get("Authorization") + token := base64.StdEncoding.EncodeToString( + []byte("test-credential-id:test-credential-key"), + ) + assert.Equal(t, "Basic "+token, authHeader, + "collector didn't send correct Authorization header with heartbeat request") + + w.WriteHeader(204) + + // metadata + case 2: + assert.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + + // should not produce any more requests + default: + w.WriteHeader(http.StatusInternalServerError) + } + })), + &reqCount + }, + configFn: func(url string) *Config { + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "test-name" + cfg.APIBaseURL = url + cfg.Credentials.InstallationToken = "dummy_install_token" + cfg.CollectorCredentialsDirectory = dir + return cfg + }, + }, + { + name: "collector checks network issues - no registration is done", + expectedReqCount: 4, + srvFn: func() (*httptest.Server, *int32) { + var reqCount int32 + + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + reqNum := atomic.AddInt32(&reqCount, 1) + + switch reqNum { + + // failing heatbeat + case 1: + require.NotEqual(t, registerURL, req.URL.Path, + "collector shouldn't call the register API when credentials locally retrieved") + + assert.Equal(t, heartbeatURL, req.URL.Path) + + authHeader := req.Header.Get("Authorization") + token := base64.StdEncoding.EncodeToString( + []byte("test-credential-id:test-credential-key"), + ) + assert.Equal(t, "Basic "+token, authHeader, + "collector didn't send correct Authorization header with heartbeat request") + + w.WriteHeader(http.StatusInternalServerError) + + // successful heatbeat + case 2: + require.NotEqual(t, registerURL, req.URL.Path, + "collector shouldn't call the register API when credentials locally retrieved") + + assert.Equal(t, heartbeatURL, req.URL.Path) + + authHeader := req.Header.Get("Authorization") + token := base64.StdEncoding.EncodeToString( + []byte("test-credential-id:test-credential-key"), + ) + assert.Equal(t, "Basic "+token, authHeader, + "collector didn't send correct Authorization header with heartbeat request") + + w.WriteHeader(204) + + // metadata + case 3: + assert.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + + // should not produce any more requests + default: + w.WriteHeader(http.StatusInternalServerError) + } + })), + &reqCount + }, + configFn: func(url string) *Config { + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "test-name" + cfg.APIBaseURL = url + cfg.Credentials.InstallationToken = "dummy_install_token" + cfg.CollectorCredentialsDirectory = dir + return cfg + }, + }, + { + name: "collector checks network issues - registration is done", + expectedReqCount: 4, + srvFn: func() (*httptest.Server, *int32) { + var reqCount int32 + + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + reqNum := atomic.AddInt32(&reqCount, 1) + + switch reqNum { + + // failing heatbeat + case 1: + require.NotEqual(t, registerURL, req.URL.Path, + "collector shouldn't call the register API when credentials locally retrieved") + + assert.Equal(t, heartbeatURL, req.URL.Path) + + authHeader := req.Header.Get("Authorization") + token := base64.StdEncoding.EncodeToString( + []byte("test-credential-id:test-credential-key"), + ) + assert.Equal(t, "Basic "+token, authHeader, + "collector didn't send correct Authorization header with heartbeat request") + + w.WriteHeader(http.StatusUnauthorized) + + // register + case 2: + require.Equal(t, registerURL, req.URL.Path) + + authHeader := req.Header.Get("Authorization") + assert.Equal(t, "Bearer dummy_install_token", authHeader, + "collector didn't send correct Authorization header with registration request") + + _, err := w.Write([]byte(`{ + "collectorCredentialID": "aaaaaaaaaaaaaaaaaaaa", + "collectorCredentialKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "collectorId": "000000000FFFFFFF" + }`)) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + } + + // metadata + case 3: + w.WriteHeader(200) + + // heartbeat + case 4: + w.WriteHeader(204) + + // should not produce any more requests + default: + w.WriteHeader(http.StatusInternalServerError) + } + })), + &reqCount + }, + configFn: func(url string) *Config { + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "test-name" + cfg.APIBaseURL = url + cfg.Credentials.InstallationToken = "dummy_install_token" + cfg.CollectorCredentialsDirectory = dir + return cfg + }, + }, + { + name: "collector registers when no matching credentials are found in local storage", + expectedReqCount: 3, + srvFn: func() (*httptest.Server, *int32) { + var reqCount int32 + + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + reqNum := atomic.AddInt32(&reqCount, 1) + + switch reqNum { + + // register + case 1: + require.Equal(t, registerURL, req.URL.Path) + + authHeader := req.Header.Get("Authorization") + assert.Equal(t, "Bearer dummy_install_token", authHeader, + "collector didn't send correct Authorization header with registration request") + + _, err := w.Write([]byte(`{ + "collectorCredentialID": "aaaaaaaaaaaaaaaaaaaa", + "collectorCredentialKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "collectorId": "000000000FFFFFFF" + }`)) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + } + + // metadata + case 2: + w.WriteHeader(200) + + // heartbeat + case 3: + w.WriteHeader(204) + + // should not produce any more requests + default: + w.WriteHeader(http.StatusInternalServerError) + } + })), + &reqCount + }, + configFn: func(url string) *Config { + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "test-name-not-in-the-credentials-store" + cfg.APIBaseURL = url + cfg.Credentials.InstallationToken = "dummy_install_token" + cfg.CollectorCredentialsDirectory = dir + return cfg + }, + }, + } + + for _, tc := range testcases { + t.Run(tc.name, func(t *testing.T) { + tc := tc + + srv, reqCount := tc.srvFn() + t.Cleanup(func() { srv.Close() }) + + cfg := tc.configFn(srv.URL) + storeCredentials(t, srv.URL) + + logger, err := zap.NewDevelopment() + require.NoError(t, err) + + se, err := newSumologicExtension(cfg, logger, component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + + if !assert.Eventually(t, + func() bool { + return atomic.LoadInt32(reqCount) == tc.expectedReqCount + }, + 5*time.Second, 100*time.Millisecond, + ) { + t.Logf("the expected number of requests (%d) wasn't reached, only got %d", + tc.expectedReqCount, atomic.LoadInt32(reqCount), + ) + } + + require.NoError(t, se.Shutdown(context.Background())) + }) + } +} + +func TestRegisterEmptyCollectorNameWithBackoff(t *testing.T) { + var retriesLimit int32 = 5 + t.Parallel() + + hostname, err := getHostname(zap.NewNop()) + require.NoError(t, err) + srv := httptest.NewServer(func() http.HandlerFunc { + var reqCount int32 + + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + // TODO Add payload verification - verify if collectorName is set properly + reqNum := atomic.AddInt32(&reqCount, 1) + + switch { + + // register + case reqNum <= retriesLimit: + require.Equal(t, registerURL, req.URL.Path) + + authHeader := req.Header.Get("Authorization") + assert.Equal(t, "Bearer dummy_install_token", authHeader, + "collector didn't send correct Authorization header with registration request") + + if reqCount < retriesLimit { + w.WriteHeader(http.StatusTooManyRequests) + } else { + + _, err = w.Write([]byte(`{ + "collectorCredentialID": "aaaaaaaaaaaaaaaaaaaa", + "collectorCredentialKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "collectorId": "000000000FFFFFFF" + }`)) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + } + } + + // metadata + case reqNum == retriesLimit+1: + assert.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + + // heartbeat + case reqNum == retriesLimit+2: + assert.Equal(t, heartbeatURL, req.URL.Path) + w.WriteHeader(204) + + // should not produce any more requests + default: + w.WriteHeader(http.StatusInternalServerError) + } + }) + }()) + + dir, err := os.MkdirTemp("", "otelcol-sumo-store-credentials-test-*") + t.Cleanup(func() { + srv.Close() + os.RemoveAll(dir) + }) + require.NoError(t, err) + + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "" + cfg.APIBaseURL = srv.URL + cfg.Credentials.InstallationToken = "dummy_install_token" + cfg.CollectorCredentialsDirectory = dir + cfg.BackOff.InitialInterval = time.Millisecond + cfg.BackOff.MaxInterval = time.Millisecond + + se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + require.Equal(t, hostname, se.collectorName) +} + +func TestRegisterEmptyCollectorNameUnrecoverableError(t *testing.T) { + t.Parallel() + + hostname, err := getHostname(zap.NewNop()) + require.NoError(t, err) + srv := httptest.NewServer(func() http.HandlerFunc { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + // TODO Add payload verification - verify if collectorName is set properly + require.Equal(t, registerURL, req.URL.Path) + + authHeader := req.Header.Get("Authorization") + assert.Equal(t, "Bearer dummy_install_token", authHeader, + "collector didn't send correct Authorization header with registration request") + + w.WriteHeader(http.StatusNotFound) + _, err = w.Write([]byte(`{ + "id": "XXXXX-XXXXX-XXXXX", + "errors": [ + { + "code": "collector-registration:dummy_error", + "message": "The collector cannot be registered" + } + ] + }`)) + require.NoError(t, err) + }) + }()) + + var dir string + dir, err = os.MkdirTemp("", "otelcol-sumo-store-credentials-test-*") + t.Cleanup(func() { + srv.Close() + os.RemoveAll(dir) + }) + require.NoError(t, err) + + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "" + cfg.APIBaseURL = srv.URL + cfg.Credentials.InstallationToken = "dummy_install_token" + cfg.CollectorCredentialsDirectory = dir + cfg.BackOff.InitialInterval = time.Millisecond + cfg.BackOff.MaxInterval = time.Millisecond + + se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + require.EqualError(t, se.Start(context.Background(), componenttest.NewNopHost()), + "collector registration failed: failed to register the collector, got HTTP status code: 404") + require.Equal(t, hostname, se.collectorName) +} + +func TestRegistrationRedirect(t *testing.T) { + t.Parallel() + + var destReqCount int32 + destSrv := httptest.NewServer(http.HandlerFunc( + func(w http.ResponseWriter, req *http.Request) { + switch atomic.AddInt32(&destReqCount, 1) { + + // register + case 1: + require.Equal(t, registerURL, req.URL.Path) + + authHeader := req.Header.Get("Authorization") + + assert.Equal(t, "Bearer dummy_install_token", authHeader, + "collector didn't send correct Authorization header with registration request") + + _, err := w.Write([]byte(`{ + "collectorCredentialID": "aaaaaaaaaaaaaaaaaaaa", + "collectorCredentialKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "collectorId": "000000000FFFFFFF" + }`)) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + } + + // metadata + case 2: + assert.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + + // heartbeat + case 3: + assert.Equal(t, heartbeatURL, req.URL.Path) + w.WriteHeader(204) + + // heartbeat + case 4: + assert.Equal(t, heartbeatURL, req.URL.Path) + w.WriteHeader(204) + + // metadata + case 5: + assert.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + + // heartbeat + case 6: + assert.Equal(t, heartbeatURL, req.URL.Path) + w.WriteHeader(204) + + // should not produce any more requests + default: + require.Fail(t, + "extension should not make more than 5 requests to the destination server", + ) + } + }, + )) + t.Cleanup(func() { destSrv.Close() }) + + var origReqCount int32 + origSrv := httptest.NewServer(http.HandlerFunc( + func(w http.ResponseWriter, req *http.Request) { + switch atomic.AddInt32(&origReqCount, 1) { + + // register + case 1: + require.Equal(t, registerURL, req.URL.Path) + http.Redirect(w, req, destSrv.URL, http.StatusMovedPermanently) + + // should not produce any more requests + default: + require.Fail(t, + "extension should not make more than 1 request to the original server", + ) + } + }, + )) + t.Cleanup(func() { origSrv.Close() }) + + dir, err := os.MkdirTemp("", "otelcol-sumo-redirect-test-*") + require.NoError(t, err) + t.Cleanup(func() { os.RemoveAll(dir) }) + + configFn := func() *Config { + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "" + cfg.APIBaseURL = origSrv.URL + cfg.Credentials.InstallationToken = "dummy_install_token" + cfg.CollectorCredentialsDirectory = dir + return cfg + } + + logger, err := zap.NewDevelopment() + require.NoError(t, err) + + t.Run("works correctly", func(t *testing.T) { + se, err := newSumologicExtension(configFn(), logger, component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + assert.Eventually(t, func() bool { return atomic.LoadInt32(&origReqCount) == 1 }, + 5*time.Second, 100*time.Millisecond, + "extension should only make 1 request to the original server before redirect", + ) + assert.Eventually(t, func() bool { return atomic.LoadInt32(&destReqCount) == 3 }, + 5*time.Second, 100*time.Millisecond, + "extension should make 3 requests (registration + metadata + heartbeat) to the destination server", + ) + require.NoError(t, se.Shutdown(context.Background())) + }) + + t.Run("credentials store retrieves credentials with redirected api url", func(t *testing.T) { + se, err := newSumologicExtension(configFn(), logger, component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + + assert.Eventually(t, func() bool { return atomic.LoadInt32(&origReqCount) == 1 }, + 5*time.Second, 100*time.Millisecond, + "after restarting with locally stored credentials extension shouldn't call the original server", + ) + + assert.Eventually(t, func() bool { return atomic.LoadInt32(&destReqCount) == 6 }, + 5*time.Second, 100*time.Millisecond, + "extension should make 6 requests (registration + metadata + heartbeat, after restart "+ + "heartbeat to validate credentials, metadata update, and then the first heartbeat on "+ + "which we wait here) to the destination server", + ) + + require.NoError(t, se.Shutdown(context.Background())) + }) +} + +func TestCollectorReregistersAfterHTTPUnathorizedFromHeartbeat(t *testing.T) { + t.Parallel() + + var reqCount int32 + srv := httptest.NewServer(func() http.HandlerFunc { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + reqNum := atomic.AddInt32(&reqCount, 1) + + t.Logf("request: (#%d) %s", reqNum, req.URL.Path) + handlerRegister := func() { + require.Equal(t, registerURL, req.URL.Path, "request num 1") + + authHeader := req.Header.Get("Authorization") + assert.Equal(t, "Bearer dummy_install_token", authHeader, + "collector didn't send correct Authorization header with registration request") + + _, err := w.Write([]byte(`{ + "collectorCredentialID": "aaaaaaaaaaaaaaaaaaaa", + "collectorCredentialKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "collectorId": "000000000FFFFFFF", + "collectorName": "hostname-test-123456123123" + }`)) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + } + } + + switch reqNum { + // register + case 1: + assert.Equal(t, registerURL, req.URL.Path) + handlerRegister() + + // metadata + case 2: + assert.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + + // heartbeat + case 3: + assert.Equal(t, heartbeatURL, req.URL.Path) + w.WriteHeader(204) + + // heartbeat + case 4: + assert.Equal(t, heartbeatURL, req.URL.Path) + // return unauthorized to mimic collector being removed from API + w.WriteHeader(http.StatusUnauthorized) + + // register + case 5: + assert.Equal(t, registerURL, req.URL.Path) + handlerRegister() + + default: + assert.Equal(t, heartbeatURL, req.URL.Path) + w.WriteHeader(204) + } + }) + }()) + + t.Cleanup(func() { srv.Close() }) + + dir, err := os.MkdirTemp("", "otelcol-sumo-reregistration-test-*") + require.NoError(t, err) + t.Cleanup(func() { os.RemoveAll(dir) }) + + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "" + cfg.APIBaseURL = srv.URL + cfg.Credentials.InstallationToken = "dummy_install_token" + cfg.CollectorCredentialsDirectory = dir + cfg.HeartBeatInterval = 100 * time.Millisecond + + logger, err := zap.NewDevelopment() + require.NoError(t, err) + + se, err := newSumologicExtension(cfg, logger, component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + + const expectedReqCount = 10 + if !assert.Eventually(t, + func() bool { + return atomic.LoadInt32(&reqCount) == expectedReqCount + }, + 5*time.Second, 50*time.Millisecond, + ) { + t.Logf("the expected number of requests (%d) wasn't reached, got %d", + expectedReqCount, atomic.LoadInt32(&reqCount), + ) + } + + require.NoError(t, se.Shutdown(context.Background())) +} + +func TestRegistrationRequestPayload(t *testing.T) { + t.Parallel() + + hostname, err := getHostname(zap.NewNop()) + require.NoError(t, err) + var reqCount int32 + srv := httptest.NewServer(func() http.HandlerFunc { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + reqNum := atomic.AddInt32(&reqCount, 1) + + switch reqNum { + // register + case 1: + require.Equal(t, registerURL, req.URL.Path) + + var reqPayload api.OpenRegisterRequestPayload + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqPayload)) + require.True(t, reqPayload.Clobber) + require.Equal(t, hostname, reqPayload.Hostname) + require.Equal(t, "my description", reqPayload.Description) + require.Equal(t, "my category/", reqPayload.Category) + require.EqualValues(t, + map[string]any{ + "field1": "value1", + "field2": "value2", + }, + reqPayload.Fields, + ) + require.Equal(t, "PST", reqPayload.TimeZone) + + authHeader := req.Header.Get("Authorization") + assert.Equal(t, "Bearer dummy_install_token", authHeader, + "collector didn't send correct Authorization header with registration request") + + _, err = w.Write([]byte(`{ + "collectorCredentialID": "mycredentialID", + "collectorCredentialKey": "mycredentialKey", + "collectorId": "0000000001231231", + "collectorName": "otc-test-123456123123" + }`)) + require.NoError(t, err) + // metadata + case 2: + assert.Equal(t, metadataURL, req.URL.Path) + w.WriteHeader(200) + } + + }) + }()) + + dir, err := os.MkdirTemp("", "otelcol-sumo-registration-payload-test-*") + t.Cleanup(func() { + srv.Close() + os.RemoveAll(dir) + }) + require.NoError(t, err) + + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "" + cfg.APIBaseURL = srv.URL + cfg.Credentials.InstallationToken = "dummy_install_token" + cfg.CollectorCredentialsDirectory = dir + cfg.BackOff.InitialInterval = time.Millisecond + cfg.BackOff.MaxInterval = time.Millisecond + cfg.Clobber = true + cfg.CollectorDescription = "my description" + cfg.CollectorCategory = "my category/" + cfg.CollectorFields = map[string]any{ + "field1": "value1", + "field2": "value2", + } + cfg.TimeZone = "PST" + + se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + require.Equal(t, hostname, se.collectorName) + + require.NoError(t, se.Shutdown(context.Background())) +} + +func TestWatchCredentialKey(t *testing.T) { + cfg := createDefaultConfig().(*Config) + cfg.Credentials.InstallationToken = "dummy_install_token" + se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + + ctx := context.Background() + ctxc, cancel := context.WithCancel(ctx) + cancel() + v := se.WatchCredentialKey(ctxc, "") + require.Equal(t, v, "") + + v = se.WatchCredentialKey(context.Background(), "foobar") + require.Equal(t, v, "") + + go func() { + time.Sleep(time.Millisecond * 100) + se.credsNotifyLock.Lock() + defer se.credsNotifyLock.Unlock() + se.registrationInfo.CollectorCredentialKey = "test-credential-key" + close(se.credsNotifyUpdate) + }() + + v = se.WatchCredentialKey(context.Background(), "") + require.Equal(t, v, "test-credential-key") +} + +func TestCreateCredentialsHeader(t *testing.T) { + cfg := createDefaultConfig().(*Config) + cfg.Credentials.InstallationToken = "dummy_install_token" + se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + + _, err = se.CreateCredentialsHeader() + require.Error(t, err) + + se.registrationInfo.CollectorCredentialID = "test-credential-id" + se.registrationInfo.CollectorCredentialKey = "test-credential-key" + + h, err := se.CreateCredentialsHeader() + require.NoError(t, err) + + authHeader := h.Get("Authorization") + token := base64.StdEncoding.EncodeToString( + []byte("test-credential-id:test-credential-key"), + ) + assert.Equal(t, "Basic "+token, authHeader) +} + +func TestGetHostIpAddress(t *testing.T) { + ip, err := baseURL() + require.NoError(t, err) + require.NotEmpty(t, ip) +} + +func TestUpdateMetadataRequestPayload(t *testing.T) { + t.Parallel() + + srv := httptest.NewServer(func() http.HandlerFunc { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + require.Equal(t, metadataURL, req.URL.Path) + + var reqPayload api.OpenMetadataRequestPayload + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqPayload)) + require.NotEmpty(t, reqPayload.HostDetails.Name) + require.NotEmpty(t, reqPayload.HostDetails.OsName) + // @sumo-drosiek: It happened to be empty OsVersion on my machine + // require.NotEmpty(t, reqPayload.HostDetails.OsVersion) + require.NotEmpty(t, reqPayload.NetworkDetails.HostIPAddress) + require.EqualValues(t, reqPayload.HostDetails.Environment, "EKS-1.20.2") + require.EqualValues(t, reqPayload.CollectorDetails.RunningVersion, "1.0.0") + require.EqualValues(t, reqPayload.TagDetails["team"], "A") + require.EqualValues(t, reqPayload.TagDetails["app"], "linux") + require.EqualValues(t, reqPayload.TagDetails["sumo.disco.enabled"], "true") + + _, err := w.Write([]byte(``)) + + require.NoError(t, err) + }) + }()) + + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "" + cfg.APIBaseURL = srv.URL + cfg.Credentials.InstallationToken = "dummy_install_token" + cfg.BackOff.InitialInterval = time.Millisecond + cfg.BackOff.MaxInterval = time.Millisecond + cfg.Clobber = true + cfg.CollectorEnvironment = "EKS-1.20.2" + cfg.CollectorDescription = "my description" + cfg.CollectorCategory = "my category/" + cfg.CollectorFields = map[string]any{ + "team": "A", + "app": "linux", + } + cfg.DiscoverCollectorTags = true + cfg.TimeZone = "PST" + + se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") + require.NoError(t, err) + + httpClient, err := se.getHTTPClient(context.Background(), se.conf.ClientConfig, api.OpenRegisterResponsePayload{}) + require.NoError(t, err) + + err = se.updateMetadataWithHTTPClient(context.TODO(), httpClient) + require.NoError(t, err) +} diff --git a/extension/sumologicextension/factory.go b/extension/sumologicextension/factory.go new file mode 100644 index 000000000000..eb951bcac875 --- /dev/null +++ b/extension/sumologicextension/factory.go @@ -0,0 +1,61 @@ +// 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/credentials" + "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, err := credentials.GetDefaultCollectorCredentialsDirectory() + if err != nil { + return nil + } + + return &Config{ + APIBaseURL: DefaultAPIBaseURL, + HeartBeatInterval: DefaultHeartbeatInterval, + CollectorCredentialsDirectory: defaultCredsPath, + Clobber: false, + DiscoverCollectorTags: true, + ForceRegistration: false, + Ephemeral: false, + TimeZone: "", + StickySessionEnabled: false, + 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..d5078fd3018d --- /dev/null +++ b/extension/sumologicextension/factory_test.go @@ -0,0 +1,68 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sumologicextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension" + +import ( + "context" + "os" + "path" + "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" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/credentials" +) + +func TestFactory_CreateDefaultConfig(t *testing.T) { + cfg := createDefaultConfig() + homePath, err := os.UserHomeDir() + require.NoError(t, err) + defaultCredsPath := path.Join(homePath, credentials.DefaultCollectorDataDirectory) + 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..45ab9b0f25f9 --- /dev/null +++ b/extension/sumologicextension/go.mod @@ -0,0 +1,74 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension + +go 1.21 + +require ( + github.com/Showmax/go-fqdn v1.0.0 + github.com/cenkalti/backoff/v4 v4.3.0 + github.com/mitchellh/go-ps v1.0.0 + github.com/shirou/gopsutil/v3 v3.24.3 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.opentelemetry.io/collector/config/configopaque v1.5.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/extension/auth v0.98.0 + go.opentelemetry.io/collector/featuregate v1.5.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/zap v1.27.0 + google.golang.org/grpc v1.63.2 +) + +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.1 // 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/go-ole/go-ole v1.2.6 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect + github.com/klauspost/compress v1.17.8 // 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.1.1 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk 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.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rs/cors v1.10.1 // indirect + github.com/shoenig/go-m1cpu v0.1.6 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.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..42b077315aea --- /dev/null +++ b/extension/sumologicextension/go.sum @@ -0,0 +1,199 @@ +github.com/Showmax/go-fqdn v1.0.0 h1:0rG5IbmVliNT5O19Mfuvna9LL7zlHyRfsSvBPZmF9tM= +github.com/Showmax/go-fqdn v1.0.0/go.mod h1:SfrFBzmDCtCGrnHhoDjuvFnKsWjEQX/Q9ARZvOrJAko= +github.com/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.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/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.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/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/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +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.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/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/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.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= +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/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= +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/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/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +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.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +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-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.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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/extension/sumologicextension/headers.go b/extension/sumologicextension/headers.go new file mode 100644 index 000000000000..f197adf4926a --- /dev/null +++ b/extension/sumologicextension/headers.go @@ -0,0 +1,11 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sumologicextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension" + +import "net/http" + +func addJSONHeaders(req *http.Request) { + req.Header.Add("Content-Type", "application/json") + req.Header.Add("Accept", "application/json") +} diff --git a/extension/sumologicextension/internal/metadata/generated_status.go b/extension/sumologicextension/internal/metadata/generated_status.go new file mode 100644 index 000000000000..d74258369567 --- /dev/null +++ b/extension/sumologicextension/internal/metadata/generated_status.go @@ -0,0 +1,25 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("sumologic") +) + +const ( + ExtensionStability = component.StabilityLevelAlpha +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/sumologic") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/sumologic") +} diff --git a/extension/sumologicextension/metadata.yaml b/extension/sumologicextension/metadata.yaml new file mode 100644 index 000000000000..b25c9ca6acec --- /dev/null +++ b/extension/sumologicextension/metadata.yaml @@ -0,0 +1,15 @@ +type: sumologic +scope_name: otelcol/sumologic + +status: + class: extension + stability: + alpha: [extension] + distributions: [] + codeowners: + active: [astencel-sumo, sumo-drosiek, swiatekm-sumo] + +# TODO: Update the extension to make the tests pass +tests: + skip_lifecycle: true + skip_shutdown: true diff --git a/extension/sumologicextension/testdata/config.yaml b/extension/sumologicextension/testdata/config.yaml new file mode 100644 index 000000000000..029b40e9dbec --- /dev/null +++ b/extension/sumologicextension/testdata/config.yaml @@ -0,0 +1,28 @@ +extensions: + sumologic: + collector_name: my_custom_collector + collector_description: "My custom OTC description" + collector_category: collector_category + installation_token: + heartbeat_interval: 15s + +# Data pipeline is required to load the config. +receivers: + hostmetrics: + collection_interval: 30s + scrapers: + load: + +processors: + +exporters: + debug: + verbosity: detailed + +service: + extensions: [sumologic] + pipelines: + metrics: + receivers: [hostmetrics] + processors: [] + exporters: [debug] diff --git a/go.mod b/go.mod index 8de712215e6e..c89ab3951944 100644 --- a/go.mod +++ b/go.mod @@ -1,221 +1,228 @@ module github.com/open-telemetry/opentelemetry-collector-contrib -go 1.20 +go 1.22.0 + +toolchain go1.22.2 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecstaskobserver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/oidcauthextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachesparkreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureblobreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureeventhubreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azuremonitorreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/chronyreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/lokireceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/oracledbreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/pulsarreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefareceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/wavefrontreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/webhookeventreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.89.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/exporter/debugexporter v0.89.0 - go.opentelemetry.io/collector/exporter/loggingexporter v0.89.0 - go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0 - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/extension/ballastextension v0.89.0 - go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 - go.opentelemetry.io/collector/otelcol v0.89.0 - go.opentelemetry.io/collector/processor v0.89.0 - go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 - go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.89.0 - go.opentelemetry.io/collector/receiver v0.89.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecstaskobserver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/oidcauthextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachesparkreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureblobreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureeventhubreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azuremonitorreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/chronyreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/lokireceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/oracledbreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/pulsarreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefareceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/wavefrontreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/webhookeventreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.98.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/connector v0.98.0 + go.opentelemetry.io/collector/connector/forwardconnector v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 + go.opentelemetry.io/collector/exporter/loggingexporter v0.98.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/extension/ballastextension v0.98.0 + go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 + go.opentelemetry.io/collector/otelcol v0.98.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0 + go.opentelemetry.io/collector/receiver v0.98.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 ) require ( - bitbucket.org/atlassian/go-asap/v2 v2.6.0 // indirect - cloud.google.com/go v0.110.10 // indirect - cloud.google.com/go/compute v1.23.2 // indirect + bitbucket.org/atlassian/go-asap/v2 v2.8.0 // indirect + cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect - cloud.google.com/go/iam v1.1.4 // indirect - cloud.google.com/go/logging v1.8.1 // indirect - cloud.google.com/go/longrunning v0.5.3 // indirect - cloud.google.com/go/monitoring v1.16.2 // indirect - cloud.google.com/go/pubsub v1.33.0 // indirect - cloud.google.com/go/spanner v1.51.0 // indirect - cloud.google.com/go/trace v1.10.3 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/logging v1.9.0 // indirect + cloud.google.com/go/longrunning v0.5.5 // indirect + cloud.google.com/go/monitoring v1.18.0 // indirect + cloud.google.com/go/pubsub v1.37.0 // indirect + cloud.google.com/go/spanner v1.60.0 // indirect + cloud.google.com/go/trace v1.10.5 // indirect code.cloudfoundry.org/clock v1.0.0 // indirect code.cloudfoundry.org/go-diodes v0.0.0-20211115184647-b584dd5df32c // indirect code.cloudfoundry.org/go-loggregator v7.4.0+incompatible // indirect code.cloudfoundry.org/rfc5424 v0.0.0-20201103192249-000122071b78 // indirect - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect + filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect github.com/AthenZ/athenz v1.10.39 // indirect github.com/Azure/azure-amqp-common-go/v4 v4.2.0 // indirect - github.com/Azure/azure-event-hubs-go/v3 v3.6.1 // indirect - github.com/Azure/azure-kusto-go v0.13.1 // indirect + github.com/Azure/azure-event-hubs-go/v3 v3.6.2 // indirect + github.com/Azure/azure-kusto-go v0.15.2 // indirect github.com/Azure/azure-pipeline-go v0.2.3 // indirect github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.8.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 // indirect - github.com/Azure/azure-storage-queue-go v0.0.0-20191125232315-636801874cdd // indirect - github.com/Azure/go-amqp v1.0.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 // indirect + github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe // indirect + github.com/Azure/go-amqp v1.0.5 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.29 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect @@ -225,191 +232,191 @@ require ( github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect - github.com/ClickHouse/ch-go v0.58.2 // indirect - github.com/ClickHouse/clickhouse-go/v2 v2.15.0 // indirect - github.com/DataDog/agent-payload/v5 v5.0.89 // indirect - github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1 // indirect - github.com/DataDog/datadog-api-client-go/v2 v2.18.0 // indirect - github.com/DataDog/datadog-go/v5 v5.1.1 // indirect - github.com/DataDog/go-sqllexer v0.0.8 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect + github.com/ClickHouse/ch-go v0.61.5 // indirect + github.com/ClickHouse/clickhouse-go/v2 v2.23.0 // indirect + github.com/Code-Hex/go-generics-cache v1.3.1 // indirect + github.com/DataDog/agent-payload/v5 v5.0.111 // indirect + github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-api-client-go/v2 v2.24.0 // indirect + github.com/DataDog/datadog-go/v5 v5.5.0 // indirect + github.com/DataDog/go-sqllexer v0.0.9 // indirect github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect - github.com/DataDog/gohai v0.0.0-20220718130825-1776f9beb9cc // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 // indirect - github.com/DataDog/sketches-go v1.4.3 // indirect + github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.4 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4 // 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 - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.45.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.45.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.21.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.45.0 // indirect - github.com/IBM/sarama v1.42.1 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.46.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0 // indirect + github.com/IBM/sarama v1.43.1 // indirect github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect github.com/Masterminds/semver/v3 v3.2.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/Microsoft/hcsshim v0.11.4 // indirect + github.com/Microsoft/hcsshim v0.12.0-rc.3 // indirect github.com/ReneKroon/ttlcache/v2 v2.11.0 // indirect - github.com/SAP/go-hdb v1.6.2 // indirect - github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 // indirect + github.com/SAP/go-hdb v1.8.12 // indirect + github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/aerospike/aerospike-client-go/v6 v6.13.0 // indirect - github.com/alecthomas/participle/v2 v2.1.0 // indirect - github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect - github.com/aliyun/aliyun-log-go-sdk v0.1.63 // indirect - github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-00010101000000-000000000000 // indirect - github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-00010101000000-000000000000 // indirect - github.com/andybalholm/brotli v1.0.6 // indirect - github.com/antonmedv/expr v1.15.3 // indirect - github.com/apache/arrow/go/v12 v12.0.1 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect + github.com/aliyun/aliyun-log-go-sdk v0.1.72 // indirect + github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-20240419190856-2f880467f335 // indirect + github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20240415183253-230331014d2c // indirect + github.com/andybalholm/brotli v1.1.0 // indirect + github.com/apache/arrow/go/v15 v15.0.0 // indirect github.com/apache/pulsar-client-go v0.8.1 // indirect github.com/apache/pulsar-client-go/oauth2 v0.0.0-20220120090717-25e59572242e // indirect - github.com/apache/thrift v0.19.0 // indirect + github.com/apache/thrift v0.20.0 // indirect github.com/ardielle/ardielle-go v1.5.2 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.47.10 // indirect - github.com/aws/aws-sdk-go-v2 v1.22.2 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 // indirect - github.com/aws/aws-sdk-go-v2/config v1.24.0 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.15.2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3 // indirect + github.com/aws/aws-sdk-go v1.51.17 // indirect + github.com/aws/aws-sdk-go-v2 v1.26.1 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect + github.com/aws/aws-sdk-go-v2/config v1.27.11 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.11 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // 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.2.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 // indirect - github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.1 // indirect + github.com/aws/aws-sdk-go-v2/service/kinesis v1.27.4 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 // indirect - github.com/aws/smithy-go v1.16.0 // indirect + github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.29.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect + github.com/aws/smithy-go v1.20.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect github.com/buger/jsonparser v1.1.1 // indirect - github.com/caio/go-tdigest/v4 v4.0.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/checkpoint-restore/go-criu/v5 v5.3.0 // indirect github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect - github.com/cilium/ebpf v0.9.1 // indirect + github.com/cilium/ebpf v0.11.0 // indirect github.com/cloudfoundry-incubator/uaago v0.0.0-20190307164349-8136b7bbe76e // indirect - github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect - github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect - github.com/containerd/cgroups v1.1.0 // indirect - github.com/containerd/cgroups/v3 v3.0.2 // indirect + github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa // indirect + github.com/containerd/cgroups/v3 v3.0.3 // indirect github.com/containerd/console v1.0.3 // indirect - github.com/containerd/containerd v1.7.7 // indirect + github.com/containerd/errdefs v0.1.0 // indirect github.com/containerd/ttrpc v1.2.2 // indirect - github.com/coreos/go-oidc v2.2.1+incompatible // indirect + github.com/coreos/go-oidc/v3 v3.10.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cskr/pubsub v1.0.2 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/denisenkom/go-mssqldb v0.12.2 // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/devigned/tab v0.1.1 // indirect - github.com/digitalocean/godo v1.104.1 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.7+incompatible // indirect - github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 // indirect + github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect + github.com/digitalocean/godo v1.109.0 // indirect + github.com/distribution/reference v0.5.0 // indirect + github.com/docker/docker v25.0.5+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/dynatrace-oss/dynatrace-metric-utils-go v0.5.0 // indirect - github.com/eapache/go-resiliency v1.4.0 // indirect + github.com/eapache/go-resiliency v1.6.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect github.com/eapache/queue v1.1.0 // indirect github.com/elastic/go-elasticsearch/v7 v7.17.10 // indirect github.com/elastic/go-structform v0.0.10 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/envoyproxy/go-control-plane v0.11.1 // indirect - github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect + github.com/envoyproxy/go-control-plane v0.12.0 // indirect + github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect github.com/euank/go-kmsg-parser v2.0.0+incompatible // indirect - github.com/facebook/time v0.0.0-20220713225404-f7a0d7702d50 // indirect + github.com/expr-lang/expr v1.16.3 // indirect + github.com/facebook/time v0.0.0-20240109160331-d1456d1a6bac // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect - github.com/getsentry/sentry-go v0.25.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-faster/city v1.0.1 // indirect - github.com/go-faster/errors v0.6.1 // indirect - github.com/go-kit/kit v0.12.0 // indirect + github.com/go-faster/errors v0.7.1 // indirect + github.com/go-jose/go-jose/v4 v4.0.1 // indirect + github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.3.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/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.4 // indirect - github.com/go-redis/redis/v7 v7.4.1 // indirect - github.com/go-resty/resty/v2 v2.7.0 // indirect - github.com/go-sql-driver/mysql v1.7.1 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.20.4 // indirect + github.com/go-openapi/swag v0.22.9 // indirect + github.com/go-resty/resty/v2 v2.11.0 // indirect + github.com/go-sql-driver/mysql v1.8.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.2 // indirect - github.com/gocql/gocql v1.3.2 // indirect + github.com/gocql/gocql v1.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect - github.com/gofrs/uuid v4.3.1+incompatible // indirect + github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/golang-jwt/jwt/v5 v5.0.0 // indirect - github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect + github.com/golang-jwt/jwt/v5 v5.2.1 // indirect + github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/cadvisor v0.48.1 // indirect - github.com/google/flatbuffers v23.1.21+incompatible // indirect + github.com/google/cadvisor v0.49.0 // indirect + github.com/google/flatbuffers v23.5.26+incompatible // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gophercloud/gophercloud v1.7.0 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect + github.com/gophercloud/gophercloud v1.8.0 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/gosnmp/gosnmp v1.35.0 // indirect - github.com/grafana/loki/pkg/push v0.0.0-20230321110627-5c3d204ebf5d // indirect + github.com/gosnmp/gosnmp v1.37.0 // indirect + github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect - github.com/grobie/gomemcache v0.0.0-20180201122607-1f779c573665 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect + github.com/grobie/gomemcache v0.0.0-20230213081705-239240bbc445 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect - github.com/hashicorp/consul/api v1.25.1 // indirect + github.com/hashicorp/consul/api v1.28.2 // indirect github.com/hashicorp/cronexpr v1.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.4 // indirect @@ -417,185 +424,188 @@ require ( github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c // indirect + github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702 // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/hetznercloud/hcloud-go/v2 v2.4.0 // indirect + github.com/hetznercloud/hcloud-go/v2 v2.6.0 // indirect github.com/iancoleman/strcase v0.3.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 // indirect + github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 // indirect github.com/influxdata/influxdb-observability/common v0.5.8 // indirect github.com/influxdata/influxdb-observability/influx2otel v0.5.8 // indirect github.com/influxdata/influxdb-observability/otel2influx v0.5.8 // indirect github.com/influxdata/line-protocol/v2 v2.2.1 // indirect - github.com/ionos-cloud/sdk-go/v6 v6.1.9 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.11 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.14.0 // indirect + github.com/jackc/pgconn v1.14.3 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgproto3/v2 v2.3.2 // indirect + github.com/jackc/pgproto3/v2 v2.3.3 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/jackc/pgtype v1.14.0 // indirect - github.com/jackc/pgx/v4 v4.18.1 // indirect - github.com/jaegertracing/jaeger v1.48.0 // indirect + github.com/jackc/pgx/v4 v4.18.3 // indirect + github.com/jaegertracing/jaeger v1.55.0 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect github.com/jcmturner/gofork v1.7.6 // indirect + github.com/jcmturner/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/jellydator/ttlcache/v3 v3.1.0 // indirect + github.com/jellydator/ttlcache/v3 v3.2.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/julienschmidt/httprouter v1.3.0 // indirect github.com/karrick/godirwalk v1.17.0 // indirect - github.com/klauspost/asmfmt v1.3.2 // indirect - github.com/klauspost/compress v1.17.2 // indirect - github.com/klauspost/cpuid/v2 v2.2.3 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect github.com/kr/fs v0.1.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 // indirect github.com/leoluk/perflib_exporter v0.2.1 // indirect + github.com/lestrrat-go/strftime v1.0.6 // indirect github.com/lib/pq v1.10.9 // indirect github.com/lightstep/go-expohisto v1.0.0 // indirect github.com/linkedin/goavro/v2 v2.9.8 // indirect - github.com/linode/linodego v1.23.0 // indirect - github.com/logicmonitor/lm-data-sdk-go v1.0.0 // indirect + github.com/linode/linodego v1.30.0 // indirect + github.com/logicmonitor/lm-data-sdk-go v1.3.0 // indirect github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-ieproxy v0.0.9 // indirect + github.com/mattn/go-ieproxy v0.0.11 // indirect github.com/mattn/go-isatty v0.0.19 // indirect - github.com/mattn/go-sqlite3 v1.14.18 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/mattn/go-sqlite3 v1.14.22 // indirect github.com/microsoft/ApplicationInsights-Go v0.4.4 // indirect - github.com/miekg/dns v1.1.56 // indirect - github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect - github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect + github.com/microsoft/go-mssqldb v1.7.0 // indirect + github.com/miekg/dns v1.1.58 // indirect github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/hashstructure v1.1.0 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect + github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/sys/mountinfo v0.6.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mongodb-forks/digest v1.0.5 // indirect + github.com/mongodb-forks/digest v1.1.0 // indirect github.com/montanaflynn/stats v0.7.0 // indirect github.com/mostynb/go-grpc-compression v1.2.2 // indirect github.com/mrunalp/fileutils v0.5.1 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect - github.com/nginxinc/nginx-prometheus-exporter v0.8.1-0.20201110005315-f5a5f8086c19 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/collectd v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/loki v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/skywalking v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.89.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.89.0 // indirect + github.com/nginxinc/nginx-prometheus-exporter v0.11.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/collectd v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/loki v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/skywalking v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.98.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.98.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/runc v1.1.12 // indirect - github.com/opencontainers/runtime-spec v1.1.0-rc.3 // indirect + github.com/opencontainers/runtime-spec v1.1.0 // indirect github.com/opencontainers/selinux v1.11.0 // indirect + github.com/opensearch-project/opensearch-go/v2 v2.3.0 // indirect github.com/openshift/api v3.9.0+incompatible // indirect github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/openzipkin/zipkin-go v0.4.2 // indirect github.com/outcaste-io/ristretto v0.2.1 // indirect github.com/ovh/go-ovh v1.4.3 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect - github.com/paulmach/orb v0.10.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/paulmach/orb v0.11.1 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/philhofer/fwd v1.1.2 // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect - github.com/pierrec/lz4/v4 v4.1.18 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect + github.com/pierrec/lz4/v4 v4.1.21 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pkg/sftp v1.13.5 // indirect + github.com/pkg/sftp v1.13.6 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect github.com/pquerna/cachecontrol v0.1.0 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.52.2 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/prometheus v0.48.0 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect + github.com/prometheus/procfs v0.13.0 // indirect + github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/relvacode/iso8601 v1.3.0 // indirect + github.com/redis/go-redis/v9 v9.5.1 // indirect + github.com/relvacode/iso8601 v1.4.0 // indirect github.com/rs/cors v1.10.1 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 // indirect - github.com/scalyr/dataset-go v0.14.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/samber/lo v1.38.1 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 // indirect + github.com/scalyr/dataset-go v0.18.0 // indirect github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 // indirect github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect github.com/segmentio/asm v1.2.0 // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 // indirect - github.com/signalfx/sapm-proto v0.13.0 // indirect - github.com/sijms/go-ora/v2 v2.7.20 // indirect + github.com/signalfx/sapm-proto v0.14.0 // indirect + github.com/sijms/go-ora/v2 v2.8.11 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/snowflakedb/gosnowflake v1.6.25 // indirect + github.com/snowflakedb/gosnowflake v1.9.0 // indirect github.com/soheilhy/cmux v0.1.5 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cobra v1.8.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect - github.com/stretchr/testify v1.8.4 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/spf13/viper v1.18.2 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/stretchr/testify v1.9.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.792 // indirect - github.com/tg123/go-htpasswd v1.2.1 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.896 // indirect + github.com/tg123/go-htpasswd v1.2.2 // indirect github.com/tidwall/gjson v1.14.3 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect @@ -605,107 +615,110 @@ require ( github.com/tinylib/msgp v1.1.9 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect + github.com/valyala/fastjson v1.6.4 // indirect github.com/vincent-petithory/dataurl v1.0.0 // indirect github.com/vishvananda/netlink v1.2.1-beta.2 // indirect - github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect - github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f // indirect - github.com/vmware/govmomi v0.33.1 // indirect + github.com/vishvananda/netns v0.0.4 // indirect + github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e // indirect + github.com/vmware/govmomi v0.36.3 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect - github.com/wavefronthq/wavefront-sdk-go v0.15.0 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect - go.etcd.io/bbolt v1.3.8 // indirect - go.mongodb.org/atlas v0.35.0 // indirect - go.mongodb.org/mongo-driver v1.13.0 // indirect + go.etcd.io/bbolt v1.3.9 // indirect + go.mongodb.org/atlas v0.36.0 // indirect + go.mongodb.org/mongo-driver v1.14.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.89.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.89.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/connector v0.89.0 // indirect - go.opentelemetry.io/collector/consumer v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/collector/service v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect - go.opentelemetry.io/contrib/zpages v0.45.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk v1.20.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.98.0 // indirect + go.opentelemetry.io/collector/config/confighttp v0.98.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.98.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/collector/service v0.98.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.25.0 // indirect + go.opentelemetry.io/contrib/zpages v0.50.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.16.0 // indirect - golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.16.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/api v0.150.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/grpc v1.59.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.19.0 // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/api v0.172.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect - gopkg.in/square/go-jose.v2 v2.5.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 // indirect gotest.tools/v3 v3.5.0 // indirect - k8s.io/api v0.28.4 // indirect - k8s.io/apimachinery v0.28.4 // indirect - k8s.io/client-go v0.28.4 // indirect - k8s.io/klog v1.0.0 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/kubelet v0.28.4 // indirect - k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect - sigs.k8s.io/controller-runtime v0.16.3 // indirect + k8s.io/api v0.30.0 // indirect + k8s.io/apimachinery v0.30.0 // indirect + k8s.io/client-go v0.30.0 // indirect + k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect + k8s.io/kubelet v0.30.0 // indirect + k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect + sigs.k8s.io/controller-runtime v0.17.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect - skywalking.apache.org/repo/goapi v0.0.0-20231026090926-09378dd56587 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect + skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4 // indirect ) // Replace references to modules that are in this repository with their relateive paths @@ -777,8 +790,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datas replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter => ./exporter/dynatraceexporter -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter => ./exporter/f5cloudexporter - replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter => ./exporter/fileexporter replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter => ./exporter/googlecloudexporter @@ -805,6 +816,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmo replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter => ./exporter/opencensusexporter +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter => ./exporter/opensearchexporter + replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter => ./exporter/prometheusexporter replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter => ./exporter/prometheusremotewriteexporter @@ -823,8 +836,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splun replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter => ./exporter/sumologicexporter -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter => ./exporter/tanzuobservabilityexporter - replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter => ./exporter/tencentcloudlogserviceexporter replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter => ./exporter/elasticsearchexporter @@ -843,8 +854,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/head replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension => ./extension/healthcheckextension -replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder => ./extension/httpforwarder - replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension => ./extension/oauth2clientauthextension replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer => ./extension/observer @@ -863,6 +872,10 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage => ./extension/storage +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage => ./extension/storage/dbstorage + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage => ./extension/storage/filestorage + replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr => ./pkg/batchperresourceattr replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal => ./pkg/batchpersignal @@ -903,8 +916,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/attr replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor => ./processor/cumulativetodeltaprocessor/ -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor => ./processor/datadogprocessor - replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor => ./processor/deltatorateprocessor/ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor => ./processor/filterprocessor @@ -927,10 +938,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/ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor => ./processor/tailsamplingprocessor @@ -1143,6 +1150,23 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/collectd => ./internal/collectd +replace ( + github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector => ./connector/countconnector + github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector => ./connector/datadogconnector + github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector => ./connector/exceptionsconnector + github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector => ./connector/grafanacloudconnector + github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector => ./connector/routingconnector + 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 + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding => ./extension/encoding + +replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension => ./extension/encoding/otlpencodingextension + replace github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware => ./extension/awsmiddleware replace github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws => ./override/aws diff --git a/go.sum b/go.sum index 22573e312ac0..c6d6a8862583 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,10 @@ -bitbucket.org/atlassian/go-asap/v2 v2.6.0 h1:KiLw3IgbzFLqNxCrVZoKUDJKMxUGoOd+NEOYXGEBhJ0= -bitbucket.org/atlassian/go-asap/v2 v2.6.0/go.mod h1:cuRgWb7eeGtsocKmqY2kPlMMlwpkeNh+QOIkjAMlUBc= +bitbucket.org/atlassian/go-asap/v2 v2.8.0 h1:JL4jktrZT3H8GHkkeJ1RCdhJ5YcOyVccA/2TJ4ae3I0= +bitbucket.org/atlassian/go-asap/v2 v2.8.0/go.mod h1:cuRgWb7eeGtsocKmqY2kPlMMlwpkeNh+QOIkjAMlUBc= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -18,49 +17,47 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= -cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.2 h1:nWEMDhgbBkBJjfpVySqU4jgWdc22PLR0o4vEexZHers= -cloud.google.com/go/compute v1.23.2/go.mod h1:JJ0atRC0J/oWYiiVBmsSsrRnh92DhZPG4hFDcR04Rns= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= 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= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v1.1.4 h1:K6n/GZHFTtEoKT5aUG3l9diPi0VduZNQ1PfdnpkkIFk= -cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= -cloud.google.com/go/logging v1.8.1 h1:26skQWPeYhvIasWKm48+Eq7oUqdcdbwsCVwz5Ys0FvU= -cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= -cloud.google.com/go/longrunning v0.5.3 h1:maKa7O9YTzmVzwdlRKr981U1Ys2auup6rpeMt8y3+RU= -cloud.google.com/go/longrunning v0.5.3/go.mod h1:y/0ga59EYu58J6SHmmQOvekvND2qODbu8ywBBW7EK7Y= -cloud.google.com/go/monitoring v1.16.2 h1:gx7BDZcoRqX5DfuJzw9LdhVjEkqCLmDXScdnrmIy9ik= -cloud.google.com/go/monitoring v1.16.2/go.mod h1:B44KGwi4ZCF8Rk/5n+FWeispDXoKSk9oss2QNlXJBgc= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= +cloud.google.com/go/logging v1.9.0 h1:iEIOXFO9EmSiTjDmfpbRjOxECO7R8C7b8IXUGOj7xZw= +cloud.google.com/go/logging v1.9.0/go.mod h1:1Io0vnZv4onoUnsVUQY3HZ3Igb1nBchky0A0y7BBBhE= +cloud.google.com/go/longrunning v0.5.5 h1:GOE6pZFdSrTb4KAiKnXsJBtlE6mEyaW44oKyMILWnOg= +cloud.google.com/go/longrunning v0.5.5/go.mod h1:WV2LAxD8/rg5Z1cNW6FJ/ZpX4E4VnDnoTk0yawPBB7s= +cloud.google.com/go/monitoring v1.18.0 h1:NfkDLQDG2UR3WYZVQE8kwSbUIEyIqJUPl+aOQdFH1T4= +cloud.google.com/go/monitoring v1.18.0/go.mod h1:c92vVBCeq/OB4Ioyo+NbN2U7tlg5ZH41PZcdvfc+Lcg= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.33.0 h1:6SPCPvWav64tj0sVX/+npCBKhUi/UjJehy9op/V3p2g= -cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= -cloud.google.com/go/spanner v1.51.0 h1:l3exhhsVMKsx1E7Xd1QajYSvHmI1KZoWPW5tRxIIdvQ= -cloud.google.com/go/spanner v1.51.0/go.mod h1:c5KNo5LQ1X5tJwma9rSQZsXNBDNvj4/n8BVc3LNahq0= +cloud.google.com/go/pubsub v1.37.0 h1:0uEEfaB1VIJzabPpwpZf44zWAKAme3zwKKxHk7vJQxQ= +cloud.google.com/go/pubsub v1.37.0/go.mod h1:YQOQr1uiUM092EXwKs56OPT650nwnawc+8/IjoUeGzQ= +cloud.google.com/go/spanner v1.60.0 h1:O9kf49dfaDRzPpKJNChHUJ+Bao02WPedZb8ZPyi02lI= +cloud.google.com/go/spanner v1.60.0/go.mod h1:D2bOAeT/dC6zsZhXRIxbdYa5nQEYU3wYM/1KN3eg7Fs= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/trace v1.10.3 h1:yiQ2EdegdiZDPwNPoUqGYAMd0wNValT/NRsC1XGyBJ0= -cloud.google.com/go/trace v1.10.3/go.mod h1:Ke1bgfc73RV3wUFml+uQp7EsDw4dGaETLxB7Iq/r4CY= +cloud.google.com/go/trace v1.10.5 h1:0pr4lIKJ5XZFYD9GtxXEWr0KkVeigc3wlGpZco0X1oA= +cloud.google.com/go/trace v1.10.5/go.mod h1:9hjCV1nGBCtXbAE4YK7OqJ8pmPYSxPA0I67JwRd5s3M= code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= code.cloudfoundry.org/clock v1.0.0 h1:kFXWQM4bxYvdBw2X8BbBeXwQNgfoWv1vqAk2ZZyBN2o= code.cloudfoundry.org/clock v1.0.0/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= @@ -70,10 +67,11 @@ code.cloudfoundry.org/go-loggregator v7.4.0+incompatible h1:KqZYloMQWM5Zg/BQKunO code.cloudfoundry.org/go-loggregator v7.4.0+incompatible/go.mod h1:KPBTRqj+y738Nhf1+g4JHFaBU8j7dedirR5ETNHvMXU= code.cloudfoundry.org/rfc5424 v0.0.0-20201103192249-000122071b78 h1:mrZQaZmuDIPhSp6b96b+CRKC2uH44ifa5cjDV2epKis= code.cloudfoundry.org/rfc5424 v0.0.0-20201103192249-000122071b78/go.mod h1:tkZo8GtzBjySJ7USvxm4E36lNQw1D3xM6oKHGqdaAJ4= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= 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.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= @@ -83,42 +81,47 @@ github.com/AthenZ/athenz v1.10.39 h1:mtwHTF/v62ewY2Z5KWhuZgVXftBej1/Tn80zx4DcawY github.com/AthenZ/athenz v1.10.39/go.mod h1:3Tg8HLsiQZp81BJY58JBeU2BR6B/H4/0MQGfCwhHNEA= github.com/Azure/azure-amqp-common-go/v4 v4.2.0 h1:q/jLx1KJ8xeI8XGfkOWMN9XrXzAfVTkyvCxPvHCjd2I= github.com/Azure/azure-amqp-common-go/v4 v4.2.0/go.mod h1:GD3m/WPPma+621UaU6KNjKEo5Hl09z86viKwQjTpV0Q= -github.com/Azure/azure-event-hubs-go/v3 v3.6.1 h1:vSiMmn3tOwgiLyfnmhT5K6Of/3QWRLaaNZPI0hFvZyU= -github.com/Azure/azure-event-hubs-go/v3 v3.6.1/go.mod h1:i2NByb9Pr2na7y8wi/XefEVKkuA2CDUjCNoWQJtTsGo= -github.com/Azure/azure-kusto-go v0.13.1 h1:0w4CmUTROT8qbLbKq921PhCb7mIfRFWeDu4iJxrNEOM= -github.com/Azure/azure-kusto-go v0.13.1/go.mod h1:AyWTO0r50y7rAkxkTveLtn80njNyXpJP5WADvoSZ/P4= +github.com/Azure/azure-event-hubs-go/v3 v3.6.2 h1:7rNj1/iqS/i3mUKokA2n2eMYO72TB7lO7OmpbKoakKY= +github.com/Azure/azure-event-hubs-go/v3 v3.6.2/go.mod h1:n+ocYr9j2JCLYqUqz9eI+lx/TEAtL/g6rZzyTFSuIpc= +github.com/Azure/azure-kusto-go v0.15.2 h1:OlABJilic9TythSgWW6i8Fd0SgNTg0t9jBu6WVsaixM= +github.com/Azure/azure-kusto-go v0.15.2/go.mod h1:9F2zvXH8B6eWzgI1S4k1ZXAIufnBZ1bv1cW1kB1n3D0= github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U= github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 h1:9kDVnTz3vbfweTqAUmk/a/pH5pWFCHtvRpHYC0G/dcA= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0/go.mod h1:3Ug6Qzto9anB6mGlEdgYMDF5zHQ+wwhEaYR4s17PHMw= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= -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/resourcemanager/compute/armcompute/v4 v4.2.1 h1:UPeCRD+XY7QlaGQte2EVI2iOcWvUYA2XY8w5T/8v0NQ= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1/go.mod h1:oGV6NlB0cvi1ZbYRR2UN44QHxWFyGk+iylgD0qaMXjA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.8.0 h1:dKxKBzh+XIEoYNmx/c8HeiwghuRExXf61WmVotWESeA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.8.0/go.mod h1:kzRLpzzlw6eBUXE7eBw3oqfmKR/kxaHOk4+h9sAe6Yo= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 h1:QM6sE5k2ZT/vI5BEe0r7mqjsUSnhVBFbOsVkEuaEfiA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 h1:bWh0Z2rOEDfB/ywv/l0iHN1JgyazE6kW/aIA89+CEK0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1/go.mod h1:Bzf34hhAE9NSxailk8xVeLEZbUjOXcC+GnU1mMKdhLw= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0/go.mod h1:s1tW/At+xHqjNFvWU4G0c0Qv33KOhvbGNj0RCTQDV8s= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0 h1:Ma67P/GGprNwsslzEH6+Kb8nybI8jpDTm4Wmzu2ReK8= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 h1:gggzg0SUMs6SQbEw+3LoSsYf9YMjkupeAnHMX8O9mmY= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0/go.mod h1:+6KLcKIVgxoBDMqMO/Nvy7bZ9a0nbU3I1DtFQK3YvB4= -github.com/Azure/azure-storage-queue-go v0.0.0-20191125232315-636801874cdd h1:b3wyxBl3vvr15tUAziPBPK354y+LSdfPCpex5oBttHo= -github.com/Azure/azure-storage-queue-go v0.0.0-20191125232315-636801874cdd/go.mod h1:K6am8mT+5iFXgingS9LUc7TmbsW6XBw3nxaRyaMyWc8= -github.com/Azure/go-amqp v1.0.2 h1:zHCHId+kKC7fO8IkwyZJnWMvtRXhYC0VJtD0GYkHc6M= -github.com/Azure/go-amqp v1.0.2/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 h1:FDif4R1+UUR+00q6wquyX90K7A8dN+R5E8GEadoP7sU= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2/go.mod h1:aiYBYui4BJ/BJCAIKs92XiPyQfTaBWqvHujDwKb6CBU= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 h1:MxA59PGoCFb+vCwRQi3PhQEwHj4+r2dhuv9HG+vM7iM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0/go.mod h1:uYt4CfhkJA9o0FN7jfE5minm/i4nUE4MjGUJkzB6Zs8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 h1:PTFGRSlMKCQelWwxUyYVEUqseBJVemLyqWJjvMyt0do= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0/go.mod h1:LRr2FzBTQlONPPa5HREE5+RjSCTXl7BwOvYOaWTqCaI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.0.0 h1:pPvTJ1dY0sA35JOeFq6TsY2xj6Z85Yo23Pj4wCCvu4o= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.0.0/go.mod h1:mLfWfj8v3jfWKsL9G4eoBoXVcsqcIUTapmdKy7uGOp0= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0 h1:Ds0KRF8ggpEGg4Vo42oX1cIt/IfOhHWJBikksZbVxeg= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0/go.mod h1:jj6P8ybImR+5topJ+eH6fgcemSFBmU6/6bFF8KkwuDI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 h1:bXwSugBiSbgtz7rOtbfGf+woewp4f06orW9OP5BjHLA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0/go.mod h1:Y/HgrePTmGy9HjdSGTqZNa+apUpTVIEVKXJyARP2lrk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 h1:Dd+RhdJn0OTtVGaeDLZpcumkIVCtA/3/Fo42+eoYvVM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0/go.mod h1:5kakwfW5CjC9KK+Q4wjXAg+ShuIm2mBMua0ZFj2C8PE= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0/go.mod h1:T5RfihdXtBDxt1Ch2wobif3TvzTdumDy29kahv6AV9A= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1 h1:MyVTgWR8qd/Jw1Le0NZebGBUCLbtak3bJ3z1OlqZBpw= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1/go.mod h1:GpPjLhVR9dnUoJMyHWSPy71xY9/lcmpzIPZXmF0FCVY= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 h1:D3occbWoio4EBLkbkevetNMAVX197GkzbUMtqjGWn80= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0/go.mod h1:bTSOgj05NGRuHHhQwAdPnYr9TOdNmKlZTgGLL6nyAdI= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 h1:YUUxeiOWgdAQE3pXt2H7QXzZs0q8UBjgRbl56qo8GYM= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2/go.mod h1:dmXQgZuiSubAecswZE+Sm8jkvEa7kQgTPVRvwL/nd0E= +github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe h1:HGuouUM1533rBXmMtR7qh5pYNSSjUZG90b/MgJAnb/A= +github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe/go.mod h1:K6am8mT+5iFXgingS9LUc7TmbsW6XBw3nxaRyaMyWc8= +github.com/Azure/go-amqp v1.0.5 h1:po5+ljlcNSU8xtapHTe8gIc8yHxCzC03E8afH2g1ftU= +github.com/Azure/go-amqp v1.0.5/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= @@ -148,78 +151,83 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= -github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ClickHouse/ch-go v0.58.2 h1:jSm2szHbT9MCAB1rJ3WuCJqmGLi5UTjlNu+f530UTS0= -github.com/ClickHouse/ch-go v0.58.2/go.mod h1:Ap/0bEmiLa14gYjCiRkYGbXvbe8vwdrfTYWhsuQ99aw= -github.com/ClickHouse/clickhouse-go/v2 v2.15.0 h1:G0hTKyO8fXXR1bGnZ0DY3vTG01xYfOGW76zgjg5tmC4= -github.com/ClickHouse/clickhouse-go/v2 v2.15.0/go.mod h1:kXt1SRq0PIRa6aKZD7TnFnY9PQKmc2b13sHtOYcK6cQ= -github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= -github.com/DataDog/agent-payload/v5 v5.0.89 h1:uuLWf/exyNYBnheG9OH2dOWZpCJvaEHX3W9CAd8KarU= -github.com/DataDog/agent-payload/v5 v5.0.89/go.mod h1:oQZi1VZp1e3QvlSUX4iphZCpJaFepUxWq0hNXxihKBM= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1 h1:W6IVI3zWwoJGcFagJ/kwltFL1IIErBZzcBy994PQsQE= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0-rc.1/go.mod h1:A4nLJvxlg6BO/8/zg81til9yT0uRPuXDFMAzDMpmgn4= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1 h1:zDhs0MnT72cZOxxbPjkGI00NMYgsydOanBX3GZHuS1I= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-rc.1/go.mod h1:HvK26YCxg6MfYvPJgpHC7nSjw6DTpNhd75Wlb0GAvis= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1 h1:EywptZStgHbDWLScnHfaCj6QNb698DY68pCnPEQrsts= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0-rc.1/go.mod h1:Vc+snp0Bey4MrrJyiV2tVxxJb6BmLomPvN1RgAvjGaQ= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1 h1:A1uj4IMFs4rWp5LRalsqqnoC1f7QuYuN/b6/L7k4KCc= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-rc.1/go.mod h1:Q84EzSKpY/HtasusZM4ZPuYqbPQEbmIcAGzd7tXUX1I= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1 h1:iJSVz+YsndcMA/yYNih/qmuvwD1AR7IYX0cXXePpeys= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.0-rc.1/go.mod h1:JUOECuM5XcoxjEPs30C568vGBWtqScjnsC2KXY1OQ7Y= -github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1 h1:NK2kcRdv/r0WycAlGD2JFSmOcNvazzilPvZzk3l105g= -github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.1/go.mod h1:RMBDVajNx78CpFHnbat0aIGcwVQZp8s+smRlcJkvZGg= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1 h1:SgaCKuX9e3O5eLRIr+zqW1dlIw/TP3RDKQZUa2FfF8c= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.1/go.mod h1:eTXti9mx7qhkoi+Qg3mMmvVY5McghUUgsf4Hrk9zY8k= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1 h1:aCDYC/AkDS/EOm4GV1bFmiev6pTt+Qjj1yGBJv8U7+k= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.1/go.mod h1:EOGgNrSPskIxY3+KgCl+yEggMjrGqrA2oL5va+/p2jM= -github.com/DataDog/datadog-api-client-go/v2 v2.18.0 h1:QkX1vY1JtvDeF6N6EarPrJMHlerVGdTvGQOUWqfeVDs= -github.com/DataDog/datadog-api-client-go/v2 v2.18.0/go.mod h1:lHlfhsNQ2qZclvpVQTfrGowUDIdIzAao38A05f9EQpc= +github.com/ClickHouse/ch-go v0.61.5 h1:zwR8QbYI0tsMiEcze/uIMK+Tz1D3XZXLdNrlaOpeEI4= +github.com/ClickHouse/ch-go v0.61.5/go.mod h1:s1LJW/F/LcFs5HJnuogFMta50kKDO0lf9zzfrbl0RQg= +github.com/ClickHouse/clickhouse-go/v2 v2.23.0 h1:srmRrkS0BR8gEut87u8jpcZ7geOob6nGj9ifrb+aKmg= +github.com/ClickHouse/clickhouse-go/v2 v2.23.0/go.mod h1:tBhdF3f3RdP7sS59+oBAtTyhWpy0024ZxDMhgxra0QE= +github.com/Code-Hex/go-generics-cache v1.3.1 h1:i8rLwyhoyhaerr7JpjtYjJZUcCbWOdiYO3fZXLiEC4g= +github.com/Code-Hex/go-generics-cache v1.3.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= +github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= +github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= +github.com/DataDog/agent-payload/v5 v5.0.111 h1:mM+4OBkXF9tjKV0VjwnNO5As9aKcNAEsagvKDSBaTyc= +github.com/DataDog/agent-payload/v5 v5.0.111/go.mod h1:COngtbYYCncpIPiE5D93QlXDH/3VAKk10jDNwGHcMRE= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae h1:aVo1Uh2WQ8TvgbjqlbDvfP5AcUtnqXUUrc9pVP8MvKc= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:AVPQWekk3h9AOC7+plBlNB68Sy6UIGFoMMVUDeSoNoI= +github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae h1:b6lU79trCyadhkxhb51jXiqmZaHs1Z0fwWlWKFVCqJ4= +github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:s6zD4ZvPBta68SBCsCnnbn3VJzoQk5wNd0VJOpB84Ug= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae h1:/vfuF60+5qeGM62IDG1F6Asfa1VGAohiQVivRo9TWoo= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:JhAilx32dkIgoDkFXquCTfaWDsAOfe+vfBaxbiZoPI0= +github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae h1:B1E9jVLpw+Hrcv9ggzCridX3YMeUmZBE3zHghdwfTSc= +github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:1FTu8gSg8Pd8DVgRfxlcPN4F+d8K7A3lbMCT84FX44Y= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae h1:GL9JPEUyKDH2brURt09llrqWBmExCuqbHeWucezZ6sY= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:OnkC+HYj+NU9dmowWVtFpmnA4wVVibejbzID7TNm7jA= +github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae h1:sUEteYos3JjJJB1+A9inYJ3uzM18t9cygjSs0cik8x4= +github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:z4lpju3fhDa8JcbXxU0Bc6A6ci8xoQMuxDXbBdf4gHw= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae h1:qveAzof7ZZXvm93FL7h5mRM8B4q9w14g2fx6wcZt88k= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:HgJEYNmnFTKIuBhWxYe1coqmzoJXMxQTfK+4wIG5G1Q= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae h1:YZz6I8ym9P4MLytAdAJlafF3tgItgAGZrDqe4otbVUk= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:EVETfdJCkqy0YEvSpQd9LZdcYQ7vrUomCm+bQ6h3lc4= +github.com/DataDog/datadog-api-client-go/v2 v2.24.0 h1:7G+eyezFM8gHq5dOHcrQcGVxrXnwPqX2yYHxsLiq3iM= +github.com/DataDog/datadog-api-client-go/v2 v2.24.0/go.mod h1:QKOu6vscsh87fMY1lHfLEmNSunyXImj8BUaUWJXOehc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/datadog-go/v5 v5.1.1 h1:JLZ6s2K1pG2h9GkvEvMdEGqMDyVLEAccdX5TltWcLMU= -github.com/DataDog/datadog-go/v5 v5.1.1/go.mod h1:KhiYb2Badlv9/rofz+OznKoEF5XKTonWyhx5K83AP8E= -github.com/DataDog/go-sqllexer v0.0.8 h1:vfC8R9PhmJfeOKcFYAX9UOd890A3wu3KrjU9Kr7nM0E= -github.com/DataDog/go-sqllexer v0.0.8/go.mod h1:nB4Ea2YNsqMwtbWMc4Fm/oP98IIrSPapqwOwPioMspY= +github.com/DataDog/datadog-go/v5 v5.5.0 h1:G5KHeB8pWBNXT4Jtw0zAkhdxEAWSpWH00geHI6LDrKU= +github.com/DataDog/datadog-go/v5 v5.5.0/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= +github.com/DataDog/go-sqllexer v0.0.9 h1:Cx2Cu1S0hfj4coCCA8hzjM9+UNFRkcu1avIV//RU5Qw= +github.com/DataDog/go-sqllexer v0.0.9/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/gohai v0.0.0-20220718130825-1776f9beb9cc h1:gtlKB6B50/UEuFm1LeMn0R5a+tubx69OecPqxfXJDmU= -github.com/DataDog/gohai v0.0.0-20220718130825-1776f9beb9cc/go.mod h1:oyPC4jWHHjVVNjslDAKp8EqfQBaSmODjHt4HCX+C+9Q= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1 h1:16YkGLmeJH830m3dG0owtdSMXDkmTZdRd1EWZ1XIO6M= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.1/go.mod h1:re1FCVuKWovntr4bODIUe+iYT2Al0gbS0WK726XLz7w= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.8.1 h1:0GyngySyxePf1RozAdm8p51uxT/kDsxqhzWPZGNrqVg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 h1:ly/egks++IqejMVPcp0OWV1fcL+Nsq4EHF48AAQPKu4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1/go.mod h1:8jOAAH5PrNN6zICpu65M7mNPAeOQsW5Wk/sq80txutA= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1 h1:UizDxaGWPDNzR2orQTE9poYyP09B2OhlaeiY5vdr+EU= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.8.1/go.mod h1:2043mFAA2cD68ilZ93/5zZfL9BxWwj8z9sleaw3rtiY= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 h1:TbZDzUrW8iahevDY5Xw+j1EfrX8XZdeg/M6UYBl9mxg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1/go.mod h1:nVIKiAwP/Zd8IFxeHhEAiirJRH1kOOoZ315HQeSEkng= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 h1:4cyzwoXrnjElTIlsFbpyXQkAJs3+6ly9HExOu9lrup4= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1/go.mod h1:3AEt8/uCtbpzjPOPPxIBDcR1qcUq2hBbrkrdE/qNfb0= -github.com/DataDog/sketches-go v1.4.3 h1:ZB9nijteJRFUQixkQfatCqASartGNfiolIlMiEv3u/w= -github.com/DataDog/sketches-go v1.4.3/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= +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.4 h1:PTIZJAsfnr2XLB3V3duL+mSbZvYV8G3XQ9e57KyOuOA= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.4/go.mod h1:5yS6i90MEZS3NG+o7PrQQ8i7OaEMzwQvn4bCZ9h9Rao= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.4 h1:B2R7Wh791uphpltmorbvvdKk0rJOhoExwM4NnE7hXTg= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.4/go.mod h1:Tk2wwdBgWeSvDPtrGGyym8CdVWSuphiToGc/tRvFoNQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0 h1:10TPqpTlIkmDPFWVIEZ4ZX3rWrCrx3rEoeoAooZr6LM= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.14.0/go.mod h1:dvIWN9pA2zWNTw5rhDWZgzZnhcfpH++d+8d1SWW6xkY= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4 h1:dU9oPMbAr/wYMNdzhu0pxIhAJOn1Btj1T3ZSyY6RvY0= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.4/go.mod h1:ud/Xr5TWUopcaGHdkh9RN8lhnCAFa95X16Rb5mrkE18= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4 h1:ZuYc5Ql/GSyAEMgpKkbQiHOtIHkEpYujITW1wIVFgLE= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4/go.mod h1:YSntkplFoUM1mepnPeJFsoblqD0Wdi+Avg1/d1upgZQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4 h1:t/Zh8ztLDBOMRMiuVNFthWMMG5F4POgc5M6+Y3DTX9g= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4/go.mod h1:JfdBBDreQfbIN5FYrAtZV3VmQMXnf9o4tMbaMxWqe40= +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= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 h1:KeNholpO2xKjgaaSyd+DyQRrsQjhbSeS7qe4nEw8aQw= github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962/go.mod h1:kC29dT1vFpj7py2OvG1khBdQpo3kInWP+6QipLbdngo= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0 h1:tk85AYGwOf6VNtoOQi8w/kVDi2vmPxp3/OU2FsUpdcA= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0/go.mod h1:Xx0VKh7GJ4si3rmElbh19Mejxz68ibWg/J30ZOMrqzU= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.45.0 h1:jYuZ3VSmHtR/OE4ZNlhgaWefopMKh8kxHMITQ7hXB0s= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.45.0/go.mod h1:b8EPYWl+yGWfPDP2P1slOiJkimNOQMD34szyZt1G0+s= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.45.0 h1:Kim3EFONcbm78LF3B/EPFegmsKtFYBNcoJ89ubBPblw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.45.0/go.mod h1:wyhLy43DJk49NlzxNhoqF0ueRjS3oBMJc1bjTmyYxiQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.21.0 h1:OEgjQy1rH4Fbn5IpuI9d0uhLl+j6DkDvh9Q2Ucd6GK8= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.21.0/go.mod h1:EUfJ8lb3pjD8VasPPwqIvG2XVCE6DOT8tY5tcwbWA+A= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.45.0 h1:/BF7rO6PYcmFoyJrq6HA3LqQpFSQei9aNuO1fvV3OqU= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.45.0 h1:o/Nf55GfyLwGDaHkVAkRGgBXeExce73L6N9w2PZTB3k= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.45.0/go.mod h1:qkFPtMouQjW5ugdHIOthiTbweVHUTqbS0Qsu55KqXks= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0 h1:PWcDbDjrcT/ZHLn4Bc/FuglaZZVPP8bWO/YRmJBbe38= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0/go.mod h1:XEK/YHYsi+Wk2Bk1+zi/he+gjRfDWtoIZEZwuwcYjhk= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0 h1:7jymiL7lvmjgG8hMfvZ6qqA39VuiGEmCmFLd0N0tMKY= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.46.0/go.mod h1:w3gKj9vyvd9n8jh2jpOMVLGy87QqB/AxDek2CoRwpt0= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.46.0 h1:kitScZTE4xINfkp7W3duwPe18Jp8OPjm14Ybxgjrp3E= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.46.0/go.mod h1:r+z/vuDdIelQGGJHiVMvNPCW3NiRNpFaeA9OT4L/K/c= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0 h1:xl4IRfBXPZxwu7dIza8n6wdX5zEJpi0boF5dX22MbYE= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.22.0/go.mod h1:P69hhmQh4zwnU5iEdGVowFWg1DiP9x2KsCYBOIaP4us= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.46.0 h1:vaXjFX09ygxNxAiHwByzPBVKltYFVZR8HN4U3TR4vn8= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.46.0/go.mod h1:V28hx+cUCZC9e3qcqszMb+Sbt8cQZtHTiXOmyDzoDOg= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0 h1:xlfPHZ5QFvHad9KmrVDoaPpJUT/XluwNDMNHn+k7z/s= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.46.0/go.mod h1:mzI44HpPp75Z8/a1sJP1asdHdu7Wui7t10SZ9EEPPnM= github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/IBM/sarama v1.42.1 h1:wugyWa15TDEHh2kvq2gAy1IHLjEjuYOYgXz/ruC/OSQ= -github.com/IBM/sarama v1.42.1/go.mod h1:Xxho9HkHd4K/MDUo/T/sOqwtX/17D33++E9Wib6hUdQ= +github.com/IBM/sarama v1.43.1 h1:Z5uz65Px7f4DhI/jQqEm/tV9t8aU+JUdTyW/K/fCXpA= +github.com/IBM/sarama v1.43.1/go.mod h1:GG5q1RURtDNPz8xxJs3mgX6Ytak8Z9eLhAkJPObe2xE= 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/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= @@ -229,8 +237,8 @@ github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYr github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= -github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= +github.com/Microsoft/hcsshim v0.12.0-rc.3 h1:5GNGrobGs/sN/0nFO21W9k4lFn+iXXZAE8fCZbmdRak= +github.com/Microsoft/hcsshim v0.12.0-rc.3/go.mod h1:WuNfcaYNaw+KpCEsZCIM6HCEmu0c5HfXpi+dDSmveP0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/Netflix/go-env v0.0.0-20220526054621-78278af1949d h1:wvStE9wLpws31NiWUx+38wny1msZ/tm+eL5xmm4Y7So= github.com/Netflix/go-env v0.0.0-20220526054621-78278af1949d/go.mod h1:9XMFaCeRyW7fC9XJOWQ+NdAv8VLG7ys7l3x4ozEGLUQ= @@ -239,10 +247,11 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/ReneKroon/ttlcache/v2 v2.11.0 h1:OvlcYFYi941SBN3v9dsDcC2N8vRxyHcCmJb3Vl4QMoM= github.com/ReneKroon/ttlcache/v2 v2.11.0/go.mod h1:mBxvsNY+BT8qLLd6CuAJubbKo6r0jh3nb5et22bbfGY= -github.com/SAP/go-hdb v1.6.2 h1:sC0OjTEfPnycIktkCDvS7GelaGOiRrhWE0GWUt05QP8= -github.com/SAP/go-hdb v1.6.2/go.mod h1:xXsEywFErhpCuRVQ3HfjI7H7fPLYPMnMTWa9D5Enx0Q= -github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 h1:koK7z0nSsRiRiBWwa+E714Puh+DO+ZRdIyAXiXzL+lg= +github.com/SAP/go-hdb v1.8.12 h1:F/bpSlPZG0CvVWlTxxiEHGnynA8uILCPoIRoG+iMmkE= +github.com/SAP/go-hdb v1.8.12/go.mod h1:SNF6129HdtfK0ve8LQIeHEYwNu5CCJr7vXmhA4UbkNw= github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= +github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc h1:MhBvG7RLaLqlyjxMR6of35vt6MVQ+eXMcgn9X/sy0FE= +github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/Showmax/go-fqdn v1.0.0 h1:0rG5IbmVliNT5O19Mfuvna9LL7zlHyRfsSvBPZmF9tM= @@ -254,16 +263,18 @@ github.com/aerospike/aerospike-client-go/v6 v6.13.0/go.mod h1:2Syy0n4FKdgJxn0ZCf github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= -github.com/alecthomas/participle/v2 v2.1.0 h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4= -github.com/alecthomas/participle/v2 v2.1.0/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4 h1:iC9YFYKDGEy3n/FtqJnOkZsene9olVspKmkX5A2YBEo= github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4/go.mod h1:sCavSAvdzOjul4cEqeVtvlSaSScfNsTQ+46HwlTL1hc= github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.2/go.mod h1:5JHVmnHvGzR2wNdgaW1zDLQG8kOC4Uec8ubkMogW7OQ= @@ -291,24 +302,23 @@ github.com/alibabacloud-go/tea-utils/v2 v2.0.1 h1:K6kwgo+UiYx+/kr6CO0PN5ACZDzE3n github.com/alibabacloud-go/tea-utils/v2 v2.0.1/go.mod h1:U5MTY10WwlquGPS34DOeomUGBB0gXbLueiq5Trwu0C4= github.com/alibabacloud-go/tea-xml v1.1.2 h1:oLxa7JUXm2EDFzMg+7oRsYc+kutgCVwm+bZlhhmvW5M= github.com/alibabacloud-go/tea-xml v1.1.2/go.mod h1:Rq08vgCcCAjHyRi/M7xlHKUykZCEtyBy9+DPF6GgEu8= -github.com/aliyun/aliyun-log-go-sdk v0.1.63 h1:XeKeHgQS0Aoo6BtzF7vB/PlhzqK1/xuPdLr7mLMOp9Y= -github.com/aliyun/aliyun-log-go-sdk v0.1.63/go.mod h1:FSKcIjukUy+LeUKhRk13PCO+9gPMTfGsYhFBHQbDqmM= +github.com/aliyun/aliyun-log-go-sdk v0.1.72 h1:8Gvg3ydMG4bbF7DkTb4m3odd5BRFXo0LmhNBv/xg7Mo= +github.com/aliyun/aliyun-log-go-sdk v0.1.72/go.mod h1:FSKcIjukUy+LeUKhRk13PCO+9gPMTfGsYhFBHQbDqmM= github.com/aliyun/credentials-go v1.1.2 h1:qU1vwGIBb3UJ8BwunHDRFtAhS6jnQLnde/yk0+Ih2GY= github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw= -github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= -github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= -github.com/apache/arrow/go/v12 v12.0.1 h1:JsR2+hzYYjgSUkBSaahpqCetqZMr76djX80fF/DiJbg= -github.com/apache/arrow/go/v12 v12.0.1/go.mod h1:weuTY7JvTG/HDPtMQxEUp7pU73vkLWMLpY67QwZ/WWw= +github.com/apache/arrow/go/v15 v15.0.0 h1:1zZACWf85oEZY5/kd9dsQS7i+2G5zVQcbKTHgslqHNA= +github.com/apache/arrow/go/v15 v15.0.0/go.mod h1:DGXsR3ajT524njufqf95822i+KTh+yea1jass9YXgjA= github.com/apache/pulsar-client-go v0.8.1 h1:UZINLbH3I5YtNzqkju7g9vrl4CKrEgYSx2rbpvGufrE= github.com/apache/pulsar-client-go v0.8.1/go.mod h1:yJNcvn/IurarFDxwmoZvb2Ieylg630ifxeO/iXpk27I= github.com/apache/pulsar-client-go/oauth2 v0.0.0-20220120090717-25e59572242e h1:EqiJ0Xil8NmcXyupNqXV9oYDBeWntEIegxLahrTr8DY= github.com/apache/pulsar-client-go/oauth2 v0.0.0-20220120090717-25e59572242e/go.mod h1:Xee4tgYLFpYcPMcTfBYWE1uKRzeciodGTSEDMzsR6i8= -github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= -github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= +github.com/apache/thrift v0.20.0 h1:631+KvYbsBZxmuJjYwhezVsrfc/TbqtZV4QcxOX1fOI= +github.com/apache/thrift v0.20.0/go.mod h1:hOk1BQqcp2OLzGsyVXdfMk7YFlMxK3aoEVhjD06QhB8= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= +github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= github.com/ardielle/ardielle-go v1.5.2 h1:TilHTpHIQJ27R1Tl/iITBzMwiUGSlVfiVhwDNGM3Zj4= github.com/ardielle/ardielle-go v1.5.2/go.mod h1:I4hy1n795cUhaVt/ojz83SNVCYIGsAFAONtv2Dr7HUI= github.com/ardielle/ardielle-tools v1.5.4/go.mod h1:oZN+JRMnqGiIhrzkRN9l26Cej9dEx4jeNG6A+AdkShk= @@ -323,76 +333,94 @@ github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:l github.com/aws/aws-sdk-go v1.32.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2 v1.17.7/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= +github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2 v1.22.2 h1:lV0U8fnhAnPz8YcdmZVV60+tr6CakHzqA6P8T46ExJI= -github.com/aws/aws-sdk-go-v2 v1.22.2/go.mod h1:Kd0OJtkW3Q0M0lUWGszapWjEvrXDzRW+D21JNsroB+c= +github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA= +github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= 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/aws/protocol/eventstream v1.4.13/go.mod h1:gpAbvyDGQFozTEmlTFO8XcQKHzubdq0LzRyJpG6MiXM= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 h1:hHgLiIrTRtddC0AKcJr5s7i/hLgcpTt+q/FKxf1Zayk= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0/go.mod h1:w4I/v3NOWgD+qvs1NPEwhd++1h3XPHFaVxasfY6HlYQ= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= github.com/aws/aws-sdk-go-v2/config v1.18.19/go.mod h1:XvTmGMY8d52ougvakOv1RpiTLPz9dlG/OQHsKU/cMmY= -github.com/aws/aws-sdk-go-v2/config v1.24.0 h1:4LEk29JO3w+y9dEo/5Tq5QTP7uIEw+KQrKiHOs4xlu4= -github.com/aws/aws-sdk-go-v2/config v1.24.0/go.mod h1:11nNDAuK86kOUHeuEQo8f3CkcV5xuUxvPwFjTZE/PnQ= +github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= +github.com/aws/aws-sdk-go-v2/config v1.27.11 h1:f47rANd2LQEYHda2ddSCKYId18/8BhSRM4BULGmfgNA= +github.com/aws/aws-sdk-go-v2/config v1.27.11/go.mod h1:SMsV78RIOYdve1vf36z8LmnszlRWkwMQtomCAI0/mIE= github.com/aws/aws-sdk-go-v2/credentials v1.13.18/go.mod h1:vnwlwjIe+3XJPBYKu1et30ZPABG3VaXJYr8ryohpIyM= -github.com/aws/aws-sdk-go-v2/credentials v1.15.2 h1:rKH7khRMxPdD0u3dHecd0Q7NOVw3EUe7AqdkUOkiOGI= -github.com/aws/aws-sdk-go-v2/credentials v1.15.2/go.mod h1:tXM8wmaeAhfC7nZoCxb0FzM/aRaB1m1WQ7x0qlBLq80= +github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11 h1:YuIB1dJNf1Re822rriUOTxopaHHvIq0l/pX3fwO+Tzs= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6EKL+NcD7LG3dpKGMV4SShgo= 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/ec2/imds v1.14.3 h1:G5KawTAkyHH6WyKQCdHiW4h3PmAXNJpOgwKg3H7sDRE= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3/go.mod h1:hugKmSFnZB+HgNI1sYGT14BUPZkO6alC/e0AWu+0IAQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= 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/go.mod h1:QT0BqUvX1Bh2ABdTGnjqEjvjzrCfIniM9Sc8zn9Yndo= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2 h1:AaQsr5vvGR7rmeSWBtTCcw16tT9r51mWijuCQhzLnq8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2/go.mod h1:o1IiRn7CWocIFTXJjGKJDOwxv1ibL53NpcvcqGWyRBA= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= 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/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 h1:UZx8SXZ0YtzRiALzYAWcjb9Y9hZUR7MBKaBQ5ouOjPs= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2/go.mod h1:ipuRpcSaklmxR6C39G187TpBAO132gUfleTGccUPs8c= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc= 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/ini v1.7.0 h1:usgqiJtamuGIBj+OvYmMq89+Z1hIKkMJToz1WpoeNUY= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= 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/internal/v4a v1.1.4 h1:6lJvvkQ9HmbHZ4h/IEwclwv2mrTW8Uq1SOB/kXy0mfw= github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4/go.mod h1:1PrKYwxTM+zjpw9Y41KFtoJCQrJ34Z47Y4VgVbfndjo= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 h1:m0QTSI6pZYJTk5WSKx3fm5cNW/DCicVzULBgU/6IyD0= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14/go.mod h1:dDilntgHy9WnHXsh7dDtUPgHKEfTJIBUTHM8OWm0f/0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= 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/checksum v1.1.36 h1:eev2yZX7esGRjqRbnVk1UxMLw4CyVZDpZXRCcy75oQk= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36/go.mod h1:lGnOkH9NJATw0XEPcAknFBj3zzNTEGRHtSw+CwC1YTg= 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/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 h1:h7j73yuAVVjic8pqswh+L/7r2IHP43QwRyOu6zcCDDE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2/go.mod h1:H07AHdK5LSy8F7EJUQhoxyiCNkePoHj2D8P2yGTWafo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= 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/internal/s3shared v1.15.4 h1:v0jkRigbSD6uOdwcaUQmgEwG1BkPfAPDqaeNt/29ghg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4/go.mod h1:LhTyt8J04LL+9cIt7pYJ5lbS/U98ZmXovLOR/4LUsk8= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.1 h1:wLRIuz/llNgtN1OvZDmSotR+hjIXSxbxX/3Nw9ViaRg= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.1/go.mod h1:tMRFyoPjrh0oGqCKQHOf1EkxVzLynY/uQk2pejYVrzk= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.27.4 h1:Oe8awBiS/iitcsRJB5+DHa3iCxoA0KwJJf0JNrYMINY= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.27.4/go.mod h1:RCZCSFbieSgNG1RKegO26opXV4EXyef/vNBVJsUyHuw= 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/s3 v1.40.0 h1:wl5dxN1NONhTDQD9uaEvNsDRX29cBmGED/nl0jkWlt4= github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0/go.mod h1:rDGMZA7f4pbmTtPOk5v5UM2lmX6UAbRnMDJeDvnH7AM= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.29.5 h1:a3nFS1TFNTH9TVizItnHz3BgPCk5/7ygrZQZAoUV3GA= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.29.5/go.mod h1:3pzLFJnbjkymz6RdZ963DuvMR9rzrKMXrlbteSk4Sxc= 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/sso v1.17.1 h1:km+ZNjtLtpXYf42RdaDZnNHm9s7SYAuDGTafy6nd89A= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.1/go.mod h1:aHBr3pvBSD5MbzOvQtYutyPLLRPbl/y9x86XyJJnUXQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= 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/ssooidc v1.19.1 h1:iRFNqZH4a67IqPvK8xxtyQYnyrlsvwmpHOe9r55ggBA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1/go.mod h1:pTy5WM+6sNv2tB24JNKFtn6EvciQ5k40ZJ0pq/Iaxj0= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= github.com/aws/aws-sdk-go-v2/service/sts v1.18.7/go.mod h1:JuTnSoeePXmMVe9G8NcjjwgOKEfZ4cOjMuT2IBT/2eI= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 h1:txgVXIXWPXyqdiVn92BV6a/rgtpX31HYdsOYj0sVQQQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.1/go.mod h1:VAiJiNaoP1L89STFlEMgmHX1bKixY+FaP+TpRFrmyZ4= +github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/aws/smithy-go v1.16.0 h1:gJZEH/Fqh+RsvlJ1Zt4tVAtV6bKkp3cC+R6FCZMNzik= -github.com/aws/smithy-go v1.16.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= +github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/basgys/goxml2json v1.1.0 h1:4ln5i4rseYfXNd86lGEB+Vi652IsIXIvggKM/BhUKVw= +github.com/basgys/goxml2json v1.1.0/go.mod h1:wH7a5Np/Q4QoECFIU8zTQlZwZkrilY0itPfecMw41Dw= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/beefsack/go-rate v0.0.0-20220214233405-116f4ca011a0/go.mod h1:6YNgTHLutezwnBvyneBbwvB8C82y3dcoOj5EQJIdGXA= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -410,24 +438,26 @@ github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTS github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q= +github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= +github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/caio/go-tdigest/v4 v4.0.1 h1:sx4ZxjmIEcLROUPs2j1BGe2WhOtHD6VSe6NNbBdKYh4= -github.com/caio/go-tdigest/v4 v4.0.1/go.mod h1:Wsa+f0EZnV2gShdj1adgl0tQSoXRxtM0QioTgukFw8U= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/go-criu/v5 v5.3.0 h1:wpFFOoomK3389ue2lAb0Boag6XPht5QYpipxmSNL4d8= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -436,8 +466,8 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/cihub/seelog v0.0.0-20151216151435-d2c6e5aa9fbf/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1c8PVE1PubbNx3mjUr09OqWGCs= github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= -github.com/cilium/ebpf v0.9.1 h1:64sn2K3UKw8NbP/blsixRpF3nXuyhz/VjRlRzvlBRu4= -github.com/cilium/ebpf v0.9.1/go.mod h1:+OhNOIXx/Fnu1IE8bJz2dzOA+VSfyTfdNUVdlQnxUFY= +github.com/cilium/ebpf v0.11.0 h1:V8gS/bTCCjX9uUnkUFUpPsksM8n1lXBAvHcpiFk1X2Y= +github.com/cilium/ebpf v0.11.0/go.mod h1:WE7CZAnqOL2RouJ4f1uyNhqr2P4CCvXFIqdRDUgWsVs= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I= @@ -452,28 +482,27 @@ github.com/cloudfoundry-incubator/uaago v0.0.0-20190307164349-8136b7bbe76e/go.mo github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= -github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= -github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0= -github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE= +github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= +github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.7.7 h1:QOC2K4A42RQpcrZyptP6z9EJZnlHfHJUfZrAAHe15q4= -github.com/containerd/containerd v1.7.7/go.mod h1:3c4XZv6VeT9qgf9GMTxNTMFxGJrGpI2vz1yk4ye+YY8= +github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= +github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= +github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= +github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/ttrpc v1.2.2 h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtOs= github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak= github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= -github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk= -github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= +github.com/coreos/go-oidc/v3 v3.10.0 h1:tDnXHnLyiTVyT/2zLDGj09pFPkhND8Gl8lnTRhoEaJU= +github.com/coreos/go-oidc/v3 v3.10.0/go.mod h1:5j11xcw0D3+SGxn6Z/WFADsgcWVMyNAlSQupk0KK3ac= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -481,6 +510,7 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= +github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -496,29 +526,29 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/deepmap/oapi-codegen v1.12.4 h1:pPmn6qI9MuOtCz82WY2Xaw46EQjgvxednXXrP7g5Q2s= -github.com/denisenkom/go-mssqldb v0.12.2 h1:1OcPn5GBIobjWNd+8yjfHNIaFX14B1pWI3F9HZy5KXw= -github.com/denisenkom/go-mssqldb v0.12.2/go.mod h1:lnIw1mZukFRZDJYQ0Pb833QS2IaC3l5HkEfra2LJ+sk= github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= github.com/devigned/tab v0.1.1 h1:3mD6Kb1mUOYeLpJvTVSDwSg5ZsfSxfvxGRTxRsJsITA= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= -github.com/digitalocean/godo v1.104.1 h1:SZNxjAsskM/su0YW9P8Wx3gU0W1Z13b6tZlYNpl5BnA= -github.com/digitalocean/godo v1.104.1/go.mod h1:VAI/L5YDzMuPRU01lEEUSQ/sp5Z//1HnnFv/RBTEdbg= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/digitalocean/godo v1.109.0 h1:4W97RJLJSUQ3veRZDNbp1Ol3Rbn6Lmt9bKGvfqYI5SU= +github.com/digitalocean/godo v1.109.0/go.mod h1:R6EmmWI8CT1+fCtjWY9UCB+L5uufuZH13wk3YhxycCs= github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= @@ -526,13 +556,13 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +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/dynatrace-oss/dynatrace-metric-utils-go v0.5.0 h1:wHGPJSXvwKQVf/XfhjUPyrhpcPKWNy8F3ikH+eiwoBg= github.com/dynatrace-oss/dynatrace-metric-utils-go v0.5.0/go.mod h1:PseHFo8Leko7J4A/TfZ6kkHdkzKBLUta6hRZR/OEbbc= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-resiliency v1.4.0 h1:3OK9bWpPk5q6pbFAaYSEwD9CLUSHG8bnZuqX2yMt3B0= -github.com/eapache/go-resiliency v1.4.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= +github.com/eapache/go-resiliency v1.6.0 h1:CqGDTLtpwuWKn6Nj3uNUdflaq+/kIPsg0gfNzHton30= +github.com/eapache/go-resiliency v1.6.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4ALJ04o5Qqpdz8XLIpNA3WM/iSIXqxtqo7UGVws= github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0= @@ -555,18 +585,22 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= +github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI= +github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= 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/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/euank/go-kmsg-parser v2.0.0+incompatible h1:cHD53+PLQuuQyLZeriD1V/esuG4MuU0Pjs5y6iknohY= github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/facebook/time v0.0.0-20220713225404-f7a0d7702d50 h1:3fALCgsB+zI8Bxlv4ph4lCgt1CEQHIdU5sWxbkaMkuc= -github.com/facebook/time v0.0.0-20220713225404-f7a0d7702d50/go.mod h1:IQmM+Ezbn5X7gpDO0IjKU5RmW9xT1a19dLp+NbivoXE= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= +github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/expr-lang/expr v1.16.3 h1:NLldf786GffptcXNxxJx5dQ+FzeWDKChBDqOOwyK8to= +github.com/expr-lang/expr v1.16.3/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= +github.com/facebook/time v0.0.0-20240109160331-d1456d1a6bac h1:Xn5xG7RTh7HqtXKCCnxDG4+ee96umlRTBQM3kNSXDoU= +github.com/facebook/time v0.0.0-20240109160331-d1456d1a6bac/go.mod h1:1u7ple9CA8fMqfqqNsKIsxFL9i2yLfo8Hsv4ejTD1FM= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= @@ -580,30 +614,35 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD 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/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.11.0/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.11.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= 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/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI= -github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw= github.com/go-faster/city v1.0.1/go.mod h1:jKcUJId49qdW3L1qKHH/3wPeUstCVpVSXTM6vO3VcTw= -github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI= -github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY= +github.com/go-faster/errors v0.7.1 h1:MkJTnDoEdi9pDabt1dpWf7AA8/BaSYZqibYyhZ20AYg= +github.com/go-faster/errors v0.7.1/go.mod h1:5ySTjWFiphBs07IKuiL69nxdfd5+fzh1u7FPGZP2quo= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-jose/go-jose/v4 v4.0.1 h1:QVEPDE3OluqXBQZDcnNvQrInro2h0e4eqNbnZSWqS6U= +github.com/go-jose/go-jose/v4 v4.0.1/go.mod h1:WVf9LFMHh/QVrmqrOfqun0C45tMe3RoiKJMPvgWwLfY= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -619,42 +658,42 @@ github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= +github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-redis/redis/v7 v7.4.1 h1:PASvf36gyUpr2zdOUS/9Zqc80GbM+9BDyiJSJDDOrTI= -github.com/go-redis/redis/v7 v7.4.1/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= -github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= -github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= +github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= +github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= +github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= +github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -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/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= +github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= @@ -662,8 +701,8 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= 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/gocql/gocql v1.3.2 h1:ox3T+R7VFibHSIGxRkuUi1uIvAv8jBHCWxc+9aFQ/LA= -github.com/gocql/gocql v1.3.2/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= +github.com/gocql/gocql v1.6.0 h1:IdFdOTbnpbd0pDhl4REKQDM+Q0SzKXQ1Yh+YZZ8T/qU= +github.com/gocql/gocql v1.6.0/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= 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/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -671,8 +710,8 @@ github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v4.3.1+incompatible h1:0/KbAdpx3UXAx1kEOWHJeOkpbgRFGHVgv+CFIY7dBJI= -github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= +github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -685,10 +724,10 @@ github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzw github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= -github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= +github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +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/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= @@ -725,8 +764,6 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -738,10 +775,10 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cadvisor v0.48.1 h1:eyYTxKBd+KxI1kh6rst4JSTLUhfHQM34qGpp+0AMlSg= -github.com/google/cadvisor v0.48.1/go.mod h1:ZkYbiiVdyoqBmI2ahZI8GlmirT78OAOER0z4EQugkxQ= -github.com/google/flatbuffers v23.1.21+incompatible h1:bUqzx/MXCDxuS0hRJL2EfjyZL3uQrPbMocUa8zGqsTA= -github.com/google/flatbuffers v23.1.21+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/cadvisor v0.49.0 h1:1PYeiORXmcFYi609M4Qvq5IzcvcVaWgYxDt78uH8jYA= +github.com/google/cadvisor v0.49.0/go.mod h1:s6Fqwb2KiWG6leCegVhw4KW40tf9f7m+SF1aXiE8Wsk= +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/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -756,7 +793,6 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -779,66 +815,70 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 h1:pUa4ghanp6q4IJHwE9RwLgmVFfReJN+KbQ8ExNEUUoQ= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ZWj6lSlDF3F74SfKwfTCer72Q= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gophercloud/gophercloud v1.7.0 h1:fyJGKh0LBvIZKLvBWvQdIgkaV5yTM3Jh9EYUh+UNCAs= -github.com/gophercloud/gophercloud v1.7.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= +github.com/gophercloud/gophercloud v1.8.0 h1:TM3Jawprb2NrdOnvcHhWJalmKmAmOGgfZElM/3oBYCk= +github.com/gophercloud/gophercloud v1.8.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +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/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gosnmp/gosnmp v1.35.0 h1:EuWWNPxTCdAUx2/NbQcSa3WdNxjzpy4Phv57b4MWpJM= -github.com/gosnmp/gosnmp v1.35.0/go.mod h1:2AvKZ3n9aEl5TJEo/fFmf/FGO4Nj4cVeEc5yuk88CYc= -github.com/grafana/loki/pkg/push v0.0.0-20230321110627-5c3d204ebf5d h1:InEQBUAKYIHRlOVvxWxvpW5pziK53RdlhsuRJzBWUmE= -github.com/grafana/loki/pkg/push v0.0.0-20230321110627-5c3d204ebf5d/go.mod h1:BjNgF1EfQglDCrCbF0qiQLqAoBKva0/es63lSKT2TXw= +github.com/gosnmp/gosnmp v1.37.0 h1:/Tf8D3b9wrnNuf/SfbvO+44mPrjVphBhRtcGg22V07Y= +github.com/gosnmp/gosnmp v1.37.0/go.mod h1:GDH9vNqpsD7f2HvZhKs5dlqSEcAS6s6Qp099oZRCR+M= +github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37 h1:w59bmBeLOk4enGtyX4kTBNY3FCw/nwDTYUqcjC4vKhg= +github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37/go.mod h1:f3JSoxBTPXX5ec4FxxeC19nTBSxoTz+cBgS3cYLMcr0= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grobie/gomemcache v0.0.0-20180201122607-1f779c573665 h1:LONJvPBBd9wBmzSUmNHI7XpLE2qQ5tzUimeBadiVDuA= -github.com/grobie/gomemcache v0.0.0-20180201122607-1f779c573665/go.mod h1:L69/dBlPQlWkcnU76WgcppK5e4rrxzQdi6LhLnK/ytA= +github.com/grobie/gomemcache v0.0.0-20230213081705-239240bbc445 h1:FlKQKUYPZ5yDCN248M3R7x8yu2E3yEZ0H7aLomE4EoE= +github.com/grobie/gomemcache v0.0.0-20230213081705-239240bbc445/go.mod h1:L69/dBlPQlWkcnU76WgcppK5e4rrxzQdi6LhLnK/ytA= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= 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/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= -github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= +github.com/hashicorp/consul/api v1.28.2 h1:mXfkRHrpHN4YY3RqL09nXU1eHKLNiuAN4kHvDQ16k/8= +github.com/hashicorp/consul/api v1.28.2/go.mod h1:KyzqzgMEya+IZPcD65YFoOVAgPpbfERu4I/tzG6/ueE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= +github.com/hashicorp/consul/sdk v0.16.0 h1:SE9m0W6DEfgIVCJX7xU+iv/hUl4m/nxqMTnCdMxDpJ8= +github.com/hashicorp/consul/sdk v0.16.0/go.mod h1:7pxqqhqoaPqnBnzXD1StKed62LqJeClzVsUEy85Zr0A= github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -851,13 +891,14 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -870,6 +911,7 @@ github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5O github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -884,6 +926,8 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -894,15 +938,16 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c h1:Nc3Mt2BAnq0/VoLEntF/nipX+K1S7pG+RgwiitSv6v0= -github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c/go.mod h1:O23qLAZuCx4htdY9zBaO4cJPXgleSFEdq6D/sezGgYE= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702 h1:fI1LXuBaS1d9z1kmb++Og6YD8uMRwadXorCwE+xgOFA= +github.com/hashicorp/nomad/api v0.0.0-20240306004928-3e7191ccb702/go.mod h1:z71gkJdrkAt/Rl6C7Q79VE7AwJ5lUF+M+fzFTyIHYB0= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hetznercloud/hcloud-go/v2 v2.4.0 h1:MqlAE+w125PLvJRCpAJmEwrIxoVdUdOyuFUhE/Ukbok= -github.com/hetznercloud/hcloud-go/v2 v2.4.0/go.mod h1:l7fA5xsncFBzQTyw29/dw5Yr88yEGKKdc6BHf24ONS0= +github.com/hetznercloud/hcloud-go/v2 v2.6.0 h1:RJOA2hHZ7rD1pScA4O1NF6qhkHyUdbbxjHgFNot8928= +github.com/hetznercloud/hcloud-go/v2 v2.6.0/go.mod h1:4J1cSE57+g0WS93IiHLV7ubTHItcp+awzeBp5bM9mfA= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= @@ -915,9 +960,10 @@ github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+h github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 h1:s9ZL6ZhFF8y6ebnm1FLvobkzoIu5xwDQUcRPk/IEhpM= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6/go.mod h1:aXdIdfn2OcGnMhOTojXmwZqXKgC3MU5riiNvzwwG9OY= -github.com/influxdata/influxdb-client-go/v2 v2.12.4 h1:9qJLqetEmhIlqaF/N9KUtdmRKSbNy6IohggyS3bxWlE= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 h1:2r2WiFeAwiJ/uyx1qIKnV1L4C9w/2V8ehlbJY4gjFaM= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4/go.mod h1:1yEQhaLb/cETXCqQmdh7lDjupNAReO7c83AHyK2dJ48= +github.com/influxdata/influxdb-client-go/v2 v2.13.0 h1:ioBbLmR5NMbAjP4UVA5r9b5xGjpABD7j65pI8kFphDM= +github.com/influxdata/influxdb-client-go/v2 v2.13.0/go.mod h1:k+spCbt9hcvqvUiz0sr5D8LolXHqAAOfPw9v/RIRHl4= github.com/influxdata/influxdb-observability/common v0.5.8 h1:nyk4dqnKbPGIyr1vAs6oEsFQEHWi5jkSQ7PtP4v//lc= github.com/influxdata/influxdb-observability/common v0.5.8/go.mod h1:aG8A2gbtXbl/P2FePd6QNsCUSOkcvz1n+NL5dJLUO1s= github.com/influxdata/influxdb-observability/influx2otel v0.5.8 h1:pHkeImZksXNNQbbH/w1qPuC/u6e7cK3kTG12otQHDuE= @@ -926,7 +972,9 @@ github.com/influxdata/influxdb-observability/otel2influx v0.5.8 h1:vZQ/WwiqIYPcZ github.com/influxdata/influxdb-observability/otel2influx v0.5.8/go.mod h1:tcg//mjCGBsN0hAPQhUBNWuGF2miPPEMJEBl0ZIAfCk= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSHzRbhzK8RdXOsAdfDgO49TtqC1oZ+acxPrkfTxcCs= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/influxdata/line-protocol-corpus v0.0.0-20210519164801-ca6fa5da0184/go.mod h1:03nmhxzZ7Xk2pdG+lmMd7mHDfeVOYFyhOgwO61qWU98= github.com/influxdata/line-protocol-corpus v0.0.0-20210922080147-aa28ccfb8937 h1:MHJNQ+p99hFATQm6ORoLmpUCF7ovjwEFshs/NHzAbig= github.com/influxdata/line-protocol-corpus v0.0.0-20210922080147-aa28ccfb8937/go.mod h1:BKR9c0uHSmRgM/se9JhFHtTT7JTO67X23MtKMHtZcpo= @@ -934,8 +982,8 @@ github.com/influxdata/line-protocol/v2 v2.0.0-20210312151457-c52fdecb625a/go.mod github.com/influxdata/line-protocol/v2 v2.1.0/go.mod h1:QKw43hdUBg3GTk2iC3iyCxksNj7PX9aUSeYOYE/ceHY= github.com/influxdata/line-protocol/v2 v2.2.1 h1:EAPkqJ9Km4uAxtMRgUubJyqAr6zgWM0dznKMLRauQRE= github.com/influxdata/line-protocol/v2 v2.2.1/go.mod h1:DmB3Cnh+3oxmG6LOBIxce4oaL4CPj3OmMPgvauXh+tM= -github.com/ionos-cloud/sdk-go/v6 v6.1.9 h1:Iq3VIXzeEbc8EbButuACgfLMiY5TPVWUPNrF+Vsddo4= -github.com/ionos-cloud/sdk-go/v6 v6.1.9/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +github.com/ionos-cloud/sdk-go/v6 v6.1.11 h1:J/uRN4UWO3wCyGOeDdMKv8LWRzKu6UIkLEaes38Kzh8= +github.com/ionos-cloud/sdk-go/v6 v6.1.11/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= @@ -946,8 +994,8 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= -github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= +github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w= +github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -963,8 +1011,8 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.2 h1:7eY55bdBeCz1F2fTzSz69QC+pG46jYq9/jtSPiJ5nn0= -github.com/jackc/pgproto3/v2 v2.3.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag= +github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= @@ -978,15 +1026,15 @@ github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08 github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.18.1 h1:YP7G1KABtKpB5IHrO9vYwSrCOhs7p3uqhvhhQBptya0= -github.com/jackc/pgx/v4 v4.18.1/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE= +github.com/jackc/pgx/v4 v4.18.3 h1:dE2/TrEsGX3RBprb3qryqSV9Y60iZN1C6i8IrmW9/BA= +github.com/jackc/pgx/v4 v4.18.3/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jaegertracing/jaeger v1.48.0 h1:YuKooQ7qJsjgxws9xuf8C/BLNTPx8qTAJz4wv7IHhSc= -github.com/jaegertracing/jaeger v1.48.0/go.mod h1:BoAPkdCAIEuLsVz/EDhjXd+GSVpHtJhiGqWoFEvBCKg= -github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= +github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= +github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/jawher/mow.cli v1.0.4/go.mod h1:5hQj2V8g+qYmLUVWqu4Wuja1pI57M83EChYLVZ0sMKk= github.com/jawher/mow.cli v1.2.0/go.mod h1:y+pcA3jBAdo/GIZx/0rFjw/K2bVEODP9rfZOfaiq8Ko= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= @@ -1001,14 +1049,17 @@ github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh6 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/jellydator/ttlcache/v3 v3.1.0 h1:0gPFG0IHHP6xyUyXq+JaD8fwkDCqgqwohXNJBcYE71g= -github.com/jellydator/ttlcache/v3 v3.1.0/go.mod h1:hi7MGFdMAwZna5n2tuvh63DvFLzVKySzCVW6+0gA2n4= +github.com/jellydator/ttlcache/v3 v3.2.0 h1:6lqVJ8X3ZaUwvzENqPAobDsXNExfUJd61u++uW8a3LE= +github.com/jellydator/ttlcache/v3 v3.2.0/go.mod h1:hi7MGFdMAwZna5n2tuvh63DvFLzVKySzCVW6+0gA2n4= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= 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/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= +github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= @@ -1031,21 +1082,19 @@ github.com/karrick/godirwalk v1.17.0/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1q github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= 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/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4= -github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.10.8/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid/v2 v2.2.3 h1:sxCkb+qR91z4vsqw4vGGZlDgPz3G7gjaLyK3V8y70BU= -github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -1058,6 +1107,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= @@ -1066,11 +1116,14 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leesper/go_rng v0.0.0-20190531154944-a612b043e353 h1:X/79QL0b4YJVO5+OsPH9rF2u428CIrGL/jLmPsoOQQ4= github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 h1:bCiVCRCs1Heq84lurVinUPy19keqGEe4jh5vtK37jcg= github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= github.com/leoluk/perflib_exporter v0.2.1 h1:/3/ut1k/jFt5p4ypjLZKDHDqlXAK6ERZPVWtwdI389I= github.com/leoluk/perflib_exporter v0.2.1/go.mod h1:MinSWm88jguXFFrGsP56PtleUb4Qtm4tNRH/wXNXRTI= +github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= +github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= +github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ= +github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -1081,10 +1134,10 @@ github.com/lightstep/go-expohisto v1.0.0 h1:UPtTS1rGdtehbbAF7o/dhkWLTDI73UifG8Lb github.com/lightstep/go-expohisto v1.0.0/go.mod h1:xDXD0++Mu2FOaItXtdDfksfgxfV0z1TMPa+e/EUd0cs= github.com/linkedin/goavro/v2 v2.9.8 h1:jN50elxBsGBDGVDEKqUlDuU1cFwJ11K/yrJCBMe/7Wg= github.com/linkedin/goavro/v2 v2.9.8/go.mod h1:UgQUb2N/pmueQYH9bfqFioWxzYCZXSfF8Jw03O5sjqA= -github.com/linode/linodego v1.23.0 h1:s0ReCZtuN9Z1IoUN9w1RLeYO1dMZUGPwOQ/IBFsBHtU= -github.com/linode/linodego v1.23.0/go.mod h1:0U7wj/UQOqBNbKv1FYTXiBUXueR8DY4HvIotwE0ENgg= -github.com/logicmonitor/lm-data-sdk-go v1.0.0 h1:2eiz7kq3G0rLc/hqVpsk1c2B0PMjp6nLhHzc5SmTn80= -github.com/logicmonitor/lm-data-sdk-go v1.0.0/go.mod h1:XvYS9xp/0WrPpc6ge2O3ZPn2dgbKO46PnfCfbKaeUu8= +github.com/linode/linodego v1.30.0 h1:6HJli+LX7NGu+Sne2G+ux790EkVOWOV/SR4mK3jcs6k= +github.com/linode/linodego v1.30.0/go.mod h1:/46h/XpmWi//oSA92GX2p3FIxb8HbX7grslPPQalR2o= +github.com/logicmonitor/lm-data-sdk-go v1.3.0 h1:Obrexk35IKupFQezngkesR/kMfHQdAEUR1zYbJrOrzg= +github.com/logicmonitor/lm-data-sdk-go v1.3.0/go.mod h1:nIHr4uOPfg6AM7mG1rewg3L4O3rfge34o7UYB7joBM4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c h1:VtwQ41oftZwlMnOEbMWQtSEUgU64U4s+GHk7hZK+jtY= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE= @@ -1118,24 +1171,21 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI= -github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= +github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= github.com/microsoft/ApplicationInsights-Go v0.4.4 h1:G4+H9WNs6ygSCe6sUyxRc2U81TI5Es90b2t/MwX5KqY= github.com/microsoft/ApplicationInsights-Go v0.4.4/go.mod h1:fKRUseBqkw6bDiXTs3ESTiU/4YTIHsQS4W3fP2ieF4U= +github.com/microsoft/go-mssqldb v1.7.0 h1:sgMPW0HA6Ihd37Yx0MzHyKD726C2kY/8KJsQtXHNaAs= +github.com/microsoft/go-mssqldb v1.7.0/go.mod h1:kOvZKUdrhhFQmxLZqbwUV0rHkNkZpthMITIb2Ko1IoA= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE= -github.com/miekg/dns v1.1.56/go.mod h1:cRm6Oo2C8TY9ZS/TqsSrseAcncm74lfK5G+ikN2SWWY= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= +github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4= +github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk= @@ -1149,6 +1199,7 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0= github.com/mitchellh/hashstructure v1.1.0/go.mod h1:xUDAozZz0Wmdiufv0uyhnHkUTN6/6d8ulp4AwfLKrmA= @@ -1159,16 +1210,21 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +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/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= 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= @@ -1176,13 +1232,13 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= -github.com/mongodb-forks/digest v1.0.5 h1:EJu3wtLZcA0HCvsZpX5yuD193/sW9tHiNvrEM5apXMk= -github.com/mongodb-forks/digest v1.0.5/go.mod h1:rb+EX8zotClD5Dj4NdgxnJXG9nwrlx3NWKJ8xttz1Dg= +github.com/mongodb-forks/digest v1.1.0 h1:7eUdsR1BtqLv0mdNm4OXs6ddWvR4X2/OsLwdKksrOoc= +github.com/mongodb-forks/digest v1.1.0/go.mod h1:rb+EX8zotClD5Dj4NdgxnJXG9nwrlx3NWKJ8xttz1Dg= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/montanaflynn/stats v0.7.0 h1:r3y12KyNxj/Sb/iOE46ws+3mS1+MZca1wlHQFPsY/JU= github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= 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/mrunalp/fileutils v0.5.1 h1:F+S7ZlNKnrwHfSwdlgNSkKo67ReVf8o9fel6C3dkm/Q= @@ -1203,27 +1259,29 @@ github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/ github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nginxinc/nginx-plus-go-client v0.6.0/go.mod h1:DBAmdDP71tOhgFPdCMVusegzdKmLVpVL0nVcMX17pbY= -github.com/nginxinc/nginx-prometheus-exporter v0.8.1-0.20201110005315-f5a5f8086c19 h1:jR4KbeVA+KYmPq+amRe6AdB4mIfEaSOZGY2zCpqt/p8= -github.com/nginxinc/nginx-prometheus-exporter v0.8.1-0.20201110005315-f5a5f8086c19/go.mod h1:L58Se1nwn3cEyHWlcfdlXgiGbHe/efvDbkbi+psz3lA= +github.com/nginxinc/nginx-prometheus-exporter v0.11.0 h1:21xjnqNgxtni2jDgAQ90bl15uDnrTreO9sIlu1YsX/U= +github.com/nginxinc/nginx-prometheus-exporter v0.11.0/go.mod h1:GdyHnWAb8q8OW1Pssrrqbcqra0SH0Vn6UXICMmyWkw8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/observiq/nanojack v0.0.0-20201106172433-343928847ebc h1:49ewVBwLcy+eYqI4R0ICilCI4dPjddpFXWv3liXzUxM= +github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7oOxrWo= +github.com/oapi-codegen/runtime v1.0.0/go.mod h1:LmCUMQuPB4M/nLXilQXhHw+BLZdDb18B34OO356yJ/A= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -1231,25 +1289,27 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.31.0 h1:54UJxxj6cPInHS3a35wm6BK/F9nHYueZ1NVujHDrnXE= +github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKiT6zk= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= -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/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= +github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= +github.com/opensearch-project/opensearch-go/v2 v2.3.0 h1:nQIEMr+A92CkhHrZgUhcfsrZjibvB3APXf2a1VwCmMQ= +github.com/opensearch-project/opensearch-go/v2 v2.3.0/go.mod h1:8LDr9FCgUTVoT+5ESjc2+iaZuldqE+23Iq0r1XeNue8= github.com/openshift/api v0.0.0-20180801171038-322a19404e37 h1:05irGU4HK4IauGGDbsk+ZHrm1wOzMLYjMlfaiqMrBYc= github.com/openshift/api v0.0.0-20180801171038-322a19404e37/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/api v0.0.0-20210521075222-e273a339932a/go.mod h1:izBmoXbUu3z5kUa4FjZhvekTsyzIWiOoaIgJiZBBMQs= github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 h1:ZHRIMCFIJN1p9LsJt4HQ+akDrys4PrYnXzOWI5LK03I= github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142/go.mod h1:fjS8r9mqDVsPb5td3NehsNOAWa4uiFkYEfVZioQ2gH0= -github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDOCg/jA= @@ -1263,12 +1323,12 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/paulmach/orb v0.10.0 h1:guVYVqzxHE/CQ1KpfGO077TR0ATHSNjp4s6XGLn3W9s= -github.com/paulmach/orb v0.10.0/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= +github.com/paulmach/orb v0.11.1 h1:3koVegMC4X/WeiXYz9iswopaTwMem53NzTJuTF20JzU= +github.com/paulmach/orb v0.11.1/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= @@ -1278,21 +1338,20 @@ github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi github.com/pierrec/lz4 v2.6.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -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/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= +github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= -github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= -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/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pkg/sftp v1.13.5 h1:a3RLUqkyjYRtBTZJZ1VRrKbN3zhuPLlUc3sphVz81go= -github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg= +github.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo= +github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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= @@ -1306,21 +1365,17 @@ github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= @@ -1328,35 +1383,31 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9 github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.31.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/prometheus v0.48.0 h1:yrBloImGQ7je4h8M10ujGh4R6oxYQJQKlMuETwNskGk= -github.com/prometheus/prometheus v0.48.0/go.mod h1:SRw624aMAxTfryAcP8rOjg4S/sHHaetx2lyJJ2nM83g= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= +github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= +github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e h1:UmqAuY2OyDoog8+l5FybViJE5B2r+UxVGCUwFTsY5AA= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e/go.mod h1:+0ld+ozir7zWFcHA2vVpWAKxXakIioEjPPNOqH+J3ZA= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/relvacode/iso8601 v1.3.0 h1:HguUjsGpIMh/zsTczGN3DVJFxTU/GX+MMmzcKoMO7ko= -github.com/relvacode/iso8601 v1.3.0/go.mod h1:FlNp+jz+TXpyRqgmM7tnzHHzBnz776kmAH2h3sZCn0I= +github.com/redis/go-redis/v9 v9.5.1 h1:H1X4D3yHPaYrkL5X06Wh6xNVM/pX0Ft4RV0vMGvLBh8= +github.com/redis/go-redis/v9 v9.5.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= +github.com/relvacode/iso8601 v1.4.0 h1:GsInVSEJfkYuirYFxa80nMLbH2aydgZpIf52gYZXUJs= +github.com/relvacode/iso8601 v1.4.0/go.mod h1:FlNp+jz+TXpyRqgmM7tnzHHzBnz776kmAH2h3sZCn0I= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= @@ -1365,13 +1416,17 @@ github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThC github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= +github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 h1:yWfiTPwYxB0l5fGMhl/G+liULugVIHD9AU77iNLrURQ= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= -github.com/scalyr/dataset-go v0.14.0 h1:uRkoUt6LcMcH3VUTjOakQ4aq+1ooJB2t47oqYRUkV/k= -github.com/scalyr/dataset-go v0.14.0/go.mod h1:+a4BvVyS7mKquK7ySuWh4vygyDBREQrdikdcnABYKFw= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 h1:/8rfZAdFfafRXOgz+ZpMZZWZ5pYggCY9t7e/BvjaBHM= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scalyr/dataset-go v0.18.0 h1:CTv7kk/FGdiicTWo3h1brFusHD1yjhVGINFamP8uukw= +github.com/scalyr/dataset-go v0.18.0/go.mod h1:4x0JK5X0UdhZ2TEO3kHu9pTELDRc3WsrBBwQfkOPZKc= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 h1:RpforrEYXWkmGwJHIGnLZ3tTWStkjVVstwzNGqxX2Ds= @@ -1380,13 +1435,14 @@ github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAj github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= -github.com/shirou/gopsutil/v3 v3.22.2/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/shirou/gopsutil/v3 v3.22.12/go.mod h1:Xd7P1kwZcp5VW52+9XsirIKd/BROzbb2wdX3Kqlz9uI= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= +github.com/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= +github.com/shoenig/test v1.7.1/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= @@ -1394,10 +1450,10 @@ github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFR github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 h1:32k2QLgsKhcEs55q4REPKyIadvid5FPy2+VMgvbmKJ0= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfiC7+VheQaz+ypdCt5SmZNL+BRxUe7y4= -github.com/signalfx/sapm-proto v0.13.0 h1:yEkp1+MAU4vZvnJMp56uhVlRjlvCK7KQjBg0g2Apw8k= -github.com/signalfx/sapm-proto v0.13.0/go.mod h1:C72HjeCW5v0Llk6pIVJ/ZH8A5GbiZpCCSkE1dSlpWxY= -github.com/sijms/go-ora/v2 v2.7.20 h1:Q+/zNx3DMgytXMAvIbt/pUJcYj2jMRv/2Zg1DDlWhTY= -github.com/sijms/go-ora/v2 v2.7.20/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= +github.com/signalfx/sapm-proto v0.14.0 h1:KWh3I5E4EkelB19aP1/54Ik8khSioC/RVRW/riOfRGg= +github.com/signalfx/sapm-proto v0.14.0/go.mod h1:Km6PskZh966cqNoUn3AmRyGRix5VfwnxVBvn2vjRC9U= +github.com/sijms/go-ora/v2 v2.8.11 h1:oQtSX145kCYSjnrmWdtqp2LON9wOQW09wPJ5pIEn5Tg= +github.com/sijms/go-ora/v2 v2.8.11/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -1409,32 +1465,33 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/snowflakedb/gosnowflake v1.6.25 h1:o5zUmxTOo0Eo9AdkEj8blCeiMuILrQJ+rjUMAeZhcRE= -github.com/snowflakedb/gosnowflake v1.6.25/go.mod h1:KfO4F7bk+aXPUIvBqYxvPhxLlu2/w4TtSC8Rw/yr5Mg= +github.com/snowflakedb/gosnowflake v1.9.0 h1:s2ZdwFxFfpqwa5CqlhnzRESnLmwU3fED6zyNOJHFBQA= +github.com/snowflakedb/gosnowflake v1.9.0/go.mod h1:4ZgHxVf2OKwecx07WjfyAMr0gn8Qj4yvwAo68Og8wsU= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -1442,8 +1499,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1455,21 +1513,21 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F 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.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -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/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.792 h1:MwUEEkppjl0GIiz/rovNF54PG+RBwdfk1/+Rys8NUko= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.792/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= -github.com/testcontainers/testcontainers-go v0.26.0 h1:uqcYdoOHBy1ca7gKODfBd9uTHVK3a7UL848z09MVZ0c= -github.com/tg123/go-htpasswd v1.2.1 h1:i4wfsX1KvvkyoMiHZzjS0VzbAPWfxzI8INcZAKtutoU= -github.com/tg123/go-htpasswd v1.2.1/go.mod h1:erHp1B86KXdwQf1X5ZrLb7erXZnWueEQezb2dql4q58= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.896 h1:24LJSJctlcXa6KzV5quttY8R8NmmF4hTbeWgqKm6clw= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.896/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/testcontainers/testcontainers-go v0.29.1 h1:z8kxdFlovA2y97RWx98v/TQ+tR+SXZm6p35M+xB92zk= +github.com/testcontainers/testcontainers-go v0.29.1/go.mod h1:SnKnKQav8UcgtKqjp/AD8bE1MqZm+3TDb/B8crE3XnI= +github.com/tg123/go-htpasswd v1.2.2 h1:tmNccDsQ+wYsoRfiONzIhDm5OkVHQzN3w4FOBAlN6BY= +github.com/tg123/go-htpasswd v1.2.2/go.mod h1:FcIrK0J+6zptgVwK1JDlqyajW/1B4PtuJ/FLWl7nx8A= github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.14.3 h1:9jvXn7olKEHU1S9vwoMGliaT8jq1vJ7IH/n9zD9Dnlw= github.com/tidwall/gjson v1.14.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -1486,36 +1544,35 @@ github.com/tilinna/clock v1.1.0/go.mod h1:ZsP7BcY7sEEz7ktc0IVy8Us6boDrK8VradlKRU github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU= github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= +github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= github.com/tjfoc/gmsm v1.3.2 h1:7JVkAn5bvUJ7HtU08iW6UiD+UTmJTIToHCfeFzkcCxM= github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= -github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= +github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= 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.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= +github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= +github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/vincent-petithory/dataurl v1.0.0 h1:cXw+kPto8NLuJtlMsI152irrVw9fRDX8AbShPRpg2CI= github.com/vincent-petithory/dataurl v1.0.0/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U= github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs= github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f h1:p4VB7kIXpOQvVn1ZaTIVp+3vuYAXFe3OJEvjbUYJLaA= -github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= +github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8= +github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= +github.com/vmihailenco/msgpack/v4 v4.3.13 h1:A2wsiTbvp63ilDaWmsk2wjx6xZdxQOvpiNlKBGKKXKI= +github.com/vmihailenco/msgpack/v4 v4.3.13/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= -github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f h1:NbC9yOr5At92seXK+kOr2TzU3mIWzcJOVzZasGSuwoU= -github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f/go.mod h1:VEqcmf4Sp7gPB7z05QGyKVmn6xWppr7Nz8cVNvyC80o= -github.com/vmware/govmomi v0.33.1 h1:qS2VpEBd/WLbzLO5McI6h5o5zaKsrezUxRY5r9jkW8A= -github.com/vmware/govmomi v0.33.1/go.mod h1:QuzWGiEMA/FYlu5JXKjytiORQoxv2hTHdS2lWnIqKMM= +github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e h1:Vu41Q0Pv3yMdd+tcDW6QeEUIK2L+9ZrPrq8NAMrKSLc= +github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e/go.mod h1:aRq5pxwgdJpAuP97SCjX1+Db32z/b0dggQ07FDF+fqE= +github.com/vmware/govmomi v0.36.3 h1:1Ng3CBNQVbFjCQbKtfsewy5o3dFa+EoTjqeThVISUBc= +github.com/vmware/govmomi v0.36.3/go.mod h1:mtGWtM+YhTADHlCgJBiskSRPOZRsN9MSjPzaZLte/oQ= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= -github.com/wavefronthq/wavefront-sdk-go v0.15.0 h1:po9E3vh/0y7kOx8D9EtFp7kbSLLLKbmu/w/s1xGJAQU= -github.com/wavefronthq/wavefront-sdk-go v0.15.0/go.mod h1:V72c8e+bXuLK8HpA6ioW0ll5mK9IPD+4IHNNDY75ksA= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= @@ -1534,21 +1591,25 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 h1:5mLPGnFdSsevFRFc9q3yYbBkB6tsm4aCwwQV/j1JQAQ= github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/zorkian/go-datadog-api v2.30.0+incompatible h1:R4ryGocppDqZZbnNc5EDR8xGWF/z/MxzWnqTUijDQes= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +github.com/zorkian/go-datadog-api v2.30.0+incompatible/go.mod h1:PkXwHX9CUQa/FpB9ZwAD45N1uhCW4MT/Wj7m36PbKss= +go.einride.tech/aip v0.66.0 h1:XfV+NQX6L7EOYK11yoHHFtndeaWh3KbD9/cN/6iWEt8= +go.einride.tech/aip v0.66.0/go.mod h1:qAhMsfT7plxBX+Oy7Huol6YUvZ0ZzdUz26yZsQwfl1M= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.mongodb.org/atlas v0.35.0 h1:fLSPEyv+QcrG5djPWMekaM+BEVfEVBKQO4yEUQl4CQ4= -go.mongodb.org/atlas v0.35.0/go.mod h1:nfPldE9dSama6G2IbIzmEza02Ly7yFZjMMVscaM0uEc= +go.mongodb.org/atlas v0.36.0 h1:m05S3AO7zkl+bcG1qaNsEKBnAqnKx2FDwLooHpIG3j4= +go.mongodb.org/atlas v0.36.0/go.mod h1:nfPldE9dSama6G2IbIzmEza02Ly7yFZjMMVscaM0uEc= go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1560,111 +1621,131 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/configgrpc v0.89.0/go.mod h1:2GuAxpU34a1X19kCZ8Kw3FUsxOIiFcWHiYorRCyhnCc= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/connector v0.89.0 h1:2v7RgaLrlGmvHV1BjG133MswZ2BhH77vTHOLa4/Tqm0= -go.opentelemetry.io/collector/connector v0.89.0/go.mod h1:z82Yw0wZarpva9byeqByb3+eZSZ35DMdNRkjFgMm0S0= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/exporter/debugexporter v0.89.0 h1:MQUEX4OWszJQqQMqtYERiiw02Ta9QMWPe/hHWoD4YBU= -go.opentelemetry.io/collector/exporter/debugexporter v0.89.0/go.mod h1:eLoVrKOjgPvAmg0XJuellJ03zEpEol26l8i48Rhv53Q= -go.opentelemetry.io/collector/exporter/loggingexporter v0.89.0 h1:AdMGaH1p9D1Kvjkd/sXMg/Hkc5M1lqBdhXY5WfmiGSE= -go.opentelemetry.io/collector/exporter/loggingexporter v0.89.0/go.mod h1:N4zI/Zkjz5hx774uM3RdQTIeiw59FMmOdHrpbOK5UvE= -go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0 h1:0oYIeiRTURjIIYXs1OsaMAyNgg6Vc/CNa882YCYS/04= -go.opentelemetry.io/collector/exporter/otlpexporter v0.89.0/go.mod h1:kA+ycED/f5rUj2030XE45q0aXUe5haZhW62zdPgice0= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0 h1:HzEVN0r94lkymm9D+NlB/UUlLqZqC5rnHUBN0Kj/ZYs= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.89.0/go.mod h1:2AhkhO9YDcbfZ5X5gwN+k51FYFW8qfOWIrCEASp13qI= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/extension/ballastextension v0.89.0 h1:9Nhxmaj2XtAMik3SSTswW+MiOHPzC6LE0ZJOsnmqkPY= -go.opentelemetry.io/collector/extension/ballastextension v0.89.0/go.mod h1:kVGHc9tbBPaQgDsFEDhtwbQkWJmyHne2XrVhK0zyYZk= -go.opentelemetry.io/collector/extension/zpagesextension v0.89.0 h1:opvHcGANx+dS4HJwGTPtRMd6dZdOmmGn6c3PfW/bihQ= -go.opentelemetry.io/collector/extension/zpagesextension v0.89.0/go.mod h1:RlhcZHBMg86y1hgBf+j1lNvnZ8ihWiYTYXFiy5InwyY= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/otelcol v0.89.0 h1:b3kC0zM9T6GxjhTcNEHIzXDd4zTIc7cBpexCPZ9nPzg= -go.opentelemetry.io/collector/otelcol v0.89.0/go.mod h1:BILxDcJe32wK+paX7ssnt4jyjOmTkIHvXe9JNjlHUk8= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/processor/batchprocessor v0.89.0 h1:oTEOHs2t00f9LfRwZGzKSXJPR3FHjPDDhjt05iWXYZM= -go.opentelemetry.io/collector/processor/batchprocessor v0.89.0/go.mod h1:xaTfwrIbnsUpvaUCIecvlH8wTH500U7LtczdaEPXmmk= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.89.0 h1:Rw7SMMMGD9YIJjqwNA1nZTEFAMJumMv2hb58iTtCrH0= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.89.0/go.mod h1:3gmY8wAiqcmThKH7e8t+J/p0BGvXymHrwum7tcm2rbs= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 h1:ayqzWyj56xyc0tcBpaYjWtxvj5pfZNhYC8LrwvlLAeE= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0/go.mod h1:7p2oZ09hP+h6WpTv67PgEJx+azViVqLBE4IfrnDOWOc= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/collector/service v0.89.0/go.mod h1:6IAr9Asn6t6YxSw6Qv5LwA+ilVUtP0nQsu1xzc9+mZA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0 h1:Yty9Vs4F3D6/liF1o6FNt0PvN85h/BJJ6DQKJ3nrcM0= -go.opentelemetry.io/contrib/propagators/b3 v1.20.0/go.mod h1:On4VgbkqYL18kbJlWsa18+cMNe6rYpBnPi1ARI/BrsU= -go.opentelemetry.io/contrib/zpages v0.45.0 h1:jIwHHGoWzJoZdbIUtWdErjL85Gni6BignnAFqDtMRL4= -go.opentelemetry.io/contrib/zpages v0.45.0/go.mod h1:4mIdA5hqH6hEx9sZgV50qKfQO8aIYolUZboHmz+G7vw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0 h1:E/sf+2slCUb7wqh5FHwhdwKWTA+VXyMMAcFNlKVf4yw= -go.opentelemetry.io/otel/bridge/opencensus v0.43.0/go.mod h1:2xuXI78Xp9cttLsJMF/Y08cJUqckLt0kLasn+vcHR5w= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 h1:tFUz2BE6ucxU9PuPCwzbfDeQjMznIySJ4/73a3FSPUs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0/go.mod h1:hbzqqcIxyywu6UQ5J1wb4ntla8nCwCfNBZnMo2Dgh48= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0/go.mod h1:qmFtGlXhoa9qPt5RrZgMp4f5RfRagucrdriI+hb3yWQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0/go.mod h1:CMJYNAfooOwSZSAmAeMUV1M+TXld3BiK++z9fqIm2xk= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0/go.mod h1:nZStMoc1H/YJpRjSx9IEX4abBMekORTLQcTUT1CgLkg= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0 h1:vcSjcjn/BTeM6abI5CDymZdtd1m24quD1Mx4VE3N3fM= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.43.0/go.mod h1:HblEnlZQNsVuuDpszdKTWcrHBI09OjBn2pWSzBx1goM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0 h1:4s9HxB4azeeQkhY0GE5wZlMj4/pz8tE5gx2OQpGUw58= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0/go.mod h1:djVA3TUJ2fSdMX0JE5XxFBOaZzprElJoP7fD4vnV2SU= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0 h1:lRhfcLr3gK5S/zn92h3clyOPnCvvNKs1WTMbtH4UvO0= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.98.0/go.mod h1:vNMFTWe4dF05LsodUOc84OfxdlYVp1kCMuZzb41WfAk= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0 h1:x/VsGlBj+DtJCXIucwzwcxiwnwAU8a6ALK6UN8fPdKQ= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.98.0/go.mod h1:BapTGXu7CYrQGNohbapPwTSt2Ty/k/c6Oemx9mSSiK4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 h1:SxDS+Yr8qE+ID58ELR5n0D+SUlqHKOZ72pK3YPFAelA= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0/go.mod h1:DEoB0d0k1iGt4KEABntL8AW9xYQ6E7fmgkM2/s8aXvM= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0 h1:C02SPbRPvrtmZ9TvsHWpz2TvHzqY5mNyEAlDdhax/a4= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.98.0/go.mod h1:dzZKtykJio3Rm+G+Cmr15VV3xKp0PmFuh9Q9b3c1K7A= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0 h1:04zGXVQZ8D6nvoPX8AaqxWxGHNNVsGR78E+tY+2VQr8= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.98.0/go.mod h1:+UrRiugWaQPssz4mgEgQQo640f2bDUCFlo2Xr0/5ulc= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0 h1:JYpDN0OnMsu0awk0rjaYEIko9hFzzBJ6+2U5W2iVvUE= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.98.0/go.mod h1:xrXL804nBum1PgbvmJQ4I+hyW+DU4xBGO3MKMiYFX6E= +go.opentelemetry.io/collector/connector v0.98.0 h1:1ifadXqOtB5bZ+OocLVlzF0zltWjP70E3+xYt2fJnMg= +go.opentelemetry.io/collector/connector v0.98.0/go.mod h1:OFii9qa2ZgktI61/r0gWDsGjXtpEe+qXC8+0o4ZySeA= +go.opentelemetry.io/collector/connector/forwardconnector v0.98.0 h1:zIn0GaqUKq+3GcvfdVEIB/GSv7Zdtda8q0XChXG6Qj0= +go.opentelemetry.io/collector/connector/forwardconnector v0.98.0/go.mod h1:eC6PfRbK0Mx7QpqfnEI0uPAjq27MR//sRb5Vxzuf6eE= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/exporter/debugexporter v0.98.0 h1:zAFCXYzpxDh64BIVujqntlN5RE4jDahbPfJBy/Wq7D0= +go.opentelemetry.io/collector/exporter/debugexporter v0.98.0/go.mod h1:S15ELDQFoP5da3NHzXJR2I8FGUnM2C1Hp6e/OhaCtw0= +go.opentelemetry.io/collector/exporter/loggingexporter v0.98.0 h1:2DNfziYl0w8Sq9bPdYlPpn5MLLQGB73LB7O1BIYQxA4= +go.opentelemetry.io/collector/exporter/loggingexporter v0.98.0/go.mod h1:SBuTQ0sA3fEd/jAJFAxjTX8Ndwkc4Mtkc6gsz115S+8= +go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0 h1:uhiR/luaJCwMnvvkIS/gIxBbSAp+/vbqeC3AXmuc/kg= +go.opentelemetry.io/collector/exporter/otlpexporter v0.98.0/go.mod h1:1ySnK/6Cl+67FTP6ty04PX9nrXPYFPuBqZ+Xn9Jzz6Y= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.98.0 h1:+6mRqTgoJxXxuPwI8s5fMKm0mLfwVwJgD2EB7gUNNlE= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.98.0/go.mod h1:uGocxqpbUrZDwZz6JBKsvNCyDLrS/pnVpn4BUuPauFw= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/extension/ballastextension v0.98.0 h1:EPzsYpiSY4vAfzJMqhVK6bIh+qZRmXVskaNlRFKjA0w= +go.opentelemetry.io/collector/extension/ballastextension v0.98.0/go.mod h1:IY/JNP0g+tUUe/w5YHgBYwv5XlH4eqo5d4th+RGROFU= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0 h1:JfvsDpTwAhA9au8/4vmONRh0OBVU6n36seb41JD/mTQ= +go.opentelemetry.io/collector/extension/zpagesextension v0.98.0/go.mod h1:t1zDwy6kYp4w1JgcGHMvdGbKYHqWpK00bB1AEQ0Oqlc= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/otelcol v0.98.0 h1:sUk49Wqw+VBYeDynEA+GSeVEusFvzFW3KuF2vfDbyo0= +go.opentelemetry.io/collector/otelcol v0.98.0/go.mod h1:dW3UzuaiaNTddjKajk3Tp2Y7muDvYJdQz2yGUOE53gs= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0 h1:iM4fMLGig3GKmz5XNtOPKDsnCnvbi0+UHYaWsx/aSRc= +go.opentelemetry.io/collector/processor/batchprocessor v0.98.0/go.mod h1:ROnuUkZJgpKEIDf3AIVjgRGNI7KPqCKPXsw8whL6Hzs= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0 h1:1jjiC3POfIluGLVM+6y8nolKEI95/vlHAvDmIOatags= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.98.0/go.mod h1:VQDDrhQbIoelGF+fKzy6vCQM3hWDCH2YFaZKqgTDmGk= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 h1:j7lfLwc5o1dtXIPXU8LjmxadejmJVRHN57ZYGH33Wq4= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0/go.mod h1:uWDBDxaWuzF1U5S2UIhstO0+Q8aUiwiUu8uO1IYN2XQ= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/collector/service v0.98.0 h1:lLJ7VXPXcV62fSISh4GuNd5ti6WvKje76NSgezc3ydo= +go.opentelemetry.io/collector/service v0.98.0/go.mod h1:wB7ozvZTHtMefb5KTYy5nyrVYWpGk8teq8jWFs4blIU= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0 h1:QU8UEKyPqgr/8vCC9LlDmkPnfFmiWAUF9GtJdcLz+BU= +go.opentelemetry.io/contrib/propagators/b3 v1.25.0/go.mod h1:qonC7wyvtX1E6cEpAR+bJmhcGr6IVRGc/f6ZTpvi7jA= +go.opentelemetry.io/contrib/zpages v0.50.0 h1:hKC5asr83xDN4ErwSHVdk3gv053pZiF8SZKmS86IPEw= +go.opentelemetry.io/contrib/zpages v0.50.0/go.mod h1:8WovRn95fZdaX/dr3e4h7D8IqiVsnZ+WxY0Yn4LyU3k= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0 h1:0o/9KwAgxjK+3pMV0pwIF5toYHqDsPmQhfrBvKaG6mU= +go.opentelemetry.io/otel/bridge/opencensus v1.25.0/go.mod h1:rZyTdpmRqoV+PpUn6QlruxJp/kE4765rPy0pP6mRDk8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 h1:hDKnobznDpcdTlNzO0S/owRB8tyVr1OoeZZhDoqY+Cs= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0/go.mod h1:kUDQaUs1h8iTIHbQTk+iJRiUvSfJYMMKTtMCaiVu7B0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0 h1:Wc4hZuYXhVqq+TfRXLXlmNIL/awOanGx8ssq3ciDQxc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.25.0/go.mod h1:BydOvapRqVEc0DVz27qWBX2jq45Ca5TI9mhZBDIdweY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 h1:vOL89uRfOCCNIjkisd0r7SEdJF3ZJFyCNY34fdZs8eU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0/go.mod h1:8GlBGcDk8KKi7n+2S4BT/CPZQYH3erLu0/k64r1MYgo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0 h1:d7nHbdzU84STOiszaOxQ3kw5IwkSmHsU5Muol5/vL4I= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.25.0/go.mod h1:yiPA1iZbb/EHYnODXOxvtKuB0I2hV8ehfLTEWpl7BJU= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0 h1:0vZZdECYzhTt9MKQZ5qQ0V+J3MFu4MQaQ3COfugF+FQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0/go.mod h1:e7iXx3HjaSSBXfy9ykVUlupS2Vp7LBIBuT21ousM2Hk= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -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.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1676,6 +1757,7 @@ go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0 go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= 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.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= @@ -1689,8 +1771,8 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -1707,11 +1789,9 @@ golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -1720,9 +1800,11 @@ golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1736,8 +1818,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= -golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1766,8 +1848,9 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.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/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1809,7 +1892,6 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -1818,19 +1900,18 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= 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.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1844,9 +1925,8 @@ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1858,10 +1938,10 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/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.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.1.0/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-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1890,7 +1970,6 @@ golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1908,7 +1987,6 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200509044756-6aff5f38e54f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1937,43 +2015,41 @@ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/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-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/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-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/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.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1984,7 +2060,10 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1993,8 +2072,9 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2057,7 +2137,6 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210112230658-8b4aab62c064/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -2065,20 +2144,21 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= -golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= -gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -2103,16 +2183,17 @@ google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjR google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= -google.golang.org/api v0.150.0 h1:Z9k22qD289SZ8gCJrk4DrWXkNjtfvKAUo/l1ma8eBYE= -google.golang.org/api v0.150.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= +google.golang.org/api v0.172.0 h1:/1OcMZGPmW1rX2LCu2CmGUD1KXK1+pfzxotxyRUCCdk= +google.golang.org/api v0.172.0/go.mod h1:+fJZq6QXWfa9pXhnIzsjx4yI22d4aI9ZpLb58gvXjis= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -2148,9 +2229,7 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2158,12 +2237,12 @@ google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaE google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -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-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -2185,8 +2264,8 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -2201,7 +2280,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= @@ -2228,8 +2306,6 @@ gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24 gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -2249,6 +2325,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 h1:umQdVO0Ytx+kYadhuJNjFtDgIsIEBnKrOTvNuu8ClKI= gopkg.in/zorkian/go-datadog-api.v2 v2.30.0/go.mod h1:kx0CSMRpzEZfx/nFH62GLU4stZjparh/BRpM89t4XCQ= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2259,46 +2337,44 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= -k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/api v0.30.0 h1:siWhRq7cNjy2iHssOB9SCGNCl2spiF1dO3dABqZ8niA= +k8s.io/api v0.30.0/go.mod h1:OPlaYhoHs8EQ1ql0R/TsUgaRPhpKNxIMrKQfWUp8QSE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= -k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/apimachinery v0.30.0 h1:qxVPsyDM5XS96NIh9Oj6LavoVFYff/Pon9cZeDIkHHA= +k8s.io/apimachinery v0.30.0/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= -k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= +k8s.io/client-go v0.30.0 h1:sB1AGGlhY/o7KCyCEQ0bPWzYDL0pwOZO4vAtTSh/gJQ= +k8s.io/client-go v0.30.0/go.mod h1:g7li5O5256qe6TYdAMyX/otJqMhIiGgTapdLchhmOaY= k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/kubelet v0.28.4 h1:Ypxy1jaFlSXFXbg/yVtFOU2ZxErBVRJfLu8+t4s7Dtw= -k8s.io/kubelet v0.28.4/go.mod h1:w1wPI12liY/aeC70nqKYcNNkr6/nbyvdMB7P7wmww2o= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/kubelet v0.30.0 h1:/pqHVR2Rn8ExCpn211wL3pMtqRFpcBcJPl4+1INbIMk= +k8s.io/kubelet v0.30.0/go.mod h1:WukdKqbQxnj+csn3K8XOKeX7Sh60J/da25IILjvvB5s= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= -sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= +sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk= +sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= -skywalking.apache.org/repo/goapi v0.0.0-20231026090926-09378dd56587 h1:TY79I5Y7xRB8q5LQ+MJn7NYsYi0VL5nj1QDrUHwK7cQ= -skywalking.apache.org/repo/goapi v0.0.0-20231026090926-09378dd56587/go.mod h1:onFubXaIoY/2FTRVrLMqCTlaNq4SilAEwF/2G0IcaBw= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4 h1:3YIFmsshgsU6FzHgnkG9Z24CkXkgoexBN5O0aSzK79g= +skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4/go.mod h1:oD2dxcDAHVIt95Ee7kJHgZ5f64QNhrqTjQYARwfafc4= diff --git a/internal/aws/awsutil/conn_test.go b/internal/aws/awsutil/conn_test.go index ca0e927c5f30..2da8aeb33407 100644 --- a/internal/aws/awsutil/conn_test.go +++ b/internal/aws/awsutil/conn_test.go @@ -48,7 +48,7 @@ func TestEC2Session(t *testing.T) { cfg, s, err := GetAWSConfigSession(logger, m, &sessionCfg) assert.Equal(t, s, expectedSession, "Expect the session object is not overridden") assert.Equal(t, *cfg.Region, ec2Region, "Region value fetched from ec2-metadata service") - assert.Nil(t, err) + assert.NoError(t, err) } // fetch region value from environment variable @@ -65,7 +65,7 @@ func TestRegionEnv(t *testing.T) { cfg, s, err := GetAWSConfigSession(logger, m, &sessionCfg) assert.Equal(t, s, expectedSession, "Expect the session object is not overridden") assert.Equal(t, *cfg.Region, region, "Region value fetched from environment") - assert.Nil(t, err) + assert.NoError(t, err) } func TestGetAWSConfigSessionWithSessionErr(t *testing.T) { @@ -82,7 +82,7 @@ func TestGetAWSConfigSessionWithSessionErr(t *testing.T) { cfg, s, err := GetAWSConfigSession(logger, m, &sessionCfg) assert.Nil(t, cfg) assert.Nil(t, s) - assert.NotNil(t, err) + assert.Error(t, err) } func TestGetAWSConfigSessionWithEC2RegionErr(t *testing.T) { @@ -98,7 +98,7 @@ func TestGetAWSConfigSessionWithEC2RegionErr(t *testing.T) { cfg, s, err := GetAWSConfigSession(logger, m, &sessionCfg) assert.Nil(t, cfg) assert.Nil(t, s) - assert.NotNil(t, err) + assert.Error(t, err) } func TestNewAWSSessionWithErr(t *testing.T) { diff --git a/internal/aws/awsutil/go.mod b/internal/aws/awsutil/go.mod index df63f2b4326a..8c0652f15eb3 100644 --- a/internal/aws/awsutil/go.mod +++ b/internal/aws/awsutil/go.mod @@ -1,20 +1,21 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil -go 1.20 +go 1.21 require ( github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-00010101000000-000000000000 - github.com/aws/aws-sdk-go v1.47.10 - github.com/stretchr/testify v1.8.4 - go.uber.org/zap v1.26.0 - golang.org/x/net v0.18.0 + github.com/aws/aws-sdk-go v1.51.17 + github.com/stretchr/testify v1.9.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + golang.org/x/net v0.24.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/text v0.14.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect diff --git a/internal/aws/awsutil/go.sum b/internal/aws/awsutil/go.sum index f8815fcd63ce..b7392df27586 100644 --- a/internal/aws/awsutil/go.sum +++ b/internal/aws/awsutil/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= 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= @@ -12,23 +12,22 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn 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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/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.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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -37,6 +36,5 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/aws/awsutil/package_test.go b/internal/aws/awsutil/package_test.go new file mode 100644 index 000000000000..735f635bae96 --- /dev/null +++ b/internal/aws/awsutil/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package awsutil + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/aws/containerinsight/const.go b/internal/aws/containerinsight/const.go index a11bd45b3906..a5551aeb0d25 100644 --- a/internal/aws/containerinsight/const.go +++ b/internal/aws/containerinsight/const.go @@ -16,7 +16,6 @@ const ( HostName = "HOST_NAME" RunInContainer = "RUN_IN_CONTAINER" RunAsHostProcessContainer = "RUN_AS_HOST_PROCESS_CONTAINER" - TrueValue = "True" // Attribute names InstanceID = "InstanceId" @@ -184,6 +183,7 @@ const ( UnitCountPerSec = "Count/Second" UnitVCPU = "vCPU" UnitPercent = "Percent" + TrueValue = "True" ) var WaitingReasonLookup = map[string]string{ diff --git a/internal/aws/containerinsight/go.mod b/internal/aws/containerinsight/go.mod index 85d7d37fc8fd..dff1530db3fa 100644 --- a/internal/aws/containerinsight/go.mod +++ b/internal/aws/containerinsight/go.mod @@ -1,11 +1,12 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( @@ -17,12 +18,12 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/internal/aws/containerinsight/go.sum b/internal/aws/containerinsight/go.sum index 2851bfdbcc3e..00b7466e819d 100644 --- a/internal/aws/containerinsight/go.sum +++ b/internal/aws/containerinsight/go.sum @@ -7,14 +7,17 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS 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/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +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/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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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= @@ -23,19 +26,21 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY 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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -45,16 +50,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -67,15 +72,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/aws/containerinsight/package_test.go b/internal/aws/containerinsight/package_test.go new file mode 100644 index 000000000000..76457cdacaf5 --- /dev/null +++ b/internal/aws/containerinsight/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package containerinsight + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/aws/containerinsight/utils.go b/internal/aws/containerinsight/utils.go index 67721e889fe4..7e87d77692bf 100644 --- a/internal/aws/containerinsight/utils.go +++ b/internal/aws/containerinsight/utils.go @@ -100,15 +100,6 @@ func IsPod(mType string) bool { return false } -func IsWindowsHostProcessContainer() bool { - // todo: Remove this workaround func when Windows AMIs has containerd 1.7 which solves upstream bug - // https://kubernetes.io/docs/tasks/configure-pod-container/create-hostprocess-pod/#containerd-v1-6 - if runtime.GOOS == OperatingSystemWindows && os.Getenv(RunInContainer) == TrueValue && os.Getenv(RunAsHostProcessContainer) == TrueValue { - return true - } - return false -} - func getPrefixByMetricType(mType string) string { prefix := "" instancePrefix := "instance_" @@ -323,3 +314,12 @@ func initMetric(ilm pmetric.ScopeMetrics, name, unit string) pmetric.Metric { return metric } + +func IsWindowsHostProcessContainer() bool { + // todo: Remove this workaround func when Windows AMIs has containerd 1.7 which solves upstream bug + // https://kubernetes.io/docs/tasks/configure-pod-container/create-hostprocess-pod/#containerd-v1-6 + if runtime.GOOS == OperatingSystemWindows && os.Getenv(RunInContainer) == TrueValue && os.Getenv(RunAsHostProcessContainer) == TrueValue { + return true + } + return false +} diff --git a/internal/aws/cwlogs/cwlog_client_test.go b/internal/aws/cwlogs/cwlog_client_test.go index e873c462be70..e5173b15df27 100644 --- a/internal/aws/cwlogs/cwlog_client_test.go +++ b/internal/aws/cwlogs/cwlog_client_test.go @@ -533,7 +533,6 @@ func TestLogUnknownError(t *testing.T) { func TestUserAgent(t *testing.T) { logger := zap.NewNop() - tests := []struct { name string buildInfo component.BuildInfo @@ -628,10 +627,10 @@ func TestUserAgent(t *testing.T) { }, } - session, _ := session.NewSession() + testSession, _ := session.NewSession() for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - cwlog := NewClient(logger, &aws.Config{}, tc.buildInfo, tc.logGroupName, 0, map[string]*string{}, session, tc.userAgentOption) + cwlog := NewClient(logger, &aws.Config{}, tc.buildInfo, tc.logGroupName, 0, map[string]*string{}, testSession, tc.userAgentOption) req := request.New(aws.Config{}, metadata.ClientInfo{}, *cwlog.Handlers(), nil, &request.Operation{ HTTPMethod: "GET", diff --git a/internal/aws/cwlogs/go.mod b/internal/aws/cwlogs/go.mod index 1687f57fea3a..29e9041679f9 100644 --- a/internal/aws/cwlogs/go.mod +++ b/internal/aws/cwlogs/go.mod @@ -1,42 +1,41 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs -go 1.20 +go 1.21 require ( - github.com/aws/aws-sdk-go v1.47.10 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.uber.org/zap v1.26.0 + github.com/aws/aws-sdk-go v1.51.17 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/internal/aws/cwlogs/go.sum b/internal/aws/cwlogs/go.sum index 83a2dbe8a8a1..6fe05fb41982 100644 --- a/internal/aws/cwlogs/go.sum +++ b/internal/aws/cwlogs/go.sum @@ -1,10 +1,14 @@ -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= 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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -12,8 +16,7 @@ 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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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= @@ -24,50 +27,47 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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.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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -77,16 +77,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -99,18 +99,18 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -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/aws/cwlogs/handler/package_test.go b/internal/aws/cwlogs/handler/package_test.go new file mode 100644 index 000000000000..46a9c37254da --- /dev/null +++ b/internal/aws/cwlogs/handler/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package handler + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/aws/cwlogs/package_test.go b/internal/aws/cwlogs/package_test.go new file mode 100644 index 000000000000..8733a589df9c --- /dev/null +++ b/internal/aws/cwlogs/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package cwlogs + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/aws/cwlogs/pusher_test.go b/internal/aws/cwlogs/pusher_test.go index d90ff21c4456..9b4369798530 100644 --- a/internal/aws/cwlogs/pusher_test.go +++ b/internal/aws/cwlogs/pusher_test.go @@ -30,7 +30,7 @@ func TestValidateLogEventWithMutating(t *testing.T) { logEvent := NewEvent(0, "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789") logEvent.GeneratedTime = time.Now() err := logEvent.Validate(zap.NewNop()) - assert.Nil(t, err) + assert.NoError(t, err) assert.True(t, *logEvent.InputLogEvent.Timestamp > int64(0)) assert.Equal(t, 64-perEventHeaderBytes, len(*logEvent.InputLogEvent.Message)) @@ -41,13 +41,13 @@ func TestValidateLogEventFailed(t *testing.T) { logger := zap.NewNop() logEvent := NewEvent(0, "") err := logEvent.Validate(logger) - assert.NotNil(t, err) + assert.Error(t, err) assert.Equal(t, "empty log event message", err.Error()) invalidTimestamp := time.Now().AddDate(0, -1, 0) logEvent = NewEvent(invalidTimestamp.Unix()*1e3, "test") err = logEvent.Validate(logger) - assert.NotNil(t, err) + assert.Error(t, err) assert.Equal(t, "the log entry's timestamp is older than 14 days or more than 2 hours in the future", err.Error()) } @@ -109,7 +109,7 @@ func TestLogEventBatch_sortLogEvents(t *testing.T) { // Need to remove the tmp state folder after testing. func newMockPusher() *logPusher { - svc := newAlwaysPassMockLogClient(func(args mock.Arguments) {}) + svc := newAlwaysPassMockLogClient(func(_ mock.Arguments) {}) return newLogPusher(StreamKey{ LogGroupName: logGroup, LogStreamName: logStreamName, @@ -193,7 +193,7 @@ func TestAddLogEventWithValidation(t *testing.T) { } func TestStreamManager(t *testing.T) { - svc := newAlwaysPassMockLogClient(func(args mock.Arguments) {}) + svc := newAlwaysPassMockLogClient(func(_ mock.Arguments) {}) mockCwAPI := svc.svc.(*mockCloudWatchLogsClient) manager := NewLogStreamManager(*svc) @@ -224,7 +224,7 @@ func TestStreamManager(t *testing.T) { } func TestMultiStreamFactory(t *testing.T) { - svc := newAlwaysPassMockLogClient(func(args mock.Arguments) {}) + svc := newAlwaysPassMockLogClient(func(_ mock.Arguments) {}) logStreamManager := NewLogStreamManager(*svc) factory := NewMultiStreamPusherFactory(logStreamManager, *svc, nil) diff --git a/internal/aws/ecsutil/client.go b/internal/aws/ecsutil/client.go index fcdb0078421a..e5585375608e 100644 --- a/internal/aws/ecsutil/client.go +++ b/internal/aws/ecsutil/client.go @@ -4,6 +4,7 @@ package ecsutil // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil" import ( + "context" "fmt" "io" "net/http" @@ -22,7 +23,7 @@ type Client interface { } // NewClientProvider creates the default rest client provider -func NewClientProvider(baseURL url.URL, clientSettings confighttp.HTTPClientSettings, host component.Host, settings component.TelemetrySettings) ClientProvider { +func NewClientProvider(baseURL url.URL, clientSettings confighttp.ClientConfig, host component.Host, settings component.TelemetrySettings) ClientProvider { return &defaultClientProvider{ baseURL: baseURL, clientSettings: clientSettings, @@ -38,13 +39,14 @@ type ClientProvider interface { type defaultClientProvider struct { baseURL url.URL - clientSettings confighttp.HTTPClientSettings + clientSettings confighttp.ClientConfig host component.Host settings component.TelemetrySettings } func (dcp *defaultClientProvider) BuildClient() (Client, error) { return defaultClient( + context.Background(), dcp.baseURL, dcp.clientSettings, dcp.host, @@ -53,12 +55,13 @@ func (dcp *defaultClientProvider) BuildClient() (Client, error) { } func defaultClient( + ctx context.Context, baseURL url.URL, - clientSettings confighttp.HTTPClientSettings, + clientSettings confighttp.ClientConfig, host component.Host, settings component.TelemetrySettings, ) (*clientImpl, error) { - client, err := clientSettings.ToClient(host, settings) + client, err := clientSettings.ToClientContext(ctx, host, settings) if err != nil { return nil, err } diff --git a/internal/aws/ecsutil/client_test.go b/internal/aws/ecsutil/client_test.go index 65ab29500dca..1a4c0e3d9ff9 100644 --- a/internal/aws/ecsutil/client_test.go +++ b/internal/aws/ecsutil/client_test.go @@ -4,6 +4,7 @@ package ecsutil import ( + "context" "fmt" "io" "net/http" @@ -36,7 +37,7 @@ func TestClient(t *testing.T) { func TestNewClientProvider(t *testing.T) { baseURL, _ := url.Parse("http://localhost:8080") - provider := NewClientProvider(*baseURL, confighttp.HTTPClientSettings{}, componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + provider := NewClientProvider(*baseURL, confighttp.ClientConfig{}, componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) require.NotNil(t, provider) _, ok := provider.(*defaultClientProvider) require.True(t, ok) @@ -48,7 +49,7 @@ func TestNewClientProvider(t *testing.T) { func TestDefaultClient(t *testing.T) { endpoint, _ := url.Parse("http://localhost:8080") - client, err := defaultClient(*endpoint, confighttp.HTTPClientSettings{}, componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + client, err := defaultClient(context.Background(), *endpoint, confighttp.ClientConfig{}, componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) require.NoError(t, err) require.NotNil(t, client.httpClient.Transport) require.Equal(t, "http://localhost:8080", client.baseURL.String()) diff --git a/internal/aws/ecsutil/endpoints/package_test.go b/internal/aws/ecsutil/endpoints/package_test.go new file mode 100644 index 000000000000..469dd8fb91e4 --- /dev/null +++ b/internal/aws/ecsutil/endpoints/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package endpoints + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/aws/ecsutil/go.mod b/internal/aws/ecsutil/go.mod index 1e5089b666c5..2c1f1e7047ed 100644 --- a/internal/aws/ecsutil/go.mod +++ b/internal/aws/ecsutil/go.mod @@ -1,57 +1,67 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/confighttp v0.89.0 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/confighttp v0.98.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.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.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/internal/aws/ecsutil/go.sum b/internal/aws/ecsutil/go.sum index d46c35f86573..ce0ee368db8e 100644 --- a/internal/aws/ecsutil/go.sum +++ b/internal/aws/ecsutil/go.sum @@ -1,3 +1,7 @@ +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/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/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -5,10 +9,12 @@ github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw 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.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -18,80 +24,101 @@ 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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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/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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -101,16 +128,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -123,15 +150,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/aws/ecsutil/metadata_provider.go b/internal/aws/ecsutil/metadata_provider.go index 9dd661b706e5..34b814aba246 100644 --- a/internal/aws/ecsutil/metadata_provider.go +++ b/internal/aws/ecsutil/metadata_provider.go @@ -42,7 +42,7 @@ func NewDetectedTaskMetadataProvider(set component.TelemetrySettings) (MetadataP return nil, fmt.Errorf("unable to detect task metadata endpoint") } - clientSettings := confighttp.HTTPClientSettings{} + clientSettings := confighttp.ClientConfig{} client, err := NewRestClient(*endpoint, clientSettings, set) if err != nil { return nil, err diff --git a/internal/aws/ecsutil/metadata_provider_test.go b/internal/aws/ecsutil/metadata_provider_test.go index d3bd02a079e3..5cf34e233df4 100644 --- a/internal/aws/ecsutil/metadata_provider_test.go +++ b/internal/aws/ecsutil/metadata_provider_test.go @@ -49,7 +49,7 @@ func Test_ecsMetadata_fetchContainer(t *testing.T) { md := ecsMetadataProviderImpl{logger: zap.NewNop(), client: mockRestClient} fetchResp, err := md.FetchContainerMetadata() - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, fetchResp) assert.Equal(t, "325c979aea914acd93be2fdd2429e1d9-3811061257", fetchResp.DockerID) assert.Equal(t, "arn:aws:ecs:us-east-1:123456789123:an-image/123", fetchResp.ContainerARN) diff --git a/internal/aws/ecsutil/package_test.go b/internal/aws/ecsutil/package_test.go new file mode 100644 index 000000000000..2ea0398f7487 --- /dev/null +++ b/internal/aws/ecsutil/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ecsutil + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/aws/ecsutil/rest_client.go b/internal/aws/ecsutil/rest_client.go index 1571cb94ea70..8ec8162b96e9 100644 --- a/internal/aws/ecsutil/rest_client.go +++ b/internal/aws/ecsutil/rest_client.go @@ -10,7 +10,7 @@ import ( "go.opentelemetry.io/collector/config/confighttp" ) -func NewRestClient(baseEndpoint url.URL, clientSettings confighttp.HTTPClientSettings, settings component.TelemetrySettings) (RestClient, error) { +func NewRestClient(baseEndpoint url.URL, clientSettings confighttp.ClientConfig, settings component.TelemetrySettings) (RestClient, error) { clientProvider := NewClientProvider(baseEndpoint, clientSettings, &nopHost{}, settings) client, err := clientProvider.BuildClient() diff --git a/internal/aws/ecsutil/rest_client_test.go b/internal/aws/ecsutil/rest_client_test.go index 8cabd5f73911..d971fa439e30 100644 --- a/internal/aws/ecsutil/rest_client_test.go +++ b/internal/aws/ecsutil/rest_client_test.go @@ -23,7 +23,7 @@ func (f *fakeClient) Get(path string) ([]byte, error) { func TestRestClient(t *testing.T) { u, _ := url.Parse("http://www.test.com") - rest, err := NewRestClient(*u, confighttp.HTTPClientSettings{}, componenttest.NewNopTelemetrySettings()) + rest, err := NewRestClient(*u, confighttp.ClientConfig{}, componenttest.NewNopTelemetrySettings()) require.NoError(t, err) require.NotNil(t, rest) } @@ -32,7 +32,7 @@ func TestRestClientFromClient(t *testing.T) { rest := NewRestClientFromClient(&fakeClient{}) metadata, err := rest.GetResponse(endpoints.TaskMetadataPath) - require.Nil(t, err) + require.NoError(t, err) require.Equal(t, endpoints.TaskMetadataPath, string(metadata)) } diff --git a/internal/aws/k8s/go.mod b/internal/aws/k8s/go.mod index 15a5616158cf..3710c12cbf9f 100644 --- a/internal/aws/k8s/go.mod +++ b/internal/aws/k8s/go.mod @@ -1,31 +1,31 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s -go 1.20 +go 1.21 require ( - github.com/aws/aws-sdk-go v1.47.10 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.89.0 - github.com/stretchr/testify v1.8.4 - go.uber.org/zap v1.26.0 - k8s.io/api v0.28.3 - k8s.io/apimachinery v0.28.3 - k8s.io/client-go v0.28.3 + github.com/aws/aws-sdk-go v1.51.17 + github.com/stretchr/testify v1.9.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + k8s.io/api v0.29.3 + k8s.io/apimachinery v0.29.3 + k8s.io/client-go v0.29.3 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/imdario/mergo v0.3.6 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -37,31 +37,26 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.4.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight => ../../aws/containerinsight - retract ( v0.76.2 v0.76.1 diff --git a/internal/aws/k8s/go.sum b/internal/aws/k8s/go.sum index 52e81db8f279..69c7437a904f 100644 --- a/internal/aws/k8s/go.sum +++ b/internal/aws/k8s/go.sum @@ -1,16 +1,15 @@ -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= @@ -18,23 +17,26 @@ github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= 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.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 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/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.5.5/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/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -49,6 +51,7 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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= @@ -62,13 +65,16 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= -github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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= @@ -78,44 +84,55 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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/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/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= 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/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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= 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/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= @@ -124,21 +141,19 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm 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.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= 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/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -150,21 +165,21 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/internal/aws/k8s/k8sclient/clientset.go b/internal/aws/k8s/k8sclient/clientset.go index 294e760b0678..0db4ec06c610 100644 --- a/internal/aws/k8s/k8sclient/clientset.go +++ b/internal/aws/k8s/k8sclient/clientset.go @@ -10,6 +10,7 @@ import ( "os" "path/filepath" "reflect" + "runtime" "sort" "strconv" "strings" @@ -23,12 +24,14 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" certutil "k8s.io/client-go/util/cert" - - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight" ) const ( - cacheTTL = 10 * time.Minute + cacheTTL = 10 * time.Minute + OperatingSystemWindows = "windows" + RunInContainer = "RUN_IN_CONTAINER" + TrueValue = "True" + RunAsHostProcessContainer = "RUN_AS_HOST_PROCESS_CONTAINER" ) // Option is a struct that can be used to change the configuration of passed K8sClient @@ -471,7 +474,7 @@ func (c *K8sClient) Shutdown() { // This copy fixes that bug by appending `CONTAINER_SANDBOX_MOUNT_POINT` in k8s token and cert file paths. // todo: Remove this workaround func when Windows AMIs has containerd 1.7 which solves upstream bug. func (c *K8sClient) inClusterConfig() (*rest.Config, error) { - if !containerinsight.IsWindowsHostProcessContainer() { + if !isWindowsHostProcessContainer() { return rest.InClusterConfig() } var ( @@ -503,3 +506,12 @@ func (c *K8sClient) inClusterConfig() (*rest.Config, error) { BearerTokenFile: tokenFile, }, nil } + +func isWindowsHostProcessContainer() bool { + // todo: Remove this workaround func when Windows AMIs has containerd 1.7 which solves upstream bug + // https://kubernetes.io/docs/tasks/configure-pod-container/create-hostprocess-pod/#containerd-v1-6 + if runtime.GOOS == OperatingSystemWindows && os.Getenv(RunInContainer) == TrueValue && os.Getenv(RunAsHostProcessContainer) == TrueValue { + return true + } + return false +} diff --git a/internal/aws/k8s/k8sclient/endpoint_test.go b/internal/aws/k8s/k8sclient/endpoint_test.go index abd7aea3a778..1b7f0cea8540 100644 --- a/internal/aws/k8s/k8sclient/endpoint_test.go +++ b/internal/aws/k8s/k8sclient/endpoint_test.go @@ -406,7 +406,7 @@ func TestEpClient_ServiceNameToPodNum(t *testing.T) { func TestTransformFuncEndpoint(t *testing.T) { info, err := transformFuncEndpoint(nil) assert.Nil(t, info) - assert.NotNil(t, err) + assert.Error(t, err) } func TestNewEndpointClient(t *testing.T) { @@ -416,5 +416,6 @@ func TestNewEndpointClient(t *testing.T) { fakeClientSet := fake.NewSimpleClientset(endpointsArray...) client := newEpClient(fakeClientSet, zap.NewNop(), setOption) assert.NotNil(t, client) + client.shutdown() removeTempKubeConfig() } diff --git a/internal/aws/k8s/k8sclient/job_test.go b/internal/aws/k8s/k8sclient/job_test.go index 44bd57e96127..569238826b15 100644 --- a/internal/aws/k8s/k8sclient/job_test.go +++ b/internal/aws/k8s/k8sclient/job_test.go @@ -65,5 +65,5 @@ func TestJobClient_JobToCronJob(t *testing.T) { func TestTransformFuncJob(t *testing.T) { info, err := transformFuncJob(nil) assert.Nil(t, info) - assert.NotNil(t, err) + assert.Error(t, err) } diff --git a/internal/aws/k8s/k8sclient/node_test.go b/internal/aws/k8s/k8sclient/node_test.go index f4ce4d4cb39d..c90394548165 100644 --- a/internal/aws/k8s/k8sclient/node_test.go +++ b/internal/aws/k8s/k8sclient/node_test.go @@ -398,5 +398,5 @@ func TestNodeClient(t *testing.T) { func TestTransformFuncNode(t *testing.T) { info, err := transformFuncNode(nil) assert.Nil(t, info) - assert.NotNil(t, err) + assert.Error(t, err) } diff --git a/internal/aws/k8s/k8sclient/obj_store_test.go b/internal/aws/k8s/k8sclient/obj_store_test.go index 7f9f223a5732..8ffb06fd9b59 100644 --- a/internal/aws/k8s/k8sclient/obj_store_test.go +++ b/internal/aws/k8s/k8sclient/obj_store_test.go @@ -33,7 +33,7 @@ func TestGet(t *testing.T) { item, exists, err := o.Get("a") assert.Nil(t, item) assert.False(t, exists) - assert.Nil(t, err) + assert.NoError(t, err) } func TestGetByKey(t *testing.T) { @@ -41,7 +41,7 @@ func TestGetByKey(t *testing.T) { item, exists, err := o.GetByKey("a") assert.Nil(t, item) assert.False(t, exists) - assert.Nil(t, err) + assert.NoError(t, err) } func TestGetListKeys(t *testing.T) { @@ -76,7 +76,7 @@ func TestGetList(t *testing.T) { func TestDelete(t *testing.T) { o := NewObjStore(transformFunc, zap.NewNop()) err := o.Delete(nil) - assert.NotNil(t, err) + assert.Error(t, err) o.objs = map[types.UID]any{ "bc5f5839-f62e-44b9-a79e-af250d92dcb1": &v1.Pod{ @@ -115,7 +115,7 @@ func TestDelete(t *testing.T) { }, } err = o.Delete(obj) - assert.Nil(t, err) + assert.NoError(t, err) assert.True(t, o.refreshed) keys := o.ListKeys() @@ -126,7 +126,7 @@ func TestDelete(t *testing.T) { func TestAdd(t *testing.T) { o := NewObjStore(transformFunc, zap.NewNop()) err := o.Add(nil) - assert.NotNil(t, err) + assert.Error(t, err) o = NewObjStore(transformFuncWithError, zap.NewNop()) obj := &v1.Pod{ @@ -141,7 +141,7 @@ func TestAdd(t *testing.T) { }, } err = o.Add(obj) - assert.NotNil(t, err) + assert.Error(t, err) } func TestUpdate(t *testing.T) { @@ -171,7 +171,7 @@ func TestUpdate(t *testing.T) { }, } err := o.Update(updatedObj) - assert.Nil(t, err) + assert.NoError(t, err) keys := o.ListKeys() assert.Equal(t, 1, len(keys)) @@ -209,5 +209,5 @@ func TestReplace(t *testing.T) { }, } err := o.Replace(objArray, "") - assert.NotNil(t, err) + assert.Error(t, err) } diff --git a/internal/aws/k8s/k8sclient/package_test.go b/internal/aws/k8s/k8sclient/package_test.go new file mode 100644 index 000000000000..5db6b66f211b --- /dev/null +++ b/internal/aws/k8s/k8sclient/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package k8sclient + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/aws/k8s/k8sclient/pod_test.go b/internal/aws/k8s/k8sclient/pod_test.go index c213a570aca3..9e0e8bdcf60a 100644 --- a/internal/aws/k8s/k8sclient/pod_test.go +++ b/internal/aws/k8s/k8sclient/pod_test.go @@ -189,7 +189,7 @@ func TestPodClient_NamespaceToRunningPodNum(t *testing.T) { func TestTransformFuncPod(t *testing.T) { info, err := transformFuncPod(nil) assert.Nil(t, info) - assert.NotNil(t, err) + assert.Error(t, err) } func TestPodClient_PodNameToPodMap(t *testing.T) { diff --git a/internal/aws/k8s/k8sclient/replicaset_test.go b/internal/aws/k8s/k8sclient/replicaset_test.go index f09189f50fad..b4d5563c11a8 100644 --- a/internal/aws/k8s/k8sclient/replicaset_test.go +++ b/internal/aws/k8s/k8sclient/replicaset_test.go @@ -173,5 +173,5 @@ func TestReplicaSetClient(t *testing.T) { func TestTransformFuncReplicaSet(t *testing.T) { info, err := transformFuncReplicaSet(nil) assert.Nil(t, info) - assert.NotNil(t, err) + assert.Error(t, err) } diff --git a/internal/aws/k8s/k8sutil/package_test.go b/internal/aws/k8s/k8sutil/package_test.go new file mode 100644 index 000000000000..6aa0b05188e1 --- /dev/null +++ b/internal/aws/k8s/k8sutil/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package k8sutil + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/aws/metrics/go.mod b/internal/aws/metrics/go.mod index 3247979f38ce..f534fd3fcb3b 100644 --- a/internal/aws/metrics/go.mod +++ b/internal/aws/metrics/go.mod @@ -1,10 +1,11 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/otel v1.20.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/otel v1.24.0 + go.uber.org/goleak v1.3.0 ) require ( diff --git a/internal/aws/metrics/go.sum b/internal/aws/metrics/go.sum index eb9fb4cae92b..a18f13be7e11 100644 --- a/internal/aws/metrics/go.sum +++ b/internal/aws/metrics/go.sum @@ -2,6 +2,7 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 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/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -10,10 +11,12 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= 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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/internal/aws/metrics/metric_calculator.go b/internal/aws/metrics/metric_calculator.go index 2e1d1d722c07..098b673fbded 100644 --- a/internal/aws/metrics/metric_calculator.go +++ b/internal/aws/metrics/metric_calculator.go @@ -93,11 +93,10 @@ type Key struct { func NewKey(metricMetadata any, labels map[string]string) Key { kvs := make([]attribute.KeyValue, 0, len(labels)) - var sortable attribute.Sortable for k, v := range labels { kvs = append(kvs, attribute.String(k, v)) } - set := attribute.NewSetWithSortable(kvs, &sortable) + set := attribute.NewSet(kvs...) dedupSortedLabels := set.Equivalent() return Key{ diff --git a/internal/aws/metrics/package_test.go b/internal/aws/metrics/package_test.go new file mode 100644 index 000000000000..b8f16a8085ef --- /dev/null +++ b/internal/aws/metrics/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metrics + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/aws/proxy/cfg.go b/internal/aws/proxy/cfg.go index 95603e15a378..526b84c4cb15 100644 --- a/internal/aws/proxy/cfg.go +++ b/internal/aws/proxy/cfg.go @@ -8,6 +8,7 @@ import ( "go.opentelemetry.io/collector/config/configtls" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/localhostgate" ) const ( @@ -20,7 +21,7 @@ type Config struct { // endpoint is the TCP address and port on which this receiver listens for // calls from the X-Ray SDK and relays them to the AWS X-Ray backend to // get sampling rules and report sampling statistics. - confignet.TCPAddr `mapstructure:",squash"` + confignet.TCPAddrConfig `mapstructure:",squash"` // ProxyAddress defines the proxy address that the local TCP server // forwards HTTP requests to AWS X-Ray backend through. @@ -28,7 +29,7 @@ type Config struct { // TLSSetting struct exposes TLS client configuration when forwarding // calls to the AWS X-Ray backend. - TLSSetting configtls.TLSClientSetting `mapstructure:"tls,omitempty"` + TLSSetting configtls.ClientConfig `mapstructure:"tls,omitempty"` // Region is the AWS region the local TCP server forwards requests to. Region string `mapstructure:"region"` @@ -57,21 +58,26 @@ type Config struct { // How many times should we retry imds v2 IMDSRetries int `mapstructure:"imds_retries"` + + // ServiceName determines which service the requests are sent to. + // will be default to `xray`. This is mandatory for SigV4 + ServiceName string `mapstructure:"service_name"` } func DefaultConfig() *Config { return &Config{ - TCPAddr: confignet.TCPAddr{ - Endpoint: "0.0.0.0:2000", + TCPAddrConfig: confignet.TCPAddrConfig{ + Endpoint: localhostgate.EndpointForPort(2000), }, ProxyAddress: "", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: false, ServerName: "", }, Region: "", RoleARN: "", AWSEndpoint: "", + ServiceName: "xray", } } diff --git a/internal/aws/proxy/go.mod b/internal/aws/proxy/go.mod index 324978a96847..3ad4fe41e903 100644 --- a/internal/aws/proxy/go.mod +++ b/internal/aws/proxy/go.mod @@ -1,15 +1,15 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy -go 1.20 +go 1.21 require ( - github.com/aws/aws-sdk-go v1.47.10 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/config/confignet v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.uber.org/zap v1.26.0 + github.com/aws/aws-sdk-go v1.51.17 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/config/confignet v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.uber.org/zap v1.27.0 ) require ( @@ -19,11 +19,11 @@ require ( github.com/hashicorp/go-version v1.6.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/internal/aws/proxy/go.sum b/internal/aws/proxy/go.sum index 2b3401c624ad..ae0bc234fda2 100644 --- a/internal/aws/proxy/go.sum +++ b/internal/aws/proxy/go.sum @@ -1,47 +1,68 @@ -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= 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/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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/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/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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +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/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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/aws/proxy/server.go b/internal/aws/proxy/server.go index 6728616b730d..451046dc6112 100644 --- a/internal/aws/proxy/server.go +++ b/internal/aws/proxy/server.go @@ -26,7 +26,6 @@ import ( ) const ( - service = "xray" connHeader = "Connection" ) @@ -46,6 +45,9 @@ func NewServer(cfg *Config, logger *zap.Logger) (Server, error) { if cfg.ProxyAddress != "" { logger.Debug("Using remote proxy", zap.String("address", cfg.ProxyAddress)) } + if cfg.ServiceName == "" { + cfg.ServiceName = "xray" + } sessionCfg := cfg.toSessionConfig() awsCfg, sess, err := awsutil.GetAWSConfigSession(logger, &awsutil.Conn{}, sessionCfg) @@ -53,7 +55,7 @@ func NewServer(cfg *Config, logger *zap.Logger) (Server, error) { return nil, err } - awsEndPoint, err := getServiceEndpoint(awsCfg) + awsEndPoint, err := getServiceEndpoint(awsCfg, cfg.ServiceName) if err != nil { return nil, err } @@ -103,7 +105,7 @@ func NewServer(cfg *Config, logger *zap.Logger) (Server, error) { } // Sign request. signer.Sign() also repopulates the request body. - _, err = signer.Sign(req, body, service, *awsCfg.Region, time.Now()) + _, err = signer.Sign(req, body, cfg.ServiceName, *awsCfg.Region, time.Now()) if err != nil { logger.Error("Unable to sign request", zap.Error(err)) } @@ -119,13 +121,13 @@ func NewServer(cfg *Config, logger *zap.Logger) (Server, error) { // getServiceEndpoint returns X-Ray service endpoint. // It is guaranteed that awsCfg config instance is non-nil and the region value is non nil or non empty in awsCfg object. -// Currently the caller takes care of it. -func getServiceEndpoint(awsCfg *aws.Config) (string, error) { +// Currently, the caller takes care of it. +func getServiceEndpoint(awsCfg *aws.Config, serviceName string) (string, error) { if isEmpty(awsCfg.Endpoint) { if isEmpty(awsCfg.Region) { return "", errors.New("unable to generate endpoint from region with nil value") } - resolved, err := endpoints.DefaultResolver().EndpointFor(service, *awsCfg.Region, setResolverConfig()) + resolved, err := endpoints.DefaultResolver().EndpointFor(serviceName, *awsCfg.Region, setResolverConfig()) return resolved.URL, err } return *awsCfg.Endpoint, nil diff --git a/internal/aws/proxy/server_test.go b/internal/aws/proxy/server_test.go index 7b2a593a0c1f..f47d2f145af2 100644 --- a/internal/aws/proxy/server_test.go +++ b/internal/aws/proxy/server_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !windows -// +build !windows // TODO review if tests should succeed on Windows package proxy @@ -44,7 +43,7 @@ func TestHappyCase(t *testing.T) { cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) - cfg.TCPAddr.Endpoint = tcpAddr + cfg.TCPAddrConfig.Endpoint = tcpAddr cfg.ProxyAddress = "https://example.com" srv, err := NewServer(cfg, logger) assert.NoError(t, err, "NewServer should succeed") @@ -76,7 +75,7 @@ func TestHandlerHappyCase(t *testing.T) { cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) - cfg.TCPAddr.Endpoint = tcpAddr + cfg.TCPAddrConfig.Endpoint = tcpAddr srv, err := NewServer(cfg, logger) assert.NoError(t, err, "NewServer should succeed") @@ -101,7 +100,7 @@ func TestHandlerIoReadSeekerCreationFailed(t *testing.T) { cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) - cfg.TCPAddr.Endpoint = tcpAddr + cfg.TCPAddrConfig.Endpoint = tcpAddr srv, err := NewServer(cfg, logger) assert.NoError(t, err, "NewServer should succeed") @@ -130,7 +129,7 @@ func TestHandlerNilBodyIsOk(t *testing.T) { cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) - cfg.TCPAddr.Endpoint = tcpAddr + cfg.TCPAddrConfig.Endpoint = tcpAddr srv, err := NewServer(cfg, logger) assert.NoError(t, err, "NewServer should succeed") @@ -154,7 +153,7 @@ func TestHandlerSignerErrorsOut(t *testing.T) { cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) - cfg.TCPAddr.Endpoint = tcpAddr + cfg.TCPAddrConfig.Endpoint = tcpAddr srv, err := NewServer(cfg, logger) assert.NoError(t, err, "NewServer should succeed") @@ -180,7 +179,7 @@ func TestTCPEndpointInvalid(t *testing.T) { t.Setenv(regionEnvVarName, regionEnvVar) cfg := DefaultConfig() - cfg.TCPAddr.Endpoint = "invalid\n" + cfg.TCPAddrConfig.Endpoint = "invalid\n" _, err := NewServer(cfg, logger) assert.Error(t, err, "NewServer should fail") } @@ -192,7 +191,7 @@ func TestCantGetServiceEndpoint(t *testing.T) { cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) - cfg.TCPAddr.Endpoint = tcpAddr + cfg.TCPAddrConfig.Endpoint = tcpAddr _, err := NewServer(cfg, logger) assert.Error(t, err, "NewServer should fail") @@ -206,7 +205,7 @@ func TestAWSEndpointInvalid(t *testing.T) { cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) - cfg.TCPAddr.Endpoint = tcpAddr + cfg.TCPAddrConfig.Endpoint = tcpAddr cfg.AWSEndpoint = "invalid endpoint \n" _, err := NewServer(cfg, logger) @@ -221,7 +220,7 @@ func TestCanCreateTransport(t *testing.T) { cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) - cfg.TCPAddr.Endpoint = tcpAddr + cfg.TCPAddrConfig.Endpoint = tcpAddr cfg.ProxyAddress = "invalid address \n" _, err := NewServer(cfg, logger) @@ -230,7 +229,7 @@ func TestCanCreateTransport(t *testing.T) { } func TestGetServiceEndpointInvalidAWSConfig(t *testing.T) { - _, err := getServiceEndpoint(&aws.Config{}) + _, err := getServiceEndpoint(&aws.Config{}, "") assert.EqualError(t, err, "unable to generate endpoint from region with nil value") } diff --git a/internal/aws/xray/go.mod b/internal/aws/xray/go.mod index 216f24c7b312..be9faea9fc93 100644 --- a/internal/aws/xray/go.mod +++ b/internal/aws/xray/go.mod @@ -1,44 +1,43 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray -go 1.20 +go 1.21 require ( github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-00010101000000-000000000000 - github.com/aws/aws-sdk-go v1.47.10 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.uber.org/zap v1.26.0 + github.com/aws/aws-sdk-go v1.51.17 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/internal/aws/xray/go.sum b/internal/aws/xray/go.sum index c52283dd7844..77633959fa32 100644 --- a/internal/aws/xray/go.sum +++ b/internal/aws/xray/go.sum @@ -1,10 +1,14 @@ -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= 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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -12,8 +16,7 @@ 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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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= @@ -24,50 +27,47 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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.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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -77,16 +77,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -99,18 +99,19 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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/aws/xray/telemetry/registry_test.go b/internal/aws/xray/telemetry/registry_test.go index 84f0dc7db304..0b297f5bec7c 100644 --- a/internal/aws/xray/telemetry/registry_test.go +++ b/internal/aws/xray/telemetry/registry_test.go @@ -12,9 +12,9 @@ import ( func TestRegistry(t *testing.T) { r := NewRegistry() - newID := component.NewID("new") - contribID := component.NewID("contrib") - notCreatedID := component.NewID("not-created") + newID := component.MustNewID("new") + contribID := component.MustNewID("contrib") + notCreatedID := component.MustNewID("not_created") original := r.Register( newID, Config{ diff --git a/internal/aws/xray/telemetry/telemetrytest/nop_registry_test.go b/internal/aws/xray/telemetry/telemetrytest/nop_registry_test.go index 58db96b1af3e..440d4b596778 100644 --- a/internal/aws/xray/telemetry/telemetrytest/nop_registry_test.go +++ b/internal/aws/xray/telemetry/telemetrytest/nop_registry_test.go @@ -16,9 +16,9 @@ func TestNopRegistry(t *testing.T) { assert.Same(t, nopRegistryInstance, NewNopRegistry()) r := NewNopRegistry() assert.NotPanics(t, func() { - recorder := r.Register(component.NewID("a"), telemetry.Config{}, nil) - assert.Same(t, recorder, r.Load(component.NewID("b"))) - r.LoadOrStore(component.NewID("c"), recorder) - r.LoadOrNop(component.NewID("d")) + recorder := r.Register(component.MustNewID("a"), telemetry.Config{}, nil) + assert.Same(t, recorder, r.Load(component.MustNewID("b"))) + r.LoadOrStore(component.MustNewID("c"), recorder) + r.LoadOrNop(component.MustNewID("d")) }) } diff --git a/internal/aws/xray/telemetry/telemetrytest/package_test.go b/internal/aws/xray/telemetry/telemetrytest/package_test.go new file mode 100644 index 000000000000..35409b0a8e41 --- /dev/null +++ b/internal/aws/xray/telemetry/telemetrytest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package telemetrytest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/aws/xray/testdata/sampleapp/go.mod b/internal/aws/xray/testdata/sampleapp/go.mod index 41b71f99ac65..2d624bce85e3 100644 --- a/internal/aws/xray/testdata/sampleapp/go.mod +++ b/internal/aws/xray/testdata/sampleapp/go.mod @@ -1,27 +1,27 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray/testdata/sampleapp -go 1.20 +go 1.21 require ( - github.com/aws/aws-sdk-go v1.47.10 - github.com/aws/aws-xray-sdk-go v1.8.2 + github.com/aws/aws-sdk-go v1.51.17 + github.com/aws/aws-xray-sdk-go v1.8.3 ) require ( - github.com/andybalholm/brotli v1.0.4 // indirect + github.com/andybalholm/brotli v1.0.6 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/klauspost/compress v1.17.2 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/stretchr/testify v1.8.4 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fasthttp v1.34.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/valyala/fasthttp v1.50.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/internal/aws/xray/testdata/sampleapp/go.sum b/internal/aws/xray/testdata/sampleapp/go.sum index d2891abd7322..4bbda2aa0e1e 100644 --- a/internal/aws/xray/testdata/sampleapp/go.sum +++ b/internal/aws/xray/testdata/sampleapp/go.sum @@ -1,23 +1,26 @@ github.com/DATA-DOG/go-sqlmock v1.4.1 h1:ThlnYciV1iM/V0OSF/dtkqWb6xo5qITT1TJBG1MRDJM= -github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= -github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= -github.com/aws/aws-xray-sdk-go v1.8.2 h1:PVxNWnQG+rAYjxsmhEN97DTO57Dipg6VS0wsu6bXUB0= -github.com/aws/aws-xray-sdk-go v1.8.2/go.mod h1:wMmVYzej3sykAttNBkXQHK/+clAPWTOrPiajEk7Cp3A= +github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= +github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-xray-sdk-go v1.8.3 h1:S8GdgVncBRhzbNnNUgTPwhEqhwt2alES/9rLASyhxjU= +github.com/aws/aws-xray-sdk-go v1.8.3/go.mod h1:tv8uLMOSCABolrIF8YCcp3ghyswArsan8dfLCA1ZATk= 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/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/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= 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/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -29,39 +32,26 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.34.0 h1:d3AAQJ2DRcxJYHm7OXNXtXt2as1vMDfxeIcFvhmGGm4= -github.com/valyala/fasthttp v1.34.0/go.mod h1:epZA5N+7pY6ZaEKRmstzOuYJx9HI8DI1oaCGZpdH4h0= -github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/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-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.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/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +github.com/valyala/fasthttp v1.50.0 h1:H7fweIlBm0rXLs2q0XbalvJ6r0CUPFWK3/bB4N13e9M= +github.com/valyala/fasthttp v1.50.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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/aws/xray/testdata/sampleserver/go.mod b/internal/aws/xray/testdata/sampleserver/go.mod index b71ca344e0c4..1aaa8cc656bf 100644 --- a/internal/aws/xray/testdata/sampleserver/go.mod +++ b/internal/aws/xray/testdata/sampleserver/go.mod @@ -1,11 +1,11 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray/testdata/sampleserver -go 1.20 +go 1.21 -require github.com/aws/aws-xray-sdk-go v1.8.2 +require github.com/aws/aws-xray-sdk-go v1.8.3 require ( - github.com/andybalholm/brotli v1.0.4 // indirect + github.com/andybalholm/brotli v1.0.6 // indirect github.com/aws/aws-sdk-go v1.47.10 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect @@ -13,13 +13,13 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/stretchr/testify v1.8.4 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fasthttp v1.34.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/valyala/fasthttp v1.50.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect ) retract ( diff --git a/internal/aws/xray/testdata/sampleserver/go.sum b/internal/aws/xray/testdata/sampleserver/go.sum index 8dbf320920db..5bc469739871 100644 --- a/internal/aws/xray/testdata/sampleserver/go.sum +++ b/internal/aws/xray/testdata/sampleserver/go.sum @@ -1,23 +1,26 @@ github.com/DATA-DOG/go-sqlmock v1.4.1 h1:ThlnYciV1iM/V0OSF/dtkqWb6xo5qITT1TJBG1MRDJM= -github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= -github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= +github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= -github.com/aws/aws-xray-sdk-go v1.8.2 h1:PVxNWnQG+rAYjxsmhEN97DTO57Dipg6VS0wsu6bXUB0= -github.com/aws/aws-xray-sdk-go v1.8.2/go.mod h1:wMmVYzej3sykAttNBkXQHK/+clAPWTOrPiajEk7Cp3A= +github.com/aws/aws-xray-sdk-go v1.8.3 h1:S8GdgVncBRhzbNnNUgTPwhEqhwt2alES/9rLASyhxjU= +github.com/aws/aws-xray-sdk-go v1.8.3/go.mod h1:tv8uLMOSCABolrIF8YCcp3ghyswArsan8dfLCA1ZATk= 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/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/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= 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/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -29,38 +32,25 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.34.0 h1:d3AAQJ2DRcxJYHm7OXNXtXt2as1vMDfxeIcFvhmGGm4= -github.com/valyala/fasthttp v1.34.0/go.mod h1:epZA5N+7pY6ZaEKRmstzOuYJx9HI8DI1oaCGZpdH4h0= -github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/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-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.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/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +github.com/valyala/fasthttp v1.50.0 h1:H7fweIlBm0rXLs2q0XbalvJ6r0CUPFWK3/bB4N13e9M= +github.com/valyala/fasthttp v1.50.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 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/aws/xray/testdata/sampleserver/sample.go b/internal/aws/xray/testdata/sampleserver/sample.go index 57c8f7218c47..5c93b0f376b8 100644 --- a/internal/aws/xray/testdata/sampleserver/sample.go +++ b/internal/aws/xray/testdata/sampleserver/sample.go @@ -15,7 +15,7 @@ func main() { mux := http.NewServeMux() mux.Handle("/", xray.Handler( xray.NewFixedSegmentNamer("SampleServer"), http.HandlerFunc( - func(w http.ResponseWriter, r *http.Request) { + func(w http.ResponseWriter, _ *http.Request) { _, _ = w.Write([]byte("Hello!")) }, ), diff --git a/internal/buildscripts/modules b/internal/buildscripts/modules index 7367f7a44f8d..883e88ae50b1 100644 --- a/internal/buildscripts/modules +++ b/internal/buildscripts/modules @@ -4,11 +4,9 @@ beta_modules=( "go.opentelemetry.io/collector/cmd/builder" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configauth" - "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/confignet" - "go.opentelemetry.io/collector/config/configopaque" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/config/internal" @@ -34,10 +32,9 @@ beta_modules=( "go.opentelemetry.io/collector/semconv" ) -rc_modules=( +stable_modules=( "go.opentelemetry.io/collector/featuregate" "go.opentelemetry.io/collector/pdata" + "go.opentelemetry.io/collector/config/configcompression" + "go.opentelemetry.io/collector/config/configopaque" ) - -# No stable modules currently exist, add pdata here once 1.0.0 -stable_modules=() diff --git a/internal/buildscripts/packaging/fpm/Dockerfile b/internal/buildscripts/packaging/fpm/Dockerfile index 17cd13f56215..000a4d3e9879 100644 --- a/internal/buildscripts/packaging/fpm/Dockerfile +++ b/internal/buildscripts/packaging/fpm/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:11 +FROM debian:12 RUN apt-get update && \ apt-get install -y ruby ruby-dev rubygems build-essential git rpm diff --git a/internal/buildscripts/packaging/fpm/common.sh b/internal/buildscripts/packaging/fpm/common.sh index b6ac48fae05e..3ec39d83d90c 100644 --- a/internal/buildscripts/packaging/fpm/common.sh +++ b/internal/buildscripts/packaging/fpm/common.sh @@ -31,8 +31,8 @@ docker_cp() { local dest_dir="$( dirname "$dest" )" echo "Copying $src to $container:$dest ..." - docker exec $container mkdir -p "$dest_dir" - docker cp "$src" $container:"$dest" + podman exec $container mkdir -p "$dest_dir" + podman cp "$src" $container:"$dest" } install_pkg() { @@ -43,9 +43,9 @@ install_pkg() { echo "Installing $pkg_base ..." docker_cp $container "$pkg_path" /tmp/$pkg_base if [[ "${pkg_base##*.}" = "deb" ]]; then - docker exec $container dpkg -i /tmp/$pkg_base + podman exec $container dpkg -i /tmp/$pkg_base else - docker exec $container rpm -ivh /tmp/$pkg_base + podman exec $container rpm -ivh /tmp/$pkg_base fi } @@ -56,8 +56,8 @@ uninstall_pkg() { echo "Uninstalling $pkg_name ..." if [[ "$pkg_type" = "deb" ]]; then - docker exec $container dpkg -r $pkg_name + podman exec $container dpkg -r $pkg_name else - docker exec $container rpm -e $pkg_name + podman exec $container rpm -e $pkg_name fi -} \ No newline at end of file +} diff --git a/internal/buildscripts/packaging/fpm/deb/Dockerfile.test b/internal/buildscripts/packaging/fpm/deb/Dockerfile.test index dcfac148f0fa..56d482f9d5c0 100644 --- a/internal/buildscripts/packaging/fpm/deb/Dockerfile.test +++ b/internal/buildscripts/packaging/fpm/deb/Dockerfile.test @@ -1,6 +1,6 @@ # A debian11 image with systemd enabled. Must be run with: # `-d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro` flags -FROM debian:11 +FROM debian:12 ENV container docker ENV DEBIAN_FRONTEND noninteractive @@ -9,14 +9,6 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt-get update ; \ apt-get install -y systemd systemd-sysv procps; \ apt-get clean ; \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ; \ - rm -rf /lib/systemd/system/multi-user.target.wants/* ; \ - rm -rf /etc/systemd/system/*.wants/* ; \ - rm -rf /lib/systemd/system/local-fs.target.wants/* ; \ - rm -rf /lib/systemd/system/sockets.target.wants/*udev* ; \ - rm -rf /lib/systemd/system/sockets.target.wants/*initctl* ; \ - rm -rf /lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup* ; \ - rm -rf /lib/systemd/system/systemd-update-utmp* + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -VOLUME [ "/sys/fs/cgroup" ] CMD ["/lib/systemd/systemd"] diff --git a/internal/buildscripts/packaging/fpm/rpm/Dockerfile.test b/internal/buildscripts/packaging/fpm/rpm/Dockerfile.test index 45367b0dbf41..8429e850d73b 100644 --- a/internal/buildscripts/packaging/fpm/rpm/Dockerfile.test +++ b/internal/buildscripts/packaging/fpm/rpm/Dockerfile.test @@ -1,20 +1,9 @@ # A rockylinux8.5 image with systemd enabled. Must be run with: # `-d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro` flags -FROM rockylinux:8.8 +FROM rockylinux:9.3 ENV container docker RUN dnf install -y initscripts -RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i = \ - "systemd-tmpfiles-setup.service" ] || rm -f $i; done); \ - rm -f /lib/systemd/system/multi-user.target.wants/*;\ - rm -f /lib/systemd/system/local-fs.target.wants/*; \ - rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ - rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ - rm -f /lib/systemd/system/basic.target.wants/*;\ - rm -f /lib/systemd/system/anaconda.target.wants/*; - -VOLUME [ "/sys/fs/cgroup" ] - CMD ["/usr/sbin/init"] diff --git a/internal/buildscripts/packaging/fpm/test.sh b/internal/buildscripts/packaging/fpm/test.sh index 7c2a9e186921..9baf04cb0903 100755 --- a/internal/buildscripts/packaging/fpm/test.sh +++ b/internal/buildscripts/packaging/fpm/test.sh @@ -30,47 +30,59 @@ if [[ ! "$pkg_type" =~ ^(deb|rpm)$ ]]; then fi image_name="otelcontribcol-$pkg_type-test" container_name="$image_name" -docker_run="docker run --name $container_name -d -v /sys/fs/cgroup:/sys/fs/cgroup:ro --privileged $image_name" -docker_exec="docker exec $container_name" +container_exec="podman exec $container_name" -trap "docker rm -fv $container_name >/dev/null 2>&1 || true" EXIT +trap "podman rm -fv $container_name >/dev/null 2>&1 || true" EXIT -docker build -t $image_name -f "$SCRIPT_DIR/$pkg_type/Dockerfile.test" "$SCRIPT_DIR" -docker rm -fv $container_name >/dev/null 2>&1 || true +podman build -t $image_name -f "$SCRIPT_DIR/$pkg_type/Dockerfile.test" "$SCRIPT_DIR" +podman rm -fv $container_name >/dev/null 2>&1 || true # test install +CRUN_VER='1.14.4' +mkdir -p "${HOME}/.local/bin" +curl -L "https://github.com/containers/crun/releases/download/${CRUN_VER}/crun-${CRUN_VER}-linux-amd64" -o "${HOME}/.local/bin/crun" +chmod +x "${HOME}/.local/bin/crun" +mkdir -p "${HOME}/.config/containers" +cat << EOF > "${HOME}/.config/containers/containers.conf" +[engine.runtimes] +crun = [ + "${HOME}/.local/bin/crun", + "/usr/bin/crun" +] +EOF + echo -$docker_run +podman run --name $container_name -d $image_name install_pkg $container_name "$PKG_PATH" # ensure service has started and still running after 5 seconds sleep 5 echo "Checking $SERVICE_NAME service status ..." -$docker_exec systemctl --no-pager status $SERVICE_NAME +$container_exec systemctl --no-pager status $SERVICE_NAME echo "Checking $PROCESS_NAME process ..." -$docker_exec pgrep -a -u otel $PROCESS_NAME +$container_exec pgrep -a -u otel $PROCESS_NAME # test uninstall echo uninstall_pkg $container_name $pkg_type echo "Checking $SERVICE_NAME service status after uninstall ..." -if $docker_exec systemctl --no-pager status $SERVICE_NAME; then +if $container_exec systemctl --no-pager status $SERVICE_NAME; then echo "$SERVICE_NAME service still running after uninstall" >&2 exit 1 fi echo "$SERVICE_NAME service successfully stopped after uninstall" echo "Checking $SERVICE_NAME service existence after uninstall ..." -if $docker_exec systemctl list-unit-files --all | grep $SERVICE_NAME; then +if $container_exec systemctl list-unit-files --all | grep $SERVICE_NAME; then echo "$SERVICE_NAME service still exists after uninstall" >&2 exit 1 fi echo "$SERVICE_NAME service successfully removed after uninstall" echo "Checking $PROCESS_NAME process after uninstall ..." -if $docker_exec pgrep $PROCESS_NAME; then +if $container_exec pgrep $PROCESS_NAME; then echo "$PROCESS_NAME process still running after uninstall" exit 1 fi diff --git a/internal/buildscripts/update-dep b/internal/buildscripts/update-dep deleted file mode 100755 index e79df74741ff..000000000000 --- a/internal/buildscripts/update-dep +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -x - -# Updates MODULE inside go.mod if it is already present to version VERSION. - -source `git rev-parse --show-toplevel`/internal/buildscripts/modules - -set -e - -if grep -q "$MODULE " go.mod; then - go get "$MODULE"@"$VERSION" -fi - -# If MODULE is "go.opentelemetry.io/collector" need to update additional $modules as well -if [ "$MODULE" == "go.opentelemetry.io/collector" ]; then - for mod in ${beta_modules[@]}; do - if grep -q "$mod " go.mod; then - go get -d "$mod"@"$VERSION" - fi - done - for mod in ${rc_modules[@]}; do - if grep -q "$mod " go.mod; then - go get -d "$mod"@"$RC_VERSION" - fi - done - for mod in ${stable_modules[@]}; do - if grep -q "$mod " go.mod; then - go get -d "$mod"@"$STABLE_VERSION" - fi - done -fi diff --git a/internal/collectd/go.mod b/internal/collectd/go.mod index 62d9daa81e5c..49e8d1c672fb 100644 --- a/internal/collectd/go.mod +++ b/internal/collectd/go.mod @@ -1,3 +1,3 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/collectd -go 1.20 +go 1.21 diff --git a/internal/common/docker/package_test.go b/internal/common/docker/package_test.go new file mode 100644 index 000000000000..0ebd6a327e31 --- /dev/null +++ b/internal/common/docker/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package docker + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/common/go.mod b/internal/common/go.mod index e697bdb3c3f3..c92ff3c4e47b 100644 --- a/internal/common/go.mod +++ b/internal/common/go.mod @@ -1,11 +1,12 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/common -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 - go.uber.org/zap v1.26.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/featuregate v1.5.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( diff --git a/internal/common/go.sum b/internal/common/go.sum index 4ddeadca5dab..0fc6a19ca235 100644 --- a/internal/common/go.sum +++ b/internal/common/go.sum @@ -3,20 +3,25 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs 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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/common/localhostgate/featuregate.go b/internal/common/localhostgate/featuregate.go new file mode 100644 index 000000000000..238d909f0b63 --- /dev/null +++ b/internal/common/localhostgate/featuregate.go @@ -0,0 +1,68 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// package localhostgate defines a feature gate that controls whether server-like receivers and extensions use localhost as the default host for their endpoints. +// This package is duplicated across core and contrib to avoid exposing the feature gate as part of the public API. +// To do this we define a `registerOrLoad` helper and try to register the gate in both modules. +// IMPORTANT NOTE: ANY CHANGES TO THIS PACKAGE MUST BE MIRRORED IN THE CORE COUNTERPART. +// See https://github.com/open-telemetry/opentelemetry-collector/blob/main/internal/localhostgate/featuregate.go +package localhostgate // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/localhostgate" + +import ( + "errors" + "fmt" + + "go.opentelemetry.io/collector/featuregate" + "go.uber.org/zap" +) + +const UseLocalHostAsDefaultHostID = "component.UseLocalHostAsDefaultHost" + +// UseLocalHostAsDefaultHostfeatureGate is the feature gate that controls whether +// server-like receivers and extensions such as the OTLP receiver use localhost as the default host for their endpoints. +var UseLocalHostAsDefaultHostfeatureGate = mustRegisterOrLoad( + featuregate.GlobalRegistry(), + UseLocalHostAsDefaultHostID, + featuregate.StageAlpha, + featuregate.WithRegisterDescription("controls whether server-like receivers and extensions such as the OTLP receiver use localhost as the default host for their endpoints"), +) + +// mustRegisterOrLoad tries to register the feature gate and loads it if it already exists. +// It panics on any other error. +func mustRegisterOrLoad(reg *featuregate.Registry, id string, stage featuregate.Stage, opts ...featuregate.RegisterOption) *featuregate.Gate { + gate, err := reg.Register(id, stage, opts...) + + if errors.Is(err, featuregate.ErrAlreadyRegistered) { + // Gate is already registered; find it. + // Only a handful of feature gates are registered, so it's fine to iterate over all of them. + reg.VisitAll(func(g *featuregate.Gate) { + if g.ID() == id { + gate = g + return + } + }) + } else if err != nil { + panic(err) + } + + return gate +} + +// EndpointForPort gets the endpoint for a given port using localhost or 0.0.0.0 depending on the feature gate. +func EndpointForPort(port int) string { + host := "localhost" + if !UseLocalHostAsDefaultHostfeatureGate.IsEnabled() { + host = "0.0.0.0" + } + return fmt.Sprintf("%s:%d", host, port) +} + +// LogAboutUseLocalHostAsDefault logs about the upcoming change from 0.0.0.0 to localhost on server-like components. +func LogAboutUseLocalHostAsDefault(logger *zap.Logger) { + if !UseLocalHostAsDefaultHostfeatureGate.IsEnabled() { + logger.Warn( + "The default endpoints for all servers in components will change to use localhost instead of 0.0.0.0 in a future version. Use the feature gate to preview the new default.", + zap.String("feature gate ID", UseLocalHostAsDefaultHostID), + ) + } +} diff --git a/internal/common/localhostgate/featuregate_test.go b/internal/common/localhostgate/featuregate_test.go new file mode 100644 index 000000000000..3c2972ccab4b --- /dev/null +++ b/internal/common/localhostgate/featuregate_test.go @@ -0,0 +1,56 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package localhostgate + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/featuregate" +) + +func setFeatureGateForTest(t testing.TB, gate *featuregate.Gate, enabled bool) func() { + originalValue := gate.IsEnabled() + require.NoError(t, featuregate.GlobalRegistry().Set(gate.ID(), enabled)) + return func() { + require.NoError(t, featuregate.GlobalRegistry().Set(gate.ID(), originalValue)) + } +} + +func TestEndpointForPort(t *testing.T) { + tests := []struct { + port int + enabled bool + endpoint string + }{ + { + port: 4317, + enabled: false, + endpoint: "0.0.0.0:4317", + }, + { + port: 4317, + enabled: true, + endpoint: "localhost:4317", + }, + { + port: 0, + enabled: false, + endpoint: "0.0.0.0:0", + }, + { + port: 0, + enabled: true, + endpoint: "localhost:0", + }, + } + + for _, tt := range tests { + t.Run(tt.endpoint, func(t *testing.T) { + defer setFeatureGateForTest(t, UseLocalHostAsDefaultHostfeatureGate, tt.enabled)() + assert.Equal(t, EndpointForPort(tt.port), tt.endpoint) + }) + } +} diff --git a/internal/common/maps/package_test.go b/internal/common/maps/package_test.go new file mode 100644 index 000000000000..5a6d3748e8b6 --- /dev/null +++ b/internal/common/maps/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package maps + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/common/sanitize/package_test.go b/internal/common/sanitize/package_test.go new file mode 100644 index 000000000000..772d527918a6 --- /dev/null +++ b/internal/common/sanitize/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sanitize + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/common/testutil/package_test.go b/internal/common/testutil/package_test.go new file mode 100644 index 000000000000..d77e80fc1ab0 --- /dev/null +++ b/internal/common/testutil/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package testutil + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/common/testutil/testutil.go b/internal/common/testutil/testutil.go index a6437bba3942..1f958995d530 100644 --- a/internal/common/testutil/testutil.go +++ b/internal/common/testutil/testutil.go @@ -7,6 +7,7 @@ import ( "net" "os/exec" "runtime" + "strconv" "strings" "testing" @@ -133,3 +134,14 @@ func SetFeatureGateForTest(t testing.TB, gate *featuregate.Gate, enabled bool) f require.NoError(t, featuregate.GlobalRegistry().Set(gate.ID(), originalValue)) } } + +func GetAvailablePort(t testing.TB) int { + endpoint := GetAvailableLocalAddress(t) + _, port, err := net.SplitHostPort(endpoint) + require.NoError(t, err) + + portInt, err := strconv.Atoi(port) + require.NoError(t, err) + + return portInt +} diff --git a/internal/components/components.go b/internal/components/components.go index 2555806fd655..979bb07bc50d 100644 --- a/internal/components/components.go +++ b/internal/components/components.go @@ -4,6 +4,8 @@ package components // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/components" import ( + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/forwardconnector" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/debugexporter" "go.opentelemetry.io/collector/exporter/loggingexporter" @@ -19,6 +21,13 @@ import ( "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/otlpreceiver" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter" @@ -34,7 +43,6 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter" - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter" @@ -48,6 +56,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter" @@ -57,7 +66,6 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter" - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension" @@ -66,7 +74,6 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension" - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver" @@ -80,7 +87,6 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor" @@ -92,8 +98,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" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor" @@ -199,7 +203,6 @@ func Components() (otelcol.Factories, error) { headerssetterextension.NewFactory(), healthcheckextension.NewFactory(), hostobserver.NewFactory(), - httpforwarder.NewFactory(), jaegerremotesampling.NewFactory(), k8sobserver.NewFactory(), pprofextension.NewFactory(), @@ -322,7 +325,6 @@ func Components() (otelcol.Factories, error) { debugexporter.NewFactory(), dynatraceexporter.NewFactory(), elasticsearchexporter.NewFactory(), - f5cloudexporter.NewFactory(), fileexporter.NewFactory(), googlecloudexporter.NewFactory(), googlemanagedprometheusexporter.NewFactory(), @@ -337,6 +339,7 @@ func Components() (otelcol.Factories, error) { lokiexporter.NewFactory(), mezmoexporter.NewFactory(), opencensusexporter.NewFactory(), + opensearchexporter.NewFactory(), otlpexporter.NewFactory(), otlphttpexporter.NewFactory(), prometheusexporter.NewFactory(), @@ -348,7 +351,6 @@ func Components() (otelcol.Factories, error) { skywalkingexporter.NewFactory(), splunkhecexporter.NewFactory(), sumologicexporter.NewFactory(), - tanzuobservabilityexporter.NewFactory(), tencentcloudlogserviceexporter.NewFactory(), zipkinexporter.NewFactory(), } @@ -372,11 +374,8 @@ func Components() (otelcol.Factories, error) { resourceprocessor.NewFactory(), routingprocessor.NewFactory(), tailsamplingprocessor.NewFactory(), - servicegraphprocessor.NewFactory(), - spanmetricsprocessor.NewFactory(), spanprocessor.NewFactory(), cumulativetodeltaprocessor.NewFactory(), - datadogprocessor.NewFactory(), deltatorateprocessor.NewFactory(), transformprocessor.NewFactory(), } @@ -385,5 +384,20 @@ func Components() (otelcol.Factories, error) { return otelcol.Factories{}, err } + connectors := []connector.Factory{ + forwardconnector.NewFactory(), + countconnector.NewFactory(), + datadogconnector.NewFactory(), + exceptionsconnector.NewFactory(), + grafanacloudconnector.NewFactory(), + routingconnector.NewFactory(), + servicegraphconnector.NewFactory(), + spanmetricsconnector.NewFactory(), + } + factories.Connectors, err = connector.MakeFactoryMap(connectors...) + if err != nil { + return otelcol.Factories{}, err + } + return factories, nil } diff --git a/internal/coreinternal/attraction/attraction.go b/internal/coreinternal/attraction/attraction.go index 970bb91c2d4e..c05d4c4d52bd 100644 --- a/internal/coreinternal/attraction/attraction.go +++ b/internal/coreinternal/attraction/attraction.go @@ -10,18 +10,10 @@ import ( "strings" "go.opentelemetry.io/collector/client" - "go.opentelemetry.io/collector/featuregate" "go.opentelemetry.io/collector/pdata/pcommon" "go.uber.org/zap" ) -var enableSha256Gate = featuregate.GlobalRegistry().MustRegister( - "coreinternal.attraction.hash.sha256", - featuregate.StageStable, - featuregate.WithRegisterDescription("When enabled, switches hashing algorithm from SHA-1 to SHA-2 256"), - featuregate.WithRegisterToVersion("0.85.0"), -) - // Settings specifies the processor settings. type Settings struct { // Actions specifies the list of attributes to act on. @@ -404,11 +396,7 @@ func getSourceAttributeValue(ctx context.Context, action attributeAction, attrs func hashAttribute(key string, attrs pcommon.Map) { if value, exists := attrs.Get(key); exists { - if enableSha256Gate.IsEnabled() { - sha2Hasher(value) - } else { - sha1Hasher(value) - } + sha2Hasher(value) } } @@ -447,7 +435,7 @@ func getMatchingKeys(regexp *regexp.Regexp, attrs pcommon.Map) []string { return keys } - attrs.Range(func(k string, v pcommon.Value) bool { + attrs.Range(func(k string, _ pcommon.Value) bool { if regexp.MatchString(k) { keys = append(keys, k) } diff --git a/internal/coreinternal/attraction/attraction_test.go b/internal/coreinternal/attraction/attraction_test.go index ac0f3ada90c3..05e0b3038972 100644 --- a/internal/coreinternal/attraction/attraction_test.go +++ b/internal/coreinternal/attraction/attraction_test.go @@ -5,7 +5,6 @@ package attraction import ( "context" - "crypto/sha1" // #nosec "crypto/sha256" "encoding/binary" "errors" @@ -77,7 +76,7 @@ func TestAttributes_InsertValue(t *testing.T) { } ap, err := NewAttrProc(cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, ap) for _, tt := range testCases { @@ -135,7 +134,7 @@ func TestAttributes_InsertFromAttribute(t *testing.T) { } ap, err := NewAttrProc(cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, ap) for _, tt := range testCases { @@ -181,7 +180,7 @@ func TestAttributes_UpdateValue(t *testing.T) { } ap, err := NewAttrProc(cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, ap) for _, tt := range testCases { @@ -239,7 +238,7 @@ func TestAttributes_UpdateFromAttribute(t *testing.T) { } ap, err := NewAttrProc(cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, ap) for _, tt := range testCases { @@ -289,7 +288,7 @@ func TestAttributes_UpsertValue(t *testing.T) { } ap, err := NewAttrProc(cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, ap) for _, tt := range testCases { @@ -409,7 +408,7 @@ func TestAttributes_Extract(t *testing.T) { } ap, err := NewAttrProc(cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, ap) for _, tt := range testCases { @@ -472,7 +471,7 @@ func TestAttributes_UpsertFromAttribute(t *testing.T) { } ap, err := NewAttrProc(cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, ap) for _, tt := range testCases { @@ -533,7 +532,7 @@ func TestAttributes_Delete(t *testing.T) { } ap, err := NewAttrProc(cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, ap) for _, tt := range testCases { @@ -579,7 +578,7 @@ func TestAttributes_Delete_Regexp(t *testing.T) { } ap, err := NewAttrProc(cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, ap) for _, tt := range testCases { @@ -684,7 +683,7 @@ func TestAttributes_HashValue(t *testing.T) { } ap, err := NewAttrProc(cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, ap) for _, tt := range testCases { @@ -712,7 +711,7 @@ func TestAttributes_FromAttributeNoChange(t *testing.T) { } ap, err := NewAttrProc(cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, ap) runIndividualTestCase(t, tc, ap) @@ -793,7 +792,7 @@ func TestAttributes_Ordering(t *testing.T) { } ap, err := NewAttrProc(cfg) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, ap) for _, tt := range testCases { @@ -930,20 +929,6 @@ func TestValidConfiguration(t *testing.T) { } func hash(b []byte) string { - if enableSha256Gate.IsEnabled() { - return sha2Hash(b) - } - return sha1Hash(b) -} - -func sha1Hash(b []byte) string { - // #nosec - h := sha1.New() - h.Write(b) - return fmt.Sprintf("%x", h.Sum(nil)) -} - -func sha2Hash(b []byte) string { h := sha256.New() h.Write(b) return fmt.Sprintf("%x", h.Sum(nil)) @@ -1030,7 +1015,7 @@ func TestFromContext(t *testing.T) { ap, err := NewAttrProc(&Settings{ Actions: []ActionKeyValue{*tc.action}, }) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, ap) attrMap := pcommon.NewMap() ap.Process(tc.ctx, nil, attrMap) diff --git a/internal/coreinternal/attraction/hasher.go b/internal/coreinternal/attraction/hasher.go index 420271eb692c..6e5833697ad1 100644 --- a/internal/coreinternal/attraction/hasher.go +++ b/internal/coreinternal/attraction/hasher.go @@ -4,7 +4,6 @@ package attraction // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction" import ( - "crypto/sha1" // #nosec "crypto/sha256" "encoding/binary" "encoding/hex" @@ -23,44 +22,6 @@ var ( byteFalse = [1]byte{0} ) -// Deprecated: [v0.75.0] use sha2Hasher instead. -// sha1Hasher hashes an AttributeValue using SHA1 and returns a -// hashed version of the attribute. In practice, this would mostly be used -// for string attributes but we support all types for completeness/correctness -// and eliminate any surprises. -func sha1Hasher(attr pcommon.Value) { - var val []byte - switch attr.Type() { - case pcommon.ValueTypeStr: - val = []byte(attr.Str()) - case pcommon.ValueTypeBool: - if attr.Bool() { - val = byteTrue[:] - } else { - val = byteFalse[:] - } - case pcommon.ValueTypeInt: - val = make([]byte, int64ByteSize) - binary.LittleEndian.PutUint64(val, uint64(attr.Int())) - case pcommon.ValueTypeDouble: - val = make([]byte, float64ByteSize) - binary.LittleEndian.PutUint64(val, math.Float64bits(attr.Double())) - } - - var hashed string - if len(val) > 0 { - // #nosec - h := sha1.New() - _, _ = h.Write(val) - val = h.Sum(nil) - hashedBytes := make([]byte, hex.EncodedLen(len(val))) - hex.Encode(hashedBytes, val) - hashed = string(hashedBytes) - } - - attr.SetStr(hashed) -} - // sha2Hasher hashes an AttributeValue using SHA2-256 and returns a // hashed version of the attribute. In practice, this would mostly be used // for string attributes but we support all types for completeness/correctness diff --git a/internal/coreinternal/attraction/package_test.go b/internal/coreinternal/attraction/package_test.go new file mode 100644 index 000000000000..8fc9f8eb82d1 --- /dev/null +++ b/internal/coreinternal/attraction/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package attraction + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/coreinternal/consumerretry/package_test.go b/internal/coreinternal/consumerretry/package_test.go new file mode 100644 index 000000000000..836884ba6c9d --- /dev/null +++ b/internal/coreinternal/consumerretry/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package consumerretry + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/coreinternal/go.mod b/internal/coreinternal/go.mod index 3e993a2acb4e..a331b1e0e39b 100644 --- a/internal/coreinternal/go.mod +++ b/internal/coreinternal/go.mod @@ -1,25 +1,25 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal -go 1.20 +go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.1 - github.com/docker/go-connections v0.4.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.89.0 - github.com/stretchr/testify v1.8.4 - github.com/testcontainers/testcontainers-go v0.26.0 - go.opentelemetry.io/collector v0.89.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/receiver v0.89.0 - go.opentelemetry.io/collector/semconv v0.89.0 - go.opentelemetry.io/otel v1.20.0 - go.opentelemetry.io/otel/trace v1.20.0 + github.com/cenkalti/backoff/v4 v4.3.0 + github.com/docker/go-connections v0.5.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.98.0 + github.com/stretchr/testify v1.9.0 + github.com/testcontainers/testcontainers-go v0.29.1 + go.opentelemetry.io/collector v0.98.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/receiver v0.98.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 golang.org/x/text v0.14.0 ) @@ -27,60 +27,71 @@ require ( dario.cat/mergo v1.0.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/Microsoft/hcsshim v0.11.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/containerd/containerd v1.7.7 // indirect + github.com/Microsoft/hcsshim v0.11.4 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/containerd/containerd v1.7.12 // indirect github.com/containerd/log v0.1.0 // indirect github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.7+incompatible // indirect + github.com/distribution/reference v0.5.0 // indirect + github.com/docker/docker v25.0.5+incompatible // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/felixge/httpsnoop v1.0.3 // 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/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.4.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.2 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect - github.com/opencontainers/runc v1.1.12 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sirupsen/logrus v1.9.3 // 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.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/tools v0.15.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -94,7 +105,4 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../pkg/pdatatest -// see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/24240 -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 diff --git a/internal/coreinternal/go.sum b/internal/coreinternal/go.sum index 390e02d9bb10..9aedc0eae38a 100644 --- a/internal/coreinternal/go.sum +++ b/internal/coreinternal/go.sum @@ -1,38 +1,49 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/hcsshim v0.11.1 h1:hJ3s7GbWlGK4YVV92sO88BQSyF4ZLVy7/awqOlPxFbA= -github.com/Microsoft/hcsshim v0.11.1/go.mod h1:nFJmaO4Zr5Y7eADdFOpYswDDlNVbvcIJJNJLECr5JQg= -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/containerd/containerd v1.7.7 h1:QOC2K4A42RQpcrZyptP6z9EJZnlHfHJUfZrAAHe15q4= -github.com/containerd/containerd v1.7.7/go.mod h1:3c4XZv6VeT9qgf9GMTxNTMFxGJrGpI2vz1yk4ye+YY8= +github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= +github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= +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.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= +github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -44,10 +55,10 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN 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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= 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= @@ -58,24 +69,26 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -87,19 +100,26 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= -github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= 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= @@ -109,51 +129,68 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs 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/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/testcontainers/testcontainers-go v0.26.0 h1:uqcYdoOHBy1ca7gKODfBd9uTHVK3a7UL848z09MVZ0c= -github.com/testcontainers/testcontainers-go v0.26.0/go.mod h1:ICriE9bLX5CLxL9OFQ2N+2N+f+803LNJ1utJb1+Inx0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/testcontainers/testcontainers-go v0.29.1 h1:z8kxdFlovA2y97RWx98v/TQ+tR+SXZm6p35M+xB92zk= +github.com/testcontainers/testcontainers-go v0.29.1/go.mod h1:SnKnKQav8UcgtKqjp/AD8bE1MqZm+3TDb/B8crE3XnI= 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.opentelemetry.io/collector v0.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -161,18 +198,19 @@ golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolV golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= 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.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.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-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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +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-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -182,14 +220,14 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -200,17 +238,22 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= diff --git a/internal/coreinternal/goldendataset/package_test.go b/internal/coreinternal/goldendataset/package_test.go new file mode 100644 index 000000000000..f480d2f0e611 --- /dev/null +++ b/internal/coreinternal/goldendataset/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package goldendataset + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/coreinternal/goldendataset/resource_generator_test.go b/internal/coreinternal/goldendataset/resource_generator_test.go index 9e2166517744..1e1ab7b3c4b1 100644 --- a/internal/coreinternal/goldendataset/resource_generator_test.go +++ b/internal/coreinternal/goldendataset/resource_generator_test.go @@ -10,8 +10,8 @@ import ( ) func TestGenerateResource(t *testing.T) { - resourceIds := []PICTInputResource{ResourceEmpty, ResourceVMOnPrem, ResourceVMCloud, ResourceK8sOnPrem, ResourceK8sCloud, ResourceFaas, ResourceExec} - for _, rscID := range resourceIds { + resourceIDs := []PICTInputResource{ResourceEmpty, ResourceVMOnPrem, ResourceVMCloud, ResourceK8sOnPrem, ResourceK8sCloud, ResourceFaas, ResourceExec} + for _, rscID := range resourceIDs { rsc := GenerateResource(rscID) if rscID == ResourceEmpty { assert.Equal(t, 0, rsc.Attributes().Len()) diff --git a/internal/coreinternal/goldendataset/traces_generator_test.go b/internal/coreinternal/goldendataset/traces_generator_test.go index d2216fea9301..f7a9be8061ae 100644 --- a/internal/coreinternal/goldendataset/traces_generator_test.go +++ b/internal/coreinternal/goldendataset/traces_generator_test.go @@ -12,6 +12,6 @@ import ( func TestGenerateTraces(t *testing.T) { rscSpans, err := GenerateTraces("testdata/generated_pict_pairs_traces.txt", "testdata/generated_pict_pairs_spans.txt") - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, 32, len(rscSpans)) } diff --git a/internal/coreinternal/idutils/package_test.go b/internal/coreinternal/idutils/package_test.go new file mode 100644 index 000000000000..31a4b5c05844 --- /dev/null +++ b/internal/coreinternal/idutils/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package idutils + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/coreinternal/metricstestutil/package_test.go b/internal/coreinternal/metricstestutil/package_test.go new file mode 100644 index 000000000000..05ff154ac171 --- /dev/null +++ b/internal/coreinternal/metricstestutil/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metricstestutil + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/coreinternal/parseutils/csv.go b/internal/coreinternal/parseutils/csv.go new file mode 100644 index 000000000000..5354213f2dde --- /dev/null +++ b/internal/coreinternal/parseutils/csv.go @@ -0,0 +1,85 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package parseutils // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/parseutils" + +import ( + "encoding/csv" + "errors" + "fmt" + "io" + "strings" +) + +// ReadCSVRow reads a CSV row from the csv reader, returning the fields parsed from the line. +// We make the assumption that the payload we are reading is a single row, so we allow newline characters in fields. +// However, the csv package does not support newlines in a CSV field (it assumes rows are newline separated), +// so in order to support parsing newlines in a field, we need to stitch together the results of multiple Read calls. +func ReadCSVRow(row string, delimiter rune, lazyQuotes bool) ([]string, error) { + reader := csv.NewReader(strings.NewReader(row)) + reader.Comma = delimiter + // -1 indicates a variable length of fields + reader.FieldsPerRecord = -1 + reader.LazyQuotes = lazyQuotes + + lines := make([][]string, 0, 1) + for { + line, err := reader.Read() + if errors.Is(err, io.EOF) { + break + } + + if err != nil && len(line) == 0 { + return nil, fmt.Errorf("read csv line: %w", err) + } + + lines = append(lines, line) + } + + // If the input is empty, we might not get any lines + if len(lines) == 0 { + return nil, errors.New("no csv lines found") + } + + /* + This parser is parsing a single value, which came from a single log entry. + Therefore, if there are multiple lines here, it should be assumed that each + subsequent line contains a continuation of the last field in the previous line. + + Given a file w/ headers "A,B,C,D,E" and contents "aa,b\nb,cc,d\nd,ee", + expect reader.Read() to return bodies: + - ["aa","b"] + - ["b","cc","d"] + - ["d","ee"] + */ + + joinedLine := lines[0] + for i := 1; i < len(lines); i++ { + nextLine := lines[i] + + // The first element of the next line is a continuation of the previous line's last element + joinedLine[len(joinedLine)-1] += "\n" + nextLine[0] + + // The remainder are separate elements + for n := 1; n < len(nextLine); n++ { + joinedLine = append(joinedLine, nextLine[n]) + } + } + + return joinedLine, nil +} + +// MapCSVHeaders creates a map of headers[i] -> fields[i]. +func MapCSVHeaders(headers []string, fields []string) (map[string]any, error) { + if len(fields) != len(headers) { + return nil, fmt.Errorf("wrong number of fields: expected %d, found %d", len(headers), len(fields)) + } + + parsedValues := make(map[string]any, len(headers)) + + for i, val := range fields { + parsedValues[headers[i]] = val + } + + return parsedValues, nil +} diff --git a/internal/coreinternal/parseutils/csv_test.go b/internal/coreinternal/parseutils/csv_test.go new file mode 100644 index 000000000000..1d93b89bcf3e --- /dev/null +++ b/internal/coreinternal/parseutils/csv_test.go @@ -0,0 +1,175 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package parseutils + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_ParseCSV(t *testing.T) { + testCases := []struct { + name string + row string + delimiter rune + lazyQuotes bool + expectedRow []string + expectedErr string + }{ + { + name: "Typical CSV row", + row: "field1,field2,field3", + delimiter: ',', + lazyQuotes: false, + expectedRow: []string{"field1", "field2", "field3"}, + }, + { + name: "Quoted CSV row", + row: `field1,"field2,contains delimiter",field3`, + delimiter: ',', + lazyQuotes: false, + expectedRow: []string{"field1", "field2,contains delimiter", "field3"}, + }, + { + name: "Bare quote in field (strict)", + row: `field1,field"2,field3`, + delimiter: ',', + lazyQuotes: false, + expectedRow: []string{"field1"}, + }, + { + name: "Bare quote in field (lazy quotes)", + row: `field1,field"2,field3`, + delimiter: ',', + lazyQuotes: true, + expectedRow: []string{"field1", `field"2`, "field3"}, + }, + { + name: "Empty row", + row: "", + delimiter: ',', + lazyQuotes: false, + expectedErr: "no csv lines found", + }, + { + name: "Newlines in field", + row: "field1,fie\nld2,field3", + delimiter: ',', + lazyQuotes: false, + expectedRow: []string{"field1", "fie\nld2", "field3"}, + }, + { + name: "Newlines prefix field", + row: "field1,\nfield2,field3", + delimiter: ',', + lazyQuotes: false, + expectedRow: []string{"field1", "\nfield2", "field3"}, + }, + { + name: "Newlines suffix field", + row: "field1,field2\n,field3", + delimiter: ',', + lazyQuotes: false, + expectedRow: []string{"field1", "field2\n", "field3"}, + }, + { + name: "Newlines prefix row", + row: "\nfield1,field2,field3", + delimiter: ',', + lazyQuotes: false, + expectedRow: []string{"field1", "field2", "field3"}, + }, + { + name: "Newlines suffix row", + row: "field1,field2,field3\n", + delimiter: ',', + lazyQuotes: false, + expectedRow: []string{"field1", "field2", "field3"}, + }, + { + name: "Newlines in first row", + row: "fiel\nd1,field2,field3", + delimiter: ',', + lazyQuotes: false, + expectedRow: []string{"fiel\nd1", "field2", "field3"}, + }, + { + name: "Newlines in all rows", + row: "\nfiel\nd1,fie\nld2,fie\nld3\n", + delimiter: ',', + lazyQuotes: false, + expectedRow: []string{"fiel\nd1", "fie\nld2", "fie\nld3"}, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + s, err := ReadCSVRow(tc.row, tc.delimiter, tc.lazyQuotes) + if tc.expectedErr != "" { + require.ErrorContains(t, err, tc.expectedErr) + } else { + require.Equal(t, tc.expectedRow, s) + } + }) + } +} + +func Test_MapCSVHeaders(t *testing.T) { + testCases := []struct { + name string + headers []string + fields []string + expectedMap map[string]any + expectedErr string + }{ + { + name: "Map headers to fields", + headers: []string{"Col1", "Col2", "Col3"}, + fields: []string{"Val1", "Val2", "Val3"}, + expectedMap: map[string]any{ + "Col1": "Val1", + "Col2": "Val2", + "Col3": "Val3", + }, + }, + { + name: "Missing field", + headers: []string{"Col1", "Col2", "Col3"}, + fields: []string{"Val1", "Val2"}, + expectedErr: "wrong number of fields: expected 3, found 2", + }, + { + name: "Too many fields", + headers: []string{"Col1", "Col2", "Col3"}, + fields: []string{"Val1", "Val2", "Val3", "Val4"}, + expectedErr: "wrong number of fields: expected 3, found 4", + }, + { + name: "Single field", + headers: []string{"Col1"}, + fields: []string{"Val1"}, + expectedMap: map[string]any{ + "Col1": "Val1", + }, + }, + { + name: "No fields", + headers: []string{}, + fields: []string{}, + expectedMap: map[string]any{}, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + m, err := MapCSVHeaders(tc.headers, tc.fields) + if tc.expectedErr != "" { + require.ErrorContains(t, err, tc.expectedErr) + } else { + require.Equal(t, tc.expectedMap, m) + } + }) + } +} diff --git a/internal/coreinternal/parseutils/doc.go b/internal/coreinternal/parseutils/doc.go new file mode 100644 index 000000000000..f63f940df0a8 --- /dev/null +++ b/internal/coreinternal/parseutils/doc.go @@ -0,0 +1,4 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package parseutils // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/parseutils" diff --git a/internal/coreinternal/parseutils/package_test.go b/internal/coreinternal/parseutils/package_test.go new file mode 100644 index 000000000000..20e63515f3af --- /dev/null +++ b/internal/coreinternal/parseutils/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package parseutils + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/coreinternal/parseutils/parser.go b/internal/coreinternal/parseutils/parser.go new file mode 100644 index 000000000000..2758161ec565 --- /dev/null +++ b/internal/coreinternal/parseutils/parser.go @@ -0,0 +1,73 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package parseutils // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/parseutils" + +import ( + "fmt" + "strings" + + "go.uber.org/multierr" +) + +// SplitString will split the input on the delimiter and return the resulting slice while respecting quotes. Outer quotes are stripped. +// Use in place of `strings.Split` when quotes need to be respected. +// Requires `delimiter` not be an empty string +func SplitString(input, delimiter string) ([]string, error) { + var result []string + current := "" + delimiterLength := len(delimiter) + quoteChar := "" // "" means we are not in quotes + + for i := 0; i < len(input); i++ { + if quoteChar == "" && i+delimiterLength <= len(input) && input[i:i+delimiterLength] == delimiter { // delimiter + if current == "" { // leading || trailing delimiter; ignore + i += delimiterLength - 1 + continue + } + result = append(result, current) + current = "" + i += delimiterLength - 1 + continue + } + + if quoteChar == "" && (input[i] == '"' || input[i] == '\'') { // start of quote + quoteChar = string(input[i]) + continue + } + if string(input[i]) == quoteChar { // end of quote + quoteChar = "" + continue + } + + current += string(input[i]) + } + + if quoteChar != "" { // check for closed quotes + return nil, fmt.Errorf("never reached the end of a quoted value") + } + if current != "" { // avoid adding empty value bc of a trailing delimiter + return append(result, current), nil + } + + return result, nil +} + +// ParseKeyValuePairs will split each string in `pairs` on the `delimiter` into a key and value string that get added to a map and returned. +func ParseKeyValuePairs(pairs []string, delimiter string) (map[string]any, error) { + parsed := make(map[string]any) + var err error + for _, p := range pairs { + pair := strings.SplitN(p, delimiter, 2) + if len(pair) != 2 { + err = multierr.Append(err, fmt.Errorf("cannot split %q into 2 items, got %d item(s)", p, len(pair))) + continue + } + + key := strings.TrimSpace(pair[0]) + value := strings.TrimSpace(pair[1]) + + parsed[key] = value + } + return parsed, err +} diff --git a/internal/coreinternal/parseutils/parser_test.go b/internal/coreinternal/parseutils/parser_test.go new file mode 100644 index 000000000000..f4f8f4b14e5d --- /dev/null +++ b/internal/coreinternal/parseutils/parser_test.go @@ -0,0 +1,276 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package parseutils + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_SplitString(t *testing.T) { + testCases := []struct { + name string + input string + delimiter string + expected []string + expectedErr error + }{ + { + name: "simple", + input: "a b c", + delimiter: " ", + expected: []string{ + "a", + "b", + "c", + }, + }, + { + name: "single quotes", + input: "a 'b c d'", + delimiter: " ", + expected: []string{ + "a", + "b c d", + }, + }, + { + name: "double quotes", + input: `a " b c " d`, + delimiter: " ", + expected: []string{ + "a", + " b c ", + "d", + }, + }, + { + name: "multi-char delimiter", + input: "abc!@! def !@! g", + delimiter: "!@!", + expected: []string{ + "abc", + " def ", + " g", + }, + }, + { + name: "leading and trailing delimiters", + input: " name=ottl func=key_value hello=world ", + delimiter: " ", + expected: []string{ + "name=ottl", + "func=key_value", + "hello=world", + }, + }, + { + name: "embedded double quotes in single quoted value", + input: `ab c='this is a "co ol" value'`, + delimiter: " ", + expected: []string{ + "ab", + `c=this is a "co ol" value`, + }, + }, + { + name: "embedded double quotes end single quoted value", + input: `ab c='this is a "co ol"'`, + delimiter: " ", + expected: []string{ + "ab", + `c=this is a "co ol"`, + }, + }, + { + name: "quoted values include whitespace", + input: `name=" ottl " func=" key_ value"`, + delimiter: " ", + expected: []string{ + "name= ottl ", + "func= key_ value", + }, + }, + { + name: "delimiter longer than input", + input: "abc", + delimiter: "aaaa", + expected: []string{ + "abc", + }, + }, + { + name: "delimiter not found", + input: "a b c", + delimiter: "!", + expected: []string{ + "a b c", + }, + }, + { + name: "newlines in input", + input: `a +b +c`, + delimiter: " ", + expected: []string{ + "a\nb\nc", + }, + }, + { + name: "newline delimiter", + input: `a b c +d e f +g +h`, + delimiter: "\n", + expected: []string{ + "a b c", + "d e f", + "g ", + "h", + }, + }, + { + name: "empty input", + input: "", + delimiter: " ", + expected: nil, + }, + { + name: "equal input and delimiter", + input: "abc", + delimiter: "abc", + expected: nil, + }, + { + name: "unclosed quotes", + input: "a 'b c", + delimiter: " ", + expectedErr: fmt.Errorf("never reached the end of a quoted value"), + }, + { + name: "mismatched quotes", + input: `a 'b c' "d '`, + delimiter: " ", + expectedErr: fmt.Errorf("never reached the end of a quoted value"), + }, + { + name: "tab delimiters", + input: "a b c", + delimiter: "\t", + expected: []string{ + "a", + "b", + "c", + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + result, err := SplitString(tc.input, tc.delimiter) + + if tc.expectedErr == nil { + assert.NoError(t, err) + assert.Equal(t, tc.expected, result) + } else { + assert.EqualError(t, err, tc.expectedErr.Error()) + assert.Nil(t, result) + } + }) + } +} + +func Test_ParseKeyValuePairs(t *testing.T) { + testCases := []struct { + name string + pairs []string + delimiter string + expected map[string]any + expectedErr error + }{ + { + name: "multiple delimiters", + pairs: []string{"a==b", "c=d=", "e=f"}, + delimiter: "=", + expected: map[string]any{ + "a": "=b", + "c": "d=", + "e": "f", + }, + }, + { + name: "no delimiter found", + pairs: []string{"ab"}, + delimiter: "=", + expectedErr: fmt.Errorf("cannot split \"ab\" into 2 items, got 1 item(s)"), + }, + { + name: "no delimiter found 2x", + pairs: []string{"ab", "cd"}, + delimiter: "=", + expectedErr: fmt.Errorf("cannot split \"ab\" into 2 items, got 1 item(s); cannot split \"cd\" into 2 items, got 1 item(s)"), + }, + { + name: "empty pairs", + pairs: []string{}, + delimiter: "=", + expected: map[string]any{}, + }, + { + name: "empty pair string", + pairs: []string{""}, + delimiter: "=", + expectedErr: fmt.Errorf("cannot split \"\" into 2 items, got 1 item(s)"), + }, + { + name: "empty delimiter", + pairs: []string{"a=b", "c=d"}, + delimiter: "", + expected: map[string]any{ + "a": "=b", + "c": "=d", + }, + }, + { + name: "empty pairs & delimiter", + pairs: []string{}, + delimiter: "", + expected: map[string]any{}, + }, + { + name: "early delimiter", + pairs: []string{"=a=b"}, + delimiter: "=", + expected: map[string]any{ + "": "a=b", + }, + }, + { + name: "weird spacing", + pairs: []string{" a= b ", " c = d "}, + delimiter: "=", + expected: map[string]any{ + "a": "b", + "c": "d", + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + result, err := ParseKeyValuePairs(tc.pairs, tc.delimiter) + + if tc.expectedErr == nil { + assert.NoError(t, err) + assert.Equal(t, tc.expected, result) + } else { + assert.EqualError(t, err, tc.expectedErr.Error()) + } + }) + } +} diff --git a/internal/coreinternal/scraperinttest/scraperint.go b/internal/coreinternal/scraperinttest/scraperint.go index 8e2e090c5869..b211e3c78098 100644 --- a/internal/coreinternal/scraperinttest/scraperint.go +++ b/internal/coreinternal/scraperinttest/scraperint.go @@ -47,7 +47,6 @@ func NewIntegrationTest(f receiver.Factory, opts ...TestOption) *IntegrationTest } type IntegrationTest struct { - networkRequest *testcontainers.NetworkRequest containerRequests []testcontainers.ContainerRequest allowHardcodedHostPort bool createContainerTimeout time.Duration @@ -65,14 +64,6 @@ type IntegrationTest struct { func (it *IntegrationTest) Run(t *testing.T) { it.validate(t) - - if it.networkRequest != nil { - network := it.createNetwork(t) - defer func() { - require.NoError(t, network.Remove(context.Background())) - }() - } - ci := it.createContainers(t) defer ci.terminate(t) @@ -142,26 +133,6 @@ func (it *IntegrationTest) Run(t *testing.T) { it.compareTimeout, it.compareTimeout/20) } -func (it *IntegrationTest) createNetwork(t *testing.T) testcontainers.Network { - var errs error - - var network testcontainers.Network - var err error - require.Eventuallyf(t, func() bool { - network, err = testcontainers.GenericNetwork( - context.Background(), - testcontainers.GenericNetworkRequest{ - NetworkRequest: *it.networkRequest, - }) - if err != nil { - errs = multierr.Append(errs, err) - return false - } - return true - }, it.createContainerTimeout, time.Second, "create network timeout: %v", errs) - return network -} - func (it *IntegrationTest) createContainers(t *testing.T) *ContainerInfo { var wg sync.WaitGroup ci := &ContainerInfo{ @@ -211,12 +182,6 @@ func (it *IntegrationTest) validate(t *testing.T) { type TestOption func(*IntegrationTest) -func WithNetworkRequest(nr testcontainers.NetworkRequest) TestOption { - return func(it *IntegrationTest) { - it.networkRequest = &nr - } -} - func WithContainerRequest(cr testcontainers.ContainerRequest) TestOption { return func(it *IntegrationTest) { it.containerRequests = append(it.containerRequests, cr) diff --git a/internal/coreinternal/textutils/package_test.go b/internal/coreinternal/textutils/package_test.go new file mode 100644 index 000000000000..b2ff83cda2b7 --- /dev/null +++ b/internal/coreinternal/textutils/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package textutils + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/coreinternal/timeutils/internal/ctimefmt/ctimefmt.go b/internal/coreinternal/timeutils/internal/ctimefmt/ctimefmt.go index 22e8d5d12faf..29c5207418db 100644 --- a/internal/coreinternal/timeutils/internal/ctimefmt/ctimefmt.go +++ b/internal/coreinternal/timeutils/internal/ctimefmt/ctimefmt.go @@ -44,7 +44,7 @@ var ctimeSubstitutes = map[string]string{ "%f": "999999", "%s": "99999999", "%Z": "MST", - "%z": "-0700", + "%z": "Z0700", "%w": "-070000", "%i": "-07", "%j": "-07:00", diff --git a/internal/coreinternal/timeutils/internal/ctimefmt/ctimefmt_test.go b/internal/coreinternal/timeutils/internal/ctimefmt/ctimefmt_test.go index 0d4969afd7ef..182b1dd4a9e1 100644 --- a/internal/coreinternal/timeutils/internal/ctimefmt/ctimefmt_test.go +++ b/internal/coreinternal/timeutils/internal/ctimefmt/ctimefmt_test.go @@ -54,3 +54,25 @@ func TestParse(t *testing.T) { t.Errorf("Given: %v, expected: %v", dt, dt2) } } + +func TestZulu(t *testing.T) { + format := "%Y-%m-%dT%H:%M:%S.%L%z" + // These time should all parse as UTC. + for _, input := range []string{ + "2019-01-02T15:04:05.666666Z", + "2019-01-02T15:04:05.666666-0000", + "2019-01-02T15:04:05.666666+0000", + } { + t.Run(input, func(t *testing.T) { + dt, err := Parse(format, input) + if err != nil { + t.Error(err) + } else if dt.UnixNano() != dt1.UnixNano() { + // We compare the unix nanoseconds because Go has a subtle parsing difference between "Z" and "+0000". + // The former returns a Time with the UTC timezone, the latter returns a Time with a 0000 time zone offset. + // (See Go's documentation for `time.Parse`.) + t.Errorf("Given: %v, expected: %v", dt, dt1) + } + }) + } +} diff --git a/internal/coreinternal/timeutils/internal/ctimefmt/package_test.go b/internal/coreinternal/timeutils/internal/ctimefmt/package_test.go new file mode 100644 index 000000000000..9b2488524792 --- /dev/null +++ b/internal/coreinternal/timeutils/internal/ctimefmt/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ctimefmt + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/coreinternal/timeutils/package_test.go b/internal/coreinternal/timeutils/package_test.go new file mode 100644 index 000000000000..c360a00c086e --- /dev/null +++ b/internal/coreinternal/timeutils/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package timeutils + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/coreinternal/traceutil/package_test.go b/internal/coreinternal/traceutil/package_test.go new file mode 100644 index 000000000000..e58dc5f607f5 --- /dev/null +++ b/internal/coreinternal/traceutil/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package traceutil + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/datadog/agent.go b/internal/datadog/agent.go index 43656a6a7528..7bba14cad2cf 100644 --- a/internal/datadog/agent.go +++ b/internal/datadog/agent.go @@ -16,14 +16,12 @@ import ( traceconfig "github.com/DataDog/datadog-agent/pkg/trace/config" "github.com/DataDog/datadog-agent/pkg/trace/stats" "github.com/DataDog/datadog-agent/pkg/trace/telemetry" + "github.com/DataDog/datadog-agent/pkg/trace/timing" + "github.com/DataDog/datadog-go/v5/statsd" "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics" "go.opentelemetry.io/collector/pdata/ptrace" ) -// keyStatsComputed specifies the resource attribute key which indicates if stats have been -// computed for the resource spans. -const keyStatsComputed = "_dd.stats_computed" - // TraceAgent specifies a minimal trace agent instance that is able to process traces and output stats. type TraceAgent struct { *agent.Agent @@ -41,12 +39,12 @@ type TraceAgent struct { // newAgent creates a new unstarted traceagent using the given context. Call Start to start the traceagent. // The out channel will receive outoing stats payloads resulting from spans ingested using the Ingest method. -func NewAgent(ctx context.Context, out chan *pb.StatsPayload) *TraceAgent { - return NewAgentWithConfig(ctx, traceconfig.New(), out) +func NewAgent(ctx context.Context, out chan *pb.StatsPayload, metricsClient statsd.ClientInterface, timingReporter timing.Reporter) *TraceAgent { + return NewAgentWithConfig(ctx, traceconfig.New(), out, metricsClient, timingReporter) } // newAgentWithConfig creates a new traceagent with the given config cfg. Used in tests; use newAgent instead. -func NewAgentWithConfig(ctx context.Context, cfg *traceconfig.AgentConfig, out chan *pb.StatsPayload) *TraceAgent { +func NewAgentWithConfig(ctx context.Context, cfg *traceconfig.AgentConfig, out chan *pb.StatsPayload, metricsClient statsd.ClientInterface, timingReporter timing.Reporter) *TraceAgent { // disable the HTTP receiver cfg.ReceiverPort = 0 // set the API key to succeed startup; it is never used nor needed @@ -58,16 +56,16 @@ func NewAgentWithConfig(ctx context.Context, cfg *traceconfig.AgentConfig, out c // Ingest). This gives a better user experience. cfg.Hostname = metrics.UnsetHostnamePlaceholder pchan := make(chan *api.Payload, 1000) - a := agent.NewAgent(ctx, cfg, telemetry.NewNoopCollector()) + a := agent.NewAgent(ctx, cfg, telemetry.NewNoopCollector(), metricsClient) // replace the Concentrator (the component which computes and flushes APM Stats from incoming // traces) with our own, which uses the 'out' channel. - a.Concentrator = stats.NewConcentrator(cfg, out, time.Now()) + a.Concentrator = stats.NewConcentrator(cfg, out, time.Now(), metricsClient) // ...and the same for the ClientStatsAggregator; we don't use it here, but it is also a source // of stats which should be available to us. - a.ClientStatsAggregator = stats.NewClientStatsAggregator(cfg, out) + a.ClientStatsAggregator = stats.NewClientStatsAggregator(cfg, out, metricsClient) // lastly, start the OTLP receiver, which will be used to introduce ResourceSpans into the traceagent, // so that we can transform them to Datadog spans and receive stats. - a.OTLPReceiver = api.NewOTLPReceiver(pchan, cfg) + a.OTLPReceiver = api.NewOTLPReceiver(pchan, cfg, metricsClient, timingReporter) return &TraceAgent{ Agent: a, exit: make(chan struct{}), @@ -140,9 +138,6 @@ func (p *TraceAgent) Ingest(ctx context.Context, traces ptrace.Traces) { // ...the call transforms the OTLP Spans into a Datadog payload and sends the result // down the p.pchan channel - // Stats will be computed for p. Mark the original resource spans to ensure that they don't - // get computed twice in case these spans pass through here again. - rspans.Resource().Attributes().PutBool(keyStatsComputed, true) } } diff --git a/internal/datadog/agent_test.go b/internal/datadog/agent_test.go index 09133528eda6..ebacc48598e8 100644 --- a/internal/datadog/agent_test.go +++ b/internal/datadog/agent_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package datadog // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadog" +package datadog // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog" import ( "context" @@ -11,9 +11,10 @@ import ( pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" traceconfig "github.com/DataDog/datadog-agent/pkg/trace/config" "github.com/DataDog/datadog-agent/pkg/trace/testutil" + "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes" "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/component/componenttest" ) func TestTraceAgentConfig(t *testing.T) { @@ -21,7 +22,8 @@ func TestTraceAgentConfig(t *testing.T) { require.NotZero(t, cfg.ReceiverPort) out := make(chan *pb.StatsPayload) - agnt := NewAgentWithConfig(context.Background(), cfg, out) + _, metricClient, timingReporter := setupMetricClient() + agnt := NewAgentWithConfig(context.Background(), cfg, out, metricClient, timingReporter) require.Zero(t, cfg.ReceiverPort) require.NotEmpty(t, cfg.Endpoints[0].APIKey) require.Equal(t, metrics.UnsetHostnamePlaceholder, cfg.Hostname) @@ -30,10 +32,14 @@ func TestTraceAgentConfig(t *testing.T) { func TestTraceAgent(t *testing.T) { cfg := traceconfig.New() + attributesTranslator, err := attributes.NewTranslator(componenttest.NewNopTelemetrySettings()) + require.NoError(t, err) + cfg.OTLPReceiver.AttributesTranslator = attributesTranslator cfg.BucketInterval = 50 * time.Millisecond out := make(chan *pb.StatsPayload, 10) ctx := context.Background() - a := NewAgentWithConfig(ctx, cfg, out) + _, metricClient, timingReporter := setupMetricClient() + a := NewAgentWithConfig(ctx, cfg, out, metricClient, timingReporter) a.Start() defer a.Stop() @@ -79,26 +85,4 @@ loop: // of groups require.Len(t, stats.Stats[0].Stats[0].Stats, traces.SpanCount()) require.Len(t, a.TraceWriter.In, 0) // the trace writer channel should've been drained - - // Check that the payload is labeled - val, ok := traces.ResourceSpans().At(0).Resource().Attributes().Get(keyStatsComputed) - require.True(t, ok) - require.Equal(t, pcommon.ValueTypeBool, val.Type()) - require.True(t, val.Bool()) - - // Ingest again - a.Ingest(ctx, traces) - timeout = time.After(500 * time.Millisecond) -loop2: - for { - select { - case stats = <-out: - if len(stats.Stats) != 0 { - t.Fatal("got payload when none was expected") - } - case <-timeout: - // We got no stats (expected), thus we end the test - break loop2 - } - } } diff --git a/internal/datadog/go.mod b/internal/datadog/go.mod index 9b1399924858..6989eee73d50 100644 --- a/internal/datadog/go.mod +++ b/internal/datadog/go.mod @@ -1,28 +1,34 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog -go 1.20 +go 1.21 require ( - github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel - github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231030140030-aa8a206e6ac7 - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae + github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae + github.com/DataDog/datadog-go/v5 v5.5.0 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.4 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel v1.25.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/sdk/metric v1.25.0 ) require ( - github.com/DataDog/datadog-agent/pkg/obfuscate v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/cgroups v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-go/v5 v5.1.1 // indirect + github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae // indirect + github.com/DataDog/go-sqllexer v0.0.9 // indirect github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 // indirect - github.com/DataDog/sketches-go v1.4.3 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4 // indirect + github.com/DataDog/sketches-go v1.4.4 // 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 github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect github.com/containerd/cgroups/v3 v3.0.2 // indirect @@ -30,15 +36,23 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.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/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/godbus/dbus/v5 v5.0.6 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/karrick/godirwalk v1.17.0 // 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.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/opencontainers/runtime-spec v1.1.0-rc.3 // indirect @@ -48,27 +62,36 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect + github.com/shirou/gopsutil/v3 v3.24.1 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/tinylib/msgp v1.1.9 // 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.opentelemetry.io/collector/semconv v0.89.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect + go.uber.org/zap v1.27.0 // indirect golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.15.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/tools v0.16.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/internal/datadog/go.sum b/internal/datadog/go.sum index 07d71862ec2b..bf72f54a1382 100644 --- a/internal/datadog/go.sum +++ b/internal/datadog/go.sum @@ -1,35 +1,40 @@ -github.com/DataDog/datadog-agent/pkg/obfuscate v0.49.0-rc.2 h1:Y56sdsJotnJmxTzyHvADM2/0VpWzonQrSAeIjHCqk+s= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.49.0-rc.2/go.mod h1:HzySONXnAgSmIQfL6gOv9hWprKJkx8CicuXuUbmgWfo= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel h1:lGJKaJlKDbycF6jItLw8ONN8GX3dkN6S+95AvDfGF+s= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel/go.mod h1:A4qG1PwNPYcM391xyksJ47ZZjknSAQVvNdXAXsrR+N0= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.49.0-rc.2 h1:MXrLVVauNLDQnJ0TTY35L1rtKv7YnNU3zl8wtE5sI9g= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.49.0-rc.2/go.mod h1:Vc+snp0Bey4MrrJyiV2tVxxJb6BmLomPvN1RgAvjGaQ= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231030140030-aa8a206e6ac7 h1:ciOBHpTSHrFy/xn/+ana53F3cvPdhR3JGuoHeGa6r+4= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231030140030-aa8a206e6ac7/go.mod h1:x6SswkmUaSmjAhSPUeVixs/Czr0w9Y5324Anoa6V+xE= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.49.0-rc.2 h1:X3nPQuiTkBVWaBGLb9oEycHhSzMJsgRcb3VNoxlGyYM= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.49.0-rc.2/go.mod h1:hVKZ+BweMQiL/dOCPvSPH/66vDSd3A3IeWQPuExkZw0= -github.com/DataDog/datadog-agent/pkg/util/log v0.49.0-rc.2 h1:64AGy6AuNW/7uW+ix55S1iFqadpzLDHYk5LtbHCeSJc= -github.com/DataDog/datadog-agent/pkg/util/log v0.49.0-rc.2/go.mod h1:RvGVny6LcLD0F9/N5OnxPoXKE8GwFtAKCD/viDv0Jw8= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.49.0-rc.2 h1:Z4PwDkI/ML5spAbG1aXbPkWiJ4T4XD2pQqKgfSy/rb8= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.49.0-rc.2/go.mod h1:eTXti9mx7qhkoi+Qg3mMmvVY5McghUUgsf4Hrk9zY8k= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.49.0-rc.2 h1:SQ6pGb8ppcTnCKoTuaCfZpAhMlTWhEqdIQiVL1Jgpnk= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.49.0-rc.2/go.mod h1:EOGgNrSPskIxY3+KgCl+yEggMjrGqrA2oL5va+/p2jM= -github.com/DataDog/datadog-go/v5 v5.1.1 h1:JLZ6s2K1pG2h9GkvEvMdEGqMDyVLEAccdX5TltWcLMU= -github.com/DataDog/datadog-go/v5 v5.1.1/go.mod h1:KhiYb2Badlv9/rofz+OznKoEF5XKTonWyhx5K83AP8E= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae h1:aVo1Uh2WQ8TvgbjqlbDvfP5AcUtnqXUUrc9pVP8MvKc= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:AVPQWekk3h9AOC7+plBlNB68Sy6UIGFoMMVUDeSoNoI= +github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae h1:b6lU79trCyadhkxhb51jXiqmZaHs1Z0fwWlWKFVCqJ4= +github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:s6zD4ZvPBta68SBCsCnnbn3VJzoQk5wNd0VJOpB84Ug= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae h1:/vfuF60+5qeGM62IDG1F6Asfa1VGAohiQVivRo9TWoo= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:JhAilx32dkIgoDkFXquCTfaWDsAOfe+vfBaxbiZoPI0= +github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae h1:B1E9jVLpw+Hrcv9ggzCridX3YMeUmZBE3zHghdwfTSc= +github.com/DataDog/datadog-agent/pkg/trace v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:1FTu8gSg8Pd8DVgRfxlcPN4F+d8K7A3lbMCT84FX44Y= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae h1:GL9JPEUyKDH2brURt09llrqWBmExCuqbHeWucezZ6sY= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:OnkC+HYj+NU9dmowWVtFpmnA4wVVibejbzID7TNm7jA= +github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae h1:sUEteYos3JjJJB1+A9inYJ3uzM18t9cygjSs0cik8x4= +github.com/DataDog/datadog-agent/pkg/util/log v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:z4lpju3fhDa8JcbXxU0Bc6A6ci8xoQMuxDXbBdf4gHw= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae h1:qveAzof7ZZXvm93FL7h5mRM8B4q9w14g2fx6wcZt88k= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:HgJEYNmnFTKIuBhWxYe1coqmzoJXMxQTfK+4wIG5G1Q= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae h1:YZz6I8ym9P4MLytAdAJlafF3tgItgAGZrDqe4otbVUk= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.52.1-0.20240321095122-a3c5dbb936ae/go.mod h1:EVETfdJCkqy0YEvSpQd9LZdcYQ7vrUomCm+bQ6h3lc4= +github.com/DataDog/datadog-go/v5 v5.5.0 h1:G5KHeB8pWBNXT4Jtw0zAkhdxEAWSpWH00geHI6LDrKU= +github.com/DataDog/datadog-go/v5 v5.5.0/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= +github.com/DataDog/go-sqllexer v0.0.9 h1:Cx2Cu1S0hfj4coCCA8hzjM9+UNFRkcu1avIV//RU5Qw= +github.com/DataDog/go-sqllexer v0.0.9/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.8.1 h1:0GyngySyxePf1RozAdm8p51uxT/kDsxqhzWPZGNrqVg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 h1:ly/egks++IqejMVPcp0OWV1fcL+Nsq4EHF48AAQPKu4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1/go.mod h1:8jOAAH5PrNN6zICpu65M7mNPAeOQsW5Wk/sq80txutA= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 h1:TbZDzUrW8iahevDY5Xw+j1EfrX8XZdeg/M6UYBl9mxg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1/go.mod h1:nVIKiAwP/Zd8IFxeHhEAiirJRH1kOOoZ315HQeSEkng= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 h1:4cyzwoXrnjElTIlsFbpyXQkAJs3+6ly9HExOu9lrup4= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1/go.mod h1:3AEt8/uCtbpzjPOPPxIBDcR1qcUq2hBbrkrdE/qNfb0= -github.com/DataDog/sketches-go v1.4.3 h1:ZB9nijteJRFUQixkQfatCqASartGNfiolIlMiEv3u/w= -github.com/DataDog/sketches-go v1.4.3/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.4 h1:B2R7Wh791uphpltmorbvvdKk0rJOhoExwM4NnE7hXTg= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.4/go.mod h1:Tk2wwdBgWeSvDPtrGGyym8CdVWSuphiToGc/tRvFoNQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.4 h1:GcJUxjunnJEL62K+fY7pjyvcb4Cvqr5VtD0DFc8rp+w= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.4/go.mod h1:/9yo8Scnf6R0KufxJIHfQD+GAbT9cyINxaTPMDgl2Wk= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4 h1:ZuYc5Ql/GSyAEMgpKkbQiHOtIHkEpYujITW1wIVFgLE= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.4/go.mod h1:YSntkplFoUM1mepnPeJFsoblqD0Wdi+Avg1/d1upgZQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4 h1:t/Zh8ztLDBOMRMiuVNFthWMMG5F4POgc5M6+Y3DTX9g= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.4/go.mod h1:JfdBBDreQfbIN5FYrAtZV3VmQMXnf9o4tMbaMxWqe40= +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= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +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.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -45,13 +50,21 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -70,25 +83,42 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/karrick/godirwalk v1.17.0 h1:b4kY7nqDdioR/6qnbHQyDvmA17u5G1cZ6J+CZXwSWoI= github.com/karrick/godirwalk v1.17.0/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lightstep/go-expohisto v1.0.0 h1:UPtTS1rGdtehbbAF7o/dhkWLTDI73UifG8LbfQI7cA4= +github.com/lightstep/go-expohisto v1.0.0/go.mod h1:xDXD0++Mu2FOaItXtdDfksfgxfV0z1TMPa+e/EUd0cs= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c h1:VtwQ41oftZwlMnOEbMWQtSEUgU64U4s+GHk7hZK+jtY= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE= +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/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/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.94.0 h1:nTayRLarCGkB9ld7p8jWJe/9wvf8gNDaS5fRjybkEpg= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.94.0/go.mod h1:xoBvqu56hbky3KZafo68nxtV2+J81+pvo1ttNirakcU= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.94.0 h1:DSGhzGAaC767esMB0Ulr+9xWe6SW0LFUYMxLrLOAkjM= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.94.0/go.mod h1:Nv4nK3E7sUpDbNv0zI0zY15g2xR4jMg+n8taV8dsMeE= 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= @@ -105,11 +135,20 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c h1:NRoLoZvkBTKvR5gQLgA3e0hqjkY9u1wm+iOL45VN/qI= github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= +github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= +github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= 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= @@ -117,16 +156,19 @@ github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnj github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= 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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU= github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -134,28 +176,50 @@ github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0h github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= +github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= +github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -168,13 +232,14 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL 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-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +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-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -188,9 +253,9 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -203,27 +268,30 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn 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.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= 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/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= k8s.io/apimachinery v0.25.5 h1:SQomYHvv+aO43qdu3QKRf9YuI0oI8w3RrOQ1qPbAUGY= +k8s.io/apimachinery v0.25.5/go.mod h1:1S2i1QHkmxc8+EZCIxe/fX5hpldVXk4gvnJInMEb8D4= diff --git a/internal/datadog/metadata.yaml b/internal/datadog/metadata.yaml index 29f84019cb99..27c4ee13b9e9 100644 --- a/internal/datadog/metadata.yaml +++ b/internal/datadog/metadata.yaml @@ -1,3 +1,4 @@ status: codeowners: - active: [mx-psi, gbbr, dineshg13] \ No newline at end of file + active: [mx-psi, dineshg13] + emeritus: [gbbr] diff --git a/internal/datadog/metrics_client.go b/internal/datadog/metrics_client.go new file mode 100644 index 000000000000..025001ce9036 --- /dev/null +++ b/internal/datadog/metrics_client.go @@ -0,0 +1,160 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package datadog // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog" + +import ( + "context" + "strings" + "sync" + "time" + + "github.com/DataDog/datadog-go/v5/statsd" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" +) + +const ( + ExporterSourceTag = "datadogexporter" + ConnectorSourceTag = "datadogconnector" +) + +type metricsClient struct { + meter metric.Meter + gauges map[string]float64 + mutex sync.Mutex + source string +} + +// InitializeMetricClient using a meter provider. +func InitializeMetricClient(mp metric.MeterProvider, source string) statsd.ClientInterface { + return &metricsClient{ + meter: mp.Meter("datadog"), + gauges: make(map[string]float64), + source: source, + } +} + +func (m *metricsClient) Gauge(name string, value float64, tags []string, _ float64) error { + // The last parameter is rate, but we're omitting it because rate does not have effect for gauge points: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/dedd44436ae064f5a0b43769d24adf897533957b/receiver/statsdreceiver/internal/protocol/metric_translator.go#L153-L156 + m.mutex.Lock() + defer m.mutex.Unlock() + if _, ok := m.gauges[name]; ok { + m.gauges[name] = value + return nil + } + m.gauges[name] = value + _, err := m.meter.Float64ObservableGauge(name, metric.WithFloat64Callback(func(_ context.Context, f metric.Float64Observer) error { + attr := m.attributeFromTags(tags) + m.mutex.Lock() + defer m.mutex.Unlock() + if v, ok := m.gauges[name]; ok { + f.Observe(v, metric.WithAttributeSet(attr)) + } + return nil + })) + if err != nil { + return err + } + return nil +} + +func (m *metricsClient) Count(name string, value int64, tags []string, _ float64) error { + counter, err := m.meter.Int64Counter(name) + if err != nil { + return err + } + attr := m.attributeFromTags(tags) + counter.Add(context.Background(), value, metric.WithAttributeSet(attr)) + return nil +} + +func (m *metricsClient) attributeFromTags(tags []string) attribute.Set { + attr := make([]attribute.KeyValue, 0, len(tags)+1) + attr = append(attr, attribute.KeyValue{ + Key: "source", + Value: attribute.StringValue(m.source), + }) + for _, t := range tags { + kv := strings.Split(t, ":") + attr = append(attr, attribute.KeyValue{ + Key: attribute.Key(kv[0]), + Value: attribute.StringValue(kv[1]), + }) + } + return attribute.NewSet(attr...) +} + +func (m *metricsClient) Histogram(name string, value float64, tags []string, _ float64) error { + hist, err := m.meter.Float64Histogram(name) + if err != nil { + return err + } + attr := m.attributeFromTags(tags) + hist.Record(context.Background(), value, metric.WithAttributeSet(attr)) + return nil +} + +func (m *metricsClient) Distribution(name string, value float64, tags []string, rate float64) error { + return m.Histogram(name, value, tags, rate) +} + +func (m *metricsClient) Timing(name string, value time.Duration, tags []string, rate float64) error { + return m.TimeInMilliseconds(name, value.Seconds()*1000, tags, rate) +} + +func (m *metricsClient) TimeInMilliseconds(name string, value float64, tags []string, rate float64) error { + return m.Histogram(name, value, tags, rate) +} + +func (m *metricsClient) Decr(name string, tags []string, rate float64) error { + return m.Count(name, -1, tags, rate) +} + +func (m *metricsClient) Incr(name string, tags []string, rate float64) error { + return m.Count(name, 1, tags, rate) +} + +func (m *metricsClient) Flush() error { + return nil +} + +func (m *metricsClient) Set(string, string, []string, float64) error { + return nil +} + +func (m *metricsClient) Event(*statsd.Event) error { + return nil +} + +func (m *metricsClient) SimpleEvent(string, string) error { + return nil +} + +func (m *metricsClient) ServiceCheck(*statsd.ServiceCheck) error { + return nil +} + +func (m *metricsClient) SimpleServiceCheck(string, statsd.ServiceCheckStatus) error { + return nil +} + +func (m *metricsClient) Close() error { + return nil +} + +func (m *metricsClient) IsClosed() bool { + return false +} + +func (m *metricsClient) GetTelemetry() statsd.Telemetry { + return statsd.Telemetry{} +} + +func (m *metricsClient) GaugeWithTimestamp(string, float64, []string, float64, time.Time) error { + return nil +} + +func (m *metricsClient) CountWithTimestamp(string, int64, []string, float64, time.Time) error { + return nil +} diff --git a/internal/datadog/metrics_client_test.go b/internal/datadog/metrics_client_test.go new file mode 100644 index 000000000000..3165d4f53960 --- /dev/null +++ b/internal/datadog/metrics_client_test.go @@ -0,0 +1,229 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package datadog + +import ( + "context" + "sync" + "testing" + "time" + + "github.com/DataDog/datadog-agent/pkg/trace/timing" + "github.com/DataDog/datadog-go/v5/statsd" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" +) + +func setupMetricClient() (*metric.ManualReader, statsd.ClientInterface, timing.Reporter) { + reader := metric.NewManualReader() + meterProvider := metric.NewMeterProvider(metric.WithReader(reader)) + metricClient := InitializeMetricClient(meterProvider, ExporterSourceTag) + timingReporter := timing.New(metricClient) + return reader, metricClient, timingReporter +} + +func TestGauge(t *testing.T) { + reader, metricClient, _ := setupMetricClient() + + err := metricClient.Gauge("test_gauge", 1, []string{"otlp:true", "service:otelcol"}, 1) + assert.NoError(t, err) + rm := metricdata.ResourceMetrics{} + assert.NoError(t, reader.Collect(context.Background(), &rm)) + require.Len(t, rm.ScopeMetrics, 1) + sm := rm.ScopeMetrics[0] + require.Len(t, sm.Metrics, 1) + got := sm.Metrics[0] + want := metricdata.Metrics{ + Name: "test_gauge", + Data: metricdata.Gauge[float64]{ + DataPoints: []metricdata.DataPoint[float64]{ + {Value: 1, Attributes: attribute.NewSet(attribute.String("otlp", "true"), attribute.String("service", "otelcol"), attribute.String("source", ExporterSourceTag))}, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) +} + +func TestGaugeMultiple(t *testing.T) { + reader, metricClient, _ := setupMetricClient() + + err := metricClient.Gauge("test_gauge", 1, []string{"otlp:true"}, 1) + assert.NoError(t, err) + err = metricClient.Gauge("test_gauge", 2, []string{"otlp:true"}, 1) + assert.NoError(t, err) + + rm := metricdata.ResourceMetrics{} + assert.NoError(t, reader.Collect(context.Background(), &rm)) + require.Len(t, rm.ScopeMetrics, 1) + sm := rm.ScopeMetrics[0] + require.Len(t, sm.Metrics, 1) + got := sm.Metrics[0] + want := metricdata.Metrics{ + Name: "test_gauge", + Data: metricdata.Gauge[float64]{ + DataPoints: []metricdata.DataPoint[float64]{ + {Value: 2, Attributes: attribute.NewSet(attribute.String("otlp", "true"), attribute.String("source", ExporterSourceTag))}, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) +} + +func TestGaugeDataRace(t *testing.T) { + reader, metricClient, _ := setupMetricClient() + var wg sync.WaitGroup + wg.Add(2) + + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + + go func() { + defer wg.Done() + for { + select { + case <-ctx.Done(): + return + default: + err := metricClient.Gauge("test_gauge", 1, []string{"otlp:true"}, 1) + assert.NoError(t, err) + } + } + }() + + go func() { + defer wg.Done() + for { + select { + case <-ctx.Done(): + return + default: + err := reader.Collect(context.Background(), &metricdata.ResourceMetrics{}) + assert.NoError(t, err) + } + } + }() + + wg.Wait() +} + +func TestCount(t *testing.T) { + reader, metricClient, _ := setupMetricClient() + + err := metricClient.Count("test_count", 1, []string{"otlp:true", "service:otelcol"}, 1) + assert.NoError(t, err) + rm := metricdata.ResourceMetrics{} + assert.NoError(t, reader.Collect(context.Background(), &rm)) + require.Len(t, rm.ScopeMetrics, 1) + sm := rm.ScopeMetrics[0] + require.Len(t, sm.Metrics, 1) + got := sm.Metrics[0] + want := metricdata.Metrics{ + Name: "test_count", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + {Value: 1, Attributes: attribute.NewSet(attribute.String("otlp", "true"), attribute.String("service", "otelcol"), attribute.String("source", ExporterSourceTag))}, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + + err = metricClient.Count("test_count", 2, []string{"otlp:true", "service:otelcol"}, 1) + assert.NoError(t, err) + err = metricClient.Count("test_count", 3, []string{"otlp:true", "service:otelcol"}, 1) + assert.NoError(t, err) + err = metricClient.Count("test_count2", 3, []string{"otlp:true", "service:otelcol"}, 1) + assert.NoError(t, err) + assert.NoError(t, reader.Collect(context.Background(), &rm)) + require.Len(t, rm.ScopeMetrics, 1) + sm = rm.ScopeMetrics[0] + require.Len(t, sm.Metrics, 2) + got = sm.Metrics[0] + want = metricdata.Metrics{ + Name: "test_count", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + {Value: 6, Attributes: attribute.NewSet(attribute.String("otlp", "true"), attribute.String("service", "otelcol"), attribute.String("source", ExporterSourceTag))}, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + + got = sm.Metrics[1] + want = metricdata.Metrics{ + Name: "test_count2", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + {Value: 3, Attributes: attribute.NewSet(attribute.String("otlp", "true"), attribute.String("service", "otelcol"), attribute.String("source", ExporterSourceTag))}, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) +} + +func TestHistogram(t *testing.T) { + reader, metricClient, _ := setupMetricClient() + + err := metricClient.Histogram("test_histogram", 1, []string{"otlp:true", "service:otelcol"}, 1) + assert.NoError(t, err) + rm := metricdata.ResourceMetrics{} + assert.NoError(t, reader.Collect(context.Background(), &rm)) + require.Len(t, rm.ScopeMetrics, 1) + sm := rm.ScopeMetrics[0] + require.Len(t, sm.Metrics, 1) + got := sm.Metrics[0] + want := metricdata.Metrics{ + Name: "test_histogram", + Data: metricdata.Histogram[float64]{ + Temporality: metricdata.CumulativeTemporality, + DataPoints: []metricdata.HistogramDataPoint[float64]{{ + Attributes: attribute.NewSet(attribute.String("otlp", "true"), attribute.String("service", "otelcol"), attribute.String("source", ExporterSourceTag)), + Bounds: []float64{0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000}, + BucketCounts: []uint64{0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + Count: 1, + Min: metricdata.NewExtrema(1.0), + Max: metricdata.NewExtrema(1.0), + Sum: 1, + }}, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) +} + +func TestTiming(t *testing.T) { + reader, metricClient, _ := setupMetricClient() + + err := metricClient.Timing("test_timing", time.Duration(1000000000), []string{"otlp:true", "service:otelcol"}, 1) + assert.NoError(t, err) + rm := metricdata.ResourceMetrics{} + assert.NoError(t, reader.Collect(context.Background(), &rm)) + require.Len(t, rm.ScopeMetrics, 1) + sm := rm.ScopeMetrics[0] + require.Len(t, sm.Metrics, 1) + got := sm.Metrics[0] + want := metricdata.Metrics{ + Name: "test_timing", + Data: metricdata.Histogram[float64]{ + Temporality: metricdata.CumulativeTemporality, + DataPoints: []metricdata.HistogramDataPoint[float64]{{ + Attributes: attribute.NewSet(attribute.String("otlp", "true"), attribute.String("service", "otelcol"), attribute.String("source", ExporterSourceTag)), + Bounds: []float64{0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000}, + BucketCounts: []uint64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + Count: 1, + Min: metricdata.NewExtrema(1000.0), + Max: metricdata.NewExtrema(1000.0), + Sum: 1000, + }}, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) +} diff --git a/internal/docker/config.go b/internal/docker/config.go index 8e4df46dc6b2..460fb217786c 100644 --- a/internal/docker/config.go +++ b/internal/docker/config.go @@ -6,7 +6,11 @@ package docker // import "github.com/open-telemetry/opentelemetry-collector-cont import ( "errors" "fmt" + "strconv" + "strings" "time" + + "github.com/docker/docker/api/types/versions" ) type Config struct { @@ -20,21 +24,19 @@ type Config struct { ExcludedImages []string `mapstructure:"excluded_images"` // Docker client API version. - DockerAPIVersion float64 `mapstructure:"api_version"` + DockerAPIVersion string `mapstructure:"api_version"` } // NewConfig creates a new config to be used when creating // a docker client -func NewConfig(endpoint string, timeout time.Duration, excludedImages []string, apiVersion float64) (*Config, error) { +func NewConfig(endpoint string, timeout time.Duration, excludedImages []string, apiVersion string) (*Config, error) { cfg := &Config{ Endpoint: endpoint, Timeout: timeout, ExcludedImages: excludedImages, DockerAPIVersion: apiVersion, } - - err := cfg.validate() - return cfg, err + return cfg, cfg.validate() } // NewDefaultConfig creates a new config with default values @@ -43,7 +45,7 @@ func NewDefaultConfig() *Config { cfg := &Config{ Endpoint: "unix:///var/run/docker.sock", Timeout: 5 * time.Second, - DockerAPIVersion: minimalRequiredDockerAPIVersion, + DockerAPIVersion: minimumRequiredDockerAPIVersion, } return cfg @@ -55,8 +57,61 @@ func (config Config) validate() error { if config.Endpoint == "" { return errors.New("config.Endpoint must be specified") } - if config.DockerAPIVersion < minimalRequiredDockerAPIVersion { - return fmt.Errorf("Docker API version must be at least %v", minimalRequiredDockerAPIVersion) + if err := VersionIsValidAndGTE(config.DockerAPIVersion, minimumRequiredDockerAPIVersion); err != nil { + return err + } + return nil +} + +type apiVersion struct { + major int + minor int +} + +func NewAPIVersion(version string) (string, error) { + s := strings.TrimSpace(version) + split := strings.Split(s, ".") + + invalidVersion := "invalid version %q" + + nParts := len(split) + if s == "" || nParts < 1 || nParts > 2 { + return "", fmt.Errorf(invalidVersion, s) + } + + apiVer := new(apiVersion) + var err error + target := map[int]*int{0: &apiVer.major, 1: &apiVer.minor} + for i, part := range split { + part = strings.TrimSpace(part) + if part != "" { + if *target[i], err = strconv.Atoi(part); err != nil { + return "", fmt.Errorf(invalidVersion+": %w", s, err) + } + } + } + + return fmt.Sprintf("%d.%d", apiVer.major, apiVer.minor), nil +} + +// MustNewAPIVersion evaluates version as a client api version and panics if invalid. +func MustNewAPIVersion(version string) string { + v, err := NewAPIVersion(version) + if err != nil { + panic(err) + } + return v +} + +// VersionIsValidAndGTE evalutes version as a client api version and returns an error if invalid or less than gte. +// gte is assumed to be valid (easiest if result of MustNewAPIVersion on initialization) +func VersionIsValidAndGTE(version, gte string) error { + v, err := NewAPIVersion(version) + if err != nil { + return err + } + if versions.LessThan(v, gte) { + return fmt.Errorf(`"api_version" %s must be at least %s`, version, gte) } return nil } diff --git a/internal/docker/config_test.go b/internal/docker/config_test.go new file mode 100644 index 000000000000..9175eed53743 --- /dev/null +++ b/internal/docker/config_test.go @@ -0,0 +1,80 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package docker // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker" + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestAPIVersion(t *testing.T) { + for _, test := range []struct { + input string + expectedVersion string + expectedRep string + expectedError string + }{ + { + input: "1.2", + expectedVersion: MustNewAPIVersion("1.2"), + expectedRep: "1.2", + }, + { + input: "1.40", + expectedVersion: MustNewAPIVersion("1.40"), + expectedRep: "1.40", + }, + { + input: "10", + expectedVersion: MustNewAPIVersion("10.0"), + expectedRep: "10.0", + }, + { + input: "0", + expectedVersion: MustNewAPIVersion("0.0"), + expectedRep: "0.0", + }, + { + input: ".400", + expectedVersion: MustNewAPIVersion("0.400"), + expectedRep: "0.400", + }, + { + input: "00000.400", + expectedVersion: MustNewAPIVersion("0.400"), + expectedRep: "0.400", + }, + { + input: "0.1.", + expectedError: `invalid version "0.1."`, + }, + { + input: "0.1.2.3", + expectedError: `invalid version "0.1.2.3"`, + }, + { + input: "", + expectedError: `invalid version ""`, + }, + { + input: "...", + expectedError: `invalid version "..."`, + }, + } { + t.Run(test.input, func(t *testing.T) { + version, err := NewAPIVersion(test.input) + if test.expectedError != "" { + assert.EqualError(t, err, test.expectedError) + assert.Empty(t, version) + return + } + require.NoError(t, err) + require.Equal(t, test.expectedVersion, version) + require.Equal(t, test.expectedRep, version) + require.Equal(t, test.expectedRep, version) + }) + } +} diff --git a/internal/docker/docker.go b/internal/docker/docker.go index 3353f3c5997f..0df0aeed5671 100644 --- a/internal/docker/docker.go +++ b/internal/docker/docker.go @@ -14,16 +14,16 @@ import ( "time" dtypes "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" devents "github.com/docker/docker/api/types/events" dfilters "github.com/docker/docker/api/types/filters" docker "github.com/docker/docker/client" "go.uber.org/zap" ) -const ( - minimalRequiredDockerAPIVersion = 1.22 - userAgent = "OpenTelemetry-Collector Docker Stats Receiver/v0.0.1" -) +const userAgent = "OpenTelemetry-Collector Docker Stats Receiver/v0.0.1" + +var minimumRequiredDockerAPIVersion = MustNewAPIVersion("1.22") // Container is client.ContainerInspect() response container // stats and translated environment string map for potential labels. @@ -46,10 +46,17 @@ type Client struct { } func NewDockerClient(config *Config, logger *zap.Logger, opts ...docker.Opt) (*Client, error) { + version := minimumRequiredDockerAPIVersion + if config.DockerAPIVersion != "" { + var err error + if version, err = NewAPIVersion(config.DockerAPIVersion); err != nil { + return nil, err + } + } client, err := docker.NewClientWithOpts( append([]docker.Opt{ docker.WithHost(config.Endpoint), - docker.WithVersion(fmt.Sprintf("v%v", config.DockerAPIVersion)), + docker.WithVersion(version), docker.WithHTTPHeaders(map[string]string{"User-Agent": userAgent}), }, opts...)..., ) @@ -92,7 +99,7 @@ func (dc *Client) LoadContainerList(ctx context.Context) error { // Build initial container maps before starting loop filters := dfilters.NewArgs() filters.Add("status", "running") - options := dtypes.ContainerListOptions{ + options := container.ListOptions{ Filters: filters, } @@ -230,16 +237,16 @@ EVENT_LOOP: case event := <-eventCh: switch event.Action { case "destroy": - dc.logger.Debug("Docker container was destroyed:", zap.String("id", event.ID)) - dc.RemoveContainer(event.ID) + dc.logger.Debug("Docker container was destroyed:", zap.String("id", event.Actor.ID)) + dc.RemoveContainer(event.Actor.ID) default: dc.logger.Debug( "Docker container update:", - zap.String("id", event.ID), - zap.String("action", event.Action), + zap.String("id", event.Actor.ID), + zap.Any("action", event.Action), ) - dc.InspectAndPersistContainer(ctx, event.ID) + dc.InspectAndPersistContainer(ctx, event.Actor.ID) } if event.TimeNano > lastTime.UnixNano() { diff --git a/internal/docker/docker_test.go b/internal/docker/docker_test.go index 85bd7c6dbb42..5bb749220f68 100644 --- a/internal/docker/docker_test.go +++ b/internal/docker/docker_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !windows -// +build !windows // TODO review if tests should succeed on Windows @@ -81,7 +80,7 @@ func TestWatchingTimeouts(t *testing.T) { cli, err := NewDockerClient(config, zap.NewNop()) assert.NotNil(t, cli) - assert.Nil(t, err) + assert.NoError(t, err) expectedError := "context deadline exceeded" @@ -93,7 +92,7 @@ func TestWatchingTimeouts(t *testing.T) { observed, logs := observer.New(zapcore.WarnLevel) cli, err = NewDockerClient(config, zap.New(observed)) assert.NotNil(t, cli) - assert.Nil(t, err) + assert.NoError(t, err) cnt, ofInterest := cli.inspectedContainerIsOfInterest(context.Background(), "SomeContainerId") assert.False(t, ofInterest) @@ -126,7 +125,7 @@ func TestFetchingTimeouts(t *testing.T) { cli, err := NewDockerClient(config, zap.NewNop()) assert.NotNil(t, cli) - assert.Nil(t, err) + assert.NoError(t, err) expectedError := "context deadline exceeded" @@ -135,7 +134,7 @@ func TestFetchingTimeouts(t *testing.T) { observed, logs := observer.New(zapcore.WarnLevel) cli, err = NewDockerClient(config, zap.New(observed)) assert.NotNil(t, cli) - assert.Nil(t, err) + assert.NoError(t, err) statsJSON, err := cli.FetchContainerStatsAsJSON( context.Background(), @@ -182,7 +181,7 @@ func TestToStatsJSONErrorHandling(t *testing.T) { cli, err := NewDockerClient(config, zap.NewNop()) assert.NotNil(t, cli) - assert.Nil(t, err) + assert.NoError(t, err) dc := &Container{ ContainerJSON: &dtypes.ContainerJSON{ @@ -229,9 +228,11 @@ func TestEventLoopHandlesError(t *testing.T) { cli, err := NewDockerClient(config, zap.New(observed)) assert.NotNil(t, cli) - assert.Nil(t, err) + assert.NoError(t, err) - go cli.ContainerEventLoop(context.Background()) + ctx, cancel := context.WithCancel(context.Background()) + go cli.ContainerEventLoop(ctx) + defer cancel() assert.Eventually(t, func() bool { for _, l := range logs.All() { diff --git a/internal/docker/go.mod b/internal/docker/go.mod index 4a958a010ec8..b5cc38562397 100644 --- a/internal/docker/go.mod +++ b/internal/docker/go.mod @@ -1,22 +1,26 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker -go 1.20 +go 1.21 require ( - github.com/docker/docker v24.0.7+incompatible + github.com/docker/docker v25.0.5+incompatible github.com/gobwas/glob v0.2.3 - github.com/stretchr/testify v1.8.4 - go.uber.org/zap v1.26.0 + github.com/stretchr/testify v1.9.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( github.com/Microsoft/go-winio v0.4.17 // indirect + github.com/containerd/log v0.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect + github.com/distribution/reference v0.5.0 // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // 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/google/go-cmp v0.6.0 // indirect github.com/kr/pretty v0.2.1 // indirect github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect github.com/morikuni/aec v1.0.0 // indirect @@ -24,9 +28,15 @@ require ( github.com/opencontainers/image-spec v1.0.2 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/time v0.4.0 // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/internal/docker/go.sum b/internal/docker/go.sum index 5f2cfeab208e..97ff63efbf32 100644 --- a/internal/docker/go.sum +++ b/internal/docker/go.sum @@ -2,25 +2,40 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOEl github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.4.17 h1:iT12IBVClFevaf8PuVyi3UmZOVh4OqnaLxDTW2O6j3w= github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/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/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +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/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= 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.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.3.0/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.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= 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/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= @@ -28,6 +43,7 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn 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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= @@ -42,17 +58,36 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE 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/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -63,8 +98,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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= @@ -74,10 +109,12 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -89,6 +126,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM= +google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 h1:6G8oQ016D88m1xAKljMlBOOGWDZkes4kMhgGFlf8WcQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU= +google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= +google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +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-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/internal/docker/matcher_test.go b/internal/docker/matcher_test.go index bcb30fbd35f1..73fdb46dc510 100644 --- a/internal/docker/matcher_test.go +++ b/internal/docker/matcher_test.go @@ -137,7 +137,7 @@ func TestStringMatcher(t *testing.T) { } { t.Run(tc.name, func(t *testing.T) { f, err := newStringMatcher(tc.items) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tc.shouldMatch, f.matches(tc.input)) }) } diff --git a/internal/docker/package_test.go b/internal/docker/package_test.go new file mode 100644 index 000000000000..0ebd6a327e31 --- /dev/null +++ b/internal/docker/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package docker + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/exp/metrics/Makefile b/internal/exp/metrics/Makefile new file mode 100644 index 000000000000..bdd863a203be --- /dev/null +++ b/internal/exp/metrics/Makefile @@ -0,0 +1 @@ +include ../../../Makefile.Common diff --git a/internal/exp/metrics/go.mod b/internal/exp/metrics/go.mod new file mode 100644 index 000000000000..6d13de16cd9a --- /dev/null +++ b/internal/exp/metrics/go.mod @@ -0,0 +1,30 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics + +go 1.21 + +require ( + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.5.0 +) + +require ( + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil => ../../../pkg/pdatautil diff --git a/internal/exp/metrics/go.sum b/internal/exp/metrics/go.sum new file mode 100644 index 000000000000..88e7d75f89c0 --- /dev/null +++ b/internal/exp/metrics/go.sum @@ -0,0 +1,87 @@ +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +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/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/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/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/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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +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= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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/exp/metrics/identity/doc.go b/internal/exp/metrics/identity/doc.go new file mode 100644 index 000000000000..457bd7434496 --- /dev/null +++ b/internal/exp/metrics/identity/doc.go @@ -0,0 +1,8 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// identity types for metrics and sample streams. +// +// Use the `Of*(T) -> I` functions to obtain a unique, comparable (==) and +// hashable (map key) identity value I for T. +package identity // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" diff --git a/internal/exp/metrics/identity/metric.go b/internal/exp/metrics/identity/metric.go new file mode 100644 index 000000000000..ceaea90b8e0e --- /dev/null +++ b/internal/exp/metrics/identity/metric.go @@ -0,0 +1,71 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package identity // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + +import ( + "hash" + + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" +) + +type metric = Metric + +type Metric struct { + scope + + name string + unit string + ty pmetric.MetricType + + monotonic bool + temporality pmetric.AggregationTemporality +} + +func (i Metric) Hash() hash.Hash64 { + sum := i.scope.Hash() + sum.Write([]byte(i.name)) + sum.Write([]byte(i.unit)) + + var mono byte + if i.monotonic { + mono = 1 + } + sum.Write([]byte{byte(i.ty), mono, byte(i.temporality)}) + return sum +} + +func (i Metric) Scope() Scope { + return i.scope +} + +func OfMetric(scope Scope, m pmetric.Metric) Metric { + id := Metric{ + scope: scope, + name: m.Name(), + unit: m.Unit(), + ty: m.Type(), + } + + switch m.Type() { + case pmetric.MetricTypeSum: + sum := m.Sum() + id.monotonic = sum.IsMonotonic() + id.temporality = sum.AggregationTemporality() + case pmetric.MetricTypeExponentialHistogram: + exp := m.ExponentialHistogram() + id.monotonic = true + id.temporality = exp.AggregationTemporality() + case pmetric.MetricTypeHistogram: + hist := m.Histogram() + id.monotonic = true + id.temporality = hist.AggregationTemporality() + } + + return id +} + +func OfResourceMetric(res pcommon.Resource, scope pcommon.InstrumentationScope, metric pmetric.Metric) Metric { + return OfMetric(OfScope(OfResource(res), scope), metric) +} diff --git a/internal/exp/metrics/identity/resource.go b/internal/exp/metrics/identity/resource.go new file mode 100644 index 000000000000..990fb71e64ea --- /dev/null +++ b/internal/exp/metrics/identity/resource.go @@ -0,0 +1,31 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package identity // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + +import ( + "hash" + "hash/fnv" + + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil" +) + +type resource = Resource + +type Resource struct { + attrs [16]byte +} + +func (r Resource) Hash() hash.Hash64 { + sum := fnv.New64a() + sum.Write(r.attrs[:]) + return sum +} + +func OfResource(r pcommon.Resource) Resource { + return Resource{ + attrs: pdatautil.MapHash(r.Attributes()), + } +} diff --git a/internal/exp/metrics/identity/scope.go b/internal/exp/metrics/identity/scope.go new file mode 100644 index 000000000000..db516bc14c79 --- /dev/null +++ b/internal/exp/metrics/identity/scope.go @@ -0,0 +1,43 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package identity // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + +import ( + "hash" + + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil" +) + +type scope = Scope + +type Scope struct { + resource resource + + name string + version string + attrs [16]byte +} + +func (s Scope) Hash() hash.Hash64 { + sum := s.resource.Hash() + sum.Write([]byte(s.name)) + sum.Write([]byte(s.version)) + sum.Write(s.attrs[:]) + return sum +} + +func (s Scope) Resource() Resource { + return s.resource +} + +func OfScope(res Resource, scope pcommon.InstrumentationScope) Scope { + return Scope{ + resource: res, + name: scope.Name(), + version: scope.Version(), + attrs: pdatautil.MapHash(scope.Attributes()), + } +} diff --git a/internal/exp/metrics/identity/stream.go b/internal/exp/metrics/identity/stream.go new file mode 100644 index 000000000000..19988f7730dc --- /dev/null +++ b/internal/exp/metrics/identity/stream.go @@ -0,0 +1,35 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package identity // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + +import ( + "hash" + + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil" +) + +type Stream struct { + metric + attrs [16]byte +} + +func (i Stream) Hash() hash.Hash64 { + sum := i.metric.Hash() + sum.Write(i.attrs[:]) + return sum +} + +func (i Stream) Metric() Metric { + return i.metric +} + +func OfStream[DataPoint attrPoint](m Metric, dp DataPoint) Stream { + return Stream{metric: m, attrs: pdatautil.MapHash(dp.Attributes())} +} + +type attrPoint interface { + Attributes() pcommon.Map +} diff --git a/internal/exp/metrics/identity/strings.go b/internal/exp/metrics/identity/strings.go new file mode 100644 index 000000000000..7339f95a578c --- /dev/null +++ b/internal/exp/metrics/identity/strings.go @@ -0,0 +1,24 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package identity // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + +import ( + "fmt" +) + +func (r Resource) String() string { + return fmt.Sprintf("resource/%x", r.Hash().Sum64()) +} + +func (s Scope) String() string { + return fmt.Sprintf("scope/%x", s.Hash().Sum64()) +} + +func (m Metric) String() string { + return fmt.Sprintf("metric/%x", m.Hash().Sum64()) +} + +func (s Stream) String() string { + return fmt.Sprintf("stream/%x", s.Hash().Sum64()) +} diff --git a/internal/exp/metrics/metadata.yaml b/internal/exp/metrics/metadata.yaml new file mode 100644 index 000000000000..05b65282244e --- /dev/null +++ b/internal/exp/metrics/metadata.yaml @@ -0,0 +1,3 @@ +status: + codeowners: + active: [sh0rez, RichieSams] diff --git a/internal/exp/metrics/staleness/priority_queue.go b/internal/exp/metrics/staleness/priority_queue.go new file mode 100644 index 000000000000..f1b01743f95f --- /dev/null +++ b/internal/exp/metrics/staleness/priority_queue.go @@ -0,0 +1,111 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package staleness // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/staleness" + +import ( + "container/heap" + "time" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" +) + +// PriorityQueue represents a way to store entries sorted by their priority. +// Pop() will return the oldest entry of the set. +type PriorityQueue interface { + // Update will add or update an entry, and reshuffle the queue internally as needed to keep it sorted + Update(id identity.Stream, newPrio time.Time) + // Peek will return the entry at the HEAD of the queue *without* removing it from the queue + Peek() (identity.Stream, time.Time) + // Pop will remove the entry at the HEAD of the queue and return it + Pop() (identity.Stream, time.Time) + // Len will return the number of entries in the queue + Len() int +} + +// heapQueue implements heap.Interface. +// We use it as the inner implementation of a heap-based sorted queue +type heapQueue []*queueItem + +type queueItem struct { + key identity.Stream + prio time.Time + index int +} + +func (pq heapQueue) Len() int { return len(pq) } + +func (pq heapQueue) Less(i, j int) bool { + // We want Pop to give us the lowest priority + return pq[i].prio.Before(pq[j].prio) +} + +func (pq heapQueue) Swap(i, j int) { + pq[i], pq[j] = pq[j], pq[i] + pq[i].index = i + pq[j].index = j +} + +func (pq *heapQueue) Push(x any) { + n := len(*pq) + item := x.(*queueItem) + item.index = n + *pq = append(*pq, item) +} + +func (pq *heapQueue) Pop() any { + old := *pq + n := len(old) + item := old[n-1] + old[n-1] = nil // avoid memory leak + item.index = -1 // for safety + *pq = old[0 : n-1] + return item +} + +type heapPriorityQueue struct { + inner heapQueue + itemLookup map[identity.Stream]*queueItem +} + +func NewPriorityQueue() PriorityQueue { + pq := &heapPriorityQueue{ + inner: heapQueue{}, + itemLookup: map[identity.Stream]*queueItem{}, + } + heap.Init(&pq.inner) + + return pq +} + +func (pq *heapPriorityQueue) Update(id identity.Stream, newPrio time.Time) { + // Check if the entry already exists in the queue + item, ok := pq.itemLookup[id] + if ok { + // If so, we can update it in place + item.prio = newPrio + heap.Fix(&pq.inner, item.index) + } else { + item = &queueItem{ + key: id, + prio: newPrio, + } + heap.Push(&pq.inner, item) + pq.itemLookup[id] = item + } +} + +func (pq *heapPriorityQueue) Peek() (identity.Stream, time.Time) { + val := pq.inner[0] + return val.key, val.prio +} + +func (pq *heapPriorityQueue) Pop() (identity.Stream, time.Time) { + val := heap.Pop(&pq.inner).(*queueItem) + delete(pq.itemLookup, val.key) + return val.key, val.prio +} + +func (pq *heapPriorityQueue) Len() int { + return pq.inner.Len() +} diff --git a/internal/exp/metrics/staleness/priority_queue_test.go b/internal/exp/metrics/staleness/priority_queue_test.go new file mode 100644 index 000000000000..b58478e7c1db --- /dev/null +++ b/internal/exp/metrics/staleness/priority_queue_test.go @@ -0,0 +1,116 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package staleness + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" +) + +func TestPriorityQueueImpl(t *testing.T) { + t.Parallel() + + pq := NewPriorityQueue() + + idA := generateStreamID(t, map[string]any{ + "aaa": "123", + }) + idB := generateStreamID(t, map[string]any{ + "bbb": "456", + }) + idC := generateStreamID(t, map[string]any{ + "ccc": "789", + }) + + initialTime := time.Time{} + prioA := initialTime.Add(2 * time.Second) + prioB := initialTime.Add(1 * time.Second) + prioC := initialTime.Add(3 * time.Second) + + pq.Update(idA, prioA) + pq.Update(idB, prioB) + pq.Update(idC, prioC) + + // The first item should be B + id, prio := pq.Peek() + require.Equal(t, idB, id) + require.Equal(t, prioB, prio) + + // If we peek again, nothing should change + id, prio = pq.Peek() + require.Equal(t, idB, id) + require.Equal(t, prioB, prio) + + // Pop should return the same thing + id, prio = pq.Pop() + require.Equal(t, idB, id) + require.Equal(t, prioB, prio) + + // Now if we peek again, it should be the next item + id, prio = pq.Peek() + require.Equal(t, idA, id) + require.Equal(t, prioA, prio) + + // Pop should return the same thing + id, prio = pq.Pop() + require.Equal(t, idA, id) + require.Equal(t, prioA, prio) + + // One last time + id, prio = pq.Peek() + require.Equal(t, idC, id) + require.Equal(t, prioC, prio) + + // Pop should return the same thing + id, prio = pq.Pop() + require.Equal(t, idC, id) + require.Equal(t, prioC, prio) + + // The queue should now be empty + require.Equal(t, 0, pq.Len()) + + // And the inner lookup map should also be empty + require.IsType(t, &heapPriorityQueue{}, pq) + heapQueue := pq.(*heapPriorityQueue) + require.Len(t, heapQueue.itemLookup, 0) +} + +func generateStreamID(t *testing.T, attributes map[string]any) identity.Stream { + res := pcommon.NewResource() + err := res.Attributes().FromRaw(map[string]any{ + "foo": "bar", + "asdf": "qwer", + }) + require.NoError(t, err) + + scope := pcommon.NewInstrumentationScope() + scope.SetName("TestScope") + scope.SetVersion("v1.2.3") + err = scope.Attributes().FromRaw(map[string]any{ + "aaa": "bbb", + "ccc": "ddd", + }) + require.NoError(t, err) + + metric := pmetric.NewMetric() + + sum := metric.SetEmptySum() + sum.SetIsMonotonic(true) + sum.SetAggregationTemporality(pmetric.AggregationTemporalityDelta) + + dp := sum.DataPoints().AppendEmpty() + dp.SetStartTimestamp(678) + dp.SetTimestamp(789) + dp.SetDoubleValue(123.456) + err = dp.Attributes().FromRaw(attributes) + require.NoError(t, err) + + return identity.OfStream(identity.OfResourceMetric(res, scope, metric), dp) +} diff --git a/internal/exp/metrics/staleness/staleness.go b/internal/exp/metrics/staleness/staleness.go new file mode 100644 index 000000000000..4bf25c198920 --- /dev/null +++ b/internal/exp/metrics/staleness/staleness.go @@ -0,0 +1,95 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package staleness // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/staleness" + +import ( + "time" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/streams" +) + +// We override how Now() is returned, so we can have deterministic tests +var NowFunc = time.Now + +var ( + _ streams.Map[any] = (*Staleness[any])(nil) + _ streams.Evictor = (*Staleness[any])(nil) +) + +// Staleness a a wrapper over a map that adds an additional "staleness" value to each entry. Users can +// call ExpireOldEntries() to automatically remove all entries from the map whole staleness value is +// older than the `max` +// +// NOTE: Staleness methods are *not* thread-safe. If the user needs to use Staleness in a multi-threaded +// environment, then it is the user's responsibility to properly serialize calls to Staleness methods +type Staleness[T any] struct { + Max time.Duration + + items streams.Map[T] + pq PriorityQueue +} + +func NewStaleness[T any](max time.Duration, items streams.Map[T]) *Staleness[T] { + return &Staleness[T]{ + Max: max, + + items: items, + pq: NewPriorityQueue(), + } +} + +// Load the value at key. If it does not exist, the boolean will be false and the value returned will be the zero value +func (s *Staleness[T]) Load(id identity.Stream) (T, bool) { + return s.items.Load(id) +} + +// Store the given key value pair in the map, and update the pair's staleness value to "now" +func (s *Staleness[T]) Store(id identity.Stream, v T) error { + s.pq.Update(id, NowFunc()) + return s.items.Store(id, v) +} + +func (s *Staleness[T]) Delete(id identity.Stream) { + s.items.Delete(id) +} + +// Items returns an iterator function that in future go version can be used with range +// See: https://go.dev/wiki/RangefuncExperiment +func (s *Staleness[T]) Items() func(yield func(identity.Stream, T) bool) bool { + return s.items.Items() +} + +// ExpireOldEntries will remove all entries whose staleness value is older than `now() - max` +// For example, if an entry has a staleness value of two hours ago, and max == 1 hour, then the entry would +// be removed. But if an entry had a stalness value of 30 minutes, then it *wouldn't* be removed. +func (s *Staleness[T]) ExpireOldEntries() { + now := NowFunc() + for { + if s.Len() == 0 { + return + } + _, ts := s.pq.Peek() + if now.Sub(ts) < s.Max { + break + } + id, _ := s.pq.Pop() + s.items.Delete(id) + } +} + +func (s *Staleness[T]) Len() int { + return s.items.Len() +} + +func (s *Staleness[T]) Next() time.Time { + _, ts := s.pq.Peek() + return ts +} + +func (s *Staleness[T]) Evict() identity.Stream { + id, _ := s.pq.Pop() + s.items.Delete(id) + return id +} diff --git a/internal/exp/metrics/staleness/staleness_test.go b/internal/exp/metrics/staleness/staleness_test.go new file mode 100644 index 000000000000..98fec276238e --- /dev/null +++ b/internal/exp/metrics/staleness/staleness_test.go @@ -0,0 +1,94 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package staleness + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/streams" +) + +func TestStaleness(t *testing.T) { + max := 1 * time.Second + stalenessMap := NewStaleness[int]( + max, + make(streams.HashMap[int]), + ) + + idA := generateStreamID(t, map[string]any{ + "aaa": "123", + }) + idB := generateStreamID(t, map[string]any{ + "bbb": "456", + }) + idC := generateStreamID(t, map[string]any{ + "ccc": "789", + }) + idD := generateStreamID(t, map[string]any{ + "ddd": "024", + }) + + initialTime := time.Time{} + timeA := initialTime.Add(2 * time.Second) + timeB := initialTime.Add(1 * time.Second) + timeC := initialTime.Add(3 * time.Second) + timeD := initialTime.Add(4 * time.Second) + + valueA := 1 + valueB := 4 + valueC := 7 + valueD := 0 + + // Add the values to the map + NowFunc = func() time.Time { return timeA } + _ = stalenessMap.Store(idA, valueA) + NowFunc = func() time.Time { return timeB } + _ = stalenessMap.Store(idB, valueB) + NowFunc = func() time.Time { return timeC } + _ = stalenessMap.Store(idC, valueC) + NowFunc = func() time.Time { return timeD } + _ = stalenessMap.Store(idD, valueD) + + // Set the time to 2.5s and run expire + // This should remove B, but the others should remain + // (now == 2.5s, B == 1s, max == 1s) + // now > B + max + NowFunc = func() time.Time { return initialTime.Add(2500 * time.Millisecond) } + stalenessMap.ExpireOldEntries() + validateStalenessMapEntries(t, + map[identity.Stream]int{ + idA: valueA, + idC: valueC, + idD: valueD, + }, + stalenessMap, + ) + + // Set the time to 4.5s and run expire + // This should remove A and C, but D should remain + // (now == 2.5s, A == 2s, C == 3s, max == 1s) + // now > A + max AND now > C + max + NowFunc = func() time.Time { return initialTime.Add(4500 * time.Millisecond) } + stalenessMap.ExpireOldEntries() + validateStalenessMapEntries(t, + map[identity.Stream]int{ + idD: valueD, + }, + stalenessMap, + ) +} + +func validateStalenessMapEntries(t *testing.T, expected map[identity.Stream]int, sm *Staleness[int]) { + actual := map[identity.Stream]int{} + + sm.Items()(func(key identity.Stream, value int) bool { + actual[key] = value + return true + }) + require.Equal(t, expected, actual) +} diff --git a/internal/exp/metrics/streams/streams.go b/internal/exp/metrics/streams/streams.go new file mode 100644 index 000000000000..90bebb63c091 --- /dev/null +++ b/internal/exp/metrics/streams/streams.go @@ -0,0 +1,58 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package streams // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/streams" + +import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + +// Sequence of streams that can be iterated upon +type Seq[T any] func(yield func(identity.Stream, T) bool) bool + +// Map defines a collection of items tracked by a stream-id and the operations +// on it +type Map[T any] interface { + Load(identity.Stream) (T, bool) + Store(identity.Stream, T) error + Delete(identity.Stream) + Items() func(yield func(identity.Stream, T) bool) bool + Len() int +} + +var _ Map[any] = HashMap[any](nil) + +type HashMap[T any] map[identity.Stream]T + +func (m HashMap[T]) Load(id identity.Stream) (T, bool) { + v, ok := (map[identity.Stream]T)(m)[id] + return v, ok +} + +func (m HashMap[T]) Store(id identity.Stream, v T) error { + (map[identity.Stream]T)(m)[id] = v + return nil +} + +func (m HashMap[T]) Delete(id identity.Stream) { + delete((map[identity.Stream]T)(m), id) +} + +func (m HashMap[T]) Items() func(yield func(identity.Stream, T) bool) bool { + return func(yield func(identity.Stream, T) bool) bool { + for id, v := range (map[identity.Stream]T)(m) { + if !yield(id, v) { + break + } + } + return false + } +} + +func (m HashMap[T]) Len() int { + return len((map[identity.Stream]T)(m)) +} + +// Evictors remove the "least important" stream based on some strategy such as +// the oldest, least active, etc. +type Evictor interface { + Evict() identity.Stream +} diff --git a/internal/filter/filterconfig/config.go b/internal/filter/filterconfig/config.go index 4f77f99fe65f..eb0f2a53191f 100644 --- a/internal/filter/filterconfig/config.go +++ b/internal/filter/filterconfig/config.go @@ -105,8 +105,7 @@ type MatchProperties struct { MetricNames []string `mapstructure:"metric_names"` // Attributes specifies the list of attributes to match against. - // All of these attributes must match exactly for a match to occur. - // Only match_type=strict is allowed if "attributes" are specified. + // All of these attributes must match for a match to occur. // This is an optional field. Attributes []Attribute `mapstructure:"attributes"` diff --git a/internal/filter/filterconfig/package_test.go b/internal/filter/filterconfig/package_test.go new file mode 100644 index 000000000000..45e355b3e860 --- /dev/null +++ b/internal/filter/filterconfig/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filterconfig + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/filter/filterexpr/matcher.go b/internal/filter/filterexpr/matcher.go index f10603067ba6..2b4126e040a4 100644 --- a/internal/filter/filterexpr/matcher.go +++ b/internal/filter/filterexpr/matcher.go @@ -7,8 +7,8 @@ import ( "fmt" "sync" - "github.com/antonmedv/expr" - "github.com/antonmedv/expr/vm" + "github.com/expr-lang/expr" + "github.com/expr-lang/expr/vm" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" ) diff --git a/internal/filter/filterexpr/matcher_test.go b/internal/filter/filterexpr/matcher_test.go index 6e69c15e92a5..6bfbe22e0ae3 100644 --- a/internal/filter/filterexpr/matcher_test.go +++ b/internal/filter/filterexpr/matcher_test.go @@ -7,7 +7,7 @@ import ( "sync" "testing" - "github.com/antonmedv/expr/vm" + "github.com/expr-lang/expr/vm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/pdata/pmetric" diff --git a/internal/filter/filterexpr/package_test.go b/internal/filter/filterexpr/package_test.go new file mode 100644 index 000000000000..92805d74f6f1 --- /dev/null +++ b/internal/filter/filterexpr/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filterexpr + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/filter/filterlog/filterlog_test.go b/internal/filter/filterlog/filterlog_test.go index e7626e9bb4ed..7e315e49450a 100644 --- a/internal/filter/filterlog/filterlog_test.go +++ b/internal/filter/filterlog/filterlog_test.go @@ -81,7 +81,7 @@ func TestLogRecord_validateMatchesConfiguration_InvalidConfig(t *testing.T) { t.Run(tc.name, func(t *testing.T) { expr, err := newExpr(tc.property) assert.Nil(t, expr) - require.NotNil(t, err) + require.Error(t, err) println(tc.name) assert.Equal(t, tc.errorString, err.Error()) }) @@ -148,7 +148,7 @@ func TestLogRecord_Matching_False(t *testing.T) { for _, tc := range testcases { t.Run(tc.name, func(t *testing.T) { expr, err := newExpr(tc.properties) - assert.Nil(t, err) + assert.NoError(t, err) require.NotNil(t, expr) val, err := expr.Eval(context.Background(), ottllog.NewTransformContext(lr, pcommon.NewInstrumentationScope(), pcommon.NewResource())) diff --git a/internal/filter/filterlog/package_test.go b/internal/filter/filterlog/package_test.go new file mode 100644 index 000000000000..3e69111e06eb --- /dev/null +++ b/internal/filter/filterlog/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filterlog + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/filter/filtermatcher/filtermatcher_test.go b/internal/filter/filtermatcher/filtermatcher_test.go index 4f755078bd90..0592fccc4ba8 100644 --- a/internal/filter/filtermatcher/filtermatcher_test.go +++ b/internal/filter/filtermatcher/filtermatcher_test.go @@ -226,7 +226,7 @@ func Test_MatchingCornerCases(t *testing.T) { } mp, err := NewMatcher(cfg) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, mp) assert.False(t, mp.Match(pcommon.NewMap(), resource("svcA"), pcommon.NewInstrumentationScope())) diff --git a/internal/filter/filtermatcher/package_test.go b/internal/filter/filtermatcher/package_test.go new file mode 100644 index 000000000000..a3d2c30398c2 --- /dev/null +++ b/internal/filter/filtermatcher/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filtermatcher + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/filter/filtermetric/config_test.go b/internal/filter/filtermetric/config_test.go index a98fcd062f85..ca07dc762c94 100644 --- a/internal/filter/filtermetric/config_test.go +++ b/internal/filter/filtermetric/config_test.go @@ -9,7 +9,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterconfig" @@ -42,7 +41,7 @@ func TestConfig(t *testing.T) { v, err := confmaptest.LoadConf(testFile) require.NoError(t, err) testYamls := map[string]filterconfig.MetricMatchProperties{} - require.NoErrorf(t, v.Unmarshal(&testYamls, confmap.WithErrorUnused()), "unable to unmarshal yaml from file %v", testFile) + require.NoErrorf(t, v.Unmarshal(&testYamls), "unable to unmarshal yaml from file %v", testFile) tests := []struct { name string diff --git a/internal/filter/filtermetric/package_test.go b/internal/filter/filtermetric/package_test.go new file mode 100644 index 000000000000..98fb62b7b541 --- /dev/null +++ b/internal/filter/filtermetric/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filtermetric + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/filter/filterottl/filter.go b/internal/filter/filterottl/filter.go index 4493ba0bd6ea..6324c8a35bd9 100644 --- a/internal/filter/filterottl/filter.go +++ b/internal/filter/filterottl/filter.go @@ -20,132 +20,94 @@ import ( // The passed in functions should use the ottlspan.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected func NewBoolExprForSpan(conditions []string, functions map[string]ottl.Factory[ottlspan.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottlspan.TransformContext], error) { - match := newMatchFactory[ottlspan.TransformContext]() - if _, ok := functions[match.Name()]; !ok { - functions[match.Name()] = match - } - statmentsStr := conditionsToStatements(conditions) parser, err := ottlspan.NewParser(functions, set) if err != nil { return nil, err } - statements, err := parser.ParseStatements(statmentsStr) + statements, err := parser.ParseConditions(conditions) if err != nil { return nil, err } - s := ottlspan.NewStatements(statements, set, ottlspan.WithErrorMode(errorMode)) - return &s, nil + c := ottlspan.NewConditionSequence(statements, set, ottlspan.WithConditionSequenceErrorMode(errorMode)) + return &c, nil } // NewBoolExprForSpanEvent creates a BoolExpr[ottlspanevent.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottlspanevent.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected func NewBoolExprForSpanEvent(conditions []string, functions map[string]ottl.Factory[ottlspanevent.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottlspanevent.TransformContext], error) { - match := newMatchFactory[ottlspanevent.TransformContext]() - if _, ok := functions[match.Name()]; !ok { - functions[match.Name()] = match - } - statmentsStr := conditionsToStatements(conditions) parser, err := ottlspanevent.NewParser(functions, set) if err != nil { return nil, err } - statements, err := parser.ParseStatements(statmentsStr) + statements, err := parser.ParseConditions(conditions) if err != nil { return nil, err } - s := ottlspanevent.NewStatements(statements, set, ottlspanevent.WithErrorMode(errorMode)) - return &s, nil + c := ottlspanevent.NewConditionSequence(statements, set, ottlspanevent.WithConditionSequenceErrorMode(errorMode)) + return &c, nil } // NewBoolExprForMetric creates a BoolExpr[ottlmetric.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottlmetric.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected func NewBoolExprForMetric(conditions []string, functions map[string]ottl.Factory[ottlmetric.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottlmetric.TransformContext], error) { - match := newMatchFactory[ottlmetric.TransformContext]() - if _, ok := functions[match.Name()]; !ok { - functions[match.Name()] = match - } - statmentsStr := conditionsToStatements(conditions) parser, err := ottlmetric.NewParser(functions, set) if err != nil { return nil, err } - statements, err := parser.ParseStatements(statmentsStr) + statements, err := parser.ParseConditions(conditions) if err != nil { return nil, err } - s := ottlmetric.NewStatements(statements, set, ottlmetric.WithErrorMode(errorMode)) - return &s, nil + c := ottlmetric.NewConditionSequence(statements, set, ottlmetric.WithConditionSequenceErrorMode(errorMode)) + return &c, nil } // NewBoolExprForDataPoint creates a BoolExpr[ottldatapoint.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottldatapoint.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected func NewBoolExprForDataPoint(conditions []string, functions map[string]ottl.Factory[ottldatapoint.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottldatapoint.TransformContext], error) { - match := newMatchFactory[ottldatapoint.TransformContext]() - if _, ok := functions[match.Name()]; !ok { - functions[match.Name()] = match - } - statmentsStr := conditionsToStatements(conditions) parser, err := ottldatapoint.NewParser(functions, set) if err != nil { return nil, err } - statements, err := parser.ParseStatements(statmentsStr) + statements, err := parser.ParseConditions(conditions) if err != nil { return nil, err } - s := ottldatapoint.NewStatements(statements, set, ottldatapoint.WithErrorMode(errorMode)) - return &s, nil + c := ottldatapoint.NewConditionSequence(statements, set, ottldatapoint.WithConditionSequenceErrorMode(errorMode)) + return &c, nil } // NewBoolExprForLog creates a BoolExpr[ottllog.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottllog.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected func NewBoolExprForLog(conditions []string, functions map[string]ottl.Factory[ottllog.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottllog.TransformContext], error) { - match := newMatchFactory[ottllog.TransformContext]() - if _, ok := functions[match.Name()]; !ok { - functions[match.Name()] = match - } - statmentsStr := conditionsToStatements(conditions) parser, err := ottllog.NewParser(functions, set) if err != nil { return nil, err } - statements, err := parser.ParseStatements(statmentsStr) + statements, err := parser.ParseConditions(conditions) if err != nil { return nil, err } - s := ottllog.NewStatements(statements, set, ottllog.WithErrorMode(errorMode)) - return &s, nil + c := ottllog.NewConditionSequence(statements, set, ottllog.WithConditionSequenceErrorMode(errorMode)) + return &c, nil } // NewBoolExprForResource creates a BoolExpr[ottlresource.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottlresource.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected func NewBoolExprForResource(conditions []string, functions map[string]ottl.Factory[ottlresource.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottlresource.TransformContext], error) { - match := newMatchFactory[ottlresource.TransformContext]() - if _, ok := functions[match.Name()]; !ok { - functions[match.Name()] = match - } - statmentsStr := conditionsToStatements(conditions) parser, err := ottlresource.NewParser(functions, set) if err != nil { return nil, err } - statements, err := parser.ParseStatements(statmentsStr) + statements, err := parser.ParseConditions(conditions) if err != nil { return nil, err } - s := ottlresource.NewStatements(statements, set, ottlresource.WithErrorMode(errorMode)) - return &s, nil -} - -func conditionsToStatements(conditions []string) []string { - statements := make([]string, len(conditions)) - for i, condition := range conditions { - statements[i] = "match() where " + condition - } - return statements + c := ottlresource.NewConditionSequence(statements, set, ottlresource.WithConditionSequenceErrorMode(errorMode)) + return &c, nil } diff --git a/internal/filter/filterottl/functions.go b/internal/filter/filterottl/functions.go index 82c9c6b79997..c86ee64f89ae 100644 --- a/internal/filter/filterottl/functions.go +++ b/internal/filter/filterottl/functions.go @@ -20,15 +20,15 @@ import ( ) func StandardSpanFuncs() map[string]ottl.Factory[ottlspan.TransformContext] { - return standardFuncs[ottlspan.TransformContext]() + return ottlfuncs.StandardConverters[ottlspan.TransformContext]() } func StandardSpanEventFuncs() map[string]ottl.Factory[ottlspanevent.TransformContext] { - return standardFuncs[ottlspanevent.TransformContext]() + return ottlfuncs.StandardConverters[ottlspanevent.TransformContext]() } func StandardMetricFuncs() map[string]ottl.Factory[ottlmetric.TransformContext] { - m := standardFuncs[ottlmetric.TransformContext]() + m := ottlfuncs.StandardConverters[ottlmetric.TransformContext]() hasAttributeOnDatapointFactory := newHasAttributeOnDatapointFactory() hasAttributeKeyOnDatapointFactory := newHasAttributeKeyOnDatapointFactory() m[hasAttributeOnDatapointFactory.Name()] = hasAttributeOnDatapointFactory @@ -37,36 +37,15 @@ func StandardMetricFuncs() map[string]ottl.Factory[ottlmetric.TransformContext] } func StandardDataPointFuncs() map[string]ottl.Factory[ottldatapoint.TransformContext] { - return standardFuncs[ottldatapoint.TransformContext]() + return ottlfuncs.StandardConverters[ottldatapoint.TransformContext]() } func StandardLogFuncs() map[string]ottl.Factory[ottllog.TransformContext] { - return standardFuncs[ottllog.TransformContext]() + return ottlfuncs.StandardConverters[ottllog.TransformContext]() } func StandardResourceFuncs() map[string]ottl.Factory[ottlresource.TransformContext] { - return standardFuncs[ottlresource.TransformContext]() -} - -func standardFuncs[K any]() map[string]ottl.Factory[K] { - m := ottlfuncs.StandardConverters[K]() - f := newMatchFactory[K]() - m[f.Name()] = f - return m -} - -func newMatchFactory[K any]() ottl.Factory[K] { - return ottl.NewFactory("match", nil, createMatchFunction[K]) -} - -func createMatchFunction[K any](_ ottl.FunctionContext, _ ottl.Arguments) (ottl.ExprFunc[K], error) { - return matchFn[K]() -} - -func matchFn[K any]() (ottl.ExprFunc[K], error) { - return func(context.Context, K) (any, error) { - return true, nil - }, nil + return ottlfuncs.StandardConverters[ottlresource.TransformContext]() } type hasAttributeOnDatapointArguments struct { @@ -89,7 +68,7 @@ func createHasAttributeOnDatapointFunction(_ ottl.FunctionContext, oArgs ottl.Ar } func hasAttributeOnDatapoint(key string, expectedVal string) (ottl.ExprFunc[ottlmetric.TransformContext], error) { - return func(ctx context.Context, tCtx ottlmetric.TransformContext) (any, error) { + return func(_ context.Context, tCtx ottlmetric.TransformContext) (any, error) { return checkDataPoints(tCtx, key, &expectedVal) }, nil } @@ -113,7 +92,7 @@ func createHasAttributeKeyOnDatapointFunction(_ ottl.FunctionContext, oArgs ottl } func hasAttributeKeyOnDatapoint(key string) (ottl.ExprFunc[ottlmetric.TransformContext], error) { - return func(ctx context.Context, tCtx ottlmetric.TransformContext) (any, error) { + return func(_ context.Context, tCtx ottlmetric.TransformContext) (any, error) { return checkDataPoints(tCtx, key, nil) }, nil } diff --git a/internal/filter/filterottl/package_test.go b/internal/filter/filterottl/package_test.go new file mode 100644 index 000000000000..418dc95817c9 --- /dev/null +++ b/internal/filter/filterottl/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filterottl + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/filter/filterset/config_test.go b/internal/filter/filterset/config_test.go index 352a6bbc4b8c..6e45aa5fb838 100644 --- a/internal/filter/filterset/config_test.go +++ b/internal/filter/filterset/config_test.go @@ -9,7 +9,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterset/regexp" @@ -21,7 +20,7 @@ func readTestdataConfigYamls(t *testing.T, filename string) map[string]*Config { require.NoError(t, err) cfgs := map[string]*Config{} - require.NoErrorf(t, v.Unmarshal(&cfgs, confmap.WithErrorUnused()), "unable to unmarshal yaml from file %v", testFile) + require.NoErrorf(t, v.Unmarshal(&cfgs), "unable to unmarshal yaml from file %v", testFile) return cfgs } @@ -74,7 +73,7 @@ func TestConfigInvalid(t *testing.T) { assert.Equal(t, expCfg, actualCfg) fs, err := CreateFilterSet([]string{}, actualCfg) - assert.NotNil(t, err) + assert.Error(t, err) assert.Nil(t, fs) }) } diff --git a/internal/filter/filterset/package_test.go b/internal/filter/filterset/package_test.go new file mode 100644 index 000000000000..d23e33f89698 --- /dev/null +++ b/internal/filter/filterset/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filterset + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/filter/filterset/regexp/config_test.go b/internal/filter/filterset/regexp/config_test.go index 204b5abfe89d..4e7f7b8ed29c 100644 --- a/internal/filter/filterset/regexp/config_test.go +++ b/internal/filter/filterset/regexp/config_test.go @@ -9,7 +9,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" ) @@ -19,7 +18,7 @@ func TestConfig(t *testing.T) { require.NoError(t, err) actualConfigs := map[string]*Config{} - require.NoErrorf(t, v.Unmarshal(&actualConfigs, confmap.WithErrorUnused()), + require.NoErrorf(t, v.Unmarshal(&actualConfigs), "unable to unmarshal yaml from file %v", testFile) expectedConfigs := map[string]*Config{ diff --git a/internal/filter/filterset/regexp/package_test.go b/internal/filter/filterset/regexp/package_test.go new file mode 100644 index 000000000000..b9c5f6447860 --- /dev/null +++ b/internal/filter/filterset/regexp/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package regexp + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/filter/filterset/regexp/regexpfilterset.go b/internal/filter/filterset/regexp/regexpfilterset.go index 00f4640f9426..0ab598076830 100644 --- a/internal/filter/filterset/regexp/regexpfilterset.go +++ b/internal/filter/filterset/regexp/regexpfilterset.go @@ -4,9 +4,10 @@ package regexp // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterset/regexp" import ( + "math" "regexp" - "github.com/golang/groupcache/lru" + lru "github.com/hashicorp/golang-lru/v2" ) // FilterSet encapsulates a set of filters and caches match results. @@ -16,9 +17,8 @@ import ( // FilterSet satisfies the FilterSet interface from // "go.opentelemetry.io/collector/internal/processor/filterset" type FilterSet struct { - regexes []*regexp.Regexp - cacheEnabled bool - cache *lru.Cache + regexes []*regexp.Regexp + cache *lru.Cache[string, bool] } // NewFilterSet constructs a FilterSet of re2 regex strings. @@ -28,44 +28,51 @@ func NewFilterSet(filters []string, cfg *Config) (*FilterSet, error) { regexes: make([]*regexp.Regexp, 0, len(filters)), } - if cfg != nil && cfg.CacheEnabled { - fs.cacheEnabled = true - fs.cache = lru.New(cfg.CacheMaxNumEntries) - } - if err := fs.addFilters(filters); err != nil { return nil, err } + if cfg != nil && cfg.CacheEnabled { + // Because of legacy behavior, CacheMaxNumEntries == 0 means unbounded cache. + numEntries := cfg.CacheMaxNumEntries + if numEntries == 0 { + numEntries = math.MaxInt + } + var err error + fs.cache, err = lru.New[string, bool](numEntries) + if err != nil { + return nil, err + } + } + return fs, nil } // Matches returns true if the given string matches any of the FilterSet's filters. // The given string must be fully matched by at least one filter's re2 regex. func (rfs *FilterSet) Matches(toMatch string) bool { - if rfs.cacheEnabled { + if rfs.cache != nil { if v, ok := rfs.cache.Get(toMatch); ok { - return v.(bool) + return v } } for _, r := range rfs.regexes { if r.MatchString(toMatch) { - if rfs.cacheEnabled { + if rfs.cache != nil { rfs.cache.Add(toMatch, true) } return true } } - if rfs.cacheEnabled { + if rfs.cache != nil { rfs.cache.Add(toMatch, false) } return false } // addFilters compiles all the given filters and stores them as regexes. -// All regexes are automatically anchored to enforce full string matches. func (rfs *FilterSet) addFilters(filters []string) error { dedup := make(map[string]struct{}, len(filters)) for _, f := range filters { diff --git a/internal/filter/filterset/regexp/regexpfilterset_test.go b/internal/filter/filterset/regexp/regexpfilterset_test.go index 0f0a9b4f5db0..cfb616430662 100644 --- a/internal/filter/filterset/regexp/regexpfilterset_test.go +++ b/internal/filter/filterset/regexp/regexpfilterset_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) var ( @@ -64,7 +65,7 @@ func TestRegexpMatches(t *testing.T) { fs, err := NewFilterSet(validRegexpFilters, &Config{}) assert.NotNil(t, fs) assert.NoError(t, err) - assert.False(t, fs.cacheEnabled) + assert.Nil(t, fs.cache) matches := []string{ "full/name/match", @@ -105,9 +106,9 @@ func TestRegexpDeDup(t *testing.T) { "prefix/.*", } fs, err := NewFilterSet(dupRegexpFilters, &Config{}) + require.NoError(t, err) assert.NotNil(t, fs) - assert.NoError(t, err) - assert.False(t, fs.cacheEnabled) + assert.Nil(t, fs.cache) assert.EqualValues(t, 1, len(fs.regexes)) } @@ -117,9 +118,9 @@ func TestRegexpMatchesCaches(t *testing.T) { CacheEnabled: true, CacheMaxNumEntries: 0, }) + require.NoError(t, err) assert.NotNil(t, fs) - assert.NoError(t, err) - assert.True(t, fs.cacheEnabled) + assert.NotNil(t, fs.cache) matches := []string{ "full/name/match", @@ -140,7 +141,7 @@ func TestRegexpMatchesCaches(t *testing.T) { assert.True(t, fs.Matches(m)) matched, ok := fs.cache.Get(m) - assert.True(t, matched.(bool) && ok) + assert.True(t, matched && ok) }) } @@ -155,7 +156,7 @@ func TestRegexpMatchesCaches(t *testing.T) { assert.False(t, fs.Matches(m)) matched, ok := fs.cache.Get(m) - assert.True(t, !matched.(bool) && ok) + assert.True(t, !matched && ok) }) } } @@ -166,8 +167,9 @@ func TestWithCacheSize(t *testing.T) { CacheEnabled: true, CacheMaxNumEntries: size, }) + require.NoError(t, err) assert.NotNil(t, fs) - assert.NoError(t, err) + assert.NotNil(t, fs.cache) matches := []string{ "prefix/test/match", diff --git a/internal/filter/filterset/strict/package_test.go b/internal/filter/filterset/strict/package_test.go new file mode 100644 index 000000000000..dcbc3d6221f9 --- /dev/null +++ b/internal/filter/filterset/strict/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package strict + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/filter/filterspan/filterspan_test.go b/internal/filter/filterspan/filterspan_test.go index 393dec134c33..ff04a1d997c3 100644 --- a/internal/filter/filterspan/filterspan_test.go +++ b/internal/filter/filterspan/filterspan_test.go @@ -193,7 +193,7 @@ func TestSpan_MissingServiceName(t *testing.T) { } mp, err := newExpr(cfg) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, mp) emptySpan := ptrace.NewSpan() diff --git a/internal/filter/filterspan/package_test.go b/internal/filter/filterspan/package_test.go new file mode 100644 index 000000000000..85a6f6ecaf2a --- /dev/null +++ b/internal/filter/filterspan/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filterspan + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/filter/go.mod b/internal/filter/go.mod index 665e4656abb7..e531c4311862 100644 --- a/internal/filter/go.mod +++ b/internal/filter/go.mod @@ -1,54 +1,65 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter -go 1.20 +go 1.21 require ( - github.com/antonmedv/expr v1.15.3 - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 + github.com/expr-lang/expr v1.16.3 + github.com/hashicorp/golang-lru/v2 v2.0.7 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/featuregate v1.5.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/alecthomas/participle/v2 v2.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/iancoleman/strcase v0.3.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/internal/filter/go.sum b/internal/filter/go.sum index 3dc88ef2d281..c8748bc94b83 100644 --- a/internal/filter/go.sum +++ b/internal/filter/go.sum @@ -1,33 +1,44 @@ github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= -github.com/alecthomas/participle/v2 v2.1.0 h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4= -github.com/alecthomas/participle/v2 v2.1.0/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= -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/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +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.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/expr-lang/expr v1.16.3 h1:NLldf786GffptcXNxxJx5dQ+FzeWDKChBDqOOwyK8to= +github.com/expr-lang/expr v1.16.3/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -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/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/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/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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -38,14 +49,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -55,57 +66,73 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -118,15 +145,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/k8sconfig/go.mod b/internal/k8sconfig/go.mod index f920d323f5d3..ddae456d6df0 100644 --- a/internal/k8sconfig/go.mod +++ b/internal/k8sconfig/go.mod @@ -1,24 +1,23 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig -go 1.20 +go 1.21 require ( github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 - k8s.io/apimachinery v0.28.3 - k8s.io/client-go v0.28.3 + k8s.io/apimachinery v0.29.3 + k8s.io/client-go v0.29.3 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/go-logr/logr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.4.0 // indirect github.com/imdario/mergo v0.3.11 // indirect @@ -30,23 +29,23 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/openshift/api v3.9.0+incompatible // indirect github.com/spf13/pflag v1.0.5 // indirect - golang.org/x/net v0.18.0 // indirect + golang.org/x/net v0.23.0 // indirect golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.28.3 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect + k8s.io/api v0.29.3 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/internal/k8sconfig/go.sum b/internal/k8sconfig/go.sum index 6d2efbbc46cb..10268b347bd8 100644 --- a/internal/k8sconfig/go.sum +++ b/internal/k8sconfig/go.sum @@ -47,8 +47,8 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -60,9 +60,8 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= @@ -78,6 +77,7 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= 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= @@ -101,9 +101,8 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W 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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= @@ -114,7 +113,7 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw 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.2/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.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= @@ -128,6 +127,7 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -159,6 +159,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -187,10 +188,12 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/openshift/api v0.0.0-20180801171038-322a19404e37 h1:05irGU4HK4IauGGDbsk+ZHrm1wOzMLYjMlfaiqMrBYc= github.com/openshift/api v0.0.0-20180801171038-322a19404e37/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/api v0.0.0-20210521075222-e273a339932a/go.mod h1:izBmoXbUu3z5kUa4FjZhvekTsyzIWiOoaIgJiZBBMQs= @@ -204,6 +207,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -218,7 +222,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ 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.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +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.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -287,8 +292,8 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -329,13 +334,13 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -385,7 +390,8 @@ golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= 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= @@ -442,10 +448,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -474,28 +478,28 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= @@ -503,8 +507,8 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/internal/k8stest/client.go b/internal/k8stest/client.go new file mode 100644 index 000000000000..8481b37d62b9 --- /dev/null +++ b/internal/k8stest/client.go @@ -0,0 +1,46 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package k8stest // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest" + +import ( + "errors" + "fmt" + + "k8s.io/client-go/discovery" + memory "k8s.io/client-go/discovery/cached" + "k8s.io/client-go/dynamic" + "k8s.io/client-go/restmapper" + "k8s.io/client-go/tools/clientcmd" +) + +type K8sClient struct { + DynamicClient *dynamic.DynamicClient + DiscoveryClient *discovery.DiscoveryClient + Mapper *restmapper.DeferredDiscoveryRESTMapper +} + +func NewK8sClient(kubeconfigPath string) (*K8sClient, error) { + + if kubeconfigPath == "" { + return nil, errors.New("Please provide file path to load kubeconfig") + } + restConfig, err := clientcmd.BuildConfigFromFlags("", kubeconfigPath) + if err != nil { + return nil, fmt.Errorf("unable to load kubeconfig from %s: %w", kubeconfigPath, err) + } + + dynamicClient, err := dynamic.NewForConfig(restConfig) + if err != nil { + return nil, fmt.Errorf("error creating dynamic client: %w", err) + } + + discoveryClient, err := discovery.NewDiscoveryClientForConfig(restConfig) + if err != nil { + return nil, fmt.Errorf("error creating discovery client: %w", err) + } + + mapper := restmapper.NewDeferredDiscoveryRESTMapper(memory.NewMemCacheClient(discoveryClient)) + return &K8sClient{ + DynamicClient: dynamicClient, DiscoveryClient: discoveryClient, Mapper: mapper}, nil +} diff --git a/internal/k8stest/go.mod b/internal/k8stest/go.mod index 199b79ca7d27..140086649bae 100644 --- a/internal/k8stest/go.mod +++ b/internal/k8stest/go.mod @@ -1,52 +1,72 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest -go 1.20 +go 1.21 require ( - github.com/docker/docker v24.0.7+incompatible - github.com/stretchr/testify v1.8.4 - k8s.io/apimachinery v0.28.3 - k8s.io/client-go v0.28.3 + github.com/docker/docker v25.0.5+incompatible + github.com/stretchr/testify v1.9.0 + k8s.io/api v0.29.3 + k8s.io/apimachinery v0.29.3 + k8s.io/client-go v0.29.3 ) require ( github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/containerd/log v0.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect + github.com/distribution/reference v0.5.0 // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/imdario/mergo v0.3.6 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/kr/text v0.2.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect + golang.org/x/net v0.23.0 // indirect golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.15.0 // indirect + golang.org/x/tools v0.16.1 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.4.0 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/internal/k8stest/go.sum b/internal/k8stest/go.sum index 69cc7bf3f3b5..88e12dcff96a 100644 --- a/internal/k8stest/go.sum +++ b/internal/k8stest/go.sum @@ -1,50 +1,80 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +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/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= 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.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +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/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go 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/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -55,6 +85,11 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -64,13 +99,38 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE 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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= 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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= 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= @@ -83,22 +143,23 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= 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.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.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-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -111,18 +172,22 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= 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/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM= +google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 h1:6G8oQ016D88m1xAKljMlBOOGWDZkes4kMhgGFlf8WcQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU= +google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= +google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -131,23 +196,26 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/internal/k8stest/k8s_collector.go b/internal/k8stest/k8s_collector.go index ebfe5035b28e..d607fd194e1a 100644 --- a/internal/k8stest/k8s_collector.go +++ b/internal/k8stest/k8s_collector.go @@ -13,14 +13,17 @@ import ( "time" "github.com/stretchr/testify/require" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/dynamic" ) -func CreateCollectorObjects(t *testing.T, client *dynamic.DynamicClient, testID string) []*unstructured.Unstructured { - manifestsDir := filepath.Join(".", "testdata", "e2e", "collector") +func CreateCollectorObjects(t *testing.T, client *K8sClient, testID string, manifestsDir string) []*unstructured.Unstructured { + if manifestsDir == "" { + manifestsDir = filepath.Join(".", "testdata", "e2e", "collector") + } manifestFiles, err := os.ReadDir(manifestsDir) require.NoErrorf(t, err, "failed to read collector manifests directory %s", manifestsDir) host := HostEndpoint(t) @@ -33,10 +36,12 @@ func CreateCollectorObjects(t *testing.T, client *dynamic.DynamicClient, testID require.NoError(t, tmpl.Execute(manifest, map[string]string{ "Name": "otelcol-" + testID, "HostEndpoint": host, + "TestID": testID, })) obj, err := CreateObject(client, manifest.Bytes()) require.NoErrorf(t, err, "failed to create collector object from manifest %s", manifestFile.Name()) - if obj.GetKind() == "Deployment" { + objKind := obj.GetKind() + if objKind == "Deployment" || objKind == "DaemonSet" { podNamespace = obj.GetNamespace() selector := obj.Object["spec"].(map[string]any)["selector"] podLabels = selector.(map[string]any)["matchLabels"].(map[string]any) @@ -49,19 +54,53 @@ func CreateCollectorObjects(t *testing.T, client *dynamic.DynamicClient, testID return createdObjs } -func WaitForCollectorToStart(t *testing.T, client *dynamic.DynamicClient, podNamespace string, podLabels map[string]any) { +func WaitForCollectorToStart(t *testing.T, client *K8sClient, podNamespace string, podLabels map[string]any) { podGVR := schema.GroupVersionResource{Version: "v1", Resource: "pods"} listOptions := metav1.ListOptions{LabelSelector: SelectorFromMap(podLabels).String()} podTimeoutMinutes := 3 - var podPhase string - require.Eventually(t, func() bool { - list, err := client.Resource(podGVR).Namespace(podNamespace).List(context.Background(), listOptions) + t.Logf("waiting for collector pods to be ready") + require.Eventuallyf(t, func() bool { + list, err := client.DynamicClient.Resource(podGVR).Namespace(podNamespace).List(context.Background(), listOptions) require.NoError(t, err, "failed to list collector pods") - if len(list.Items) == 0 { + podsNotReady := len(list.Items) + if podsNotReady == 0 { + t.Log("did not find collector pods") return false } - podPhase = list.Items[0].Object["status"].(map[string]any)["phase"].(string) - return podPhase == "Running" - }, time.Duration(podTimeoutMinutes)*time.Minute, 50*time.Millisecond, - "collector pod haven't started within %d minutes, latest pod phase is %s", podTimeoutMinutes, podPhase) + + var pods v1.PodList + err = runtime.DefaultUnstructuredConverter.FromUnstructured(list.UnstructuredContent(), &pods) + require.NoError(t, err, "failed to convert unstructured to podList") + + for _, pod := range pods.Items { + podReady := false + if pod.Status.Phase != v1.PodRunning { + t.Logf("pod %v is not running, current phase: %v", pod.Name, pod.Status.Phase) + continue + } + for _, cond := range pod.Status.Conditions { + if cond.Type == v1.PodReady && cond.Status == v1.ConditionTrue { + podsNotReady-- + podReady = true + } + } + // Add some debug logs for crashing pods + if !podReady { + for _, cs := range pod.Status.ContainerStatuses { + restartCount := cs.RestartCount + if restartCount > 0 && cs.LastTerminationState.Terminated != nil { + t.Logf("restart count = %d for container %s in pod %s, last terminated reason: %s", restartCount, cs.Name, pod.Name, cs.LastTerminationState.Terminated.Reason) + t.Logf("termination message: %s", cs.LastTerminationState.Terminated.Message) + } + } + } + } + if podsNotReady == 0 { + t.Logf("collector pods are ready") + return true + } + return false + + }, time.Duration(podTimeoutMinutes)*time.Minute, 2*time.Second, + "collector pods were not ready within %d minutes", podTimeoutMinutes) } diff --git a/internal/k8stest/k8s_objects.go b/internal/k8stest/k8s_objects.go index e3e4455e9ba8..bf4b559d0994 100644 --- a/internal/k8stest/k8s_objects.go +++ b/internal/k8stest/k8s_objects.go @@ -5,36 +5,51 @@ package k8stest // import "github.com/open-telemetry/opentelemetry-collector-con import ( "context" - "strings" + "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer/yaml" "k8s.io/client-go/dynamic" ) -func CreateObject(client *dynamic.DynamicClient, manifest []byte) (*unstructured.Unstructured, error) { +func CreateObject(client *K8sClient, manifest []byte) (*unstructured.Unstructured, error) { decoder := yaml.NewDecodingSerializer(unstructured.UnstructuredJSONScheme) obj := &unstructured.Unstructured{} _, gvk, err := decoder.Decode(manifest, nil, obj) if err != nil { return nil, err } - gvr := schema.GroupVersionResource{ - Group: gvk.Group, - Version: gvk.Version, - Resource: strings.ToLower(gvk.Kind + "s"), + gvr, err := client.Mapper.RESTMapping(gvk.GroupKind(), gvk.Version) + if err != nil { + return nil, err + } + var resource dynamic.ResourceInterface + if gvr.Scope.Name() == meta.RESTScopeNameNamespace { + resource = client.DynamicClient.Resource(gvr.Resource).Namespace(obj.GetNamespace()) + } else { + // cluster-scoped resources + resource = client.DynamicClient.Resource(gvr.Resource) } - return client.Resource(gvr).Namespace(obj.GetNamespace()).Create(context.Background(), obj, metav1.CreateOptions{}) + + return resource.Create(context.Background(), obj, metav1.CreateOptions{}) } -func DeleteObject(client *dynamic.DynamicClient, obj *unstructured.Unstructured) error { +func DeleteObject(client *K8sClient, obj *unstructured.Unstructured) error { gvk := obj.GroupVersionKind() - gvr := schema.GroupVersionResource{ - Group: gvk.Group, - Version: gvk.Version, - Resource: strings.ToLower(gvk.Kind + "s"), + gvr, err := client.Mapper.RESTMapping(gvk.GroupKind(), gvk.Version) + if err != nil { + return err + } + var resource dynamic.ResourceInterface + if gvr.Scope.Name() == meta.RESTScopeNameNamespace { + resource = client.DynamicClient.Resource(gvr.Resource).Namespace(obj.GetNamespace()) + } else { + // cluster-scoped resources + resource = client.DynamicClient.Resource(gvr.Resource) } - return client.Resource(gvr).Namespace(obj.GetNamespace()).Delete(context.Background(), obj.GetName(), metav1.DeleteOptions{}) + deletePolicy := metav1.DeletePropagationForeground + return resource.Delete(context.Background(), obj.GetName(), metav1.DeleteOptions{ + PropagationPolicy: &deletePolicy, + }) } diff --git a/internal/k8stest/k8s_telemetrygen.go b/internal/k8stest/k8s_telemetrygen.go index e9aed1a856e0..c620d499a333 100644 --- a/internal/k8stest/k8s_telemetrygen.go +++ b/internal/k8stest/k8s_telemetrygen.go @@ -16,7 +16,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/dynamic" ) type TelemetrygenObjInfo struct { @@ -26,26 +25,33 @@ type TelemetrygenObjInfo struct { Workload string } -func CreateTelemetryGenObjects(t *testing.T, client *dynamic.DynamicClient, testID string) ([]*unstructured.Unstructured, []*TelemetrygenObjInfo) { +type TelemetrygenCreateOpts struct { + TestID string + ManifestsDir string + OtlpEndpoint string + DataTypes []string +} + +func CreateTelemetryGenObjects(t *testing.T, client *K8sClient, createOpts *TelemetrygenCreateOpts) ([]*unstructured.Unstructured, []*TelemetrygenObjInfo) { telemetrygenObjInfos := make([]*TelemetrygenObjInfo, 0) - manifestsDir := filepath.Join(".", "testdata", "e2e", "telemetrygen") - manifestFiles, err := os.ReadDir(manifestsDir) - require.NoErrorf(t, err, "failed to read telemetrygen manifests directory %s", manifestsDir) + manifestFiles, err := os.ReadDir(createOpts.ManifestsDir) + require.NoErrorf(t, err, "failed to read telemetrygen manifests directory %s", createOpts.ManifestsDir) createdObjs := make([]*unstructured.Unstructured, 0, len(manifestFiles)) for _, manifestFile := range manifestFiles { - tmpl := template.Must(template.New(manifestFile.Name()).ParseFiles(filepath.Join(manifestsDir, manifestFile.Name()))) - for _, dataType := range []string{"metrics", "logs", "traces"} { + tmpl := template.Must(template.New(manifestFile.Name()).ParseFiles(filepath.Join(createOpts.ManifestsDir, manifestFile.Name()))) + for _, dataType := range createOpts.DataTypes { manifest := &bytes.Buffer{} require.NoError(t, tmpl.Execute(manifest, map[string]string{ - "Name": "telemetrygen-" + testID, + "Name": "telemetrygen-" + createOpts.TestID, "DataType": dataType, - "OTLPEndpoint": "otelcol-" + testID + ":4317", + "OTLPEndpoint": createOpts.OtlpEndpoint, + "TestID": createOpts.TestID, })) obj, err := CreateObject(client, manifest.Bytes()) require.NoErrorf(t, err, "failed to create telemetrygen object from manifest %s", manifestFile.Name()) selector := obj.Object["spec"].(map[string]any)["selector"] telemetrygenObjInfos = append(telemetrygenObjInfos, &TelemetrygenObjInfo{ - Namespace: "default", + Namespace: obj.GetNamespace(), PodLabelSelectors: selector.(map[string]any)["matchLabels"].(map[string]any), DataType: dataType, Workload: obj.GetKind(), @@ -56,13 +62,13 @@ func CreateTelemetryGenObjects(t *testing.T, client *dynamic.DynamicClient, test return createdObjs, telemetrygenObjInfos } -func WaitForTelemetryGenToStart(t *testing.T, client *dynamic.DynamicClient, podNamespace string, podLabels map[string]any, workload, dataType string) { +func WaitForTelemetryGenToStart(t *testing.T, client *K8sClient, podNamespace string, podLabels map[string]any, workload, dataType string) { podGVR := schema.GroupVersionResource{Version: "v1", Resource: "pods"} listOptions := metav1.ListOptions{LabelSelector: SelectorFromMap(podLabels).String()} podTimeoutMinutes := 3 var podPhase string require.Eventually(t, func() bool { - list, err := client.Resource(podGVR).Namespace(podNamespace).List(context.Background(), listOptions) + list, err := client.DynamicClient.Resource(podGVR).Namespace(podNamespace).List(context.Background(), listOptions) require.NoError(t, err, "failed to list collector pods") if len(list.Items) == 0 { return false diff --git a/internal/kafka/authentication.go b/internal/kafka/authentication.go index 835244fc10dc..a05edc6486c5 100644 --- a/internal/kafka/authentication.go +++ b/internal/kafka/authentication.go @@ -16,10 +16,10 @@ import ( // Authentication defines authentication. type Authentication struct { - PlainText *PlainTextConfig `mapstructure:"plain_text"` - SASL *SASLConfig `mapstructure:"sasl"` - TLS *configtls.TLSClientSetting `mapstructure:"tls"` - Kerberos *KerberosConfig `mapstructure:"kerberos"` + PlainText *PlainTextConfig `mapstructure:"plain_text"` + SASL *SASLConfig `mapstructure:"sasl"` + TLS *configtls.ClientConfig `mapstructure:"tls"` + Kerberos *KerberosConfig `mapstructure:"kerberos"` } // PlainTextConfig defines plaintext authentication. @@ -134,7 +134,7 @@ func configureSASL(config SASLConfig, saramaConfig *sarama.Config) error { return nil } -func configureTLS(config configtls.TLSClientSetting, saramaConfig *sarama.Config) error { +func configureTLS(config configtls.ClientConfig, saramaConfig *sarama.Config) error { tlsConfig, err := config.LoadTLSConfig() if err != nil { return fmt.Errorf("error loading tls config: %w", err) diff --git a/internal/kafka/authentication_test.go b/internal/kafka/authentication_test.go index 071a7ec8bf18..8761115290b8 100644 --- a/internal/kafka/authentication_test.go +++ b/internal/kafka/authentication_test.go @@ -46,7 +46,7 @@ func TestAuthentication(t *testing.T) { saramaTLSCfg := &sarama.Config{} saramaTLSCfg.Net.TLS.Enable = true - tlsClient := configtls.TLSClientSetting{} + tlsClient := configtls.ClientConfig{} tlscfg, err := tlsClient.LoadTLSConfig() require.NoError(t, err) saramaTLSCfg.Net.TLS.Config = tlscfg @@ -73,12 +73,12 @@ func TestAuthentication(t *testing.T) { saramaConfig: saramaPlaintext, }, { - auth: Authentication{TLS: &configtls.TLSClientSetting{}}, + auth: Authentication{TLS: &configtls.ClientConfig{}}, saramaConfig: saramaTLSCfg, }, { - auth: Authentication{TLS: &configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{CAFile: "/doesnotexists"}, + auth: Authentication{TLS: &configtls.ClientConfig{ + Config: configtls.Config{CAFile: "/doesnotexists"}, }}, saramaConfig: saramaTLSCfg, err: "failed to load TLS config", diff --git a/internal/kafka/awsmsk/package_test.go b/internal/kafka/awsmsk/package_test.go new file mode 100644 index 000000000000..5fe616a210ff --- /dev/null +++ b/internal/kafka/awsmsk/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package awsmsk + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/kafka/go.mod b/internal/kafka/go.mod index f9a818e76bdc..50e88ee289b6 100644 --- a/internal/kafka/go.mod +++ b/internal/kafka/go.mod @@ -1,19 +1,20 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka -go 1.20 +go 1.21 require ( - github.com/IBM/sarama v1.42.1 - github.com/aws/aws-sdk-go v1.47.10 - github.com/stretchr/testify v1.8.4 + github.com/IBM/sarama v1.43.1 + github.com/aws/aws-sdk-go v1.51.17 + github.com/stretchr/testify v1.9.0 github.com/xdg-go/scram v1.1.2 - go.opentelemetry.io/collector/config/configtls v0.89.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 ) require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/eapache/go-resiliency v1.4.0 // indirect + github.com/eapache/go-resiliency v1.6.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect github.com/eapache/queue v1.1.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -27,16 +28,16 @@ require ( 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/klauspost/compress v1.17.2 // indirect - github.com/pierrec/lz4/v4 v4.1.18 // indirect + github.com/klauspost/compress v1.17.7 // indirect + github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/internal/kafka/go.sum b/internal/kafka/go.sum index 3e3ce8a2b45b..ca3eb7249841 100644 --- a/internal/kafka/go.sum +++ b/internal/kafka/go.sum @@ -1,20 +1,23 @@ -github.com/IBM/sarama v1.42.1 h1:wugyWa15TDEHh2kvq2gAy1IHLjEjuYOYgXz/ruC/OSQ= -github.com/IBM/sarama v1.42.1/go.mod h1:Xxho9HkHd4K/MDUo/T/sOqwtX/17D33++E9Wib6hUdQ= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/IBM/sarama v1.43.1 h1:Z5uz65Px7f4DhI/jQqEm/tV9t8aU+JUdTyW/K/fCXpA= +github.com/IBM/sarama v1.43.1/go.mod h1:GG5q1RURtDNPz8xxJs3mgX6Ytak8Z9eLhAkJPObe2xE= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/eapache/go-resiliency v1.4.0 h1:3OK9bWpPk5q6pbFAaYSEwD9CLUSHG8bnZuqX2yMt3B0= -github.com/eapache/go-resiliency v1.4.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= +github.com/eapache/go-resiliency v1.6.0 h1:CqGDTLtpwuWKn6Nj3uNUdflaq+/kIPsg0gfNzHton30= +github.com/eapache/go-resiliency v1.6.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4ALJ04o5Qqpdz8XLIpNA3WM/iSIXqxtqo7UGVws= github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= 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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= @@ -43,18 +46,31 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y 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/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= +github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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= @@ -62,8 +78,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= @@ -71,17 +87,23 @@ github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3k github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 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.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 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= @@ -89,19 +111,20 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/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.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +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-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-20220520151302-bc2c85ada10a/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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -118,6 +141,7 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/kafka/package_test.go b/internal/kafka/package_test.go new file mode 100644 index 000000000000..e8ca648b7e08 --- /dev/null +++ b/internal/kafka/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package kafka + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/kubelet/client.go b/internal/kubelet/client.go index 6d00e74ef320..93f234706109 100644 --- a/internal/kubelet/client.go +++ b/internal/kubelet/client.go @@ -12,17 +12,24 @@ import ( "net/url" "os" "path/filepath" + "runtime" "strings" "go.uber.org/zap" "k8s.io/client-go/rest" "k8s.io/client-go/transport" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/sanitize" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig" ) +const ( + OperatingSystemWindows = "windows" + RunInContainer = "RUN_IN_CONTAINER" + TrueValue = "True" + RunAsHostProcessContainer = "RUN_AS_HOST_PROCESS_CONTAINER" +) + var ( svcAcctCACertPath = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" svcAcctTokenPath = "/var/run/secrets/kubernetes.io/serviceaccount/token" // #nosec @@ -38,12 +45,21 @@ func updateSVCPath() { // This is known that k8s token and cert file as available with CONTAINER_SANDBOX_MOUNT_POINT in path. // https://kubernetes.io/docs/tasks/configure-pod-container/create-hostprocess-pod/#containerd-v1-6 // todo: Remove this workaround func when Windows AMIs has containerd 1.7 which solves upstream bug - if containerinsight.IsWindowsHostProcessContainer() { + if isWindowsHostProcessContainer() { svcAcctCACertPath = filepath.Join(os.Getenv("CONTAINER_SANDBOX_MOUNT_POINT"), svcAcctCACertPath) svcAcctTokenPath = filepath.Join(os.Getenv("CONTAINER_SANDBOX_MOUNT_POINT"), svcAcctTokenPath) } } +func isWindowsHostProcessContainer() bool { + // todo: Remove this workaround func when Windows AMIs has containerd 1.7 which solves upstream bug + // https://kubernetes.io/docs/tasks/configure-pod-container/create-hostprocess-pod/#containerd-v1-6 + if runtime.GOOS == OperatingSystemWindows && os.Getenv(RunInContainer) == TrueValue && os.Getenv(RunAsHostProcessContainer) == TrueValue { + return true + } + return false +} + type Client interface { Get(path string) ([]byte, error) } diff --git a/internal/kubelet/client_config.go b/internal/kubelet/client_config.go index ff8c86f2c8cb..91eb85267d68 100644 --- a/internal/kubelet/client_config.go +++ b/internal/kubelet/client_config.go @@ -11,8 +11,8 @@ import ( // ClientConfig for a kubelet client for talking to a kubelet HTTP endpoint. type ClientConfig struct { - k8sconfig.APIConfig `mapstructure:",squash"` - configtls.TLSSetting `mapstructure:",squash"` + k8sconfig.APIConfig `mapstructure:",squash"` + configtls.Config `mapstructure:",squash"` // InsecureSkipVerify controls whether the client verifies the server's // certificate chain and host name. InsecureSkipVerify bool `mapstructure:"insecure_skip_verify"` diff --git a/internal/kubelet/client_test.go b/internal/kubelet/client_test.go index d9fa5f6547f6..0e8ce71caab2 100644 --- a/internal/kubelet/client_test.go +++ b/internal/kubelet/client_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !windows -// +build !windows // TODO review if tests should succeed on Windows @@ -56,7 +55,7 @@ func TestNewTLSClientProvider(t *testing.T) { APIConfig: k8sconfig.APIConfig{ AuthType: k8sconfig.AuthTypeTLS, }, - TLSSetting: configtls.TLSSetting{ + Config: configtls.Config{ CAFile: certPath, CertFile: certPath, KeyFile: keyFile, @@ -131,7 +130,7 @@ func TestSvcAcctClient(t *testing.T) { } func TestSAClientBadTLS(t *testing.T) { - server := httptest.NewUnstartedServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { + server := httptest.NewUnstartedServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) { _, _ = rw.Write([]byte(`OK`)) })) cert, err := tls.LoadX509KeyPair(certPath, keyFile) @@ -279,7 +278,7 @@ func TestTLSMissingCertFile(t *testing.T) { p := tlsClientProvider{ endpoint: "", cfg: &ClientConfig{ - TLSSetting: configtls.TLSSetting{ + Config: configtls.Config{ CAFile: certPath, }, }, diff --git a/internal/kubelet/go.mod b/internal/kubelet/go.mod index 5ebcbd19a428..abbd1df09594 100644 --- a/internal/kubelet/go.mod +++ b/internal/kubelet/go.mod @@ -1,31 +1,31 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.uber.org/zap v1.26.0 - k8s.io/client-go v0.28.3 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + k8s.io/client-go v0.29.3 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/imdario/mergo v0.3.11 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -37,29 +37,29 @@ require ( github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.4.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.28.3 // indirect - k8s.io/apimachinery v0.28.3 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect + k8s.io/api v0.29.3 // indirect + k8s.io/apimachinery v0.29.3 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/internal/kubelet/go.sum b/internal/kubelet/go.sum index 86eff42702a5..7bddee09ccd2 100644 --- a/internal/kubelet/go.sum +++ b/internal/kubelet/go.sum @@ -47,8 +47,8 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -62,9 +62,8 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= @@ -80,6 +79,9 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -104,8 +106,9 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq 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/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= @@ -117,6 +120,7 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/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= @@ -130,11 +134,12 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= @@ -157,10 +162,17 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -171,7 +183,11 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +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.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/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= @@ -189,10 +205,12 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/openshift/api v0.0.0-20180801171038-322a19404e37 h1:05irGU4HK4IauGGDbsk+ZHrm1wOzMLYjMlfaiqMrBYc= github.com/openshift/api v0.0.0-20180801171038-322a19404e37/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/api v0.0.0-20210521075222-e273a339932a/go.mod h1:izBmoXbUu3z5kUa4FjZhvekTsyzIWiOoaIgJiZBBMQs= @@ -206,6 +224,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -220,25 +239,29 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -247,6 +270,7 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -278,6 +302,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB 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.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -301,15 +326,17 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -317,6 +344,7 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ 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/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -343,19 +371,25 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/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-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= 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/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -399,7 +433,9 @@ golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= 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= @@ -419,8 +455,8 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -440,8 +476,8 @@ google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -449,8 +485,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -462,8 +498,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -492,28 +528,28 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= @@ -521,8 +557,8 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/internal/kubelet/package_test.go b/internal/kubelet/package_test.go new file mode 100644 index 000000000000..09546bfd4d9a --- /dev/null +++ b/internal/kubelet/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package kubelet + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/metadataproviders/azure/metadata_test.go b/internal/metadataproviders/azure/metadata_test.go index 87f414f7168d..6f674c9c4dcc 100644 --- a/internal/metadataproviders/azure/metadata_test.go +++ b/internal/metadataproviders/azure/metadata_test.go @@ -34,7 +34,7 @@ func TestQueryEndpointFailed(t *testing.T) { } func TestQueryEndpointMalformed(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, err := fmt.Fprintln(w, "{") assert.NoError(t, err) })) @@ -61,7 +61,7 @@ func TestQueryEndpointCorrect(t *testing.T) { marshalledMetadata, err := json.Marshal(sentMetadata) require.NoError(t, err) - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, err = w.Write(marshalledMetadata) assert.NoError(t, err) })) diff --git a/internal/metadataproviders/consul/package_test.go b/internal/metadataproviders/consul/package_test.go new file mode 100644 index 000000000000..098afe39aad3 --- /dev/null +++ b/internal/metadataproviders/consul/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package consul + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/metadataproviders/docker/metadata_test.go b/internal/metadataproviders/docker/metadata_test.go index 43a036349bc5..ab0fbcba5507 100644 --- a/internal/metadataproviders/docker/metadata_test.go +++ b/internal/metadataproviders/docker/metadata_test.go @@ -21,7 +21,7 @@ func TestDockerError(t *testing.T) { } func TestDocker(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { fmt.Fprintln(w, `{ "OSType":"linux", "Name":"hostname" diff --git a/internal/metadataproviders/docker/package_test.go b/internal/metadataproviders/docker/package_test.go new file mode 100644 index 000000000000..0ebd6a327e31 --- /dev/null +++ b/internal/metadataproviders/docker/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package docker + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/metadataproviders/go.mod b/internal/metadataproviders/go.mod index ff883b139707..e66d4025fa74 100644 --- a/internal/metadataproviders/go.mod +++ b/internal/metadataproviders/go.mod @@ -1,47 +1,51 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders -go 1.20 +go 1.21 require ( github.com/Showmax/go-fqdn v1.0.0 - github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-00010101000000-000000000000 - github.com/aws/aws-sdk-go v1.47.10 - github.com/docker/docker v24.0.7+incompatible - github.com/hashicorp/consul/api v1.25.1 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/semconv v0.89.0 - go.opentelemetry.io/otel v1.20.0 - go.opentelemetry.io/otel/sdk v1.20.0 - k8s.io/api v0.28.3 - k8s.io/apimachinery v0.28.3 - k8s.io/client-go v0.28.3 + github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20240415183253-230331014d2c + github.com/aws/aws-sdk-go v1.51.17 + github.com/docker/docker v25.0.5+incompatible + github.com/hashicorp/consul/api v1.28.2 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel v1.24.0 + go.opentelemetry.io/otel/sdk v1.24.0 + go.uber.org/goleak v1.3.0 + k8s.io/api v0.29.3 + k8s.io/apimachinery v0.29.3 + k8s.io/client-go v0.29.3 ) require ( github.com/Microsoft/go-winio v0.5.2 // indirect github.com/armon/go-metrics v0.4.1 // indirect + github.com/containerd/log v0.1.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect + github.com/distribution/reference v0.5.0 // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/fatih/color v1.14.1 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/serf v0.10.1 // indirect @@ -66,30 +70,35 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/objx v0.5.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect + golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.4.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.2.0 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/internal/metadataproviders/go.sum b/internal/metadataproviders/go.sum index 365ba3d72b1c..62d6c4bd8f22 100644 --- a/internal/metadataproviders/go.sum +++ b/internal/metadataproviders/go.sum @@ -51,13 +51,16 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= -github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.51.17 h1:Cfa40lCdjv9OxC3X1Ks3a6O1Tu3gOANSyKHOSw/zuWU= +github.com/aws/aws-sdk-go v1.51.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/cenkalti/backoff/v4 v4.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.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -66,16 +69,18 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -84,8 +89,8 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -96,6 +101,8 @@ github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -108,10 +115,10 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= @@ -130,6 +137,7 @@ github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -155,11 +163,13 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq 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/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -169,6 +179,7 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/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= @@ -182,21 +193,26 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= -github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= -github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/hashicorp/consul/api v1.28.2 h1:mXfkRHrpHN4YY3RqL09nXU1eHKLNiuAN4kHvDQ16k/8= +github.com/hashicorp/consul/api v1.28.2/go.mod h1:KyzqzgMEya+IZPcD65YFoOVAgPpbfERu4I/tzG6/ueE= +github.com/hashicorp/consul/sdk v0.16.0 h1:SE9m0W6DEfgIVCJX7xU+iv/hUl4m/nxqMTnCdMxDpJ8= +github.com/hashicorp/consul/sdk v0.16.0/go.mod h1:7pxqqhqoaPqnBnzXD1StKed62LqJeClzVsUEy85Zr0A= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= @@ -207,19 +223,24 @@ github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= @@ -257,6 +278,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -315,10 +337,12 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -356,12 +380,15 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -371,8 +398,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -381,28 +409,38 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= 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= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= @@ -417,6 +455,7 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -427,8 +466,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -450,6 +489,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB 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.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -477,15 +517,16 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -494,6 +535,7 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -531,19 +573,23 @@ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/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-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/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-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -551,6 +597,8 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -596,7 +644,9 @@ golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= 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= @@ -616,8 +666,8 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -637,6 +687,10 @@ google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -644,6 +698,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -655,8 +711,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -690,28 +746,28 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= @@ -719,8 +775,8 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/internal/metadataproviders/internal/package_test.go b/internal/metadataproviders/internal/package_test.go new file mode 100644 index 000000000000..4486cdb28aa6 --- /dev/null +++ b/internal/metadataproviders/internal/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/metadataproviders/k8snode/package_test.go b/internal/metadataproviders/k8snode/package_test.go new file mode 100644 index 000000000000..961bc2afda52 --- /dev/null +++ b/internal/metadataproviders/k8snode/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package k8snode + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/metadataproviders/openshift/metadata_test.go b/internal/metadataproviders/openshift/metadata_test.go index 300412e7398e..d0996df05ba7 100644 --- a/internal/metadataproviders/openshift/metadata_test.go +++ b/internal/metadataproviders/openshift/metadata_test.go @@ -42,7 +42,7 @@ func TestQueryEndpointFailed(t *testing.T) { } func TestQueryEndpointMalformed(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, err := fmt.Fprintln(w, "{") assert.NoError(t, err) })) @@ -59,7 +59,7 @@ func TestQueryEndpointMalformed(t *testing.T) { } func TestQueryEndpointCorrectK8SClusterVersion(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, err := fmt.Fprintf(w, `{ "major": "1", "minor": "21", @@ -88,7 +88,7 @@ func TestQueryEndpointCorrectK8SClusterVersion(t *testing.T) { } func TestQueryEndpointCorrectOpenShiftClusterVersion(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, err := fmt.Fprintf(w, `{ "apiVersion": "config.openshift.io/v1", "kind": "ClusterVersion", @@ -113,7 +113,7 @@ func TestQueryEndpointCorrectOpenShiftClusterVersion(t *testing.T) { } func TestQueryEndpointCorrectInfrastructureAWS(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, err := fmt.Fprintf(w, `{ "apiVersion": "config.openshift.io/v1", "kind": "Infrastructure", @@ -158,7 +158,7 @@ func TestQueryEndpointCorrectInfrastructureAWS(t *testing.T) { } func TestQueryEndpointCorrectInfrastructureAzure(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, err := fmt.Fprintf(w, `{ "apiVersion": "config.openshift.io/v1", "kind": "Infrastructure", @@ -203,7 +203,7 @@ func TestQueryEndpointCorrectInfrastructureAzure(t *testing.T) { } func TestQueryEndpointCorrectInfrastructureGCP(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, err := fmt.Fprintf(w, `{ "apiVersion": "config.openshift.io/v1", "kind": "Infrastructure", @@ -246,7 +246,7 @@ func TestQueryEndpointCorrectInfrastructureGCP(t *testing.T) { } func TestQueryEndpointCorrectInfrastructureIBMCloud(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, err := fmt.Fprintf(w, `{ "apiVersion": "config.openshift.io/v1", "kind": "Infrastructure", @@ -289,7 +289,7 @@ func TestQueryEndpointCorrectInfrastructureIBMCloud(t *testing.T) { } func TestQueryEndpointCorrectInfrastructureOpenstack(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, err := fmt.Fprintf(w, `{ "apiVersion": "config.openshift.io/v1", "kind": "Infrastructure", diff --git a/internal/metadataproviders/openshift/package_test.go b/internal/metadataproviders/openshift/package_test.go new file mode 100644 index 000000000000..5770991c7b18 --- /dev/null +++ b/internal/metadataproviders/openshift/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package openshift + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/metadataproviders/system/metadata.go b/internal/metadataproviders/system/metadata.go index 284b85b32255..116ba76d9bf6 100644 --- a/internal/metadataproviders/system/metadata.go +++ b/internal/metadataproviders/system/metadata.go @@ -63,6 +63,12 @@ type Provider interface { // HostArch returns the host architecture HostArch() (string, error) + + // HostIPs returns the host's IP interfaces + HostIPs() ([]net.IP, error) + + // HostMACs returns the host's MAC addresses + HostMACs() ([]net.HardwareAddr, error) } type systemMetadataProvider struct { @@ -159,3 +165,54 @@ func (p systemMetadataProvider) OSDescription(ctx context.Context) (string, erro func (systemMetadataProvider) HostArch() (string, error) { return internal.GOARCHtoHostArch(runtime.GOARCH), nil } + +func (p systemMetadataProvider) HostIPs() (ips []net.IP, err error) { + ifaces, err := net.Interfaces() + if err != nil { + return nil, err + } + + for _, iface := range ifaces { + // skip if the interface is down or is a loopback interface + if iface.Flags&net.FlagUp == 0 || iface.Flags&net.FlagLoopback != 0 { + continue + } + + addrs, errAddr := iface.Addrs() + if errAddr != nil { + return nil, fmt.Errorf("failed to get addresses for interface %v: %w", iface, errAddr) + } + for _, addr := range addrs { + ip, _, parseErr := net.ParseCIDR(addr.String()) + if parseErr != nil { + return nil, fmt.Errorf("failed to parse address %q from interface %v: %w", addr, iface, parseErr) + } + + if ip.IsLoopback() { + // skip loopback IPs + continue + } + + ips = append(ips, ip) + } + + } + return ips, err +} + +func (p systemMetadataProvider) HostMACs() (macs []net.HardwareAddr, err error) { + ifaces, err := net.Interfaces() + if err != nil { + return nil, err + } + + for _, iface := range ifaces { + // skip if the interface is down or is a loopback interface + if iface.Flags&net.FlagUp == 0 || iface.Flags&net.FlagLoopback != 0 { + continue + } + + macs = append(macs, iface.HardwareAddr) + } + return macs, err +} diff --git a/internal/metadataproviders/system/metadata_test.go b/internal/metadataproviders/system/metadata_test.go index 559304f99601..af9d4aea46c0 100644 --- a/internal/metadataproviders/system/metadata_test.go +++ b/internal/metadataproviders/system/metadata_test.go @@ -76,7 +76,7 @@ func TestHostID(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { p := fakeLinuxSystemMetadataProvider() - p.newResource = func(ctx context.Context, o ...resource.Option) (*resource.Resource, error) { + p.newResource = func(_ context.Context, _ ...resource.Option) (*resource.Resource, error) { if tt.resValue == "" { return resource.NewSchemaless(), tt.resError } @@ -119,13 +119,13 @@ func fakeLinuxNameInfoProvider() nameInfoProvider { osHostname: func() (string, error) { return "my-linux-vm", nil }, - lookupCNAME: func(s string) (string, error) { + lookupCNAME: func(_ string) (string, error) { return "my-linux-vm.abcdefghijklmnopqrstuvwxyz.xx.internal.foo.net.", nil }, - lookupHost: func(s string) ([]string, error) { + lookupHost: func(_ string) ([]string, error) { return []string{"172.24.0.4"}, nil }, - lookupAddr: func(s string) ([]string, error) { + lookupAddr: func(_ string) ([]string, error) { return []string{"my-linux-vm.internal.foo.net."}, nil }, } @@ -137,10 +137,10 @@ func fakeWindowsNameInfoProvider() nameInfoProvider { osHostname: func() (string, error) { return "my-windows-vm", nil }, - lookupCNAME: func(s string) (string, error) { + lookupCNAME: func(_ string) (string, error) { return fqdn, nil }, - lookupHost: func(s string) ([]string, error) { + lookupHost: func(_ string) ([]string, error) { return []string{"ffff::0000:1111:2222:3333%Ethernet", "1.2.3.4"}, nil }, lookupAddr: func(s string) ([]string, error) { diff --git a/internal/metadataproviders/system/package_test.go b/internal/metadataproviders/system/package_test.go new file mode 100644 index 000000000000..641255b7bf5e --- /dev/null +++ b/internal/metadataproviders/system/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package system + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/sharedcomponent/go.mod b/internal/sharedcomponent/go.mod index 9295f8ec9fe7..97cf0b57410e 100644 --- a/internal/sharedcomponent/go.mod +++ b/internal/sharedcomponent/go.mod @@ -1,39 +1,49 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.uber.org/goleak v1.3.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.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/internal/sharedcomponent/go.sum b/internal/sharedcomponent/go.sum index b769d6cbde95..a599b4238628 100644 --- a/internal/sharedcomponent/go.sum +++ b/internal/sharedcomponent/go.sum @@ -1,7 +1,16 @@ +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/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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -9,52 +18,65 @@ 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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -64,16 +86,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -86,15 +108,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/sharedcomponent/package_test.go b/internal/sharedcomponent/package_test.go new file mode 100644 index 000000000000..424f48bf6d6e --- /dev/null +++ b/internal/sharedcomponent/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sharedcomponent + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/sharedcomponent/sharedcomponent_test.go b/internal/sharedcomponent/sharedcomponent_test.go index 9673eb20217b..dad4886c1766 100644 --- a/internal/sharedcomponent/sharedcomponent_test.go +++ b/internal/sharedcomponent/sharedcomponent_test.go @@ -13,7 +13,7 @@ import ( "go.opentelemetry.io/collector/component/componenttest" ) -var id = component.NewID("test") +var id = component.MustNewID("test") func TestNewSharedComponents(t *testing.T) { comps := NewSharedComponents() @@ -46,11 +46,11 @@ func TestSharedComponent(t *testing.T) { calledStart := 0 calledStop := 0 comp := &mockComponent{ - StartFunc: func(ctx context.Context, host component.Host) error { + StartFunc: func(_ context.Context, _ component.Host) error { calledStart++ return wantErr }, - ShutdownFunc: func(ctx context.Context) error { + ShutdownFunc: func(_ context.Context) error { calledStop++ return wantErr }, diff --git a/internal/splunk/go.mod b/internal/splunk/go.mod index b17a6fa3f498..55ac5c7b94bd 100644 --- a/internal/splunk/go.mod +++ b/internal/splunk/go.mod @@ -1,49 +1,48 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/component v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/component v0.98.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/internal/splunk/go.sum b/internal/splunk/go.sum index 3b284bfc7eca..3a5a6396075d 100644 --- a/internal/splunk/go.sum +++ b/internal/splunk/go.sum @@ -1,54 +1,29 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -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/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -57,15 +32,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -75,102 +49,88 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configretry v0.98.0 h1:gZRenX9oMLJmQ/CD8YwFNl9YYl68RtcD0RYSCJhrMAk= +go.opentelemetry.io/collector/config/configretry v0.98.0/go.mod h1:uRdmPeCkrW9Zsadh2WEbQ1AGXGYJ02vCfmmT+0g69nY= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -178,38 +138,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/internal/splunk/package_test.go b/internal/splunk/package_test.go new file mode 100644 index 000000000000..34d6ece65021 --- /dev/null +++ b/internal/splunk/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package splunk + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + 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..c679d81db4d7 --- /dev/null +++ b/internal/sqlquery/config.go @@ -0,0 +1,177 @@ +// 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" +) + +type Config struct { + scraperhelper.ControllerConfig `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 = append(errs, errors.New("'query.sql' cannot be empty")) + } + if len(q.Logs) == 0 && len(q.Metrics) == 0 { + errs = 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 = append(errs, err) + } + } + for _, metric := range q.Metrics { + if err := metric.Validate(); err != nil { + errs = append(errs, err) + } + } + return errors.Join(errs...) +} + +type LogsCfg struct { + BodyColumn string `mapstructure:"body_column"` +} + +func (config LogsCfg) Validate() error { + var errs []error + if config.BodyColumn == "" { + errs = append(errs, errors.New("'body_column' must not be empty")) + } + return errors.Join(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 = append(errs, errors.New("'metric_name' cannot be empty")) + } + if c.ValueColumn == "" { + errs = append(errs, errors.New("'value_column' cannot be empty")) + } + if err := c.ValueType.Validate(); err != nil { + errs = append(errs, err) + } + if err := c.DataType.Validate(); err != nil { + errs = append(errs, err) + } + if err := c.Aggregation.Validate(); err != nil { + errs = append(errs, err) + } + if c.DataType == MetricTypeGauge && c.Aggregation != "" { + errs = append(errs, fmt.Errorf("aggregation=%s but data_type=%s does not support aggregation", c.Aggregation, c.DataType)) + } + if errs != nil && c.MetricName != "" { + errs = append(errs, fmt.Errorf("invalid metric config with metric_name '%s'", c.MetricName)) + } + return errors.Join(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..e702a6b82923 --- /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" + "errors" + + // 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/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 = append(warnings, scanErr) + } + out = append(out, sm) + } + return out, errors.Join(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/internal/sqlquery/db_client_test.go b/internal/sqlquery/db_client_test.go new file mode 100644 index 000000000000..4546886b0ec0 --- /dev/null +++ b/internal/sqlquery/db_client_test.go @@ -0,0 +1,151 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sqlquery // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" + +import ( + "context" + "errors" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/zap" +) + +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: "", + } + rows, err := cl.QueryRows(context.Background()) + require.NoError(t, err) + assert.Len(t, rows, 1) + assert.EqualValues(t, map[string]string{ + "col_0": "42", + "col_1": "123.4", + "col_2": "hello", + "col_3": "true", + "col_4": "4.1", + }, rows[0]) +} + +func TestDBSQLClient_MultiRow(t *testing.T) { + 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: "", + } + rows, err := cl.QueryRows(context.Background()) + require.NoError(t, err) + assert.Len(t, rows, 2) + assert.EqualValues(t, map[string]string{ + "col_0": "42", + "col_1": "123.4", + "col_2": "hello", + "col_3": "true", + "col_4": "4.1", + }, rows[0]) + assert.EqualValues(t, map[string]string{ + "col_0": "43", + "col_1": "123.5", + "col_2": "goodbye", + "col_3": "false", + "col_4": "4.2", + }, rows[1]) +} + +func TestDBSQLClient_Nulls(t *testing.T) { + cl := DbSQLClient{ + Db: fakeDB{rowVals: [][]any{ + {42, nil, 111}, // NULLs from the DB map to nil here + }}, + Logger: zap.NewNop(), + SQL: "", + } + rows, err := cl.QueryRows(context.Background()) + assert.Error(t, err) + assert.True(t, errors.Is(err, errNullValueWarning)) + assert.Len(t, rows, 1) + assert.EqualValues(t, map[string]string{ + "col_0": "42", + "col_2": "111", + }, rows[0]) +} + +func TestDBSQLClient_Nulls_MultiRow(t *testing.T) { + cl := DbSQLClient{ + Db: fakeDB{rowVals: [][]any{ + {42, nil}, + {43, nil}, + }}, + Logger: zap.NewNop(), + SQL: "", + } + rows, err := cl.QueryRows(context.Background()) + assert.Error(t, err) + + var e interface{ Unwrap() []error } + if errors.As(err, &e) { + uw := e.Unwrap() + assert.Len(t, uw, 2) + + for _, err := range uw { + assert.True(t, errors.Is(err, errNullValueWarning)) + } + } + assert.Len(t, rows, 2) + assert.EqualValues(t, map[string]string{ + "col_0": "42", + }, rows[0]) + assert.EqualValues(t, map[string]string{ + "col_0": "43", + }, rows[1]) +} + +type fakeDB struct { + rowVals [][]any +} + +func (db fakeDB) QueryContext(context.Context, string, ...any) (rows, error) { + return &fakeRows{vals: db.rowVals}, nil +} + +type fakeRows struct { + vals [][]any + row int +} + +func (r *fakeRows) ColumnTypes() ([]colType, error) { + var out []colType + for i := 0; i < len(r.vals[0]); i++ { + out = append(out, fakeCol{fmt.Sprintf("col_%d", i)}) + } + return out, nil +} + +func (r *fakeRows) Next() bool { + return r.row < len(r.vals) +} + +func (r *fakeRows) Scan(dest ...any) error { + for i := range dest { + ptr := dest[i].(*any) + *ptr = r.vals[r.row][i] + } + r.row++ + return nil +} + +type fakeCol struct { + name string +} + +func (c fakeCol) Name() string { + return c.name +} diff --git a/internal/sqlquery/db_wrappers.go b/internal/sqlquery/db_wrappers.go new file mode 100644 index 000000000000..a8b788c82dd8 --- /dev/null +++ b/internal/sqlquery/db_wrappers.go @@ -0,0 +1,66 @@ +// 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" +) + +// These are wrappers and interfaces around SQL.DB so that it can be swapped out for testing. + +type Db interface { + QueryContext(ctx context.Context, query string, args ...any) (rows, error) +} + +type rows interface { + ColumnTypes() ([]colType, error) + Next() bool + Scan(dest ...any) error +} + +type colType interface { + Name() string +} + +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...) + return rowsWrapper{rows}, err +} + +type rowsWrapper struct { + rows *sql.Rows +} + +func (r rowsWrapper) ColumnTypes() ([]colType, error) { + types, err := r.rows.ColumnTypes() + if err != nil { + return nil, err + } + var out []colType + for _, columnType := range types { + out = append(out, colWrapper{columnType}) + } + return out, nil +} + +func (r rowsWrapper) Next() bool { + return r.rows.Next() +} + +func (r rowsWrapper) Scan(dest ...any) error { + return r.rows.Scan(dest...) +} + +type colWrapper struct { + ct *sql.ColumnType +} + +func (c colWrapper) Name() string { + return c.ct.Name() +} diff --git a/internal/sqlquery/go.mod b/internal/sqlquery/go.mod new file mode 100644 index 000000000000..a7abae685021 --- /dev/null +++ b/internal/sqlquery/go.mod @@ -0,0 +1,112 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery + +go 1.21 + +require ( + github.com/SAP/go-hdb v1.8.12 + github.com/go-sql-driver/mysql v1.8.1 + github.com/lib/pq v1.10.9 + github.com/microsoft/go-mssqldb v1.7.0 + github.com/sijms/go-ora/v2 v2.8.11 + github.com/snowflakedb/gosnowflake v1.9.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/receiver v0.98.0 + go.uber.org/multierr v1.11.0 + go.uber.org/zap v1.27.0 +) + +require ( + filippo.io/edwards25519 v1.1.0 // indirect + 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.9.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 // 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/v15 v15.0.0 // 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.3.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/go-viper/mapstructure/v2 v2.0.0-alpha.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 + 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.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mtibben/percent v0.2.1 // indirect + github.com/pierrec/lz4/v4 v4.1.18 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.52.2 // indirect + github.com/prometheus/procfs v0.13.0 // indirect + github.com/sirupsen/logrus v1.9.0 // indirect + github.com/zeebo/xxh3 v1.0.2 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/consumer v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.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-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.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..35c18cbb2b04 --- /dev/null +++ b/internal/sqlquery/go.sum @@ -0,0 +1,341 @@ +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +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.9.1 h1:lGlwhPtrX6EVml1hO0ivjkUxsSyl4dsiw9qcA1k/3IQ= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1/go.mod h1:RKUqNu35KJYcVG/fqTRqmuXJZYNhYkBrnC/hX7yGbTA= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 h1:6oNBlSdi1QqM1PNW7FPA6xOGA5UNsXnkaYZz9vdPGhA= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1/go.mod h1:s4kgfzA0covAXNicZHDMN58jExvcng2mC/DepXiF1EI= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1 h1:MyVTgWR8qd/Jw1Le0NZebGBUCLbtak3bJ3z1OlqZBpw= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1/go.mod h1:GpPjLhVR9dnUoJMyHWSPy71xY9/lcmpzIPZXmF0FCVY= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 h1:D3occbWoio4EBLkbkevetNMAVX197GkzbUMtqjGWn80= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0/go.mod h1:bTSOgj05NGRuHHhQwAdPnYr9TOdNmKlZTgGLL6nyAdI= +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.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +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.8.12 h1:F/bpSlPZG0CvVWlTxxiEHGnynA8uILCPoIRoG+iMmkE= +github.com/SAP/go-hdb v1.8.12/go.mod h1:SNF6129HdtfK0ve8LQIeHEYwNu5CCJr7vXmhA4UbkNw= +github.com/apache/arrow/go/v15 v15.0.0 h1:1zZACWf85oEZY5/kd9dsQS7i+2G5zVQcbKTHgslqHNA= +github.com/apache/arrow/go/v15 v15.0.0/go.mod h1:DGXsR3ajT524njufqf95822i+KTh+yea1jass9YXgjA= +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.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.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.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +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.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= +github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +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/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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +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.7.0 h1:sgMPW0HA6Ihd37Yx0MzHyKD726C2kY/8KJsQtXHNaAs= +github.com/microsoft/go-mssqldb v1.7.0/go.mod h1:kOvZKUdrhhFQmxLZqbwUV0rHkNkZpthMITIb2Ko1IoA= +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/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-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= +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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= +github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= +github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/sijms/go-ora/v2 v2.8.11 h1:oQtSX145kCYSjnrmWdtqp2LON9wOQW09wPJ5pIEn5Tg= +github.com/sijms/go-ora/v2 v2.8.11/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.9.0 h1:s2ZdwFxFfpqwa5CqlhnzRESnLmwU3fED6zyNOJHFBQA= +github.com/snowflakedb/gosnowflake v1.9.0/go.mod h1:4ZgHxVf2OKwecx07WjfyAMr0gn8Qj4yvwAo68Og8wsU= +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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +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.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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-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.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +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= +gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.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/internal/sqlquery/metrics.go b/internal/sqlquery/metrics.go new file mode 100644 index 000000000000..01cb8dbae856 --- /dev/null +++ b/internal/sqlquery/metrics.go @@ -0,0 +1,121 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sqlquery // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" + +import ( + "fmt" + "strconv" + + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/receiver/scraperhelper" +) + +func rowToMetric(row StringMap, cfg MetricCfg, dest pmetric.Metric, startTime pcommon.Timestamp, ts pcommon.Timestamp, scrapeCfg scraperhelper.ControllerConfig) error { + dest.SetName(cfg.MetricName) + dest.SetDescription(cfg.Description) + dest.SetUnit(cfg.Unit) + dataPointSlice := setMetricFields(cfg, dest) + dataPoint := dataPointSlice.AppendEmpty() + if cfg.StartTsColumn != "" { + if val, found := row[cfg.StartTsColumn]; found { + timestamp, err := strconv.ParseInt(val, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse uint64 for %q, value was %q: %w", cfg.StartTsColumn, val, err) + } + startTime = pcommon.Timestamp(timestamp) + } else { + return fmt.Errorf("rowToMetric: start_ts_column not found") + } + } + if cfg.TsColumn != "" { + if val, found := row[cfg.TsColumn]; found { + timestamp, err := strconv.ParseInt(val, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse uint64 for %q, value was %q: %w", cfg.TsColumn, val, err) + } + ts = pcommon.Timestamp(timestamp) + } else { + return fmt.Errorf("rowToMetric: ts_column not found") + } + } + setTimestamp(cfg, dataPoint, startTime, ts, scrapeCfg) + value, found := row[cfg.ValueColumn] + if !found { + return fmt.Errorf("rowToMetric: value_column '%s' not found in result set", cfg.ValueColumn) + } + err := setDataPointValue(cfg, value, dataPoint) + if err != nil { + return fmt.Errorf("rowToMetric: %w", err) + } + attrs := dataPoint.Attributes() + for k, v := range cfg.StaticAttributes { + attrs.PutStr(k, v) + } + for _, columnName := range cfg.AttributeColumns { + if attrVal, found := row[columnName]; found { + attrs.PutStr(columnName, attrVal) + } else { + return fmt.Errorf("rowToMetric: attribute_column not found: '%s'", columnName) + } + } + return nil +} + +func setTimestamp(cfg MetricCfg, dp pmetric.NumberDataPoint, startTime pcommon.Timestamp, ts pcommon.Timestamp, scrapeCfg scraperhelper.ControllerConfig) { + dp.SetTimestamp(ts) + + // Cumulative sum should have a start time set to the beginning of the data points cumulation + if cfg.Aggregation == MetricAggregationCumulative && cfg.DataType != MetricTypeGauge { + dp.SetStartTimestamp(startTime) + } + + // Non-cumulative sum should have a start time set to the previous endpoint + if cfg.Aggregation == MetricAggregationDelta && cfg.DataType != MetricTypeGauge { + dp.SetStartTimestamp(pcommon.NewTimestampFromTime(ts.AsTime().Add(-scrapeCfg.CollectionInterval))) + } +} + +func setMetricFields(cfg MetricCfg, dest pmetric.Metric) pmetric.NumberDataPointSlice { + var out pmetric.NumberDataPointSlice + switch cfg.DataType { + case MetricTypeUnspecified, MetricTypeGauge: + out = dest.SetEmptyGauge().DataPoints() + case MetricTypeSum: + sum := dest.SetEmptySum() + sum.SetIsMonotonic(cfg.Monotonic) + sum.SetAggregationTemporality(cfgToAggregationTemporality(cfg.Aggregation)) + out = sum.DataPoints() + } + return out +} + +func cfgToAggregationTemporality(agg MetricAggregation) pmetric.AggregationTemporality { + var out pmetric.AggregationTemporality + switch agg { + case MetricAggregationUnspecified, MetricAggregationCumulative: + out = pmetric.AggregationTemporalityCumulative + case MetricAggregationDelta: + out = pmetric.AggregationTemporalityDelta + } + return out +} + +func setDataPointValue(cfg MetricCfg, str string, dest pmetric.NumberDataPoint) error { + switch cfg.ValueType { + case MetricValueTypeUnspecified, MetricValueTypeInt: + val, err := strconv.Atoi(str) + if err != nil { + return fmt.Errorf("setDataPointValue: col %q: error converting to integer: %w", cfg.ValueColumn, err) + } + dest.SetIntValue(int64(val)) + case MetricValueTypeDouble: + val, err := strconv.ParseFloat(str, 64) + if err != nil { + return fmt.Errorf("setDataPointValue: col %q: error converting to double: %w", cfg.ValueColumn, err) + } + dest.SetDoubleValue(val) + } + return nil +} diff --git a/internal/sqlquery/metrics_test.go b/internal/sqlquery/metrics_test.go new file mode 100644 index 000000000000..d5d46746a9ea --- /dev/null +++ b/internal/sqlquery/metrics_test.go @@ -0,0 +1,19 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sqlquery // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/pmetric" +) + +func TestSetDataPointValue(t *testing.T) { + err := setDataPointValue(MetricCfg{ + ValueType: MetricValueTypeInt, + ValueColumn: "some-col", + }, "", pmetric.NewNumberDataPoint()) + assert.EqualError(t, err, `setDataPointValue: col "some-col": error converting to integer: strconv.Atoi: parsing "": invalid syntax`) +} 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..9db99d6ea198 --- /dev/null +++ b/internal/sqlquery/scraper.go @@ -0,0 +1,106 @@ +// 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/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.ControllerConfig + 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.ControllerConfig, 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 = append(errs, err) + } + } + } + if errs != nil { + return out, scrapererror.NewPartialScrapeError(errors.Join(errs...), len(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 47107cfaa2c7..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), - 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), - 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), - 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/internal/tools/go.mod b/internal/tools/go.mod index 31d8bc6b5785..3379c3da96a4 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -1,22 +1,26 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/tools -go 1.20 +go 1.21 require ( + github.com/Khan/genqlient v0.7.0 github.com/client9/misspell v0.3.4 - github.com/daixiang0/gci v0.11.2 - github.com/golangci/golangci-lint v1.55.2 + github.com/daixiang0/gci v0.13.1 + github.com/golangci/golangci-lint v1.57.2 github.com/google/addlicense v1.1.1 github.com/jcchavezs/porto v0.6.0 github.com/jstemmer/go-junit-report v1.0.0 - go.opentelemetry.io/build-tools/checkfile v0.12.0 - go.opentelemetry.io/build-tools/chloggen v0.12.0 - go.opentelemetry.io/build-tools/crosslink v0.12.0 - go.opentelemetry.io/build-tools/issuegenerator v0.12.0 - go.opentelemetry.io/build-tools/multimod v0.12.0 - go.opentelemetry.io/collector/cmd/builder v0.89.0 - golang.org/x/tools v0.15.0 - golang.org/x/vuln v1.0.1 + go.opentelemetry.io/build-tools/checkfile v0.13.0 + go.opentelemetry.io/build-tools/chloggen v0.13.0 + go.opentelemetry.io/build-tools/crosslink v0.13.0 + go.opentelemetry.io/build-tools/issuegenerator v0.13.0 + go.opentelemetry.io/build-tools/multimod v0.13.0 + go.opentelemetry.io/collector/cmd/builder v0.98.0 + go.opentelemetry.io/collector/cmd/mdatagen v0.98.0 + go.uber.org/goleak v1.3.0 + golang.org/x/tools v0.19.0 + golang.org/x/vuln v1.0.4 + gotest.tools/gotestsum v1.11.0 ) require ( @@ -24,214 +28,232 @@ require ( 4d63.com/gochecknoglobals v0.2.1 // indirect dario.cat/mergo v1.0.0 // indirect github.com/4meepo/tagalign v1.3.3 // indirect - github.com/Abirdcfly/dupword v0.0.13 // indirect + github.com/Abirdcfly/dupword v0.0.14 // indirect github.com/Antonboom/errname v0.1.12 // indirect github.com/Antonboom/nilnil v0.1.7 // indirect - github.com/Antonboom/testifylint v0.2.3 // indirect + github.com/Antonboom/testifylint v1.2.0 // indirect github.com/BurntSushi/toml v1.3.2 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect - github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 // indirect + github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 // indirect github.com/Masterminds/semver v1.5.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect + github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect - github.com/acomagu/bufpipe v1.0.4 // indirect - github.com/alecthomas/go-check-sumtype v0.1.3 // indirect - github.com/alexkohler/nakedret/v2 v2.0.2 // indirect + github.com/agnivade/levenshtein v1.1.1 // indirect + github.com/alecthomas/go-check-sumtype v0.1.4 // indirect + github.com/alexflint/go-arg v1.4.2 // indirect + github.com/alexflint/go-scalar v1.0.0 // indirect + github.com/alexkohler/nakedret/v2 v2.0.4 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect github.com/ashanbrown/forbidigo v1.6.0 // indirect github.com/ashanbrown/makezero v1.1.1 // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/bitfield/gotestdox v0.2.1 // indirect github.com/bkielbasa/cyclop v1.2.1 // indirect github.com/blizzy78/varnamelen v0.8.0 // indirect - github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect - github.com/bombsimon/wsl/v3 v3.4.0 // indirect + github.com/bmatcuk/doublestar/v4 v4.0.2 // indirect + github.com/bombsimon/wsl/v4 v4.2.1 // indirect github.com/breml/bidichk v0.2.7 // indirect github.com/breml/errchkjson v0.3.6 // indirect - github.com/butuzov/ireturn v0.2.2 // indirect + github.com/butuzov/ireturn v0.3.0 // indirect github.com/butuzov/mirror v1.1.0 // indirect - github.com/catenacyber/perfsprint v0.2.0 // indirect - github.com/ccojocar/zxcvbn-go v1.0.1 // indirect + github.com/catenacyber/perfsprint v0.7.1 // indirect + github.com/ccojocar/zxcvbn-go v1.0.2 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/charithe/durationcheck v0.0.10 // indirect github.com/chavacava/garif v0.1.0 // indirect - github.com/cloudflare/circl v1.3.3 // indirect + github.com/ckaznocha/intrange v0.1.1 // indirect + github.com/cloudflare/circl v1.3.7 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/denis-tingaikin/go-header v0.4.3 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/denis-tingaikin/go-header v0.5.0 // indirect + github.com/dnephin/pflag v1.0.7 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/esimonov/ifshort v1.0.4 // indirect - github.com/ettle/strcase v0.1.1 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/ettle/strcase v0.2.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/firefart/nonamedreturns v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect - github.com/ghostiam/protogetter v0.2.3 // indirect - github.com/go-critic/go-critic v0.9.0 // indirect + github.com/ghostiam/protogetter v0.3.5 // indirect + github.com/go-critic/go-critic v0.11.2 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect - github.com/go-git/go-git/v5 v5.9.0 // indirect + github.com/go-git/go-git/v5 v5.11.0 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect github.com/go-toolsmith/astcopy v1.1.0 // indirect - github.com/go-toolsmith/astequal v1.1.0 // indirect + github.com/go-toolsmith/astequal v1.2.0 // indirect github.com/go-toolsmith/astfmt v1.1.0 // indirect github.com/go-toolsmith/astp v1.1.0 // indirect github.com/go-toolsmith/strparse v1.1.0 // indirect github.com/go-toolsmith/typep v1.1.0 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gofrs/flock v0.8.1 // 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/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect - github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e // indirect - github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect - github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect github.com/golangci/misspell v0.4.1 // indirect + github.com/golangci/plugin-module-register v0.1.1 // indirect github.com/golangci/revgrep v0.5.2 // indirect - github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect + github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-github v17.0.0+incompatible // indirect - github.com/google/go-querystring v1.1.0 // indirect - github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 // indirect + github.com/google/go-querystring v1.0.0 // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect + github.com/gordonklaus/ineffassign v0.1.0 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect github.com/gostaticanalysis/comment v1.4.2 // indirect github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect github.com/gostaticanalysis/nilerr v0.1.1 // indirect - github.com/hashicorp/errwrap v1.0.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/jgautheron/goconst v1.6.0 // indirect + github.com/jgautheron/goconst v1.7.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect + github.com/jjti/go-spancheck v0.5.3 // indirect github.com/joshdk/go-junit v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/julz/importas v0.1.0 // indirect + github.com/karamaru-alpha/copyloopvar v1.0.10 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/kisielk/errcheck v1.6.3 // indirect - github.com/kisielk/gotool v1.0.0 // indirect - github.com/kkHAIKE/contextcheck v1.1.4 // indirect + github.com/kisielk/errcheck v1.7.0 // indirect + github.com/kkHAIKE/contextcheck v1.1.5 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/parsers/yaml v0.1.0 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect github.com/knadh/koanf/providers/env v0.1.0 // indirect github.com/knadh/koanf/providers/file v0.1.0 // indirect github.com/knadh/koanf/providers/fs v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/kulti/thelper v0.6.3 // indirect - github.com/kunwardeep/paralleltest v1.0.8 // indirect + github.com/kunwardeep/paralleltest v1.0.10 // indirect github.com/kyoh86/exportloopref v0.1.11 // indirect - github.com/ldez/gomoddirectives v0.2.3 // indirect + github.com/ldez/gomoddirectives v0.2.4 // indirect github.com/ldez/tagliatelle v0.5.0 // indirect github.com/leonklingele/grouper v1.1.1 // indirect github.com/lufeee/execinquery v1.2.1 // indirect - github.com/macabu/inamedparam v0.1.2 // indirect + github.com/macabu/inamedparam v0.1.3 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/maratori/testableexamples v1.0.0 // indirect github.com/maratori/testpackage v1.1.1 // indirect github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/mbilski/exhaustivestruct v1.2.0 // indirect - github.com/mgechev/revive v1.3.4 // indirect + github.com/mgechev/revive v1.3.7 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/moricho/tparallel v0.3.1 // indirect github.com/nakabonne/nestif v0.3.1 // indirect - github.com/nishanths/exhaustive v0.11.0 // indirect + github.com/nishanths/exhaustive v0.12.0 // indirect github.com/nishanths/predeclared v0.2.2 // indirect - github.com/nunnatsa/ginkgolinter v0.14.1 // indirect + github.com/nunnatsa/ginkgolinter v0.16.2 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/polyfloyd/go-errorlint v1.4.5 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect - github.com/prometheus/common v0.45.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/polyfloyd/go-errorlint v1.4.8 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/quasilyte/go-ruleguard v0.4.0 // indirect + github.com/quasilyte/go-ruleguard v0.4.2 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect - github.com/ryancurrah/gomodguard v1.3.0 // indirect + github.com/ryancurrah/gomodguard v1.3.1 // indirect github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect + github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect - github.com/sashamelentyev/usestdlibvars v1.24.0 // indirect - github.com/securego/gosec/v2 v2.18.2 // indirect - github.com/sergi/go-diff v1.1.0 // indirect + github.com/sashamelentyev/usestdlibvars v1.25.0 // indirect + github.com/securego/gosec/v2 v2.19.0 // indirect + github.com/sergi/go-diff v1.3.1 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/sivchari/containedctx v1.0.3 // indirect - github.com/sivchari/nosnakecase v1.7.0 // indirect github.com/sivchari/tenv v1.7.1 // indirect - github.com/skeema/knownhosts v1.2.0 // indirect + github.com/skeema/knownhosts v1.2.1 // indirect github.com/sonatard/noctx v0.0.2 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect github.com/sourcegraph/go-diff v0.7.0 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cobra v1.8.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect + github.com/spf13/viper v1.18.2 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect - github.com/stretchr/objx v0.5.0 // indirect - github.com/stretchr/testify v1.8.4 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/stretchr/testify v1.9.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect github.com/tdakkota/asciicheck v0.2.0 // indirect - github.com/tetafro/godot v1.4.15 // indirect + github.com/tetafro/godot v1.4.16 // indirect github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect github.com/timonwong/loggercheck v0.9.4 // indirect - github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect + github.com/tomarrell/wrapcheck/v2 v2.8.3 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect github.com/ultraware/funlen v0.1.0 // indirect - github.com/ultraware/whitespace v0.0.5 // indirect + github.com/ultraware/whitespace v0.1.0 // indirect github.com/uudashr/gocognit v1.1.2 // indirect + github.com/vektah/gqlparser/v2 v2.5.11 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xen0n/gosmopolitan v1.2.2 // indirect github.com/yagipy/maintidx v1.0.0 // indirect github.com/yeya24/promlinter v0.2.0 // indirect - github.com/ykadowak/zerologlint v0.1.3 // indirect + github.com/ykadowak/zerologlint v0.1.5 // indirect gitlab.com/bosi/decorder v0.4.1 // indirect - go-simpler.org/sloglint v0.1.2 // indirect - go.opentelemetry.io/build-tools v0.12.0 // indirect - go.tmz.dev/musttag v0.7.2 // indirect + go-simpler.org/musttag v0.9.0 // indirect + go-simpler.org/sloglint v0.5.0 // indirect + go.opentelemetry.io/build-tools v0.13.0 // indirect + go.opentelemetry.io/collector/component v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 // indirect + go.opentelemetry.io/collector/pdata v1.5.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect + go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.15.0 // indirect - golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect - golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect + golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - honnef.co/go/tools v0.4.6 // indirect - mvdan.cc/gofumpt v0.5.0 // indirect - mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect - mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect - mvdan.cc/unparam v0.0.0-20230312165513-e84e2d14e3b8 // indirect + honnef.co/go/tools v0.4.7 // indirect + mvdan.cc/gofumpt v0.6.0 // indirect + mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14 // indirect ) // openshift removed all tags from their repo, use the pseudoversion from the release-3.9 branch HEAD diff --git a/internal/tools/go.sum b/internal/tools/go.sum index dcc30305ee53..dfc6c8e31c87 100644 --- a/internal/tools/go.sum +++ b/internal/tools/go.sum @@ -7,7 +7,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -18,9 +17,6 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -38,56 +34,69 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/4meepo/tagalign v1.3.3 h1:ZsOxcwGD/jP4U/aw7qeWu58i7dwYemfy5Y+IF1ACoNw= github.com/4meepo/tagalign v1.3.3/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= -github.com/Abirdcfly/dupword v0.0.13 h1:SMS17YXypwP000fA7Lr+kfyBQyW14tTT+nRv9ASwUUo= -github.com/Abirdcfly/dupword v0.0.13/go.mod h1:Ut6Ue2KgF/kCOawpW4LnExT+xZLQviJPE4klBPMK/5Y= +github.com/Abirdcfly/dupword v0.0.14 h1:3U4ulkc8EUo+CaT105/GJ1BQwtgyj6+VaBVbAX11Ba8= +github.com/Abirdcfly/dupword v0.0.14/go.mod h1:VKDAbxdY8YbKUByLGg8EETzYSuC4crm9WwI6Y3S0cLI= github.com/Antonboom/errname v0.1.12 h1:oh9ak2zUtsLp5oaEd/erjB4GPu9w19NyoIskZClDcQY= github.com/Antonboom/errname v0.1.12/go.mod h1:bK7todrzvlaZoQagP1orKzWXv59X/x0W0Io2XT1Ssro= github.com/Antonboom/nilnil v0.1.7 h1:ofgL+BA7vlA1K2wNQOsHzLJ2Pw5B5DpWRLdDAVvvTow= github.com/Antonboom/nilnil v0.1.7/go.mod h1:TP+ScQWVEq0eSIxqU8CbdT5DFWoHp0MbP+KMUO1BKYQ= -github.com/Antonboom/testifylint v0.2.3 h1:MFq9zyL+rIVpsvLX4vDPLojgN7qODzWsrnftNX2Qh60= -github.com/Antonboom/testifylint v0.2.3/go.mod h1:IYaXaOX9NbfAyO+Y04nfjGI8wDemC1rUyM/cYolz018= +github.com/Antonboom/testifylint v1.2.0 h1:015bxD8zc5iY8QwTp4+RG9I4kIbqwvGX9TrBbb7jGdM= +github.com/Antonboom/testifylint v1.2.0/go.mod h1:rkmEqjqVnHDRNsinyN6fPSLnoajzFwsCcguJgwADBkw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 h1:3ZBs7LAezy8gh0uECsA6CGU43FF3zsx5f4eah5FxTMA= -github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0/go.mod h1:rZLTje5A9kFBe0pzhpe2TdhRniBF++PRHQuRpR8esVc= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 h1:sATXp1x6/axKxz2Gjxv8MALP0bXaNRfQinEwyfMcx8c= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0/go.mod h1:Nl76DrGNJTA1KJ0LePKBw/vznBX1EHbAZX8mwjR82nI= +github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= +github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/OpenPeeDeeP/depguard/v2 v2.1.0 h1:aQl70G173h/GZYhWf36aE5H0KaujXfVMnn/f1kSDVYY= -github.com/OpenPeeDeeP/depguard/v2 v2.1.0/go.mod h1:PUBgk35fX4i7JDmwzlJwJ+GMe6NfO1723wmJMgPThNQ= +github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA= +github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= -github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= -github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= +github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk= -github.com/alecthomas/go-check-sumtype v0.1.3 h1:M+tqMxB68hcgccRXBMVCPI4UJ+QUfdSx0xdbypKCqA8= -github.com/alecthomas/go-check-sumtype v0.1.3/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= +github.com/alecthomas/assert/v2 v2.2.2/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/go-check-sumtype v0.1.4 h1:WCvlB3l5Vq5dZQTFmodqL2g68uHiSwwlWcT5a2FGK0c= +github.com/alecthomas/go-check-sumtype v0.1.4/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexkohler/nakedret/v2 v2.0.2 h1:qnXuZNvv3/AxkAb22q/sEsEpcA99YxLFACDtEw9TPxE= -github.com/alexkohler/nakedret/v2 v2.0.2/go.mod h1:2b8Gkk0GsOrqQv/gPWjNLDSKwG8I5moSXG1K4VIBcTQ= +github.com/alexflint/go-arg v1.4.2 h1:lDWZAXxpAnZUq4qwb86p/3rIJJ2Li81EoMbTMujhVa0= +github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM= +github.com/alexflint/go-scalar v1.0.0 h1:NGupf1XV/Xb04wXskDFzS0KWOLH632W/EO4fAFi+A70= +github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw= +github.com/alexkohler/nakedret/v2 v2.0.4 h1:yZuKmjqGi0pSmjGpOC016LtPJysIL0WEUiaXW5SUnNg= +github.com/alexkohler/nakedret/v2 v2.0.4/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8gerOIVIY= github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= @@ -96,28 +105,31 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/bitfield/gotestdox v0.2.1 h1:Zj8IMLAO5/oiAKoMmtN96eyFiPZraJRTH2p0zDgtxc0= +github.com/bitfield/gotestdox v0.2.1/go.mod h1:D+gwtS0urjBrzguAkTM2wodsTQYFHdpx8eqRJ3N+9pY= github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJY= github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= +github.com/bmatcuk/doublestar/v4 v4.0.2 h1:X0krlUVAVmtr2cRoTqR8aDMrDqnB36ht8wpWTiQ3jsA= github.com/bmatcuk/doublestar/v4 v4.0.2/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= -github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= -github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= -github.com/bombsimon/wsl/v3 v3.4.0 h1:RkSxjT3tmlptwfgEgTgU+KYKLI35p/tviNXNXiL2aNU= -github.com/bombsimon/wsl/v3 v3.4.0/go.mod h1:KkIB+TXkqy6MvK9BDZVbZxKNYsE1/oLRJbIFtf14qqo= +github.com/bombsimon/wsl/v4 v4.2.1 h1:Cxg6u+XDWff75SIFFmNsqnIOgob+Q9hG6y/ioKbRFiM= +github.com/bombsimon/wsl/v4 v4.2.1/go.mod h1:Xu/kDxGZTofQcDGCtQe9KCzhHphIe0fDuyWTxER9Feo= +github.com/bradleyjkemp/cupaloy/v2 v2.6.0 h1:knToPYa2xtfg42U3I6punFEjaGFKWQRXJwj0JTv4mTs= +github.com/bradleyjkemp/cupaloy/v2 v2.6.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0= github.com/breml/bidichk v0.2.7 h1:dAkKQPLl/Qrk7hnP6P+E0xOodrq8Us7+U0o4UBOAlQY= github.com/breml/bidichk v0.2.7/go.mod h1:YodjipAGI9fGcYM7II6wFvGhdMYsC5pHDlGzqvEW3tQ= github.com/breml/errchkjson v0.3.6 h1:VLhVkqSBH96AvXEyclMR37rZslRrY2kcyq+31HCsVrA= github.com/breml/errchkjson v0.3.6/go.mod h1:jhSDoFheAF2RSDOlCfhHO9KqhZgAYLyvHe7bRCX8f/U= -github.com/butuzov/ireturn v0.2.2 h1:jWI36dxXwVrI+RnXDwux2IZOewpmfv930OuIRfaBUJ0= -github.com/butuzov/ireturn v0.2.2/go.mod h1:RfGHUvvAuFFxoHKf4Z8Yxuh6OjlCw1KvR2zM1NFHeBk= +github.com/butuzov/ireturn v0.3.0 h1:hTjMqWw3y5JC3kpnC5vXmFJAWI/m31jaCYQqzkS6PL0= +github.com/butuzov/ireturn v0.3.0/go.mod h1:A09nIiwiqzN/IoVo9ogpa0Hzi9fex1kd9PSD6edP5ZA= github.com/butuzov/mirror v1.1.0 h1:ZqX54gBVMXu78QLoiqdwpl2mgmoOJTk7s4p4o+0avZI= github.com/butuzov/mirror v1.1.0/go.mod h1:8Q0BdQU6rC6WILDiBM60DBfvV78OLJmMmixe7GF45AE= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/catenacyber/perfsprint v0.2.0 h1:azOocHLscPjqXVJ7Mf14Zjlkn4uNua0+Hcg1wTR6vUo= -github.com/catenacyber/perfsprint v0.2.0/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= -github.com/ccojocar/zxcvbn-go v1.0.1 h1:+sxrANSCj6CdadkcMnvde/GWU1vZiiXRbqYSCalV4/4= -github.com/ccojocar/zxcvbn-go v1.0.1/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= +github.com/catenacyber/perfsprint v0.7.1 h1:PGW5G/Kxn+YrN04cRAZKC+ZuvlVwolYMrIyyTJ/rMmc= +github.com/catenacyber/perfsprint v0.7.1/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= +github.com/ccojocar/zxcvbn-go v1.0.2 h1:na/czXU8RrhXO4EZme6eQJLR4PzcGsahsBOAwU6I3Vg= +github.com/ccojocar/zxcvbn-go v1.0.2/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -130,61 +142,69 @@ github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+U github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/ckaznocha/intrange v0.1.1 h1:gHe4LfqCspWkh8KpJFs20fJz3XRHFBFUV9yI7Itu83Q= +github.com/ckaznocha/intrange v0.1.1/go.mod h1:RWffCw/vKBwHeOEwWdCikAtY0q4gGt8VhJZEEA5n+RE= github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/daixiang0/gci v0.11.2 h1:Oji+oPsp3bQ6bNNgX30NBAVT18P4uBH4sRZnlOlTj7Y= -github.com/daixiang0/gci v0.11.2/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= +github.com/daixiang0/gci v0.13.1 h1:jkQWCPu7JZhNoO+OMHFxs1KGonWPhXw9txySE8qwAb0= +github.com/daixiang0/gci v0.13.1/go.mod h1:JyUVY/ZKzBjrzLOm2UQDZohEZ2HlfX72jONBV0REVb4= 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/denis-tingaikin/go-header v0.4.3 h1:tEaZKAlqql6SKCY++utLmkPLd6K8IBM20Ha7UVm+mtU= -github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= +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/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= +github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= +github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= +github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= +github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk= +github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStBA= -github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= -github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= -github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= +github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= 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/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= -github.com/ghostiam/protogetter v0.2.3 h1:qdv2pzo3BpLqezwqfGDLZ+nHEYmc5bUpIdsMbBVwMjw= -github.com/ghostiam/protogetter v0.2.3/go.mod h1:KmNLOsy1v04hKbvZs8EfGI1fk39AgTdRDxWNYPfXVc4= +github.com/ghostiam/protogetter v0.3.5 h1:+f7UiF8XNd4w3a//4DnusQ2SZjPkUjxkMEfjbxOK4Ug= +github.com/ghostiam/protogetter v0.3.5/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= -github.com/go-critic/go-critic v0.9.0 h1:Pmys9qvU3pSML/3GEQ2Xd9RZ/ip+aXHKILuxczKGV/U= -github.com/go-critic/go-critic v0.9.0/go.mod h1:5P8tdXL7m/6qnyG6oRAlYLORvoXH0WDypYgAEmagT40= +github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= +github.com/go-critic/go-critic v0.11.2 h1:81xH/2muBphEgPtcwH1p6QD+KzXl2tMSi3hXjBSxDnM= +github.com/go-critic/go-critic v0.11.2/go.mod h1:OePaicfjsf+KPy33yq4gzv6CO7TEQ9Rom6ns1KsJnl8= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= -github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= -github.com/go-git/go-git/v5 v5.9.0 h1:cD9SFA7sHVRdJ7AYck1ZaAa/yeuBvGPxwXDL8cxrObY= -github.com/go-git/go-git/v5 v5.9.0/go.mod h1:RKIqga24sWdMGZF+1Ekv9kylsDz6LzdTSI2s/OsZWE0= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= +github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -194,26 +214,34 @@ github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vb github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= -github.com/go-toolsmith/astequal v1.1.0 h1:kHKm1AWqClYn15R0K1KKE4RG614D46n+nqUQ06E1dTw= github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= +github.com/go-toolsmith/astequal v1.2.0 h1:3Fs3CYZ1k9Vo4FzFhwwewC3CHISHDnVUPC4x0bI2+Cw= +github.com/go-toolsmith/astequal v1.2.0/go.mod h1:c8NZ3+kSFtFY/8lPso4v8LuJjdJiUFVnSuU3s0qrrDY= github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= +github.com/go-toolsmith/pkgload v1.2.2/go.mod h1:R2hxLNRKuAsiXCo2i5J6ZQPhnPMOVtU+f0arbFPWCus= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= @@ -221,6 +249,8 @@ github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJA github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -252,31 +282,26 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 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/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6J5HIP8ZtyMdiDscjMLfRBSPuzVVeo= -github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e h1:ULcKCDV1LOZPFxGZaA6TlQbiM3J2GCPnkx/bGF6sX/g= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM= -github.com/golangci/golangci-lint v1.55.2 h1:yllEIsSJ7MtlDBwDJ9IMBkyEUz2fYE0b5B8IUgO1oP8= -github.com/golangci/golangci-lint v1.55.2/go.mod h1:H60CZ0fuqoTwlTvnbyjhpZPWp7KmsjwV2yupIMiMXbM= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= +github.com/golangci/golangci-lint v1.57.2 h1:NNhxfZyL5He1WWDrIvl1a4n5bvWZBcgAqBwlJAAgLTw= +github.com/golangci/golangci-lint v1.57.2/go.mod h1:ApiG3S3Ca23QyfGp5BmsorTiVxJpr5jGiNS0BkdSidg= github.com/golangci/misspell v0.4.1 h1:+y73iSicVy2PqyX7kmUefHusENlrP9YwuHZHPLGQj/g= github.com/golangci/misspell v0.4.1/go.mod h1:9mAN1quEo3DlpbaIKKyEvRxK1pwqR9s/Sea1bJCtlNI= +github.com/golangci/plugin-module-register v0.1.1 h1:TCmesur25LnyJkpsVrupv1Cdzo+2f7zX0H6Jkw1Ol6c= +github.com/golangci/plugin-module-register v0.1.1/go.mod h1:TTpqoB6KkwOJMV8u7+NyXMrkwwESJLOkfl9TxR1DGFc= github.com/golangci/revgrep v0.5.2 h1:EndcWoRhcnfj2NHQ+28hyuXpLMF+dQmCN+YaeeIl4FU= github.com/golangci/revgrep v0.5.2/go.mod h1:bjAMA+Sh/QUfTDcHzxfyHxr4xKvllVr/0sCv2e7jJHA= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= +github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed h1:IURFTjxeTfNFP0hTEi1YKjB/ub8zkpaOqFFMApi2EAs= +github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed/go.mod h1:XLXN8bNw4CGRPaqgl3bv/lhz7bsGPh4/xSaMTbo2vkQ= github.com/google/addlicense v1.1.1 h1:jpVf9qPbU8rz5MxKo7d+RMcNHkqxi4YJi/laauX4aAE= github.com/google/addlicense v1.1.1/go.mod h1:Sm/DHu7Jk+T5miFHHehdIjbi4M5+dJDRS3Cq0rncIxA= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmdtest v0.4.1-0.20220921163831-55ab3332a786 h1:rcv+Ippz6RAtvaGgKxc+8FQIpxHgsF+HBzPyYL2cyVU= +github.com/google/go-cmdtest v0.4.1-0.20220921163831-55ab3332a786/go.mod h1:apVn/GCasLZUVpAJ6oWAuyP7Ne7CEsQbTnc0plM3m+o= 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= @@ -289,16 +314,16 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ 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.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +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/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -306,18 +331,16 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 h1:mrEEilTAUmaAORhssPPkxj84TsHrPMLBGW2Z4SoTxm8= -github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= +github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s= +github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= @@ -329,10 +352,7 @@ github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3 github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -343,25 +363,27 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jcchavezs/porto v0.6.0 h1:AgQLGwsXaxDkPj4Y+paFkVGLAR4n/1RRF0xV5UKinwg= github.com/jcchavezs/porto v0.6.0/go.mod h1:fESH0gzDHiutHRdX2hv27ojnOVFco37hg1W6E9EZF4A= -github.com/jgautheron/goconst v1.6.0 h1:gbMLWKRMkzAc6kYsQL6/TxaoBUg3Jm9LSF/Ih1ADWGA= -github.com/jgautheron/goconst v1.6.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jgautheron/goconst v1.7.1 h1:VpdAG7Ca7yvvJk5n8dMwQhfEZJh95kl/Hl9S1OI5Jkk= +github.com/jgautheron/goconst v1.7.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= +github.com/jjti/go-spancheck v0.5.3 h1:vfq4s2IB8T3HvbpiwDTYgVPj1Ze/ZSXrTtaZRTc7CuM= +github.com/jjti/go-spancheck v0.5.3/go.mod h1:eQdOX1k3T+nAKvZDyLC3Eby0La4dZ+I19iOl5NzSPFE= github.com/joshdk/go-junit v1.0.0 h1:S86cUKIdwBHWwA6xCmFlf3RTLfVXYQfvanM5Uh+K6GE= github.com/joshdk/go-junit v1.0.0/go.mod h1:TiiV0PqkaNfFXjEiyjWM3XXrhVyCa1K4Zfga6W52ung= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -371,51 +393,56 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= +github.com/karamaru-alpha/copyloopvar v1.0.10 h1:8HYDy6KQYqTmD7JuhZMWS1nwPru9889XI24ROd/+WXI= +github.com/karamaru-alpha/copyloopvar v1.0.10/go.mod h1:u7CIfztblY0jZLOQZgH3oYsJzpC2A7S6u/lfgSXHy0k= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kisielk/errcheck v1.6.3 h1:dEKh+GLHcWm2oN34nMvDzn1sqI0i0WxPvrgiJA5JuM8= -github.com/kisielk/errcheck v1.6.3/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.7.0 h1:+SbscKmWJ5mOK/bO1zS60F5I9WwZDWOfRsC4RwfwRV0= +github.com/kisielk/errcheck v1.7.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kkHAIKE/contextcheck v1.1.4 h1:B6zAaLhOEEcjvUgIYEqystmnFk1Oemn8bvJhbt0GMb8= -github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg= +github.com/kkHAIKE/contextcheck v1.1.5 h1:CdnJh63tcDe53vG+RebdpdXJTc9atMgGqdx8LXxiilg= +github.com/kkHAIKE/contextcheck v1.1.5/go.mod h1:O930cpht4xb1YQpK+1+AgoM3mFsvxr7uyFptcnWTYUA= 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/parsers/yaml v0.1.0 h1:ZZ8/iGfRLvKSaMEECEBPM1HQslrZADk8fP1XFUxVI5w= github.com/knadh/koanf/parsers/yaml v0.1.0/go.mod h1:cvbUDC7AL23pImuQP0oRw/hPuccrNBS2bps8asS0CwY= +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/providers/env v0.1.0 h1:LqKteXqfOWyx5Ab9VfGHmjY9BvRXi+clwyZozgVRiKg= github.com/knadh/koanf/providers/env v0.1.0/go.mod h1:RE8K9GbACJkeEnkl8L/Qcj8p4ZyPXZIQ191HJi44ZaQ= github.com/knadh/koanf/providers/file v0.1.0 h1:fs6U7nrV58d3CFAFh8VTde8TM262ObYf3ODrc//Lp+c= github.com/knadh/koanf/providers/file v0.1.0/go.mod h1:rjJ/nHQl64iYCtAW2QQnF0eSmDEX/YZ/eNFj5yR6BvA= github.com/knadh/koanf/providers/fs v0.1.0 h1:9Hln9GS3bWTItAnGVFYyfkoAIxAFq7pvlF64pTNiDdQ= github.com/knadh/koanf/providers/fs v0.1.0/go.mod h1:Cva1yH8NBxkEeVZx8CUmF5TunbgO72E+GwqDbqpP2sE= -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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= -github.com/kunwardeep/paralleltest v1.0.8 h1:Ul2KsqtzFxTlSU7IP0JusWlLiNqQaloB9vguyjbE558= -github.com/kunwardeep/paralleltest v1.0.8/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= +github.com/kunwardeep/paralleltest v1.0.10 h1:wrodoaKYzS2mdNVnc4/w31YaXFtsc21PCTdvWJ/lDDs= +github.com/kunwardeep/paralleltest v1.0.10/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= -github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUcJwlhA= -github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= +github.com/ldez/gomoddirectives v0.2.4 h1:j3YjBIjEBbqZ0NKtBNzr8rtMHTOrLPeiwTkfUJZ3alg= +github.com/ldez/gomoddirectives v0.2.4/go.mod h1:oWu9i62VcQDYp9EQ0ONTfqLNh+mDLWWDO+SO0qSQw5g= github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= github.com/leonklingele/grouper v1.1.1 h1:suWXRU57D4/Enn6pXR0QVqqWWrnJ9Osrz+5rjt8ivzU= github.com/leonklingele/grouper v1.1.1/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= -github.com/macabu/inamedparam v0.1.2 h1:RR5cnayM6Q7cDhQol32DE2BGAPGMnffJ31LFE+UklaU= -github.com/macabu/inamedparam v0.1.2/go.mod h1:Xg25QvY7IBRl1KLPV9Rbml8JOMZtF/iAkNkmV7eQgjw= +github.com/macabu/inamedparam v0.1.3 h1:2tk/phHkMlEL/1GNe/Yf6kkR/hkcUdAEY3L0hjYV1Mk= +github.com/macabu/inamedparam v0.1.3/go.mod h1:93FLICAIk/quk7eaPPQvbzihUdn/QkGDwIZEoLtpH6I= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= @@ -424,23 +451,20 @@ github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1r github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc= github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 h1:gWg6ZQ4JhDfJPqlo2srm/LN17lpybq15AryXIRcWYLE= github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= -github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/revive v1.3.4 h1:k/tO3XTaWY4DEHal9tWBkkUMJYO/dLDVyMmAQxmIMDc= -github.com/mgechev/revive v1.3.4/go.mod h1:W+pZCMu9qj8Uhfs1iJMQsEFLRozUfvwFwqVvRbSNLVw= +github.com/mgechev/revive v1.3.7 h1:502QY0vQGe9KtYJ9FpxMz9rL+Fc/P13CI5POL4uHCcE= +github.com/mgechev/revive v1.3.7/go.mod h1:RJ16jUbF0OWC3co/+XTxmFNgEpUPwnnA0BRllX2aDNA= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -450,9 +474,11 @@ github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1 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 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/moricho/tparallel v0.3.1 h1:fQKD4U1wRMAYNngDonW5XupoB/ZGJHdpzrWqgyg9krA= github.com/moricho/tparallel v0.3.1/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= @@ -460,54 +486,59 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= -github.com/nishanths/exhaustive v0.11.0 h1:T3I8nUGhl/Cwu5Z2hfc92l0e04D2GEW6e0l8pzda2l0= -github.com/nishanths/exhaustive v0.11.0/go.mod h1:RqwDsZ1xY0dNdqHho2z6X+bgzizwbLYOWnZbbl2wLB4= +github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhKRf3Swg= +github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= -github.com/nunnatsa/ginkgolinter v0.14.1 h1:khx0CqR5U4ghsscjJ+lZVthp3zjIFytRXPTaQ/TMiyA= -github.com/nunnatsa/ginkgolinter v0.14.1/go.mod h1:nY0pafUSst7v7F637e7fymaMlQqI9c0Wka2fGsDkzWg= +github.com/nunnatsa/ginkgolinter v0.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbnVSxfHJk= +github.com/nunnatsa/ginkgolinter v0.16.2/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= -github.com/onsi/gomega v1.28.1 h1:MijcGUbfYuznzK/5R4CPNoUP/9Xvuo20sXfEm6XxoTA= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= +github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= +github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= -github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY= +github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= +github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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/polyfloyd/go-errorlint v1.4.5 h1:70YWmMy4FgRHehGNOUask3HtSFSOLKgmDn7ryNe7LqI= -github.com/polyfloyd/go-errorlint v1.4.5/go.mod h1:sIZEbFoDOCnTYYZoVkjc4hTnM459tuWA9H/EkdXwsKk= +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/polyfloyd/go-errorlint v1.4.8 h1:jiEjKDH33ouFktyez7sckv6pHWif9B7SuS8cutDXFHw= +github.com/polyfloyd/go-errorlint v1.4.8/go.mod h1:NNCxFcFjZcw3xNjVdCchERkEM6Oz7wta2XJVxRftwO4= +github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= @@ -515,8 +546,8 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/quasilyte/go-ruleguard v0.4.0 h1:DyM6r+TKL+xbKB4Nm7Afd1IQh9kEUKQs2pboWGKtvQo= -github.com/quasilyte/go-ruleguard v0.4.0/go.mod h1:Eu76Z/R8IXtViWUIHkE3p8gdH3/PKk1eh3YGfaEof10= +github.com/quasilyte/go-ruleguard v0.4.2 h1:htXcXDK6/rO12kiTHKfHuqR4kr3Y4M0J0rOL6CH/BYs= +github.com/quasilyte/go-ruleguard v0.4.2/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI= github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= @@ -524,22 +555,30 @@ github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:r github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.3.0 h1:q15RT/pd6UggBXVBuLps8BXRvl5GPBcwVA7BJHMLuTw= -github.com/ryancurrah/gomodguard v1.3.0/go.mod h1:ggBxb3luypPEzqVtq33ee7YSN35V28XeGnid8dnni50= +github.com/ryancurrah/gomodguard v1.3.1 h1:fH+fUg+ngsQO0ruZXXHnA/2aNllWA1whly4a6UvyzGE= +github.com/ryancurrah/gomodguard v1.3.1/go.mod h1:DGFHzEhi6iJ0oIDfMuo3TgrS+L9gZvrEfmjjuelnRU0= github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= -github.com/sashamelentyev/usestdlibvars v1.24.0 h1:MKNzmXtGh5N0y74Z/CIaJh4GlB364l0K1RUT08WSWAc= -github.com/sashamelentyev/usestdlibvars v1.24.0/go.mod h1:9cYkq+gYJ+a5W2RPdhfaSCnTVUC1OQP/bSiiBhq3OZE= -github.com/securego/gosec/v2 v2.18.2 h1:DkDt3wCiOtAHf1XkiXZBhQ6m6mK/b9T/wD257R3/c+I= -github.com/securego/gosec/v2 v2.18.2/go.mod h1:xUuqSF6i0So56Y2wwohWAmB07EdBkUN6crbLlHwbyJs= -github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sashamelentyev/usestdlibvars v1.25.0 h1:IK8SI2QyFzy/2OD2PYnhy84dpfNo9qADrRt6LH8vSzU= +github.com/sashamelentyev/usestdlibvars v1.25.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8= +github.com/securego/gosec/v2 v2.19.0 h1:gl5xMkOI0/E6Hxx0XCY2XujA3V7SNSefA8sC+3f1gnk= +github.com/securego/gosec/v2 v2.19.0/go.mod h1:hOkDcHz9J/XIgIlPDXalxjeVYsHxoWUc5zJSHxcB8YM= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= @@ -552,28 +591,27 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= -github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt95do8= -github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= -github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= -github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= +github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= +github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= @@ -581,8 +619,9 @@ github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8L github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -591,11 +630,11 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ 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.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -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/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= @@ -604,22 +643,24 @@ github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= -github.com/tetafro/godot v1.4.15 h1:QzdIs+XB8q+U1WmQEWKHQbKmCw06QuQM7gLx/dky2RM= -github.com/tetafro/godot v1.4.15/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= +github.com/tetafro/godot v1.4.16 h1:4ChfhveiNLk4NveAZ9Pu2AN8QZ2nkUGFuadM9lrr5D0= +github.com/tetafro/godot v1.4.16/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= -github.com/tomarrell/wrapcheck/v2 v2.8.1 h1:HxSqDSN0sAt0yJYsrcYVoEeyM4aI9yAm3KQpIXDJRhQ= -github.com/tomarrell/wrapcheck/v2 v2.8.1/go.mod h1:/n2Q3NZ4XFT50ho6Hbxg+RV1uyo2Uow/Vdm9NQcl5SE= +github.com/tomarrell/wrapcheck/v2 v2.8.3 h1:5ov+Cbhlgi7s/a42BprYoxsr73CbdMUTzE3bRDFASUs= +github.com/tomarrell/wrapcheck/v2 v2.8.3/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= -github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI= -github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= +github.com/ultraware/whitespace v0.1.0 h1:O1HKYoh0kIeqE8sFqZf1o0qbORXUCOQFrlaQyZsczZw= +github.com/ultraware/whitespace v0.1.0/go.mod h1:/se4r3beMFNmewJ4Xmz0nMQ941GJt+qmSHGP9emHYe0= github.com/uudashr/gocognit v1.1.2 h1:l6BAEKJqQH2UpKAPKdMfZf5kE4W/2xk8pfU1OVLvniI= github.com/uudashr/gocognit v1.1.2/go.mod h1:aAVdLURqcanke8h3vg35BC++eseDm66Z7KmchI5et4k= +github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= +github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HHtvU= @@ -628,8 +669,8 @@ github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= github.com/yeya24/promlinter v0.2.0 h1:xFKDQ82orCU5jQujdaD8stOHiv8UN68BSdn2a8u8Y3o= github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= -github.com/ykadowak/zerologlint v0.1.3 h1:TLy1dTW3Nuc+YE3bYRPToG1Q9Ej78b5UUN6bjbGdxPE= -github.com/ykadowak/zerologlint v0.1.3/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= +github.com/ykadowak/zerologlint v0.1.5 h1:Gy/fMz1dFQN9JZTPjv1hxEk+sRWm05row04Yoolgdiw= +github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -639,51 +680,71 @@ github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= gitlab.com/bosi/decorder v0.4.1 h1:VdsdfxhstabyhZovHafFw+9eJ6eU0d2CkFNJcZz/NU4= gitlab.com/bosi/decorder v0.4.1/go.mod h1:jecSqWUew6Yle1pCr2eLWTensJMmsxHsBwt+PVbkAqA= -go-simpler.org/assert v0.6.0 h1:QxSrXa4oRuo/1eHMXSBFHKvJIpWABayzKldqZyugG7E= -go-simpler.org/sloglint v0.1.2 h1:IjdhF8NPxyn0Ckn2+fuIof7ntSnVUAqBFcQRrnG9AiM= -go-simpler.org/sloglint v0.1.2/go.mod h1:2LL+QImPfTslD5muNPydAEYmpXIj6o/WYcqnJjLi4o4= +go-simpler.org/assert v0.7.0 h1:OzWWZqfNxt8cLS+MlUp6Tgk1HjPkmgdKBq9qvy8lZsA= +go-simpler.org/assert v0.7.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= +go-simpler.org/musttag v0.9.0 h1:Dzt6/tyP9ONr5g9h9P3cnYWCxeBFRkd0uJL/w+1Mxos= +go-simpler.org/musttag v0.9.0/go.mod h1:gA9nThnalvNSKpEoyp3Ko4/vCX2xTpqKoUtNqXOnVR4= +go-simpler.org/sloglint v0.5.0 h1:2YCcd+YMuYpuqthCgubcF5lBSjb6berc5VMOYUHKrpY= +go-simpler.org/sloglint v0.5.0/go.mod h1:EUknX5s8iXqf18KQxKnaBHUPVriiPnOrPjjJcsaTcSQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opentelemetry.io/build-tools v0.12.0 h1:ZqK1GuqBp9Mf1RthYO3/jjf9tPWzeHMcVDo0itFi/lI= -go.opentelemetry.io/build-tools v0.12.0/go.mod h1:I76Qvv9cN055XJfTHw9t257EUd5Yp0EofeTMESlZuRU= -go.opentelemetry.io/build-tools/checkfile v0.12.0 h1:1g3iBxjPuack0pEvqkTiEcyh0uJvKXkQg8IMJkhiFX0= -go.opentelemetry.io/build-tools/checkfile v0.12.0/go.mod h1:0Ql58QUUwr2jaQJSjFKkAFkT/Eent7eEOKiQ1+R+zvA= -go.opentelemetry.io/build-tools/chloggen v0.12.0 h1:BFj/1bNIGxOs1GykGjhV4gycz1nqVWI/xVDUaVfNibw= -go.opentelemetry.io/build-tools/chloggen v0.12.0/go.mod h1:zuYbAo3TkrHo3C7lCrM5dHWSS50BDr0UfRYtyBFv2dQ= -go.opentelemetry.io/build-tools/crosslink v0.12.0 h1:GNJQURuabE5rAkIbnrqndIKyXrr7wFy54e/8ujkgjHg= -go.opentelemetry.io/build-tools/crosslink v0.12.0/go.mod h1:QE8Kxf4Ygg2ltSHE+Vdys/67jtQM26j7spJLyjNA2DU= -go.opentelemetry.io/build-tools/issuegenerator v0.12.0 h1:KRP7aSUR9JoqNwv+Pp595vj9NtyTlkgi+vKrYM6ZnhA= -go.opentelemetry.io/build-tools/issuegenerator v0.12.0/go.mod h1:G71Og7dZJoIC+MjuY1InQ/oeAOkM1S5Nv6CCnlOdqns= -go.opentelemetry.io/build-tools/multimod v0.12.0 h1:DKi+A+4EaKrOZDTNDDZz3ijiAduEQDo8j1rzWUaGUHo= -go.opentelemetry.io/build-tools/multimod v0.12.0/go.mod h1:w03q3WgZs7reoBNnmfdClkKdTIA/IHM8ric5E2jEDD0= -go.opentelemetry.io/collector/cmd/builder v0.89.0 h1:L5rnsOAL5UX/EZgzJt6d6p0QKHf6bVSsnGRqfEPV1yM= -go.opentelemetry.io/collector/cmd/builder v0.89.0/go.mod h1:wcxXrQyLrzvYKXCG3CqDkFpbL35cBCHke6wk2RFvmZk= -go.tmz.dev/musttag v0.7.2 h1:1J6S9ipDbalBSODNT5jCep8dhZyMr4ttnjQagmGYR5s= -go.tmz.dev/musttag v0.7.2/go.mod h1:m6q5NiiSKMnQYokefa2xGoyoXnrswCbJ0AWYzf4Zs28= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/build-tools v0.13.0 h1:0I3jJQ2zcJU8k4ZjyHNqUBX2Len1UvBIOzVP4b50g9A= +go.opentelemetry.io/build-tools v0.13.0/go.mod h1:PEtg5iWjNI9WAlKXP/xll/hgbq/Cp4Ma4T1ssKB2T0Q= +go.opentelemetry.io/build-tools/checkfile v0.13.0 h1:Nq13fOLpF9T+y4birZbfv6JurFC1Pla5UwC+t0GMbAo= +go.opentelemetry.io/build-tools/checkfile v0.13.0/go.mod h1:fRNphqnBebBiwL1A3OofgCDiJ6enb73uKGIO+n0gHPI= +go.opentelemetry.io/build-tools/chloggen v0.13.0 h1:C30r8ecNuJ30T3+vSvFJhaXUjUpx6r07nM3weDCpS7U= +go.opentelemetry.io/build-tools/chloggen v0.13.0/go.mod h1:1Ueg04+D2eU7Lm80RqS4DYTdtkHwTmulQZL0tUI4iAk= +go.opentelemetry.io/build-tools/crosslink v0.13.0 h1:R0V89bTYzoJpasiOIYiQo6txL/ZTzMdEuthJ4gLUTF8= +go.opentelemetry.io/build-tools/crosslink v0.13.0/go.mod h1:aYIwOj9b3Nmgm6nIZZk28tF/JjpicI8xenEVUeoVNp0= +go.opentelemetry.io/build-tools/issuegenerator v0.13.0 h1:hAzDPWh/oyBVoYRB5Xb8Y6/3Zs0/JD3uwkp1pQWt8vM= +go.opentelemetry.io/build-tools/issuegenerator v0.13.0/go.mod h1:hHPQ5lv0apJv0QM8mz/k5nAwacDEEDD+fJ8xYhrKjBM= +go.opentelemetry.io/build-tools/multimod v0.13.0 h1:HGAP3zCM8vOTNJSQbjQ5VbKZSctIZxppPBxRTzye7ic= +go.opentelemetry.io/build-tools/multimod v0.13.0/go.mod h1:CxZp68c4PIN+bYlVOGB2FvE5zZMBuGz7cGSHv2L7pSc= +go.opentelemetry.io/collector/cmd/builder v0.98.0 h1:wYKkcUfAT/WH+gyjPLCnrDfayhE8i+I6Z4n8jGn/uzo= +go.opentelemetry.io/collector/cmd/builder v0.98.0/go.mod h1:e2vx8JvEaGJAy0NVJdX9VjhGzALbezLzdvJNqwClf4w= +go.opentelemetry.io/collector/cmd/mdatagen v0.98.0 h1:6oPAYm4+vefhvnIrb9LpqPYEuBvMhEhX4DJ7tLgewfQ= +go.opentelemetry.io/collector/cmd/mdatagen v0.98.0/go.mod h1:MDmQWcrr10eAH8VeLGg1WNBe5DRp9OjIzM/5N4b2V5M= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0 h1:SxDS+Yr8qE+ID58ELR5n0D+SUlqHKOZ72pK3YPFAelA= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.98.0/go.mod h1:DEoB0d0k1iGt4KEABntL8AW9xYQ6E7fmgkM2/s8aXvM= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= +go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -694,12 +755,12 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea h1:vLCWI/yYrdEHyN2JzIzPO3aaQJHQdp89IZBA/+azVC4= -golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 h1:jWGQJV4niP+CCmFW9ekjA9Zx8vYORzOUH2/Nl5WPuLQ= -golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8= +golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -712,7 +773,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -721,7 +781,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= @@ -730,8 +789,10 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -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/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -761,9 +822,6 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -775,20 +833,18 @@ golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -802,8 +858,9 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/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.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +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-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -836,23 +893,19 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -864,8 +917,10 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -873,19 +928,24 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -933,19 +993,14 @@ golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= @@ -959,10 +1014,11 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= -golang.org/x/vuln v1.0.1 h1:KUas02EjQK5LTuIx1OylBQdKKZ9jeugs+HiqO5HormU= -golang.org/x/vuln v1.0.1/go.mod h1:bb2hMwln/tqxg32BNY4CcxHWtHXuYa3SbIBmtsyjxtM= +golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= +golang.org/x/vuln v1.0.4 h1:SP0mPeg2PmGCu03V+61EcQiOjmpri2XijexKdzv8Z1I= +golang.org/x/vuln v1.0.4/go.mod h1:NbJdUQhX8jY++FtuhrXs2Eyx0yePo9pF7nPlIjo9aaQ= 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= @@ -983,17 +1039,14 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1023,13 +1076,8 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1042,10 +1090,8 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -1058,13 +1104,14 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -1080,6 +1127,10 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/gotestsum v1.11.0 h1:A88/QWw7acMjZH1dMe6KZFhw32odUOIjCiAU/Q4n3mI= +gotest.tools/gotestsum v1.11.0/go.mod h1:cUOKgFEvWAP0twchmiOvdzX0SBZX0UI58bGRpRIu4xs= +gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo= +gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1087,16 +1138,12 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.4.6 h1:oFEHCKeID7to/3autwsWfnuv69j3NsfcXbvJKuIcep8= -honnef.co/go/tools v0.4.6/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= -mvdan.cc/gofumpt v0.5.0 h1:0EQ+Z56k8tXjj/6TQD25BFNKQXpCvT0rnansIc7Ug5E= -mvdan.cc/gofumpt v0.5.0/go.mod h1:HBeVDtMKRZpXyxFciAirzdKklDlGu8aAy1wEbH5Y9js= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20230312165513-e84e2d14e3b8 h1:VuJo4Mt0EVPychre4fNlDWDuE5AjXtPJpRUWqZDQhaI= -mvdan.cc/unparam v0.0.0-20230312165513-e84e2d14e3b8/go.mod h1:Oh/d7dEtzsNHGOq1Cdv8aMm3KdKhVvPbRQcM8WFpBR8= +honnef.co/go/tools v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs= +honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= +mvdan.cc/gofumpt v0.6.0 h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo= +mvdan.cc/gofumpt v0.6.0/go.mod h1:4L0wf+kgIPZtcCWXynNS2e6bhmj73umwnuXSZarixzA= +mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14 h1:zCr3iRRgdk5eIikZNDphGcM6KGVTx3Yu+/Uu9Es254w= +mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14/go.mod h1:ZzZjEpJDOmx8TdVU6umamY3Xy0UAQUI2DHbf05USVbI= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/internal/tools/package_test.go b/internal/tools/package_test.go new file mode 100644 index 000000000000..7ab0a601908f --- /dev/null +++ b/internal/tools/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package tools + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/tools/tools.go b/internal/tools/tools.go index 0f1dd8328b18..a941c9512234 100644 --- a/internal/tools/tools.go +++ b/internal/tools/tools.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build tools -// +build tools package tools // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/tools" @@ -12,6 +11,7 @@ package tools // import "github.com/open-telemetry/opentelemetry-collector-contr // This ensures that all systems use the same version of tools in addition to regular dependencies. import ( + _ "github.com/Khan/genqlient" _ "github.com/client9/misspell/cmd/misspell" _ "github.com/daixiang0/gci" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" @@ -24,6 +24,8 @@ import ( _ "go.opentelemetry.io/build-tools/issuegenerator" _ "go.opentelemetry.io/build-tools/multimod" _ "go.opentelemetry.io/collector/cmd/builder" + _ "go.opentelemetry.io/collector/cmd/mdatagen" _ "golang.org/x/tools/cmd/goimports" _ "golang.org/x/vuln/cmd/govulncheck" + _ "gotest.tools/gotestsum" ) diff --git a/override/aws/imdsretryer.go b/override/aws/imdsretryer.go index 229b16749b4a..b96699b38112 100644 --- a/override/aws/imdsretryer.go +++ b/override/aws/imdsretryer.go @@ -4,6 +4,8 @@ package aws // import "github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws" import ( + "errors" + "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/request" @@ -38,7 +40,8 @@ func (r IMDSRetryer) ShouldRetry(req *request.Request) bool { // EC2MetadataError is not retryable by default // Fallback to SDK's built in retry rules shouldRetry := false - if awsError, ok := req.Error.(awserr.Error); r.DefaultRetryer.ShouldRetry(req) || (ok && awsError != nil && awsError.Code() == "EC2MetadataError") { + var awsError awserr.Error + if r.DefaultRetryer.ShouldRetry(req) || (errors.As(req.Error, &awsError) && awsError != nil && awsError.Code() == "EC2MetadataError") { shouldRetry = true } if r.logger != nil { diff --git a/pkg/batchperresourceattr/batchperresourceattr.go b/pkg/batchperresourceattr/batchperresourceattr.go index ab29bcc2a1bc..92f55b6481da 100644 --- a/pkg/batchperresourceattr/batchperresourceattr.go +++ b/pkg/batchperresourceattr/batchperresourceattr.go @@ -5,6 +5,7 @@ package batchperresourceattr // import "github.com/open-telemetry/opentelemetry- import ( "context" + "fmt" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/plog" @@ -13,15 +14,24 @@ import ( "go.uber.org/multierr" ) +var separator = string([]byte{0x0, 0x1}) + type batchTraces struct { - attrKey string - next consumer.Traces + attrKeys []string + next consumer.Traces } func NewBatchPerResourceTraces(attrKey string, next consumer.Traces) consumer.Traces { return &batchTraces{ - attrKey: attrKey, - next: next, + attrKeys: []string{attrKey}, + next: next, + } +} + +func NewMultiBatchPerResourceTraces(attrKeys []string, next consumer.Traces) consumer.Traces { + return &batchTraces{ + attrKeys: attrKeys, + next: next, } } @@ -42,9 +52,13 @@ func (bt *batchTraces) ConsumeTraces(ctx context.Context, td ptrace.Traces) erro for i := 0; i < lenRss; i++ { rs := rss.At(i) var attrVal string - if attributeValue, ok := rs.Resource().Attributes().Get(bt.attrKey); ok { - attrVal = attributeValue.Str() + + for _, k := range bt.attrKeys { + if attributeValue, ok := rs.Resource().Attributes().Get(k); ok { + attrVal = fmt.Sprintf("%s%s%s", attrVal, separator, attributeValue.Str()) + } } + indicesByAttr[attrVal] = append(indicesByAttr[attrVal], i) } // If there is a single attribute value, then call next. @@ -66,14 +80,21 @@ func (bt *batchTraces) ConsumeTraces(ctx context.Context, td ptrace.Traces) erro } type batchMetrics struct { - attrKey string - next consumer.Metrics + attrKeys []string + next consumer.Metrics } func NewBatchPerResourceMetrics(attrKey string, next consumer.Metrics) consumer.Metrics { return &batchMetrics{ - attrKey: attrKey, - next: next, + attrKeys: []string{attrKey}, + next: next, + } +} + +func NewMultiBatchPerResourceMetrics(attrKeys []string, next consumer.Metrics) consumer.Metrics { + return &batchMetrics{ + attrKeys: attrKeys, + next: next, } } @@ -94,8 +115,10 @@ func (bt *batchMetrics) ConsumeMetrics(ctx context.Context, td pmetric.Metrics) for i := 0; i < lenRms; i++ { rm := rms.At(i) var attrVal string - if attributeValue, ok := rm.Resource().Attributes().Get(bt.attrKey); ok { - attrVal = attributeValue.Str() + for _, k := range bt.attrKeys { + if attributeValue, ok := rm.Resource().Attributes().Get(k); ok { + attrVal = fmt.Sprintf("%s%s%s", attrVal, separator, attributeValue.Str()) + } } indicesByAttr[attrVal] = append(indicesByAttr[attrVal], i) } @@ -118,14 +141,21 @@ func (bt *batchMetrics) ConsumeMetrics(ctx context.Context, td pmetric.Metrics) } type batchLogs struct { - attrKey string - next consumer.Logs + attrKeys []string + next consumer.Logs } func NewBatchPerResourceLogs(attrKey string, next consumer.Logs) consumer.Logs { return &batchLogs{ - attrKey: attrKey, - next: next, + attrKeys: []string{attrKey}, + next: next, + } +} + +func NewMultiBatchPerResourceLogs(attrKeys []string, next consumer.Logs) consumer.Logs { + return &batchLogs{ + attrKeys: attrKeys, + next: next, } } @@ -146,8 +176,10 @@ func (bt *batchLogs) ConsumeLogs(ctx context.Context, td plog.Logs) error { for i := 0; i < lenRls; i++ { rl := rls.At(i) var attrVal string - if attributeValue, ok := rl.Resource().Attributes().Get(bt.attrKey); ok { - attrVal = attributeValue.Str() + for _, k := range bt.attrKeys { + if attributeValue, ok := rl.Resource().Attributes().Get(k); ok { + attrVal = fmt.Sprintf("%s%s%s", attrVal, separator, attributeValue.Str()) + } } indicesByAttr[attrVal] = append(indicesByAttr[attrVal], i) } diff --git a/pkg/batchperresourceattr/batchperresourceattr_test.go b/pkg/batchperresourceattr/batchperresourceattr_test.go index ede4a6f0a513..4d3bddbe9100 100644 --- a/pkg/batchperresourceattr/batchperresourceattr_test.go +++ b/pkg/batchperresourceattr/batchperresourceattr_test.go @@ -99,6 +99,35 @@ func TestSplitTracesIntoDifferentBatches(t *testing.T) { assert.Equal(t, newTraces(expected.ResourceSpans().At(3), expected.ResourceSpans().At(7)), outBatches[4]) } +func TestSplitTracesIntoDifferentBatchesWithMultipleKeys(t *testing.T) { + inBatch := ptrace.NewTraces() + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", "1", "attr_key2", "1") + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", "2", "attr_key2", "2") + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", "3", "attr_key2", "3") + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", "4", "attr_key2", "4") + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", "1", "attr_key2", "1") + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", "2", "attr_key2", "2") + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", "3", "attr_key2", "3") + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", "4", "attr_key2", "4") + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", "5", "attr_key2", "6") + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "diff_attr_key", "1") + expected := ptrace.NewTraces() + inBatch.CopyTo(expected) + + sink := new(consumertest.TracesSink) + bpr := NewMultiBatchPerResourceTraces([]string{"attr_key", "attr_key2"}, sink) + assert.NoError(t, bpr.ConsumeTraces(context.Background(), inBatch)) + outBatches := sink.AllTraces() + require.Len(t, outBatches, 6) + sortTraces(outBatches, "attr_key") + assert.Equal(t, newTraces(expected.ResourceSpans().At(9)), outBatches[0]) + assert.Equal(t, newTraces(expected.ResourceSpans().At(0), expected.ResourceSpans().At(4)), outBatches[1]) + assert.Equal(t, newTraces(expected.ResourceSpans().At(1), expected.ResourceSpans().At(5)), outBatches[2]) + assert.Equal(t, newTraces(expected.ResourceSpans().At(2), expected.ResourceSpans().At(6)), outBatches[3]) + assert.Equal(t, newTraces(expected.ResourceSpans().At(3), expected.ResourceSpans().At(7)), outBatches[4]) + assert.Equal(t, newTraces(expected.ResourceSpans().At(8)), outBatches[5]) +} + func TestSplitMetricsOneResourceMetrics(t *testing.T) { inBatch := pmetric.NewMetrics() fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", "1") @@ -180,6 +209,35 @@ func TestSplitMetricsIntoDifferentBatches(t *testing.T) { assert.Equal(t, newMetrics(expected.ResourceMetrics().At(3), expected.ResourceMetrics().At(7)), outBatches[4]) } +func TestSplitMetricsIntoDifferentBatchesWithMultipleKeys(t *testing.T) { + inBatch := pmetric.NewMetrics() + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", "1", "attr_key2", "1") + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", "2", "attr_key2", "2") + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", "3", "attr_key2", "3") + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", "4", "attr_key2", "4") + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", "1", "attr_key2", "1") + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", "2", "attr_key2", "2") + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", "3", "attr_key2", "3") + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", "4", "attr_key2", "4") + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", "5", "attr_key2", "6") + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "diff_attr_key", "1") + expected := pmetric.NewMetrics() + inBatch.CopyTo(expected) + + sink := new(consumertest.MetricsSink) + bpr := NewMultiBatchPerResourceMetrics([]string{"attr_key", "attr_key2"}, sink) + assert.NoError(t, bpr.ConsumeMetrics(context.Background(), inBatch)) + outBatches := sink.AllMetrics() + require.Len(t, outBatches, 6) + sortMetrics(outBatches, "attr_key") + assert.Equal(t, newMetrics(expected.ResourceMetrics().At(9)), outBatches[0]) + assert.Equal(t, newMetrics(expected.ResourceMetrics().At(0), expected.ResourceMetrics().At(4)), outBatches[1]) + assert.Equal(t, newMetrics(expected.ResourceMetrics().At(1), expected.ResourceMetrics().At(5)), outBatches[2]) + assert.Equal(t, newMetrics(expected.ResourceMetrics().At(2), expected.ResourceMetrics().At(6)), outBatches[3]) + assert.Equal(t, newMetrics(expected.ResourceMetrics().At(3), expected.ResourceMetrics().At(7)), outBatches[4]) + assert.Equal(t, newMetrics(expected.ResourceMetrics().At(8)), outBatches[5]) +} + func TestSplitLogsOneResourceLogs(t *testing.T) { inBatch := plog.NewLogs() fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", "1") @@ -261,6 +319,35 @@ func TestSplitLogsIntoDifferentBatches(t *testing.T) { assert.Equal(t, newLogs(expected.ResourceLogs().At(3), expected.ResourceLogs().At(7)), outBatches[4]) } +func TestSplitLogsIntoDifferentBatchesWithMultipleKeys(t *testing.T) { + inBatch := plog.NewLogs() + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", "1", "attr_key2", "1") + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", "2", "attr_key2", "2") + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", "3", "attr_key2", "3") + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", "4", "attr_key2", "4") + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", "1", "attr_key2", "1") + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", "2", "attr_key2", "2") + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", "3", "attr_key2", "3") + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", "4", "attr_key2", "4") + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", "5", "attr_key2", "6") + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "diff_attr_key", "1") + expected := plog.NewLogs() + inBatch.CopyTo(expected) + + sink := new(consumertest.LogsSink) + bpr := NewMultiBatchPerResourceLogs([]string{"attr_key", "attr_key2"}, sink) + assert.NoError(t, bpr.ConsumeLogs(context.Background(), inBatch)) + outBatches := sink.AllLogs() + require.Len(t, outBatches, 6) + sortLogs(outBatches, "attr_key") + assert.Equal(t, newLogs(expected.ResourceLogs().At(9)), outBatches[0]) + assert.Equal(t, newLogs(expected.ResourceLogs().At(0), expected.ResourceLogs().At(4)), outBatches[1]) + assert.Equal(t, newLogs(expected.ResourceLogs().At(1), expected.ResourceLogs().At(5)), outBatches[2]) + assert.Equal(t, newLogs(expected.ResourceLogs().At(2), expected.ResourceLogs().At(6)), outBatches[3]) + assert.Equal(t, newLogs(expected.ResourceLogs().At(3), expected.ResourceLogs().At(7)), outBatches[4]) + assert.Equal(t, newLogs(expected.ResourceLogs().At(8)), outBatches[5]) +} + func newTraces(rss ...ptrace.ResourceSpans) ptrace.Traces { td := ptrace.NewTraces() for _, rs := range rss { @@ -283,8 +370,11 @@ func sortTraces(tds []ptrace.Traces, attrKey string) { }) } -func fillResourceSpans(rs ptrace.ResourceSpans, key string, val string) { - rs.Resource().Attributes().PutStr(key, val) +func fillResourceSpans(rs ptrace.ResourceSpans, kv ...string) { + for i := 0; i < len(kv); i += 2 { + rs.Resource().Attributes().PutStr(kv[i], kv[i+1]) + } + rs.Resource().Attributes().PutInt("__other_key__", 123) ils := rs.ScopeSpans().AppendEmpty() firstSpan := ils.Spans().AppendEmpty() @@ -317,8 +407,10 @@ func sortMetrics(tds []pmetric.Metrics, attrKey string) { }) } -func fillResourceMetrics(rs pmetric.ResourceMetrics, key string, val string) { - rs.Resource().Attributes().PutStr(key, val) +func fillResourceMetrics(rs pmetric.ResourceMetrics, kv ...string) { + for i := 0; i < len(kv); i += 2 { + rs.Resource().Attributes().PutStr(kv[i], kv[i+1]) + } rs.Resource().Attributes().PutInt("__other_key__", 123) ils := rs.ScopeMetrics().AppendEmpty() firstMetric := ils.Metrics().AppendEmpty() @@ -351,8 +443,10 @@ func sortLogs(tds []plog.Logs, attrKey string) { }) } -func fillResourceLogs(rs plog.ResourceLogs, key string, val string) { - rs.Resource().Attributes().PutStr(key, val) +func fillResourceLogs(rs plog.ResourceLogs, kv ...string) { + for i := 0; i < len(kv); i += 2 { + rs.Resource().Attributes().PutStr(kv[i], kv[i+1]) + } rs.Resource().Attributes().PutInt("__other_key__", 123) ils := rs.ScopeLogs().AppendEmpty() firstLogRecord := ils.LogRecords().AppendEmpty() diff --git a/pkg/batchperresourceattr/go.mod b/pkg/batchperresourceattr/go.mod index f405aad15b3a..54f7959920d2 100644 --- a/pkg/batchperresourceattr/go.mod +++ b/pkg/batchperresourceattr/go.mod @@ -1,11 +1,12 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 ) @@ -17,12 +18,12 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/batchperresourceattr/go.sum b/pkg/batchperresourceattr/go.sum index 73caacd1f4e9..e2db7a8d914f 100644 --- a/pkg/batchperresourceattr/go.sum +++ b/pkg/batchperresourceattr/go.sum @@ -7,14 +7,17 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS 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/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +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/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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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= @@ -23,17 +26,21 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY 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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +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= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -45,16 +52,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -67,15 +74,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/pkg/batchperresourceattr/package_test.go b/pkg/batchperresourceattr/package_test.go new file mode 100644 index 000000000000..3fc4fbaf2339 --- /dev/null +++ b/pkg/batchperresourceattr/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package batchperresourceattr + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/batchpersignal/go.mod b/pkg/batchpersignal/go.mod index ad91478adf77..c0fc72859a63 100644 --- a/pkg/batchpersignal/go.mod +++ b/pkg/batchpersignal/go.mod @@ -1,10 +1,11 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.uber.org/goleak v1.3.0 ) require ( @@ -17,12 +18,12 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/batchpersignal/go.sum b/pkg/batchpersignal/go.sum index 5ebddce89f78..513f8f49d8fa 100644 --- a/pkg/batchpersignal/go.sum +++ b/pkg/batchpersignal/go.sum @@ -8,13 +8,15 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS 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/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +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/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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -25,14 +27,17 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY 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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +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= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -44,16 +49,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -66,15 +71,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/pkg/batchpersignal/package_test.go b/pkg/batchpersignal/package_test.go new file mode 100644 index 000000000000..173284e56a48 --- /dev/null +++ b/pkg/batchpersignal/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package batchpersignal + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/experimentalmetricmetadata/go.mod b/pkg/experimentalmetricmetadata/go.mod index 4e3be08fad3c..4afef029db4d 100644 --- a/pkg/experimentalmetricmetadata/go.mod +++ b/pkg/experimentalmetricmetadata/go.mod @@ -1,10 +1,11 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.uber.org/goleak v1.3.0 ) require ( @@ -17,12 +18,12 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/experimentalmetricmetadata/go.sum b/pkg/experimentalmetricmetadata/go.sum index 5ebddce89f78..513f8f49d8fa 100644 --- a/pkg/experimentalmetricmetadata/go.sum +++ b/pkg/experimentalmetricmetadata/go.sum @@ -8,13 +8,15 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS 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/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +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/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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -25,14 +27,17 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY 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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +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= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -44,16 +49,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -66,15 +71,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/pkg/experimentalmetricmetadata/package_test.go b/pkg/experimentalmetricmetadata/package_test.go new file mode 100644 index 000000000000..6607117e0e2e --- /dev/null +++ b/pkg/experimentalmetricmetadata/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package experimentalmetricmetadata + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/golden/README.md b/pkg/golden/README.md index aa5376e0b3d6..6f3880ec2f53 100644 --- a/pkg/golden/README.md +++ b/pkg/golden/README.md @@ -14,16 +14,16 @@ The package is expected to be used with pkg/pdatatest module. ## Generating an expected result file -The easiest way to capture the expected result in a file is `golden.WriteMetrics` or `golden.WriteLogs`. +The easiest way to capture the expected result in a file is `golden.WriteMetrics`, `golden.WriteTraces` or `golden.WriteLogs`. When writing a new test: 1. Write the test as if the expected file exists. 2. Follow the steps below for updating an existing test. When updating an existing test: -1. Add a call to `golden.WriteMetrics` or `golden.WriteLogs` or in the appropriate place. +1. Add a call to `golden.WriteMetrics`, `golden.WriteTraces` or `golden.WriteLogs` or in the appropriate place. 2. Run the test once. -3. Remove the call to `golden.WriteMetrics` or `golden.WriteLogs`. +3. Remove the call to `golden.WriteMetrics`, `golden.WriteTraces` or `golden.WriteLogs`. NOTE: `golden.WriteMetrics` will always mark the test as failed. This behavior is necessary to ensure the function is removed after the golden file is written. diff --git a/pkg/golden/go.mod b/pkg/golden/go.mod index ce7b805115ba..4c209f7aabc3 100644 --- a/pkg/golden/go.mod +++ b/pkg/golden/go.mod @@ -1,16 +1,17 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.uber.org/goleak v1.3.0 gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect @@ -19,12 +20,12 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect ) replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil => ../pdatautil diff --git a/pkg/golden/go.sum b/pkg/golden/go.sum index 631af84dc5a1..88e7d75f89c0 100644 --- a/pkg/golden/go.sum +++ b/pkg/golden/go.sum @@ -1,5 +1,5 @@ -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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -9,14 +9,17 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS 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/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +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/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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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= @@ -25,14 +28,17 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY 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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +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= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -44,16 +50,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -66,15 +72,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/pkg/golden/golden.go b/pkg/golden/golden.go index 2c7bc70c04ae..823f2b143766 100644 --- a/pkg/golden/golden.go +++ b/pkg/golden/golden.go @@ -37,8 +37,8 @@ func ReadMetrics(filePath string) (pmetric.Metrics, error) { } // WriteMetrics writes a pmetric.Metrics to the specified file in YAML format. -func WriteMetrics(t *testing.T, filePath string, metrics pmetric.Metrics) error { - if err := writeMetrics(filePath, metrics); err != nil { +func WriteMetrics(t testing.TB, filePath string, metrics pmetric.Metrics, opts ...WriteMetricsOption) error { + if err := writeMetrics(filePath, metrics, opts...); err != nil { return err } t.Logf("Golden file successfully written to %s.", filePath) @@ -68,9 +68,20 @@ func MarshalMetricsYAML(metrics pmetric.Metrics) ([]byte, error) { } // writeMetrics writes a pmetric.Metrics to the specified file in YAML format. -func writeMetrics(filePath string, metrics pmetric.Metrics) error { +func writeMetrics(filePath string, metrics pmetric.Metrics, opts ...WriteMetricsOption) error { + optsStruct := writeMetricsOptions{ + normalizeTimestamps: true, + } + + for _, opt := range opts { + opt(&optsStruct) + } + sortMetrics(metrics) - normalizeTimestamps(metrics) + if optsStruct.normalizeTimestamps { + normalizeTimestamps(metrics) + } + b, err := MarshalMetricsYAML(metrics) if err != nil { return err @@ -99,7 +110,7 @@ func ReadLogs(filePath string) (plog.Logs, error) { } // WriteLogs writes a plog.Logs to the specified file in YAML format. -func WriteLogs(t *testing.T, filePath string, logs plog.Logs) error { +func WriteLogs(t testing.TB, filePath string, logs plog.Logs) error { if err := writeLogs(filePath, logs); err != nil { return err } @@ -150,7 +161,7 @@ func ReadTraces(filePath string) (ptrace.Traces, error) { } // WriteTraces writes a ptrace.Traces to the specified file in YAML format. -func WriteTraces(t *testing.T, filePath string, traces ptrace.Traces) error { +func WriteTraces(t testing.TB, filePath string, traces ptrace.Traces) error { if err := writeTraces(filePath, traces); err != nil { return err } diff --git a/pkg/golden/golden_test.go b/pkg/golden/golden_test.go index 38c2fd2d6552..3b7550f82de7 100644 --- a/pkg/golden/golden_test.go +++ b/pkg/golden/golden_test.go @@ -42,6 +42,29 @@ func TestWriteMetrics(t *testing.T) { require.Equal(t, expectedBytes, actualBytes) } +func TestWriteMetrics_SkipTimestampNormalization(t *testing.T) { + metricslice := testMetrics() + metrics := pmetric.NewMetrics() + metricslice.CopyTo(metrics.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics()) + + actualFile := filepath.Join(t.TempDir(), "metrics.yaml") + require.NoError(t, writeMetrics(actualFile, metrics, SkipMetricTimestampNormalization())) + + actualBytes, err := os.ReadFile(actualFile) + require.NoError(t, err) + + expectedFile := filepath.Join("testdata", "skip-timestamp-norm", "expected.yaml") + expectedBytes, err := os.ReadFile(expectedFile) + require.NoError(t, err) + + if runtime.GOOS == "windows" { + // os.ReadFile adds a '\r' that we don't actually expect + expectedBytes = bytes.ReplaceAll(expectedBytes, []byte("\r\n"), []byte("\n")) + } + + require.Equal(t, string(expectedBytes), string(actualBytes)) +} + func TestReadMetrics(t *testing.T) { metricslice := testMetrics() expectedMetrics := pmetric.NewMetrics() diff --git a/pkg/golden/metrics_options.go b/pkg/golden/metrics_options.go new file mode 100644 index 000000000000..8c255ff90bba --- /dev/null +++ b/pkg/golden/metrics_options.go @@ -0,0 +1,18 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package golden // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden" + +// WriteMetricsOption is an option for the WriteMetrics function +type WriteMetricsOption func(*writeMetricsOptions) + +type writeMetricsOptions struct { + normalizeTimestamps bool +} + +// SkipMetricTimestampNormalization is an option that skips normalizing timestamps before writing metrics to disk. +func SkipMetricTimestampNormalization() WriteMetricsOption { + return func(wmo *writeMetricsOptions) { + wmo.normalizeTimestamps = false + } +} diff --git a/pkg/golden/package_test.go b/pkg/golden/package_test.go new file mode 100644 index 000000000000..dc13d3e46db2 --- /dev/null +++ b/pkg/golden/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package golden + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/golden/testdata/skip-timestamp-norm/expected.yaml b/pkg/golden/testdata/skip-timestamp-norm/expected.yaml new file mode 100644 index 000000000000..43646d69cb75 --- /dev/null +++ b/pkg/golden/testdata/skip-timestamp-norm/expected.yaml @@ -0,0 +1,66 @@ +resourceMetrics: + - resource: {} + scopeMetrics: + - metrics: + - description: multi gauge + gauge: + dataPoints: + - asDouble: 2 + attributes: + - key: testKey1 + value: + stringValue: teststringvalue1 + - key: testKey2 + value: + stringValue: testvalue1 + timeUnixNano: "11651379494838206464" + - asDouble: 2 + attributes: + - key: testKey1 + value: + stringValue: teststringvalue2 + - key: testKey2 + value: + stringValue: testvalue2 + timeUnixNano: "11651379494838206464" + name: test gauge multi + unit: "1" + - description: single gauge + gauge: + dataPoints: + - asInt: "2" + attributes: + - key: testKey2 + value: + stringValue: teststringvalue2 + timeUnixNano: "11651379494838206464" + name: test gauge single + unit: By + - description: multi sum + name: test delta sum multi + sum: + aggregationTemporality: 1 + dataPoints: + - asInt: "2" + attributes: + - key: testKey2 + value: + stringValue: teststringvalue2 + timeUnixNano: "11651379494838206464" + - asInt: "2" + attributes: + - key: testKey2 + value: + stringValue: teststringvalue2 + timeUnixNano: "11651379494838206464" + unit: s + - description: single sum + name: test cumulative sum single + sum: + aggregationTemporality: 2 + dataPoints: + - asDouble: 2 + timeUnixNano: "869965261000000001" + isMonotonic: true + unit: 1/s + scope: {} diff --git a/pkg/ottl/CONTRIBUTING.md b/pkg/ottl/CONTRIBUTING.md index cb7c9f216121..c644810d2c49 100644 --- a/pkg/ottl/CONTRIBUTING.md +++ b/pkg/ottl/CONTRIBUTING.md @@ -19,7 +19,7 @@ When adding new values to the grammar you must: All new functions must be added via a new file. Function files must start with `func_`. Functions must be placed in `ottlfuncs`. -Unit tests must be added for all new functions. Unit test files must start with `func_` and end in `_test`. Unit tests must be placed in the same directory as the function. Functions that are not specific to a pipeline should be tested independently of any specific pipeline. Functions that are specific to a pipeline should be tests against that pipeline. +Unit tests must be added for all new functions. Unit test files must start with `func_` and end in `_test`. Unit tests must be placed in the same directory as the function. Functions that are not specific to a pipeline should be tested independently of any specific pipeline. Functions that are specific to a pipeline should be tests against that pipeline. End-to-end tests must be added in the `e2e` directory. Function names should follow the [Function Syntax Guidelines](ottlfuncs/README.md#function-syntax) diff --git a/pkg/ottl/LANGUAGE.md b/pkg/ottl/LANGUAGE.md new file mode 100644 index 000000000000..05df67e0ffef --- /dev/null +++ b/pkg/ottl/LANGUAGE.md @@ -0,0 +1,298 @@ +## Grammar + +The OTTL grammar includes function invocations, Values and Boolean Expressions. These parts all fit into a Statement, which is the basis of execution in the OTTL. + +### Design principles + +OTTL is intended as a domain-specific language (DSL) for telemetry mutation and generation, +and is not intended to be used as a general-purpose programming language. + +OTTL has been designed to work directly with [pdata](https://github.com/open-telemetry/opentelemetry-collector/tree/main/pdata), but can operate on other data formats. + +### Editors + +Editors are functions that transform the underlying telemetry payload. They may return a value, but typically do not. There must be a single Editor Invocation in each OTTL statement. + +An Editor is made up of 2 parts: + +- a string identifier. The string identifier must start with a lowercase letter. +- zero or more Values (comma separated) surrounded by parentheses (`()`). + +**The OTTL has no built-in Editors.** +Users must supply a map between string identifiers and Editor implementations. +The OTTL will use this map to determine which implementation to call when executing a Statement. +See [ottlfuncs](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/ottlfuncs#editors) for pre-made, usable Editors. + +### Converters + +Converters are functions that convert data to a new format before being passed as a function argument or used in a Boolean Expression. +Converters are made up of 3 parts: + +- a string identifier. The string identifier must start with an uppercase letter. +- zero or more Values (comma separated) surrounded by parentheses (`()`). +- a combination of zero or more a string key (`["key"]`) or int key (`[0]`) + +**The OTTL has no built-in Converters.** +Users must include Converters in the same map that Editors are supplied. +The OTTL will use this map and reflection to generate Converters that can then be invoked by the user. +See [ottlfuncs](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/ottlfuncs#converters) for pre-made, usable Converters. + +When keys are supplied the value returned by the Converter will be indexed by the keys in order. +If keys are supplied to a Converter and the return value cannot be indexed, or if the return value doesn't support the +type of key supplied, OTTL will error. Supported values are: + +| Type | Index Type | +|------------------|------------| +| `pcommon.Map` | `String` | +| `map[string]any` | `String` | +| `pcommon.Slice` | `Int` | +| `[]any` | `Int` | + +Example Converters +- `Int()` +- `IsMatch(field, ".*")` +- `Split(field, ",")[1]` + +### Function parameters + +The following types are supported for single-value parameters in OTTL functions: + +- `Setter` +- `GetSetter` +- `Getter` +- `PMapGetter` +- `FloatGetter` +- `FloatLikeGetter` +- `StringGetter` +- `StringLikeGetter` +- `IntGetter` +- `IntLikeGetter` +- `BoolGetter` +- `BoolLikeGetter` +- `Enum` +- `string` +- `float64` +- `int64` +- `bool` + +For slice parameters, the following types are supported: + +- `Getter` +- `PMapGetter` +- `FloatGetter` +- `FloatLikeGetter` +- `StringGetter` +- `StringLikeGetter` +- `IntGetter` +- `IntLikeGetter` +- `string` +- `float64` +- `int64` +- `uint8`. Byte slice literals are parsed as byte slices by the OTTL. +- `Getter` + +To make a parameter optional, use the `Optional` type, which takes a type argument for the underlying +parameter type. For example, an optional string parameter would be specified as `Optional[string]`. +All optional parameters must be specified after all required parameters. + +#### Arguments in invocations + +Function arguments must be passed in the order defined in the `Arguments` struct for the function unless they are named, in which case the arguments can come in any order. All named arguments must come after all arguments without +names. Argument names are snake-cased versions of the argument's field name in the function's `Arguments` struct. + +When passing optional arguments, all optional arguments preceding a given optional argument must be specified if +the arguments are not named. Passing a named argument allows skipping the preceding optional arguments. + +### Values + +Values are passed as function parameters or are used in a Boolean Expression. Values can take the form of: + +- [Paths](#paths) +- [Lists](#lists) +- [Literals](#literals) +- [Enums](#enums) +- [Converters](#converters) +- [Math Expressions](#math-expressions) + +### Paths + +A Path Value is a reference to a telemetry field. Paths are made up of lowercase identifiers, dots (`.`), and square brackets combined with a string key (`["key"]`) or int key (`[0]`). **The interpretation of a Path is NOT implemented by the OTTL.** Instead, the user must provide a `PathExpressionParser` that the OTTL can use to interpret paths. As a result, how the Path parts are used is up to the user. However, it is recommended that the parts be used like so: + +- Identifiers are used to map to a telemetry field. +- Dots (`.`) are used to separate nested fields. +- Square brackets and keys (`["key"]`) are used to access values within maps. + +When accessing a map's value, if the given key does not exist, `nil` will be returned. +This can be used to check for the presence of a key within a map within a [Boolean Expression](#boolean-expressions). + +Example Paths +- `name` +- `value_double` +- `resource.name` +- `resource.attributes["key"]` +- `attributes["nested"]["values"]` +- `cache["slice"][1]` + +#### Contexts + +The package that handles the interpretation of a path is normally called a Context. +Contexts will have an implementation of `PathExpressionParser` that decides how an OTTL Path is interpreted. +The context's implementation will need to make decisions like what a dot (`.`) represents or which paths allow indexing (`["key"]`) and how many indexes. + +[There are OpenTelemetry-specific contexts provided for each signal here.](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts) +When using OTTL it is recommended to use these contexts unless you have a specific need. Check out each context to view the paths it supports. + +### Lists + +A List Value comprises a sequence of Values. +Currently, list can only be created by the grammar to be used in functions or conditions; +the grammar does not provide an accessor to individual list entries. + +Example List Values: +- `[]` +- `[1]` +- `["1", "2", "3"]` +- `["a", attributes["key"], Concat(["a", "b"], "-")]` + +### Literals + +Literals are literal interpretations of the Value into a Go value. Accepted literals are: + +- Strings. Strings are represented as literals by surrounding the string in double quotes (`""`). +- Ints. Ints are represented by any digit, optionally prepended by plus (`+`) or minus (`-`). Internally the OTTL represents all ints as `int64` +- Floats. Floats are represented by digits separated by a dot (`.`), optionally prepended by plus (`+`) or minus (`-`). The leading digit is optional. Internally the OTTL represents all Floats as `float64`. +- Bools. Bools are represented by the exact strings `true` and `false`. +- Nil. Nil is represented by the exact string `nil`. +- Byte slices. Byte slices are represented via a hex string prefaced with `0x` + +Example Literals +- `"a string"` +- `1`, `-1` +- `1.5`, `-.5` +- `true`, `false` +- `nil`, +- `0x0001` + +### Enums + +Enums are uppercase identifiers that get interpreted during parsing and converted to an `int64`. **The interpretation of an Enum is NOT implemented by the OTTL.** Instead, the user must provide a `EnumParser` that the OTTL can use to interpret the Enum. The `EnumParser` returns an `int64` instead of a function, which means that the Enum's numeric value is retrieved during parsing instead of during execution. + +Within the grammar Enums are always used as `int64`. As a result, the Enum's symbol can be used as if it is an Int value. + +When defining an OTTL function, if the function needs to take an Enum then the function must use the `Enum` type for that argument, not an `int64`. + +### Math Expressions + +Math Expressions represent arithmetic calculations. They support `+`, `-`, `*`, and `/`, along with `()` for grouping. + +Math Expressions currently support `int64`, `float64`, `time.Time` and `time.Duration`. +For `time.Time` and `time.Duration`, only `+` and `-` are supported with the following rules: +- A `time.Time` `-` a `time.Time` yields a `time.Duration`. +- A `time.Duration` `+` a `time.Time` yields a `time.Time`. +- A `time.Time` `+` a `time.Duration` yields a `time.Time`. +- A `time.Time` `-` a `time.Duration` yields a `time.Time`. +- A `time.Duration` `+` a `time.Duration` yields a `time.Duration`. +- A `time.Duration` `-` a `time.Duration` yields a `time.Duration`. + +Math Expressions support `Paths` and `Editors` that return supported types. +Note that `*` and `/` take precedence over `+` and `-`. +Also note that `time.Time` and `time.Duration` can only be used with `+` and `-`. +Operations that share the same level of precedence will be executed in the order that they appear in the Math Expression. +Math Expressions can be grouped with parentheses to override evaluation precedence. +Math Expressions that mix `int64` and `float64` will result in an error. +It is up to the function using the Math Expression to determine what to do with that error and the default return value of `nil`. +Division by zero is gracefully handled with an error, but other arithmetic operations that would result in a panic will still result in a panic. +Division of integers results in an integer and follows Go's rules for division of integers. + +Since Math Expressions support `Path`s and `Converter`s as input, they are evaluated during data processing. +__As a result, in order for a function to be able to accept an Math Expressions as a parameter it must use a `Getter`.__ + +Example Math Expressions +- `1 + 1` +- `end_time_unix_nano - end_time_unix_nano` +- `sum([1, 2, 3, 4]) + (10 / 1) - 1` + + +### Boolean Expressions + +Boolean Expressions allow a decision to be made about whether an Editor should be called. Boolean Expressions are optional. When used, the parsed statement will include a `Condition`, which can be used to evaluate the result of the statement's Boolean Expression. Boolean Expressions always evaluate to a boolean value (true or false). + +Boolean Expressions consist of the literal string `where` followed by one or more Booleans (see below). +Booleans can be joined with the literal strings `and` and `or`. +Booleans can be negated with the literal string `not`. +Note that `not` has the highest precedence and `and` Boolean Expressions have higher precedence than `or`. +Boolean Expressions can be grouped with parentheses to override evaluation precedence. + +### Booleans + +Booleans can be either: +- A literal boolean value (`true` or `false`). +- A Converter that returns a boolean value (`true` or `false`). +- A Comparison, made up of a left Value, an operator, and a right Value. See [Values](#values) for details on what a Value can be. + +Operators determine how the two Values are compared. + +The valid operators are: + +- Equal (`==`). Tests if the left and right Values are equal (see the Comparison Rules below). +- Not Equal (`!=`). Tests if the left and right Values are not equal. +- Less Than (`<`). Tests if left is less than right. +- Greater Than (`>`). Tests if left is greater than right. +- Less Than or Equal To (`<=`). Tests if left is less than or equal to right. +- Greater Than or Equal to (`>=`). Tests if left is greater than or equal to right. + +Booleans can be negated with the `not` keyword such as +- `not true` +- `not name == "foo"` +- `not (IsMatch(name, "http_.*") and kind > 0)` + +## Comparison Rules + +The table below describes what happens when two Values are compared. Value types are provided by the user of OTTL. All of the value types supported by OTTL are listed in this table. + +If numeric values are of different types, they are compared as `float64`. + +For numeric values and strings, the comparison rules are those implemented by Go. Numeric values are done with signed comparisons. For binary values, `false` is considered to be less than `true`. + +For values that are not one of the basic primitive types, the only valid comparisons are Equal and Not Equal, which are implemented using Go's standard `==` and `!=` operators. + +A `not equal` notation in the table below means that the "!=" operator returns true, but any other operator returns false. Note that a nil byte array is considered equivalent to nil. + +The `time.Time` and `time.Duration` types are compared using comparison functions from their respective packages. For more details on how those comparisons work, see the [Golang Time package](https://pkg.go.dev/time). + + +| base type | bool | int64 | float64 | string | Bytes | nil | time.Time | time.Duration | +|---------------|-------------|---------------------|---------------------|---------------------------------|--------------------------|------------------------|--------------------------------------------------------------|------------------------------------------------------| +| bool | normal, T>F | not equal | not equal | not equal | not equal | not equal | not equal | not equal | +| int64 | not equal | compared as largest | compared as float64 | not equal | not equal | not equal | not equal | not equal | +| float64 | not equal | compared as float64 | compared as largest | not equal | not equal | not equal | not equal | not equal | +| string | not equal | not equal | not equal | normal (compared as Go strings) | not equal | not equal | not equal | not equal | +| Bytes | not equal | not equal | not equal | not equal | byte-for-byte comparison | []byte(nil) == nil | not equal | not equal | +| nil | not equal | not equal | not equal | not equal | []byte(nil) == nil | true for equality only | not equal | not equal | +| time.Time | not equal | not equal | not equal | not equal | not equal | not equal | uses `time.Equal()`to check equality | not equal | +| time.Duration | not equal | not equal | not equal | not equal | not equal | not equal | not equal | uses `time.Before()` and `time.After` for comparison | + +Examples: +- `name == "a name"` +- `1 < 2` +- `attributes["custom-attr"] != nil` +- `IsMatch(resource.attributes["host.name"], "pod-*")` + +## Accessing signal telemetry + +Access to signal telemetry is provided to OTTL functions through a `TransformContext` that is created by the user and passed during statement evaluation. To allow functions to operate on the `TransformContext`, the OTTL provides `Getter`, `Setter`, and `GetSetter` interfaces. + +### Getters and Setters + +Getters allow for reading the following types of data. See the respective section of each Value type for how they are interpreted. + +- [Paths](#paths). +- [Enums](#enums). +- [Literals](#literals). +- [Converters](#converters). + +It is possible to update the Value in a telemetry field using a Setter. For read and write access, the `GetSetter` interface extends both interfaces. + +## Logging inside a OTTL function + +To emit logs inside a OTTL function, add a parameter of type [`component.TelemetrySettings`](https://pkg.go.dev/go.opentelemetry.io/collector/component#TelemetrySettings) to the function signature. The OTTL will then inject the TelemetrySettings that were passed to `NewParser` into the function. TelemetrySettings can be used to emit logs. diff --git a/pkg/ottl/README.md b/pkg/ottl/README.md index 49aca8a48a08..2c25f746009a 100644 --- a/pkg/ottl/README.md +++ b/pkg/ottl/README.md @@ -11,305 +11,33 @@ The OpenTelemetry Transformation Language is a language for transforming open telemetry data based on the [OpenTelemetry Collector Processing Exploration](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/processing.md). -This package reads in OTTL statements and converts them to invokable Booleans and functions based on the OTTL's grammar. +This package reads in OTTL statements and converts them to invokable functions/booleans based on the OTTL's grammar. -The OTTL is signal agnostic; it is not aware of the type of telemetry on which it will operate. Instead, the Booleans and functions returned by the package must be passed a `TransformContext`, which provide access to the signal's telemetry. Telemetry data can be accessed and updated through [Getters and Setters](#getters-and-setters). +## Getting Started -## Grammar +If you're looking to write OTTL statements for a component's configuration check out these resources. -The OTTL grammar includes function invocations, Values and Boolean Expressions. These parts all fit into a Statement, which is the basis of execution in the OTTL. +See [OTTL Functions](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/ottlfuncs#ottl-functions) for a list of functions available for use in the OTTL statements of most components. -### Editors +OTTL Contexts define how you access the fields on a piece of telemetry. See the table to find the exact list of available fields: -Editors are functions that transform the underlying telemetry payload. They may return a value, but typically do not. There must be a single Editor Invocation in each OTTL statement. - -An Editor is made up of 2 parts: +| Telemetry | OTTL Context | +|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------| +| `Resource` | [Resource](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/ottl/contexts/ottlresource/README.md) | +| `Instrumentation Scope` | [Instrumentation Scope](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/ottl/contexts/ottlscope/README.md) | +| `Span` | [Span](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/ottl/contexts/ottlspan/README.md) | +| `Span Event` | [SpanEvent](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/ottl/contexts/ottlspanevent/README.md) | +| `Metric` | [Metric](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/ottl/contexts/ottlmetric/README.md) | +| `Datapoint` | [DataPoint](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/ottl/contexts/ottldatapoint/README.md) | +| `Log` | [Log](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/ottl/contexts/ottllog/README.md) | -- a string identifier. The string identifier must start with a lowercase letter. -- zero or more Values (comma separated) surrounded by parentheses (`()`). +### Component Creators -**The OTTL has no built-in Editors.** -Users must supply a map between string identifiers and Editor implementations. -The OTTL will use this map to determine which implementation to call when executing a Statement. -See [ottlfuncs](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/ottlfuncs#editors) for pre-made, usable Editors. - -### Converters - -Converters are functions that convert data to a new format before being passed as a function argument or used in a Boolean Expression. -Converters are made up of 3 parts: - -- a string identifier. The string identifier must start with an uppercase letter. -- zero or more Values (comma separated) surrounded by parentheses (`()`). -- a combination of zero or more a string key (`["key"]`) or int key (`[0]`) - -**The OTTL has no built-in Converters.** -Users must include Converters in the same map that Editors are supplied. -The OTTL will use this map and reflection to generate Converters that can then be invoked by the user. -See [ottlfuncs](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/ottlfuncs#converters) for pre-made, usable Converters. - -When keys are supplied the value returned by the Converter will be indexed by the keys in order. -If keys are supplied to a Converter and the return value cannot be indexed, or if the return value doesn't support the -type of key supplied, OTTL will error. Supported values are: - -| Type | Index Type | -|------------------|------------| -| `pcommon.Map` | `String` | -| `map[string]any` | `String` | -| `pcommon.Slice` | `Int` | -| `[]any` | `Int` | - -Example Converters -- `Int()` -- `IsMatch(field, ".*")` -- `Split(field, ",")[1]` - -### Function parameters - -The following types are supported for single-value parameters in OTTL functions: - -- `Setter` -- `GetSetter` -- `Getter` -- `PMapGetter` -- `FloatGetter` -- `FloatLikeGetter` -- `StringGetter` -- `StringLikeGetter` -- `IntGetter` -- `IntLikeGetter` -- `BoolGetter` -- `BoolLikeGetter` -- `Enum` -- `string` -- `float64` -- `int64` -- `bool` - -For slice parameters, the following types are supported: - -- `Getter` -- `PMapGetter` -- `FloatGetter` -- `FloatLikeGetter` -- `StringGetter` -- `StringLikeGetter` -- `IntGetter` -- `IntLikeGetter` -- `string` -- `float64` -- `int64` -- `uint8`. Byte slice literals are parsed as byte slices by the OTTL. -- `Getter` - -To make a parameter optional, use the `Optional` type, which takes a type argument for the underlying -parameter type. For example, an optional string parameter would be specified as `Optional[string]`. -All optional parameters must be specified after all required parameters. - -#### Arguments in invocations - -Function arguments must be passed in the order defined in the `Arguments` struct for the function unless they are named, in which case the arguments can come in any order. All named arguments must come after all arguments without -names. Argument names are snake-cased versions of the argument's field name in the function's `Arguments` struct. - -When passing optional arguments, all optional arguments preceding a given optional argument must be specified if -the arguments are not named. Passing a named argument allows skipping the preceding optional arguments. - -### Values - -Values are passed as function parameters or are used in a Boolean Expression. Values can take the form of: - -- [Paths](#paths) -- [Lists](#lists) -- [Literals](#literals) -- [Enums](#enums) -- [Converters](#converters) -- [Math Expressions](#math-expressions) - -### Paths - -A Path Value is a reference to a telemetry field. Paths are made up of lowercase identifiers, dots (`.`), and square brackets combined with a string key (`["key"]`) or int key (`[0]`). **The interpretation of a Path is NOT implemented by the OTTL.** Instead, the user must provide a `PathExpressionParser` that the OTTL can use to interpret paths. As a result, how the Path parts are used is up to the user. However, it is recommended that the parts be used like so: - -- Identifiers are used to map to a telemetry field. -- Dots (`.`) are used to separate nested fields. -- Square brackets and keys (`["key"]`) are used to access values within maps. - -When accessing a map's value, if the given key does not exist, `nil` will be returned. -This can be used to check for the presence of a key within a map within a [Boolean Expression](#boolean-expressions). - -Example Paths -- `name` -- `value_double` -- `resource.name` -- `resource.attributes["key"]` -- `attributes["nested"]["values"]` -- `cache["slice"][1]` - -#### Contexts - -The package that handles the interpretation of a path is normally called a Context. -Contexts will have an implementation of `PathExpressionParser` that decides how an OTTL Path is interpreted. -The context's implementation will need to make decisions like what a dot (`.`) represents or which paths allow indexing (`["key"]`) and how many indexes. - -[There are OpenTelemetry-specific contexts provided for each signal here.](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts) -When using OTTL it is recommended to use these contexts unless you have a specific need. Check out each context to view the paths it supports. - -### Lists - -A List Value comprises a sequence of Values. -Currently, list can only be created by the grammar to be used in functions or conditions; -the grammar does not provide an accessor to individual list entries. - -Example List Values: -- `[]` -- `[1]` -- `["1", "2", "3"]` -- `["a", attributes["key"], Concat(["a", "b"], "-")]` - -### Literals - -Literals are literal interpretations of the Value into a Go value. Accepted literals are: - -- Strings. Strings are represented as literals by surrounding the string in double quotes (`""`). -- Ints. Ints are represented by any digit, optionally prepended by plus (`+`) or minus (`-`). Internally the OTTL represents all ints as `int64` -- Floats. Floats are represented by digits separated by a dot (`.`), optionally prepended by plus (`+`) or minus (`-`). The leading digit is optional. Internally the OTTL represents all Floats as `float64`. -- Bools. Bools are represented by the exact strings `true` and `false`. -- Nil. Nil is represented by the exact string `nil`. -- Byte slices. Byte slices are represented via a hex string prefaced with `0x` - -Example Literals -- `"a string"` -- `1`, `-1` -- `1.5`, `-.5` -- `true`, `false` -- `nil`, -- `0x0001` - -### Enums - -Enums are uppercase identifiers that get interpreted during parsing and converted to an `int64`. **The interpretation of an Enum is NOT implemented by the OTTL.** Instead, the user must provide a `EnumParser` that the OTTL can use to interpret the Enum. The `EnumParser` returns an `int64` instead of a function, which means that the Enum's numeric value is retrieved during parsing instead of during execution. - -Within the grammar Enums are always used as `int64`. As a result, the Enum's symbol can be used as if it is an Int value. - -When defining an OTTL function, if the function needs to take an Enum then the function must use the `Enum` type for that argument, not an `int64`. - -### Math Expressions - -Math Expressions represent arithmetic calculations. They support `+`, `-`, `*`, and `/`, along with `()` for grouping. - -Math Expressions currently support `int64`, `float64`, `time.Time` and `time.Duration`. -For `time.Time` and `time.Duration`, only `+` and `-` are supported with the following rules: - - A `time.Time` `-` a `time.Time` yields a `time.Duration`. - - A `time.Duration` `+` a `time.Time` yields a `time.Time`. - - A `time.Time` `+` a `time.Duration` yields a `time.Time`. - - A `time.Time` `-` a `time.Duration` yields a `time.Time`. - - A `time.Duration` `+` a `time.Duration` yields a `time.Duration`. - - A `time.Duration` `-` a `time.Duration` yields a `time.Duration`. - -Math Expressions support `Paths` and `Editors` that return supported types. -Note that `*` and `/` take precedence over `+` and `-`. -Also note that `time.Time` and `time.Duration` can only be used with `+` and `-`. -Operations that share the same level of precedence will be executed in the order that they appear in the Math Expression. -Math Expressions can be grouped with parentheses to override evaluation precedence. -Math Expressions that mix `int64` and `float64` will result in an error. -It is up to the function using the Math Expression to determine what to do with that error and the default return value of `nil`. -Division by zero is gracefully handled with an error, but other arithmetic operations that would result in a panic will still result in a panic. -Division of integers results in an integer and follows Go's rules for division of integers. - -Since Math Expressions support `Path`s and `Converter`s as input, they are evaluated during data processing. -__As a result, in order for a function to be able to accept an Math Expressions as a parameter it must use a `Getter`.__ - -Example Math Expressions -- `1 + 1` -- `end_time_unix_nano - end_time_unix_nano` -- `sum([1, 2, 3, 4]) + (10 / 1) - 1` - - -### Boolean Expressions - -Boolean Expressions allow a decision to be made about whether an Editor should be called. Boolean Expressions are optional. When used, the parsed statement will include a `Condition`, which can be used to evaluate the result of the statement's Boolean Expression. Boolean Expressions always evaluate to a boolean value (true or false). - -Boolean Expressions consist of the literal string `where` followed by one or more Booleans (see below). -Booleans can be joined with the literal strings `and` and `or`. -Booleans can be negated with the literal string `not`. -Note that `not` has the highest precedence and `and` Boolean Expressions have higher precedence than `or`. -Boolean Expressions can be grouped with parentheses to override evaluation precedence. - -### Booleans - -Booleans can be either: -- A literal boolean value (`true` or `false`). -- A Converter that returns a boolean value (`true` or `false`). -- A Comparison, made up of a left Value, an operator, and a right Value. See [Values](#values) for details on what a Value can be. - -Operators determine how the two Values are compared. - -The valid operators are: - -- Equal (`==`). Tests if the left and right Values are equal (see the Comparison Rules below). -- Not Equal (`!=`). Tests if the left and right Values are not equal. -- Less Than (`<`). Tests if left is less than right. -- Greater Than (`>`). Tests if left is greater than right. -- Less Than or Equal To (`<=`). Tests if left is less than or equal to right. -- Greater Than or Equal to (`>=`). Tests if left is greater than or equal to right. - -Booleans can be negated with the `not` keyword such as -- `not true` -- `not name == "foo"` -- `not (IsMatch(name, "http_.*") and kind > 0)` - -## Comparison Rules - -The table below describes what happens when two Values are compared. Value types are provided by the user of OTTL. All of the value types supported by OTTL are listed in this table. - -If numeric values are of different types, they are compared as `float64`. - -For numeric values and strings, the comparison rules are those implemented by Go. Numeric values are done with signed comparisons. For binary values, `false` is considered to be less than `true`. - -For values that are not one of the basic primitive types, the only valid comparisons are Equal and Not Equal, which are implemented using Go's standard `==` and `!=` operators. - -A `not equal` notation in the table below means that the "!=" operator returns true, but any other operator returns false. Note that a nil byte array is considered equivalent to nil. - -The `time.Time` and `time.Duration` types are compared using comparison functions from their respective packages. For more details on how those comparisons work, see the [Golang Time package](https://pkg.go.dev/time). - - -| base type | bool | int64 | float64 | string | Bytes | nil | time.Time | time.Duration | -|---------------|-------------|---------------------|---------------------|---------------------------------|--------------------------|------------------------|--------------------------------------------------------------|------------------------------------------------------| -| bool | normal, T>F | not equal | not equal | not equal | not equal | not equal | not equal | not equal | -| int64 | not equal | compared as largest | compared as float64 | not equal | not equal | not equal | not equal | not equal | -| float64 | not equal | compared as float64 | compared as largest | not equal | not equal | not equal | not equal | not equal | -| string | not equal | not equal | not equal | normal (compared as Go strings) | not equal | not equal | not equal | not equal | -| Bytes | not equal | not equal | not equal | not equal | byte-for-byte comparison | []byte(nil) == nil | not equal | not equal | -| nil | not equal | not equal | not equal | not equal | []byte(nil) == nil | true for equality only | not equal | not equal | -| time.Time | not equal | not equal | not equal | not equal | not equal | not equal | uses `time.Equal()`to check equality | not equal | -| time.Duration | not equal | not equal | not equal | not equal | not equal | not equal | not equal | uses `time.Before()` and `time.After` for comparison | - -Examples: -- `name == "a name"` -- `1 < 2` -- `attributes["custom-attr"] != nil` -- `IsMatch(resource.attributes["host.name"], "pod-*")` - -## Accessing signal telemetry - -Access to signal telemetry is provided to OTTL functions through a `TransformContext` that is created by the user and passed during statement evaluation. To allow functions to operate on the `TransformContext`, the OTTL provides `Getter`, `Setter`, and `GetSetter` interfaces. - -### Getters and Setters - -Getters allow for reading the following types of data. See the respective section of each Value type for how they are interpreted. - -- [Paths](#paths). -- [Enums](#enums). -- [Literals](#literals). -- [Converters](#converters). - -It is possible to update the Value in a telemetry field using a Setter. For read and write access, the `GetSetter` interface extends both interfaces. - -## Logging inside a OTTL function - -To emit logs inside a OTTL function, add a parameter of type [`component.TelemetrySettings`](https://pkg.go.dev/go.opentelemetry.io/collector/component#TelemetrySettings) to the function signature. The OTTL will then inject the TelemetrySettings that were passed to `NewParser` into the function. TelemetrySettings can be used to emit logs. +If you're looking to use OTTL in your component, check out [the OTTL grammar](./LANGUAGE.md). ## Examples -These examples contain a SQL-like declarative language. Applied statements interact with only one signal, but statements can be declared across multiple signals. Functions used in examples are indicative of what could be useful, but are not implemented by the OTTL itself. +These examples contain a SQL-like declarative language. Applied statements interact with only one signal, but statements can be declared across multiple signals. Functions used in examples are indicative of what could be useful. ### Remove a forbidden attribute diff --git a/pkg/ottl/boolean_value_test.go b/pkg/ottl/boolean_value_test.go index a7843429406f..ba6fbd3da430 100644 --- a/pkg/ottl/boolean_value_test.go +++ b/pkg/ottl/boolean_value_test.go @@ -28,8 +28,8 @@ func valueFor(x any) value { case v == "NAME": // if the string is NAME construct a path of "name". val.Literal = &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -38,11 +38,11 @@ func valueFor(x any) value { } case strings.Contains(v, "ENUM"): // if the string contains ENUM construct an EnumSymbol from it. - val.Enum = (*EnumSymbol)(ottltest.Strp(v)) + val.Enum = (*enumSymbol)(ottltest.Strp(v)) case v == "dur1" || v == "dur2": val.Literal = &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: v, }, @@ -51,8 +51,8 @@ func valueFor(x any) value { } case v == "time1" || v == "time2": val.Literal = &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: v, }, @@ -93,7 +93,7 @@ func comparisonHelper(left any, right any, op string) *comparison { func Test_newComparisonEvaluator(t *testing.T) { p, _ := NewParser( defaultFunctionsForTests(), - testParsePath, + testParsePath[any], componenttest.NewNopTelemetrySettings(), WithEnumParser[any](testParseEnum), ) @@ -185,7 +185,7 @@ func Test_newComparisonEvaluator(t *testing.T) { func Test_newConditionEvaluator_invalid(t *testing.T) { p, _ := NewParser( defaultFunctionsForTests(), - testParsePath, + testParsePath[any], componenttest.NewNopTelemetrySettings(), WithEnumParser[any](testParseEnum), ) @@ -195,12 +195,12 @@ func Test_newConditionEvaluator_invalid(t *testing.T) { comparison *comparison }{ { - name: "unknown Path", + name: "unknown path", comparison: &comparison{ Left: value{ - Enum: (*EnumSymbol)(ottltest.Strp("SYMBOL_NOT_FOUND")), + Enum: (*enumSymbol)(ottltest.Strp("SYMBOL_NOT_FOUND")), }, - Op: EQ, + Op: eq, Right: value{ String: ottltest.Strp("trash"), }, @@ -216,12 +216,12 @@ func Test_newConditionEvaluator_invalid(t *testing.T) { } func True() (ExprFunc[any], error) { - return func(ctx context.Context, tCtx any) (any, error) { + return func(_ context.Context, _ any) (any, error) { return true, nil }, nil } func False() (ExprFunc[any], error) { - return func(ctx context.Context, tCtx any) (any, error) { + return func(_ context.Context, _ any) (any, error) { return false, nil }, nil } @@ -233,7 +233,7 @@ func Test_newBooleanExpressionEvaluator(t *testing.T) { p, _ := NewParser( functions, - testParsePath, + testParsePath[any], componenttest.NewNopTelemetrySettings(), WithEnumParser[any](testParseEnum), ) @@ -488,7 +488,7 @@ func Test_newBooleanExpressionEvaluator(t *testing.T) { Left: value{ String: ottltest.Strp("test"), }, - Op: EQ, + Op: eq, Right: value{ String: ottltest.Strp("not test"), }, @@ -616,7 +616,7 @@ func Test_newBooleanExpressionEvaluator_invalid(t *testing.T) { p, _ := NewParser( functions, - testParsePath, + testParsePath[any], componenttest.NewNopTelemetrySettings(), WithEnumParser[any](testParseEnum), ) diff --git a/pkg/ottl/compare.go b/pkg/ottl/compare.go index fc93186c4985..0c20542f2a8d 100644 --- a/pkg/ottl/compare.go +++ b/pkg/ottl/compare.go @@ -7,7 +7,6 @@ import ( "bytes" "time" - "go.uber.org/zap" "golang.org/x/exp/constraints" ) @@ -15,29 +14,27 @@ import ( // values of type any, which for the purposes of OTTL mean values that are one of // int, float, string, bool, or pointers to those, or []byte, or nil. -// invalidComparison returns false for everything except NE (where it returns true to indicate that the +// invalidComparison returns false for everything except ne (where it returns true to indicate that the // objects were definitely not equivalent). -// It also gives us an opportunity to log something. -func (p *Parser[K]) invalidComparison(msg string, op compareOp) bool { - p.telemetrySettings.Logger.Debug(msg, zap.Any("op", op)) - return op == NE +func (p *Parser[K]) invalidComparison(op compareOp) bool { + return op == ne } // comparePrimitives implements a generic comparison helper for all Ordered types (derived from Float, Int, or string). // According to benchmarks, it's faster than explicit comparison functions for these types. func comparePrimitives[T constraints.Ordered](a T, b T, op compareOp) bool { switch op { - case EQ: + case eq: return a == b - case NE: + case ne: return a != b - case LT: + case lt: return a < b - case LTE: + case lte: return a <= b - case GTE: + case gte: return a >= b - case GT: + case gt: return a > b default: return false @@ -46,17 +43,17 @@ func comparePrimitives[T constraints.Ordered](a T, b T, op compareOp) bool { func compareBools(a bool, b bool, op compareOp) bool { switch op { - case EQ: + case eq: return a == b - case NE: + case ne: return a != b - case LT: + case lt: return !a && b - case LTE: + case lte: return !a || b - case GTE: + case gte: return a || !b - case GT: + case gt: return a && !b default: return false @@ -65,17 +62,17 @@ func compareBools(a bool, b bool, op compareOp) bool { func compareBytes(a []byte, b []byte, op compareOp) bool { switch op { - case EQ: + case eq: return bytes.Equal(a, b) - case NE: + case ne: return !bytes.Equal(a, b) - case LT: + case lt: return bytes.Compare(a, b) < 0 - case LTE: + case lte: return bytes.Compare(a, b) <= 0 - case GTE: + case gte: return bytes.Compare(a, b) >= 0 - case GT: + case gt: return bytes.Compare(a, b) > 0 default: return false @@ -87,7 +84,7 @@ func (p *Parser[K]) compareBool(a bool, b any, op compareOp) bool { case bool: return compareBools(a, v, op) default: - return p.invalidComparison("bool to non-bool", op) + return p.invalidComparison(op) } } @@ -96,21 +93,21 @@ func (p *Parser[K]) compareString(a string, b any, op compareOp) bool { case string: return comparePrimitives(a, v, op) default: - return p.invalidComparison("string to non-string", op) + return p.invalidComparison(op) } } func (p *Parser[K]) compareByte(a []byte, b any, op compareOp) bool { switch v := b.(type) { case nil: - return op == NE + return op == ne case []byte: if v == nil { - return op == NE + return op == ne } return compareBytes(a, v, op) default: - return p.invalidComparison("Bytes to non-Bytes", op) + return p.invalidComparison(op) } } @@ -121,7 +118,7 @@ func (p *Parser[K]) compareInt64(a int64, b any, op compareOp) bool { case float64: return comparePrimitives(float64(a), v, op) default: - return p.invalidComparison("int to non-numeric value", op) + return p.invalidComparison(op) } } @@ -132,7 +129,7 @@ func (p *Parser[K]) compareFloat64(a float64, b any, op compareOp) bool { case float64: return comparePrimitives(a, v, op) default: - return p.invalidComparison("float to non-numeric value", op) + return p.invalidComparison(op) } } @@ -143,7 +140,7 @@ func (p *Parser[K]) compareDuration(a time.Duration, b any, op compareOp) bool { vnsecs := v.Nanoseconds() return comparePrimitives(ansecs, vnsecs, op) default: - return p.invalidComparison("cannot compare invalid duration", op) + return p.invalidComparison(op) } } @@ -151,23 +148,23 @@ func (p *Parser[K]) compareTime(a time.Time, b any, op compareOp) bool { switch v := b.(type) { case time.Time: switch op { - case EQ: + case eq: return a.Equal(v) - case NE: + case ne: return !a.Equal(v) - case LT: + case lt: return a.Before(v) - case LTE: + case lte: return a.Before(v) || a.Equal(v) - case GTE: + case gte: return a.After(v) || a.Equal(v) - case GT: + case gt: return a.After(v) default: - return p.invalidComparison("invalid comparison operator", op) + return p.invalidComparison(op) } default: - return p.invalidComparison("time to non-time value", op) + return p.invalidComparison(op) } } @@ -177,7 +174,7 @@ func (p *Parser[K]) compare(a any, b any, op compareOp) bool { // nils are equal to each other and never equal to anything else, // so if they're both nil, report equality. if a == nil && b == nil { - return op == EQ || op == LTE || op == GTE + return op == eq || op == lte || op == gte } // Anything else, we switch on the left side first. switch v := a.(type) { @@ -206,12 +203,12 @@ func (p *Parser[K]) compare(a any, b any, op compareOp) bool { // If we don't know what type it is, we can't do inequalities yet. So we can fall back to the old behavior where we just // use Go's standard equality. switch op { - case EQ: + case eq: return a == b - case NE: + case ne: return a != b default: - return p.invalidComparison("unsupported type for inequality on left", op) + return p.invalidComparison(op) } } } diff --git a/pkg/ottl/compare_test.go b/pkg/ottl/compare_test.go index b2dffba38a4f..e051ececb739 100644 --- a/pkg/ottl/compare_test.go +++ b/pkg/ottl/compare_test.go @@ -45,7 +45,7 @@ func Test_compare(t *testing.T) { name string a any b any - want []bool // in order of EQ, NE, LT, LTE, GTE, GT. + want []bool // in order of eq, ne, lt, lte, gte, gt. }{ {"identity string", sa, sa, []bool{true, false, false, true, true, false}}, {"identity int64", i64a, i64a, []bool{true, false, false, true, true, false}}, @@ -101,7 +101,7 @@ func Test_compare(t *testing.T) { {"non-prim, int type", testA{"hi"}, 5, []bool{false, true, false, false, false, false}}, {"int, non-prim", 5, testA{"hi"}, []bool{false, true, false, false, false, false}}, } - ops := []compareOp{EQ, NE, LT, LTE, GTE, GT} + ops := []compareOp{eq, ne, lt, lte, gte, gt} for _, tt := range tests { for _, op := range ops { t.Run(fmt.Sprintf("%s %v", tt.name, op), func(t *testing.T) { @@ -123,7 +123,7 @@ func BenchmarkCompareEQInt64(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - testParser.compare(i64a, i64b, EQ) + testParser.compare(i64a, i64b, eq) } } @@ -132,7 +132,7 @@ func BenchmarkCompareEQFloat(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - testParser.compare(f64a, f64b, EQ) + testParser.compare(f64a, f64b, eq) } } @@ -141,7 +141,7 @@ func BenchmarkCompareEQString(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - testParser.compare(sa, sb, EQ) + testParser.compare(sa, sb, eq) } } @@ -150,7 +150,7 @@ func BenchmarkCompareEQPString(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - testParser.compare(&sa, &sb, EQ) + testParser.compare(&sa, &sb, eq) } } @@ -159,7 +159,7 @@ func BenchmarkCompareEQBytes(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - testParser.compare(ba, bb, EQ) + testParser.compare(ba, bb, eq) } } @@ -168,7 +168,7 @@ func BenchmarkCompareEQNil(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - testParser.compare(nil, nil, EQ) + testParser.compare(nil, nil, eq) } } @@ -177,7 +177,7 @@ func BenchmarkCompareNEInt(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - testParser.compare(i64a, i64b, NE) + testParser.compare(i64a, i64b, ne) } } @@ -186,7 +186,7 @@ func BenchmarkCompareNEFloat(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - testParser.compare(f64a, f64b, NE) + testParser.compare(f64a, f64b, ne) } } @@ -195,7 +195,7 @@ func BenchmarkCompareNEString(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - testParser.compare(sa, sb, NE) + testParser.compare(sa, sb, ne) } } @@ -204,7 +204,7 @@ func BenchmarkCompareLTFloat(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - testParser.compare(f64a, f64b, LT) + testParser.compare(f64a, f64b, lt) } } @@ -213,7 +213,7 @@ func BenchmarkCompareLTString(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - testParser.compare(sa, sb, LT) + testParser.compare(sa, sb, lt) } } @@ -222,17 +222,17 @@ func BenchmarkCompareLTNil(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - testParser.compare(nil, nil, LT) + testParser.compare(nil, nil, lt) } } // this is only used for benchmarking, and is a rough equivalent of the original compare function -// before adding LT, LTE, GTE, and GT. +// before adding lt, lte, gte, and gt. func compareEq(a any, b any, op compareOp) bool { switch op { - case EQ: + case eq: return a == b - case NE: + case ne: return a != b default: return false @@ -241,6 +241,6 @@ func compareEq(a any, b any, op compareOp) bool { func BenchmarkCompareEQFunction(b *testing.B) { for i := 0; i < b.N; i++ { - compareEq(sa, sb, EQ) + compareEq(sa, sb, eq) } } diff --git a/pkg/ottl/config.go b/pkg/ottl/config.go new file mode 100644 index 000000000000..a1e721c1bb99 --- /dev/null +++ b/pkg/ottl/config.go @@ -0,0 +1,46 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottl // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" + +import ( + "fmt" + "strings" +) + +type ErrorMode string + +const ( + IgnoreError ErrorMode = "ignore" + PropagateError ErrorMode = "propagate" + SilentError ErrorMode = "silent" +) + +func (e *ErrorMode) UnmarshalText(text []byte) error { + str := ErrorMode(strings.ToLower(string(text))) + switch str { + case IgnoreError, PropagateError, SilentError: + *e = str + return nil + default: + return fmt.Errorf("unknown error mode %v", str) + } +} + +type LogicOperation string + +const ( + And LogicOperation = "and" + Or LogicOperation = "or" +) + +func (l *LogicOperation) UnmarshalText(text []byte) error { + str := LogicOperation(strings.ToLower(string(text))) + switch str { + case And, Or: + *l = str + return nil + default: + return fmt.Errorf("unknown LogicOperation %v", str) + } +} diff --git a/pkg/ottl/contexts/internal/errors.go b/pkg/ottl/contexts/internal/errors.go new file mode 100644 index 000000000000..7ccc931e2ba4 --- /dev/null +++ b/pkg/ottl/contexts/internal/errors.go @@ -0,0 +1,22 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" + +import "fmt" + +const ( + DefaultErrorMessage = "segment %q from path %q is not a valid path nor a valid OTTL keyword for the %v context - review %v to see all valid paths" + + ResourceContextRef = "https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlresource" + InstrumentationScopeRef = "https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlscope" + SpanRef = "https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlspan" + SpanEventRef = "https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlspanevent" + MetricRef = "https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlmetric" + DataPointRef = "https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottldatapoint" + LogRef = "https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottllog" +) + +func FormatDefaultErrorMessage(pathSegment, fullPath, context, ref string) error { + return fmt.Errorf(DefaultErrorMessage, pathSegment, fullPath, context, ref) +} diff --git a/pkg/ottl/contexts/internal/map.go b/pkg/ottl/contexts/internal/map.go index b45d61c177d6..34e891c032c1 100644 --- a/pkg/ottl/contexts/internal/map.go +++ b/pkg/ottl/contexts/internal/map.go @@ -4,6 +4,7 @@ package internal // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" import ( + "context" "fmt" "go.opentelemetry.io/collector/pdata/pcommon" @@ -11,33 +12,43 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" ) -func GetMapValue(m pcommon.Map, keys []ottl.Key) (any, error) { +func GetMapValue[K any](ctx context.Context, tCtx K, m pcommon.Map, keys []ottl.Key[K]) (any, error) { if len(keys) == 0 { - return nil, fmt.Errorf("cannot get map value without key") + return nil, fmt.Errorf("cannot get map value without keys") } - if keys[0].String == nil { + + s, err := keys[0].String(ctx, tCtx) + if err != nil { + return nil, err + } + if s == nil { return nil, fmt.Errorf("non-string indexing is not supported") } - val, ok := m.Get(*keys[0].String) + val, ok := m.Get(*s) if !ok { return nil, nil } - return getIndexableValue(val, keys[1:]) + + return getIndexableValue[K](ctx, tCtx, val, keys[1:]) } -func SetMapValue(m pcommon.Map, keys []ottl.Key, val any) error { +func SetMapValue[K any](ctx context.Context, tCtx K, m pcommon.Map, keys []ottl.Key[K], val any) error { if len(keys) == 0 { return fmt.Errorf("cannot set map value without key") } - if keys[0].String == nil { + + s, err := keys[0].String(ctx, tCtx) + if err != nil { + return err + } + if s == nil { return fmt.Errorf("non-string indexing is not supported") } - currentValue, ok := m.Get(*keys[0].String) + currentValue, ok := m.Get(*s) if !ok { - currentValue = m.PutEmpty(*keys[0].String) + currentValue = m.PutEmpty(*s) } - - return setIndexableValue(currentValue, val, keys[1:]) + return setIndexableValue[K](ctx, tCtx, currentValue, val, keys[1:]) } diff --git a/pkg/ottl/contexts/internal/map_test.go b/pkg/ottl/contexts/internal/map_test.go index 582167559186..18d41462413e 100644 --- a/pkg/ottl/contexts/internal/map_test.go +++ b/pkg/ottl/contexts/internal/map_test.go @@ -4,6 +4,7 @@ package internal import ( + "context" "fmt" "testing" @@ -17,79 +18,74 @@ import ( func Test_GetMapValue_Invalid(t *testing.T) { tests := []struct { name string - keys []ottl.Key + keys []ottl.Key[any] err error }{ - { - name: "no keys", - keys: []ottl.Key{}, - err: fmt.Errorf("cannot get map value without key"), - }, { name: "first key not a string", - keys: []ottl.Key{ - { - Int: ottltest.Intp(0), + keys: []ottl.Key[any]{ + &TestKey[any]{ + I: ottltest.Intp(0), }, }, err: fmt.Errorf("non-string indexing is not supported"), }, { name: "index map with int", - keys: []ottl.Key{ - { - String: ottltest.Strp("map"), + keys: []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("map"), }, - { - Int: ottltest.Intp(0), + &TestKey[any]{ + I: ottltest.Intp(0), }, }, err: fmt.Errorf("map must be indexed by a string"), }, { name: "index slice with string", - keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), + keys: []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("slice"), }, - { - String: ottltest.Strp("invalid"), + &TestKey[any]{ + S: ottltest.Strp("invalid"), }, }, err: fmt.Errorf("slice must be indexed by an int"), }, { name: "index too large", - keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), + keys: []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("slice"), }, - { - Int: ottltest.Intp(1), + &TestKey[any]{ + I: ottltest.Intp(1), }, }, err: fmt.Errorf("index 1 out of bounds"), }, { name: "index too small", - keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), + keys: []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("slice"), }, - { - Int: ottltest.Intp(-1), + &TestKey[any]{ + I: ottltest.Intp(-1), }, }, err: fmt.Errorf("index -1 out of bounds"), }, { name: "invalid type", - keys: []ottl.Key{ - { - String: ottltest.Strp("string"), + keys: []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("string"), }, - { - String: ottltest.Strp("string"), + &TestKey[any]{ + S: ottltest.Strp("string"), }, }, err: fmt.Errorf("type Str does not support string indexing"), @@ -105,7 +101,7 @@ func Test_GetMapValue_Invalid(t *testing.T) { s := m.PutEmptySlice("slice") s.AppendEmpty() - _, err := GetMapValue(m, tt.keys) + _, err := GetMapValue[any](context.Background(), nil, m, tt.keys) assert.Equal(t, tt.err, err) }) } @@ -114,95 +110,95 @@ func Test_GetMapValue_Invalid(t *testing.T) { func Test_GetMapValue_MissingKey(t *testing.T) { m := pcommon.NewMap() m.PutEmptyMap("map1").PutEmptyMap("map2") - keys := []ottl.Key{ - { - String: ottltest.Strp("map1"), + keys := []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("map1"), }, - { - String: ottltest.Strp("unknown key"), + &TestKey[any]{ + S: ottltest.Strp("unknown key"), }, } - result, err := GetMapValue(m, keys) - assert.Nil(t, err) + result, err := GetMapValue[any](context.Background(), nil, m, keys) + assert.NoError(t, err) assert.Nil(t, result) } +func Test_GetMapValue_NilKey(t *testing.T) { + _, err := GetMapValue[any](context.Background(), nil, pcommon.NewMap(), nil) + assert.Error(t, err) +} + func Test_SetMapValue_Invalid(t *testing.T) { tests := []struct { name string - keys []ottl.Key + keys []ottl.Key[any] err error }{ - { - name: "no keys", - keys: []ottl.Key{}, - err: fmt.Errorf("cannot set map value without key"), - }, { name: "first key not a string", - keys: []ottl.Key{ - { - Int: ottltest.Intp(0), + keys: []ottl.Key[any]{ + &TestKey[any]{ + I: ottltest.Intp(0), }, }, err: fmt.Errorf("non-string indexing is not supported"), }, { name: "index map with int", - keys: []ottl.Key{ - { - String: ottltest.Strp("map"), + keys: []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("map"), }, - { - Int: ottltest.Intp(0), + &TestKey[any]{ + I: ottltest.Intp(0), }, }, err: fmt.Errorf("map must be indexed by a string"), }, { name: "index slice with string", - keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), + keys: []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("slice"), }, - { - String: ottltest.Strp("map"), + &TestKey[any]{ + S: ottltest.Strp("map"), }, }, err: fmt.Errorf("slice must be indexed by an int"), }, { name: "slice index too large", - keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), + keys: []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("slice"), }, - { - Int: ottltest.Intp(1), + &TestKey[any]{ + I: ottltest.Intp(1), }, }, err: fmt.Errorf("index 1 out of bounds"), }, { name: "slice index too small", - keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), + keys: []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("slice"), }, - { - Int: ottltest.Intp(-1), + &TestKey[any]{ + I: ottltest.Intp(-1), }, }, err: fmt.Errorf("index -1 out of bounds"), }, { name: "slice index too small", - keys: []ottl.Key{ - { - String: ottltest.Strp("string"), + keys: []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("string"), }, - { - String: ottltest.Strp("string"), + &TestKey[any]{ + S: ottltest.Strp("string"), }, }, err: fmt.Errorf("type Str does not support string indexing"), @@ -218,7 +214,7 @@ func Test_SetMapValue_Invalid(t *testing.T) { s := m.PutEmptySlice("slice") s.AppendEmpty() - err := SetMapValue(m, tt.keys, "value") + err := SetMapValue[any](context.Background(), nil, m, tt.keys, "value") assert.Equal(t, tt.err, err) }) } @@ -227,19 +223,19 @@ func Test_SetMapValue_Invalid(t *testing.T) { func Test_SetMapValue_AddingNewSubMap(t *testing.T) { m := pcommon.NewMap() m.PutEmptyMap("map1").PutStr("test", "test") - keys := []ottl.Key{ - { - String: ottltest.Strp("map1"), + keys := []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("map1"), }, - { - String: ottltest.Strp("map2"), + &TestKey[any]{ + S: ottltest.Strp("map2"), }, - { - String: ottltest.Strp("foo"), + &TestKey[any]{ + S: ottltest.Strp("foo"), }, } - err := SetMapValue(m, keys, "bar") - assert.Nil(t, err) + err := SetMapValue[any](context.Background(), nil, m, keys, "bar") + assert.NoError(t, err) expected := pcommon.NewMap() sub := expected.PutEmptyMap("map1") @@ -251,22 +247,27 @@ func Test_SetMapValue_AddingNewSubMap(t *testing.T) { func Test_SetMapValue_EmptyMap(t *testing.T) { m := pcommon.NewMap() - keys := []ottl.Key{ - { - String: ottltest.Strp("map1"), + keys := []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("map1"), }, - { - String: ottltest.Strp("map2"), + &TestKey[any]{ + S: ottltest.Strp("map2"), }, - { - String: ottltest.Strp("foo"), + &TestKey[any]{ + S: ottltest.Strp("foo"), }, } - err := SetMapValue(m, keys, "bar") - assert.Nil(t, err) + err := SetMapValue[any](context.Background(), nil, m, keys, "bar") + assert.NoError(t, err) expected := pcommon.NewMap() expected.PutEmptyMap("map1").PutEmptyMap("map2").PutStr("foo", "bar") assert.Equal(t, expected, m) } + +func Test_SetMapValue_NilKey(t *testing.T) { + err := SetMapValue[any](context.Background(), nil, pcommon.NewMap(), nil, "bar") + assert.Error(t, err) +} diff --git a/pkg/ottl/contexts/internal/metric.go b/pkg/ottl/contexts/internal/metric.go index e34afd8854f6..e2944a73df45 100644 --- a/pkg/ottl/contexts/internal/metric.go +++ b/pkg/ottl/contexts/internal/metric.go @@ -5,7 +5,6 @@ package internal // import "github.com/open-telemetry/opentelemetry-collector-co import ( "context" - "fmt" "go.opentelemetry.io/collector/pdata/pmetric" @@ -28,11 +27,11 @@ var MetricSymbolTable = map[ottl.EnumSymbol]ottl.Enum{ "METRIC_DATA_TYPE_SUMMARY": ottl.Enum(pmetric.MetricTypeSummary), } -func MetricPathGetSetter[K MetricContext](path []ottl.Field) (ottl.GetSetter[K], error) { - if len(path) == 0 { +func MetricPathGetSetter[K MetricContext](path ottl.Path[K]) (ottl.GetSetter[K], error) { + if path == nil { return accessMetric[K](), nil } - switch path[0].Name { + switch path.Name() { case "name": return accessName[K](), nil case "description": @@ -47,17 +46,17 @@ func MetricPathGetSetter[K MetricContext](path []ottl.Field) (ottl.GetSetter[K], return accessIsMonotonic[K](), nil case "data_points": return accessDataPoints[K](), nil + default: + return nil, FormatDefaultErrorMessage(path.Name(), path.String(), "Metric", MetricRef) } - - return nil, fmt.Errorf("invalid metric path expression %v", path) } func accessMetric[K MetricContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetMetric(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if newMetric, ok := val.(pmetric.Metric); ok { newMetric.CopyTo(tCtx.GetMetric()) } @@ -68,10 +67,10 @@ func accessMetric[K MetricContext]() ottl.StandardGetSetter[K] { func accessName[K MetricContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetMetric().Name(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if str, ok := val.(string); ok { tCtx.GetMetric().SetName(str) } @@ -82,10 +81,10 @@ func accessName[K MetricContext]() ottl.StandardGetSetter[K] { func accessDescription[K MetricContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetMetric().Description(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if str, ok := val.(string); ok { tCtx.GetMetric().SetDescription(str) } @@ -96,10 +95,10 @@ func accessDescription[K MetricContext]() ottl.StandardGetSetter[K] { func accessUnit[K MetricContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetMetric().Unit(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if str, ok := val.(string); ok { tCtx.GetMetric().SetUnit(str) } @@ -110,10 +109,10 @@ func accessUnit[K MetricContext]() ottl.StandardGetSetter[K] { func accessType[K MetricContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return int64(tCtx.GetMetric().Type()), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, _ K, _ any) error { // TODO Implement methods so correctly convert data types. // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/10130 return nil @@ -123,7 +122,7 @@ func accessType[K MetricContext]() ottl.StandardGetSetter[K] { func accessAggTemporality[K MetricContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { metric := tCtx.GetMetric() switch metric.Type() { case pmetric.MetricTypeSum: @@ -135,7 +134,7 @@ func accessAggTemporality[K MetricContext]() ottl.StandardGetSetter[K] { } return nil, nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if newAggTemporality, ok := val.(int64); ok { metric := tCtx.GetMetric() switch metric.Type() { @@ -154,14 +153,14 @@ func accessAggTemporality[K MetricContext]() ottl.StandardGetSetter[K] { func accessIsMonotonic[K MetricContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { metric := tCtx.GetMetric() if metric.Type() == pmetric.MetricTypeSum { return metric.Sum().IsMonotonic(), nil } return nil, nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if newIsMonotonic, ok := val.(bool); ok { metric := tCtx.GetMetric() if metric.Type() == pmetric.MetricTypeSum { @@ -175,9 +174,8 @@ func accessIsMonotonic[K MetricContext]() ottl.StandardGetSetter[K] { func accessDataPoints[K MetricContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { metric := tCtx.GetMetric() - //exhaustive:enforce switch metric.Type() { case pmetric.MetricTypeSum: return metric.Sum().DataPoints(), nil @@ -192,9 +190,8 @@ func accessDataPoints[K MetricContext]() ottl.StandardGetSetter[K] { } return nil, nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { metric := tCtx.GetMetric() - //exhaustive:enforce switch metric.Type() { case pmetric.MetricTypeSum: if newDataPoints, ok := val.(pmetric.NumberDataPointSlice); ok { diff --git a/pkg/ottl/contexts/internal/metric_test.go b/pkg/ottl/contexts/internal/metric_test.go index 8bbcb1d7d1df..3165f818ff8d 100644 --- a/pkg/ottl/contexts/internal/metric_test.go +++ b/pkg/ottl/contexts/internal/metric_test.go @@ -26,17 +26,15 @@ func Test_MetricPathGetSetter(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[*metricContext] orig any newVal any modified func(metric pmetric.Metric) }{ { name: "metric name", - path: []ottl.Field{ - { - Name: "name", - }, + path: &TestPath[*metricContext]{ + N: "name", }, orig: "name", newVal: "new name", @@ -46,10 +44,8 @@ func Test_MetricPathGetSetter(t *testing.T) { }, { name: "metric description", - path: []ottl.Field{ - { - Name: "description", - }, + path: &TestPath[*metricContext]{ + N: "description", }, orig: "description", newVal: "new description", @@ -59,10 +55,8 @@ func Test_MetricPathGetSetter(t *testing.T) { }, { name: "metric unit", - path: []ottl.Field{ - { - Name: "unit", - }, + path: &TestPath[*metricContext]{ + N: "unit", }, orig: "unit", newVal: "new unit", @@ -72,22 +66,18 @@ func Test_MetricPathGetSetter(t *testing.T) { }, { name: "metric type", - path: []ottl.Field{ - { - Name: "type", - }, + path: &TestPath[*metricContext]{ + N: "type", }, orig: int64(pmetric.MetricTypeSum), newVal: int64(pmetric.MetricTypeSum), - modified: func(metric pmetric.Metric) { + modified: func(_ pmetric.Metric) { }, }, { name: "metric aggregation_temporality", - path: []ottl.Field{ - { - Name: "aggregation_temporality", - }, + path: &TestPath[*metricContext]{ + N: "aggregation_temporality", }, orig: int64(2), newVal: int64(1), @@ -97,10 +87,8 @@ func Test_MetricPathGetSetter(t *testing.T) { }, { name: "metric is_monotonic", - path: []ottl.Field{ - { - Name: "is_monotonic", - }, + path: &TestPath[*metricContext]{ + N: "is_monotonic", }, orig: true, newVal: false, @@ -110,10 +98,8 @@ func Test_MetricPathGetSetter(t *testing.T) { }, { name: "metric data points", - path: []ottl.Field{ - { - Name: "data_points", - }, + path: &TestPath[*metricContext]{ + N: "data_points", }, orig: refMetric.Sum().DataPoints(), newVal: newDataPoints, @@ -130,11 +116,11 @@ func Test_MetricPathGetSetter(t *testing.T) { metric := createMetricTelemetry() got, err := accessor.Get(context.Background(), newMetricContext(metric)) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tt.orig, got) err = accessor.Set(context.Background(), newMetricContext(metric), tt.newVal) - assert.Nil(t, err) + assert.NoError(t, err) expectedMetric := createMetricTelemetry() tt.modified(expectedMetric) diff --git a/pkg/ottl/contexts/internal/package_test.go b/pkg/ottl/contexts/internal/package_test.go new file mode 100644 index 000000000000..4486cdb28aa6 --- /dev/null +++ b/pkg/ottl/contexts/internal/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/ottl/contexts/internal/path.go b/pkg/ottl/contexts/internal/path.go new file mode 100644 index 000000000000..c7d9d802b664 --- /dev/null +++ b/pkg/ottl/contexts/internal/path.go @@ -0,0 +1,52 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" + +import ( + "context" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +var _ ottl.Path[any] = &TestPath[any]{} + +type TestPath[K any] struct { + N string + KeySlice []ottl.Key[K] + NextPath *TestPath[K] +} + +func (p *TestPath[K]) Name() string { + return p.N +} + +func (p *TestPath[K]) Next() ottl.Path[K] { + if p.NextPath == nil { + return nil + } + return p.NextPath +} + +func (p *TestPath[K]) Keys() []ottl.Key[K] { + return p.KeySlice +} + +func (p *TestPath[K]) String() string { + return p.N +} + +var _ ottl.Key[any] = &TestKey[any]{} + +type TestKey[K any] struct { + S *string + I *int64 +} + +func (k *TestKey[K]) String(_ context.Context, _ K) (*string, error) { + return k.S, nil +} + +func (k *TestKey[K]) Int(_ context.Context, _ K) (*int64, error) { + return k.I, nil +} diff --git a/pkg/ottl/contexts/internal/resource.go b/pkg/ottl/contexts/internal/resource.go index 0303a4acd7b7..6e86ae81dd93 100644 --- a/pkg/ottl/contexts/internal/resource.go +++ b/pkg/ottl/contexts/internal/resource.go @@ -5,7 +5,6 @@ package internal // import "github.com/open-telemetry/opentelemetry-collector-co import ( "context" - "fmt" "go.opentelemetry.io/collector/pdata/pcommon" @@ -16,30 +15,29 @@ type ResourceContext interface { GetResource() pcommon.Resource } -func ResourcePathGetSetter[K ResourceContext](path []ottl.Field) (ottl.GetSetter[K], error) { - if len(path) == 0 { +func ResourcePathGetSetter[K ResourceContext](path ottl.Path[K]) (ottl.GetSetter[K], error) { + if path == nil { return accessResource[K](), nil } - switch path[0].Name { + switch path.Name() { case "attributes": - mapKeys := path[0].Keys - if mapKeys == nil { + if path.Keys() == nil { return accessResourceAttributes[K](), nil } - return accessResourceAttributesKey[K](mapKeys), nil + return accessResourceAttributesKey[K](path.Keys()), nil case "dropped_attributes_count": return accessResourceDroppedAttributesCount[K](), nil + default: + return nil, FormatDefaultErrorMessage(path.Name(), path.String(), "Resource", ResourceContextRef) } - - return nil, fmt.Errorf("invalid resource path expression %v", path) } func accessResource[K ResourceContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetResource(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if newRes, ok := val.(pcommon.Resource); ok { newRes.CopyTo(tCtx.GetResource()) } @@ -50,10 +48,10 @@ func accessResource[K ResourceContext]() ottl.StandardGetSetter[K] { func accessResourceAttributes[K ResourceContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetResource().Attributes(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if attrs, ok := val.(pcommon.Map); ok { attrs.CopyTo(tCtx.GetResource().Attributes()) } @@ -62,23 +60,23 @@ func accessResourceAttributes[K ResourceContext]() ottl.StandardGetSetter[K] { } } -func accessResourceAttributesKey[K ResourceContext](keys []ottl.Key) ottl.StandardGetSetter[K] { +func accessResourceAttributesKey[K ResourceContext](keys []ottl.Key[K]) ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ Getter: func(ctx context.Context, tCtx K) (any, error) { - return GetMapValue(tCtx.GetResource().Attributes(), keys) + return GetMapValue[K](ctx, tCtx, tCtx.GetResource().Attributes(), keys) }, Setter: func(ctx context.Context, tCtx K, val any) error { - return SetMapValue(tCtx.GetResource().Attributes(), keys, val) + return SetMapValue[K](ctx, tCtx, tCtx.GetResource().Attributes(), keys, val) }, } } func accessResourceDroppedAttributesCount[K ResourceContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return int64(tCtx.GetResource().DroppedAttributesCount()), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if i, ok := val.(int64); ok { tCtx.GetResource().SetDroppedAttributesCount(uint32(i)) } diff --git a/pkg/ottl/contexts/internal/resource_test.go b/pkg/ottl/contexts/internal/resource_test.go index 97f93c044d46..ffc7425701aa 100644 --- a/pkg/ottl/contexts/internal/resource_test.go +++ b/pkg/ottl/contexts/internal/resource_test.go @@ -22,14 +22,14 @@ func TestResourcePathGetSetter(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[*resourceContext] orig any newVal any modified func(resource pcommon.Resource) }{ { name: "resource", - path: []ottl.Field{}, + path: nil, orig: refResource, newVal: pcommon.NewResource(), modified: func(resource pcommon.Resource) { @@ -38,10 +38,8 @@ func TestResourcePathGetSetter(t *testing.T) { }, { name: "attributes", - path: []ottl.Field{ - { - Name: "attributes", - }, + path: &TestPath[*resourceContext]{ + N: "attributes", }, orig: refResource.Attributes(), newVal: newAttrs, @@ -51,13 +49,11 @@ func TestResourcePathGetSetter(t *testing.T) { }, { name: "attributes string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("str"), - }, + path: &TestPath[*resourceContext]{ + N: "attributes", + KeySlice: []ottl.Key[*resourceContext]{ + &TestKey[*resourceContext]{ + S: ottltest.Strp("str"), }, }, }, @@ -69,13 +65,11 @@ func TestResourcePathGetSetter(t *testing.T) { }, { name: "attributes bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bool"), - }, + path: &TestPath[*resourceContext]{ + N: "attributes", + KeySlice: []ottl.Key[*resourceContext]{ + &TestKey[*resourceContext]{ + S: ottltest.Strp("bool"), }, }, }, @@ -87,13 +81,11 @@ func TestResourcePathGetSetter(t *testing.T) { }, { name: "attributes int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("int"), - }, + path: &TestPath[*resourceContext]{ + N: "attributes", + KeySlice: []ottl.Key[*resourceContext]{ + &TestKey[*resourceContext]{ + S: ottltest.Strp("int"), }, }, }, @@ -105,13 +97,11 @@ func TestResourcePathGetSetter(t *testing.T) { }, { name: "attributes float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("double"), - }, + path: &TestPath[*resourceContext]{ + N: "attributes", + KeySlice: []ottl.Key[*resourceContext]{ + &TestKey[*resourceContext]{ + S: ottltest.Strp("double"), }, }, }, @@ -123,13 +113,11 @@ func TestResourcePathGetSetter(t *testing.T) { }, { name: "attributes bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bytes"), - }, + path: &TestPath[*resourceContext]{ + N: "attributes", + KeySlice: []ottl.Key[*resourceContext]{ + &TestKey[*resourceContext]{ + S: ottltest.Strp("bytes"), }, }, }, @@ -141,13 +129,11 @@ func TestResourcePathGetSetter(t *testing.T) { }, { name: "attributes array empty", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_empty"), - }, + path: &TestPath[*resourceContext]{ + N: "attributes", + KeySlice: []ottl.Key[*resourceContext]{ + &TestKey[*resourceContext]{ + S: ottltest.Strp("arr_empty"), }, }, }, @@ -156,19 +142,17 @@ func TestResourcePathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []any{}, - modified: func(resource pcommon.Resource) { + modified: func(_ pcommon.Resource) { // no-op }, }, { name: "attributes array string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_str"), - }, + path: &TestPath[*resourceContext]{ + N: "attributes", + KeySlice: []ottl.Key[*resourceContext]{ + &TestKey[*resourceContext]{ + S: ottltest.Strp("arr_str"), }, }, }, @@ -183,13 +167,11 @@ func TestResourcePathGetSetter(t *testing.T) { }, { name: "attributes array bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bool"), - }, + path: &TestPath[*resourceContext]{ + N: "attributes", + KeySlice: []ottl.Key[*resourceContext]{ + &TestKey[*resourceContext]{ + S: ottltest.Strp("arr_bool"), }, }, }, @@ -204,13 +186,11 @@ func TestResourcePathGetSetter(t *testing.T) { }, { name: "attributes array int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_int"), - }, + path: &TestPath[*resourceContext]{ + N: "attributes", + KeySlice: []ottl.Key[*resourceContext]{ + &TestKey[*resourceContext]{ + S: ottltest.Strp("arr_int"), }, }, }, @@ -225,13 +205,11 @@ func TestResourcePathGetSetter(t *testing.T) { }, { name: "attributes array float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_float"), - }, + path: &TestPath[*resourceContext]{ + N: "attributes", + KeySlice: []ottl.Key[*resourceContext]{ + &TestKey[*resourceContext]{ + S: ottltest.Strp("arr_float"), }, }, }, @@ -246,13 +224,11 @@ func TestResourcePathGetSetter(t *testing.T) { }, { name: "attributes array bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bytes"), - }, + path: &TestPath[*resourceContext]{ + N: "attributes", + KeySlice: []ottl.Key[*resourceContext]{ + &TestKey[*resourceContext]{ + S: ottltest.Strp("arr_bytes"), }, }, }, @@ -267,19 +243,17 @@ func TestResourcePathGetSetter(t *testing.T) { }, { name: "attributes nested", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), - }, - { - Int: ottltest.Intp(0), - }, - { - String: ottltest.Strp("map"), - }, + path: &TestPath[*resourceContext]{ + N: "attributes", + KeySlice: []ottl.Key[*resourceContext]{ + &TestKey[*resourceContext]{ + S: ottltest.Strp("slice"), + }, + &TestKey[*resourceContext]{ + I: ottltest.Intp(0), + }, + &TestKey[*resourceContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -295,19 +269,17 @@ func TestResourcePathGetSetter(t *testing.T) { }, { name: "attributes nested new values", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("new"), - }, - { - Int: ottltest.Intp(2), - }, - { - Int: ottltest.Intp(0), - }, + path: &TestPath[*resourceContext]{ + N: "attributes", + KeySlice: []ottl.Key[*resourceContext]{ + &TestKey[*resourceContext]{ + S: ottltest.Strp("new"), + }, + &TestKey[*resourceContext]{ + I: ottltest.Intp(2), + }, + &TestKey[*resourceContext]{ + I: ottltest.Intp(0), }, }, }, @@ -324,10 +296,8 @@ func TestResourcePathGetSetter(t *testing.T) { }, { name: "dropped_attributes_count", - path: []ottl.Field{ - { - Name: "dropped_attributes_count", - }, + path: &TestPath[*resourceContext]{ + N: "dropped_attributes_count", }, orig: int64(10), newVal: int64(20), @@ -344,11 +314,11 @@ func TestResourcePathGetSetter(t *testing.T) { resource := createResource() got, err := accessor.Get(context.Background(), newResourceContext(resource)) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tt.orig, got) err = accessor.Set(context.Background(), newResourceContext(resource), tt.newVal) - assert.Nil(t, err) + assert.NoError(t, err) expectedResource := createResource() tt.modified(expectedResource) diff --git a/pkg/ottl/contexts/internal/scope.go b/pkg/ottl/contexts/internal/scope.go index 3ed068602f53..f207106c42f6 100644 --- a/pkg/ottl/contexts/internal/scope.go +++ b/pkg/ottl/contexts/internal/scope.go @@ -5,7 +5,6 @@ package internal // import "github.com/open-telemetry/opentelemetry-collector-co import ( "context" - "fmt" "go.opentelemetry.io/collector/pdata/pcommon" @@ -16,35 +15,34 @@ type InstrumentationScopeContext interface { GetInstrumentationScope() pcommon.InstrumentationScope } -func ScopePathGetSetter[K InstrumentationScopeContext](path []ottl.Field) (ottl.GetSetter[K], error) { - if len(path) == 0 { +func ScopePathGetSetter[K InstrumentationScopeContext](path ottl.Path[K]) (ottl.GetSetter[K], error) { + if path == nil { return accessInstrumentationScope[K](), nil } - - switch path[0].Name { + switch path.Name() { case "name": return accessInstrumentationScopeName[K](), nil case "version": return accessInstrumentationScopeVersion[K](), nil case "attributes": - mapKeys := path[0].Keys + mapKeys := path.Keys() if mapKeys == nil { return accessInstrumentationScopeAttributes[K](), nil } return accessInstrumentationScopeAttributesKey[K](mapKeys), nil case "dropped_attributes_count": return accessInstrumentationScopeDroppedAttributesCount[K](), nil + default: + return nil, FormatDefaultErrorMessage(path.Name(), path.String(), "Instrumentation Scope", InstrumentationScopeRef) } - - return nil, fmt.Errorf("invalid scope path expression %v", path) } func accessInstrumentationScope[K InstrumentationScopeContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetInstrumentationScope(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if newIl, ok := val.(pcommon.InstrumentationScope); ok { newIl.CopyTo(tCtx.GetInstrumentationScope()) } @@ -55,10 +53,10 @@ func accessInstrumentationScope[K InstrumentationScopeContext]() ottl.StandardGe func accessInstrumentationScopeAttributes[K InstrumentationScopeContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetInstrumentationScope().Attributes(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if attrs, ok := val.(pcommon.Map); ok { attrs.CopyTo(tCtx.GetInstrumentationScope().Attributes()) } @@ -67,23 +65,23 @@ func accessInstrumentationScopeAttributes[K InstrumentationScopeContext]() ottl. } } -func accessInstrumentationScopeAttributesKey[K InstrumentationScopeContext](keys []ottl.Key) ottl.StandardGetSetter[K] { +func accessInstrumentationScopeAttributesKey[K InstrumentationScopeContext](keys []ottl.Key[K]) ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ Getter: func(ctx context.Context, tCtx K) (any, error) { - return GetMapValue(tCtx.GetInstrumentationScope().Attributes(), keys) + return GetMapValue[K](ctx, tCtx, tCtx.GetInstrumentationScope().Attributes(), keys) }, Setter: func(ctx context.Context, tCtx K, val any) error { - return SetMapValue(tCtx.GetInstrumentationScope().Attributes(), keys, val) + return SetMapValue[K](ctx, tCtx, tCtx.GetInstrumentationScope().Attributes(), keys, val) }, } } func accessInstrumentationScopeName[K InstrumentationScopeContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetInstrumentationScope().Name(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if str, ok := val.(string); ok { tCtx.GetInstrumentationScope().SetName(str) } @@ -94,10 +92,10 @@ func accessInstrumentationScopeName[K InstrumentationScopeContext]() ottl.Standa func accessInstrumentationScopeVersion[K InstrumentationScopeContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetInstrumentationScope().Version(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if str, ok := val.(string); ok { tCtx.GetInstrumentationScope().SetVersion(str) } @@ -108,10 +106,10 @@ func accessInstrumentationScopeVersion[K InstrumentationScopeContext]() ottl.Sta func accessInstrumentationScopeDroppedAttributesCount[K InstrumentationScopeContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return int64(tCtx.GetInstrumentationScope().DroppedAttributesCount()), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if i, ok := val.(int64); ok { tCtx.GetInstrumentationScope().SetDroppedAttributesCount(uint32(i)) } diff --git a/pkg/ottl/contexts/internal/scope_test.go b/pkg/ottl/contexts/internal/scope_test.go index 1560ddb024ca..04882efac3f3 100644 --- a/pkg/ottl/contexts/internal/scope_test.go +++ b/pkg/ottl/contexts/internal/scope_test.go @@ -21,14 +21,14 @@ func TestScopePathGetSetter(t *testing.T) { newAttrs.PutStr("hello", "world") tests := []struct { name string - path []ottl.Field + path ottl.Path[*instrumentationScopeContext] orig any newVal any modified func(is pcommon.InstrumentationScope) }{ { name: "instrumentation_scope", - path: []ottl.Field{}, + path: nil, orig: refIS, newVal: pcommon.NewInstrumentationScope(), modified: func(is pcommon.InstrumentationScope) { @@ -37,10 +37,8 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "instrumentation_scope name", - path: []ottl.Field{ - { - Name: "name", - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "name", }, orig: refIS.Name(), newVal: "newname", @@ -50,10 +48,8 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "instrumentation_scope version", - path: []ottl.Field{ - { - Name: "version", - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "version", }, orig: refIS.Version(), newVal: "next", @@ -63,10 +59,8 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "attributes", - path: []ottl.Field{ - { - Name: "attributes", - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "attributes", }, orig: refIS.Attributes(), newVal: newAttrs, @@ -76,13 +70,11 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "attributes string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("str"), - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "attributes", + KeySlice: []ottl.Key[*instrumentationScopeContext]{ + &TestKey[*instrumentationScopeContext]{ + S: ottltest.Strp("str"), }, }, }, @@ -94,10 +86,8 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "dropped_attributes_count", - path: []ottl.Field{ - { - Name: "dropped_attributes_count", - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "dropped_attributes_count", }, orig: int64(10), newVal: int64(20), @@ -107,13 +97,11 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "attributes bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bool"), - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "attributes", + KeySlice: []ottl.Key[*instrumentationScopeContext]{ + &TestKey[*instrumentationScopeContext]{ + S: ottltest.Strp("bool"), }, }, }, @@ -125,13 +113,11 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "attributes int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("int"), - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "attributes", + KeySlice: []ottl.Key[*instrumentationScopeContext]{ + &TestKey[*instrumentationScopeContext]{ + S: ottltest.Strp("int"), }, }, }, @@ -143,13 +129,11 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "attributes float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("double"), - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "attributes", + KeySlice: []ottl.Key[*instrumentationScopeContext]{ + &TestKey[*instrumentationScopeContext]{ + S: ottltest.Strp("double"), }, }, }, @@ -161,13 +145,11 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "attributes bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bytes"), - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "attributes", + KeySlice: []ottl.Key[*instrumentationScopeContext]{ + &TestKey[*instrumentationScopeContext]{ + S: ottltest.Strp("bytes"), }, }, }, @@ -179,13 +161,11 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "attributes array empty", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_empty"), - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "attributes", + KeySlice: []ottl.Key[*instrumentationScopeContext]{ + &TestKey[*instrumentationScopeContext]{ + S: ottltest.Strp("arr_empty"), }, }, }, @@ -194,19 +174,17 @@ func TestScopePathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []any{}, - modified: func(is pcommon.InstrumentationScope) { + modified: func(_ pcommon.InstrumentationScope) { // no-op }, }, { name: "attributes array string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_str"), - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "attributes", + KeySlice: []ottl.Key[*instrumentationScopeContext]{ + &TestKey[*instrumentationScopeContext]{ + S: ottltest.Strp("arr_str"), }, }, }, @@ -222,13 +200,11 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "attributes array bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bool"), - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "attributes", + KeySlice: []ottl.Key[*instrumentationScopeContext]{ + &TestKey[*instrumentationScopeContext]{ + S: ottltest.Strp("arr_bool"), }, }, }, @@ -244,13 +220,11 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "attributes array int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_int"), - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "attributes", + KeySlice: []ottl.Key[*instrumentationScopeContext]{ + &TestKey[*instrumentationScopeContext]{ + S: ottltest.Strp("arr_int"), }, }, }, @@ -266,13 +240,11 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "attributes array float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_float"), - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "attributes", + KeySlice: []ottl.Key[*instrumentationScopeContext]{ + &TestKey[*instrumentationScopeContext]{ + S: ottltest.Strp("arr_float"), }, }, }, @@ -288,13 +260,11 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "attributes array bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bytes"), - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "attributes", + KeySlice: []ottl.Key[*instrumentationScopeContext]{ + &TestKey[*instrumentationScopeContext]{ + S: ottltest.Strp("arr_bytes"), }, }, }, @@ -310,19 +280,17 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "attributes nested", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), - }, - { - Int: ottltest.Intp(0), - }, - { - String: ottltest.Strp("map"), - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "attributes", + KeySlice: []ottl.Key[*instrumentationScopeContext]{ + &TestKey[*instrumentationScopeContext]{ + S: ottltest.Strp("slice"), + }, + &TestKey[*instrumentationScopeContext]{ + I: ottltest.Intp(0), + }, + &TestKey[*instrumentationScopeContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -338,19 +306,17 @@ func TestScopePathGetSetter(t *testing.T) { }, { name: "attributes nested new values", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("new"), - }, - { - Int: ottltest.Intp(2), - }, - { - Int: ottltest.Intp(0), - }, + path: &TestPath[*instrumentationScopeContext]{ + N: "attributes", + KeySlice: []ottl.Key[*instrumentationScopeContext]{ + &TestKey[*instrumentationScopeContext]{ + S: ottltest.Strp("new"), + }, + &TestKey[*instrumentationScopeContext]{ + I: ottltest.Intp(2), + }, + &TestKey[*instrumentationScopeContext]{ + I: ottltest.Intp(0), }, }, }, @@ -374,11 +340,11 @@ func TestScopePathGetSetter(t *testing.T) { is := createInstrumentationScope() got, err := accessor.Get(context.Background(), newInstrumentationScopeContext(is)) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tt.orig, got) err = accessor.Set(context.Background(), newInstrumentationScopeContext(is), tt.newVal) - assert.Nil(t, err) + assert.NoError(t, err) expectedIS := createInstrumentationScope() tt.modified(expectedIS) diff --git a/pkg/ottl/contexts/internal/slice.go b/pkg/ottl/contexts/internal/slice.go index da846c61f05e..5a90e281a902 100644 --- a/pkg/ottl/contexts/internal/slice.go +++ b/pkg/ottl/contexts/internal/slice.go @@ -4,6 +4,7 @@ package internal // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" import ( + "context" "fmt" "go.opentelemetry.io/collector/pdata/pcommon" @@ -11,34 +12,46 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" ) -func GetSliceValue(s pcommon.Slice, keys []ottl.Key) (any, error) { +func GetSliceValue[K any](ctx context.Context, tCtx K, s pcommon.Slice, keys []ottl.Key[K]) (any, error) { if len(keys) == 0 { return nil, fmt.Errorf("cannot get slice value without key") } - if keys[0].Int == nil { + + i, err := keys[0].Int(ctx, tCtx) + if err != nil { + return nil, err + } + if i == nil { return nil, fmt.Errorf("non-integer indexing is not supported") } - idx := int(*keys[0].Int) + + idx := int(*i) if idx < 0 || idx >= s.Len() { return nil, fmt.Errorf("index %d out of bounds", idx) } - return getIndexableValue(s.At(int(*keys[0].Int)), keys[1:]) + return getIndexableValue[K](ctx, tCtx, s.At(idx), keys[1:]) } -func SetSliceValue(s pcommon.Slice, keys []ottl.Key, val any) error { +func SetSliceValue[K any](ctx context.Context, tCtx K, s pcommon.Slice, keys []ottl.Key[K], val any) error { if len(keys) == 0 { return fmt.Errorf("cannot set slice value without key") } - if keys[0].Int == nil { + + i, err := keys[0].Int(ctx, tCtx) + if err != nil { + return err + } + if i == nil { return fmt.Errorf("non-integer indexing is not supported") } - idx := int(*keys[0].Int) + + idx := int(*i) if idx < 0 || idx >= s.Len() { return fmt.Errorf("index %d out of bounds", idx) } - return setIndexableValue(s.At(int(*keys[0].Int)), val, keys[1:]) + return setIndexableValue[K](ctx, tCtx, s.At(idx), val, keys[1:]) } diff --git a/pkg/ottl/contexts/internal/slice_test.go b/pkg/ottl/contexts/internal/slice_test.go index b0d6d23b9997..0f238225251a 100644 --- a/pkg/ottl/contexts/internal/slice_test.go +++ b/pkg/ottl/contexts/internal/slice_test.go @@ -4,6 +4,7 @@ package internal import ( + "context" "fmt" "testing" @@ -17,49 +18,44 @@ import ( func Test_GetSliceValue_Invalid(t *testing.T) { tests := []struct { name string - keys []ottl.Key + keys []ottl.Key[any] err error }{ - { - name: "no keys", - keys: []ottl.Key{}, - err: fmt.Errorf("cannot get slice value without key"), - }, { name: "first key not an integer", - keys: []ottl.Key{ - { - String: ottltest.Strp("key"), + keys: []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("key"), }, }, err: fmt.Errorf("non-integer indexing is not supported"), }, { name: "index too large", - keys: []ottl.Key{ - { - Int: ottltest.Intp(1), + keys: []ottl.Key[any]{ + &TestKey[any]{ + I: ottltest.Intp(1), }, }, err: fmt.Errorf("index 1 out of bounds"), }, { name: "index too small", - keys: []ottl.Key{ - { - Int: ottltest.Intp(-1), + keys: []ottl.Key[any]{ + &TestKey[any]{ + I: ottltest.Intp(-1), }, }, err: fmt.Errorf("index -1 out of bounds"), }, { name: "invalid type", - keys: []ottl.Key{ - { - Int: ottltest.Intp(0), + keys: []ottl.Key[any]{ + &TestKey[any]{ + I: ottltest.Intp(0), }, - { - String: ottltest.Strp("string"), + &TestKey[any]{ + S: ottltest.Strp("string"), }, }, err: fmt.Errorf("type Str does not support string indexing"), @@ -71,58 +67,58 @@ func Test_GetSliceValue_Invalid(t *testing.T) { s := pcommon.NewSlice() s.AppendEmpty().SetStr("val") - _, err := GetSliceValue(s, tt.keys) + _, err := GetSliceValue[any](context.Background(), nil, s, tt.keys) assert.Equal(t, tt.err, err) }) } } +func Test_GetSliceValue_NilKey(t *testing.T) { + _, err := GetSliceValue[any](context.Background(), nil, pcommon.NewSlice(), nil) + assert.Error(t, err) +} + func Test_SetSliceValue_Invalid(t *testing.T) { tests := []struct { name string - keys []ottl.Key + keys []ottl.Key[any] err error }{ - { - name: "no keys", - keys: []ottl.Key{}, - err: fmt.Errorf("cannot set slice value without key"), - }, { name: "first key not an integer", - keys: []ottl.Key{ - { - String: ottltest.Strp("key"), + keys: []ottl.Key[any]{ + &TestKey[any]{ + S: ottltest.Strp("key"), }, }, err: fmt.Errorf("non-integer indexing is not supported"), }, { name: "index too large", - keys: []ottl.Key{ - { - Int: ottltest.Intp(1), + keys: []ottl.Key[any]{ + &TestKey[any]{ + I: ottltest.Intp(1), }, }, err: fmt.Errorf("index 1 out of bounds"), }, { name: "index too small", - keys: []ottl.Key{ - { - Int: ottltest.Intp(-1), + keys: []ottl.Key[any]{ + &TestKey[any]{ + I: ottltest.Intp(-1), }, }, err: fmt.Errorf("index -1 out of bounds"), }, { name: "invalid type", - keys: []ottl.Key{ - { - Int: ottltest.Intp(0), + keys: []ottl.Key[any]{ + &TestKey[any]{ + I: ottltest.Intp(0), }, - { - String: ottltest.Strp("string"), + &TestKey[any]{ + S: ottltest.Strp("string"), }, }, err: fmt.Errorf("type Str does not support string indexing"), @@ -134,8 +130,13 @@ func Test_SetSliceValue_Invalid(t *testing.T) { s := pcommon.NewSlice() s.AppendEmpty().SetStr("val") - err := SetSliceValue(s, tt.keys, "value") + err := SetSliceValue[any](context.Background(), nil, s, tt.keys, "value") assert.Equal(t, tt.err, err) }) } } + +func Test_SetSliceValue_NilKey(t *testing.T) { + err := SetSliceValue[any](context.Background(), nil, pcommon.NewSlice(), nil, "value") + assert.Error(t, err) +} diff --git a/pkg/ottl/contexts/internal/span.go b/pkg/ottl/contexts/internal/span.go index 0c6c48601f71..607cb2e110f9 100644 --- a/pkg/ottl/contexts/internal/span.go +++ b/pkg/ottl/contexts/internal/span.go @@ -17,6 +17,10 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" ) +const ( + SpanContextName = "Span" +) + type SpanContext interface { GetSpan() ptrace.Span } @@ -33,51 +37,59 @@ var SpanSymbolTable = map[ottl.EnumSymbol]ottl.Enum{ "STATUS_CODE_ERROR": ottl.Enum(ptrace.StatusCodeError), } -func SpanPathGetSetter[K SpanContext](path []ottl.Field) (ottl.GetSetter[K], error) { - if len(path) == 0 { +func SpanPathGetSetter[K SpanContext](path ottl.Path[K]) (ottl.GetSetter[K], error) { + if path == nil { return accessSpan[K](), nil } - - switch path[0].Name { + switch path.Name() { case "trace_id": - if len(path) == 1 { - return accessTraceID[K](), nil - } - if path[1].Name == "string" { - return accessStringTraceID[K](), nil + nextPath := path.Next() + if nextPath != nil { + if nextPath.Name() == "string" { + return accessStringTraceID[K](), nil + } + return nil, FormatDefaultErrorMessage(nextPath.Name(), nextPath.String(), SpanContextName, SpanRef) } + return accessTraceID[K](), nil case "span_id": - if len(path) == 1 { - return accessSpanID[K](), nil - } - if path[1].Name == "string" { - return accessStringSpanID[K](), nil + nextPath := path.Next() + if nextPath != nil { + if nextPath.Name() == "string" { + return accessStringSpanID[K](), nil + } + return nil, FormatDefaultErrorMessage(nextPath.Name(), nextPath.String(), SpanContextName, SpanRef) } + return accessSpanID[K](), nil case "trace_state": - mapKey := path[0].Keys + mapKey := path.Keys() if mapKey == nil { return accessTraceState[K](), nil } return accessTraceStateKey[K](mapKey) case "parent_span_id": - if len(path) == 1 { - return accessParentSpanID[K](), nil - } - if path[1].Name == "string" { - return accessStringParentSpanID[K](), nil + nextPath := path.Next() + if nextPath != nil { + if nextPath.Name() == "string" { + return accessStringParentSpanID[K](), nil + } + return nil, FormatDefaultErrorMessage(nextPath.Name(), nextPath.String(), SpanContextName, SpanRef) } + return accessParentSpanID[K](), nil case "name": return accessSpanName[K](), nil case "kind": - if len(path) == 1 { - return accessKind[K](), nil - } - if path[1].Name == "string" { - return accessStringKind[K](), nil - } - if path[1].Name == "deprecated_string" { - return accessDeprecatedStringKind[K](), nil + nextPath := path.Next() + if nextPath != nil { + switch nextPath.Name() { + case "string": + return accessStringKind[K](), nil + case "deprecated_string": + return accessDeprecatedStringKind[K](), nil + default: + return nil, FormatDefaultErrorMessage(nextPath.Name(), nextPath.String(), SpanContextName, SpanRef) + } } + return accessKind[K](), nil case "start_time_unix_nano": return accessStartTimeUnixNano[K](), nil case "end_time_unix_nano": @@ -87,7 +99,7 @@ func SpanPathGetSetter[K SpanContext](path []ottl.Field) (ottl.GetSetter[K], err case "end_time": return accessEndTime[K](), nil case "attributes": - mapKeys := path[0].Keys + mapKeys := path.Keys() if mapKeys == nil { return accessAttributes[K](), nil } @@ -103,26 +115,29 @@ func SpanPathGetSetter[K SpanContext](path []ottl.Field) (ottl.GetSetter[K], err case "dropped_links_count": return accessDroppedLinksCount[K](), nil case "status": - if len(path) == 1 { - return accessStatus[K](), nil - } - switch path[1].Name { - case "code": - return accessStatusCode[K](), nil - case "message": - return accessStatusMessage[K](), nil + nextPath := path.Next() + if nextPath != nil { + switch nextPath.Name() { + case "code": + return accessStatusCode[K](), nil + case "message": + return accessStatusMessage[K](), nil + default: + return nil, FormatDefaultErrorMessage(nextPath.Name(), nextPath.String(), SpanContextName, SpanRef) + } } + return accessStatus[K](), nil + default: + return nil, FormatDefaultErrorMessage(path.Name(), path.String(), SpanContextName, SpanRef) } - - return nil, fmt.Errorf("invalid span path expression %v", path) } func accessSpan[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if newSpan, ok := val.(ptrace.Span); ok { newSpan.CopyTo(tCtx.GetSpan()) } @@ -133,10 +148,10 @@ func accessSpan[K SpanContext]() ottl.StandardGetSetter[K] { func accessTraceID[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().TraceID(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if newTraceID, ok := val.(pcommon.TraceID); ok { tCtx.GetSpan().SetTraceID(newTraceID) } @@ -147,11 +162,11 @@ func accessTraceID[K SpanContext]() ottl.StandardGetSetter[K] { func accessStringTraceID[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { id := tCtx.GetSpan().TraceID() return hex.EncodeToString(id[:]), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if str, ok := val.(string); ok { id, err := ParseTraceID(str) if err != nil { @@ -166,10 +181,10 @@ func accessStringTraceID[K SpanContext]() ottl.StandardGetSetter[K] { func accessSpanID[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().SpanID(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if newSpanID, ok := val.(pcommon.SpanID); ok { tCtx.GetSpan().SetSpanID(newSpanID) } @@ -180,11 +195,11 @@ func accessSpanID[K SpanContext]() ottl.StandardGetSetter[K] { func accessStringSpanID[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { id := tCtx.GetSpan().SpanID() return hex.EncodeToString(id[:]), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if str, ok := val.(string); ok { id, err := ParseSpanID(str) if err != nil { @@ -199,10 +214,10 @@ func accessStringSpanID[K SpanContext]() ottl.StandardGetSetter[K] { func accessTraceState[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().TraceState().AsRaw(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if str, ok := val.(string); ok { tCtx.GetSpan().TraceState().FromRaw(str) } @@ -211,27 +226,35 @@ func accessTraceState[K SpanContext]() ottl.StandardGetSetter[K] { } } -func accessTraceStateKey[K SpanContext](keys []ottl.Key) (ottl.StandardGetSetter[K], error) { +func accessTraceStateKey[K SpanContext](keys []ottl.Key[K]) (ottl.StandardGetSetter[K], error) { if len(keys) != 1 { return ottl.StandardGetSetter[K]{}, fmt.Errorf("must provide exactly 1 key when accessing trace_state") } - if keys[0].String == nil { - return ottl.StandardGetSetter[K]{}, fmt.Errorf("trace_state indexing type must be a string") - } return ottl.StandardGetSetter[K]{ Getter: func(ctx context.Context, tCtx K) (any, error) { if ts, err := trace.ParseTraceState(tCtx.GetSpan().TraceState().AsRaw()); err == nil { - if keys[0].String == nil { + s, err := keys[0].String(ctx, tCtx) + if err != nil { return nil, err } - return ts.Get(*keys[0].String), nil + if s == nil { + return nil, fmt.Errorf("trace_state indexing type must be a string") + } + return ts.Get(*s), nil } return nil, nil }, Setter: func(ctx context.Context, tCtx K, val any) error { if str, ok := val.(string); ok { if ts, err := trace.ParseTraceState(tCtx.GetSpan().TraceState().AsRaw()); err == nil { - if updated, err := ts.Insert(*keys[0].String, str); err == nil { + s, err := keys[0].String(ctx, tCtx) + if err != nil { + return err + } + if s == nil { + return fmt.Errorf("trace_state indexing type must be a string") + } + if updated, err := ts.Insert(*s, str); err == nil { tCtx.GetSpan().TraceState().FromRaw(updated.String()) } } @@ -243,10 +266,10 @@ func accessTraceStateKey[K SpanContext](keys []ottl.Key) (ottl.StandardGetSetter func accessParentSpanID[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().ParentSpanID(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if newParentSpanID, ok := val.(pcommon.SpanID); ok { tCtx.GetSpan().SetParentSpanID(newParentSpanID) } @@ -257,11 +280,11 @@ func accessParentSpanID[K SpanContext]() ottl.StandardGetSetter[K] { func accessStringParentSpanID[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { id := tCtx.GetSpan().ParentSpanID() return hex.EncodeToString(id[:]), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if str, ok := val.(string); ok { id, err := ParseSpanID(str) if err != nil { @@ -276,10 +299,10 @@ func accessStringParentSpanID[K SpanContext]() ottl.StandardGetSetter[K] { func accessSpanName[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().Name(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if str, ok := val.(string); ok { tCtx.GetSpan().SetName(str) } @@ -290,10 +313,10 @@ func accessSpanName[K SpanContext]() ottl.StandardGetSetter[K] { func accessKind[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return int64(tCtx.GetSpan().Kind()), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if i, ok := val.(int64); ok { tCtx.GetSpan().SetKind(ptrace.SpanKind(i)) } @@ -304,10 +327,10 @@ func accessKind[K SpanContext]() ottl.StandardGetSetter[K] { func accessStringKind[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().Kind().String(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if s, ok := val.(string); ok { var kind ptrace.SpanKind switch s { @@ -335,10 +358,10 @@ func accessStringKind[K SpanContext]() ottl.StandardGetSetter[K] { func accessDeprecatedStringKind[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return traceutil.SpanKindStr(tCtx.GetSpan().Kind()), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if s, ok := val.(string); ok { var kind ptrace.SpanKind switch s { @@ -366,10 +389,10 @@ func accessDeprecatedStringKind[K SpanContext]() ottl.StandardGetSetter[K] { func accessStartTimeUnixNano[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().StartTimestamp().AsTime().UnixNano(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if i, ok := val.(int64); ok { tCtx.GetSpan().SetStartTimestamp(pcommon.NewTimestampFromTime(time.Unix(0, i))) } @@ -380,10 +403,10 @@ func accessStartTimeUnixNano[K SpanContext]() ottl.StandardGetSetter[K] { func accessEndTimeUnixNano[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().EndTimestamp().AsTime().UnixNano(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if i, ok := val.(int64); ok { tCtx.GetSpan().SetEndTimestamp(pcommon.NewTimestampFromTime(time.Unix(0, i))) } @@ -394,10 +417,10 @@ func accessEndTimeUnixNano[K SpanContext]() ottl.StandardGetSetter[K] { func accessStartTime[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().StartTimestamp().AsTime(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if i, ok := val.(time.Time); ok { tCtx.GetSpan().SetStartTimestamp(pcommon.NewTimestampFromTime(i)) } @@ -408,10 +431,10 @@ func accessStartTime[K SpanContext]() ottl.StandardGetSetter[K] { func accessEndTime[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().EndTimestamp().AsTime(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if i, ok := val.(time.Time); ok { tCtx.GetSpan().SetEndTimestamp(pcommon.NewTimestampFromTime(i)) } @@ -422,10 +445,10 @@ func accessEndTime[K SpanContext]() ottl.StandardGetSetter[K] { func accessAttributes[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().Attributes(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if attrs, ok := val.(pcommon.Map); ok { attrs.CopyTo(tCtx.GetSpan().Attributes()) } @@ -434,23 +457,23 @@ func accessAttributes[K SpanContext]() ottl.StandardGetSetter[K] { } } -func accessAttributesKey[K SpanContext](keys []ottl.Key) ottl.StandardGetSetter[K] { +func accessAttributesKey[K SpanContext](keys []ottl.Key[K]) ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ Getter: func(ctx context.Context, tCtx K) (any, error) { - return GetMapValue(tCtx.GetSpan().Attributes(), keys) + return GetMapValue[K](ctx, tCtx, tCtx.GetSpan().Attributes(), keys) }, Setter: func(ctx context.Context, tCtx K, val any) error { - return SetMapValue(tCtx.GetSpan().Attributes(), keys, val) + return SetMapValue[K](ctx, tCtx, tCtx.GetSpan().Attributes(), keys, val) }, } } func accessSpanDroppedAttributesCount[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return int64(tCtx.GetSpan().DroppedAttributesCount()), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if i, ok := val.(int64); ok { tCtx.GetSpan().SetDroppedAttributesCount(uint32(i)) } @@ -461,12 +484,12 @@ func accessSpanDroppedAttributesCount[K SpanContext]() ottl.StandardGetSetter[K] func accessEvents[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().Events(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if slc, ok := val.(ptrace.SpanEventSlice); ok { - tCtx.GetSpan().Events().RemoveIf(func(event ptrace.SpanEvent) bool { + tCtx.GetSpan().Events().RemoveIf(func(_ ptrace.SpanEvent) bool { return true }) slc.CopyTo(tCtx.GetSpan().Events()) @@ -478,10 +501,10 @@ func accessEvents[K SpanContext]() ottl.StandardGetSetter[K] { func accessDroppedEventsCount[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return int64(tCtx.GetSpan().DroppedEventsCount()), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if i, ok := val.(int64); ok { tCtx.GetSpan().SetDroppedEventsCount(uint32(i)) } @@ -492,12 +515,12 @@ func accessDroppedEventsCount[K SpanContext]() ottl.StandardGetSetter[K] { func accessLinks[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().Links(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if slc, ok := val.(ptrace.SpanLinkSlice); ok { - tCtx.GetSpan().Links().RemoveIf(func(event ptrace.SpanLink) bool { + tCtx.GetSpan().Links().RemoveIf(func(_ ptrace.SpanLink) bool { return true }) slc.CopyTo(tCtx.GetSpan().Links()) @@ -509,10 +532,10 @@ func accessLinks[K SpanContext]() ottl.StandardGetSetter[K] { func accessDroppedLinksCount[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return int64(tCtx.GetSpan().DroppedLinksCount()), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if i, ok := val.(int64); ok { tCtx.GetSpan().SetDroppedLinksCount(uint32(i)) } @@ -523,10 +546,10 @@ func accessDroppedLinksCount[K SpanContext]() ottl.StandardGetSetter[K] { func accessStatus[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().Status(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if status, ok := val.(ptrace.Status); ok { status.CopyTo(tCtx.GetSpan().Status()) } @@ -537,10 +560,10 @@ func accessStatus[K SpanContext]() ottl.StandardGetSetter[K] { func accessStatusCode[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return int64(tCtx.GetSpan().Status().Code()), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if i, ok := val.(int64); ok { tCtx.GetSpan().Status().SetCode(ptrace.StatusCode(i)) } @@ -551,10 +574,10 @@ func accessStatusCode[K SpanContext]() ottl.StandardGetSetter[K] { func accessStatusMessage[K SpanContext]() ottl.StandardGetSetter[K] { return ottl.StandardGetSetter[K]{ - Getter: func(ctx context.Context, tCtx K) (any, error) { + Getter: func(_ context.Context, tCtx K) (any, error) { return tCtx.GetSpan().Status().Message(), nil }, - Setter: func(ctx context.Context, tCtx K, val any) error { + Setter: func(_ context.Context, tCtx K, val any) error { if str, ok := val.(string); ok { tCtx.GetSpan().Status().SetMessage(str) } diff --git a/pkg/ottl/contexts/internal/span_test.go b/pkg/ottl/contexts/internal/span_test.go index 6ccbf92e4a93..899d12493424 100644 --- a/pkg/ottl/contexts/internal/span_test.go +++ b/pkg/ottl/contexts/internal/span_test.go @@ -41,17 +41,15 @@ func TestSpanPathGetSetter(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[*spanContext] orig any newVal any modified func(span ptrace.Span) }{ { name: "trace_id", - path: []ottl.Field{ - { - Name: "trace_id", - }, + path: &TestPath[*spanContext]{ + N: "trace_id", }, orig: pcommon.TraceID(traceID), newVal: pcommon.TraceID(traceID2), @@ -61,10 +59,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "span_id", - path: []ottl.Field{ - { - Name: "span_id", - }, + path: &TestPath[*spanContext]{ + N: "span_id", }, orig: pcommon.SpanID(spanID), newVal: pcommon.SpanID(spanID2), @@ -74,12 +70,10 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "trace_id string", - path: []ottl.Field{ - { - Name: "trace_id", - }, - { - Name: "string", + path: &TestPath[*spanContext]{ + N: "trace_id", + NextPath: &TestPath[*spanContext]{ + N: "string", }, }, orig: hex.EncodeToString(traceID[:]), @@ -90,12 +84,10 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "span_id string", - path: []ottl.Field{ - { - Name: "span_id", - }, - { - Name: "string", + path: &TestPath[*spanContext]{ + N: "span_id", + NextPath: &TestPath[*spanContext]{ + N: "string", }, }, orig: hex.EncodeToString(spanID[:]), @@ -106,10 +98,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "trace_state", - path: []ottl.Field{ - { - Name: "trace_state", - }, + path: &TestPath[*spanContext]{ + N: "trace_state", }, orig: "key1=val1,key2=val2", newVal: "key=newVal", @@ -119,13 +109,11 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "trace_state key", - path: []ottl.Field{ - { - Name: "trace_state", - Keys: []ottl.Key{ - { - String: ottltest.Strp("key1"), - }, + path: &TestPath[*spanContext]{ + N: "trace_state", + KeySlice: []ottl.Key[*spanContext]{ + &TestKey[*spanContext]{ + S: ottltest.Strp("key1"), }, }, }, @@ -137,10 +125,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "parent_span_id", - path: []ottl.Field{ - { - Name: "parent_span_id", - }, + path: &TestPath[*spanContext]{ + N: "parent_span_id", }, orig: pcommon.SpanID(spanID2), newVal: pcommon.SpanID(spanID), @@ -150,12 +136,10 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "parent_span_id string", - path: []ottl.Field{ - { - Name: "parent_span_id", - }, - { - Name: "string", + path: &TestPath[*spanContext]{ + N: "parent_span_id", + NextPath: &TestPath[*spanContext]{ + N: "string", }, }, orig: hex.EncodeToString(spanID2[:]), @@ -166,10 +150,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "name", - path: []ottl.Field{ - { - Name: "name", - }, + path: &TestPath[*spanContext]{ + N: "name", }, orig: "bear", newVal: "cat", @@ -179,10 +161,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "kind", - path: []ottl.Field{ - { - Name: "kind", - }, + path: &TestPath[*spanContext]{ + N: "kind", }, orig: int64(2), newVal: int64(3), @@ -192,12 +172,10 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "string kind", - path: []ottl.Field{ - { - Name: "kind", - }, - { - Name: "string", + path: &TestPath[*spanContext]{ + N: "kind", + NextPath: &TestPath[*spanContext]{ + N: "string", }, }, orig: "Server", @@ -208,12 +186,10 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "deprecated string kind", - path: []ottl.Field{ - { - Name: "kind", - }, - { - Name: "deprecated_string", + path: &TestPath[*spanContext]{ + N: "kind", + NextPath: &TestPath[*spanContext]{ + N: "deprecated_string", }, }, orig: "SPAN_KIND_SERVER", @@ -224,10 +200,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "start_time_unix_nano", - path: []ottl.Field{ - { - Name: "start_time_unix_nano", - }, + path: &TestPath[*spanContext]{ + N: "start_time_unix_nano", }, orig: int64(100_000_000), newVal: int64(200_000_000), @@ -237,10 +211,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "end_time_unix_nano", - path: []ottl.Field{ - { - Name: "end_time_unix_nano", - }, + path: &TestPath[*spanContext]{ + N: "end_time_unix_nano", }, orig: int64(500_000_000), newVal: int64(200_000_000), @@ -250,10 +222,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "attributes", - path: []ottl.Field{ - { - Name: "attributes", - }, + path: &TestPath[*spanContext]{ + N: "attributes", }, orig: refSpan.Attributes(), newVal: newAttrs, @@ -263,13 +233,11 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "attributes string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("str"), - }, + path: &TestPath[*spanContext]{ + N: "attributes", + KeySlice: []ottl.Key[*spanContext]{ + &TestKey[*spanContext]{ + S: ottltest.Strp("str"), }, }, }, @@ -281,13 +249,11 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "attributes bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bool"), - }, + path: &TestPath[*spanContext]{ + N: "attributes", + KeySlice: []ottl.Key[*spanContext]{ + &TestKey[*spanContext]{ + S: ottltest.Strp("bool"), }, }, }, @@ -299,13 +265,11 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "attributes int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("int"), - }, + path: &TestPath[*spanContext]{ + N: "attributes", + KeySlice: []ottl.Key[*spanContext]{ + &TestKey[*spanContext]{ + S: ottltest.Strp("int"), }, }, }, @@ -317,13 +281,11 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "attributes float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("double"), - }, + path: &TestPath[*spanContext]{ + N: "attributes", + KeySlice: []ottl.Key[*spanContext]{ + &TestKey[*spanContext]{ + S: ottltest.Strp("double"), }, }, }, @@ -335,13 +297,11 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "attributes bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bytes"), - }, + path: &TestPath[*spanContext]{ + N: "attributes", + KeySlice: []ottl.Key[*spanContext]{ + &TestKey[*spanContext]{ + S: ottltest.Strp("bytes"), }, }, }, @@ -353,13 +313,11 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "attributes array empty", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_empty"), - }, + path: &TestPath[*spanContext]{ + N: "attributes", + KeySlice: []ottl.Key[*spanContext]{ + &TestKey[*spanContext]{ + S: ottltest.Strp("arr_empty"), }, }, }, @@ -368,19 +326,17 @@ func TestSpanPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []any{}, - modified: func(span ptrace.Span) { + modified: func(_ ptrace.Span) { // no-op }, }, { name: "attributes array string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_str"), - }, + path: &TestPath[*spanContext]{ + N: "attributes", + KeySlice: []ottl.Key[*spanContext]{ + &TestKey[*spanContext]{ + S: ottltest.Strp("arr_str"), }, }, }, @@ -395,13 +351,11 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "attributes array bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bool"), - }, + path: &TestPath[*spanContext]{ + N: "attributes", + KeySlice: []ottl.Key[*spanContext]{ + &TestKey[*spanContext]{ + S: ottltest.Strp("arr_bool"), }, }, }, @@ -416,13 +370,11 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "attributes array int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_int"), - }, + path: &TestPath[*spanContext]{ + N: "attributes", + KeySlice: []ottl.Key[*spanContext]{ + &TestKey[*spanContext]{ + S: ottltest.Strp("arr_int"), }, }, }, @@ -437,13 +389,11 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "attributes array float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_float"), - }, + path: &TestPath[*spanContext]{ + N: "attributes", + KeySlice: []ottl.Key[*spanContext]{ + &TestKey[*spanContext]{ + S: ottltest.Strp("arr_float"), }, }, }, @@ -458,13 +408,11 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "attributes array bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bytes"), - }, + path: &TestPath[*spanContext]{ + N: "attributes", + KeySlice: []ottl.Key[*spanContext]{ + &TestKey[*spanContext]{ + S: ottltest.Strp("arr_bytes"), }, }, }, @@ -479,19 +427,17 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "attributes nested", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), - }, - { - Int: ottltest.Intp(0), - }, - { - String: ottltest.Strp("map"), - }, + path: &TestPath[*spanContext]{ + N: "attributes", + KeySlice: []ottl.Key[*spanContext]{ + &TestKey[*spanContext]{ + S: ottltest.Strp("slice"), + }, + &TestKey[*spanContext]{ + I: ottltest.Intp(0), + }, + &TestKey[*spanContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -507,19 +453,17 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "attributes nested new values", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("new"), - }, - { - Int: ottltest.Intp(2), - }, - { - Int: ottltest.Intp(0), - }, + path: &TestPath[*spanContext]{ + N: "attributes", + KeySlice: []ottl.Key[*spanContext]{ + &TestKey[*spanContext]{ + S: ottltest.Strp("new"), + }, + &TestKey[*spanContext]{ + I: ottltest.Intp(2), + }, + &TestKey[*spanContext]{ + I: ottltest.Intp(0), }, }, }, @@ -536,10 +480,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "dropped_attributes_count", - path: []ottl.Field{ - { - Name: "dropped_attributes_count", - }, + path: &TestPath[*spanContext]{ + N: "dropped_attributes_count", }, orig: int64(10), newVal: int64(20), @@ -549,10 +491,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "events", - path: []ottl.Field{ - { - Name: "events", - }, + path: &TestPath[*spanContext]{ + N: "events", }, orig: refSpan.Events(), newVal: newEvents, @@ -565,10 +505,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "dropped_events_count", - path: []ottl.Field{ - { - Name: "dropped_events_count", - }, + path: &TestPath[*spanContext]{ + N: "dropped_events_count", }, orig: int64(20), newVal: int64(30), @@ -578,10 +516,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "links", - path: []ottl.Field{ - { - Name: "links", - }, + path: &TestPath[*spanContext]{ + N: "links", }, orig: refSpan.Links(), newVal: newLinks, @@ -594,10 +530,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "dropped_links_count", - path: []ottl.Field{ - { - Name: "dropped_links_count", - }, + path: &TestPath[*spanContext]{ + N: "dropped_links_count", }, orig: int64(30), newVal: int64(40), @@ -607,10 +541,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "status", - path: []ottl.Field{ - { - Name: "status", - }, + path: &TestPath[*spanContext]{ + N: "status", }, orig: refSpan.Status(), newVal: newStatus, @@ -620,12 +552,10 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "status code", - path: []ottl.Field{ - { - Name: "status", - }, - { - Name: "code", + path: &TestPath[*spanContext]{ + N: "status", + NextPath: &TestPath[*spanContext]{ + N: "code", }, }, orig: int64(ptrace.StatusCodeOk), @@ -636,12 +566,10 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "status message", - path: []ottl.Field{ - { - Name: "status", - }, - { - Name: "message", + path: &TestPath[*spanContext]{ + N: "status", + NextPath: &TestPath[*spanContext]{ + N: "message", }, }, orig: "good span", @@ -652,10 +580,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "start_time", - path: []ottl.Field{ - { - Name: "start_time", - }, + path: &TestPath[*spanContext]{ + N: "start_time", }, orig: time.Date(1970, 1, 1, 0, 0, 0, 100000000, time.UTC), newVal: time.Date(1970, 1, 1, 0, 0, 0, 200000000, time.UTC), @@ -665,10 +591,8 @@ func TestSpanPathGetSetter(t *testing.T) { }, { name: "end_time", - path: []ottl.Field{ - { - Name: "end_time", - }, + path: &TestPath[*spanContext]{ + N: "end_time", }, orig: time.Date(1970, 1, 1, 0, 0, 0, 500000000, time.UTC), newVal: time.Date(1970, 1, 1, 0, 0, 0, 200000000, time.UTC), diff --git a/pkg/ottl/contexts/internal/value.go b/pkg/ottl/contexts/internal/value.go index 24df36d9783a..ce335854eb3a 100644 --- a/pkg/ottl/contexts/internal/value.go +++ b/pkg/ottl/contexts/internal/value.go @@ -4,6 +4,7 @@ package internal // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" import ( + "context" "errors" "fmt" @@ -62,35 +63,40 @@ func SetValue(value pcommon.Value, val any) error { case pcommon.Map: v.CopyTo(value.SetEmptyMap()) case map[string]any: - value.SetEmptyMap() - for mk, mv := range v { - err = SetMapValue(value.Map(), []ottl.Key{{String: &mk}}, mv) - } + err = value.FromRaw(v) } return err } -func getIndexableValue(value pcommon.Value, keys []ottl.Key) (any, error) { +func getIndexableValue[K any](ctx context.Context, tCtx K, value pcommon.Value, keys []ottl.Key[K]) (any, error) { val := value var ok bool for i := 0; i < len(keys); i++ { switch val.Type() { case pcommon.ValueTypeMap: - if keys[i].String == nil { + s, err := keys[i].String(ctx, tCtx) + if err != nil { + return nil, err + } + if s == nil { return nil, fmt.Errorf("map must be indexed by a string") } - val, ok = val.Map().Get(*keys[i].String) + val, ok = val.Map().Get(*s) if !ok { return nil, nil } case pcommon.ValueTypeSlice: - if keys[i].Int == nil { + i, err := keys[i].Int(ctx, tCtx) + if err != nil { + return nil, err + } + if i == nil { return nil, fmt.Errorf("slice must be indexed by an int") } - if int(*keys[i].Int) >= val.Slice().Len() || int(*keys[i].Int) < 0 { - return nil, fmt.Errorf("index %v out of bounds", *keys[i].Int) + if int(*i) >= val.Slice().Len() || int(*i) < 0 { + return nil, fmt.Errorf("index %v out of bounds", *i) } - val = val.Slice().At(int(*keys[i].Int)) + val = val.Slice().At(int(*i)) default: return nil, fmt.Errorf("type %v does not support string indexing", val.Type()) } @@ -98,7 +104,7 @@ func getIndexableValue(value pcommon.Value, keys []ottl.Key) (any, error) { return ottlcommon.GetValue(val), nil } -func setIndexableValue(currentValue pcommon.Value, val any, keys []ottl.Key) error { +func setIndexableValue[K any](ctx context.Context, tCtx K, currentValue pcommon.Value, val any, keys []ottl.Key[K]) error { var newValue pcommon.Value switch val.(type) { case []string, []bool, []int64, []float64, [][]byte, []any: @@ -114,30 +120,46 @@ func setIndexableValue(currentValue pcommon.Value, val any, keys []ottl.Key) err for i := 0; i < len(keys); i++ { switch currentValue.Type() { case pcommon.ValueTypeMap: - if keys[i].String == nil { + s, err := keys[i].String(ctx, tCtx) + if err != nil { + return err + } + if s == nil { return errors.New("map must be indexed by a string") } - potentialValue, ok := currentValue.Map().Get(*keys[i].String) + potentialValue, ok := currentValue.Map().Get(*s) if !ok { - currentValue = currentValue.Map().PutEmpty(*keys[i].String) + currentValue = currentValue.Map().PutEmpty(*s) } else { currentValue = potentialValue } case pcommon.ValueTypeSlice: - if keys[i].Int == nil { + i, err := keys[i].Int(ctx, tCtx) + if err != nil { + return err + } + if i == nil { return errors.New("slice must be indexed by an int") } - if int(*keys[i].Int) >= currentValue.Slice().Len() || int(*keys[i].Int) < 0 { - return fmt.Errorf("index %v out of bounds", *keys[i].Int) + if int(*i) >= currentValue.Slice().Len() || int(*i) < 0 { + return fmt.Errorf("index %v out of bounds", *i) } - currentValue = currentValue.Slice().At(int(*keys[i].Int)) + currentValue = currentValue.Slice().At(int(*i)) case pcommon.ValueTypeEmpty: + s, err := keys[i].String(ctx, tCtx) + if err != nil { + return err + } + i, err := keys[i].Int(ctx, tCtx) + if err != nil { + return err + } switch { - case keys[i].String != nil: - currentValue = currentValue.SetEmptyMap().PutEmpty(*keys[i].String) - case keys[i].Int != nil: + case s != nil: + currentValue = currentValue.SetEmptyMap().PutEmpty(*s) + case i != nil: currentValue.SetEmptySlice() - for k := 0; k < int(*keys[i].Int); k++ { + for k := 0; k < int(*i); k++ { currentValue.Slice().AppendEmpty() } currentValue = currentValue.Slice().AppendEmpty() diff --git a/pkg/ottl/contexts/internal/value_test.go b/pkg/ottl/contexts/internal/value_test.go index ca3aa95442c7..5be89f72ea46 100644 --- a/pkg/ottl/contexts/internal/value_test.go +++ b/pkg/ottl/contexts/internal/value_test.go @@ -4,6 +4,7 @@ package internal // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" import ( + "context" "testing" "github.com/stretchr/testify/assert" @@ -13,9 +14,9 @@ import ( ) func Test_SetIndexableValue_EmptyValueNoIndex(t *testing.T) { - keys := []ottl.Key{ - {}, + keys := []ottl.Key[any]{ + &TestKey[any]{}, } - err := setIndexableValue(pcommon.NewValueEmpty(), nil, keys) + err := setIndexableValue[any](context.Background(), nil, pcommon.NewValueEmpty(), nil, keys) assert.Error(t, err) } diff --git a/pkg/ottl/contexts/ottldatapoint/README.md b/pkg/ottl/contexts/ottldatapoint/README.md index 9e32c7dbc462..b4e605d9d175 100644 --- a/pkg/ottl/contexts/ottldatapoint/README.md +++ b/pkg/ottl/contexts/ottldatapoint/README.md @@ -41,8 +41,8 @@ The following paths are supported. | flags | the flags of the data point being processed | int64 | | count | the count of the data point being processed | int64 | | sum | the sum of the data point being processed | float64 | -| bucket_counts | the bucket counts of the data point being processed | []float64 | -| explicit_bounds | the explicit bounds of the data point being processed | []int64 | +| bucket_counts | the bucket counts of the data point being processed | []uint64 | +| explicit_bounds | the explicit bounds of the data point being processed | []float64 | | scale | the scale of the data point being processed | int64 | | zero_count | the zero_count of the data point being processed | int64 | | quantile_values | the quantile_values of the data point being processed | pmetric.SummaryDataPointValueAtQuantileSlice | @@ -65,4 +65,4 @@ In addition, it also supports an enum for metrics data type, with the numeric va | METRIC_DATA_TYPE_SUM | 2 | | METRIC_DATA_TYPE_HISTOGRAM | 3 | | METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM | 4 | -| METRIC_DATA_TYPE_SUMMARY | 5 | \ No newline at end of file +| METRIC_DATA_TYPE_SUMMARY | 5 | diff --git a/pkg/ottl/contexts/ottldatapoint/datapoint.go b/pkg/ottl/contexts/ottldatapoint/datapoint.go index 3d2ac0e22a2f..6d55fa91ad65 100644 --- a/pkg/ottl/contexts/ottldatapoint/datapoint.go +++ b/pkg/ottl/contexts/ottldatapoint/datapoint.go @@ -16,6 +16,10 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" ) +const ( + contextName = "DataPoint" +) + var _ internal.ResourceContext = TransformContext{} var _ internal.InstrumentationScopeContext = TransformContext{} @@ -66,10 +70,10 @@ func (tCtx TransformContext) getCache() pcommon.Map { } func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...Option) (ottl.Parser[TransformContext], error) { - pathExpressionParser := pathExpressionParser{telemetrySettings} + pep := pathExpressionParser{telemetrySettings} p, err := ottl.NewParser[TransformContext]( functions, - pathExpressionParser.parsePath, + pep.parsePath, telemetrySettings, ottl.WithEnumParser[TransformContext](parseEnum), ) @@ -82,22 +86,38 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet return p, nil } -type StatementsOption func(*ottl.Statements[TransformContext]) +type StatementSequenceOption func(*ottl.StatementSequence[TransformContext]) -func WithErrorMode(errorMode ottl.ErrorMode) StatementsOption { - return func(s *ottl.Statements[TransformContext]) { - ottl.WithErrorMode[TransformContext](errorMode)(s) +func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption { + return func(s *ottl.StatementSequence[TransformContext]) { + ottl.WithStatementSequenceErrorMode[TransformContext](errorMode)(s) } } -func NewStatements(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementsOption) ottl.Statements[TransformContext] { - s := ottl.NewStatements(statements, telemetrySettings) +func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext] { + s := ottl.NewStatementSequence(statements, telemetrySettings) for _, op := range options { op(&s) } return s } +type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext]) + +func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption { + return func(c *ottl.ConditionSequence[TransformContext]) { + ottl.WithConditionSequenceErrorMode[TransformContext](errorMode)(c) + } +} + +func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext] { + c := ottl.NewConditionSequence(conditions, telemetrySettings) + for _, op := range options { + op(&c) + } + return c +} + var symbolTable = map[ottl.EnumSymbol]ottl.Enum{ "FLAG_NONE": 0, "FLAG_NO_RECORDED_VALUE": 1, @@ -123,33 +143,27 @@ type pathExpressionParser struct { telemetrySettings component.TelemetrySettings } -func (pep *pathExpressionParser) parsePath(val *ottl.Path) (ottl.GetSetter[TransformContext], error) { - if val != nil && len(val.Fields) > 0 { - return newPathGetSetter(val.Fields) +func (pep *pathExpressionParser) parsePath(path ottl.Path[TransformContext]) (ottl.GetSetter[TransformContext], error) { + if path == nil { + return nil, fmt.Errorf("path cannot be nil") } - return nil, fmt.Errorf("bad path %v", val) -} - -func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], error) { - switch path[0].Name { + switch path.Name() { case "cache": - mapKey := path[0].Keys - if mapKey == nil { + if path.Keys() == nil { return accessCache(), nil } - return accessCacheKey(mapKey), nil + return accessCacheKey(path.Keys()), nil case "resource": - return internal.ResourcePathGetSetter[TransformContext](path[1:]) + return internal.ResourcePathGetSetter[TransformContext](path.Next()) case "instrumentation_scope": - return internal.ScopePathGetSetter[TransformContext](path[1:]) + return internal.ScopePathGetSetter[TransformContext](path.Next()) case "metric": - return internal.MetricPathGetSetter[TransformContext](path[1:]) + return internal.MetricPathGetSetter[TransformContext](path.Next()) case "attributes": - mapKey := path[0].Keys - if mapKey == nil { + if path.Keys() == nil { return accessAttributes(), nil } - return accessAttributesKey(mapKey), nil + return accessAttributesKey(path.Keys()), nil case "start_time_unix_nano": return accessStartTimeUnixNano(), nil case "time_unix_nano": @@ -179,37 +193,44 @@ func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], erro case "zero_count": return accessZeroCount(), nil case "positive": - if len(path) == 1 { - return accessPositive(), nil - } - switch path[1].Name { - case "offset": - return accessPositiveOffset(), nil - case "bucket_counts": - return accessPositiveBucketCounts(), nil + nextPath := path.Next() + if nextPath != nil { + switch nextPath.Name() { + case "offset": + return accessPositiveOffset(), nil + case "bucket_counts": + return accessPositiveBucketCounts(), nil + default: + return nil, internal.FormatDefaultErrorMessage(nextPath.Name(), path.String(), contextName, internal.DataPointRef) + } } + return accessPositive(), nil case "negative": - if len(path) == 1 { - return accessNegative(), nil - } - switch path[1].Name { - case "offset": - return accessNegativeOffset(), nil - case "bucket_counts": - return accessNegativeBucketCounts(), nil + nextPath := path.Next() + if nextPath != nil { + switch nextPath.Name() { + case "offset": + return accessNegativeOffset(), nil + case "bucket_counts": + return accessNegativeBucketCounts(), nil + default: + return nil, internal.FormatDefaultErrorMessage(nextPath.Name(), path.String(), contextName, internal.DataPointRef) + } } + return accessNegative(), nil case "quantile_values": return accessQuantileValues(), nil + default: + return nil, internal.FormatDefaultErrorMessage(path.Name(), path.String(), contextName, internal.DataPointRef) } - return nil, fmt.Errorf("invalid path expression %v", path) } func accessCache() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.getCache(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if m, ok := val.(pcommon.Map); ok { m.CopyTo(tCtx.getCache()) } @@ -218,20 +239,20 @@ func accessCache() ottl.StandardGetSetter[TransformContext] { } } -func accessCacheKey(keys []ottl.Key) ottl.StandardGetSetter[TransformContext] { +func accessCacheKey(key []ottl.Key[TransformContext]) ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { - return internal.GetMapValue(tCtx.getCache(), keys) + return internal.GetMapValue[TransformContext](ctx, tCtx, tCtx.getCache(), key) }, Setter: func(ctx context.Context, tCtx TransformContext, val any) error { - return internal.SetMapValue(tCtx.getCache(), keys, val) + return internal.SetMapValue[TransformContext](ctx, tCtx, tCtx.getCache(), key, val) }, } } func accessAttributes() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: return tCtx.GetDataPoint().(pmetric.NumberDataPoint).Attributes(), nil @@ -244,7 +265,7 @@ func accessAttributes() ottl.StandardGetSetter[TransformContext] { } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: if attrs, ok := val.(pcommon.Map); ok { @@ -268,31 +289,31 @@ func accessAttributes() ottl.StandardGetSetter[TransformContext] { } } -func accessAttributesKey(keys []ottl.Key) ottl.StandardGetSetter[TransformContext] { +func accessAttributesKey(key []ottl.Key[TransformContext]) ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: - return internal.GetMapValue(tCtx.GetDataPoint().(pmetric.NumberDataPoint).Attributes(), keys) + return internal.GetMapValue[TransformContext](ctx, tCtx, tCtx.GetDataPoint().(pmetric.NumberDataPoint).Attributes(), key) case pmetric.HistogramDataPoint: - return internal.GetMapValue(tCtx.GetDataPoint().(pmetric.HistogramDataPoint).Attributes(), keys) + return internal.GetMapValue[TransformContext](ctx, tCtx, tCtx.GetDataPoint().(pmetric.HistogramDataPoint).Attributes(), key) case pmetric.ExponentialHistogramDataPoint: - return internal.GetMapValue(tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint).Attributes(), keys) + return internal.GetMapValue[TransformContext](ctx, tCtx, tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint).Attributes(), key) case pmetric.SummaryDataPoint: - return internal.GetMapValue(tCtx.GetDataPoint().(pmetric.SummaryDataPoint).Attributes(), keys) + return internal.GetMapValue[TransformContext](ctx, tCtx, tCtx.GetDataPoint().(pmetric.SummaryDataPoint).Attributes(), key) } return nil, nil }, Setter: func(ctx context.Context, tCtx TransformContext, val any) error { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: - return internal.SetMapValue(tCtx.GetDataPoint().(pmetric.NumberDataPoint).Attributes(), keys, val) + return internal.SetMapValue[TransformContext](ctx, tCtx, tCtx.GetDataPoint().(pmetric.NumberDataPoint).Attributes(), key, val) case pmetric.HistogramDataPoint: - return internal.SetMapValue(tCtx.GetDataPoint().(pmetric.HistogramDataPoint).Attributes(), keys, val) + return internal.SetMapValue[TransformContext](ctx, tCtx, tCtx.GetDataPoint().(pmetric.HistogramDataPoint).Attributes(), key, val) case pmetric.ExponentialHistogramDataPoint: - return internal.SetMapValue(tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint).Attributes(), keys, val) + return internal.SetMapValue[TransformContext](ctx, tCtx, tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint).Attributes(), key, val) case pmetric.SummaryDataPoint: - return internal.SetMapValue(tCtx.GetDataPoint().(pmetric.SummaryDataPoint).Attributes(), keys, val) + return internal.SetMapValue[TransformContext](ctx, tCtx, tCtx.GetDataPoint().(pmetric.SummaryDataPoint).Attributes(), key, val) } return nil }, @@ -301,7 +322,7 @@ func accessAttributesKey(keys []ottl.Key) ottl.StandardGetSetter[TransformContex func accessStartTimeUnixNano() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: return tCtx.GetDataPoint().(pmetric.NumberDataPoint).StartTimestamp().AsTime().UnixNano(), nil @@ -314,7 +335,7 @@ func accessStartTimeUnixNano() ottl.StandardGetSetter[TransformContext] { } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newTime, ok := val.(int64); ok { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: @@ -334,7 +355,7 @@ func accessStartTimeUnixNano() ottl.StandardGetSetter[TransformContext] { func accessStartTime() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: return tCtx.GetDataPoint().(pmetric.NumberDataPoint).StartTimestamp().AsTime(), nil @@ -347,7 +368,7 @@ func accessStartTime() ottl.StandardGetSetter[TransformContext] { } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newTime, ok := val.(time.Time); ok { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: @@ -367,7 +388,7 @@ func accessStartTime() ottl.StandardGetSetter[TransformContext] { func accessTimeUnixNano() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: return tCtx.GetDataPoint().(pmetric.NumberDataPoint).Timestamp().AsTime().UnixNano(), nil @@ -380,7 +401,7 @@ func accessTimeUnixNano() ottl.StandardGetSetter[TransformContext] { } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newTime, ok := val.(int64); ok { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: @@ -400,7 +421,7 @@ func accessTimeUnixNano() ottl.StandardGetSetter[TransformContext] { func accessTime() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: return tCtx.GetDataPoint().(pmetric.NumberDataPoint).Timestamp().AsTime(), nil @@ -413,7 +434,7 @@ func accessTime() ottl.StandardGetSetter[TransformContext] { } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newTime, ok := val.(time.Time); ok { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: @@ -433,13 +454,13 @@ func accessTime() ottl.StandardGetSetter[TransformContext] { func accessDoubleValue() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { if numberDataPoint, ok := tCtx.GetDataPoint().(pmetric.NumberDataPoint); ok { return numberDataPoint.DoubleValue(), nil } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newDouble, ok := val.(float64); ok { if numberDataPoint, ok := tCtx.GetDataPoint().(pmetric.NumberDataPoint); ok { numberDataPoint.SetDoubleValue(newDouble) @@ -452,13 +473,13 @@ func accessDoubleValue() ottl.StandardGetSetter[TransformContext] { func accessIntValue() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { if numberDataPoint, ok := tCtx.GetDataPoint().(pmetric.NumberDataPoint); ok { return numberDataPoint.IntValue(), nil } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newInt, ok := val.(int64); ok { if numberDataPoint, ok := tCtx.GetDataPoint().(pmetric.NumberDataPoint); ok { numberDataPoint.SetIntValue(newInt) @@ -471,7 +492,7 @@ func accessIntValue() ottl.StandardGetSetter[TransformContext] { func accessExemplars() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: return tCtx.GetDataPoint().(pmetric.NumberDataPoint).Exemplars(), nil @@ -482,7 +503,7 @@ func accessExemplars() ottl.StandardGetSetter[TransformContext] { } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newExemplars, ok := val.(pmetric.ExemplarSlice); ok { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: @@ -500,7 +521,7 @@ func accessExemplars() ottl.StandardGetSetter[TransformContext] { func accessFlags() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: return int64(tCtx.GetDataPoint().(pmetric.NumberDataPoint).Flags()), nil @@ -513,7 +534,7 @@ func accessFlags() ottl.StandardGetSetter[TransformContext] { } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newFlags, ok := val.(int64); ok { switch tCtx.GetDataPoint().(type) { case pmetric.NumberDataPoint: @@ -533,7 +554,7 @@ func accessFlags() ottl.StandardGetSetter[TransformContext] { func accessCount() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { switch tCtx.GetDataPoint().(type) { case pmetric.HistogramDataPoint: return int64(tCtx.GetDataPoint().(pmetric.HistogramDataPoint).Count()), nil @@ -544,7 +565,7 @@ func accessCount() ottl.StandardGetSetter[TransformContext] { } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newCount, ok := val.(int64); ok { switch tCtx.GetDataPoint().(type) { case pmetric.HistogramDataPoint: @@ -562,7 +583,7 @@ func accessCount() ottl.StandardGetSetter[TransformContext] { func accessSum() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { switch tCtx.GetDataPoint().(type) { case pmetric.HistogramDataPoint: return tCtx.GetDataPoint().(pmetric.HistogramDataPoint).Sum(), nil @@ -573,7 +594,7 @@ func accessSum() ottl.StandardGetSetter[TransformContext] { } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newSum, ok := val.(float64); ok { switch tCtx.GetDataPoint().(type) { case pmetric.HistogramDataPoint: @@ -591,13 +612,13 @@ func accessSum() ottl.StandardGetSetter[TransformContext] { func accessExplicitBounds() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { if histogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.HistogramDataPoint); ok { return histogramDataPoint.ExplicitBounds().AsRaw(), nil } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newExplicitBounds, ok := val.([]float64); ok { if histogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.HistogramDataPoint); ok { histogramDataPoint.ExplicitBounds().FromRaw(newExplicitBounds) @@ -610,13 +631,13 @@ func accessExplicitBounds() ottl.StandardGetSetter[TransformContext] { func accessBucketCounts() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { if histogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.HistogramDataPoint); ok { return histogramDataPoint.BucketCounts().AsRaw(), nil } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newBucketCount, ok := val.([]uint64); ok { if histogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.HistogramDataPoint); ok { histogramDataPoint.BucketCounts().FromRaw(newBucketCount) @@ -629,13 +650,13 @@ func accessBucketCounts() ottl.StandardGetSetter[TransformContext] { func accessScale() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { return int64(expoHistogramDataPoint.Scale()), nil } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newScale, ok := val.(int64); ok { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { expoHistogramDataPoint.SetScale(int32(newScale)) @@ -648,13 +669,13 @@ func accessScale() ottl.StandardGetSetter[TransformContext] { func accessZeroCount() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { return int64(expoHistogramDataPoint.ZeroCount()), nil } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newZeroCount, ok := val.(int64); ok { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { expoHistogramDataPoint.SetZeroCount(uint64(newZeroCount)) @@ -667,13 +688,13 @@ func accessZeroCount() ottl.StandardGetSetter[TransformContext] { func accessPositive() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { return expoHistogramDataPoint.Positive(), nil } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newPositive, ok := val.(pmetric.ExponentialHistogramDataPointBuckets); ok { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { newPositive.CopyTo(expoHistogramDataPoint.Positive()) @@ -686,13 +707,13 @@ func accessPositive() ottl.StandardGetSetter[TransformContext] { func accessPositiveOffset() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { return int64(expoHistogramDataPoint.Positive().Offset()), nil } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newPositiveOffset, ok := val.(int64); ok { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { expoHistogramDataPoint.Positive().SetOffset(int32(newPositiveOffset)) @@ -705,13 +726,13 @@ func accessPositiveOffset() ottl.StandardGetSetter[TransformContext] { func accessPositiveBucketCounts() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { return expoHistogramDataPoint.Positive().BucketCounts().AsRaw(), nil } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newPositiveBucketCounts, ok := val.([]uint64); ok { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { expoHistogramDataPoint.Positive().BucketCounts().FromRaw(newPositiveBucketCounts) @@ -724,13 +745,13 @@ func accessPositiveBucketCounts() ottl.StandardGetSetter[TransformContext] { func accessNegative() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { return expoHistogramDataPoint.Negative(), nil } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newNegative, ok := val.(pmetric.ExponentialHistogramDataPointBuckets); ok { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { newNegative.CopyTo(expoHistogramDataPoint.Negative()) @@ -743,13 +764,13 @@ func accessNegative() ottl.StandardGetSetter[TransformContext] { func accessNegativeOffset() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { return int64(expoHistogramDataPoint.Negative().Offset()), nil } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newNegativeOffset, ok := val.(int64); ok { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { expoHistogramDataPoint.Negative().SetOffset(int32(newNegativeOffset)) @@ -762,13 +783,13 @@ func accessNegativeOffset() ottl.StandardGetSetter[TransformContext] { func accessNegativeBucketCounts() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { return expoHistogramDataPoint.Negative().BucketCounts().AsRaw(), nil } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newNegativeBucketCounts, ok := val.([]uint64); ok { if expoHistogramDataPoint, ok := tCtx.GetDataPoint().(pmetric.ExponentialHistogramDataPoint); ok { expoHistogramDataPoint.Negative().BucketCounts().FromRaw(newNegativeBucketCounts) @@ -781,13 +802,13 @@ func accessNegativeBucketCounts() ottl.StandardGetSetter[TransformContext] { func accessQuantileValues() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { if summaryDataPoint, ok := tCtx.GetDataPoint().(pmetric.SummaryDataPoint); ok { return summaryDataPoint.QuantileValues(), nil } return nil, nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newQuantileValues, ok := val.(pmetric.SummaryDataPointValueAtQuantileSlice); ok { if summaryDataPoint, ok := tCtx.GetDataPoint().(pmetric.SummaryDataPoint); ok { newQuantileValues.CopyTo(summaryDataPoint.QuantileValues()) diff --git a/pkg/ottl/contexts/ottldatapoint/datapoint_test.go b/pkg/ottl/contexts/ottldatapoint/datapoint_test.go index bac2de90d839..d25d7746098d 100644 --- a/pkg/ottl/contexts/ottldatapoint/datapoint_test.go +++ b/pkg/ottl/contexts/ottldatapoint/datapoint_test.go @@ -13,6 +13,7 @@ import ( "go.opentelemetry.io/collector/pdata/pmetric" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottltest" ) @@ -22,19 +23,16 @@ func Test_newPathGetSetter_Cache(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[TransformContext] orig any newVal any modified func(cache pcommon.Map) valueType pmetric.NumberDataPointValueType }{ - { name: "cache", - path: []ottl.Field{ - { - Name: "cache", - }, + path: &internal.TestPath[TransformContext]{ + N: "cache", }, orig: pcommon.NewMap(), newVal: newCache, @@ -44,13 +42,11 @@ func Test_newPathGetSetter_Cache(t *testing.T) { }, { name: "cache access", - path: []ottl.Field{ - { - Name: "cache", - Keys: []ottl.Key{ - { - String: ottltest.Strp("temp"), - }, + path: &internal.TestPath[TransformContext]{ + N: "cache", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("temp"), }, }, }, @@ -63,7 +59,8 @@ func Test_newPathGetSetter_Cache(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - accessor, err := newPathGetSetter(tt.path) + pep := pathExpressionParser{} + accessor, err := pep.parsePath(tt.path) assert.NoError(t, err) numberDataPoint := createNumberDataPointTelemetry(tt.valueType) @@ -71,11 +68,11 @@ func Test_newPathGetSetter_Cache(t *testing.T) { ctx := NewTransformContext(numberDataPoint, pmetric.NewMetric(), pmetric.NewMetricSlice(), pcommon.NewInstrumentationScope(), pcommon.NewResource()) got, err := accessor.Get(context.Background(), ctx) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tt.orig, got) err = accessor.Set(context.Background(), ctx, tt.newVal) - assert.Nil(t, err) + assert.NoError(t, err) exCache := pcommon.NewMap() tt.modified(exCache) @@ -101,7 +98,7 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[TransformContext] orig any newVal any modified func(pmetric.NumberDataPoint) @@ -109,10 +106,8 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }{ { name: "start_time_unix_nano", - path: []ottl.Field{ - { - Name: "start_time_unix_nano", - }, + path: &internal.TestPath[TransformContext]{ + N: "start_time_unix_nano", }, orig: int64(100_000_000), newVal: int64(200_000_000), @@ -122,10 +117,8 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "start_time", - path: []ottl.Field{ - { - Name: "start_time", - }, + path: &internal.TestPath[TransformContext]{ + N: "start_time", }, orig: time.Date(1970, 1, 1, 0, 0, 0, 100000000, time.UTC), newVal: time.Date(1970, 1, 1, 0, 0, 0, 86400000000000, time.UTC), @@ -135,10 +128,8 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "time", - path: []ottl.Field{ - { - Name: "time", - }, + path: &internal.TestPath[TransformContext]{ + N: "time", }, orig: time.Date(1970, 1, 1, 0, 0, 0, 500000000, time.UTC), newVal: time.Date(1970, 1, 1, 0, 0, 0, 200000000, time.UTC), @@ -148,10 +139,8 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "time_unix_nano", - path: []ottl.Field{ - { - Name: "time_unix_nano", - }, + path: &internal.TestPath[TransformContext]{ + N: "time_unix_nano", }, orig: int64(500_000_000), newVal: int64(200_000_000), @@ -161,10 +150,8 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "value_double", - path: []ottl.Field{ - { - Name: "value_double", - }, + path: &internal.TestPath[TransformContext]{ + N: "value_double", }, orig: 1.1, newVal: 2.2, @@ -175,10 +162,8 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "value_int", - path: []ottl.Field{ - { - Name: "value_int", - }, + path: &internal.TestPath[TransformContext]{ + N: "value_int", }, orig: int64(1), newVal: int64(2), @@ -188,10 +173,8 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "flags", - path: []ottl.Field{ - { - Name: "flags", - }, + path: &internal.TestPath[TransformContext]{ + N: "flags", }, orig: int64(0), newVal: int64(1), @@ -201,10 +184,8 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "exemplars", - path: []ottl.Field{ - { - Name: "exemplars", - }, + path: &internal.TestPath[TransformContext]{ + N: "exemplars", }, orig: refNumberDataPoint.Exemplars(), newVal: newExemplars, @@ -214,10 +195,8 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes", - path: []ottl.Field{ - { - Name: "attributes", - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", }, orig: refNumberDataPoint.Attributes(), newVal: newAttrs, @@ -227,13 +206,11 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("str"), }, }, }, @@ -245,13 +222,11 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bool"), }, }, }, @@ -263,13 +238,11 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("int"), }, }, }, @@ -281,13 +254,11 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("double"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("double"), }, }, }, @@ -299,13 +270,11 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bytes"), }, }, }, @@ -317,13 +286,11 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes array string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_str"), }, }, }, @@ -338,13 +305,11 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes array bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bool"), }, }, }, @@ -359,13 +324,11 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes array int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_int"), }, }, }, @@ -380,13 +343,11 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes array float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_float"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_float"), }, }, }, @@ -401,13 +362,11 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes array bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bytes"), }, }, }, @@ -422,13 +381,11 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes pcommon.Map", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("pMap"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("pMap"), }, }, }, @@ -445,13 +402,11 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes map[string]any", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -468,19 +423,17 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes nested", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), - }, - { - Int: ottltest.Intp(0), - }, - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("slice"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), + }, + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -496,19 +449,17 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { }, { name: "attributes nested new values", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("new"), - }, - { - Int: ottltest.Intp(2), - }, - { - Int: ottltest.Intp(0), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("new"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(2), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), }, }, }, @@ -526,7 +477,8 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - accessor, err := newPathGetSetter(tt.path) + pep := pathExpressionParser{} + accessor, err := pep.parsePath(tt.path) assert.NoError(t, err) numberDataPoint := createNumberDataPointTelemetry(tt.valueType) @@ -534,11 +486,11 @@ func Test_newPathGetSetter_NumberDataPoint(t *testing.T) { ctx := NewTransformContext(numberDataPoint, pmetric.NewMetric(), pmetric.NewMetricSlice(), pcommon.NewInstrumentationScope(), pcommon.NewResource()) got, err := accessor.Get(context.Background(), ctx) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tt.orig, got) err = accessor.Set(context.Background(), ctx, tt.newVal) - assert.Nil(t, err) + assert.NoError(t, err) exNumberDataPoint := createNumberDataPointTelemetry(tt.valueType) tt.modified(exNumberDataPoint) @@ -583,17 +535,15 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[TransformContext] orig any newVal any modified func(pmetric.HistogramDataPoint) }{ { name: "start_time_unix_nano", - path: []ottl.Field{ - { - Name: "start_time_unix_nano", - }, + path: &internal.TestPath[TransformContext]{ + N: "start_time_unix_nano", }, orig: int64(100_000_000), newVal: int64(200_000_000), @@ -603,10 +553,8 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "time_unix_nano", - path: []ottl.Field{ - { - Name: "time_unix_nano", - }, + path: &internal.TestPath[TransformContext]{ + N: "time_unix_nano", }, orig: int64(500_000_000), newVal: int64(200_000_000), @@ -616,10 +564,8 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "flags", - path: []ottl.Field{ - { - Name: "flags", - }, + path: &internal.TestPath[TransformContext]{ + N: "flags", }, orig: int64(0), newVal: int64(1), @@ -629,10 +575,8 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "count", - path: []ottl.Field{ - { - Name: "count", - }, + path: &internal.TestPath[TransformContext]{ + N: "count", }, orig: int64(2), newVal: int64(3), @@ -642,10 +586,8 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "sum", - path: []ottl.Field{ - { - Name: "sum", - }, + path: &internal.TestPath[TransformContext]{ + N: "sum", }, orig: 10.1, newVal: 10.2, @@ -655,10 +597,8 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "bucket_counts", - path: []ottl.Field{ - { - Name: "bucket_counts", - }, + path: &internal.TestPath[TransformContext]{ + N: "bucket_counts", }, orig: []uint64{1, 1}, newVal: []uint64{1, 2}, @@ -668,10 +608,8 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "explicit_bounds", - path: []ottl.Field{ - { - Name: "explicit_bounds", - }, + path: &internal.TestPath[TransformContext]{ + N: "explicit_bounds", }, orig: []float64{1, 2}, newVal: []float64{1, 2, 3}, @@ -681,10 +619,8 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "exemplars", - path: []ottl.Field{ - { - Name: "exemplars", - }, + path: &internal.TestPath[TransformContext]{ + N: "exemplars", }, orig: refHistogramDataPoint.Exemplars(), newVal: newExemplars, @@ -694,10 +630,8 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes", - path: []ottl.Field{ - { - Name: "attributes", - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", }, orig: refHistogramDataPoint.Attributes(), newVal: newAttrs, @@ -707,13 +641,11 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("str"), }, }, }, @@ -725,13 +657,11 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bool"), }, }, }, @@ -743,13 +673,11 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("int"), }, }, }, @@ -761,13 +689,11 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("double"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("double"), }, }, }, @@ -779,13 +705,11 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bytes"), }, }, }, @@ -797,13 +721,11 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes array string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_str"), }, }, }, @@ -818,13 +740,11 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes array bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bool"), }, }, }, @@ -839,13 +759,11 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes array int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_int"), }, }, }, @@ -860,13 +778,11 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes array float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_float"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_float"), }, }, }, @@ -881,13 +797,11 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes array bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bytes"), }, }, }, @@ -902,13 +816,11 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes pcommon.Map", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("pMap"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("pMap"), }, }, }, @@ -925,13 +837,11 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes map[string]any", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -948,19 +858,17 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes nested", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), - }, - { - Int: ottltest.Intp(0), - }, - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("slice"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), + }, + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -976,19 +884,17 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { }, { name: "attributes nested new values", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("new"), - }, - { - Int: ottltest.Intp(2), - }, - { - Int: ottltest.Intp(0), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("new"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(2), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), }, }, }, @@ -1006,7 +912,8 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - accessor, err := newPathGetSetter(tt.path) + pep := pathExpressionParser{} + accessor, err := pep.parsePath(tt.path) assert.NoError(t, err) histogramDataPoint := createHistogramDataPointTelemetry() @@ -1014,11 +921,11 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { ctx := NewTransformContext(histogramDataPoint, pmetric.NewMetric(), pmetric.NewMetricSlice(), pcommon.NewInstrumentationScope(), pcommon.NewResource()) got, err := accessor.Get(context.Background(), ctx) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tt.orig, got) err = accessor.Set(context.Background(), ctx, tt.newVal) - assert.Nil(t, err) + assert.NoError(t, err) exNumberDataPoint := createHistogramDataPointTelemetry() tt.modified(exNumberDataPoint) @@ -1068,17 +975,15 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[TransformContext] orig any newVal any modified func(pmetric.ExponentialHistogramDataPoint) }{ { name: "start_time_unix_nano", - path: []ottl.Field{ - { - Name: "start_time_unix_nano", - }, + path: &internal.TestPath[TransformContext]{ + N: "start_time_unix_nano", }, orig: int64(100_000_000), newVal: int64(200_000_000), @@ -1088,10 +993,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "time_unix_nano", - path: []ottl.Field{ - { - Name: "time_unix_nano", - }, + path: &internal.TestPath[TransformContext]{ + N: "time_unix_nano", }, orig: int64(500_000_000), newVal: int64(200_000_000), @@ -1101,10 +1004,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "flags", - path: []ottl.Field{ - { - Name: "flags", - }, + path: &internal.TestPath[TransformContext]{ + N: "flags", }, orig: int64(0), newVal: int64(1), @@ -1114,10 +1015,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "count", - path: []ottl.Field{ - { - Name: "count", - }, + path: &internal.TestPath[TransformContext]{ + N: "count", }, orig: int64(2), newVal: int64(3), @@ -1127,10 +1026,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "sum", - path: []ottl.Field{ - { - Name: "sum", - }, + path: &internal.TestPath[TransformContext]{ + N: "sum", }, orig: 10.1, newVal: 10.2, @@ -1140,10 +1037,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "scale", - path: []ottl.Field{ - { - Name: "scale", - }, + path: &internal.TestPath[TransformContext]{ + N: "scale", }, orig: int64(1), newVal: int64(2), @@ -1153,10 +1048,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "zero_count", - path: []ottl.Field{ - { - Name: "zero_count", - }, + path: &internal.TestPath[TransformContext]{ + N: "zero_count", }, orig: int64(1), newVal: int64(2), @@ -1166,10 +1059,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "positive", - path: []ottl.Field{ - { - Name: "positive", - }, + path: &internal.TestPath[TransformContext]{ + N: "positive", }, orig: refExpoHistogramDataPoint.Positive(), newVal: newPositive, @@ -1179,12 +1070,10 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "positive offset", - path: []ottl.Field{ - { - Name: "positive", - }, - { - Name: "offset", + path: &internal.TestPath[TransformContext]{ + N: "positive", + NextPath: &internal.TestPath[TransformContext]{ + N: "offset", }, }, orig: int64(1), @@ -1195,12 +1084,10 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "positive bucket_counts", - path: []ottl.Field{ - { - Name: "positive", - }, - { - Name: "bucket_counts", + path: &internal.TestPath[TransformContext]{ + N: "positive", + NextPath: &internal.TestPath[TransformContext]{ + N: "bucket_counts", }, }, orig: []uint64{1, 1}, @@ -1211,10 +1098,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "negative", - path: []ottl.Field{ - { - Name: "negative", - }, + path: &internal.TestPath[TransformContext]{ + N: "negative", }, orig: refExpoHistogramDataPoint.Negative(), newVal: newPositive, @@ -1224,12 +1109,10 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "negative offset", - path: []ottl.Field{ - { - Name: "negative", - }, - { - Name: "offset", + path: &internal.TestPath[TransformContext]{ + N: "negative", + NextPath: &internal.TestPath[TransformContext]{ + N: "offset", }, }, orig: int64(1), @@ -1240,12 +1123,10 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "negative bucket_counts", - path: []ottl.Field{ - { - Name: "negative", - }, - { - Name: "bucket_counts", + path: &internal.TestPath[TransformContext]{ + N: "negative", + NextPath: &internal.TestPath[TransformContext]{ + N: "bucket_counts", }, }, orig: []uint64{1, 1}, @@ -1256,10 +1137,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "exemplars", - path: []ottl.Field{ - { - Name: "exemplars", - }, + path: &internal.TestPath[TransformContext]{ + N: "exemplars", }, orig: refExpoHistogramDataPoint.Exemplars(), newVal: newExemplars, @@ -1269,10 +1148,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes", - path: []ottl.Field{ - { - Name: "attributes", - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", }, orig: refExpoHistogramDataPoint.Attributes(), newVal: newAttrs, @@ -1282,13 +1159,11 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("str"), }, }, }, @@ -1300,13 +1175,11 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bool"), }, }, }, @@ -1318,13 +1191,11 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("int"), }, }, }, @@ -1336,13 +1207,11 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("double"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("double"), }, }, }, @@ -1354,13 +1223,11 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bytes"), }, }, }, @@ -1372,13 +1239,11 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes array string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_str"), }, }, }, @@ -1393,13 +1258,11 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes array bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bool"), }, }, }, @@ -1414,13 +1277,11 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes array int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_int"), }, }, }, @@ -1435,13 +1296,11 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes array float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_float"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_float"), }, }, }, @@ -1456,13 +1315,11 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes array bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bytes"), }, }, }, @@ -1477,13 +1334,11 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes pcommon.Map", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("pMap"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("pMap"), }, }, }, @@ -1500,13 +1355,11 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes map[string]any", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -1523,19 +1376,17 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes nested", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), - }, - { - Int: ottltest.Intp(0), - }, - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("slice"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), + }, + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -1551,19 +1402,17 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { }, { name: "attributes nested new values", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("new"), - }, - { - Int: ottltest.Intp(2), - }, - { - Int: ottltest.Intp(0), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("new"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(2), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), }, }, }, @@ -1581,7 +1430,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - accessor, err := newPathGetSetter(tt.path) + pep := pathExpressionParser{} + accessor, err := pep.parsePath(tt.path) assert.NoError(t, err) expoHistogramDataPoint := createExpoHistogramDataPointTelemetry() @@ -1589,11 +1439,11 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { ctx := NewTransformContext(expoHistogramDataPoint, pmetric.NewMetric(), pmetric.NewMetricSlice(), pcommon.NewInstrumentationScope(), pcommon.NewResource()) got, err := accessor.Get(context.Background(), ctx) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tt.orig, got) err = accessor.Set(context.Background(), ctx, tt.newVal) - assert.Nil(t, err) + assert.NoError(t, err) exNumberDataPoint := createExpoHistogramDataPointTelemetry() tt.modified(exNumberDataPoint) @@ -1644,17 +1494,15 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[TransformContext] orig any newVal any modified func(pmetric.SummaryDataPoint) }{ { name: "start_time_unix_nano", - path: []ottl.Field{ - { - Name: "start_time_unix_nano", - }, + path: &internal.TestPath[TransformContext]{ + N: "start_time_unix_nano", }, orig: int64(100_000_000), newVal: int64(200_000_000), @@ -1664,10 +1512,8 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "time_unix_nano", - path: []ottl.Field{ - { - Name: "time_unix_nano", - }, + path: &internal.TestPath[TransformContext]{ + N: "time_unix_nano", }, orig: int64(500_000_000), newVal: int64(200_000_000), @@ -1677,10 +1523,8 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "flags", - path: []ottl.Field{ - { - Name: "flags", - }, + path: &internal.TestPath[TransformContext]{ + N: "flags", }, orig: int64(0), newVal: int64(1), @@ -1690,10 +1534,8 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "count", - path: []ottl.Field{ - { - Name: "count", - }, + path: &internal.TestPath[TransformContext]{ + N: "count", }, orig: int64(2), newVal: int64(3), @@ -1703,10 +1545,8 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "sum", - path: []ottl.Field{ - { - Name: "sum", - }, + path: &internal.TestPath[TransformContext]{ + N: "sum", }, orig: 10.1, newVal: 10.2, @@ -1716,10 +1556,8 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "quantile_values", - path: []ottl.Field{ - { - Name: "quantile_values", - }, + path: &internal.TestPath[TransformContext]{ + N: "quantile_values", }, orig: refSummaryDataPoint.QuantileValues(), newVal: newQuartileValues, @@ -1729,10 +1567,8 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes", - path: []ottl.Field{ - { - Name: "attributes", - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", }, orig: refSummaryDataPoint.Attributes(), newVal: newAttrs, @@ -1742,13 +1578,11 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("str"), }, }, }, @@ -1760,13 +1594,11 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bool"), }, }, }, @@ -1778,13 +1610,11 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("int"), }, }, }, @@ -1796,13 +1626,11 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("double"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("double"), }, }, }, @@ -1814,13 +1642,11 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bytes"), }, }, }, @@ -1832,13 +1658,11 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes array string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_str"), }, }, }, @@ -1853,13 +1677,11 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes array bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bool"), }, }, }, @@ -1874,13 +1696,11 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes array int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_int"), }, }, }, @@ -1895,13 +1715,11 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes array float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_float"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_float"), }, }, }, @@ -1916,13 +1734,11 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes array bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bytes"), }, }, }, @@ -1937,13 +1753,11 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes pcommon.Map", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("pMap"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("pMap"), }, }, }, @@ -1960,13 +1774,11 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes map[string]any", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -1983,19 +1795,17 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes nested", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), - }, - { - Int: ottltest.Intp(0), - }, - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("slice"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), + }, + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -2011,19 +1821,17 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { }, { name: "attributes nested new values", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("new"), - }, - { - Int: ottltest.Intp(2), - }, - { - Int: ottltest.Intp(0), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("new"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(2), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), }, }, }, @@ -2041,7 +1849,8 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - accessor, err := newPathGetSetter(tt.path) + pep := pathExpressionParser{} + accessor, err := pep.parsePath(tt.path) assert.NoError(t, err) summaryDataPoint := createSummaryDataPointTelemetry() @@ -2049,11 +1858,11 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { ctx := NewTransformContext(summaryDataPoint, pmetric.NewMetric(), pmetric.NewMetricSlice(), pcommon.NewInstrumentationScope(), pcommon.NewResource()) got, err := accessor.Get(context.Background(), ctx) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tt.orig, got) err = accessor.Set(context.Background(), ctx, tt.newVal) - assert.Nil(t, err) + assert.NoError(t, err) exNumberDataPoint := createSummaryDataPointTelemetry() tt.modified(exNumberDataPoint) @@ -2122,17 +1931,15 @@ func Test_newPathGetSetter_Metric(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[TransformContext] orig any newVal any modified func(metric pmetric.Metric) }{ { name: "metric", - path: []ottl.Field{ - { - Name: "metric", - }, + path: &internal.TestPath[TransformContext]{ + N: "metric", }, orig: refMetric, newVal: newMetric, @@ -2142,12 +1949,10 @@ func Test_newPathGetSetter_Metric(t *testing.T) { }, { name: "metric name", - path: []ottl.Field{ - { - Name: "metric", - }, - { - Name: "name", + path: &internal.TestPath[TransformContext]{ + N: "metric", + NextPath: &internal.TestPath[TransformContext]{ + N: "name", }, }, orig: "name", @@ -2158,12 +1963,10 @@ func Test_newPathGetSetter_Metric(t *testing.T) { }, { name: "metric description", - path: []ottl.Field{ - { - Name: "metric", - }, - { - Name: "description", + path: &internal.TestPath[TransformContext]{ + N: "metric", + NextPath: &internal.TestPath[TransformContext]{ + N: "description", }, }, orig: "description", @@ -2174,12 +1977,10 @@ func Test_newPathGetSetter_Metric(t *testing.T) { }, { name: "metric unit", - path: []ottl.Field{ - { - Name: "metric", - }, - { - Name: "unit", + path: &internal.TestPath[TransformContext]{ + N: "metric", + NextPath: &internal.TestPath[TransformContext]{ + N: "unit", }, }, orig: "unit", @@ -2190,27 +1991,23 @@ func Test_newPathGetSetter_Metric(t *testing.T) { }, { name: "metric type", - path: []ottl.Field{ - { - Name: "metric", - }, - { - Name: "type", + path: &internal.TestPath[TransformContext]{ + N: "metric", + NextPath: &internal.TestPath[TransformContext]{ + N: "type", }, }, orig: int64(pmetric.MetricTypeSum), newVal: int64(pmetric.MetricTypeSum), - modified: func(metric pmetric.Metric) { + modified: func(_ pmetric.Metric) { }, }, { name: "metric aggregation_temporality", - path: []ottl.Field{ - { - Name: "metric", - }, - { - Name: "aggregation_temporality", + path: &internal.TestPath[TransformContext]{ + N: "metric", + NextPath: &internal.TestPath[TransformContext]{ + N: "aggregation_temporality", }, }, orig: int64(2), @@ -2221,12 +2018,10 @@ func Test_newPathGetSetter_Metric(t *testing.T) { }, { name: "metric is_monotonic", - path: []ottl.Field{ - { - Name: "metric", - }, - { - Name: "is_monotonic", + path: &internal.TestPath[TransformContext]{ + N: "metric", + NextPath: &internal.TestPath[TransformContext]{ + N: "is_monotonic", }, }, orig: true, @@ -2238,7 +2033,8 @@ func Test_newPathGetSetter_Metric(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - accessor, err := newPathGetSetter(tt.path) + pep := pathExpressionParser{} + accessor, err := pep.parsePath(tt.path) assert.NoError(t, err) metric := createMetricTelemetry() @@ -2246,11 +2042,11 @@ func Test_newPathGetSetter_Metric(t *testing.T) { ctx := NewTransformContext(pmetric.NewNumberDataPoint(), metric, pmetric.NewMetricSlice(), pcommon.NewInstrumentationScope(), pcommon.NewResource()) got, err := accessor.Get(context.Background(), ctx) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tt.orig, got) err = accessor.Set(context.Background(), ctx, tt.newVal) - assert.Nil(t, err) + assert.NoError(t, err) exMetric := createMetricTelemetry() tt.modified(exMetric) diff --git a/pkg/ottl/contexts/ottldatapoint/package_test.go b/pkg/ottl/contexts/ottldatapoint/package_test.go new file mode 100644 index 000000000000..5925d2c1cc79 --- /dev/null +++ b/pkg/ottl/contexts/ottldatapoint/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottldatapoint + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/ottl/contexts/ottllog/log.go b/pkg/ottl/contexts/ottllog/log.go index c9fe394bc4c5..3111268ecb06 100644 --- a/pkg/ottl/contexts/ottllog/log.go +++ b/pkg/ottl/contexts/ottllog/log.go @@ -18,6 +18,10 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/internal/ottlcommon" ) +const ( + contextName = "Log" +) + var _ internal.ResourceContext = TransformContext{} var _ internal.InstrumentationScopeContext = TransformContext{} @@ -56,10 +60,10 @@ func (tCtx TransformContext) getCache() pcommon.Map { } func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...Option) (ottl.Parser[TransformContext], error) { - pathExpressionParser := pathExpressionParser{telemetrySettings} + pep := pathExpressionParser{telemetrySettings} p, err := ottl.NewParser[TransformContext]( functions, - pathExpressionParser.parsePath, + pep.parsePath, telemetrySettings, ottl.WithEnumParser[TransformContext](parseEnum), ) @@ -72,22 +76,38 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet return p, nil } -type StatementsOption func(*ottl.Statements[TransformContext]) +type StatementSequenceOption func(*ottl.StatementSequence[TransformContext]) -func WithErrorMode(errorMode ottl.ErrorMode) StatementsOption { - return func(s *ottl.Statements[TransformContext]) { - ottl.WithErrorMode[TransformContext](errorMode)(s) +func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption { + return func(s *ottl.StatementSequence[TransformContext]) { + ottl.WithStatementSequenceErrorMode[TransformContext](errorMode)(s) } } -func NewStatements(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementsOption) ottl.Statements[TransformContext] { - s := ottl.NewStatements(statements, telemetrySettings) +func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext] { + s := ottl.NewStatementSequence(statements, telemetrySettings) for _, op := range options { op(&s) } return s } +type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext]) + +func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption { + return func(c *ottl.ConditionSequence[TransformContext]) { + ottl.WithConditionSequenceErrorMode[TransformContext](errorMode)(c) + } +} + +func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext] { + c := ottl.NewConditionSequence(conditions, telemetrySettings) + for _, op := range options { + op(&c) + } + return c +} + var symbolTable = map[ottl.EnumSymbol]ottl.Enum{ "SEVERITY_NUMBER_UNSPECIFIED": ottl.Enum(plog.SeverityNumberUnspecified), "SEVERITY_NUMBER_TRACE": ottl.Enum(plog.SeverityNumberTrace), @@ -130,25 +150,20 @@ type pathExpressionParser struct { telemetrySettings component.TelemetrySettings } -func (pep *pathExpressionParser) parsePath(val *ottl.Path) (ottl.GetSetter[TransformContext], error) { - if val != nil && len(val.Fields) > 0 { - return newPathGetSetter(val.Fields) +func (pep *pathExpressionParser) parsePath(path ottl.Path[TransformContext]) (ottl.GetSetter[TransformContext], error) { + if path == nil { + return nil, fmt.Errorf("path cannot be nil") } - return nil, fmt.Errorf("bad path %v", val) -} - -func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], error) { - switch path[0].Name { + switch path.Name() { case "cache": - mapKey := path[0].Keys - if mapKey == nil { + if path.Keys() == nil { return accessCache(), nil } - return accessCacheKey(mapKey), nil + return accessCacheKey(path.Keys()), nil case "resource": - return internal.ResourcePathGetSetter[TransformContext](path[1:]) + return internal.ResourcePathGetSetter[TransformContext](path.Next()) case "instrumentation_scope": - return internal.ScopePathGetSetter[TransformContext](path[1:]) + return internal.ScopePathGetSetter[TransformContext](path.Next()) case "time_unix_nano": return accessTimeUnixNano(), nil case "observed_time_unix_nano": @@ -162,51 +177,55 @@ func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], erro case "severity_text": return accessSeverityText(), nil case "body": - if len(path) == 1 { - keys := path[0].Keys - if keys == nil { - return accessBody(), nil + nextPath := path.Next() + if nextPath != nil { + if nextPath.Name() == "string" { + return accessStringBody(), nil } - return accessBodyKey(keys), nil + return nil, internal.FormatDefaultErrorMessage(nextPath.Name(), nextPath.String(), contextName, internal.LogRef) } - if path[1].Name == "string" { - return accessStringBody(), nil + if path.Keys() == nil { + return accessBody(), nil } + return accessBodyKey(path.Keys()), nil case "attributes": - mapKey := path[0].Keys - if mapKey == nil { + if path.Keys() == nil { return accessAttributes(), nil } - return accessAttributesKey(mapKey), nil + return accessAttributesKey(path.Keys()), nil case "dropped_attributes_count": return accessDroppedAttributesCount(), nil case "flags": return accessFlags(), nil case "trace_id": - if len(path) == 1 { - return accessTraceID(), nil - } - if path[1].Name == "string" { - return accessStringTraceID(), nil + nextPath := path.Next() + if nextPath != nil { + if nextPath.Name() == "string" { + return accessStringTraceID(), nil + } + return nil, internal.FormatDefaultErrorMessage(nextPath.Name(), nextPath.String(), contextName, internal.LogRef) } + return accessTraceID(), nil case "span_id": - if len(path) == 1 { - return accessSpanID(), nil - } - if path[1].Name == "string" { - return accessStringSpanID(), nil + nextPath := path.Next() + if nextPath != nil { + if nextPath.Name() == "string" { + return accessStringSpanID(), nil + } + return nil, internal.FormatDefaultErrorMessage(nextPath.Name(), path.String(), contextName, internal.LogRef) } + return accessSpanID(), nil + default: + return nil, internal.FormatDefaultErrorMessage(path.Name(), path.String(), contextName, internal.LogRef) } - - return nil, fmt.Errorf("invalid path expression %v", path) } func accessCache() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.getCache(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if m, ok := val.(pcommon.Map); ok { m.CopyTo(tCtx.getCache()) } @@ -215,23 +234,23 @@ func accessCache() ottl.StandardGetSetter[TransformContext] { } } -func accessCacheKey(keys []ottl.Key) ottl.StandardGetSetter[TransformContext] { +func accessCacheKey(key []ottl.Key[TransformContext]) ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { - return internal.GetMapValue(tCtx.getCache(), keys) + return internal.GetMapValue[TransformContext](ctx, tCtx, tCtx.getCache(), key) }, Setter: func(ctx context.Context, tCtx TransformContext, val any) error { - return internal.SetMapValue(tCtx.getCache(), keys, val) + return internal.SetMapValue[TransformContext](ctx, tCtx, tCtx.getCache(), key, val) }, } } func accessTimeUnixNano() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.GetLogRecord().Timestamp().AsTime().UnixNano(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if i, ok := val.(int64); ok { tCtx.GetLogRecord().SetTimestamp(pcommon.NewTimestampFromTime(time.Unix(0, i))) } @@ -242,10 +261,10 @@ func accessTimeUnixNano() ottl.StandardGetSetter[TransformContext] { func accessObservedTimeUnixNano() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.GetLogRecord().ObservedTimestamp().AsTime().UnixNano(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if i, ok := val.(int64); ok { tCtx.GetLogRecord().SetObservedTimestamp(pcommon.NewTimestampFromTime(time.Unix(0, i))) } @@ -256,10 +275,10 @@ func accessObservedTimeUnixNano() ottl.StandardGetSetter[TransformContext] { func accessTime() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.GetLogRecord().Timestamp().AsTime(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if i, ok := val.(time.Time); ok { tCtx.GetLogRecord().SetTimestamp(pcommon.NewTimestampFromTime(i)) } @@ -270,10 +289,10 @@ func accessTime() ottl.StandardGetSetter[TransformContext] { func accessObservedTime() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.GetLogRecord().ObservedTimestamp().AsTime(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if i, ok := val.(time.Time); ok { tCtx.GetLogRecord().SetObservedTimestamp(pcommon.NewTimestampFromTime(i)) } @@ -284,10 +303,10 @@ func accessObservedTime() ottl.StandardGetSetter[TransformContext] { func accessSeverityNumber() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return int64(tCtx.GetLogRecord().SeverityNumber()), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if i, ok := val.(int64); ok { tCtx.GetLogRecord().SetSeverityNumber(plog.SeverityNumber(i)) } @@ -298,10 +317,10 @@ func accessSeverityNumber() ottl.StandardGetSetter[TransformContext] { func accessSeverityText() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.GetLogRecord().SeverityText(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if s, ok := val.(string); ok { tCtx.GetLogRecord().SetSeverityText(s) } @@ -312,24 +331,24 @@ func accessSeverityText() ottl.StandardGetSetter[TransformContext] { func accessBody() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return ottlcommon.GetValue(tCtx.GetLogRecord().Body()), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { return internal.SetValue(tCtx.GetLogRecord().Body(), val) }, } } -func accessBodyKey(keys []ottl.Key) ottl.StandardGetSetter[TransformContext] { +func accessBodyKey(key []ottl.Key[TransformContext]) ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { body := tCtx.GetLogRecord().Body() switch body.Type() { case pcommon.ValueTypeMap: - return internal.GetMapValue(tCtx.GetLogRecord().Body().Map(), keys) + return internal.GetMapValue[TransformContext](ctx, tCtx, tCtx.GetLogRecord().Body().Map(), key) case pcommon.ValueTypeSlice: - return internal.GetSliceValue(tCtx.GetLogRecord().Body().Slice(), keys) + return internal.GetSliceValue[TransformContext](ctx, tCtx, tCtx.GetLogRecord().Body().Slice(), key) default: return nil, fmt.Errorf("log bodies of type %s cannot be indexed", body.Type().String()) } @@ -338,9 +357,9 @@ func accessBodyKey(keys []ottl.Key) ottl.StandardGetSetter[TransformContext] { body := tCtx.GetLogRecord().Body() switch body.Type() { case pcommon.ValueTypeMap: - return internal.SetMapValue(tCtx.GetLogRecord().Body().Map(), keys, val) + return internal.SetMapValue[TransformContext](ctx, tCtx, tCtx.GetLogRecord().Body().Map(), key, val) case pcommon.ValueTypeSlice: - return internal.SetSliceValue(tCtx.GetLogRecord().Body().Slice(), keys, val) + return internal.SetSliceValue[TransformContext](ctx, tCtx, tCtx.GetLogRecord().Body().Slice(), key, val) default: return fmt.Errorf("log bodies of type %s cannot be indexed", body.Type().String()) } @@ -350,10 +369,10 @@ func accessBodyKey(keys []ottl.Key) ottl.StandardGetSetter[TransformContext] { func accessStringBody() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.GetLogRecord().Body().AsString(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if str, ok := val.(string); ok { tCtx.GetLogRecord().Body().SetStr(str) } @@ -364,10 +383,10 @@ func accessStringBody() ottl.StandardGetSetter[TransformContext] { func accessAttributes() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.GetLogRecord().Attributes(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if attrs, ok := val.(pcommon.Map); ok { attrs.CopyTo(tCtx.GetLogRecord().Attributes()) } @@ -376,23 +395,23 @@ func accessAttributes() ottl.StandardGetSetter[TransformContext] { } } -func accessAttributesKey(keys []ottl.Key) ottl.StandardGetSetter[TransformContext] { +func accessAttributesKey(key []ottl.Key[TransformContext]) ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { - return internal.GetMapValue(tCtx.GetLogRecord().Attributes(), keys) + return internal.GetMapValue[TransformContext](ctx, tCtx, tCtx.GetLogRecord().Attributes(), key) }, Setter: func(ctx context.Context, tCtx TransformContext, val any) error { - return internal.SetMapValue(tCtx.GetLogRecord().Attributes(), keys, val) + return internal.SetMapValue[TransformContext](ctx, tCtx, tCtx.GetLogRecord().Attributes(), key, val) }, } } func accessDroppedAttributesCount() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return int64(tCtx.GetLogRecord().DroppedAttributesCount()), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if i, ok := val.(int64); ok { tCtx.GetLogRecord().SetDroppedAttributesCount(uint32(i)) } @@ -403,10 +422,10 @@ func accessDroppedAttributesCount() ottl.StandardGetSetter[TransformContext] { func accessFlags() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return int64(tCtx.GetLogRecord().Flags()), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if i, ok := val.(int64); ok { tCtx.GetLogRecord().SetFlags(plog.LogRecordFlags(i)) } @@ -417,10 +436,10 @@ func accessFlags() ottl.StandardGetSetter[TransformContext] { func accessTraceID() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.GetLogRecord().TraceID(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newTraceID, ok := val.(pcommon.TraceID); ok { tCtx.GetLogRecord().SetTraceID(newTraceID) } @@ -431,11 +450,11 @@ func accessTraceID() ottl.StandardGetSetter[TransformContext] { func accessStringTraceID() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { id := tCtx.GetLogRecord().TraceID() return hex.EncodeToString(id[:]), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if str, ok := val.(string); ok { id, err := internal.ParseTraceID(str) if err != nil { @@ -450,10 +469,10 @@ func accessStringTraceID() ottl.StandardGetSetter[TransformContext] { func accessSpanID() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.GetLogRecord().SpanID(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newSpanID, ok := val.(pcommon.SpanID); ok { tCtx.GetLogRecord().SetSpanID(newSpanID) } @@ -464,11 +483,11 @@ func accessSpanID() ottl.StandardGetSetter[TransformContext] { func accessStringSpanID() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { id := tCtx.GetLogRecord().SpanID() return hex.EncodeToString(id[:]), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if str, ok := val.(string); ok { id, err := internal.ParseSpanID(str) if err != nil { diff --git a/pkg/ottl/contexts/ottllog/log_test.go b/pkg/ottl/contexts/ottllog/log_test.go index 6a1b7fbbebc7..e85f9b03cc59 100644 --- a/pkg/ottl/contexts/ottllog/log_test.go +++ b/pkg/ottl/contexts/ottllog/log_test.go @@ -15,6 +15,7 @@ import ( "go.opentelemetry.io/collector/pdata/plog" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottltest" ) @@ -51,7 +52,7 @@ func Test_newPathGetSetter(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[TransformContext] orig any newVal any modified func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) @@ -59,144 +60,124 @@ func Test_newPathGetSetter(t *testing.T) { }{ { name: "time", - path: []ottl.Field{ - { - Name: "time", - }, + path: &internal.TestPath[TransformContext]{ + N: "time", }, orig: time.Date(1970, 1, 1, 0, 0, 0, 100000000, time.UTC), newVal: time.Date(1970, 1, 1, 0, 0, 0, 200000000, time.UTC), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.SetTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(200))) }, }, { name: "time_unix_nano", - path: []ottl.Field{ - { - Name: "time_unix_nano", - }, + path: &internal.TestPath[TransformContext]{ + N: "time_unix_nano", }, orig: int64(100_000_000), newVal: int64(200_000_000), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.SetTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(200))) }, }, { name: "observed_time_unix_nano", - path: []ottl.Field{ - { - Name: "observed_time_unix_nano", - }, + path: &internal.TestPath[TransformContext]{ + N: "observed_time_unix_nano", }, orig: int64(500_000_000), newVal: int64(200_000_000), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.SetObservedTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(200))) }, }, { name: "observed time", - path: []ottl.Field{ - { - Name: "observed_time", - }, + path: &internal.TestPath[TransformContext]{ + N: "observed_time", }, orig: time.Date(1970, 1, 1, 0, 0, 0, 500000000, time.UTC), newVal: time.Date(1970, 1, 1, 0, 0, 0, 200000000, time.UTC), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.SetObservedTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(200))) }, }, { name: "severity_number", - path: []ottl.Field{ - { - Name: "severity_number", - }, + path: &internal.TestPath[TransformContext]{ + N: "severity_number", }, orig: int64(plog.SeverityNumberFatal), newVal: int64(3), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.SetSeverityNumber(plog.SeverityNumberTrace3) }, }, { name: "severity_text", - path: []ottl.Field{ - { - Name: "severity_text", - }, + path: &internal.TestPath[TransformContext]{ + N: "severity_text", }, orig: "blue screen of death", newVal: "black screen of death", - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.SetSeverityText("black screen of death") }, }, { name: "body", - path: []ottl.Field{ - { - Name: "body", - }, + path: &internal.TestPath[TransformContext]{ + N: "body", }, orig: "body", newVal: "head", - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Body().SetStr("head") }, }, { name: "map body", - path: []ottl.Field{ - { - Name: "body", - }, + path: &internal.TestPath[TransformContext]{ + N: "body", }, orig: func() pcommon.Map { log, _, _ := createTelemetry("map") return log.Body().Map() }(), newVal: newBodyMap, - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { newBodyMap.CopyTo(log.Body().Map()) }, bodyType: "map", }, { name: "map body index", - path: []ottl.Field{ - { - Name: "body", - Keys: []ottl.Key{ - { - String: ottltest.Strp("key"), - }, + path: &internal.TestPath[TransformContext]{ + N: "body", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("key"), }, }, }, orig: "val", newVal: "val2", - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Body().Map().PutStr("key", "val2") }, bodyType: "map", }, { name: "slice body", - path: []ottl.Field{ - { - Name: "body", - }, + path: &internal.TestPath[TransformContext]{ + N: "body", }, orig: func() pcommon.Slice { log, _, _ := createTelemetry("slice") return log.Body().Slice() }(), newVal: newBodySlice, - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { fmt.Println(log.Body().Slice().At(0).AsString()) newBodySlice.CopyTo(log.Body().Slice()) fmt.Println(log.Body().Slice().At(0).AsString()) @@ -206,254 +187,222 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "slice body index", - path: []ottl.Field{ - { - Name: "body", - Keys: []ottl.Key{ - { - Int: ottltest.Intp(0), - }, + path: &internal.TestPath[TransformContext]{ + N: "body", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), }, }, }, orig: "body", newVal: "head", - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Body().Slice().At(0).SetStr("head") }, bodyType: "slice", }, { name: "body string", - path: []ottl.Field{ - { - Name: "body", - }, - { - Name: "string", + path: &internal.TestPath[TransformContext]{ + N: "body", + NextPath: &internal.TestPath[TransformContext]{ + N: "string", }, }, orig: "1", newVal: "2", - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Body().SetStr("2") }, bodyType: "int", }, { name: "flags", - path: []ottl.Field{ - { - Name: "flags", - }, + path: &internal.TestPath[TransformContext]{ + N: "flags", }, orig: int64(4), newVal: int64(5), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.SetFlags(plog.LogRecordFlags(5)) }, }, { name: "trace_id", - path: []ottl.Field{ - { - Name: "trace_id", - }, + path: &internal.TestPath[TransformContext]{ + N: "trace_id", }, orig: pcommon.TraceID(traceID), newVal: pcommon.TraceID(traceID2), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.SetTraceID(traceID2) }, }, { name: "span_id", - path: []ottl.Field{ - { - Name: "span_id", - }, + path: &internal.TestPath[TransformContext]{ + N: "span_id", }, orig: pcommon.SpanID(spanID), newVal: pcommon.SpanID(spanID2), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.SetSpanID(spanID2) }, }, { name: "trace_id string", - path: []ottl.Field{ - { - Name: "trace_id", - }, - { - Name: "string", + path: &internal.TestPath[TransformContext]{ + N: "trace_id", + NextPath: &internal.TestPath[TransformContext]{ + N: "string", }, }, orig: hex.EncodeToString(traceID[:]), newVal: hex.EncodeToString(traceID2[:]), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.SetTraceID(traceID2) }, }, { name: "span_id string", - path: []ottl.Field{ - { - Name: "span_id", - }, - { - Name: "string", + path: &internal.TestPath[TransformContext]{ + N: "span_id", + NextPath: &internal.TestPath[TransformContext]{ + N: "string", }, }, orig: hex.EncodeToString(spanID[:]), newVal: hex.EncodeToString(spanID2[:]), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.SetSpanID(spanID2) }, }, { name: "cache", - path: []ottl.Field{ - { - Name: "cache", - }, + path: &internal.TestPath[TransformContext]{ + N: "cache", }, orig: pcommon.NewMap(), newVal: newCache, - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, cache pcommon.Map) { newCache.CopyTo(cache) }, }, { name: "cache access", - path: []ottl.Field{ - { - Name: "cache", - Keys: []ottl.Key{ - { - String: ottltest.Strp("temp"), - }, + path: &internal.TestPath[TransformContext]{ + N: "cache", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("temp"), }, }, }, orig: nil, newVal: "new value", - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, cache pcommon.Map) { cache.PutStr("temp", "new value") }, }, { name: "attributes", - path: []ottl.Field{ - { - Name: "attributes", - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", }, orig: refLog.Attributes(), newVal: newAttrs, - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { newAttrs.CopyTo(log.Attributes()) }, }, { name: "attributes string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("str"), }, }, }, orig: "val", newVal: "newVal", - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Attributes().PutStr("str", "newVal") }, }, { name: "attributes bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bool"), }, }, }, orig: true, newVal: false, - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Attributes().PutBool("bool", false) }, }, { name: "attributes int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("int"), }, }, }, orig: int64(10), newVal: int64(20), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Attributes().PutInt("int", 20) }, }, { name: "attributes float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("double"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("double"), }, }, }, orig: float64(1.2), newVal: float64(2.4), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Attributes().PutDouble("double", 2.4) }, }, { name: "attributes bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bytes"), }, }, }, orig: []byte{1, 3, 2}, newVal: []byte{2, 3, 4}, - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Attributes().PutEmptyBytes("bytes").FromRaw([]byte{2, 3, 4}) }, }, { name: "attributes array string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_str"), }, }, }, @@ -462,19 +411,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []string{"new"}, - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Attributes().PutEmptySlice("arr_str").AppendEmpty().SetStr("new") }, }, { name: "attributes array bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bool"), }, }, }, @@ -483,19 +430,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []bool{false}, - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Attributes().PutEmptySlice("arr_bool").AppendEmpty().SetBool(false) }, }, { name: "attributes array int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_int"), }, }, }, @@ -504,19 +449,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []int64{20}, - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Attributes().PutEmptySlice("arr_int").AppendEmpty().SetInt(20) }, }, { name: "attributes array float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_float"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_float"), }, }, }, @@ -525,19 +468,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []float64{2.0}, - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Attributes().PutEmptySlice("arr_float").AppendEmpty().SetDouble(2.0) }, }, { name: "attributes array bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bytes"), }, }, }, @@ -546,19 +487,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: [][]byte{{9, 6, 4}}, - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Attributes().PutEmptySlice("arr_bytes").AppendEmpty().SetEmptyBytes().FromRaw([]byte{9, 6, 4}) }, }, { name: "attributes pcommon.Map", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("pMap"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("pMap"), }, }, }, @@ -567,7 +506,7 @@ func Test_newPathGetSetter(t *testing.T) { return val.Map() }(), newVal: newPMap, - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { m := log.Attributes().PutEmptyMap("pMap") m2 := m.PutEmptyMap("k2") m2.PutStr("k1", "string") @@ -575,13 +514,11 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "attributes map[string]any", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -590,7 +527,7 @@ func Test_newPathGetSetter(t *testing.T) { return val.Map() }(), newVal: newMap, - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { m := log.Attributes().PutEmptyMap("map") m2 := m.PutEmptyMap("k2") m2.PutStr("k1", "string") @@ -598,19 +535,17 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "attributes nested", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), - }, - { - Int: ottltest.Intp(0), - }, - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("slice"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), + }, + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -620,25 +555,23 @@ func Test_newPathGetSetter(t *testing.T) { return val.Str() }(), newVal: "new", - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.Attributes().PutEmptySlice("slice").AppendEmpty().SetEmptyMap().PutStr("map", "new") }, }, { name: "attributes nested new values", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("new"), - }, - { - Int: ottltest.Intp(2), - }, - { - Int: ottltest.Intp(0), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("new"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(2), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), }, }, }, @@ -646,7 +579,7 @@ func Test_newPathGetSetter(t *testing.T) { return nil }(), newVal: "new", - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { s := log.Attributes().PutEmptySlice("new") s.AppendEmpty() s.AppendEmpty() @@ -655,59 +588,54 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "dropped_attributes_count", - path: []ottl.Field{ - { - Name: "dropped_attributes_count", - }, + path: &internal.TestPath[TransformContext]{ + N: "dropped_attributes_count", }, orig: int64(10), newVal: int64(20), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(log plog.LogRecord, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { log.SetDroppedAttributesCount(20) }, }, { name: "instrumentation_scope", - path: []ottl.Field{ - { - Name: "instrumentation_scope", - }, + path: &internal.TestPath[TransformContext]{ + N: "instrumentation_scope", }, orig: refIS, newVal: pcommon.NewInstrumentationScope(), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ plog.LogRecord, il pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { pcommon.NewInstrumentationScope().CopyTo(il) }, }, { name: "resource", - path: []ottl.Field{ - { - Name: "resource", - }, + path: &internal.TestPath[TransformContext]{ + N: "resource", }, orig: refResource, newVal: pcommon.NewResource(), - modified: func(log plog.LogRecord, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ plog.LogRecord, _ pcommon.InstrumentationScope, resource pcommon.Resource, _ pcommon.Map) { pcommon.NewResource().CopyTo(resource) }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - accessor, err := newPathGetSetter(tt.path) + pep := pathExpressionParser{} + accessor, err := pep.parsePath(tt.path) assert.NoError(t, err) log, il, resource := createTelemetry(tt.bodyType) tCtx := NewTransformContext(log, il, resource) got, err := accessor.Get(context.Background(), tCtx) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tt.orig, got) tCtx = NewTransformContext(log, il, resource) err = accessor.Set(context.Background(), tCtx, tt.newVal) - assert.Nil(t, err) + assert.NoError(t, err) exLog, exIl, exRes := createTelemetry(tt.bodyType) exCache := pcommon.NewMap() @@ -793,18 +721,17 @@ func createTelemetry(bodyType string) (plog.LogRecord, pcommon.InstrumentationSc } func Test_InvalidBodyIndexing(t *testing.T) { - path := []ottl.Field{ - { - Name: "body", - Keys: []ottl.Key{ - { - String: ottltest.Strp("key"), - }, + path := internal.TestPath[TransformContext]{ + N: "body", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("key"), }, }, } - accessor, err := newPathGetSetter(path) + pep := pathExpressionParser{} + accessor, err := pep.parsePath(&path) assert.NoError(t, err) log, il, resource := createTelemetry("string") diff --git a/pkg/ottl/contexts/ottllog/package_test.go b/pkg/ottl/contexts/ottllog/package_test.go new file mode 100644 index 000000000000..163413d1c73a --- /dev/null +++ b/pkg/ottl/contexts/ottllog/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottllog + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/ottl/contexts/ottlmetric/metrics.go b/pkg/ottl/contexts/ottlmetric/metrics.go index 92267ecadc7d..964210d46564 100644 --- a/pkg/ottl/contexts/ottlmetric/metrics.go +++ b/pkg/ottl/contexts/ottlmetric/metrics.go @@ -60,10 +60,10 @@ func (tCtx TransformContext) getCache() pcommon.Map { } func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...Option) (ottl.Parser[TransformContext], error) { - pathExpressionParser := pathExpressionParser{telemetrySettings} + pep := pathExpressionParser{telemetrySettings} p, err := ottl.NewParser[TransformContext]( functions, - pathExpressionParser.parsePath, + pep.parsePath, telemetrySettings, ottl.WithEnumParser[TransformContext](parseEnum), ) @@ -76,22 +76,38 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet return p, err } -type StatementsOption func(*ottl.Statements[TransformContext]) +type StatementSequenceOption func(*ottl.StatementSequence[TransformContext]) -func WithErrorMode(errorMode ottl.ErrorMode) StatementsOption { - return func(s *ottl.Statements[TransformContext]) { - ottl.WithErrorMode[TransformContext](errorMode)(s) +func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption { + return func(s *ottl.StatementSequence[TransformContext]) { + ottl.WithStatementSequenceErrorMode[TransformContext](errorMode)(s) } } -func NewStatements(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementsOption) ottl.Statements[TransformContext] { - s := ottl.NewStatements(statements, telemetrySettings) +func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext] { + s := ottl.NewStatementSequence(statements, telemetrySettings) for _, op := range options { op(&s) } return s } +type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext]) + +func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption { + return func(c *ottl.ConditionSequence[TransformContext]) { + ottl.WithConditionSequenceErrorMode[TransformContext](errorMode)(c) + } +} + +func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext] { + c := ottl.NewConditionSequence(conditions, telemetrySettings) + for _, op := range options { + op(&c) + } + return c +} + var symbolTable = internal.MetricSymbolTable func parseEnum(val *ottl.EnumSymbol) (*ottl.Enum, error) { @@ -108,25 +124,20 @@ type pathExpressionParser struct { telemetrySettings component.TelemetrySettings } -func (pep *pathExpressionParser) parsePath(val *ottl.Path) (ottl.GetSetter[TransformContext], error) { - if val != nil && len(val.Fields) > 0 { - return newPathGetSetter(val.Fields) +func (pep *pathExpressionParser) parsePath(path ottl.Path[TransformContext]) (ottl.GetSetter[TransformContext], error) { + if path == nil { + return nil, fmt.Errorf("path cannot be nil") } - return nil, fmt.Errorf("bad path %v", val) -} - -func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], error) { - switch path[0].Name { + switch path.Name() { case "cache": - mapKey := path[0].Keys - if mapKey == nil { + if path.Keys() == nil { return accessCache(), nil } - return accessCacheKey(mapKey), nil + return accessCacheKey(path.Keys()), nil case "resource": - return internal.ResourcePathGetSetter[TransformContext](path[1:]) + return internal.ResourcePathGetSetter[TransformContext](path.Next()) case "instrumentation_scope": - return internal.ScopePathGetSetter[TransformContext](path[1:]) + return internal.ScopePathGetSetter[TransformContext](path.Next()) default: return internal.MetricPathGetSetter[TransformContext](path) } @@ -134,10 +145,10 @@ func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], erro func accessCache() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.getCache(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if m, ok := val.(pcommon.Map); ok { m.CopyTo(tCtx.getCache()) } @@ -146,13 +157,13 @@ func accessCache() ottl.StandardGetSetter[TransformContext] { } } -func accessCacheKey(keys []ottl.Key) ottl.StandardGetSetter[TransformContext] { +func accessCacheKey(key []ottl.Key[TransformContext]) ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { - return internal.GetMapValue(tCtx.getCache(), keys) + return internal.GetMapValue[TransformContext](ctx, tCtx, tCtx.getCache(), key) }, Setter: func(ctx context.Context, tCtx TransformContext, val any) error { - return internal.SetMapValue(tCtx.getCache(), keys, val) + return internal.SetMapValue[TransformContext](ctx, tCtx, tCtx.getCache(), key, val) }, } } diff --git a/pkg/ottl/contexts/ottlmetric/metrics_test.go b/pkg/ottl/contexts/ottlmetric/metrics_test.go index f2480ac51ced..fb2bfb4b670a 100644 --- a/pkg/ottl/contexts/ottlmetric/metrics_test.go +++ b/pkg/ottl/contexts/ottlmetric/metrics_test.go @@ -12,6 +12,7 @@ import ( "go.opentelemetry.io/collector/pdata/pmetric" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottltest" ) @@ -31,136 +32,119 @@ func Test_newPathGetSetter(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[TransformContext] orig any newVal any modified func(metric pmetric.Metric, cache pcommon.Map) }{ { name: "metric name", - path: []ottl.Field{ - { - Name: "name", - }, + path: &internal.TestPath[TransformContext]{ + N: "name", }, orig: "name", newVal: "new name", - modified: func(metric pmetric.Metric, cache pcommon.Map) { + modified: func(metric pmetric.Metric, _ pcommon.Map) { metric.SetName("new name") }, }, { name: "metric description", - path: []ottl.Field{ - { - Name: "description", - }, + path: &internal.TestPath[TransformContext]{ + N: "description", }, orig: "description", newVal: "new description", - modified: func(metric pmetric.Metric, cache pcommon.Map) { + modified: func(metric pmetric.Metric, _ pcommon.Map) { metric.SetDescription("new description") }, }, { name: "metric unit", - path: []ottl.Field{ - { - Name: "unit", - }, + path: &internal.TestPath[TransformContext]{ + N: "unit", }, orig: "unit", newVal: "new unit", - modified: func(metric pmetric.Metric, cache pcommon.Map) { + modified: func(metric pmetric.Metric, _ pcommon.Map) { metric.SetUnit("new unit") }, }, { name: "metric type", - path: []ottl.Field{ - { - Name: "type", - }, + path: &internal.TestPath[TransformContext]{ + N: "type", }, orig: int64(pmetric.MetricTypeSum), newVal: int64(pmetric.MetricTypeSum), - modified: func(metric pmetric.Metric, cache pcommon.Map) { + modified: func(_ pmetric.Metric, _ pcommon.Map) { }, }, { name: "metric aggregation_temporality", - path: []ottl.Field{ - { - Name: "aggregation_temporality", - }, + path: &internal.TestPath[TransformContext]{ + N: "aggregation_temporality", }, orig: int64(2), newVal: int64(1), - modified: func(metric pmetric.Metric, cache pcommon.Map) { + modified: func(metric pmetric.Metric, _ pcommon.Map) { metric.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityDelta) }, }, { name: "metric is_monotonic", - path: []ottl.Field{ - { - Name: "is_monotonic", - }, + path: &internal.TestPath[TransformContext]{ + N: "is_monotonic", }, orig: true, newVal: false, - modified: func(metric pmetric.Metric, cache pcommon.Map) { + modified: func(metric pmetric.Metric, _ pcommon.Map) { metric.Sum().SetIsMonotonic(false) }, }, { name: "metric data points", - path: []ottl.Field{ - { - Name: "data_points", - }, + path: &internal.TestPath[TransformContext]{ + N: "data_points", }, orig: refMetric.Sum().DataPoints(), newVal: newDataPoints, - modified: func(metric pmetric.Metric, cache pcommon.Map) { + modified: func(metric pmetric.Metric, _ pcommon.Map) { newDataPoints.CopyTo(metric.Sum().DataPoints()) }, }, { name: "cache", - path: []ottl.Field{ - { - Name: "cache", - }, + path: &internal.TestPath[TransformContext]{ + N: "cache", }, orig: pcommon.NewMap(), newVal: newCache, - modified: func(metric pmetric.Metric, cache pcommon.Map) { + modified: func(_ pmetric.Metric, cache pcommon.Map) { newCache.CopyTo(cache) }, }, { name: "cache access", - path: []ottl.Field{ - { - Name: "cache", - Keys: []ottl.Key{ - { - String: ottltest.Strp("temp"), - }, + path: &internal.TestPath[TransformContext]{ + N: "cache", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("temp"), }, }, }, orig: nil, newVal: "new value", - modified: func(metric pmetric.Metric, cache pcommon.Map) { + modified: func(_ pmetric.Metric, cache pcommon.Map) { cache.PutStr("temp", "new value") }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - accessor, err := newPathGetSetter(tt.path) + pep := pathExpressionParser{} + accessor, err := pep.parsePath(tt.path) assert.NoError(t, err) metric := createMetricTelemetry() @@ -168,11 +152,11 @@ func Test_newPathGetSetter(t *testing.T) { ctx := NewTransformContext(metric, pmetric.NewMetricSlice(), pcommon.NewInstrumentationScope(), pcommon.NewResource()) got, err := accessor.Get(context.Background(), ctx) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tt.orig, got) err = accessor.Set(context.Background(), ctx, tt.newVal) - assert.Nil(t, err) + assert.NoError(t, err) exMetric := createMetricTelemetry() exCache := pcommon.NewMap() diff --git a/pkg/ottl/contexts/ottlmetric/package_test.go b/pkg/ottl/contexts/ottlmetric/package_test.go new file mode 100644 index 000000000000..f0e3e28adc6d --- /dev/null +++ b/pkg/ottl/contexts/ottlmetric/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlmetric + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/ottl/contexts/ottlresource/package_test.go b/pkg/ottl/contexts/ottlresource/package_test.go new file mode 100644 index 000000000000..695596f66ea5 --- /dev/null +++ b/pkg/ottl/contexts/ottlresource/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlresource + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/ottl/contexts/ottlresource/resource.go b/pkg/ottl/contexts/ottlresource/resource.go index 921d00311342..e37440d9dbc2 100644 --- a/pkg/ottl/contexts/ottlresource/resource.go +++ b/pkg/ottl/contexts/ottlresource/resource.go @@ -39,10 +39,10 @@ func (tCtx TransformContext) getCache() pcommon.Map { } func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...Option) (ottl.Parser[TransformContext], error) { - pathExpressionParser := pathExpressionParser{telemetrySettings} + pep := pathExpressionParser{telemetrySettings} p, err := ottl.NewParser[TransformContext]( functions, - pathExpressionParser.parsePath, + pep.parsePath, telemetrySettings, ottl.WithEnumParser[TransformContext](parseEnum), ) @@ -55,22 +55,38 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet return p, nil } -type StatementsOption func(*ottl.Statements[TransformContext]) +type StatementSequenceOption func(*ottl.StatementSequence[TransformContext]) -func WithErrorMode(errorMode ottl.ErrorMode) StatementsOption { - return func(s *ottl.Statements[TransformContext]) { - ottl.WithErrorMode[TransformContext](errorMode)(s) +func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption { + return func(s *ottl.StatementSequence[TransformContext]) { + ottl.WithStatementSequenceErrorMode[TransformContext](errorMode)(s) } } -func NewStatements(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementsOption) ottl.Statements[TransformContext] { - s := ottl.NewStatements(statements, telemetrySettings) +func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext] { + s := ottl.NewStatementSequence(statements, telemetrySettings) for _, op := range options { op(&s) } return s } +type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext]) + +func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption { + return func(c *ottl.ConditionSequence[TransformContext]) { + ottl.WithConditionSequenceErrorMode[TransformContext](errorMode)(c) + } +} + +func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext] { + c := ottl.NewConditionSequence(conditions, telemetrySettings) + for _, op := range options { + op(&c) + } + return c +} + func parseEnum(_ *ottl.EnumSymbol) (*ottl.Enum, error) { return nil, fmt.Errorf("resource context does not provide Enum support") } @@ -79,21 +95,16 @@ type pathExpressionParser struct { telemetrySettings component.TelemetrySettings } -func (pep *pathExpressionParser) parsePath(val *ottl.Path) (ottl.GetSetter[TransformContext], error) { - if val != nil && len(val.Fields) > 0 { - return newPathGetSetter(val.Fields) +func (pep *pathExpressionParser) parsePath(path ottl.Path[TransformContext]) (ottl.GetSetter[TransformContext], error) { + if path == nil { + return nil, fmt.Errorf("path cannot be nil") } - return nil, fmt.Errorf("bad path %v", val) -} - -func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], error) { - switch path[0].Name { + switch path.Name() { case "cache": - mapKey := path[0].Keys - if mapKey == nil { + if path.Keys() == nil { return accessCache(), nil } - return accessCacheKey(mapKey), nil + return accessCacheKey(path.Keys()), nil default: return internal.ResourcePathGetSetter[TransformContext](path) } @@ -101,10 +112,10 @@ func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], erro func accessCache() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.getCache(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if m, ok := val.(pcommon.Map); ok { m.CopyTo(tCtx.getCache()) } @@ -113,13 +124,13 @@ func accessCache() ottl.StandardGetSetter[TransformContext] { } } -func accessCacheKey(keys []ottl.Key) ottl.StandardGetSetter[TransformContext] { +func accessCacheKey(key []ottl.Key[TransformContext]) ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { - return internal.GetMapValue(tCtx.getCache(), keys) + return internal.GetMapValue[TransformContext](ctx, tCtx, tCtx.getCache(), key) }, Setter: func(ctx context.Context, tCtx TransformContext, val any) error { - return internal.SetMapValue(tCtx.getCache(), keys, val) + return internal.SetMapValue[TransformContext](ctx, tCtx, tCtx.getCache(), key, val) }, } } diff --git a/pkg/ottl/contexts/ottlresource/resource_test.go b/pkg/ottl/contexts/ottlresource/resource_test.go index 87d8cb397f2c..77dde557eaa1 100644 --- a/pkg/ottl/contexts/ottlresource/resource_test.go +++ b/pkg/ottl/contexts/ottlresource/resource_test.go @@ -11,6 +11,7 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottltest" ) @@ -34,154 +35,136 @@ func Test_newPathGetSetter(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[TransformContext] orig any newVal any modified func(resource pcommon.Resource, cache pcommon.Map) }{ { name: "cache", - path: []ottl.Field{ - { - Name: "cache", - }, + path: &internal.TestPath[TransformContext]{ + N: "cache", }, orig: pcommon.NewMap(), newVal: newCache, - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ pcommon.Resource, cache pcommon.Map) { newCache.CopyTo(cache) }, }, { name: "cache access", - path: []ottl.Field{ - { - Name: "cache", - Keys: []ottl.Key{ - { - String: ottltest.Strp("temp"), - }, + path: &internal.TestPath[TransformContext]{ + N: "cache", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("temp"), }, }, }, orig: nil, newVal: "new value", - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ pcommon.Resource, cache pcommon.Map) { cache.PutStr("temp", "new value") }, }, { name: "attributes", - path: []ottl.Field{ - { - Name: "attributes", - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", }, orig: refResource.Attributes(), newVal: newAttrs, - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { newAttrs.CopyTo(resource.Attributes()) }, }, { name: "attributes string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("str"), }, }, }, orig: "val", newVal: "newVal", - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { resource.Attributes().PutStr("str", "newVal") }, }, { name: "attributes bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bool"), }, }, }, orig: true, newVal: false, - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { resource.Attributes().PutBool("bool", false) }, }, { name: "attributes int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("int"), }, }, }, orig: int64(10), newVal: int64(20), - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { resource.Attributes().PutInt("int", 20) }, }, { name: "attributes float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("double"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("double"), }, }, }, orig: float64(1.2), newVal: float64(2.4), - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { resource.Attributes().PutDouble("double", 2.4) }, }, { name: "attributes bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bytes"), }, }, }, orig: []byte{1, 3, 2}, newVal: []byte{2, 3, 4}, - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { resource.Attributes().PutEmptyBytes("bytes").FromRaw([]byte{2, 3, 4}) }, }, { name: "attributes array string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_str"), }, }, }, @@ -190,19 +173,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []string{"new"}, - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { resource.Attributes().PutEmptySlice("arr_str").AppendEmpty().SetStr("new") }, }, { name: "attributes array bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bool"), }, }, }, @@ -211,19 +192,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []bool{false}, - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { resource.Attributes().PutEmptySlice("arr_bool").AppendEmpty().SetBool(false) }, }, { name: "attributes array int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_int"), }, }, }, @@ -232,19 +211,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []int64{20}, - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { resource.Attributes().PutEmptySlice("arr_int").AppendEmpty().SetInt(20) }, }, { name: "attributes array float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_float"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_float"), }, }, }, @@ -253,19 +230,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []float64{2.0}, - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { resource.Attributes().PutEmptySlice("arr_float").AppendEmpty().SetDouble(2.0) }, }, { name: "attributes array bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bytes"), }, }, }, @@ -274,19 +249,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: [][]byte{{9, 6, 4}}, - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { resource.Attributes().PutEmptySlice("arr_bytes").AppendEmpty().SetEmptyBytes().FromRaw([]byte{9, 6, 4}) }, }, { name: "attributes pcommon.Map", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("pMap"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("pMap"), }, }, }, @@ -295,7 +268,7 @@ func Test_newPathGetSetter(t *testing.T) { return val.Map() }(), newVal: newPMap, - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { m := resource.Attributes().PutEmptyMap("pMap") m2 := m.PutEmptyMap("k2") m2.PutStr("k1", "string") @@ -303,13 +276,11 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "attributes mpa[string]interface", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -318,7 +289,7 @@ func Test_newPathGetSetter(t *testing.T) { return val.Map() }(), newVal: newMap, - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { m := resource.Attributes().PutEmptyMap("map") m2 := m.PutEmptyMap("k2") m2.PutStr("k1", "string") @@ -326,19 +297,17 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "attributes nested", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), - }, - { - Int: ottltest.Intp(0), - }, - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("slice"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), + }, + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -348,25 +317,23 @@ func Test_newPathGetSetter(t *testing.T) { return val.Str() }(), newVal: "new", - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { resource.Attributes().PutEmptySlice("slice").AppendEmpty().SetEmptyMap().PutStr("map", "new") }, }, { name: "attributes nested new values", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("new"), - }, - { - Int: ottltest.Intp(2), - }, - { - Int: ottltest.Intp(0), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("new"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(2), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), }, }, }, @@ -374,7 +341,7 @@ func Test_newPathGetSetter(t *testing.T) { return nil }(), newVal: "new", - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { s := resource.Attributes().PutEmptySlice("new") s.AppendEmpty() s.AppendEmpty() @@ -383,32 +350,31 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "dropped_attributes_count", - path: []ottl.Field{ - { - Name: "dropped_attributes_count", - }, + path: &internal.TestPath[TransformContext]{ + N: "dropped_attributes_count", }, orig: int64(10), newVal: int64(20), - modified: func(resource pcommon.Resource, cache pcommon.Map) { + modified: func(resource pcommon.Resource, _ pcommon.Map) { resource.SetDroppedAttributesCount(20) }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - accessor, err := newPathGetSetter(tt.path) + pep := pathExpressionParser{} + accessor, err := pep.parsePath(tt.path) assert.NoError(t, err) resource := createTelemetry() tCtx := NewTransformContext(resource) got, err := accessor.Get(context.Background(), tCtx) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tt.orig, got) err = accessor.Set(context.Background(), tCtx, tt.newVal) - assert.Nil(t, err) + assert.NoError(t, err) exRes := createTelemetry() exCache := pcommon.NewMap() diff --git a/pkg/ottl/contexts/ottlscope/package_test.go b/pkg/ottl/contexts/ottlscope/package_test.go new file mode 100644 index 000000000000..5ec1a8c0f88d --- /dev/null +++ b/pkg/ottl/contexts/ottlscope/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlscope + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/ottl/contexts/ottlscope/scope.go b/pkg/ottl/contexts/ottlscope/scope.go index 9c8ce9406c81..f7a9d92ee8d4 100644 --- a/pkg/ottl/contexts/ottlscope/scope.go +++ b/pkg/ottl/contexts/ottlscope/scope.go @@ -46,10 +46,10 @@ func (tCtx TransformContext) getCache() pcommon.Map { } func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...Option) (ottl.Parser[TransformContext], error) { - pathExpressionParser := pathExpressionParser{telemetrySettings} + pep := pathExpressionParser{telemetrySettings} p, err := ottl.NewParser[TransformContext]( functions, - pathExpressionParser.parsePath, + pep.parsePath, telemetrySettings, ottl.WithEnumParser[TransformContext](parseEnum), ) @@ -62,22 +62,38 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet return p, nil } -type StatementsOption func(*ottl.Statements[TransformContext]) +type StatementSequenceOption func(*ottl.StatementSequence[TransformContext]) -func WithErrorMode(errorMode ottl.ErrorMode) StatementsOption { - return func(s *ottl.Statements[TransformContext]) { - ottl.WithErrorMode[TransformContext](errorMode)(s) +func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption { + return func(s *ottl.StatementSequence[TransformContext]) { + ottl.WithStatementSequenceErrorMode[TransformContext](errorMode)(s) } } -func NewStatements(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementsOption) ottl.Statements[TransformContext] { - s := ottl.NewStatements(statements, telemetrySettings) +func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext] { + s := ottl.NewStatementSequence(statements, telemetrySettings) for _, op := range options { op(&s) } return s } +type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext]) + +func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption { + return func(c *ottl.ConditionSequence[TransformContext]) { + ottl.WithConditionSequenceErrorMode[TransformContext](errorMode)(c) + } +} + +func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext] { + c := ottl.NewConditionSequence(conditions, telemetrySettings) + for _, op := range options { + op(&c) + } + return c +} + func parseEnum(_ *ottl.EnumSymbol) (*ottl.Enum, error) { return nil, fmt.Errorf("instrumentation scope context does not provide Enum support") } @@ -86,23 +102,18 @@ type pathExpressionParser struct { telemetrySettings component.TelemetrySettings } -func (pep *pathExpressionParser) parsePath(val *ottl.Path) (ottl.GetSetter[TransformContext], error) { - if val != nil && len(val.Fields) > 0 { - return newPathGetSetter(val.Fields) +func (pep *pathExpressionParser) parsePath(path ottl.Path[TransformContext]) (ottl.GetSetter[TransformContext], error) { + if path == nil { + return nil, fmt.Errorf("path cannot be nil") } - return nil, fmt.Errorf("bad path %v", val) -} - -func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], error) { - switch path[0].Name { + switch path.Name() { case "cache": - mapKey := path[0].Keys - if mapKey == nil { + if path.Keys() == nil { return accessCache(), nil } - return accessCacheKey(mapKey), nil + return accessCacheKey(path.Keys()), nil case "resource": - return internal.ResourcePathGetSetter[TransformContext](path[1:]) + return internal.ResourcePathGetSetter[TransformContext](path.Next()) default: return internal.ScopePathGetSetter[TransformContext](path) } @@ -110,10 +121,10 @@ func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], erro func accessCache() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.getCache(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if m, ok := val.(pcommon.Map); ok { m.CopyTo(tCtx.getCache()) } @@ -122,13 +133,13 @@ func accessCache() ottl.StandardGetSetter[TransformContext] { } } -func accessCacheKey(keys []ottl.Key) ottl.StandardGetSetter[TransformContext] { +func accessCacheKey(key []ottl.Key[TransformContext]) ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { - return internal.GetMapValue(tCtx.getCache(), keys) + return internal.GetMapValue[TransformContext](ctx, tCtx, tCtx.getCache(), key) }, Setter: func(ctx context.Context, tCtx TransformContext, val any) error { - return internal.SetMapValue(tCtx.getCache(), keys, val) + return internal.SetMapValue[TransformContext](ctx, tCtx, tCtx.getCache(), key, val) }, } } diff --git a/pkg/ottl/contexts/ottlscope/scope_test.go b/pkg/ottl/contexts/ottlscope/scope_test.go index 6c799558d1f2..0e417e8c5787 100644 --- a/pkg/ottl/contexts/ottlscope/scope_test.go +++ b/pkg/ottl/contexts/ottlscope/scope_test.go @@ -11,6 +11,7 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottltest" ) @@ -34,154 +35,136 @@ func Test_newPathGetSetter(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[TransformContext] orig any newVal any modified func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) }{ { name: "cache", - path: []ottl.Field{ - { - Name: "cache", - }, + path: &internal.TestPath[TransformContext]{ + N: "cache", }, orig: pcommon.NewMap(), newVal: newCache, - modified: func(il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ pcommon.InstrumentationScope, _ pcommon.Resource, cache pcommon.Map) { newCache.CopyTo(cache) }, }, { name: "cache access", - path: []ottl.Field{ - { - Name: "cache", - Keys: []ottl.Key{ - { - String: ottltest.Strp("temp"), - }, + path: &internal.TestPath[TransformContext]{ + N: "cache", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("temp"), }, }, }, orig: nil, newVal: "new value", - modified: func(il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ pcommon.InstrumentationScope, _ pcommon.Resource, cache pcommon.Map) { cache.PutStr("temp", "new value") }, }, { name: "attributes", - path: []ottl.Field{ - { - Name: "attributes", - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", }, orig: refIS.Attributes(), newVal: newAttrs, - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(is pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { newAttrs.CopyTo(is.Attributes()) }, }, { name: "attributes string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("str"), }, }, }, orig: "val", newVal: "newVal", - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(is pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { is.Attributes().PutStr("str", "newVal") }, }, { name: "attributes bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bool"), }, }, }, orig: true, newVal: false, - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(is pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { is.Attributes().PutBool("bool", false) }, }, { name: "attributes int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("int"), }, }, }, orig: int64(10), newVal: int64(20), - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(is pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { is.Attributes().PutInt("int", 20) }, }, { name: "attributes float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("double"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("double"), }, }, }, orig: float64(1.2), newVal: float64(2.4), - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(is pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { is.Attributes().PutDouble("double", 2.4) }, }, { name: "attributes bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bytes"), }, }, }, orig: []byte{1, 3, 2}, newVal: []byte{2, 3, 4}, - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(is pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { is.Attributes().PutEmptyBytes("bytes").FromRaw([]byte{2, 3, 4}) }, }, { name: "attributes array string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_str"), }, }, }, @@ -190,19 +173,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []string{"new"}, - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(is pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { is.Attributes().PutEmptySlice("arr_str").AppendEmpty().SetStr("new") }, }, { name: "attributes array bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bool"), }, }, }, @@ -211,19 +192,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []bool{false}, - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(is pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { is.Attributes().PutEmptySlice("arr_bool").AppendEmpty().SetBool(false) }, }, { name: "attributes array int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_int"), }, }, }, @@ -232,19 +211,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []int64{20}, - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(is pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { is.Attributes().PutEmptySlice("arr_int").AppendEmpty().SetInt(20) }, }, { name: "attributes array float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_float"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_float"), }, }, }, @@ -253,19 +230,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []float64{2.0}, - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(is pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { is.Attributes().PutEmptySlice("arr_float").AppendEmpty().SetDouble(2.0) }, }, { name: "attributes array bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bytes"), }, }, }, @@ -274,19 +249,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: [][]byte{{9, 6, 4}}, - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(is pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { is.Attributes().PutEmptySlice("arr_bytes").AppendEmpty().SetEmptyBytes().FromRaw([]byte{9, 6, 4}) }, }, { name: "attributes pcommon.Map", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("pMap"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("pMap"), }, }, }, @@ -295,7 +268,7 @@ func Test_newPathGetSetter(t *testing.T) { return val.Map() }(), newVal: newPMap, - modified: func(il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(il pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { m := il.Attributes().PutEmptyMap("pMap") m2 := m.PutEmptyMap("k2") m2.PutStr("k1", "string") @@ -303,13 +276,11 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "attributes map[string]any", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -318,7 +289,7 @@ func Test_newPathGetSetter(t *testing.T) { return val.Map() }(), newVal: newMap, - modified: func(il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(il pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { m := il.Attributes().PutEmptyMap("map") m2 := m.PutEmptyMap("k2") m2.PutStr("k1", "string") @@ -326,19 +297,17 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "attributes nested", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), - }, - { - Int: ottltest.Intp(0), - }, - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("slice"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), + }, + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -348,25 +317,23 @@ func Test_newPathGetSetter(t *testing.T) { return val.Str() }(), newVal: "new", - modified: func(il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(il pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { il.Attributes().PutEmptySlice("slice").AppendEmpty().SetEmptyMap().PutStr("map", "new") }, }, { name: "attributes nested new values", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("new"), - }, - { - Int: ottltest.Intp(2), - }, - { - Int: ottltest.Intp(0), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("new"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(2), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), }, }, }, @@ -374,7 +341,7 @@ func Test_newPathGetSetter(t *testing.T) { return nil }(), newVal: "new", - modified: func(il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(il pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { s := il.Attributes().PutEmptySlice("new") s.AppendEmpty() s.AppendEmpty() @@ -383,71 +350,64 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "dropped_attributes_count", - path: []ottl.Field{ - { - Name: "dropped_attributes_count", - }, + path: &internal.TestPath[TransformContext]{ + N: "dropped_attributes_count", }, orig: int64(10), newVal: int64(20), - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(is pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { is.SetDroppedAttributesCount(20) }, }, { name: "name", - path: []ottl.Field{ - { - Name: "name", - }, + path: &internal.TestPath[TransformContext]{ + N: "name", }, orig: refIS.Name(), newVal: "newname", - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(is pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { is.SetName("newname") }, }, { name: "version", - path: []ottl.Field{ - { - Name: "version", - }, + path: &internal.TestPath[TransformContext]{ + N: "version", }, orig: refIS.Version(), newVal: "next", - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(is pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { is.SetVersion("next") }, }, { name: "resource", - path: []ottl.Field{ - { - Name: "resource", - }, + path: &internal.TestPath[TransformContext]{ + N: "resource", }, orig: refResource, newVal: pcommon.NewResource(), - modified: func(is pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ pcommon.InstrumentationScope, resource pcommon.Resource, _ pcommon.Map) { pcommon.NewResource().CopyTo(resource) }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - accessor, err := newPathGetSetter(tt.path) + pep := pathExpressionParser{} + accessor, err := pep.parsePath(tt.path) assert.NoError(t, err) il, resource := createTelemetry() tCtx := NewTransformContext(il, resource) got, err := accessor.Get(context.Background(), tCtx) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tt.orig, got) err = accessor.Set(context.Background(), tCtx, tt.newVal) - assert.Nil(t, err) + assert.NoError(t, err) exIl, exRes := createTelemetry() exCache := pcommon.NewMap() diff --git a/pkg/ottl/contexts/ottlspan/README.md b/pkg/ottl/contexts/ottlspan/README.md index 6901c6c6ac88..6caf0a94862c 100644 --- a/pkg/ottl/contexts/ottlspan/README.md +++ b/pkg/ottl/contexts/ottlspan/README.md @@ -44,7 +44,6 @@ The following paths are supported. | end_time_unix_nano | the end time in unix nano of the span | int64 | | start_time | the start time in `time.Time` of the span | `time.Time` | | end_time | the end time in `time.Time` of the span | `time.Time` | -| | dropped_attributes_count | the dropped attributes count of the span | int64 | | events | the events of the span | ptrace.SpanEventSlice | | dropped_events_count | the dropped events count of the span | int64 | diff --git a/pkg/ottl/contexts/ottlspan/package_test.go b/pkg/ottl/contexts/ottlspan/package_test.go new file mode 100644 index 000000000000..e714460125f7 --- /dev/null +++ b/pkg/ottl/contexts/ottlspan/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlspan + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/ottl/contexts/ottlspan/span.go b/pkg/ottl/contexts/ottlspan/span.go index 34f3d2bcf599..a680fd68a96a 100644 --- a/pkg/ottl/contexts/ottlspan/span.go +++ b/pkg/ottl/contexts/ottlspan/span.go @@ -53,10 +53,10 @@ func (tCtx TransformContext) getCache() pcommon.Map { } func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...Option) (ottl.Parser[TransformContext], error) { - pathExpressionParser := pathExpressionParser{telemetrySettings} + pep := pathExpressionParser{telemetrySettings} p, err := ottl.NewParser[TransformContext]( functions, - pathExpressionParser.parsePath, + pep.parsePath, telemetrySettings, ottl.WithEnumParser[TransformContext](parseEnum), ) @@ -69,22 +69,38 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet return p, nil } -type StatementsOption func(*ottl.Statements[TransformContext]) +type StatementSequenceOption func(*ottl.StatementSequence[TransformContext]) -func WithErrorMode(errorMode ottl.ErrorMode) StatementsOption { - return func(s *ottl.Statements[TransformContext]) { - ottl.WithErrorMode[TransformContext](errorMode)(s) +func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption { + return func(s *ottl.StatementSequence[TransformContext]) { + ottl.WithStatementSequenceErrorMode[TransformContext](errorMode)(s) } } -func NewStatements(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementsOption) ottl.Statements[TransformContext] { - s := ottl.NewStatements(statements, telemetrySettings) +func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext] { + s := ottl.NewStatementSequence(statements, telemetrySettings) for _, op := range options { op(&s) } return s } +type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext]) + +func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption { + return func(c *ottl.ConditionSequence[TransformContext]) { + ottl.WithConditionSequenceErrorMode[TransformContext](errorMode)(c) + } +} + +func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext] { + c := ottl.NewConditionSequence(conditions, telemetrySettings) + for _, op := range options { + op(&c) + } + return c +} + func parseEnum(val *ottl.EnumSymbol) (*ottl.Enum, error) { if val != nil { if enum, ok := internal.SpanSymbolTable[*val]; ok { @@ -99,25 +115,20 @@ type pathExpressionParser struct { telemetrySettings component.TelemetrySettings } -func (pep *pathExpressionParser) parsePath(val *ottl.Path) (ottl.GetSetter[TransformContext], error) { - if val != nil && len(val.Fields) > 0 { - return newPathGetSetter(val.Fields) +func (pep *pathExpressionParser) parsePath(path ottl.Path[TransformContext]) (ottl.GetSetter[TransformContext], error) { + if path == nil { + return nil, fmt.Errorf("path cannot be nil") } - return nil, fmt.Errorf("bad path %v", val) -} - -func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], error) { - switch path[0].Name { + switch path.Name() { case "cache": - mapKey := path[0].Keys - if mapKey == nil { + if path.Keys() == nil { return accessCache(), nil } - return accessCacheKey(mapKey), nil + return accessCacheKey(path.Keys()), nil case "resource": - return internal.ResourcePathGetSetter[TransformContext](path[1:]) + return internal.ResourcePathGetSetter[TransformContext](path.Next()) case "instrumentation_scope": - return internal.ScopePathGetSetter[TransformContext](path[1:]) + return internal.ScopePathGetSetter[TransformContext](path.Next()) default: return internal.SpanPathGetSetter[TransformContext](path) } @@ -125,10 +136,10 @@ func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], erro func accessCache() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.getCache(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if m, ok := val.(pcommon.Map); ok { m.CopyTo(tCtx.getCache()) } @@ -137,13 +148,13 @@ func accessCache() ottl.StandardGetSetter[TransformContext] { } } -func accessCacheKey(keys []ottl.Key) ottl.StandardGetSetter[TransformContext] { +func accessCacheKey(key []ottl.Key[TransformContext]) ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { - return internal.GetMapValue(tCtx.getCache(), keys) + return internal.GetMapValue[TransformContext](ctx, tCtx, tCtx.getCache(), key) }, Setter: func(ctx context.Context, tCtx TransformContext, val any) error { - return internal.SetMapValue(tCtx.getCache(), keys, val) + return internal.SetMapValue[TransformContext](ctx, tCtx, tCtx.getCache(), key, val) }, } } diff --git a/pkg/ottl/contexts/ottlspan/span_test.go b/pkg/ottl/contexts/ottlspan/span_test.go index 0a195fff813d..c02ae40ae613 100644 --- a/pkg/ottl/contexts/ottlspan/span_test.go +++ b/pkg/ottl/contexts/ottlspan/span_test.go @@ -14,6 +14,7 @@ import ( "go.opentelemetry.io/collector/pdata/ptrace" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottltest" ) @@ -53,366 +54,325 @@ func Test_newPathGetSetter(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[TransformContext] orig any newVal any modified func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) }{ { name: "cache", - path: []ottl.Field{ - { - Name: "cache", - }, + path: &internal.TestPath[TransformContext]{ + N: "cache", }, orig: pcommon.NewMap(), newVal: newCache, - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, cache pcommon.Map) { newCache.CopyTo(cache) }, }, { name: "cache access", - path: []ottl.Field{ - { - Name: "cache", - Keys: []ottl.Key{ - { - String: ottltest.Strp("temp"), - }, + path: &internal.TestPath[TransformContext]{ + N: "cache", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("temp"), }, }, }, orig: nil, newVal: "new value", - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, cache pcommon.Map) { cache.PutStr("temp", "new value") }, }, { name: "trace_id", - path: []ottl.Field{ - { - Name: "trace_id", - }, + path: &internal.TestPath[TransformContext]{ + N: "trace_id", }, orig: pcommon.TraceID(traceID), newVal: pcommon.TraceID(traceID2), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetTraceID(traceID2) }, }, { name: "span_id", - path: []ottl.Field{ - { - Name: "span_id", - }, + path: &internal.TestPath[TransformContext]{ + N: "span_id", }, orig: pcommon.SpanID(spanID), newVal: pcommon.SpanID(spanID2), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetSpanID(spanID2) }, }, { name: "trace_id string", - path: []ottl.Field{ - { - Name: "trace_id", - }, - { - Name: "string", + path: &internal.TestPath[TransformContext]{ + N: "trace_id", + NextPath: &internal.TestPath[TransformContext]{ + N: "string", }, }, orig: hex.EncodeToString(traceID[:]), newVal: hex.EncodeToString(traceID2[:]), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetTraceID(traceID2) }, }, { name: "span_id string", - path: []ottl.Field{ - { - Name: "span_id", - }, - { - Name: "string", + path: &internal.TestPath[TransformContext]{ + N: "span_id", + NextPath: &internal.TestPath[TransformContext]{ + N: "string", }, }, orig: hex.EncodeToString(spanID[:]), newVal: hex.EncodeToString(spanID2[:]), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetSpanID(spanID2) }, }, { name: "trace_state", - path: []ottl.Field{ - { - Name: "trace_state", - }, + path: &internal.TestPath[TransformContext]{ + N: "trace_state", }, orig: "key1=val1,key2=val2", newVal: "key=newVal", - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.TraceState().FromRaw("key=newVal") }, }, { name: "trace_state key", - path: []ottl.Field{ - { - Name: "trace_state", - Keys: []ottl.Key{ - { - String: ottltest.Strp("key1"), - }, + path: &internal.TestPath[TransformContext]{ + N: "trace_state", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("key1"), }, }, }, orig: "val1", newVal: "newVal", - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.TraceState().FromRaw("key1=newVal,key2=val2") }, }, { name: "parent_span_id", - path: []ottl.Field{ - { - Name: "parent_span_id", - }, + path: &internal.TestPath[TransformContext]{ + N: "parent_span_id", }, orig: pcommon.SpanID(spanID2), newVal: pcommon.SpanID(spanID), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetParentSpanID(spanID) }, }, { name: "name", - path: []ottl.Field{ - { - Name: "name", - }, + path: &internal.TestPath[TransformContext]{ + N: "name", }, orig: "bear", newVal: "cat", - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetName("cat") }, }, { name: "kind", - path: []ottl.Field{ - { - Name: "kind", - }, + path: &internal.TestPath[TransformContext]{ + N: "kind", }, orig: int64(2), newVal: int64(3), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetKind(ptrace.SpanKindClient) }, }, { name: "string kind", - path: []ottl.Field{ - { - Name: "kind", - }, - { - Name: "string", + path: &internal.TestPath[TransformContext]{ + N: "kind", + NextPath: &internal.TestPath[TransformContext]{ + N: "string", }, }, orig: "Server", newVal: "Client", - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetKind(ptrace.SpanKindClient) }, }, { name: "deprecated string kind", - path: []ottl.Field{ - { - Name: "kind", - }, - { - Name: "deprecated_string", + path: &internal.TestPath[TransformContext]{ + N: "kind", + NextPath: &internal.TestPath[TransformContext]{ + N: "deprecated_string", }, }, orig: "SPAN_KIND_SERVER", newVal: "SPAN_KIND_CLIENT", - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetKind(ptrace.SpanKindClient) }, }, { name: "start_time_unix_nano", - path: []ottl.Field{ - { - Name: "start_time_unix_nano", - }, + path: &internal.TestPath[TransformContext]{ + N: "start_time_unix_nano", }, orig: int64(100_000_000), newVal: int64(200_000_000), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(200))) }, }, { name: "end_time_unix_nano", - path: []ottl.Field{ - { - Name: "end_time_unix_nano", - }, + path: &internal.TestPath[TransformContext]{ + N: "end_time_unix_nano", }, orig: int64(500_000_000), newVal: int64(200_000_000), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(200))) }, }, { name: "start_time", - path: []ottl.Field{ - { - Name: "start_time", - }, + path: &internal.TestPath[TransformContext]{ + N: "start_time", }, orig: time.Date(1970, 1, 1, 0, 0, 0, 100000000, time.UTC), newVal: time.Date(1970, 1, 1, 0, 0, 0, 200000000, time.UTC), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(200))) }, }, { name: "end_time", - path: []ottl.Field{ - { - Name: "end_time", - }, + path: &internal.TestPath[TransformContext]{ + N: "end_time", }, orig: time.Date(1970, 1, 1, 0, 0, 0, 500000000, time.UTC), newVal: time.Date(1970, 1, 1, 0, 0, 0, 200000000, time.UTC), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(200))) }, }, { name: "attributes", - path: []ottl.Field{ - { - Name: "attributes", - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", }, orig: refSpan.Attributes(), newVal: newAttrs, - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { newAttrs.CopyTo(span.Attributes()) }, }, { name: "attributes string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("str"), }, }, }, orig: "val", newVal: "newVal", - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Attributes().PutStr("str", "newVal") }, }, { name: "attributes bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bool"), }, }, }, orig: true, newVal: false, - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Attributes().PutBool("bool", false) }, }, { name: "attributes int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + + S: ottltest.Strp("int"), }, }, }, orig: int64(10), newVal: int64(20), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Attributes().PutInt("int", 20) }, }, { name: "attributes float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("double"), - }, + path: &internal.TestPath[TransformContext]{ + + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + + S: ottltest.Strp("double"), }, }, }, orig: float64(1.2), newVal: float64(2.4), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Attributes().PutDouble("double", 2.4) }, }, { name: "attributes bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bytes"), - }, + path: &internal.TestPath[TransformContext]{ + + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + + S: ottltest.Strp("bytes"), }, }, }, orig: []byte{1, 3, 2}, newVal: []byte{2, 3, 4}, - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Attributes().PutEmptyBytes("bytes").FromRaw([]byte{2, 3, 4}) }, }, { name: "attributes array string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_str"), - }, + path: &internal.TestPath[TransformContext]{ + + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + + S: ottltest.Strp("arr_str"), }, }, }, @@ -421,19 +381,19 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []string{"new"}, - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Attributes().PutEmptySlice("arr_str").AppendEmpty().SetStr("new") }, }, { name: "attributes array bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bool"), - }, + path: &internal.TestPath[TransformContext]{ + + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + + S: ottltest.Strp("arr_bool"), }, }, }, @@ -442,19 +402,19 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []bool{false}, - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Attributes().PutEmptySlice("arr_bool").AppendEmpty().SetBool(false) }, }, { name: "attributes array int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_int"), - }, + path: &internal.TestPath[TransformContext]{ + + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + + S: ottltest.Strp("arr_int"), }, }, }, @@ -463,19 +423,19 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []int64{20}, - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Attributes().PutEmptySlice("arr_int").AppendEmpty().SetInt(20) }, }, { name: "attributes array float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_float"), - }, + path: &internal.TestPath[TransformContext]{ + + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + + S: ottltest.Strp("arr_float"), }, }, }, @@ -484,19 +444,19 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []float64{2.0}, - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Attributes().PutEmptySlice("arr_float").AppendEmpty().SetDouble(2.0) }, }, { name: "attributes array bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bytes"), - }, + path: &internal.TestPath[TransformContext]{ + + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + + S: ottltest.Strp("arr_bytes"), }, }, }, @@ -505,19 +465,19 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: [][]byte{{9, 6, 4}}, - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Attributes().PutEmptySlice("arr_bytes").AppendEmpty().SetEmptyBytes().FromRaw([]byte{9, 6, 4}) }, }, { name: "attributes pcommon.Map", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("pMap"), - }, + path: &internal.TestPath[TransformContext]{ + + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + + S: ottltest.Strp("pMap"), }, }, }, @@ -526,7 +486,7 @@ func Test_newPathGetSetter(t *testing.T) { return val.Map() }(), newVal: newPMap, - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { m := span.Attributes().PutEmptyMap("pMap") m2 := m.PutEmptyMap("k2") m2.PutStr("k1", "string") @@ -534,13 +494,13 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "attributes map[string]any", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + + S: ottltest.Strp("map"), }, }, }, @@ -549,7 +509,7 @@ func Test_newPathGetSetter(t *testing.T) { return val.Map() }(), newVal: newMap, - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { m := span.Attributes().PutEmptyMap("map") m2 := m.PutEmptyMap("k2") m2.PutStr("k1", "string") @@ -557,19 +517,17 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "attributes nested", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), - }, - { - Int: ottltest.Intp(0), - }, - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("slice"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), + }, + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -579,25 +537,23 @@ func Test_newPathGetSetter(t *testing.T) { return val.Str() }(), newVal: "new", - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Attributes().PutEmptySlice("slice").AppendEmpty().SetEmptyMap().PutStr("map", "new") }, }, { name: "attributes nested new values", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("new"), - }, - { - Int: ottltest.Intp(2), - }, - { - Int: ottltest.Intp(0), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("new"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(2), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), }, }, }, @@ -605,7 +561,7 @@ func Test_newPathGetSetter(t *testing.T) { return nil }(), newVal: "new", - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { s := span.Attributes().PutEmptySlice("new") s.AppendEmpty() s.AppendEmpty() @@ -614,27 +570,23 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "dropped_attributes_count", - path: []ottl.Field{ - { - Name: "dropped_attributes_count", - }, + path: &internal.TestPath[TransformContext]{ + N: "dropped_attributes_count", }, orig: int64(10), newVal: int64(20), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetDroppedAttributesCount(20) }, }, { name: "events", - path: []ottl.Field{ - { - Name: "events", - }, + path: &internal.TestPath[TransformContext]{ + N: "events", }, orig: refSpan.Events(), newVal: newEvents, - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Events().RemoveIf(func(_ ptrace.SpanEvent) bool { return true }) @@ -643,27 +595,23 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "dropped_events_count", - path: []ottl.Field{ - { - Name: "dropped_events_count", - }, + path: &internal.TestPath[TransformContext]{ + N: "dropped_events_count", }, orig: int64(20), newVal: int64(30), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetDroppedEventsCount(30) }, }, { name: "links", - path: []ottl.Field{ - { - Name: "links", - }, + path: &internal.TestPath[TransformContext]{ + N: "links", }, orig: refSpan.Links(), newVal: newLinks, - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Links().RemoveIf(func(_ ptrace.SpanLink) bool { return true }) @@ -672,118 +620,81 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "dropped_links_count", - path: []ottl.Field{ - { - Name: "dropped_links_count", - }, + path: &internal.TestPath[TransformContext]{ + N: "dropped_links_count", }, orig: int64(30), newVal: int64(40), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.SetDroppedLinksCount(40) }, }, { name: "status", - path: []ottl.Field{ - { - Name: "status", - }, + path: &internal.TestPath[TransformContext]{ + N: "status", }, orig: refSpan.Status(), newVal: newStatus, - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { newStatus.CopyTo(span.Status()) }, }, { name: "status code", - path: []ottl.Field{ - { - Name: "status", - }, - { - Name: "code", + path: &internal.TestPath[TransformContext]{ + N: "status", + NextPath: &internal.TestPath[TransformContext]{ + N: "code", }, }, orig: int64(ptrace.StatusCodeOk), newVal: int64(ptrace.StatusCodeError), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Status().SetCode(ptrace.StatusCodeError) }, }, { name: "status message", - path: []ottl.Field{ - { - Name: "status", - }, - { - Name: "message", + path: &internal.TestPath[TransformContext]{ + N: "status", + NextPath: &internal.TestPath[TransformContext]{ + N: "message", }, }, orig: "good span", newVal: "bad span", - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { span.Status().SetMessage("bad span") }, }, { name: "instrumentation_scope", - path: []ottl.Field{ - { - Name: "instrumentation_scope", - }, + path: &internal.TestPath[TransformContext]{ + N: "instrumentation_scope", }, orig: refIS, newVal: pcommon.NewInstrumentationScope(), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ ptrace.Span, il pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { pcommon.NewInstrumentationScope().CopyTo(il) }, }, { name: "resource", - path: []ottl.Field{ - { - Name: "resource", - }, + path: &internal.TestPath[TransformContext]{ + N: "resource", }, orig: refResource, newVal: pcommon.NewResource(), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ ptrace.Span, _ pcommon.InstrumentationScope, resource pcommon.Resource, _ pcommon.Map) { pcommon.NewResource().CopyTo(resource) }, }, - { - name: "start_time", - path: []ottl.Field{ - { - Name: "start_time", - }, - }, - orig: time.Date(1970, 1, 1, 0, 0, 0, 100000000, time.UTC), - newVal: time.Date(1970, 1, 1, 0, 0, 0, 200000000, time.UTC), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { - span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(200))) - }, - }, - { - name: "end_time", - path: []ottl.Field{ - { - Name: "end_time", - }, - }, - orig: time.Date(1970, 1, 1, 0, 0, 0, 500000000, time.UTC), - newVal: time.Date(1970, 1, 1, 0, 0, 0, 200000000, time.UTC), - modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { - span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(200))) - }, - }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - accessor, err := newPathGetSetter(tt.path) + pep := pathExpressionParser{} + accessor, err := pep.parsePath(tt.path) assert.NoError(t, err) span, il, resource := createTelemetry() @@ -791,11 +702,11 @@ func Test_newPathGetSetter(t *testing.T) { tCtx := NewTransformContext(span, il, resource) got, err := accessor.Get(context.Background(), tCtx) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, tt.orig, got) err = accessor.Set(context.Background(), tCtx, tt.newVal) - assert.Nil(t, err) + assert.NoError(t, err) exSpan, exIl, exRes := createTelemetry() exCache := pcommon.NewMap() diff --git a/pkg/ottl/contexts/ottlspanevent/package_test.go b/pkg/ottl/contexts/ottlspanevent/package_test.go new file mode 100644 index 000000000000..38b88e30109b --- /dev/null +++ b/pkg/ottl/contexts/ottlspanevent/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlspanevent + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/ottl/contexts/ottlspanevent/span_events.go b/pkg/ottl/contexts/ottlspanevent/span_events.go index 70014a486560..baf2aadcb475 100644 --- a/pkg/ottl/contexts/ottlspanevent/span_events.go +++ b/pkg/ottl/contexts/ottlspanevent/span_events.go @@ -61,10 +61,10 @@ func (tCtx TransformContext) getCache() pcommon.Map { } func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...Option) (ottl.Parser[TransformContext], error) { - pathExpressionParser := pathExpressionParser{telemetrySettings} + pep := pathExpressionParser{telemetrySettings} p, err := ottl.NewParser[TransformContext]( functions, - pathExpressionParser.parsePath, + pep.parsePath, telemetrySettings, ottl.WithEnumParser[TransformContext](parseEnum), ) @@ -77,22 +77,38 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet return p, nil } -type StatementsOption func(*ottl.Statements[TransformContext]) +type StatementSequenceOption func(*ottl.StatementSequence[TransformContext]) -func WithErrorMode(errorMode ottl.ErrorMode) StatementsOption { - return func(s *ottl.Statements[TransformContext]) { - ottl.WithErrorMode[TransformContext](errorMode)(s) +func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption { + return func(s *ottl.StatementSequence[TransformContext]) { + ottl.WithStatementSequenceErrorMode[TransformContext](errorMode)(s) } } -func NewStatements(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementsOption) ottl.Statements[TransformContext] { - s := ottl.NewStatements(statements, telemetrySettings) +func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext] { + s := ottl.NewStatementSequence(statements, telemetrySettings) for _, op := range options { op(&s) } return s } +type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext]) + +func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption { + return func(c *ottl.ConditionSequence[TransformContext]) { + ottl.WithConditionSequenceErrorMode[TransformContext](errorMode)(c) + } +} + +func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext] { + c := ottl.NewConditionSequence(conditions, telemetrySettings) + for _, op := range options { + op(&c) + } + return c +} + func parseEnum(val *ottl.EnumSymbol) (*ottl.Enum, error) { if val != nil { if enum, ok := internal.SpanSymbolTable[*val]; ok { @@ -107,27 +123,22 @@ type pathExpressionParser struct { telemetrySettings component.TelemetrySettings } -func (pep *pathExpressionParser) parsePath(val *ottl.Path) (ottl.GetSetter[TransformContext], error) { - if val != nil && len(val.Fields) > 0 { - return newPathGetSetter(val.Fields) +func (pep *pathExpressionParser) parsePath(path ottl.Path[TransformContext]) (ottl.GetSetter[TransformContext], error) { + if path == nil { + return nil, fmt.Errorf("path cannot be nil") } - return nil, fmt.Errorf("bad path %v", val) -} - -func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], error) { - switch path[0].Name { + switch path.Name() { case "cache": - mapKey := path[0].Keys - if mapKey == nil { + if path.Keys() == nil { return accessCache(), nil } - return accessCacheKey(mapKey), nil + return accessCacheKey(path.Keys()), nil case "resource": - return internal.ResourcePathGetSetter[TransformContext](path[1:]) + return internal.ResourcePathGetSetter[TransformContext](path.Next()) case "instrumentation_scope": - return internal.ScopePathGetSetter[TransformContext](path[1:]) + return internal.ScopePathGetSetter[TransformContext](path.Next()) case "span": - return internal.SpanPathGetSetter[TransformContext](path[1:]) + return internal.SpanPathGetSetter[TransformContext](path.Next()) case "time_unix_nano": return accessSpanEventTimeUnixNano(), nil case "time": @@ -135,24 +146,23 @@ func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], erro case "name": return accessSpanEventName(), nil case "attributes": - mapKey := path[0].Keys - if mapKey == nil { + if path.Keys() == nil { return accessSpanEventAttributes(), nil } - return accessSpanEventAttributesKey(mapKey), nil + return accessSpanEventAttributesKey(path.Keys()), nil case "dropped_attributes_count": return accessSpanEventDroppedAttributeCount(), nil + default: + return nil, internal.FormatDefaultErrorMessage(path.Name(), path.String(), "Span Event", internal.SpanEventRef) } - return nil, fmt.Errorf("invalid scope path expression %v", path) } - func accessCache() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.getCache(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if m, ok := val.(pcommon.Map); ok { m.CopyTo(tCtx.getCache()) } @@ -161,23 +171,23 @@ func accessCache() ottl.StandardGetSetter[TransformContext] { } } -func accessCacheKey(keys []ottl.Key) ottl.StandardGetSetter[TransformContext] { +func accessCacheKey(key []ottl.Key[TransformContext]) ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { - return internal.GetMapValue(tCtx.getCache(), keys) + return internal.GetMapValue[TransformContext](ctx, tCtx, tCtx.getCache(), key) }, Setter: func(ctx context.Context, tCtx TransformContext, val any) error { - return internal.SetMapValue(tCtx.getCache(), keys, val) + return internal.SetMapValue[TransformContext](ctx, tCtx, tCtx.getCache(), key, val) }, } } func accessSpanEventTimeUnixNano() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.GetSpanEvent().Timestamp().AsTime().UnixNano(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newTimestamp, ok := val.(int64); ok { tCtx.GetSpanEvent().SetTimestamp(pcommon.NewTimestampFromTime(time.Unix(0, newTimestamp))) } @@ -188,10 +198,10 @@ func accessSpanEventTimeUnixNano() ottl.StandardGetSetter[TransformContext] { func accessSpanEventTime() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.GetSpanEvent().Timestamp().AsTime(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newTimestamp, ok := val.(time.Time); ok { tCtx.GetSpanEvent().SetTimestamp(pcommon.NewTimestampFromTime(newTimestamp)) } @@ -202,10 +212,10 @@ func accessSpanEventTime() ottl.StandardGetSetter[TransformContext] { func accessSpanEventName() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.GetSpanEvent().Name(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newName, ok := val.(string); ok { tCtx.GetSpanEvent().SetName(newName) } @@ -216,10 +226,10 @@ func accessSpanEventName() ottl.StandardGetSetter[TransformContext] { func accessSpanEventAttributes() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return tCtx.GetSpanEvent().Attributes(), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if attrs, ok := val.(pcommon.Map); ok { attrs.CopyTo(tCtx.GetSpanEvent().Attributes()) } @@ -228,23 +238,23 @@ func accessSpanEventAttributes() ottl.StandardGetSetter[TransformContext] { } } -func accessSpanEventAttributesKey(keys []ottl.Key) ottl.StandardGetSetter[TransformContext] { +func accessSpanEventAttributesKey(key []ottl.Key[TransformContext]) ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { - return internal.GetMapValue(tCtx.GetSpanEvent().Attributes(), keys) + return internal.GetMapValue[TransformContext](ctx, tCtx, tCtx.GetSpanEvent().Attributes(), key) }, Setter: func(ctx context.Context, tCtx TransformContext, val any) error { - return internal.SetMapValue(tCtx.GetSpanEvent().Attributes(), keys, val) + return internal.SetMapValue[TransformContext](ctx, tCtx, tCtx.GetSpanEvent().Attributes(), key, val) }, } } func accessSpanEventDroppedAttributeCount() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ - Getter: func(ctx context.Context, tCtx TransformContext) (any, error) { + Getter: func(_ context.Context, tCtx TransformContext) (any, error) { return int64(tCtx.GetSpanEvent().DroppedAttributesCount()), nil }, - Setter: func(ctx context.Context, tCtx TransformContext, val any) error { + Setter: func(_ context.Context, tCtx TransformContext, val any) error { if newCount, ok := val.(int64); ok { tCtx.GetSpanEvent().SetDroppedAttributesCount(uint32(newCount)) } diff --git a/pkg/ottl/contexts/ottlspanevent/span_events_test.go b/pkg/ottl/contexts/ottlspanevent/span_events_test.go index 1cb71ad73108..0464b36e9aee 100644 --- a/pkg/ottl/contexts/ottlspanevent/span_events_test.go +++ b/pkg/ottl/contexts/ottlspanevent/span_events_test.go @@ -13,6 +13,7 @@ import ( "go.opentelemetry.io/collector/pdata/ptrace" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottltest" ) @@ -49,193 +50,169 @@ func Test_newPathGetSetter(t *testing.T) { tests := []struct { name string - path []ottl.Field + path ottl.Path[TransformContext] orig any newVal any modified func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) }{ { name: "span event time", - path: []ottl.Field{ - { - Name: "time", - }, + path: &internal.TestPath[TransformContext]{ + N: "time", }, orig: time.Date(1970, 1, 1, 0, 0, 0, 100000000, time.UTC), newVal: time.Date(1970, 1, 1, 0, 0, 0, 200000000, time.UTC), - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.SetTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(200))) }, }, { name: "cache", - path: []ottl.Field{ - { - Name: "cache", - }, + path: &internal.TestPath[TransformContext]{ + N: "cache", }, orig: pcommon.NewMap(), newVal: newCache, - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, cache pcommon.Map) { newCache.CopyTo(cache) }, }, { name: "cache access", - path: []ottl.Field{ - { - Name: "cache", - Keys: []ottl.Key{ - { - String: ottltest.Strp("temp"), - }, + path: &internal.TestPath[TransformContext]{ + N: "cache", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("temp"), }, }, }, orig: nil, newVal: "new value", - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, cache pcommon.Map) { cache.PutStr("temp", "new value") }, }, { name: "name", - path: []ottl.Field{ - { - Name: "name", - }, + path: &internal.TestPath[TransformContext]{ + N: "name", }, orig: "bear", newVal: "cat", - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.SetName("cat") }, }, { name: "time_unix_nano", - path: []ottl.Field{ - { - Name: "time_unix_nano", - }, + path: &internal.TestPath[TransformContext]{ + N: "time_unix_nano", }, orig: int64(100_000_000), newVal: int64(200_000_000), - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.SetTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(200))) }, }, { name: "attributes", - path: []ottl.Field{ - { - Name: "attributes", - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", }, orig: refSpanEvent.Attributes(), newVal: newAttrs, - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { newAttrs.CopyTo(spanEvent.Attributes()) }, }, { name: "attributes string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("str"), }, }, }, orig: "val", newVal: "newVal", - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.Attributes().PutStr("str", "newVal") }, }, { name: "attributes bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bool"), }, }, }, orig: true, newVal: false, - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.Attributes().PutBool("bool", false) }, }, { name: "attributes int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("int"), }, }, }, orig: int64(10), newVal: int64(20), - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.Attributes().PutInt("int", 20) }, }, { name: "attributes float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("double"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("double"), }, }, }, orig: float64(1.2), newVal: float64(2.4), - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.Attributes().PutDouble("double", 2.4) }, }, { name: "attributes bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("bytes"), }, }, }, orig: []byte{1, 3, 2}, newVal: []byte{2, 3, 4}, - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.Attributes().PutEmptyBytes("bytes").FromRaw([]byte{2, 3, 4}) }, }, { name: "attributes array string", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_str"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_str"), }, }, }, @@ -244,19 +221,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []string{"new"}, - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.Attributes().PutEmptySlice("arr_str").AppendEmpty().SetStr("new") }, }, { name: "attributes array bool", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bool"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bool"), }, }, }, @@ -265,19 +240,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []bool{false}, - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.Attributes().PutEmptySlice("arr_bool").AppendEmpty().SetBool(false) }, }, { name: "attributes array int", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_int"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_int"), }, }, }, @@ -286,19 +259,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []int64{20}, - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.Attributes().PutEmptySlice("arr_int").AppendEmpty().SetInt(20) }, }, { name: "attributes array float", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_float"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_float"), }, }, }, @@ -307,19 +278,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: []float64{2.0}, - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.Attributes().PutEmptySlice("arr_float").AppendEmpty().SetDouble(2.0) }, }, { name: "attributes array bytes", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("arr_bytes"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("arr_bytes"), }, }, }, @@ -328,19 +297,17 @@ func Test_newPathGetSetter(t *testing.T) { return val.Slice() }(), newVal: [][]byte{{9, 6, 4}}, - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.Attributes().PutEmptySlice("arr_bytes").AppendEmpty().SetEmptyBytes().FromRaw([]byte{9, 6, 4}) }, }, { name: "attributes pcommon.Map", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("pMap"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("pMap"), }, }, }, @@ -349,7 +316,7 @@ func Test_newPathGetSetter(t *testing.T) { return val.Map() }(), newVal: newPMap, - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { m := spanEvent.Attributes().PutEmptyMap("pMap") m2 := m.PutEmptyMap("k2") m2.PutStr("k1", "string") @@ -357,13 +324,11 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "attributes map[string]any", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -372,7 +337,7 @@ func Test_newPathGetSetter(t *testing.T) { return val.Map() }(), newVal: newMap, - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { m := spanEvent.Attributes().PutEmptyMap("map") m2 := m.PutEmptyMap("k2") m2.PutStr("k1", "string") @@ -380,19 +345,17 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "attributes nested", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("slice"), - }, - { - Int: ottltest.Intp(0), - }, - { - String: ottltest.Strp("map"), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("slice"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), + }, + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("map"), }, }, }, @@ -402,25 +365,23 @@ func Test_newPathGetSetter(t *testing.T) { return val.Str() }(), newVal: "new", - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.Attributes().PutEmptySlice("slice").AppendEmpty().SetEmptyMap().PutStr("map", "new") }, }, { name: "attributes nested new values", - path: []ottl.Field{ - { - Name: "attributes", - Keys: []ottl.Key{ - { - String: ottltest.Strp("new"), - }, - { - Int: ottltest.Intp(2), - }, - { - Int: ottltest.Intp(0), - }, + path: &internal.TestPath[TransformContext]{ + N: "attributes", + KeySlice: []ottl.Key[TransformContext]{ + &internal.TestKey[TransformContext]{ + S: ottltest.Strp("new"), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(2), + }, + &internal.TestKey[TransformContext]{ + I: ottltest.Intp(0), }, }, }, @@ -428,7 +389,7 @@ func Test_newPathGetSetter(t *testing.T) { return nil }(), newVal: "new", - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { s := spanEvent.Attributes().PutEmptySlice("new") s.AppendEmpty() s.AppendEmpty() @@ -437,60 +398,53 @@ func Test_newPathGetSetter(t *testing.T) { }, { name: "dropped_attributes_count", - path: []ottl.Field{ - { - Name: "dropped_attributes_count", - }, + path: &internal.TestPath[TransformContext]{ + N: "dropped_attributes_count", }, orig: int64(10), newVal: int64(20), - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(spanEvent ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { spanEvent.SetDroppedAttributesCount(20) }, }, { name: "instrumentation_scope", - path: []ottl.Field{ - { - Name: "instrumentation_scope", - }, + path: &internal.TestPath[TransformContext]{ + N: "instrumentation_scope", }, orig: refIS, newVal: pcommon.NewInstrumentationScope(), - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ ptrace.SpanEvent, _ ptrace.Span, il pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { pcommon.NewInstrumentationScope().CopyTo(il) }, }, { name: "resource", - path: []ottl.Field{ - { - Name: "resource", - }, + path: &internal.TestPath[TransformContext]{ + N: "resource", }, orig: refResource, newVal: pcommon.NewResource(), - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ ptrace.SpanEvent, _ ptrace.Span, _ pcommon.InstrumentationScope, resource pcommon.Resource, _ pcommon.Map) { pcommon.NewResource().CopyTo(resource) }, }, { name: "span", - path: []ottl.Field{ - { - Name: "span", - }, + path: &internal.TestPath[TransformContext]{ + N: "span", }, orig: refSpan, newVal: ptrace.NewSpan(), - modified: func(spanEvent ptrace.SpanEvent, span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource, cache pcommon.Map) { + modified: func(_ ptrace.SpanEvent, span ptrace.Span, _ pcommon.InstrumentationScope, _ pcommon.Resource, _ pcommon.Map) { ptrace.NewSpan().CopyTo(span) }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - accessor, err := newPathGetSetter(tt.path) + pep := pathExpressionParser{} + accessor, err := pep.parsePath(tt.path) assert.NoError(t, err) spanEvent, span, il, resource := createTelemetry() diff --git a/pkg/ottl/e2e/e2e_test.go b/pkg/ottl/e2e/e2e_test.go new file mode 100644 index 000000000000..902145bcabdd --- /dev/null +++ b/pkg/ottl/e2e/e2e_test.go @@ -0,0 +1,801 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package e2e + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottllog" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest/plogtest" +) + +var ( + TestLogTime = time.Date(2020, 2, 11, 20, 26, 12, 321, time.UTC) + TestLogTimestamp = pcommon.NewTimestampFromTime(TestLogTime) + + TestObservedTime = time.Date(2020, 2, 11, 20, 26, 13, 789, time.UTC) + TestObservedTimestamp = pcommon.NewTimestampFromTime(TestObservedTime) + + traceID = [16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16} + spanID = [8]byte{1, 2, 3, 4, 5, 6, 7, 8} +) + +func Test_e2e_editors(t *testing.T) { + tests := []struct { + statement string + want func(tCtx ottllog.TransformContext) + }{ + { + statement: `delete_key(attributes, "http.method")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().Remove("http.method") + }, + }, + { + statement: `delete_matching_keys(attributes, "^http")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().Remove("http.method") + tCtx.GetLogRecord().Attributes().Remove("http.path") + tCtx.GetLogRecord().Attributes().Remove("http.url") + }, + }, + { + statement: `flatten(attributes)`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().Remove("foo") + tCtx.GetLogRecord().Attributes().PutStr("foo.bar", "pass") + tCtx.GetLogRecord().Attributes().PutStr("foo.flags", "pass") + tCtx.GetLogRecord().Attributes().PutStr("foo.slice.0", "val") + tCtx.GetLogRecord().Attributes().PutStr("foo.nested.test", "pass") + }, + }, + { + statement: `flatten(attributes, "test")`, + want: func(tCtx ottllog.TransformContext) { + m := pcommon.NewMap() + m.PutStr("test.http.method", "get") + m.PutStr("test.http.path", "/health") + m.PutStr("test.http.url", "http://localhost/health") + m.PutStr("test.flags", "A|B|C") + m.PutStr("test.total.string", "123456789") + m.PutStr("test.foo.bar", "pass") + m.PutStr("test.foo.flags", "pass") + m.PutStr("test.foo.bar", "pass") + m.PutStr("test.foo.flags", "pass") + m.PutStr("test.foo.slice.0", "val") + m.PutStr("test.foo.nested.test", "pass") + m.CopyTo(tCtx.GetLogRecord().Attributes()) + }, + }, + { + statement: `flatten(attributes, depth=0)`, + want: func(_ ottllog.TransformContext) {}, + }, + { + statement: `flatten(attributes, depth=1)`, + want: func(tCtx ottllog.TransformContext) { + m := pcommon.NewMap() + m.PutStr("http.method", "get") + m.PutStr("http.path", "/health") + m.PutStr("http.url", "http://localhost/health") + m.PutStr("flags", "A|B|C") + m.PutStr("total.string", "123456789") + m.PutStr("foo.bar", "pass") + m.PutStr("foo.flags", "pass") + m.PutStr("foo.bar", "pass") + m.PutStr("foo.flags", "pass") + m.PutStr("foo.slice.0", "val") + m2 := m.PutEmptyMap("foo.nested") + m2.PutStr("test", "pass") + m.CopyTo(tCtx.GetLogRecord().Attributes()) + }, + }, + { + statement: `keep_keys(attributes, ["flags", "total.string"])`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().Remove("http.method") + tCtx.GetLogRecord().Attributes().Remove("http.path") + tCtx.GetLogRecord().Attributes().Remove("http.url") + tCtx.GetLogRecord().Attributes().Remove("foo") + }, + }, + { + statement: `limit(attributes, 100, [])`, + want: func(_ ottllog.TransformContext) {}, + }, + { + statement: `limit(attributes, 1, ["total.string"])`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().Remove("http.method") + tCtx.GetLogRecord().Attributes().Remove("http.path") + tCtx.GetLogRecord().Attributes().Remove("http.url") + tCtx.GetLogRecord().Attributes().Remove("flags") + tCtx.GetLogRecord().Attributes().Remove("foo") + }, + }, + { + statement: `merge_maps(attributes, attributes["foo"], "insert")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("bar", "pass") + s := tCtx.GetLogRecord().Attributes().PutEmptySlice("slice") + v := s.AppendEmpty() + v.SetStr("val") + m2 := tCtx.GetLogRecord().Attributes().PutEmptyMap("nested") + m2.PutStr("test", "pass") + }, + }, + { + statement: `merge_maps(attributes, attributes["foo"], "update")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("flags", "pass") + }, + }, + { + statement: `merge_maps(attributes, attributes["foo"], "upsert")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("bar", "pass") + tCtx.GetLogRecord().Attributes().PutStr("flags", "pass") + s := tCtx.GetLogRecord().Attributes().PutEmptySlice("slice") + v := s.AppendEmpty() + v.SetStr("val") + m2 := tCtx.GetLogRecord().Attributes().PutEmptyMap("nested") + m2.PutStr("test", "pass") + }, + }, + { + statement: `replace_all_matches(attributes, "*/*", "test")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("http.path", "test") + tCtx.GetLogRecord().Attributes().PutStr("http.url", "test") + }, + }, + { + statement: `replace_all_patterns(attributes, "key", "^http", "test")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().Remove("http.method") + tCtx.GetLogRecord().Attributes().Remove("http.path") + tCtx.GetLogRecord().Attributes().Remove("http.url") + tCtx.GetLogRecord().Attributes().PutStr("test.method", "get") + tCtx.GetLogRecord().Attributes().PutStr("test.path", "/health") + tCtx.GetLogRecord().Attributes().PutStr("test.url", "http://localhost/health") + }, + }, + { + statement: `replace_all_patterns(attributes, "value", "/", "@")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("http.path", "@health") + tCtx.GetLogRecord().Attributes().PutStr("http.url", "http:@@localhost@health") + }, + }, + { + statement: `replace_match(attributes["http.path"], "*/*", "test")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("http.path", "test") + }, + }, + { + statement: `replace_pattern(attributes["http.path"], "/", "@")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("http.path", "@health") + }, + }, + { + statement: `set(attributes["test"], "pass")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], nil)`, + want: func(_ ottllog.TransformContext) {}, + }, + { + statement: `set(attributes["test"], attributes["unknown"])`, + want: func(_ ottllog.TransformContext) {}, + }, + { + statement: `set(attributes["foo"]["test"], "pass")`, + want: func(tCtx ottllog.TransformContext) { + v, _ := tCtx.GetLogRecord().Attributes().Get("foo") + v.Map().PutStr("test", "pass") + }, + }, + { + statement: `truncate_all(attributes, 100)`, + want: func(_ ottllog.TransformContext) {}, + }, + { + statement: `truncate_all(attributes, 1)`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("http.method", "g") + tCtx.GetLogRecord().Attributes().PutStr("http.path", "/") + tCtx.GetLogRecord().Attributes().PutStr("http.url", "h") + tCtx.GetLogRecord().Attributes().PutStr("flags", "A") + tCtx.GetLogRecord().Attributes().PutStr("total.string", "1") + }, + }, + } + + for _, tt := range tests { + t.Run(tt.statement, func(t *testing.T) { + settings := componenttest.NewNopTelemetrySettings() + logParser, err := ottllog.NewParser(ottlfuncs.StandardFuncs[ottllog.TransformContext](), settings) + assert.NoError(t, err) + logStatements, err := logParser.ParseStatement(tt.statement) + assert.NoError(t, err) + + tCtx := constructLogTransformContext() + _, _, _ = logStatements.Execute(context.Background(), tCtx) + + exTCtx := constructLogTransformContext() + tt.want(exTCtx) + + assert.NoError(t, plogtest.CompareResourceLogs(newResourceLogs(exTCtx), newResourceLogs(tCtx))) + }) + } +} + +func Test_e2e_converters(t *testing.T) { + tests := []struct { + statement string + want func(tCtx ottllog.TransformContext) + }{ + { + statement: `set(attributes["test"], Base64Decode("cGFzcw=="))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], Concat(["A","B"], ":"))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "A:B") + }, + }, + { + statement: `set(attributes["test"], ConvertCase(attributes["http.method"], "upper"))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "GET") + }, + }, + { + statement: `set(attributes["test"], ConvertCase("PASS", "lower"))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], ConvertCase("fooBar", "snake"))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "foo_bar") + }, + }, + { + statement: `set(attributes["test"], ConvertCase("foo_bar", "camel"))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "FooBar") + }, + }, + { + statement: `set(attributes["test"], Double(1.0))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutDouble("test", 1.0) + }, + }, + { + statement: `set(attributes["test"], Double("1"))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutDouble("test", 1.0) + }, + }, + { + statement: `set(attributes["test"], Double(true))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutDouble("test", 1.0) + }, + }, + { + statement: `set(attributes["test"], Double(1))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutDouble("test", 1.0) + }, + }, + { + statement: `set(attributes["test"], "pass") where Time("10", "%M") - Time("01", "%M") < Duration("10m")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], ExtractPatterns("aa123bb", "(?P\\d+)"))`, + want: func(tCtx ottllog.TransformContext) { + m := tCtx.GetLogRecord().Attributes().PutEmptyMap("test") + m.PutStr("numbers", "123") + }, + }, + { + statement: `set(attributes["test"], FNV("pass"))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutInt("test", 266877920130663416) + }, + }, + { + statement: `set(attributes["test"], Hour(Time("12", "%H")))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutInt("test", 12) + }, + }, + { + statement: `set(attributes["test"], Hours(Duration("90m")))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutDouble("test", 1.5) + }, + }, + { + statement: `set(attributes["test"], Int(1.0))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutInt("test", 1) + }, + }, + { + statement: `set(attributes["test"], Int("1"))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutInt("test", 1) + }, + }, + { + statement: `set(attributes["test"], Int(true))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutInt("test", 1) + }, + }, + { + statement: `set(attributes["test"], Int(1))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutInt("test", 1) + }, + }, + { + statement: `set(attributes["test"], "pass") where IsBool(false)`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], "pass") where IsDouble(1.0)`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], "pass") where IsMap(attributes["foo"])`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], "pass") where IsMatch("aa123bb", "\\d{3}")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], "pass") where IsString("")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], Len(attributes["foo"]))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutInt("test", 4) + }, + }, + { + statement: `set(attributes["test"], Log(1))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutDouble("test", 0) + }, + }, + { + statement: `set(attributes["test"], Microseconds(Duration("1ms")))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutInt("test", 1000) + }, + }, + { + statement: `set(attributes["test"], Milliseconds(Duration("1s")))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutInt("test", 1000) + }, + }, + { + statement: `set(attributes["test"], Minutes(Duration("1h")))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutDouble("test", 60) + }, + }, + { + statement: `set(attributes["test"], Nanoseconds(Duration("1ms")))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutInt("test", 1000000) + }, + }, + { + statement: `set(attributes["test"], "pass") where Now() - Now() < Duration("1h")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], ParseCSV("val1;val2;val3","header1|header2|header3",";","|","strict"))`, + want: func(tCtx ottllog.TransformContext) { + m := tCtx.GetLogRecord().Attributes().PutEmptyMap("test") + m.PutStr("header1", "val1") + m.PutStr("header2", "val2") + m.PutStr("header3", "val3") + }, + }, + { + statement: `set(attributes["test"], ParseCSV("val1,val2,val3","header1|header2|header3",headerDelimiter="|",mode="strict"))`, + want: func(tCtx ottllog.TransformContext) { + m := tCtx.GetLogRecord().Attributes().PutEmptyMap("test") + m.PutStr("header1", "val1") + m.PutStr("header2", "val2") + m.PutStr("header3", "val3") + }, + }, + { + statement: `set(attributes["test"], ParseJSON("{\"id\":1}"))`, + want: func(tCtx ottllog.TransformContext) { + m := tCtx.GetLogRecord().Attributes().PutEmptyMap("test") + m.PutDouble("id", 1) + }, + }, + { + statement: `set(attributes["test"], ParseKeyValue("k1=v1 k2=v2"))`, + want: func(tCtx ottllog.TransformContext) { + m := tCtx.GetLogRecord().Attributes().PutEmptyMap("test") + m.PutStr("k1", "v1") + m.PutStr("k2", "v2") + }, + }, + { + statement: `set(attributes["test"], ParseKeyValue("k1!v1_k2!v2", "!", "_"))`, + want: func(tCtx ottllog.TransformContext) { + m := tCtx.GetLogRecord().Attributes().PutEmptyMap("test") + m.PutStr("k1", "v1") + m.PutStr("k2", "v2") + }, + }, + { + statement: `set(attributes["test"], ParseKeyValue("k1!v1_k2!\"v2__!__v2\"", "!", "_"))`, + want: func(tCtx ottllog.TransformContext) { + m := tCtx.GetLogRecord().Attributes().PutEmptyMap("test") + m.PutStr("k1", "v1") + m.PutStr("k2", "v2__!__v2") + }, + }, + { + statement: `set(attributes["test"], ParseXML("This is a log message!"))`, + want: func(tCtx ottllog.TransformContext) { + log := tCtx.GetLogRecord().Attributes().PutEmptyMap("test") + log.PutStr("tag", "Log") + + attrs := log.PutEmptyMap("attributes") + attrs.PutStr("id", "1") + + logChildren := log.PutEmptySlice("children") + + message := logChildren.AppendEmpty().SetEmptyMap() + message.PutStr("tag", "Message") + message.PutStr("content", "This is a log message!") + }, + }, + { + statement: `set(attributes["test"], Seconds(Duration("1m")))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutDouble("test", 60) + }, + }, + { + statement: `set(attributes["test"], SHA1("pass"))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684") + }, + }, + { + statement: `set(attributes["test"], SHA256("pass"))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "d74ff0ee8da3b9806b18c877dbf29bbde50b5bd8e4dad7a3a725000feb82e8f1") + }, + }, + { + statement: `set(span_id, SpanID(0x0000000000000000))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().SetSpanID(pcommon.NewSpanIDEmpty()) + }, + }, + { + statement: `set(attributes["test"], Split(attributes["flags"], "|"))`, + want: func(tCtx ottllog.TransformContext) { + s := tCtx.GetLogRecord().Attributes().PutEmptySlice("test") + s.AppendEmpty().SetStr("A") + s.AppendEmpty().SetStr("B") + s.AppendEmpty().SetStr("C") + }, + }, + { + statement: `set(attributes["test"], String("test"))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "test") + }, + }, + { + statement: `set(attributes["test"], String(attributes["http.method"]))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "get") + }, + }, + { + statement: `set(attributes["test"], String(span_id))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "[1,2,3,4,5,6,7,8]") + }, + }, + { + statement: `set(attributes["test"], String([1,2,3]))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "[1,2,3]") + }, + }, + { + statement: `set(attributes["test"], String(true))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "true") + }, + }, + { + statement: `set(attributes["test"], Substring("pass", 0, 2))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pa") + }, + }, + { + statement: `set(trace_id, TraceID(0x00000000000000000000000000000000))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().SetTraceID(pcommon.NewTraceIDEmpty()) + }, + }, + { + statement: `set(time, TruncateTime(time, Duration("1s")))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().SetTimestamp(pcommon.NewTimestampFromTime(TestLogTimestamp.AsTime().Truncate(time.Second))) + }, + }, + { + statement: `set(attributes["test"], "pass") where UnixMicro(time) > 0`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], "pass") where UnixMilli(time) > 0`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], "pass") where UnixNano(time) > 0`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], "pass") where UnixSeconds(time) > 0`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], "pass") where IsString(UUID())`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + statement: `set(attributes["test"], "\\")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "\\") + }, + }, + { + statement: `set(attributes["test"], "\\\\")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "\\\\") + }, + }, + { + statement: `set(attributes["test"], "\\\\\\")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "\\\\\\") + }, + }, + { + statement: `set(attributes["test"], "\\\\\\\\")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "\\\\\\\\") + }, + }, + { + statement: `set(attributes["test"], "\"")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", `"`) + }, + }, + { + statement: `keep_keys(attributes["foo"], ["\\", "bar"])`, + want: func(tCtx ottllog.TransformContext) { + // keep_keys should see two arguments + m := tCtx.GetLogRecord().Attributes().PutEmptyMap("foo") + m.PutStr("bar", "pass") + }, + }, + } + + for _, tt := range tests { + t.Run(tt.statement, func(t *testing.T) { + settings := componenttest.NewNopTelemetrySettings() + logParser, err := ottllog.NewParser(ottlfuncs.StandardFuncs[ottllog.TransformContext](), settings) + assert.NoError(t, err) + logStatements, err := logParser.ParseStatement(tt.statement) + assert.NoError(t, err) + + tCtx := constructLogTransformContext() + _, _, _ = logStatements.Execute(context.Background(), tCtx) + + exTCtx := constructLogTransformContext() + tt.want(exTCtx) + + assert.NoError(t, plogtest.CompareResourceLogs(newResourceLogs(exTCtx), newResourceLogs(tCtx))) + }) + } +} + +func Test_e2e_ottl_features(t *testing.T) { + tests := []struct { + name string + statement string + want func(tCtx ottllog.TransformContext) + }{ + { + name: "where clause", + statement: `set(attributes["test"], "pass") where body == "operationB"`, + want: func(_ ottllog.TransformContext) {}, + }, + { + name: "reach upwards", + statement: `set(attributes["test"], "pass") where resource.attributes["host.name"] == "localhost"`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + name: "Using enums", + statement: `set(severity_number, SEVERITY_NUMBER_TRACE2) where severity_number == SEVERITY_NUMBER_TRACE`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().SetSeverityNumber(2) + }, + }, + { + name: "Using hex", + statement: `set(attributes["test"], "pass") where trace_id == TraceID(0x0102030405060708090a0b0c0d0e0f10)`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + name: "where clause without comparator", + statement: `set(attributes["test"], "pass") where IsMatch(body, "operation[AC]")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + name: "where clause with Converter return value", + statement: `set(attributes["test"], "pass") where body == Concat(["operation", "A"], "")`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + name: "composing functions", + statement: `merge_maps(attributes, ParseJSON("{\"json_test\":\"pass\"}"), "insert") where body == "operationA"`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("json_test", "pass") + }, + }, + { + name: "complex indexing found", + statement: `set(attributes["test"], attributes["foo"]["bar"])`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "pass") + }, + }, + { + name: "complex indexing not found", + statement: `set(attributes["test"], attributes["metadata"]["uid"])`, + want: func(_ ottllog.TransformContext) {}, + }, + } + + for _, tt := range tests { + t.Run(tt.statement, func(t *testing.T) { + settings := componenttest.NewNopTelemetrySettings() + logParser, err := ottllog.NewParser(ottlfuncs.StandardFuncs[ottllog.TransformContext](), settings) + assert.NoError(t, err) + logStatements, err := logParser.ParseStatement(tt.statement) + assert.NoError(t, err) + + tCtx := constructLogTransformContext() + _, _, _ = logStatements.Execute(context.Background(), tCtx) + + exTCtx := constructLogTransformContext() + tt.want(exTCtx) + + assert.NoError(t, plogtest.CompareResourceLogs(newResourceLogs(exTCtx), newResourceLogs(tCtx))) + }) + } +} + +func constructLogTransformContext() ottllog.TransformContext { + resource := pcommon.NewResource() + resource.Attributes().PutStr("host.name", "localhost") + + scope := pcommon.NewInstrumentationScope() + scope.SetName("scope") + + logRecord := plog.NewLogRecord() + logRecord.Body().SetStr("operationA") + logRecord.SetTimestamp(TestLogTimestamp) + logRecord.SetObservedTimestamp(TestObservedTimestamp) + logRecord.SetDroppedAttributesCount(1) + logRecord.SetFlags(plog.DefaultLogRecordFlags.WithIsSampled(true)) + logRecord.SetSeverityNumber(1) + logRecord.SetTraceID(traceID) + logRecord.SetSpanID(spanID) + logRecord.Attributes().PutStr("http.method", "get") + logRecord.Attributes().PutStr("http.path", "/health") + logRecord.Attributes().PutStr("http.url", "http://localhost/health") + logRecord.Attributes().PutStr("flags", "A|B|C") + logRecord.Attributes().PutStr("total.string", "123456789") + m := logRecord.Attributes().PutEmptyMap("foo") + m.PutStr("bar", "pass") + m.PutStr("flags", "pass") + s := m.PutEmptySlice("slice") + v := s.AppendEmpty() + v.SetStr("val") + m2 := m.PutEmptyMap("nested") + m2.PutStr("test", "pass") + + return ottllog.NewTransformContext(logRecord, scope, resource) +} + +func newResourceLogs(tCtx ottllog.TransformContext) plog.ResourceLogs { + rl := plog.NewResourceLogs() + tCtx.GetResource().CopyTo(rl.Resource()) + sl := rl.ScopeLogs().AppendEmpty() + tCtx.GetInstrumentationScope().CopyTo(sl.Scope()) + l := sl.LogRecords().AppendEmpty() + tCtx.GetLogRecord().CopyTo(l) + return rl +} diff --git a/pkg/ottl/e2e/package_test.go b/pkg/ottl/e2e/package_test.go new file mode 100644 index 000000000000..73da050f0da9 --- /dev/null +++ b/pkg/ottl/e2e/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package e2e + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/ottl/expression.go b/pkg/ottl/expression.go index 1c5ac3f69b17..6f6cc18b81c7 100644 --- a/pkg/ottl/expression.go +++ b/pkg/ottl/expression.go @@ -27,14 +27,20 @@ func (e Expr[K]) Eval(ctx context.Context, tCtx K) (any, error) { return e.exprFunc(ctx, tCtx) } +// Getter resolves a value at runtime without performing any type checking on the value that is returned. type Getter[K any] interface { + // Get retrieves a value of type 'Any' and returns an error if there are any issues during retrieval. Get(ctx context.Context, tCtx K) (any, error) } +// Setter allows setting an untyped value on a predefined field within some data at runtime. type Setter[K any] interface { + // Set sets a value of type 'Any' and returns an error if there are any issues during the setting process. Set(ctx context.Context, tCtx K, val any) error } +// GetSetter is an interface that combines the Getter and Setter interfaces. +// It should be used to represent the ability to both get and set a value. type GetSetter[K any] interface { Getter[K] Setter[K] @@ -63,7 +69,7 @@ func (l literal[K]) Get(context.Context, K) (any, error) { type exprGetter[K any] struct { expr Expr[K] - keys []Key + keys []key } func (g exprGetter[K]) Get(ctx context.Context, tCtx K) (any, error) { @@ -284,6 +290,7 @@ func (g StandardBoolGetter[K]) Get(ctx context.Context, tCtx K) (bool, error) { // FunctionGetter uses a function factory to return an instantiated function as an Expr. type FunctionGetter[K any] interface { + // Get returns a function as an Expr[K] built with the provided Arguments Get(args Arguments) (Expr[K], error) } @@ -616,7 +623,7 @@ func (p *Parser[K]) newGetter(val value) (Getter[K], error) { } if val.Enum != nil { - enum, err := p.enumParser(val.Enum) + enum, err := p.enumParser((*EnumSymbol)(val.Enum)) if err != nil { return nil, err } @@ -631,7 +638,11 @@ func (p *Parser[K]) newGetter(val value) (Getter[K], error) { return &literal[K]{value: *i}, nil } if eL.Path != nil { - return p.pathParser(eL.Path) + np, err := newPath[K](eL.Path.Fields) + if err != nil { + return nil, err + } + return p.parsePath(np) } if eL.Converter != nil { return p.newGetterFromConverter(*eL.Converter) diff --git a/pkg/ottl/expression_test.go b/pkg/ottl/expression_test.go index 478d56defead..821c86a8acfe 100644 --- a/pkg/ottl/expression_test.go +++ b/pkg/ottl/expression_test.go @@ -18,13 +18,13 @@ import ( ) func hello() (ExprFunc[any], error) { - return func(ctx context.Context, tCtx any) (any, error) { + return func(_ context.Context, _ any) (any, error) { return "world", nil }, nil } func pmap() (ExprFunc[any], error) { - return func(ctx context.Context, tCtx any) (any, error) { + return func(_ context.Context, _ any) (any, error) { m := pcommon.NewMap() m.PutEmptyMap("foo").PutStr("bar", "pass") return m, nil @@ -32,7 +32,7 @@ func pmap() (ExprFunc[any], error) { } func basicMap() (ExprFunc[any], error) { - return func(ctx context.Context, tCtx any) (any, error) { + return func(_ context.Context, _ any) (any, error) { return map[string]any{ "foo": map[string]any{ "bar": "pass", @@ -42,7 +42,7 @@ func basicMap() (ExprFunc[any], error) { } func pslice() (ExprFunc[any], error) { - return func(ctx context.Context, tCtx any) (any, error) { + return func(_ context.Context, _ any) (any, error) { s := pcommon.NewSlice() s.AppendEmpty().SetEmptySlice().AppendEmpty().SetStr("pass") return s, nil @@ -50,7 +50,7 @@ func pslice() (ExprFunc[any], error) { } func basicSlice() (ExprFunc[any], error) { - return func(ctx context.Context, tCtx any) (any, error) { + return func(_ context.Context, _ any) (any, error) { return []any{ []any{ "pass", @@ -116,8 +116,8 @@ func Test_newGetter(t *testing.T) { name: "path expression", val: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -131,11 +131,11 @@ func Test_newGetter(t *testing.T) { name: "complex path expression", val: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("foo"), }, @@ -167,7 +167,7 @@ func Test_newGetter(t *testing.T) { Literal: &mathExprLiteral{ Converter: &converter{ Function: "PMap", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("foo"), }, @@ -186,7 +186,7 @@ func Test_newGetter(t *testing.T) { Literal: &mathExprLiteral{ Converter: &converter{ Function: "Map", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("foo"), }, @@ -205,7 +205,7 @@ func Test_newGetter(t *testing.T) { Literal: &mathExprLiteral{ Converter: &converter{ Function: "PSlice", - Keys: []Key{ + Keys: []key{ { Int: ottltest.Intp(0), }, @@ -224,7 +224,7 @@ func Test_newGetter(t *testing.T) { Literal: &mathExprLiteral{ Converter: &converter{ Function: "Slice", - Keys: []Key{ + Keys: []key{ { Int: ottltest.Intp(0), }, @@ -240,7 +240,7 @@ func Test_newGetter(t *testing.T) { { name: "enum", val: value{ - Enum: (*EnumSymbol)(ottltest.Strp("TEST_ENUM_ONE")), + Enum: (*enumSymbol)(ottltest.Strp("TEST_ENUM_ONE")), }, want: int64(1), }, @@ -348,8 +348,8 @@ func Test_newGetter(t *testing.T) { Values: []value{ { Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -426,7 +426,7 @@ func Test_newGetter(t *testing.T) { p, _ := NewParser[any]( functions, - testParsePath, + testParsePath[any], componenttest.NewNopTelemetrySettings(), WithEnumParser[any](testParseEnum), ) @@ -465,7 +465,7 @@ func Test_exprGetter_Get_Invalid(t *testing.T) { Literal: &mathExprLiteral{ Converter: &converter{ Function: "PMap", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("unknown key"), }, @@ -481,7 +481,7 @@ func Test_exprGetter_Get_Invalid(t *testing.T) { Literal: &mathExprLiteral{ Converter: &converter{ Function: "Map", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("unknown key"), }, @@ -497,7 +497,7 @@ func Test_exprGetter_Get_Invalid(t *testing.T) { Literal: &mathExprLiteral{ Converter: &converter{ Function: "PSlice", - Keys: []Key{ + Keys: []key{ { Int: ottltest.Intp(100), }, @@ -513,7 +513,7 @@ func Test_exprGetter_Get_Invalid(t *testing.T) { Literal: &mathExprLiteral{ Converter: &converter{ Function: "PSlice", - Keys: []Key{ + Keys: []key{ { Int: ottltest.Intp(-1), }, @@ -529,7 +529,7 @@ func Test_exprGetter_Get_Invalid(t *testing.T) { Literal: &mathExprLiteral{ Converter: &converter{ Function: "Slice", - Keys: []Key{ + Keys: []key{ { Int: ottltest.Intp(100), }, @@ -545,7 +545,7 @@ func Test_exprGetter_Get_Invalid(t *testing.T) { Literal: &mathExprLiteral{ Converter: &converter{ Function: "Slice", - Keys: []Key{ + Keys: []key{ { Int: ottltest.Intp(-1), }, @@ -561,7 +561,7 @@ func Test_exprGetter_Get_Invalid(t *testing.T) { Literal: &mathExprLiteral{ Converter: &converter{ Function: "Hello", - Keys: []Key{ + Keys: []key{ { Int: ottltest.Intp(-1), }, @@ -577,7 +577,7 @@ func Test_exprGetter_Get_Invalid(t *testing.T) { Literal: &mathExprLiteral{ Converter: &converter{ Function: "Hello", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("test"), }, @@ -599,7 +599,7 @@ func Test_exprGetter_Get_Invalid(t *testing.T) { p, _ := NewParser[any]( functions, - testParsePath, + testParsePath[any], componenttest.NewNopTelemetrySettings(), WithEnumParser[any](testParseEnum), ) @@ -625,7 +625,7 @@ func Test_StandardStringGetter(t *testing.T) { { name: "string type", getter: StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "str", nil }, }, @@ -635,7 +635,7 @@ func Test_StandardStringGetter(t *testing.T) { { name: "ValueTypeString type", getter: StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return pcommon.NewValueStr("str"), nil }, }, @@ -645,7 +645,7 @@ func Test_StandardStringGetter(t *testing.T) { { name: "Incorrect type", getter: StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return true, nil }, }, @@ -655,7 +655,7 @@ func Test_StandardStringGetter(t *testing.T) { { name: "nil", getter: StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -716,7 +716,7 @@ func Test_FunctionGetter(t *testing.T) { { name: "function getter", getter: StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "str", nil }, }, @@ -727,7 +727,7 @@ func Test_FunctionGetter(t *testing.T) { { name: "function getter nil", getter: StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -739,7 +739,7 @@ func Test_FunctionGetter(t *testing.T) { { name: "function arg mismatch", getter: StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -751,7 +751,7 @@ func Test_FunctionGetter(t *testing.T) { { name: "Cannot create function", getter: StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -784,7 +784,7 @@ func Test_FunctionGetter(t *testing.T) { // nolint:errorlint func Test_StandardStringGetter_WrappedError(t *testing.T) { getter := StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, TypeError("") }, } @@ -805,7 +805,7 @@ func Test_StandardStringLikeGetter(t *testing.T) { { name: "string type", getter: StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "str", nil }, }, @@ -815,7 +815,7 @@ func Test_StandardStringLikeGetter(t *testing.T) { { name: "bool type", getter: StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return true, nil }, }, @@ -825,7 +825,7 @@ func Test_StandardStringLikeGetter(t *testing.T) { { name: "int64 type", getter: StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return int64(1), nil }, }, @@ -835,7 +835,7 @@ func Test_StandardStringLikeGetter(t *testing.T) { { name: "float64 type", getter: StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 1.1, nil }, }, @@ -845,7 +845,7 @@ func Test_StandardStringLikeGetter(t *testing.T) { { name: "byte[] type", getter: StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return []byte{0}, nil }, }, @@ -855,7 +855,7 @@ func Test_StandardStringLikeGetter(t *testing.T) { { name: "pcommon.map type", getter: StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { m := pcommon.NewMap() m.PutStr("test", "passed") return m, nil @@ -867,7 +867,7 @@ func Test_StandardStringLikeGetter(t *testing.T) { { name: "pcommon.slice type", getter: StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { s := pcommon.NewSlice() v := s.AppendEmpty() v.SetStr("test") @@ -880,7 +880,7 @@ func Test_StandardStringLikeGetter(t *testing.T) { { name: "pcommon.value type", getter: StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueInt(int64(100)) return v, nil }, @@ -891,7 +891,7 @@ func Test_StandardStringLikeGetter(t *testing.T) { { name: "nil", getter: StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -901,7 +901,7 @@ func Test_StandardStringLikeGetter(t *testing.T) { { name: "invalid type", getter: StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return make(chan int), nil }, }, @@ -931,7 +931,7 @@ func Test_StandardStringLikeGetter(t *testing.T) { // nolint:errorlint func Test_StandardStringLikeGetter_WrappedError(t *testing.T) { getter := StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, TypeError("") }, } @@ -952,7 +952,7 @@ func Test_StandardFloatGetter(t *testing.T) { { name: "float64 type", getter: StandardFloatGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 1.1, nil }, }, @@ -962,7 +962,7 @@ func Test_StandardFloatGetter(t *testing.T) { { name: "ValueTypeFloat type", getter: StandardFloatGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return pcommon.NewValueDouble(1.1), nil }, }, @@ -972,7 +972,7 @@ func Test_StandardFloatGetter(t *testing.T) { { name: "Incorrect type", getter: StandardFloatGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return true, nil }, }, @@ -982,7 +982,7 @@ func Test_StandardFloatGetter(t *testing.T) { { name: "nil", getter: StandardFloatGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -1008,7 +1008,7 @@ func Test_StandardFloatGetter(t *testing.T) { // nolint:errorlint func Test_StandardFloatGetter_WrappedError(t *testing.T) { getter := StandardFloatGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, TypeError("") }, } @@ -1029,7 +1029,7 @@ func Test_StandardFloatLikeGetter(t *testing.T) { { name: "string type", getter: StandardFloatLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "1.0", nil }, }, @@ -1039,7 +1039,7 @@ func Test_StandardFloatLikeGetter(t *testing.T) { { name: "int64 type", getter: StandardFloatLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return int64(1), nil }, }, @@ -1049,7 +1049,7 @@ func Test_StandardFloatLikeGetter(t *testing.T) { { name: "float64 type", getter: StandardFloatLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 1.1, nil }, }, @@ -1059,7 +1059,7 @@ func Test_StandardFloatLikeGetter(t *testing.T) { { name: "float64 bool true", getter: StandardFloatLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return true, nil }, }, @@ -1069,7 +1069,7 @@ func Test_StandardFloatLikeGetter(t *testing.T) { { name: "float64 bool false", getter: StandardFloatLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return false, nil }, }, @@ -1079,7 +1079,7 @@ func Test_StandardFloatLikeGetter(t *testing.T) { { name: "pcommon.value type int", getter: StandardFloatLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueInt(int64(100)) return v, nil }, @@ -1090,7 +1090,7 @@ func Test_StandardFloatLikeGetter(t *testing.T) { { name: "pcommon.value type float", getter: StandardFloatLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueDouble(float64(1.1)) return v, nil }, @@ -1101,7 +1101,7 @@ func Test_StandardFloatLikeGetter(t *testing.T) { { name: "pcommon.value type string", getter: StandardFloatLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueStr("1.1") return v, nil }, @@ -1112,7 +1112,7 @@ func Test_StandardFloatLikeGetter(t *testing.T) { { name: "pcommon.value type bool true", getter: StandardFloatLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueBool(true) return v, nil }, @@ -1123,7 +1123,7 @@ func Test_StandardFloatLikeGetter(t *testing.T) { { name: "pcommon.value type bool false", getter: StandardFloatLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueBool(false) return v, nil }, @@ -1134,7 +1134,7 @@ func Test_StandardFloatLikeGetter(t *testing.T) { { name: "nil", getter: StandardFloatLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -1144,7 +1144,7 @@ func Test_StandardFloatLikeGetter(t *testing.T) { { name: "invalid type", getter: StandardFloatLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return []byte{}, nil }, }, @@ -1154,7 +1154,7 @@ func Test_StandardFloatLikeGetter(t *testing.T) { { name: "invalid pcommon.Value type", getter: StandardFloatLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueMap() return v, nil }, @@ -1185,7 +1185,7 @@ func Test_StandardFloatLikeGetter(t *testing.T) { // nolint:errorlint func Test_StandardFloatLikeGetter_WrappedError(t *testing.T) { getter := StandardFloatLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, TypeError("") }, } @@ -1206,7 +1206,7 @@ func Test_StandardIntGetter(t *testing.T) { { name: "int64 type", getter: StandardIntGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return int64(1), nil }, }, @@ -1216,7 +1216,7 @@ func Test_StandardIntGetter(t *testing.T) { { name: "ValueTypeInt type", getter: StandardIntGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return pcommon.NewValueInt(1), nil }, }, @@ -1226,7 +1226,7 @@ func Test_StandardIntGetter(t *testing.T) { { name: "Incorrect type", getter: StandardIntGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return true, nil }, }, @@ -1236,7 +1236,7 @@ func Test_StandardIntGetter(t *testing.T) { { name: "nil", getter: StandardIntGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -1262,7 +1262,7 @@ func Test_StandardIntGetter(t *testing.T) { // nolint:errorlint func Test_StandardIntGetter_WrappedError(t *testing.T) { getter := StandardIntGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, TypeError("") }, } @@ -1283,7 +1283,7 @@ func Test_StandardIntLikeGetter(t *testing.T) { { name: "string type", getter: StandardIntLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "1", nil }, }, @@ -1293,7 +1293,7 @@ func Test_StandardIntLikeGetter(t *testing.T) { { name: "int64 type", getter: StandardIntLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return int64(1), nil }, }, @@ -1303,7 +1303,7 @@ func Test_StandardIntLikeGetter(t *testing.T) { { name: "float64 type", getter: StandardIntLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 1.1, nil }, }, @@ -1313,7 +1313,7 @@ func Test_StandardIntLikeGetter(t *testing.T) { { name: "primitive bool true", getter: StandardIntLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return true, nil }, }, @@ -1323,7 +1323,7 @@ func Test_StandardIntLikeGetter(t *testing.T) { { name: "primitive bool false", getter: StandardIntLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return false, nil }, }, @@ -1333,7 +1333,7 @@ func Test_StandardIntLikeGetter(t *testing.T) { { name: "pcommon.value type int", getter: StandardIntLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueInt(int64(100)) return v, nil }, @@ -1344,7 +1344,7 @@ func Test_StandardIntLikeGetter(t *testing.T) { { name: "pcommon.value type float", getter: StandardIntLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueDouble(float64(1.9)) return v, nil }, @@ -1355,7 +1355,7 @@ func Test_StandardIntLikeGetter(t *testing.T) { { name: "pcommon.value type string", getter: StandardIntLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueStr("1") return v, nil }, @@ -1366,7 +1366,7 @@ func Test_StandardIntLikeGetter(t *testing.T) { { name: "pcommon.value type bool true", getter: StandardIntLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueBool(true) return v, nil }, @@ -1377,7 +1377,7 @@ func Test_StandardIntLikeGetter(t *testing.T) { { name: "pcommon.value type bool false", getter: StandardIntLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueBool(false) return v, nil }, @@ -1388,7 +1388,7 @@ func Test_StandardIntLikeGetter(t *testing.T) { { name: "nil", getter: StandardIntLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -1398,7 +1398,7 @@ func Test_StandardIntLikeGetter(t *testing.T) { { name: "invalid type", getter: StandardIntLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return []byte{}, nil }, }, @@ -1408,7 +1408,7 @@ func Test_StandardIntLikeGetter(t *testing.T) { { name: "invalid pcommon.Value type", getter: StandardIntLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueMap() return v, nil }, @@ -1439,7 +1439,7 @@ func Test_StandardIntLikeGetter(t *testing.T) { // nolint:errorlint func Test_StandardIntLikeGetter_WrappedError(t *testing.T) { getter := StandardIntLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, TypeError("") }, } @@ -1460,7 +1460,7 @@ func Test_StandardBoolGetter(t *testing.T) { { name: "primitive bool type", getter: StandardBoolGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return true, nil }, }, @@ -1470,7 +1470,7 @@ func Test_StandardBoolGetter(t *testing.T) { { name: "ValueTypeBool type", getter: StandardBoolGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return pcommon.NewValueBool(true), nil }, }, @@ -1480,7 +1480,7 @@ func Test_StandardBoolGetter(t *testing.T) { { name: "Incorrect type", getter: StandardBoolGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 1, nil }, }, @@ -1490,7 +1490,7 @@ func Test_StandardBoolGetter(t *testing.T) { { name: "nil", getter: StandardBoolGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -1516,7 +1516,7 @@ func Test_StandardBoolGetter(t *testing.T) { // nolint:errorlint func Test_StandardBoolGetter_WrappedError(t *testing.T) { getter := StandardBoolGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, TypeError("") }, } @@ -1537,7 +1537,7 @@ func Test_StandardBoolLikeGetter(t *testing.T) { { name: "string type true", getter: StandardBoolLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "true", nil }, }, @@ -1547,7 +1547,7 @@ func Test_StandardBoolLikeGetter(t *testing.T) { { name: "string type false", getter: StandardBoolLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "false", nil }, }, @@ -1557,7 +1557,7 @@ func Test_StandardBoolLikeGetter(t *testing.T) { { name: "int type", getter: StandardBoolLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 0, nil }, }, @@ -1567,7 +1567,7 @@ func Test_StandardBoolLikeGetter(t *testing.T) { { name: "float64 type", getter: StandardBoolLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return float64(0.0), nil }, }, @@ -1577,7 +1577,7 @@ func Test_StandardBoolLikeGetter(t *testing.T) { { name: "pcommon.value type int", getter: StandardBoolLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueInt(int64(0)) return v, nil }, @@ -1588,7 +1588,7 @@ func Test_StandardBoolLikeGetter(t *testing.T) { { name: "pcommon.value type string", getter: StandardBoolLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueStr("false") return v, nil }, @@ -1599,7 +1599,7 @@ func Test_StandardBoolLikeGetter(t *testing.T) { { name: "pcommon.value type bool", getter: StandardBoolLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueBool(true) return v, nil }, @@ -1610,7 +1610,7 @@ func Test_StandardBoolLikeGetter(t *testing.T) { { name: "pcommon.value type double", getter: StandardBoolLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueDouble(float64(0.0)) return v, nil }, @@ -1621,7 +1621,7 @@ func Test_StandardBoolLikeGetter(t *testing.T) { { name: "nil", getter: StandardBoolLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -1631,7 +1631,7 @@ func Test_StandardBoolLikeGetter(t *testing.T) { { name: "invalid type", getter: StandardBoolLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return []byte{}, nil }, }, @@ -1641,7 +1641,7 @@ func Test_StandardBoolLikeGetter(t *testing.T) { { name: "invalid pcommon.value type", getter: StandardBoolLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueMap() return v, nil }, @@ -1672,7 +1672,7 @@ func Test_StandardBoolLikeGetter(t *testing.T) { // nolint:errorlint func Test_StandardBoolLikeGetter_WrappedError(t *testing.T) { getter := StandardBoolLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, TypeError("") }, } @@ -1693,7 +1693,7 @@ func Test_StandardPMapGetter(t *testing.T) { { name: "pcommon.map type", getter: StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return pcommon.NewMap(), nil }, }, @@ -1703,7 +1703,7 @@ func Test_StandardPMapGetter(t *testing.T) { { name: "map[string]any type", getter: StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return make(map[string]any), nil }, }, @@ -1713,7 +1713,7 @@ func Test_StandardPMapGetter(t *testing.T) { { name: "ValueTypeMap type", getter: StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return pcommon.NewValueMap(), nil }, }, @@ -1723,7 +1723,7 @@ func Test_StandardPMapGetter(t *testing.T) { { name: "Incorrect type", getter: StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return true, nil }, }, @@ -1733,7 +1733,7 @@ func Test_StandardPMapGetter(t *testing.T) { { name: "nil", getter: StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -1759,7 +1759,7 @@ func Test_StandardPMapGetter(t *testing.T) { // nolint:errorlint func Test_StandardPMapGetter_WrappedError(t *testing.T) { getter := StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, TypeError("") }, } @@ -1789,7 +1789,7 @@ func Test_StandardDurationGetter(t *testing.T) { { name: "complex duration", getter: StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("1h1m1s") }, }, @@ -1799,7 +1799,7 @@ func Test_StandardDurationGetter(t *testing.T) { { name: "simple duration", getter: StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("100ns") }, }, @@ -1809,7 +1809,7 @@ func Test_StandardDurationGetter(t *testing.T) { { name: "complex duation values less than 1 seconc", getter: StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("10ms66us7000ns") }, }, @@ -1819,7 +1819,7 @@ func Test_StandardDurationGetter(t *testing.T) { { name: "invalid duration units", getter: StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("70ps") }, }, @@ -1829,7 +1829,7 @@ func Test_StandardDurationGetter(t *testing.T) { { name: "wrong type - int", getter: StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 1, nil }, }, @@ -1839,7 +1839,7 @@ func Test_StandardDurationGetter(t *testing.T) { { name: "nil", getter: StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -1864,7 +1864,7 @@ func Test_StandardDurationGetter(t *testing.T) { // nolint:errorlint func Test_StandardDurationGetter_WrappedError(t *testing.T) { getter := StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, TypeError("") }, } @@ -1885,7 +1885,7 @@ func Test_StandardTimeGetter(t *testing.T) { { name: "2023 time", getter: StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(2023, 8, 17, 1, 1, 1, 1, time.UTC), nil }, }, @@ -1895,7 +1895,7 @@ func Test_StandardTimeGetter(t *testing.T) { { name: "before 2000 time", getter: StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(1999, 12, 1, 10, 59, 58, 57, time.UTC), nil }, }, @@ -1905,7 +1905,7 @@ func Test_StandardTimeGetter(t *testing.T) { { name: "wrong type - duration", getter: StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("70ns") }, }, @@ -1915,7 +1915,7 @@ func Test_StandardTimeGetter(t *testing.T) { { name: "wrong type - bool", getter: StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return true, nil }, }, @@ -1925,7 +1925,7 @@ func Test_StandardTimeGetter(t *testing.T) { { name: "nil", getter: StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -1953,7 +1953,7 @@ func Test_StandardTimeGetter(t *testing.T) { // nolint:errorlint func Test_StandardTimeGetter_WrappedError(t *testing.T) { getter := StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, TypeError("") }, } diff --git a/pkg/ottl/functions.go b/pkg/ottl/functions.go index 37aab7e1c7ca..86782be3c411 100644 --- a/pkg/ottl/functions.go +++ b/pkg/ottl/functions.go @@ -4,20 +4,189 @@ package ottl // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" import ( + "context" "errors" "fmt" "reflect" + "strconv" "strings" "github.com/iancoleman/strcase" ) -type PathExpressionParser[K any] func(*Path) (GetSetter[K], error) +type PathExpressionParser[K any] func(Path[K]) (GetSetter[K], error) type EnumParser func(*EnumSymbol) (*Enum, error) type Enum int64 +type EnumSymbol string + +func buildOriginalText(fields []field) string { + var builder strings.Builder + for i, f := range fields { + builder.WriteString(f.Name) + if len(f.Keys) > 0 { + for _, k := range f.Keys { + builder.WriteString("[") + if k.Int != nil { + builder.WriteString(strconv.FormatInt(*k.Int, 10)) + } + if k.String != nil { + builder.WriteString(*k.String) + } + builder.WriteString("]") + } + } + if i != len(fields)-1 { + builder.WriteString(".") + } + } + return builder.String() +} + +func newPath[K any](fields []field) (*basePath[K], error) { + if len(fields) == 0 { + return nil, fmt.Errorf("cannot make a path from zero fields") + } + originalText := buildOriginalText(fields) + var current *basePath[K] + for i := len(fields) - 1; i >= 0; i-- { + current = &basePath[K]{ + name: fields[i].Name, + keys: newKeys[K](fields[i].Keys), + nextPath: current, + originalText: originalText, + } + } + current.fetched = true + current.originalText = originalText + return current, nil +} + +// Path represents a chain of path parts in an OTTL statement, such as `body.string`. +// A Path has a name, and potentially a set of keys. +// If the path in the OTTL statement contains multiple parts (separated by a dot (`.`)), then the Path will have a pointer to the next Path. +type Path[K any] interface { + // Name is the name of this segment of the path. + Name() string + + // Next provides the next path segment for this Path. + // Will return nil if there is no next path. + Next() Path[K] + + // Keys provides the Keys for this Path. + // Will return nil if there are no Keys. + Keys() []Key[K] + + // String returns a string representation of this Path and the next Paths + String() string +} + +var _ Path[any] = &basePath[any]{} + +type basePath[K any] struct { + name string + keys []Key[K] + nextPath *basePath[K] + fetched bool + fetchedKeys bool + originalText string +} + +func (p *basePath[K]) Name() string { + return p.name +} + +func (p *basePath[K]) Next() Path[K] { + if p.nextPath == nil { + return nil + } + p.nextPath.fetched = true + return p.nextPath +} + +func (p *basePath[K]) Keys() []Key[K] { + if p.keys == nil { + return nil + } + p.fetchedKeys = true + return p.keys +} + +func (p *basePath[K]) String() string { + return p.originalText +} + +func (p *basePath[K]) isComplete() error { + if !p.fetched { + return fmt.Errorf("the path section %q was not used by the context - this likely means you are using extra path sections", p.name) + } + if p.keys != nil && !p.fetchedKeys { + return fmt.Errorf("the keys indexing %q were not used by the context - this likely means you are trying to index a path that does not support indexing", p.name) + } + if p.nextPath == nil { + return nil + } + return p.nextPath.isComplete() +} + +func newKeys[K any](keys []key) []Key[K] { + if len(keys) == 0 { + return nil + } + ks := make([]Key[K], len(keys)) + for i := range keys { + ks[i] = &baseKey[K]{ + s: keys[i].String, + i: keys[i].Int, + } + } + return ks +} + +// Key represents a chain of keys in an OTTL statement, such as `attributes["foo"]["bar"]`. +// A Key has a String or Int, and potentially the next Key. +// If the path in the OTTL statement contains multiple keys, then the Key will have a pointer to the next Key. +type Key[K any] interface { + // String returns a pointer to the Key's string value. + // If the Key does not have a string value the returned value is nil. + // If Key experiences an error retrieving the value it is returned. + String(context.Context, K) (*string, error) + + // Int returns a pointer to the Key's int value. + // If the Key does not have a int value the returned value is nil. + // If Key experiences an error retrieving the value it is returned. + Int(context.Context, K) (*int64, error) +} + +var _ Key[any] = &baseKey[any]{} + +type baseKey[K any] struct { + s *string + i *int64 +} + +func (k *baseKey[K]) String(_ context.Context, _ K) (*string, error) { + return k.s, nil +} + +func (k *baseKey[K]) Int(_ context.Context, _ K) (*int64, error) { + return k.i, nil +} + +func (p *Parser[K]) parsePath(ip *basePath[K]) (GetSetter[K], error) { + g, err := p.pathParser(ip) + if err != nil { + return nil, err + } + err = ip.isComplete() + if err != nil { + return nil, err + } + return g, nil +} + func (p *Parser[K]) newFunctionCall(ed editor) (Expr[K], error) { f, ok := p.functions[ed.Function] if !ok { @@ -241,9 +410,13 @@ func (p *Parser[K]) buildArg(argVal value, argType reflect.Type) (any, error) { fallthrough case strings.HasPrefix(name, "GetSetter"): if argVal.Literal == nil || argVal.Literal.Path == nil { - return nil, fmt.Errorf("must be a Path") + return nil, fmt.Errorf("must be a path") + } + np, err := newPath[K](argVal.Literal.Path.Fields) + if err != nil { + return nil, err } - arg, err := p.pathParser(argVal.Literal.Path) + arg, err := p.parsePath(np) if err != nil { return nil, err } @@ -308,8 +481,20 @@ func (p *Parser[K]) buildArg(argVal value, argType reflect.Type) (any, error) { return nil, err } return StandardTimeGetter[K]{Getter: arg.Get}, nil + case strings.HasPrefix(name, "BoolGetter"): + arg, err := p.newGetter(argVal) + if err != nil { + return nil, err + } + return StandardBoolGetter[K]{Getter: arg.Get}, nil + case strings.HasPrefix(name, "BoolLikeGetter"): + arg, err := p.newGetter(argVal) + if err != nil { + return nil, err + } + return StandardBoolLikeGetter[K]{Getter: arg.Get}, nil case name == "Enum": - arg, err := p.enumParser(argVal.Enum) + arg, err := p.enumParser((*EnumSymbol)(argVal.Enum)) if err != nil { return nil, fmt.Errorf("must be an Enum") } diff --git a/pkg/ottl/functions_test.go b/pkg/ottl/functions_test.go index 8e4d54e47aff..46a1bb108ad9 100644 --- a/pkg/ottl/functions_test.go +++ b/pkg/ottl/functions_test.go @@ -83,7 +83,7 @@ func Test_NewFunctionCall_invalid(t *testing.T) { p, _ := NewParser( functions, - testParsePath, + testParsePath[any], componenttest.NewNopTelemetrySettings(), WithEnumParser[any](testParseEnum), ) @@ -150,8 +150,8 @@ func Test_NewFunctionCall_invalid(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -176,8 +176,8 @@ func Test_NewFunctionCall_invalid(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -283,8 +283,8 @@ func Test_NewFunctionCall_invalid(t *testing.T) { Name: "get_setter_arg", Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -323,8 +323,8 @@ func Test_NewFunctionCall_invalid(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -368,7 +368,7 @@ func Test_NewFunctionCall_invalid(t *testing.T) { Arguments: []argument{ { Value: value{ - Enum: (*EnumSymbol)(ottltest.Strp("SYMBOL_NOT_FOUND")), + Enum: (*enumSymbol)(ottltest.Strp("SYMBOL_NOT_FOUND")), }, }, }, @@ -393,6 +393,59 @@ func Test_NewFunctionCall_invalid(t *testing.T) { Function: "non_pointer", }, }, + { + name: "path parts not all used", + inv: editor{ + Function: "testing_getsetter", + Arguments: []argument{ + { + Value: value{ + Literal: &mathExprLiteral{ + Path: &path{ + Fields: []field{ + { + Name: "name", + }, + { + Name: "not-used", + }, + }, + }, + }, + }, + }, + }, + }, + }, + { + name: "Keys not allowed", + inv: editor{ + Function: "testing_getsetter", + Arguments: []argument{ + { + Value: value{ + Literal: &mathExprLiteral{ + Path: &path{ + Fields: []field{ + { + Name: "name", + Keys: []key{ + { + String: ottltest.Strp("foo"), + }, + { + String: ottltest.Strp("bar"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, } for _, tt := range tests { @@ -407,7 +460,7 @@ func Test_NewFunctionCall_invalid(t *testing.T) { func Test_NewFunctionCall(t *testing.T) { p, _ := NewParser( defaultFunctionsForTests(), - testParsePath, + testParsePath[any], componenttest.NewNopTelemetrySettings(), WithEnumParser[any](testParseEnum), ) @@ -542,8 +595,8 @@ func Test_NewFunctionCall(t *testing.T) { Values: []value{ { Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -568,7 +621,7 @@ func Test_NewFunctionCall(t *testing.T) { Bool: (*boolean)(ottltest.Boolp(true)), }, { - Enum: (*EnumSymbol)(ottltest.Strp("TEST_ENUM")), + Enum: (*enumSymbol)(ottltest.Strp("TEST_ENUM")), }, { List: &list{ @@ -620,8 +673,8 @@ func Test_NewFunctionCall(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -766,8 +819,8 @@ func Test_NewFunctionCall(t *testing.T) { Values: []value{ { Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -777,8 +830,8 @@ func Test_NewFunctionCall(t *testing.T) { }, { Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -877,8 +930,8 @@ func Test_NewFunctionCall(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -899,8 +952,8 @@ func Test_NewFunctionCall(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -921,8 +974,8 @@ func Test_NewFunctionCall(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -979,8 +1032,8 @@ func Test_NewFunctionCall(t *testing.T) { }, { Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -996,8 +1049,8 @@ func Test_NewFunctionCall(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -1168,8 +1221,8 @@ func Test_NewFunctionCall(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -1264,8 +1317,8 @@ func Test_NewFunctionCall(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -1305,8 +1358,8 @@ func Test_NewFunctionCall(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -1344,8 +1397,8 @@ func Test_NewFunctionCall(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -1384,7 +1437,59 @@ func Test_NewFunctionCall(t *testing.T) { Arguments: []argument{ { Value: value{ - Enum: (*EnumSymbol)(ottltest.Strp("TEST_ENUM")), + Enum: (*enumSymbol)(ottltest.Strp("TEST_ENUM")), + }, + }, + }, + }, + want: nil, + }, + { + name: "Complex Indexing", + inv: editor{ + Function: "testing_getsetter", + Arguments: []argument{ + { + Value: value{ + Literal: &mathExprLiteral{ + Path: &path{ + Fields: []field{ + { + Name: "attributes", + Keys: []key{ + { + String: ottltest.Strp("foo"), + }, + { + String: ottltest.Strp("bar"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + want: nil, + }, + { + name: "path that allows keys but none have been specified", + inv: editor{ + Function: "testing_getsetter", + Arguments: []argument{ + { + Value: value{ + Literal: &mathExprLiteral{ + Path: &path{ + Fields: []field{ + { + Name: "attributes", + }, + }, + }, + }, }, }, }, @@ -1414,7 +1519,7 @@ func Test_ArgumentsNotMutated(t *testing.T) { ) p, _ := NewParser( CreateFactoryMap[any](fact), - testParsePath, + testParsePath[any], componenttest.NewNopTelemetrySettings(), WithEnumParser[any](testParseEnum), ) @@ -1425,8 +1530,8 @@ func Test_ArgumentsNotMutated(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -1461,8 +1566,8 @@ func Test_ArgumentsNotMutated(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -1870,7 +1975,7 @@ func functionWithEnum(Enum) (ExprFunc[any], error) { } func createFactory[A any](name string, args A, fn any) Factory[any] { - createFunction := func(fCtx FunctionContext, oArgs Arguments) (ExprFunc[any], error) { + createFunction := func(_ FunctionContext, oArgs Arguments) (ExprFunc[any], error) { fArgs, ok := oArgs.(A) if !ok { @@ -2093,3 +2198,208 @@ func defaultFunctionsForTests() map[string]Factory[any] { ), ) } + +func Test_basePath_Name(t *testing.T) { + bp := basePath[any]{ + name: "test", + } + n := bp.Name() + assert.Equal(t, "test", n) +} + +func Test_basePath_Next(t *testing.T) { + bp := basePath[any]{ + nextPath: &basePath[any]{}, + } + next := bp.Next() + assert.NotNil(t, next) + assert.Nil(t, next.Next()) +} + +func Test_basePath_Keys(t *testing.T) { + k := &baseKey[any]{} + bp := basePath[any]{ + keys: []Key[any]{ + k, + }, + } + ks := bp.Keys() + assert.Equal(t, 1, len(ks)) + assert.Equal(t, k, ks[0]) +} + +func Test_basePath_isComplete(t *testing.T) { + tests := []struct { + name string + p basePath[any] + expectedError bool + }{ + { + name: "fetched no next", + p: basePath[any]{ + fetched: true, + }, + }, + { + name: "fetched with next", + p: basePath[any]{ + fetched: true, + nextPath: &basePath[any]{ + fetched: true, + }, + }, + }, + { + name: "not fetched no next", + p: basePath[any]{ + fetched: false, + }, + expectedError: true, + }, + { + name: "not fetched with next", + p: basePath[any]{ + fetched: true, + nextPath: &basePath[any]{ + fetched: false, + }, + }, + expectedError: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.p.isComplete() + if tt.expectedError { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + }) + } +} + +func Test_basePath_NextWithIsComplete(t *testing.T) { + tests := []struct { + name string + pathFunc func() *basePath[any] + expectedError bool + }{ + { + name: "fetched", + pathFunc: func() *basePath[any] { + bp := basePath[any]{ + fetched: true, + nextPath: &basePath[any]{ + fetched: false, + }, + } + bp.Next() + return &bp + }, + }, + { + name: "not fetched enough", + pathFunc: func() *basePath[any] { + bp := basePath[any]{ + fetched: true, + nextPath: &basePath[any]{ + fetched: false, + nextPath: &basePath[any]{ + fetched: false, + }, + }, + } + bp.Next() + return &bp + }, + expectedError: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.pathFunc().isComplete() + if tt.expectedError { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + }) + } +} + +func Test_newPath(t *testing.T) { + fields := []field{ + { + Name: "body", + }, + { + Name: "string", + Keys: []key{ + { + String: ottltest.Strp("key"), + }, + }, + }, + } + np, err := newPath[any](fields) + assert.NoError(t, err) + p := Path[any](np) + assert.Equal(t, "body", p.Name()) + assert.Nil(t, p.Keys()) + assert.Equal(t, "body.string[key]", p.String()) + p = p.Next() + assert.Equal(t, "string", p.Name()) + assert.Equal(t, "body.string[key]", p.String()) + assert.Nil(t, p.Next()) + assert.Equal(t, 1, len(p.Keys())) + v, err := p.Keys()[0].String(context.Background(), struct{}{}) + assert.NoError(t, err) + assert.Equal(t, "key", *v) + i, err := p.Keys()[0].Int(context.Background(), struct{}{}) + assert.NoError(t, err) + assert.Nil(t, i) +} + +func Test_baseKey_String(t *testing.T) { + bp := baseKey[any]{ + s: ottltest.Strp("test"), + } + s, err := bp.String(context.Background(), nil) + assert.NoError(t, err) + assert.NotNil(t, s) + assert.Equal(t, "test", *s) +} + +func Test_baseKey_Int(t *testing.T) { + bp := baseKey[any]{ + i: ottltest.Intp(1), + } + i, err := bp.Int(context.Background(), nil) + assert.NoError(t, err) + assert.NotNil(t, i) + assert.Equal(t, int64(1), *i) +} + +func Test_newKey(t *testing.T) { + keys := []key{ + { + String: ottltest.Strp("foo"), + }, + { + String: ottltest.Strp("bar"), + }, + } + ks := newKeys[any](keys) + + assert.Equal(t, 2, len(ks)) + + s, err := ks[0].String(context.Background(), nil) + assert.NoError(t, err) + assert.NotNil(t, s) + assert.Equal(t, "foo", *s) + s, err = ks[1].String(context.Background(), nil) + assert.NoError(t, err) + assert.NotNil(t, s) + assert.Equal(t, "bar", *s) +} diff --git a/pkg/ottl/go.mod b/pkg/ottl/go.mod index a9329fd3f8e0..ec89ea2f5234 100644 --- a/pkg/ottl/go.mod +++ b/pkg/ottl/go.mod @@ -1,48 +1,60 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl -go 1.20 +go 1.21 require ( - github.com/alecthomas/participle/v2 v2.1.0 + github.com/alecthomas/participle/v2 v2.1.1 github.com/gobwas/glob v0.2.3 - github.com/google/uuid v1.4.0 + github.com/google/uuid v1.6.0 github.com/iancoleman/strcase v0.3.0 github.com/json-iterator/go v1.1.12 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/otel/trace v1.20.0 - go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/ottl/go.sum b/pkg/ottl/go.sum index 4b08d7daf50e..dfbaf6b0582e 100644 --- a/pkg/ottl/go.sum +++ b/pkg/ottl/go.sum @@ -1,12 +1,23 @@ github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= -github.com/alecthomas/participle/v2 v2.1.0 h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4= -github.com/alecthomas/participle/v2 v2.1.0/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +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.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -16,12 +27,12 @@ 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/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/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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -32,14 +43,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -49,55 +60,69 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -110,15 +135,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/pkg/ottl/grammar.go b/pkg/ottl/grammar.go index e8381292cc13..ebd8e58ec7c5 100644 --- a/pkg/ottl/grammar.go +++ b/pkg/ottl/grammar.go @@ -123,22 +123,22 @@ type compareOp int // These are the allowed values of a compareOp const ( - EQ compareOp = iota - NE - LT - LTE - GTE - GT + eq compareOp = iota + ne + lt + lte + gte + gt ) // a fast way to get from a string to a compareOp var compareOpTable = map[string]compareOp{ - "==": EQ, - "!=": NE, - "<": LT, - "<=": LTE, - ">": GT, - ">=": GTE, + "==": eq, + "!=": ne, + "<": lt, + "<=": lte, + ">": gt, + ">=": gte, } // Capture is how the parser converts an operator string to a compareOp. @@ -154,18 +154,18 @@ func (c *compareOp) Capture(values []string) error { // String() for compareOp gives us more legible test results and error messages. func (c *compareOp) String() string { switch *c { - case EQ: - return "EQ" - case NE: - return "NE" - case LT: - return "LT" - case LTE: - return "LTE" - case GTE: - return "GTE" - case GT: - return "GT" + case eq: + return "eq" + case ne: + return "ne" + case lt: + return "lt" + case lte: + return "lte" + case gte: + return "gte" + case gt: + return "gt" default: return "UNKNOWN OP!" } @@ -192,7 +192,7 @@ type editor struct { Function string `parser:"@(Lowercase(Uppercase | Lowercase)*)"` Arguments []argument `parser:"'(' ( @@ ( ',' @@ )* )? ')'"` // If keys are matched return an error - Keys []Key `parser:"( @@ )*"` + Keys []key `parser:"( @@ )*"` } func (i *editor) checkForCustomError() error { @@ -214,7 +214,7 @@ func (i *editor) checkForCustomError() error { type converter struct { Function string `parser:"@(Uppercase(Uppercase | Lowercase)*)"` Arguments []argument `parser:"'(' ( @@ ( ',' @@ )* )? ')'"` - Keys []Key `parser:"( @@ )*"` + Keys []key `parser:"( @@ )*"` } type argument struct { @@ -235,7 +235,7 @@ type value struct { Bytes *byteSlice `parser:"| @Bytes"` String *string `parser:"| @String"` Bool *boolean `parser:"| @Boolean"` - Enum *EnumSymbol `parser:"| @Uppercase (?! Lowercase)"` + Enum *enumSymbol `parser:"| @Uppercase (?! Lowercase)"` FunctionName *string `parser:"| @(Uppercase(Uppercase | Lowercase)*)"` List *list `parser:"| @@)"` } @@ -250,18 +250,18 @@ func (v *value) checkForCustomError() error { return nil } -// Path represents a telemetry path mathExpression. -type Path struct { - Fields []Field `parser:"@@ ( '.' @@ )*"` +// path represents a telemetry path mathExpression. +type path struct { + Fields []field `parser:"@@ ( '.' @@ )*"` } -// Field is an item within a Path. -type Field struct { +// field is an item within a path. +type field struct { Name string `parser:"@Lowercase"` - Keys []Key `parser:"( @@ )*"` + Keys []key `parser:"( @@ )*"` } -type Key struct { +type key struct { String *string `parser:"'[' (@String "` Int *int64 `parser:"| @Int) ']'"` } @@ -305,7 +305,7 @@ type mathExprLiteral struct { Converter *converter `parser:"| @@"` Float *float64 `parser:"| @Float"` Int *int64 `parser:"| @Int"` - Path *Path `parser:"| @@ )"` + Path *path `parser:"| @@ )"` } func (m *mathExprLiteral) checkForCustomError() error { @@ -386,17 +386,17 @@ func (m *mathExpression) checkForCustomError() error { type mathOp int const ( - ADD mathOp = iota - SUB - MULT - DIV + add mathOp = iota + sub + mult + div ) var mathOpTable = map[string]mathOp{ - "+": ADD, - "-": SUB, - "*": MULT, - "/": DIV, + "+": add, + "-": sub, + "*": mult, + "/": div, } func (m *mathOp) Capture(values []string) error { @@ -410,20 +410,20 @@ func (m *mathOp) Capture(values []string) error { func (m *mathOp) String() string { switch *m { - case ADD: + case add: return "+" - case SUB: + case sub: return "-" - case MULT: + case mult: return "*" - case DIV: + case div: return "/" default: return "UNKNOWN OP!" } } -type EnumSymbol string +type enumSymbol string // buildLexer constructs a SimpleLexer definition. // Note that the ordering of these rules matters. @@ -433,7 +433,7 @@ func buildLexer() *lexer.StatefulDefinition { {Name: `Bytes`, Pattern: `0x[a-fA-F0-9]+`}, {Name: `Float`, Pattern: `[-+]?\d*\.\d+([eE][-+]?\d+)?`}, {Name: `Int`, Pattern: `[-+]?\d+`}, - {Name: `String`, Pattern: `"(\\"|[^"])*"`}, + {Name: `String`, Pattern: `"(\\.|[^\\"])*"`}, {Name: `OpNot`, Pattern: `\b(not)\b`}, {Name: `OpOr`, Pattern: `\b(or)\b`}, {Name: `OpAnd`, Pattern: `\b(and)\b`}, diff --git a/pkg/ottl/lexer_test.go b/pkg/ottl/lexer_test.go index c1e32b5c7f25..289145f8a05c 100644 --- a/pkg/ottl/lexer_test.go +++ b/pkg/ottl/lexer_test.go @@ -92,6 +92,15 @@ func Test_lexer(t *testing.T) { {"Bytes", "0x0102030405060708"}, {"RParen", ")"}, }}, + {"string escape with trailing backslash", `a("\\", "b")`, false, []result{ + {"Lowercase", "a"}, + {"LParen", "("}, + {"String", `"\\"`}, + {"Punct", ","}, + {"String", `"b"`}, + {"RParen", ")"}, + }}, + {"string escape with mismatched backslash", `"\"`, true, nil}, {"Mixing case numbers and underscores", `aBCd_123E_4`, false, []result{ {"Lowercase", "a"}, {"Uppercase", "BC"}, diff --git a/pkg/ottl/math.go b/pkg/ottl/math.go index eae661e639ef..9c9dd3dc18d6 100644 --- a/pkg/ottl/math.go +++ b/pkg/ottl/math.go @@ -113,7 +113,7 @@ func attemptMathOperation[K any](lhs Getter[K], op mathOp, rhs Getter[K]) Getter func performOpTime(x time.Time, y any, op mathOp) (any, error) { switch op { - case ADD: + case add: switch newY := y.(type) { case time.Duration: result := x.Add(newY) @@ -121,7 +121,7 @@ func performOpTime(x time.Time, y any, op mathOp) (any, error) { default: return nil, fmt.Errorf("time.Time must be added to time.Duration; found %v instead", y) } - case SUB: + case sub: switch newY := y.(type) { case time.Time: result := x.Sub(newY) @@ -138,7 +138,7 @@ func performOpTime(x time.Time, y any, op mathOp) (any, error) { func performOpDuration(x time.Duration, y any, op mathOp) (any, error) { switch op { - case ADD: + case add: switch newY := y.(type) { case time.Duration: result := x + newY @@ -149,7 +149,7 @@ func performOpDuration(x time.Duration, y any, op mathOp) (any, error) { default: return nil, fmt.Errorf("time.Duration must be added to time.Duration or time.Time; found %v instead", y) } - case SUB: + case sub: switch newY := y.(type) { case time.Duration: result := x - newY @@ -163,13 +163,13 @@ func performOpDuration(x time.Duration, y any, op mathOp) (any, error) { func performOp[N int64 | float64](x N, y N, op mathOp) (N, error) { switch op { - case ADD: + case add: return x + y, nil - case SUB: + case sub: return x - y, nil - case MULT: + case mult: return x * y, nil - case DIV: + case div: if y == 0 { return 0, fmt.Errorf("attempted to divide by 0") } diff --git a/pkg/ottl/math_test.go b/pkg/ottl/math_test.go index e993b3dd8d53..5f3d7281dc7c 100644 --- a/pkg/ottl/math_test.go +++ b/pkg/ottl/math_test.go @@ -18,29 +18,29 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottltest" ) -func mathParsePath(val *Path) (GetSetter[any], error) { - if val != nil && len(val.Fields) > 0 && val.Fields[0].Name == "one" { +func mathParsePath[K any](p Path[K]) (GetSetter[any], error) { + if p != nil && p.Name() == "one" { return &StandardGetSetter[any]{ Getter: func(context.Context, any) (any, error) { return int64(1), nil }, }, nil } - if val != nil && len(val.Fields) > 0 && val.Fields[0].Name == "two" { + if p != nil && p.Name() == "two" { return &StandardGetSetter[any]{ Getter: func(context.Context, any) (any, error) { return int64(2), nil }, }, nil } - if val != nil && len(val.Fields) > 0 && val.Fields[0].Name == "three" && val.Fields[1].Name == "one" { + if p != nil && p.Name() == "three" && p.Next() != nil && p.Next().Name() == "one" { return &StandardGetSetter[any]{ Getter: func(context.Context, any) (any, error) { return 3.1, nil }, }, nil } - return nil, fmt.Errorf("bad path %v", val) + return nil, fmt.Errorf("bad path %v", p) } func one[K any]() (ExprFunc[K], error) { @@ -66,7 +66,7 @@ func testTime[K any](time string, format string) (ExprFunc[K], error) { if err != nil { return nil, err } - return func(_ context.Context, tCtx K) (any, error) { + return func(_ context.Context, _ K) (any, error) { timestamp, err := timeutils.ParseStrptime(format, time, loc) return timestamp, err }, nil @@ -74,7 +74,7 @@ func testTime[K any](time string, format string) (ExprFunc[K], error) { func testDuration[K any](duration string) (ExprFunc[K], error) { if duration != "" { - return func(_ context.Context, tCtx K) (any, error) { + return func(_ context.Context, _ K) (any, error) { dur, err := time.ParseDuration(duration) return dur, err }, nil @@ -234,7 +234,7 @@ func Test_evaluateMathExpression(t *testing.T) { p, _ := NewParser[any]( functions, - mathParsePath, + mathParsePath[any], componenttest.NewNopTelemetrySettings(), WithEnumParser[any](testParseEnum), ) @@ -269,7 +269,7 @@ func Test_evaluateMathExpression_error(t *testing.T) { input: "1 / 0", }, { - name: "time DIV time", + name: "time div time", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -294,7 +294,7 @@ func Test_evaluateMathExpression_error(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: DIV, + Operator: div, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -322,7 +322,7 @@ func Test_evaluateMathExpression_error(t *testing.T) { errorMsg: "only addition and subtraction supported", }, { - name: "dur MULT dur", + name: "dur mult dur", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -342,7 +342,7 @@ func Test_evaluateMathExpression_error(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: MULT, + Operator: mult, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -365,7 +365,7 @@ func Test_evaluateMathExpression_error(t *testing.T) { errorMsg: "only addition and subtraction supported", }, { - name: "time ADD int", + name: "time add int", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -390,7 +390,7 @@ func Test_evaluateMathExpression_error(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: ADD, + Operator: add, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -404,7 +404,7 @@ func Test_evaluateMathExpression_error(t *testing.T) { errorMsg: "time.Time must be added to time.Duration", }, { - name: "dur SUB int", + name: "dur sub int", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -424,7 +424,7 @@ func Test_evaluateMathExpression_error(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: SUB, + Operator: sub, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -438,7 +438,7 @@ func Test_evaluateMathExpression_error(t *testing.T) { errorMsg: "time.Duration must be subtracted from time.Duration", }, { - name: "time ADD time", + name: "time add time", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -463,7 +463,7 @@ func Test_evaluateMathExpression_error(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: ADD, + Operator: add, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -491,7 +491,7 @@ func Test_evaluateMathExpression_error(t *testing.T) { errorMsg: "time.Time must be added to time.Duration", }, { - name: "dur SUB time", + name: "dur sub time", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -511,7 +511,7 @@ func Test_evaluateMathExpression_error(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: SUB, + Operator: sub, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -556,7 +556,7 @@ func Test_evaluateMathExpression_error(t *testing.T) { p, _ := NewParser[any]( functions, - mathParsePath, + mathParsePath[any], componenttest.NewNopTelemetrySettings(), WithEnumParser[any](testParseEnum), ) @@ -606,7 +606,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { p, _ := NewParser( functions, - mathParsePath, + mathParsePath[any], componenttest.NewNopTelemetrySettings(), WithEnumParser[any](testParseEnum), ) @@ -629,7 +629,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { expected any }{ { - name: "time SUB time, no difference", + name: "time sub time, no difference", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -654,7 +654,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: SUB, + Operator: sub, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -682,7 +682,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { expected: zeroSecs, }, { - name: "time SUB time", + name: "time sub time", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -707,7 +707,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: SUB, + Operator: sub, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -735,7 +735,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { expected: -fourtySevenHourseFourtyTwoMinutesTwentySevenSecs, }, { - name: "dur ADD time", + name: "dur add time", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -755,7 +755,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: ADD, + Operator: add, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -783,7 +783,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { expected: time.Date(2000, 1, 1, 10, 0, 0, 0, time.Local), }, { - name: "time ADD dur", + name: "time add dur", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -808,7 +808,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: ADD, + Operator: add, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -831,7 +831,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { expected: time.Date(2023, 2, 15, 10, 0, 0, 0, time.Local), }, { - name: "time ADD dur, complex dur", + name: "time add dur, complex dur", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -856,7 +856,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: ADD, + Operator: add, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -879,7 +879,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { expected: time.Date(2023, 2, 4, 1, 2, 3, 0, time.Local), }, { - name: "time SUB dur, complex dur", + name: "time sub dur, complex dur", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -904,7 +904,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: SUB, + Operator: sub, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -927,7 +927,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { expected: time.Date(2023, 3, 14, 6, 0, 1, 0, time.Local), }, { - name: "time SUB dur, nanosecs", + name: "time sub dur, nanosecs", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -952,7 +952,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: SUB, + Operator: sub, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -975,7 +975,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { expected: time.Date(2023, 4, 30, 23, 59, 59, 999999900, time.Local), }, { - name: "dur ADD dur, complex durs", + name: "dur add dur, complex durs", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -995,7 +995,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: ADD, + Operator: add, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -1018,7 +1018,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { expected: oneHundredOne, }, { - name: "dur ADD dur, zero dur", + name: "dur add dur, zero dur", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -1038,7 +1038,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: ADD, + Operator: add, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -1061,7 +1061,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { expected: oneThousandHours, }, { - name: "dur SUB dur, zero dur", + name: "dur sub dur, zero dur", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -1081,7 +1081,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: SUB, + Operator: sub, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -1104,7 +1104,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { expected: -threeTwentyEightMins, }, { - name: "dur SUB dur, complex durs", + name: "dur sub dur, complex durs", mathExpr: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ @@ -1124,7 +1124,7 @@ func Test_evaluateMathExpressionTimeDuration(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: SUB, + Operator: sub, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ diff --git a/pkg/ottl/ottlfuncs/README.md b/pkg/ottl/ottlfuncs/README.md index 554829b6b177..9b8aff6ffdd3 100644 --- a/pkg/ottl/ottlfuncs/README.md +++ b/pkg/ottl/ottlfuncs/README.md @@ -5,9 +5,21 @@ interact with OTel data via the Collector's internal data model, [pdata](https:/ This document contains documentation for both types of OTTL functions: -- [Functions](#functions) that transform telemetry. +- [Editors](#editors) that transform telemetry. - [Converters](#converters) that provide utilities for transforming telemetry. +## Design principles + +For the standard OTTL functions described in this document, we specify design principles to ensure they are always +secure and safe for use: + +- Built-in OTTL functions may not access the file system, network, or any other I/O devices. +- Built-in OTTL functions may share information only through their parameters and results. +- Built-in OTTL functions must be terminating; they must not loop forever. + +OTTL functions are implemented in Go, and so are only limited by what can be implemented in a Go program. +User-defined OTTL functions may therefore not adhere the above principles. + ## Working with functions Functions generally expect specific types to be returned by `Paths`. @@ -35,6 +47,7 @@ Available Editors: - [delete_key](#delete_key) - [delete_matching_keys](#delete_matching_keys) +- [flatten](#flatten) - [keep_keys](#keep_keys) - [limit](#limit) - [merge_maps](#merge_maps) @@ -49,9 +62,9 @@ Available Editors: `delete_key(target, key)` -The `delete_key` function removes a key from a `pdata.Map` +The `delete_key` function removes a key from a `pcommon.Map` -`target` is a path expression to a `pdata.Map` type field. `key` is a string that is a key in the map. +`target` is a path expression to a `pcommon.Map` type field. `key` is a string that is a key in the map. The key will be deleted from the map. @@ -66,9 +79,9 @@ Examples: `delete_matching_keys(target, pattern)` -The `delete_matching_keys` function removes all keys from a `pdata.Map` that match a regex pattern. +The `delete_matching_keys` function removes all keys from a `pcommon.Map` that match a regex pattern. -`target` is a path expression to a `pdata.Map` type field. `pattern` is a regex string. +`target` is a path expression to a `pcommon.Map` type field. `pattern` is a regex string. All keys that match the pattern will be deleted from the map. @@ -79,13 +92,99 @@ Examples: - `delete_matching_keys(resource.attributes, "(?i).*password.*")` +### flatten + +`flatten(target, Optional[prefix], Optional[depth])` + +The `flatten` function flattens a `pcommon.Map` by moving items from nested maps to the root. + +`target` is a path expression to a `pcommon.Map` type field. `prefix` is an optional string. `depth` is an optional non-negative int. + +For example, the following map + +```json +{ + "name": "test", + "address": { + "street": "first", + "house": 1234 + }, + "occupants": ["user 1", "user 2"] +} +``` + +is converted to + +```json +{ + "name": "test", + "address.street": "first", + "address.house": 1234, + "occupants.0": "user 1", + "occupants.1": "user 2" +} +``` + +If `prefix` is supplied, it will be appended to the start of the new keys. This can help you namespace the changes. For example, if in the above example a `prefix` of `app` was configured, the result would be + +```json +{ + "app.name": "test", + "app.address.street": "first", + "app.address.house": 1234, + "app.occupants.0": "user 1", + "app.occupants.1": "user 2" +} +``` + +If `depth` is supplied, the function will only flatten nested maps up to that depth. For example, if a `depth` of `2` was configured, the following map + +```json +{ + "0": { + "1": { + "2": { + "3": { + "4": "value" + } + } + } + } +} +``` + +the result would be + +```json +{ + "0.1.2": { + "3": { + "4": "value" + } + } +} +``` + +A `depth` of `0` means that no flattening will occur. + +Examples: + +- `flatten(attributes)` + + +- `flatten(cache, "k8s", 4)` + + +- `flatten(body, depth=2)` + + ### keep_keys `keep_keys(target, keys[])` -The `keep_keys` function removes all keys from the `pdata.Map` that do not match one of the supplied keys. +The `keep_keys` function removes all keys from the `pcommon.Map` that do not match one of the supplied keys. -`target` is a path expression to a `pdata.Map` type field. `keys` is a slice of one or more strings. +`target` is a path expression to a `pcommon.Map` type field. `keys` is a slice of one or more strings. The map will be changed to only contain the keys specified by the list of strings. @@ -100,9 +199,9 @@ Examples: `limit(target, limit, priority_keys[])` -The `limit` function reduces the number of elements in a `pdata.Map` to be no greater than the limit. +The `limit` function reduces the number of elements in a `pcommon.Map` to be no greater than the limit. -`target` is a path expression to a `pdata.Map` type field. `limit` is a non-negative integer. +`target` is a path expression to a `pcommon.Map` type field. `limit` is a non-negative integer. `priority_keys` is a list of strings of attribute keys that won't be dropped during limiting. The number of priority keys must be less than the supplied `limit`. @@ -125,7 +224,7 @@ Examples: The `merge_maps` function merges the source map into the target map using the supplied strategy to handle conflicts. -`target` is a `pdata.Map` type field. `source` is a `pdata.Map` type field. `strategy` is a string that must be one of `insert`, `update`, or `upsert`. +`target` is a `pcommon.Map` type field. `source` is a `pcommon.Map` type field. `strategy` is a string that must be one of `insert`, `update`, or `upsert`. If strategy is: @@ -147,48 +246,43 @@ Examples: ### replace_all_matches -`replace_all_matches(target, pattern, replacement, function)` +`replace_all_matches(target, pattern, replacement, Optional[function], Optional[replacementFormat])` The `replace_all_matches` function replaces any matching string value with the replacement string. -`target` is a path expression to a `pdata.Map` type field. `pattern` is a string following [filepath.Match syntax](https://pkg.go.dev/path/filepath#Match). `replacement` is either a path expression to a string telemetry field or a literal string. `function` is an optional argument that can take in any Converter that accepts a (`replacement`) string and returns a string. An example is a hash function that replaces any matching string with the hash value of `replacement`. +`target` is a path expression to a `pcommon.Map` type field. `pattern` is a string following [filepath.Match syntax](https://pkg.go.dev/path/filepath#Match). `replacement` is either a path expression to a string telemetry field or a literal string. `function` is an optional argument that can take in any Converter that accepts a (`replacement`) string and returns a string. An example is a hash function that replaces any matching string with the hash value of `replacement`. +`replacementFormat` is an optional string argument that specifies the format of the replacement. It must contain exactly one `%s` format specifier as shown in the example below. No other format specifiers are supported. Each string value in `target` that matches `pattern` will get replaced with `replacement`. Non-string values are ignored. -There is currently a bug with OTTL that does not allow the pattern to end with `\\"`. -[See Issue 23238 for details](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23238). - Examples: - `replace_all_matches(attributes, "/user/*/list/*", "/user/{userId}/list/{listId}")` -- `replace_all_matches(attributes, "/user/*/list/*", "/user/{userId}/list/{listId}", SHA256)` +- `replace_all_matches(attributes, "/user/*/list/*", "/user/{userId}/list/{listId}", SHA256, "/user/%s")` ### replace_all_patterns -`replace_all_patterns(target, mode, regex, replacement, function)` +`replace_all_patterns(target, mode, regex, replacement, Optional[function], Optional[replacementFormat])` The `replace_all_patterns` function replaces any segments in a string value or key that match the regex pattern with the replacement string. -`target` is a path expression to a `pdata.Map` type field. `regex` is a regex string indicating a segment to replace. `replacement` is either a path expression to a string telemetry field or a literal string. +`target` is a path expression to a `pcommon.Map` type field. `regex` is a regex string indicating a segment to replace. `replacement` is either a path expression to a string telemetry field or a literal string. `mode` determines whether the match and replace will occur on the map's value or key. Valid values are `key` and `value`. If one or more sections of `target` match `regex` they will get replaced with `replacement`. -The `replacement` string can refer to matched groups using [regexp.Expand syntax](https://pkg.go.dev/regexp#Regexp.Expand). +The `replacement` string can refer to matched groups using [regexp.Expand syntax](https://pkg.go.dev/regexp#Regexp.Expand). `replacementFormat` is an optional string argument that specifies the format of the replacement. It must contain exactly one `%s` format specifier as shown in the example below. No other format specifiers are supported. The `function` is an optional argument that can take in any Converter that accepts a (`replacement`) string and returns a string. An example is a hash function that replaces any matching regex pattern with the hash value of `replacement`. -There is currently a bug with OTTL that does not allow the pattern to end with `\\"`. -If your pattern needs to end with backslashes, add something inconsequential to the end of the pattern such as `{1}`, `$`, or `.*`. -[See Issue 23238 for details](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23238). - Examples: - `replace_all_patterns(attributes, "value", "/account/\\d{4}", "/account/{accountId}")` - `replace_all_patterns(attributes, "key", "/account/\\d{4}", "/account/{accountId}")` - `replace_all_patterns(attributes, "key", "^kube_([0-9A-Za-z]+_)", "k8s.$$1.")` -- `replace_all_patterns(attributes, "key", "^kube_([0-9A-Za-z]+_)", "k8s.$$1.", SHA256)` +- `replace_all_patterns(attributes, "key", "^kube_([0-9A-Za-z]+_)", "$$1.")` +- `replace_all_patterns(attributes, "key", "^kube_([0-9A-Za-z]+_)", "$$1.", SHA256, "k8s.%s")` Note that when using OTTL within the collector's configuration file, `$` must be escaped to `$$` to bypass environment variable substitution logic. To input a literal `$` from the configuration file, use `$$$`. @@ -196,27 +290,25 @@ If using OTTL outside of collector configuration, `$` should not be escaped and ### replace_match -`replace_match(target, pattern, replacement, function)` +`replace_match(target, pattern, replacement, Optional[function], Optional[replacementFormat])` The `replace_match` function allows replacing entire strings if they match a glob pattern. `target` is a path expression to a telemetry field. `pattern` is a string following [filepath.Match syntax](https://pkg.go.dev/path/filepath#Match). `replacement` is either a path expression to a string telemetry field or a literal string. +`replacementFormat` is an optional string argument that specifies the format of the replacement. It must contain exactly one `%s` format specifier as shown in the example below. No other format specifiers are supported. If `target` matches `pattern` it will get replaced with `replacement`. The `function` is an optional argument that can take in any Converter that accepts a (`replacement`) string and returns a string. An example is a hash function that replaces any matching glob pattern with the hash value of `replacement`. -There is currently a bug with OTTL that does not allow the pattern to end with `\\"`. -[See Issue 23238 for details](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23238). - Examples: - `replace_match(attributes["http.target"], "/user/*/list/*", "/user/{userId}/list/{listId}")` -- `replace_match(attributes["http.target"], "/user/*/list/*", "/user/{userId}/list/{listId}", SHA256)` +- `replace_match(attributes["http.target"], "/user/*/list/*", "/user/{userId}/list/{listId}", SHA256, "/user/%s")` ### replace_pattern -`replace_pattern(target, regex, replacement, function)` +`replace_pattern(target, regex, replacement, Optional[function], Optional[replacementFormat])` The `replace_pattern` function allows replacing all string sections that match a regex pattern with a new value. @@ -224,19 +316,15 @@ The `replace_pattern` function allows replacing all string sections that match a If one or more sections of `target` match `regex` they will get replaced with `replacement`. -The `replacement` string can refer to matched groups using [regexp.Expand syntax](https://pkg.go.dev/regexp#Regexp.Expand). +The `replacement` string can refer to matched groups using [regexp.Expand syntax](https://pkg.go.dev/regexp#Regexp.Expand). `replacementFormat` is an optional string argument that specifies the format of the replacement. It must contain exactly one `%s` format specifier as shown in the example below. No other format specifiers are supported The `function` is an optional argument that can take in any Converter that accepts a (`replacement`) string and returns a string. An example is a hash function that replaces a matching regex pattern with the hash value of `replacement`. -There is currently a bug with OTTL that does not allow the pattern to end with `\\"`. -If your pattern needs to end with backslashes, add something inconsequential to the end of the pattern such as `{1}`, `$`, or `.*`. -[See Issue 23238 for details](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23238). - Examples: - `replace_pattern(resource.attributes["process.command_line"], "password\\=[^\\s]*(\\s?)", "password=***")` - `replace_pattern(name, "^kube_([0-9A-Za-z]+_)", "k8s.$$1.")` -- `replace_pattern(name, "^kube_([0-9A-Za-z]+_)", "k8s.$$1.", SHA256)` +- `replace_pattern(name, "^kube_([0-9A-Za-z]+_)", "$$1.", SHA256, "k8s.%s")` Note that when using OTTL within the collector's configuration file, `$` must be escaped to `$$` to bypass environment variable substitution logic. To input a literal `$` from the configuration file, use `$$$`. @@ -269,9 +357,9 @@ Examples: `truncate_all(target, limit)` -The `truncate_all` function truncates all string values in a `pdata.Map` so that none are longer than the limit. +The `truncate_all` function truncates all string values in a `pcommon.Map` so that none are longer than the limit. -`target` is a path expression to a `pdata.Map` type field. `limit` is a non-negative integer. +`target` is a path expression to a `pcommon.Map` type field. `limit` is a non-negative integer. The map will be mutated such that the number of characters in all string values is less than or equal to the limit. Non-string values are ignored. @@ -289,15 +377,19 @@ Unlike functions, they do not modify any input telemetry and always return a val Available Converters: +- [Base64Decode](#base64decode) - [Concat](#concat) - [ConvertCase](#convertcase) - [ExtractPatterns](#extractpatterns) - [FNV](#fnv) +- [Hour](#hour) - [Hours](#hours) - [Double](#double) - [Duration](#duration) - [Int](#int) - [IsBool](#isbool) +- [IsDouble](#isdouble) +- [IsInt](#isint) - [IsMap](#ismap) - [IsMatch](#ismatch) - [IsString](#isstring) @@ -308,22 +400,42 @@ Available Converters: - [Minutes](#minutes) - [Nanoseconds](#nanoseconds) - [Now](#now) +- [ParseCSV](#parsecsv) - [ParseJSON](#parsejson) +- [ParseKeyValue](#parsekeyvalue) +- [ParseXML](#parsexml) - [Seconds](#seconds) - [SHA1](#sha1) - [SHA256](#sha256) - [SpanID](#spanid) - [Split](#split) +- [String](#string) - [Substring](#substring) - [Time](#time) - [TraceID](#traceid) - [TruncateTime](#truncatetime) +- [Unix](#unix) - [UnixMicro](#unixmicro) - [UnixMilli](#unixmilli) - [UnixNano](#unixnano) - [UnixSeconds](#unixseconds) - [UUID](#UUID) +### Base64Decode + +`Base64Decode(value)` + +The `Base64Decode` Converter takes a base64 encoded string and returns the decoded string. + +`value` is a valid base64 encoded string. + +Examples: + +- `Base64Decode("aGVsbG8gd29ybGQ=")` + + +- `Base64Decode(attributes["encoded field"])` + ### Concat `Concat(values[], delimiter)` @@ -441,6 +553,20 @@ Examples: - `FNV("name")` +### Hour + +`Hour(value)` + +The `Hour` Converter returns the hour from the specified time. The Converter [uses the `time.Hour` function](https://pkg.go.dev/time#Time.Hour). + +`value` is a `time.Time`. If `value` is another type an error is returned. + +The returned type is `int64`. + +Examples: + +- `Hour(Now())` + ### Hours `Hours(value)` @@ -507,6 +633,38 @@ Examples: - `IsBool(attributes["any key"])` +### IsDouble + +`IsDouble(value)` + +The `IsDouble` Converter returns true if the given value is a double. + +The `value` is either a path expression to a telemetry field to retrieve, or a literal. + +If `value` is a `float64` or a `pcommon.ValueTypeDouble` then returns `true`, otherwise returns `false`. + +Examples: + +- `IsDouble(body)` + +- `IsDouble(attributes["maybe a double"])` + +### IsInt + +`IsInt(value)` + +The `IsInt` Converter returns true if the given value is a int. + +The `value` is either a path expression to a telemetry field to retrieve, or a literal. + +If `value` is a `int64` or a `pcommon.ValueTypeInt` then returns `true`, otherwise returns `false`. + +Examples: + +- `IsInt(body)` + +- `IsInt(attributes["maybe a int"])` + ### IsMap `IsMap(value)` @@ -543,9 +701,6 @@ If target is not a string, it will be converted to one: If target is nil, false is always returned. -There is currently a bug with OTTL that does not allow the target string to end with `\\"`. -[See Issue 23238 for details](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23238). - Examples: - `IsMatch(attributes["http.path"], "foo")` @@ -587,7 +742,7 @@ Examples: `Log(value)` -The `Log` Converter returns the logarithm of the `target`. +The `Log` Converter returns a `float64` that is the logarithm of the `target`. `target` is either a path expression to a telemetry field to retrieve or a literal. @@ -678,6 +833,38 @@ Examples: - `UnixSeconds(Now())` - `set(start_time, Now())` +### ParseCSV + +`ParseCSV(target, headers, Optional[delimiter], Optional[headerDelimiter], Optional[mode])` + +The `ParseCSV` Converter returns a `pcommon.Map` struct that contains the result of parsing the `target` string as CSV. The resultant map is structured such that it is a mapping of field name -> field value. + +`target` is a Getter that returns a string. This string should be a CSV row. if `target` is not a properly formatted CSV row, or if the number of fields in `target` does not match the number of fields in `headers`, `ParseCSV` will return an error. Leading and trailing newlines in `target` will be stripped. Newlines elswhere in `target` are not treated as row delimiters during parsing, and will be treated as though they are part of the field that are placed in. + +`headers` is a Getter that returns a string. This string should be a CSV header, specifying the names of the CSV fields. + +`delimiter` is an optional string parameter that specifies the delimiter used to split `target` into fields. By default, it is set to `,`. + +`headerDelimiter` is an optional string parameter that specified the delimiter used to split `headers` into fields. By default, it is set to the value of `delimiter`. + +`mode` is an optional string paramater that specifies the parsing mode. Valid values are `strict`, `lazyQuotes`, and `ignoreQuotes`. By default, it is set to `strict`. +- The `strict` mode provides typical CSV parsing. +- The `lazyQotes` mode provides a relaxed version of CSV parsing where a quote may appear in the middle of a unquoted field. +- The `ignoreQuotes` mode completely ignores any quoting rules for CSV and just splits the row on the delimiter. + +Examples: + +- `ParseCSV("999-999-9999,Joe Smith,joe.smith@example.com", "phone,name,email")` + + +- `ParseCSV(body, "phone|name|email", delimiter="|")` + + +- `ParseCSV(attributes["csv_line"], attributes["csv_headers"], delimiter="|", headerDelimiter=",", mode="lazyQuotes")` + + +- `ParseCSV("\"555-555-5556,Joe Smith\",joe.smith@example.com", "phone,name,email", mode="ignoreQuotes")` + ### ParseJSON `ParseJSON(target)` @@ -709,6 +896,98 @@ Examples: - `ParseJSON(body)` +### ParseKeyValue + +`ParseKeyValue(target, Optional[delimiter], Optional[pair_delimiter])` + +The `ParseKeyValue` Converter returns a `pcommon.Map` that is a result of parsing the target string for key value pairs. + +`target` is a Getter that returns a string. If the returned string is empty, an error will be returned. `delimiter` is an optional string that is used to split the key and value in a pair, the default is `=`. `pair_delimiter` is an optional string that is used to split key value pairs, the default is a single space (` `). + +For example, the following target `"k1=v1 k2=v2 k3=v3"` will use default delimiters and be parsed into the following map: +``` +{ "k1": "v1", "k2": "v2", "k3": "v3" } +``` + +Examples: + +- `ParseKeyValue("k1=v1 k2=v2 k3=v3")` +- `ParseKeyValue("k1!v1_k2!v2_k3!v3", "!", "_")` +- `ParseKeyValue(attributes["pairs"])` + + +### ParseXML + +`ParseXML(target)` + +The `ParseXML` Converter returns a `pcommon.Map` struct that is the result of parsing the target string as an XML document. + +`target` is a Getter that returns a string. This string should be in XML format. +If `target` is not a string, nil, or cannot be parsed as XML, `ParseXML` will return an error. + +Unmarshalling XML is done using the following rules: +1. All character data for an XML element is trimmed, joined, and placed into the `content` field. +2. The tag for an XML element is trimmed, and placed into the `tag` field. +3. The attributes for an XML element is placed as a `pcommon.Map` into the `attribute` field. +4. Processing instructions, directives, and comments are ignored and not represented in the resultant map. +5. All child elements are parsed as above, and placed in a `pcommon.Slice`, which is then placed into the `children` field. + +For example, the following XML document: +```xml + + + + 00001 + Joe + joe.smith@example.com + + User fired alert A + +``` + +will be parsed as: +```json +{ + "tag": "Log", + "children": [ + { + "tag": "User", + "children": [ + { + "tag": "ID", + "content": "00001" + }, + { + "tag": "Name", + "content": "Joe", + "attributes": { + "type": "first" + } + }, + { + "tag": "Email", + "content": "joe.smith@example.com" + } + ] + }, + { + "tag": "Text", + "content": "User fired alert A" + } + ] +} +``` + +Examples: + +- `ParseXML(body)` + +- `ParseXML(attributes["xml"])` + +- `ParseXML("")` + + + ### Seconds `Seconds(value)` @@ -787,13 +1066,37 @@ The `Split` Converter separates a string by the delimiter, and returns an array If the `target` is not a string or does not exist, the `Split` Converter will return an error. -There is currently a bug with OTTL that does not allow the target string to end with `\\"`. -[See Issue 23238 for details](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23238). - Examples: - `Split("A|B|C", "|")` +### String + +`String(value)` + +The `String` Converter converts the `value` to string type. + +The returned type is `string`. + +- string. The function returns the `value` without changes. +- []byte. The function returns the `value` as a string encoded in hexadecimal. +- map. The function returns the `value` as a key-value-pair of type string. +- slice. The function returns the `value` as a list formatted string. +- pcommon.Value. The function returns the `value` as a string type. + +If `value` is of another type it gets marshalled to string type. +If `value` is empty, or parsing failed, nil is always returned. + +The `value` is either a path expression to a telemetry field to retrieve, or a literal. + +Examples: + +- `String("test")` +- `String(attributes["http.method"])` +- `String(span_id)` +- `String([1,2,3])` +- `String(false)` + ### Substring `Substring(target, start, length)` @@ -847,6 +1150,21 @@ Examples: - `TruncateTime(start_time, Duration("1s"))` +### Unix + +`Unix(seconds, Optional[nanoseconds])` + +The `Unix` Converter returns an epoch timestamp as a Unix time. Similar to [Golang's Unix function](https://pkg.go.dev/time#Unix). + +`seconds` is `int64`. If `seconds` is another type an error is returned. +`nanoseconds` is `int64`. It is optional and its default value is 0. If `nanoseconds` is another type an error is returned. + +The returned type is `time.Time`. + +Examples: + +- `Unix(1672527600)` + ### UnixMicro `UnixMicro(value)` diff --git a/pkg/ottl/ottlfuncs/func_base64decode.go b/pkg/ottl/ottlfuncs/func_base64decode.go new file mode 100644 index 000000000000..42e401d71505 --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_base64decode.go @@ -0,0 +1,45 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "encoding/base64" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type Base64DecodeArguments[K any] struct { + Target ottl.StringGetter[K] +} + +func NewBase64DecodeFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("Base64Decode", &Base64DecodeArguments[K]{}, createBase64DecodeFunction[K]) +} + +func createBase64DecodeFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*Base64DecodeArguments[K]) + + if !ok { + return nil, fmt.Errorf("Base64DecodeFactory args must be of type *Base64DecodeArguments[K]") + } + + return Base64Decode(args.Target) +} + +func Base64Decode[K any](target ottl.StringGetter[K]) (ottl.ExprFunc[K], error) { + + return func(ctx context.Context, tCtx K) (any, error) { + val, err := target.Get(ctx, tCtx) + if err != nil { + return nil, err + } + base64string, err := base64.StdEncoding.DecodeString(val) + if err != nil { + return nil, err + } + return string(base64string), nil + }, nil +} diff --git a/pkg/ottl/ottlfuncs/func_base64decode_test.go b/pkg/ottl/ottlfuncs/func_base64decode_test.go new file mode 100644 index 000000000000..e6abf925fd98 --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_base64decode_test.go @@ -0,0 +1,92 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +func Test_Base64Decode(t *testing.T) { + tests := []struct { + name string + value any + expected any + err bool + }{ + { + name: "base64-string", + value: "aGVsbG8gd29ybGQ=", + expected: "hello world", + }, + { + name: "empty string", + value: "", + expected: "", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + exprFunc, err := Base64Decode[any](&ottl.StandardStringGetter[any]{ + Getter: func(context.Context, any) (any, error) { + return tt.value, nil + }, + }) + assert.NoError(t, err) + result, err := exprFunc(nil, nil) + if tt.err { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + assert.Equal(t, tt.expected, result) + }) + } +} + +func Test_Base64DecodeError(t *testing.T) { + tests := []struct { + name string + value any + err bool + expectedError string + }{ + { + name: "non-string", + value: 10, + expectedError: "expected string but got int", + }, + { + name: "nil", + value: nil, + expectedError: "expected string but got nil", + }, + { + name: "not-base64-string", + value: "!@#$%^&*()_+", + expectedError: "illegal base64 data at input byte", + }, + { + name: "missing-base64-padding", + value: "cmVtb3ZlZCBwYWRkaW5nCg", + expectedError: "illegal base64 data at input byte", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + exprFunc, err := Base64Decode[any](&ottl.StandardStringGetter[any]{ + Getter: func(context.Context, any) (any, error) { + return tt.value, nil + }, + }) + assert.NoError(t, err) + _, err = exprFunc(nil, nil) + assert.ErrorContains(t, err, tt.expectedError) + }) + } +} diff --git a/pkg/ottl/ottlfuncs/func_concat_test.go b/pkg/ottl/ottlfuncs/func_concat_test.go index 6bb9db510882..ff4c6f2f3c52 100644 --- a/pkg/ottl/ottlfuncs/func_concat_test.go +++ b/pkg/ottl/ottlfuncs/func_concat_test.go @@ -24,12 +24,12 @@ func Test_concat(t *testing.T) { name: "concat strings", vals: []ottl.StandardStringLikeGetter[any]{ { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "hello", nil }, }, { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "world", nil }, }, @@ -41,17 +41,17 @@ func Test_concat(t *testing.T) { name: "nil", vals: []ottl.StandardStringLikeGetter[any]{ { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "hello", nil }, }, { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "world", nil }, }, @@ -63,12 +63,12 @@ func Test_concat(t *testing.T) { name: "integers", vals: []ottl.StandardStringLikeGetter[any]{ { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "hello", nil }, }, { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return int64(1), nil }, }, @@ -80,12 +80,12 @@ func Test_concat(t *testing.T) { name: "floats", vals: []ottl.StandardStringLikeGetter[any]{ { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "hello", nil }, }, { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 3.14159, nil }, }, @@ -97,12 +97,12 @@ func Test_concat(t *testing.T) { name: "booleans", vals: []ottl.StandardStringLikeGetter[any]{ { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "hello", nil }, }, { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return true, nil }, }, @@ -114,7 +114,7 @@ func Test_concat(t *testing.T) { name: "byte slices", vals: []ottl.StandardStringLikeGetter[any]{ { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xd2, 0xe6, 0x3c, 0xbe, 0x71, 0xf5, 0xa8}, nil }, }, @@ -126,14 +126,14 @@ func Test_concat(t *testing.T) { name: "pcommon.Slice", vals: []ottl.StandardStringLikeGetter[any]{ { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { s := pcommon.NewSlice() _ = s.FromRaw([]any{1, 2}) return s, nil }, }, { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { s := pcommon.NewSlice() _ = s.FromRaw([]any{3, 4}) return s, nil @@ -147,14 +147,14 @@ func Test_concat(t *testing.T) { name: "maps", vals: []ottl.StandardStringLikeGetter[any]{ { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { m := pcommon.NewMap() m.PutStr("a", "b") return m, nil }, }, { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { m := pcommon.NewMap() m.PutStr("c", "d") return m, nil @@ -168,17 +168,17 @@ func Test_concat(t *testing.T) { name: "empty string values", vals: []ottl.StandardStringLikeGetter[any]{ { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "", nil }, }, { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "", nil }, }, { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "", nil }, }, @@ -190,7 +190,7 @@ func Test_concat(t *testing.T) { name: "single argument", vals: []ottl.StandardStringLikeGetter[any]{ { - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "hello", nil }, }, @@ -229,7 +229,7 @@ func Test_concat(t *testing.T) { func Test_concat_error(t *testing.T) { target := &ottl.StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return make(chan int), nil }, } diff --git a/pkg/ottl/ottlfuncs/func_convert_case_test.go b/pkg/ottl/ottlfuncs/func_convert_case_test.go index 1e7134f49940..b99b73e3cea3 100644 --- a/pkg/ottl/ottlfuncs/func_convert_case_test.go +++ b/pkg/ottl/ottlfuncs/func_convert_case_test.go @@ -24,7 +24,7 @@ func Test_convertCase(t *testing.T) { { name: "snake simple convert", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "simpleString", nil }, }, @@ -34,7 +34,7 @@ func Test_convertCase(t *testing.T) { { name: "snake noop already snake case", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "simple_string", nil }, }, @@ -44,7 +44,7 @@ func Test_convertCase(t *testing.T) { { name: "snake multiple uppercase", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "CPUUtilizationMetric", nil }, }, @@ -54,7 +54,7 @@ func Test_convertCase(t *testing.T) { { name: "snake hyphens", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "simple-string", nil }, }, @@ -64,7 +64,7 @@ func Test_convertCase(t *testing.T) { { name: "snake empty string", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "", nil }, }, @@ -75,7 +75,7 @@ func Test_convertCase(t *testing.T) { { name: "camel simple convert", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "simple_string", nil }, }, @@ -85,7 +85,7 @@ func Test_convertCase(t *testing.T) { { name: "snake noop already snake case", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "SimpleString", nil }, }, @@ -95,7 +95,7 @@ func Test_convertCase(t *testing.T) { { name: "snake hyphens", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "simple-string", nil }, }, @@ -105,7 +105,7 @@ func Test_convertCase(t *testing.T) { { name: "snake empty string", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "", nil }, }, @@ -116,7 +116,7 @@ func Test_convertCase(t *testing.T) { { name: "upper simple", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "simple", nil }, }, @@ -126,7 +126,7 @@ func Test_convertCase(t *testing.T) { { name: "upper complex", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "complex_SET-of.WORDS1234", nil }, }, @@ -136,7 +136,7 @@ func Test_convertCase(t *testing.T) { { name: "upper empty string", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "", nil }, }, @@ -147,7 +147,7 @@ func Test_convertCase(t *testing.T) { { name: "lower simple", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "SIMPLE", nil }, }, @@ -157,7 +157,7 @@ func Test_convertCase(t *testing.T) { { name: "lower complex", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "complex_SET-of.WORDS1234", nil }, }, @@ -167,7 +167,7 @@ func Test_convertCase(t *testing.T) { { name: "lower empty string", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "", nil }, }, @@ -195,7 +195,7 @@ func Test_convertCaseError(t *testing.T) { { name: "error bad case", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "simpleString", nil }, }, @@ -221,7 +221,7 @@ func Test_convertCaseRuntimeError(t *testing.T) { { name: "non-string", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 10, nil }, }, @@ -231,7 +231,7 @@ func Test_convertCaseRuntimeError(t *testing.T) { { name: "nil", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, diff --git a/pkg/ottl/ottlfuncs/func_delete_key_test.go b/pkg/ottl/ottlfuncs/func_delete_key_test.go index c08fbfce644e..502aee507701 100644 --- a/pkg/ottl/ottlfuncs/func_delete_key_test.go +++ b/pkg/ottl/ottlfuncs/func_delete_key_test.go @@ -20,7 +20,7 @@ func Test_deleteKey(t *testing.T) { input.PutBool("test3", true) target := &ottl.StandardPMapGetter[pcommon.Map]{ - Getter: func(ctx context.Context, tCtx pcommon.Map) (any, error) { + Getter: func(_ context.Context, tCtx pcommon.Map) (any, error) { return tCtx, nil }, } @@ -68,7 +68,7 @@ func Test_deleteKey(t *testing.T) { exprFunc := deleteKey(tt.target, tt.key) _, err := exprFunc(nil, scenarioMap) - assert.Nil(t, err) + assert.NoError(t, err) expected := pcommon.NewMap() tt.want(expected) @@ -81,7 +81,7 @@ func Test_deleteKey(t *testing.T) { func Test_deleteKey_bad_input(t *testing.T) { input := pcommon.NewValueStr("not a map") target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } @@ -95,7 +95,7 @@ func Test_deleteKey_bad_input(t *testing.T) { func Test_deleteKey_get_nil(t *testing.T) { target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } diff --git a/pkg/ottl/ottlfuncs/func_delete_matching_keys_test.go b/pkg/ottl/ottlfuncs/func_delete_matching_keys_test.go index fae9cbfcf525..14627f9ea5ee 100644 --- a/pkg/ottl/ottlfuncs/func_delete_matching_keys_test.go +++ b/pkg/ottl/ottlfuncs/func_delete_matching_keys_test.go @@ -21,7 +21,7 @@ func Test_deleteMatchingKeys(t *testing.T) { input.PutBool("test3", true) target := &ottl.StandardPMapGetter[pcommon.Map]{ - Getter: func(ctx context.Context, tCtx pcommon.Map) (any, error) { + Getter: func(_ context.Context, tCtx pcommon.Map) (any, error) { return tCtx, nil }, } @@ -68,7 +68,7 @@ func Test_deleteMatchingKeys(t *testing.T) { assert.NoError(t, err) _, err = exprFunc(nil, scenarioMap) - assert.Nil(t, err) + assert.NoError(t, err) expected := pcommon.NewMap() tt.want(expected) @@ -81,7 +81,7 @@ func Test_deleteMatchingKeys(t *testing.T) { func Test_deleteMatchingKeys_bad_input(t *testing.T) { input := pcommon.NewValueInt(1) target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } @@ -95,7 +95,7 @@ func Test_deleteMatchingKeys_bad_input(t *testing.T) { func Test_deleteMatchingKeys_get_nil(t *testing.T) { target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } @@ -108,7 +108,7 @@ func Test_deleteMatchingKeys_get_nil(t *testing.T) { func Test_deleteMatchingKeys_invalid_pattern(t *testing.T) { target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { t.Errorf("nothing should be received in this scenario") return nil, nil }, diff --git a/pkg/ottl/ottlfuncs/func_duration_test.go b/pkg/ottl/ottlfuncs/func_duration_test.go index fecb19c1e9d6..3736942ef00a 100644 --- a/pkg/ottl/ottlfuncs/func_duration_test.go +++ b/pkg/ottl/ottlfuncs/func_duration_test.go @@ -23,7 +23,7 @@ func Test_Duration(t *testing.T) { { name: "100 milliseconds", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "100ms", nil }, }, @@ -31,7 +31,7 @@ func Test_Duration(t *testing.T) { }, { name: "234 microseconds", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "234us", nil }, }, @@ -39,7 +39,7 @@ func Test_Duration(t *testing.T) { }, { name: "777 nanoseconds", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "777ns", nil }, }, @@ -48,7 +48,7 @@ func Test_Duration(t *testing.T) { { name: "one second", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "1s", nil }, }, @@ -57,7 +57,7 @@ func Test_Duration(t *testing.T) { { name: "two hundred second", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "200s", nil }, }, @@ -66,7 +66,7 @@ func Test_Duration(t *testing.T) { { name: "three minutes", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "3m", nil }, }, @@ -75,7 +75,7 @@ func Test_Duration(t *testing.T) { { name: "45 minutes", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "45m", nil }, }, @@ -84,7 +84,7 @@ func Test_Duration(t *testing.T) { { name: "7 mins, 12 secs", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "7m12s", nil }, }, @@ -93,7 +93,7 @@ func Test_Duration(t *testing.T) { { name: "4 hours", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "4h", nil }, }, @@ -102,7 +102,7 @@ func Test_Duration(t *testing.T) { { name: "5 hours, 23 mins, 59 secs", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "5h23m59s", nil }, }, @@ -111,7 +111,7 @@ func Test_Duration(t *testing.T) { { name: "5 hours, 59 secs", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "5h59s", nil }, }, @@ -120,7 +120,7 @@ func Test_Duration(t *testing.T) { { name: "5 hours, 23 mins", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "5h23m", nil }, }, @@ -129,7 +129,7 @@ func Test_Duration(t *testing.T) { { name: "2 mins, 1 sec, 64 microsecs", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "2m1s64us", nil }, }, @@ -138,7 +138,7 @@ func Test_Duration(t *testing.T) { { name: "59 hours, 1 min, 78 millisecs", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "59h1m78ms", nil }, }, @@ -165,7 +165,7 @@ func Test_DurationError(t *testing.T) { { name: "empty duration", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "", nil }, }, @@ -174,7 +174,7 @@ func Test_DurationError(t *testing.T) { { name: "empty duration", duration: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "one second", nil }, }, diff --git a/pkg/ottl/ottlfuncs/func_extract_patterns_test.go b/pkg/ottl/ottlfuncs/func_extract_patterns_test.go index ac2b5280e1ee..84db3edfe241 100644 --- a/pkg/ottl/ottlfuncs/func_extract_patterns_test.go +++ b/pkg/ottl/ottlfuncs/func_extract_patterns_test.go @@ -16,7 +16,7 @@ import ( func Test_extractPatterns(t *testing.T) { target := &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return `a=b c=d`, nil }, } @@ -39,7 +39,7 @@ func Test_extractPatterns(t *testing.T) { name: "no pattern found", target: target, pattern: `^a=(?P\w+)$`, - want: func(expectedMap pcommon.Map) {}, + want: func(_ pcommon.Map) {}, }, } for _, tt := range tests { @@ -57,7 +57,7 @@ func Test_extractPatterns(t *testing.T) { tt.want(expected) assert.Equal(t, expected.Len(), resultMap.Len()) - expected.Range(func(k string, v pcommon.Value) bool { + expected.Range(func(k string, _ pcommon.Value) bool { ev, _ := expected.Get(k) av, _ := resultMap.Get(k) assert.Equal(t, ev, av) @@ -76,7 +76,7 @@ func Test_extractPatterns_validation(t *testing.T) { { name: "bad regex", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "foobar", nil }, }, @@ -85,7 +85,7 @@ func Test_extractPatterns_validation(t *testing.T) { { name: "no named capture group", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "foobar", nil }, }, @@ -110,7 +110,7 @@ func Test_extractPatterns_bad_input(t *testing.T) { { name: "target is non-string", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 123, nil }, }, @@ -119,7 +119,7 @@ func Test_extractPatterns_bad_input(t *testing.T) { { name: "target is nil", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, diff --git a/pkg/ottl/ottlfuncs/func_flatten.go b/pkg/ottl/ottlfuncs/func_flatten.go new file mode 100644 index 000000000000..44a97b8095bc --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_flatten.go @@ -0,0 +1,81 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "fmt" + "math" + + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type FlattenArguments[K any] struct { + Target ottl.PMapGetter[K] + Prefix ottl.Optional[string] + Depth ottl.Optional[int64] +} + +func NewFlattenFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("flatten", &FlattenArguments[K]{}, createFlattenFunction[K]) +} + +func createFlattenFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*FlattenArguments[K]) + + if !ok { + return nil, fmt.Errorf("FlattenFactory args must be of type *FlattenArguments[K]") + } + + return flatten(args.Target, args.Prefix, args.Depth) +} + +func flatten[K any](target ottl.PMapGetter[K], p ottl.Optional[string], d ottl.Optional[int64]) (ottl.ExprFunc[K], error) { + depth := int64(math.MaxInt64) + if !d.IsEmpty() { + depth = d.Get() + if depth < 0 { + return nil, fmt.Errorf("invalid depth for flatten function, %d cannot be negative", depth) + } + } + + var prefix string + if !p.IsEmpty() { + prefix = p.Get() + } + + return func(ctx context.Context, tCtx K) (any, error) { + m, err := target.Get(ctx, tCtx) + if err != nil { + return nil, err + } + + result := pcommon.NewMap() + flattenHelper(m, result, prefix, 0, depth) + result.CopyTo(m) + + return nil, nil + }, nil +} + +func flattenHelper(m pcommon.Map, result pcommon.Map, prefix string, currentDepth, maxDepth int64) { + if len(prefix) > 0 { + prefix += "." + } + m.Range(func(k string, v pcommon.Value) bool { + switch { + case v.Type() == pcommon.ValueTypeMap && currentDepth < maxDepth: + flattenHelper(v.Map(), result, prefix+k, currentDepth+1, maxDepth) + case v.Type() == pcommon.ValueTypeSlice: + for i := 0; i < v.Slice().Len(); i++ { + v.Slice().At(i).CopyTo(result.PutEmpty(fmt.Sprintf("%v.%v", prefix+k, i))) + } + default: + v.CopyTo(result.PutEmpty(prefix + k)) + } + return true + }) +} diff --git a/pkg/ottl/ottlfuncs/func_flatten_test.go b/pkg/ottl/ottlfuncs/func_flatten_test.go new file mode 100644 index 000000000000..09dfc9648a16 --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_flatten_test.go @@ -0,0 +1,189 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +func Test_flatten(t *testing.T) { + tests := []struct { + name string + target map[string]any + prefix ottl.Optional[string] + depth ottl.Optional[int64] + expected map[string]any + }{ + { + name: "simple", + target: map[string]any{ + "name": "test", + }, + prefix: ottl.Optional[string]{}, + depth: ottl.Optional[int64]{}, + expected: map[string]any{ + "name": "test", + }, + }, + { + name: "nested map", + target: map[string]any{ + "address": map[string]any{ + "street": "first", + "house": int64(1234), + }, + }, + prefix: ottl.Optional[string]{}, + depth: ottl.Optional[int64]{}, + expected: map[string]any{ + "address.street": "first", + "address.house": int64(1234), + }, + }, + { + name: "nested slice", + target: map[string]any{ + "occupants": []any{ + "user 1", + "user 2", + }, + }, + prefix: ottl.Optional[string]{}, + depth: ottl.Optional[int64]{}, + expected: map[string]any{ + "occupants.0": "user 1", + "occupants.1": "user 2", + }, + }, + { + name: "combination", + target: map[string]any{ + "name": "test", + "address": map[string]any{ + "street": "first", + "house": int64(1234), + }, + "occupants": []any{ + "user 1", + "user 2", + }, + }, + prefix: ottl.Optional[string]{}, + depth: ottl.Optional[int64]{}, + expected: map[string]any{ + "name": "test", + "address.street": "first", + "address.house": int64(1234), + "occupants.0": "user 1", + "occupants.1": "user 2", + }, + }, + { + name: "deep nesting", + target: map[string]any{ + "1": map[string]any{ + "2": map[string]any{ + "3": map[string]any{ + "4": "5", + }, + }, + }, + }, + prefix: ottl.Optional[string]{}, + depth: ottl.Optional[int64]{}, + expected: map[string]any{ + "1.2.3.4": "5", + }, + }, + { + name: "use prefix", + target: map[string]any{ + "name": "test", + "address": map[string]any{ + "street": "first", + "house": int64(1234), + }, + "occupants": []any{ + "user 1", + "user 2", + }, + }, + prefix: ottl.NewTestingOptional[string]("app"), + depth: ottl.Optional[int64]{}, + expected: map[string]any{ + "app.name": "test", + "app.address.street": "first", + "app.address.house": int64(1234), + "app.occupants.0": "user 1", + "app.occupants.1": "user 2", + }, + }, + { + name: "max depth", + target: map[string]any{ + "0": map[string]any{ + "1": map[string]any{ + "2": map[string]any{ + "3": "value", + }, + }, + }, + }, + prefix: ottl.Optional[string]{}, + depth: ottl.NewTestingOptional[int64](2), + expected: map[string]any{ + "0.1.2": map[string]any{ + "3": "value", + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + + m := pcommon.NewMap() + err := m.FromRaw(tt.target) + assert.NoError(t, err) + target := ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return m, nil + }, + } + + exprFunc, err := flatten[any](target, tt.prefix, tt.depth) + assert.NoError(t, err) + _, err = exprFunc(nil, nil) + assert.NoError(t, err) + + assert.Equal(t, tt.expected, m.AsRaw()) + }) + } +} +func Test_flatten_bad_target(t *testing.T) { + target := &ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return 1, nil + }, + } + exprFunc, err := flatten[any](target, ottl.Optional[string]{}, ottl.Optional[int64]{}) + assert.NoError(t, err) + _, err = exprFunc(nil, nil) + assert.Error(t, err) +} + +func Test_flatten_bad_depth(t *testing.T) { + target := &ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return pcommon.NewMap(), nil + }, + } + _, err := flatten[any](target, ottl.Optional[string]{}, ottl.NewTestingOptional[int64](-1)) + assert.Error(t, err) +} diff --git a/pkg/ottl/ottlfuncs/func_hour.go b/pkg/ottl/ottlfuncs/func_hour.go new file mode 100644 index 000000000000..3e30fbd1087e --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_hour.go @@ -0,0 +1,38 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type HourArguments[K any] struct { + Time ottl.TimeGetter[K] +} + +func NewHourFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("Hour", &HourArguments[K]{}, createHourFunction[K]) +} +func createHourFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*HourArguments[K]) + + if !ok { + return nil, fmt.Errorf("HourFactory args must be of type *HourArguments[K]") + } + + return Hour(args.Time) +} + +func Hour[K any](t ottl.TimeGetter[K]) (ottl.ExprFunc[K], error) { + return func(ctx context.Context, tCtx K) (any, error) { + time, err := t.Get(ctx, tCtx) + if err != nil { + return nil, err + } + return int64(time.Hour()), nil + }, nil +} diff --git a/pkg/ottl/ottlfuncs/func_hour_test.go b/pkg/ottl/ottlfuncs/func_hour_test.go new file mode 100644 index 000000000000..0ecb2592eaba --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_hour_test.go @@ -0,0 +1,54 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/assert" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +func Test_Hour(t *testing.T) { + tests := []struct { + name string + time ottl.TimeGetter[any] + expected int64 + }{ + { + name: "some time", + time: &ottl.StandardTimeGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return time.Date(2006, time.January, 2, 15, 4, 5, 0, time.UTC), nil + }, + }, + expected: 15, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + exprFunc, err := Hour(tt.time) + assert.NoError(t, err) + result, err := exprFunc(nil, nil) + assert.NoError(t, err) + assert.Equal(t, tt.expected, result) + }) + } +} + +func Test_Hour_Error(t *testing.T) { + var getter ottl.TimeGetter[any] = &ottl.StandardTimeGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "not a time", nil + }, + } + exprFunc, err := Hour(getter) + assert.NoError(t, err) + result, err := exprFunc(context.Background(), nil) + assert.Nil(t, result) + assert.Error(t, err) +} diff --git a/pkg/ottl/ottlfuncs/func_hours_test.go b/pkg/ottl/ottlfuncs/func_hours_test.go index dd899fbe0084..974374d48d28 100644 --- a/pkg/ottl/ottlfuncs/func_hours_test.go +++ b/pkg/ottl/ottlfuncs/func_hours_test.go @@ -22,7 +22,7 @@ func Test_Hours(t *testing.T) { { name: "100 hours", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("100h") }, }, @@ -31,7 +31,7 @@ func Test_Hours(t *testing.T) { { name: "1 min", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("100m") }, }, @@ -40,7 +40,7 @@ func Test_Hours(t *testing.T) { { name: "234 milliseconds", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("234ms") }, }, @@ -49,7 +49,7 @@ func Test_Hours(t *testing.T) { { name: "1 hour 40 mins 3 seconds 30 milliseconds 100 microseconds 1 nanosecond", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("1h40m3s30ms100us1ns") }, }, diff --git a/pkg/ottl/ottlfuncs/func_is_double.go b/pkg/ottl/ottlfuncs/func_is_double.go new file mode 100644 index 000000000000..5ae4f4ac31c4 --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_is_double.go @@ -0,0 +1,45 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type IsDoubleArguments[K any] struct { + Target ottl.FloatGetter[K] +} + +func NewIsDoubleFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("IsDouble", &IsDoubleArguments[K]{}, createIsDoubleFunction[K]) +} + +func createIsDoubleFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*IsDoubleArguments[K]) + + if !ok { + return nil, fmt.Errorf("IsDoubleFactory args must be of type *IsDoubleArguments[K]") + } + + return isDouble(args.Target), nil +} + +// nolint:errorlint +func isDouble[K any](target ottl.FloatGetter[K]) ottl.ExprFunc[K] { + return func(ctx context.Context, tCtx K) (any, error) { + _, err := target.Get(ctx, tCtx) + // Use type assertion because we don't want to check wrapped errors + switch err.(type) { + case ottl.TypeError: + return false, nil + case nil: + return true, nil + default: + return false, err + } + } +} diff --git a/pkg/ottl/ottlfuncs/func_is_double_test.go b/pkg/ottl/ottlfuncs/func_is_double_test.go new file mode 100644 index 000000000000..f0e3e7409fc1 --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_is_double_test.go @@ -0,0 +1,84 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +func Test_IsDouble(t *testing.T) { + tests := []struct { + name string + value any + expected bool + }{ + { + name: "float64", + value: float64(2.7), + expected: true, + }, + { + name: "float64 without decimal", + value: float64(55), + expected: true, + }, + { + name: "an integer", + value: int64(333), + expected: false, + }, + { + name: "ValueTypeDouble", + value: pcommon.NewValueDouble(5.5), + expected: true, + }, + { + name: "not a number", + value: "string", + expected: false, + }, + { + name: "ValueTypeSlice", + value: pcommon.NewValueSlice(), + expected: false, + }, + { + name: "nil", + value: nil, + expected: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + exprFunc := isDouble[any](&ottl.StandardFloatGetter[any]{ + Getter: func(context.Context, any) (any, error) { + return tt.value, nil + }, + }) + result, err := exprFunc(context.Background(), nil) + assert.NoError(t, err) + assert.Equal(t, tt.expected, result) + }) + } +} + +// nolint:errorlint +func Test_IsDouble_Error(t *testing.T) { + exprFunc := isDouble[any](&ottl.StandardFloatGetter[any]{ + Getter: func(context.Context, any) (any, error) { + return nil, ottl.TypeError("") + }, + }) + result, err := exprFunc(context.Background(), nil) + assert.Equal(t, false, result) + assert.Error(t, err) + _, ok := err.(ottl.TypeError) + assert.False(t, ok) +} diff --git a/pkg/ottl/ottlfuncs/func_is_int.go b/pkg/ottl/ottlfuncs/func_is_int.go new file mode 100644 index 000000000000..9b392012243e --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_is_int.go @@ -0,0 +1,45 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type IsIntArguments[K any] struct { + Target ottl.IntGetter[K] +} + +func NewIsIntFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("IsInt", &IsIntArguments[K]{}, createIsIntFunction[K]) +} + +func createIsIntFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*IsIntArguments[K]) + + if !ok { + return nil, fmt.Errorf("IsIntFactory args must be of type *IsIntArguments[K]") + } + + return isInt(args.Target), nil +} + +// nolint:errorlint +func isInt[K any](target ottl.IntGetter[K]) ottl.ExprFunc[K] { + return func(ctx context.Context, tCtx K) (any, error) { + _, err := target.Get(ctx, tCtx) + // Use type assertion because we don't want to check wrapped errors + switch err.(type) { + case ottl.TypeError: + return false, nil + case nil: + return true, nil + default: + return false, err + } + } +} diff --git a/pkg/ottl/ottlfuncs/func_is_int_test.go b/pkg/ottl/ottlfuncs/func_is_int_test.go new file mode 100644 index 000000000000..18566236e8dc --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_is_int_test.go @@ -0,0 +1,89 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +func Test_IsInt(t *testing.T) { + tests := []struct { + name string + value any + expected bool + }{ + { + name: "int", + value: int64(0), + expected: true, + }, + { + name: "ValueTypeInt", + value: pcommon.NewValueInt(0), + expected: true, + }, + { + name: "float64", + value: float64(2.7), + expected: false, + }, + { + name: "ValueTypeString", + value: pcommon.NewValueStr("a string"), + expected: false, + }, + { + name: "not Int", + value: "string", + expected: false, + }, + { + name: "string number", + value: "0", + expected: false, + }, + { + name: "ValueTypeSlice", + value: pcommon.NewValueSlice(), + expected: false, + }, + { + name: "nil", + value: nil, + expected: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + exprFunc := isInt[any](&ottl.StandardIntGetter[any]{ + Getter: func(context.Context, any) (any, error) { + return tt.value, nil + }, + }) + result, err := exprFunc(context.Background(), nil) + assert.NoError(t, err) + assert.Equal(t, tt.expected, result) + }) + } +} + +// nolint:errorlint +func Test_IsInt_Error(t *testing.T) { + exprFunc := isInt[any](&ottl.StandardIntGetter[any]{ + Getter: func(context.Context, any) (any, error) { + return nil, ottl.TypeError("") + }, + }) + result, err := exprFunc(context.Background(), nil) + assert.Equal(t, false, result) + assert.Error(t, err) + _, ok := err.(ottl.TypeError) + assert.False(t, ok) +} diff --git a/pkg/ottl/ottlfuncs/func_is_match_test.go b/pkg/ottl/ottlfuncs/func_is_match_test.go index 9ad128bc8d04..7f2a33cefb58 100644 --- a/pkg/ottl/ottlfuncs/func_is_match_test.go +++ b/pkg/ottl/ottlfuncs/func_is_match_test.go @@ -24,7 +24,7 @@ func Test_isMatch(t *testing.T) { { name: "replace match true", target: &ottl.StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "hello world", nil }, }, @@ -34,7 +34,7 @@ func Test_isMatch(t *testing.T) { { name: "replace match false", target: &ottl.StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "goodbye world", nil }, }, @@ -44,7 +44,7 @@ func Test_isMatch(t *testing.T) { { name: "replace match complex", target: &ottl.StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "-12.001", nil }, }, @@ -54,7 +54,7 @@ func Test_isMatch(t *testing.T) { { name: "target bool", target: &ottl.StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return true, nil }, }, @@ -64,7 +64,7 @@ func Test_isMatch(t *testing.T) { { name: "target int", target: &ottl.StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return int64(1), nil }, }, @@ -74,7 +74,7 @@ func Test_isMatch(t *testing.T) { { name: "target float", target: &ottl.StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 1.1, nil }, }, @@ -84,7 +84,7 @@ func Test_isMatch(t *testing.T) { { name: "target pcommon.Value", target: &ottl.StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { v := pcommon.NewValueEmpty() v.SetStr("test") return v, nil @@ -96,7 +96,7 @@ func Test_isMatch(t *testing.T) { { name: "nil target", target: &ottl.StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, @@ -117,7 +117,7 @@ func Test_isMatch(t *testing.T) { func Test_isMatch_validation(t *testing.T) { target := &ottl.StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "anything", nil }, } @@ -127,7 +127,7 @@ func Test_isMatch_validation(t *testing.T) { func Test_isMatch_error(t *testing.T) { target := &ottl.StandardStringLikeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return make(chan int), nil }, } diff --git a/pkg/ottl/ottlfuncs/func_keep_keys.go b/pkg/ottl/ottlfuncs/func_keep_keys.go index 6cae0c4c3795..8370414c6de8 100644 --- a/pkg/ottl/ottlfuncs/func_keep_keys.go +++ b/pkg/ottl/ottlfuncs/func_keep_keys.go @@ -42,7 +42,7 @@ func keepKeys[K any](target ottl.PMapGetter[K], keys []string) ottl.ExprFunc[K] if err != nil { return nil, err } - val.RemoveIf(func(key string, value pcommon.Value) bool { + val.RemoveIf(func(key string, _ pcommon.Value) bool { _, ok := keySet[key] return !ok }) diff --git a/pkg/ottl/ottlfuncs/func_keep_keys_test.go b/pkg/ottl/ottlfuncs/func_keep_keys_test.go index 49b4648219c6..e3f8f3009b8c 100644 --- a/pkg/ottl/ottlfuncs/func_keep_keys_test.go +++ b/pkg/ottl/ottlfuncs/func_keep_keys_test.go @@ -20,7 +20,7 @@ func Test_keepKeys(t *testing.T) { input.PutBool("test3", true) target := &ottl.StandardPMapGetter[pcommon.Map]{ - Getter: func(ctx context.Context, tCtx pcommon.Map) (any, error) { + Getter: func(_ context.Context, tCtx pcommon.Map) (any, error) { return tCtx, nil }, } @@ -52,13 +52,13 @@ func Test_keepKeys(t *testing.T) { name: "keep none", target: target, keys: []string{}, - want: func(expectedMap pcommon.Map) {}, + want: func(_ pcommon.Map) {}, }, { name: "no match", target: target, keys: []string{"no match"}, - want: func(expectedMap pcommon.Map) {}, + want: func(_ pcommon.Map) {}, }, } for _, tt := range tests { @@ -69,7 +69,7 @@ func Test_keepKeys(t *testing.T) { exprFunc := keepKeys(tt.target, tt.keys) _, err := exprFunc(nil, scenarioMap) - assert.Nil(t, err) + assert.NoError(t, err) expected := pcommon.NewMap() tt.want(expected) @@ -82,7 +82,7 @@ func Test_keepKeys(t *testing.T) { func Test_keepKeys_bad_input(t *testing.T) { input := pcommon.NewValueStr("not a map") target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } @@ -97,7 +97,7 @@ func Test_keepKeys_bad_input(t *testing.T) { func Test_keepKeys_get_nil(t *testing.T) { target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } diff --git a/pkg/ottl/ottlfuncs/func_len_test.go b/pkg/ottl/ottlfuncs/func_len_test.go index c72243648c7b..5c011dbdd317 100644 --- a/pkg/ottl/ottlfuncs/func_len_test.go +++ b/pkg/ottl/ottlfuncs/func_len_test.go @@ -284,7 +284,7 @@ func Test_Len(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { exprFunc := computeLen[any](&ottl.StandardGetSetter[any]{ - Getter: func(context context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return tt.value, nil }, }) diff --git a/pkg/ottl/ottlfuncs/func_limit.go b/pkg/ottl/ottlfuncs/func_limit.go index 81c3a4a7f4bf..0010c0e3d5e9 100644 --- a/pkg/ottl/ottlfuncs/func_limit.go +++ b/pkg/ottl/ottlfuncs/func_limit.go @@ -64,7 +64,7 @@ func limit[K any](target ottl.PMapGetter[K], limit int64, priorityKeys []string) } } - val.RemoveIf(func(key string, value pcommon.Value) bool { + val.RemoveIf(func(key string, _ pcommon.Value) bool { if _, ok := keep[key]; ok { return false } diff --git a/pkg/ottl/ottlfuncs/func_limit_test.go b/pkg/ottl/ottlfuncs/func_limit_test.go index c2818c5ff219..d048ac3ca096 100644 --- a/pkg/ottl/ottlfuncs/func_limit_test.go +++ b/pkg/ottl/ottlfuncs/func_limit_test.go @@ -20,7 +20,7 @@ func Test_limit(t *testing.T) { input.PutBool("test3", true) target := &ottl.StandardPMapGetter[pcommon.Map]{ - Getter: func(ctx context.Context, tCtx pcommon.Map) (any, error) { + Getter: func(_ context.Context, tCtx pcommon.Map) (any, error) { return tCtx, nil }, } @@ -158,7 +158,7 @@ func Test_limit_validation(t *testing.T) { func Test_limit_bad_input(t *testing.T) { input := pcommon.NewValueStr("not a map") target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } @@ -171,7 +171,7 @@ func Test_limit_bad_input(t *testing.T) { func Test_limit_get_nil(t *testing.T) { target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } diff --git a/pkg/ottl/ottlfuncs/func_merge_maps_test.go b/pkg/ottl/ottlfuncs/func_merge_maps_test.go index fdcd8475a76c..afae5d6e2d46 100644 --- a/pkg/ottl/ottlfuncs/func_merge_maps_test.go +++ b/pkg/ottl/ottlfuncs/func_merge_maps_test.go @@ -19,7 +19,7 @@ func Test_MergeMaps(t *testing.T) { input.PutStr("attr1", "value1") targetGetter := &ottl.StandardPMapGetter[pcommon.Map]{ - Getter: func(ctx context.Context, tCtx pcommon.Map) (any, error) { + Getter: func(_ context.Context, tCtx pcommon.Map) (any, error) { return tCtx, nil }, } @@ -33,7 +33,7 @@ func Test_MergeMaps(t *testing.T) { { name: "Upsert no conflicting keys", source: ottl.StandardPMapGetter[pcommon.Map]{ - Getter: func(ctx context.Context, _ pcommon.Map) (any, error) { + Getter: func(_ context.Context, _ pcommon.Map) (any, error) { m := pcommon.NewMap() m.PutStr("attr2", "value2") return m, nil @@ -48,7 +48,7 @@ func Test_MergeMaps(t *testing.T) { { name: "Upsert conflicting key", source: ottl.StandardPMapGetter[pcommon.Map]{ - Getter: func(ctx context.Context, _ pcommon.Map) (any, error) { + Getter: func(_ context.Context, _ pcommon.Map) (any, error) { m := pcommon.NewMap() m.PutStr("attr1", "value3") m.PutStr("attr2", "value2") @@ -64,7 +64,7 @@ func Test_MergeMaps(t *testing.T) { { name: "Insert no conflicting keys", source: ottl.StandardPMapGetter[pcommon.Map]{ - Getter: func(ctx context.Context, _ pcommon.Map) (any, error) { + Getter: func(_ context.Context, _ pcommon.Map) (any, error) { m := pcommon.NewMap() m.PutStr("attr2", "value2") return m, nil @@ -79,7 +79,7 @@ func Test_MergeMaps(t *testing.T) { { name: "Insert conflicting key", source: ottl.StandardPMapGetter[pcommon.Map]{ - Getter: func(ctx context.Context, _ pcommon.Map) (any, error) { + Getter: func(_ context.Context, _ pcommon.Map) (any, error) { m := pcommon.NewMap() m.PutStr("attr1", "value3") m.PutStr("attr2", "value2") @@ -95,7 +95,7 @@ func Test_MergeMaps(t *testing.T) { { name: "Update no conflicting keys", source: ottl.StandardPMapGetter[pcommon.Map]{ - Getter: func(ctx context.Context, _ pcommon.Map) (any, error) { + Getter: func(_ context.Context, _ pcommon.Map) (any, error) { m := pcommon.NewMap() m.PutStr("attr2", "value2") return m, nil @@ -109,7 +109,7 @@ func Test_MergeMaps(t *testing.T) { { name: "Update conflicting key", source: ottl.StandardPMapGetter[pcommon.Map]{ - Getter: func(ctx context.Context, _ pcommon.Map) (any, error) { + Getter: func(_ context.Context, _ pcommon.Map) (any, error) { m := pcommon.NewMap() m.PutStr("attr1", "value3") return m, nil @@ -143,12 +143,12 @@ func Test_MergeMaps(t *testing.T) { func Test_MergeMaps_bad_target(t *testing.T) { input := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 1, nil }, } @@ -161,12 +161,12 @@ func Test_MergeMaps_bad_target(t *testing.T) { func Test_MergeMaps_bad_input(t *testing.T) { input := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 1, nil }, } target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } diff --git a/pkg/ottl/ottlfuncs/func_microseconds_test.go b/pkg/ottl/ottlfuncs/func_microseconds_test.go index d3e4faf99899..efee609f6a89 100644 --- a/pkg/ottl/ottlfuncs/func_microseconds_test.go +++ b/pkg/ottl/ottlfuncs/func_microseconds_test.go @@ -22,7 +22,7 @@ func Test_Microseconds(t *testing.T) { { name: "100 microseconds", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("100us") }, }, @@ -31,7 +31,7 @@ func Test_Microseconds(t *testing.T) { { name: "1000 hour", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("100h") }, }, @@ -40,7 +40,7 @@ func Test_Microseconds(t *testing.T) { { name: "50 mins", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("50m") }, }, @@ -49,7 +49,7 @@ func Test_Microseconds(t *testing.T) { { name: "1 hour 40 mins 3 seconds 30 milliseconds 100 microseconds", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("1h40m3s30ms100us") }, }, diff --git a/pkg/ottl/ottlfuncs/func_milliseconds_test.go b/pkg/ottl/ottlfuncs/func_milliseconds_test.go index bdbb9ad1ccab..3dd1beb55487 100644 --- a/pkg/ottl/ottlfuncs/func_milliseconds_test.go +++ b/pkg/ottl/ottlfuncs/func_milliseconds_test.go @@ -22,7 +22,7 @@ func Test_Milliseconds(t *testing.T) { { name: "100 Milliseconds", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("100ms") }, }, @@ -31,7 +31,7 @@ func Test_Milliseconds(t *testing.T) { { name: "1000 hour", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("100h") }, }, @@ -40,7 +40,7 @@ func Test_Milliseconds(t *testing.T) { { name: "47 mins", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("47m") }, }, @@ -49,7 +49,7 @@ func Test_Milliseconds(t *testing.T) { { name: "1 hour 40 mins 3 seconds 30 milliseconds", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("1h40m3s30ms") }, }, diff --git a/pkg/ottl/ottlfuncs/func_minutes_test.go b/pkg/ottl/ottlfuncs/func_minutes_test.go index a4367c0179e7..16d1e4e88f45 100644 --- a/pkg/ottl/ottlfuncs/func_minutes_test.go +++ b/pkg/ottl/ottlfuncs/func_minutes_test.go @@ -22,7 +22,7 @@ func Test_Minutes(t *testing.T) { { name: "100 minutes", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("100m") }, }, @@ -31,7 +31,7 @@ func Test_Minutes(t *testing.T) { { name: "1 hour", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("1h") }, }, @@ -40,7 +40,7 @@ func Test_Minutes(t *testing.T) { { name: "234 milliseconds", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("234ms") }, }, @@ -49,7 +49,7 @@ func Test_Minutes(t *testing.T) { { name: "1 hour 40 mins 3 seconds 30 milliseconds 100 microseconds 1 nanosecond", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("1h40m3s30ms100us1ns") }, }, diff --git a/pkg/ottl/ottlfuncs/func_nanoseconds_test.go b/pkg/ottl/ottlfuncs/func_nanoseconds_test.go index 67e297488455..16987b43ed21 100644 --- a/pkg/ottl/ottlfuncs/func_nanoseconds_test.go +++ b/pkg/ottl/ottlfuncs/func_nanoseconds_test.go @@ -22,7 +22,7 @@ func Test_Nanoseconds(t *testing.T) { { name: "100 nanoseconds", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("100ns") }, }, @@ -31,7 +31,7 @@ func Test_Nanoseconds(t *testing.T) { { name: "1 hour", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("100h") }, }, @@ -40,7 +40,7 @@ func Test_Nanoseconds(t *testing.T) { { name: "23 mins", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("23m") }, }, @@ -49,7 +49,7 @@ func Test_Nanoseconds(t *testing.T) { { name: "1 hour 40 mins 3 seconds 30 milliseconds 100 microseconds 1 nanosecond", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("1h40m3s30ms100us1ns") }, }, diff --git a/pkg/ottl/ottlfuncs/func_now.go b/pkg/ottl/ottlfuncs/func_now.go index 51815d3f6864..698a274a3730 100644 --- a/pkg/ottl/ottlfuncs/func_now.go +++ b/pkg/ottl/ottlfuncs/func_now.go @@ -11,7 +11,7 @@ import ( ) func now[K any]() (ottl.ExprFunc[K], error) { - return func(ctx context.Context, tCtx K) (any, error) { + return func(_ context.Context, _ K) (any, error) { return time.Now(), nil }, nil } diff --git a/pkg/ottl/ottlfuncs/func_parse_csv.go b/pkg/ottl/ottlfuncs/func_parse_csv.go new file mode 100644 index 000000000000..dd0a88dc2343 --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_parse_csv.go @@ -0,0 +1,145 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "errors" + "fmt" + "strings" + + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/parseutils" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +const ( + parseCSVModeStrict = "strict" + parseCSVModeLazyQuotes = "lazyQuotes" + parseCSVModeIgnoreQuotes = "ignoreQuotes" +) + +const ( + parseCSVDefaultDelimiter = ',' + parseCSVDefaultMode = parseCSVModeStrict +) + +type ParseCSVArguments[K any] struct { + Target ottl.StringGetter[K] + Header ottl.StringGetter[K] + Delimiter ottl.Optional[string] + HeaderDelimiter ottl.Optional[string] + Mode ottl.Optional[string] +} + +func (p ParseCSVArguments[K]) validate() error { + if !p.Delimiter.IsEmpty() { + if len([]rune(p.Delimiter.Get())) != 1 { + return errors.New("delimiter must be a single character") + } + } + + if !p.HeaderDelimiter.IsEmpty() { + if len([]rune(p.HeaderDelimiter.Get())) != 1 { + return errors.New("header_delimiter must be a single character") + } + } + + return nil +} + +func NewParseCSVFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("ParseCSV", &ParseCSVArguments[K]{}, createParseCSVFunction[K]) +} + +func createParseCSVFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*ParseCSVArguments[K]) + if !ok { + return nil, fmt.Errorf("ParseCSVFactory args must be of type *ParseCSVArguments[K]") + } + + if err := args.validate(); err != nil { + return nil, fmt.Errorf("invalid arguments: %w", err) + } + + delimiter := parseCSVDefaultDelimiter + if !args.Delimiter.IsEmpty() { + delimiter = []rune(args.Delimiter.Get())[0] + } + + // headerDelimiter defaults to the chosen delimter, + // since in most cases headerDelimiter == delmiter. + headerDelimiter := string(delimiter) + if !args.HeaderDelimiter.IsEmpty() { + headerDelimiter = args.HeaderDelimiter.Get() + } + + mode := parseCSVDefaultMode + if !args.Mode.IsEmpty() { + mode = args.Mode.Get() + } + + var parseRow parseCSVRowFunc + switch mode { + case parseCSVModeStrict: + parseRow = parseCSVRow(false) + case parseCSVModeLazyQuotes: + parseRow = parseCSVRow(true) + case parseCSVModeIgnoreQuotes: + parseRow = parseCSVRowIgnoreQuotes() + default: + return nil, fmt.Errorf("unknown mode: %s", mode) + } + + return parseCSV(args.Target, args.Header, delimiter, headerDelimiter, parseRow), nil +} + +type parseCSVRowFunc func(row string, delimiter rune) ([]string, error) + +func parseCSV[K any](target, header ottl.StringGetter[K], delimiter rune, headerDelimiter string, parseRow parseCSVRowFunc) ottl.ExprFunc[K] { + return func(ctx context.Context, tCtx K) (any, error) { + targetStr, err := target.Get(ctx, tCtx) + if err != nil { + return nil, fmt.Errorf("error getting value for target in ParseCSV: %w", err) + } + + headerStr, err := header.Get(ctx, tCtx) + if err != nil { + return nil, fmt.Errorf("error getting value for header in ParseCSV: %w", err) + } + + if headerStr == "" { + return nil, errors.New("headers must not be an empty string") + } + + headers := strings.Split(headerStr, headerDelimiter) + + fields, err := parseRow(targetStr, delimiter) + if err != nil { + return nil, err + } + + headersToFields, err := parseutils.MapCSVHeaders(headers, fields) + if err != nil { + return nil, fmt.Errorf("map csv headers: %w", err) + } + + pMap := pcommon.NewMap() + err = pMap.FromRaw(headersToFields) + return pMap, err + } +} + +func parseCSVRow(lazyQuotes bool) parseCSVRowFunc { + return func(row string, delimiter rune) ([]string, error) { + return parseutils.ReadCSVRow(row, delimiter, lazyQuotes) + } +} + +func parseCSVRowIgnoreQuotes() parseCSVRowFunc { + return func(row string, delimiter rune) ([]string, error) { + return strings.Split(row, string([]rune{delimiter})), nil + } +} diff --git a/pkg/ottl/ottlfuncs/func_parse_csv_test.go b/pkg/ottl/ottlfuncs/func_parse_csv_test.go new file mode 100644 index 000000000000..dc7069529f13 --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_parse_csv_test.go @@ -0,0 +1,560 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs + +import ( + "context" + "errors" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +func Test_ParseCSV(t *testing.T) { + tests := []struct { + name string + oArgs ottl.Arguments + want map[string]any + createError string + parseError string + }{ + /* Test default mode */ + { + name: "Parse comma separated values", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "val1,val2,val3", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + }, + want: map[string]any{ + "col1": "val1", + "col2": "val2", + "col3": "val3", + }, + }, + { + name: "Parse with newline in first field", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "val1\nnewline,val2,val3", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + }, + want: map[string]any{ + "col1": "val1\nnewline", + "col2": "val2", + "col3": "val3", + }, + }, + { + name: "Parse with newline in middle field", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "val1,val2\nnewline,val3", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + }, + want: map[string]any{ + "col1": "val1", + "col2": "val2\nnewline", + "col3": "val3", + }, + }, + { + name: "Parse with newline in last field", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "val1,val2,val3\nnewline", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + }, + want: map[string]any{ + "col1": "val1", + "col2": "val2", + "col3": "val3\nnewline", + }, + }, + { + name: "Parse with newline in multiple fields", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "val1\nnewline1,val2\nnewline2,val3\nnewline3", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + }, + want: map[string]any{ + "col1": "val1\nnewline1", + "col2": "val2\nnewline2", + "col3": "val3\nnewline3", + }, + }, + { + name: "Parse with leading newline", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "\nval1,val2,val3", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + }, + want: map[string]any{ + "col1": "val1", + "col2": "val2", + "col3": "val3", + }, + }, + { + name: "Parse with trailing newline", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "val1,val2,val3\n", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + }, + want: map[string]any{ + "col1": "val1", + "col2": "val2", + "col3": "val3", + }, + }, + { + name: "Parse with newline at end of field", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "val1\n,val2,val3", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + }, + want: map[string]any{ + "col1": "val1\n", + "col2": "val2", + "col3": "val3", + }, + }, + { + name: "Parse comma separated values with explicit mode", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "val1,val2,val3", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + Mode: ottl.NewTestingOptional("strict"), + }, + want: map[string]any{ + "col1": "val1", + "col2": "val2", + "col3": "val3", + }, + }, + { + name: "Parse tab separated values", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "val1\tval2\tval3", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1\tcol2\tcol3", nil + }, + }, + Delimiter: ottl.NewTestingOptional("\t"), + }, + want: map[string]any{ + "col1": "val1", + "col2": "val2", + "col3": "val3", + }, + }, + { + name: "Header delimiter is different from row delimiter", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "val1\tval2\tval3", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1 col2 col3", nil + }, + }, + Delimiter: ottl.NewTestingOptional("\t"), + HeaderDelimiter: ottl.NewTestingOptional(" "), + }, + want: map[string]any{ + "col1": "val1", + "col2": "val2", + "col3": "val3", + }, + }, + { + name: "Invalid target (strict mode)", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return nil, errors.New("cannot get") + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2", nil + }, + }, + }, + parseError: "error getting value for target in ParseCSV: error getting value in ottl.StandardStringGetter[interface {}]: cannot get", + }, + { + name: "Invalid header (strict mode)", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `val1,val2`, nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return nil, errors.New("cannot get") + }, + }, + }, + parseError: "error getting value for header in ParseCSV: error getting value in ottl.StandardStringGetter[interface {}]: cannot get", + }, + { + name: "Invalid args", + oArgs: nil, + createError: "ParseCSVFactory args must be of type *ParseCSVArguments[K]", + }, + { + name: "Parse fails due to header/row column mismatch", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `val1,val2,val3`, nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2", nil + }, + }, + }, + parseError: "wrong number of fields: expected 2, found 3", + }, + { + name: "Parse fails due to header/row column mismatch", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `val1,val2,val3`, nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2", nil + }, + }, + }, + parseError: "wrong number of fields: expected 2, found 3", + }, + { + name: "Empty header string (strict)", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `val1`, nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "", nil + }, + }, + }, + parseError: "headers must not be an empty string", + }, + { + name: "Parse fails due to empty row", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + }, + parseError: "no csv lines found", + }, + { + name: "Parse fails for row with bare quotes", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `val1,val2,v"al3`, nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + }, + parseError: "wrong number of fields: expected 3, found 2", + }, + + /* Test parsing with lazy quotes */ + { + name: "Parse lazyQuotes with quote in row", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `val1,val2,v"al3`, nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + Mode: ottl.NewTestingOptional("lazyQuotes"), + }, + want: map[string]any{ + "col1": "val1", + "col2": "val2", + "col3": `v"al3`, + }, + }, + { + name: "Parse lazyQuotes invalid csv", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `val1,"val2,"val3,val4"`, nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3,col4", nil + }, + }, + Mode: ottl.NewTestingOptional("lazyQuotes"), + }, + parseError: "wrong number of fields: expected 4, found 2", + }, + /* Test parsing ignoring quotes */ + { + name: "Parse quotes invalid csv", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `val1,"val2,"val3,val4"`, nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3,col4", nil + }, + }, + Mode: ottl.NewTestingOptional("ignoreQuotes"), + }, + want: map[string]any{ + "col1": "val1", + "col2": `"val2`, + "col3": `"val3`, + "col4": `val4"`, + }, + }, + { + name: "Invalid target (ignoreQuotes mode)", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return nil, errors.New("cannot get") + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2", nil + }, + }, + Mode: ottl.NewTestingOptional("ignoreQuotes"), + }, + parseError: "error getting value for target in ParseCSV: error getting value in ottl.StandardStringGetter[interface {}]: cannot get", + }, + { + name: "Invalid header (ignoreQuotes mode)", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `val1,val2`, nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return nil, errors.New("cannot get") + }, + }, + Mode: ottl.NewTestingOptional("ignoreQuotes"), + }, + parseError: "error getting value for header in ParseCSV: error getting value in ottl.StandardStringGetter[interface {}]: cannot get", + }, + { + name: "Empty header string (ignoreQuotes)", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `val1`, nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "", nil + }, + }, + Mode: ottl.NewTestingOptional("ignoreQuotes"), + }, + parseError: "headers must not be an empty string", + }, + /* Validation tests */ + { + name: "Delimiter is greater than one character", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "val1,val2,val3", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + Delimiter: ottl.NewTestingOptional("bad_delim"), + }, + createError: "invalid arguments: delimiter must be a single character", + }, + { + name: "HeaderDelimiter is greater than one character", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "val1,val2,val3", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + HeaderDelimiter: ottl.NewTestingOptional("bad_delim"), + }, + createError: "invalid arguments: header_delimiter must be a single character", + }, + { + name: "Bad mode", + oArgs: &ParseCSVArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "val1,val2,val3", nil + }, + }, + Header: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "col1,col2,col3", nil + }, + }, + Mode: ottl.NewTestingOptional("fake-mode"), + }, + createError: "unknown mode: fake-mode", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + exprFunc, err := createParseCSVFunction[any](ottl.FunctionContext{}, tt.oArgs) + if tt.createError != "" { + require.ErrorContains(t, err, tt.createError) + return + } + + require.NoError(t, err) + + result, err := exprFunc(context.Background(), nil) + if tt.parseError != "" { + require.ErrorContains(t, err, tt.parseError) + return + } + + assert.NoError(t, err) + + resultMap, ok := result.(pcommon.Map) + require.True(t, ok) + + require.Equal(t, tt.want, resultMap.AsRaw()) + }) + } +} diff --git a/pkg/ottl/ottlfuncs/func_parse_json_test.go b/pkg/ottl/ottlfuncs/func_parse_json_test.go index d8421901bd5e..f557a5fad1ee 100644 --- a/pkg/ottl/ottlfuncs/func_parse_json_test.go +++ b/pkg/ottl/ottlfuncs/func_parse_json_test.go @@ -23,7 +23,7 @@ func Test_ParseJSON(t *testing.T) { { name: "handle string", target: ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return `{"test":"string value"}`, nil }, }, @@ -34,7 +34,7 @@ func Test_ParseJSON(t *testing.T) { { name: "handle bool", target: ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return `{"test":true}`, nil }, }, @@ -45,7 +45,7 @@ func Test_ParseJSON(t *testing.T) { { name: "handle int", target: ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return `{"test":1}`, nil }, }, @@ -56,7 +56,7 @@ func Test_ParseJSON(t *testing.T) { { name: "handle float", target: ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return `{"test":1.1}`, nil }, }, @@ -67,7 +67,7 @@ func Test_ParseJSON(t *testing.T) { { name: "handle nil", target: ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return `{"test":null}`, nil }, }, @@ -78,7 +78,7 @@ func Test_ParseJSON(t *testing.T) { { name: "handle array", target: ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return `{"test":["string","value"]}`, nil }, }, @@ -91,7 +91,7 @@ func Test_ParseJSON(t *testing.T) { { name: "handle nested object", target: ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return `{"test":{"nested":"true"}}`, nil }, }, @@ -103,7 +103,7 @@ func Test_ParseJSON(t *testing.T) { { name: "updates existing", target: ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return `{"existing":"pass"}`, nil }, }, @@ -114,7 +114,7 @@ func Test_ParseJSON(t *testing.T) { { name: "complex", target: ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return `{"test1":{"nested":"true"},"test2":"string","test3":1,"test4":1.1,"test5":[[1], [2, 3],[]],"test6":null}`, nil }, }, @@ -148,7 +148,7 @@ func Test_ParseJSON(t *testing.T) { tt.want(expected) assert.Equal(t, expected.Len(), resultMap.Len()) - expected.Range(func(k string, v pcommon.Value) bool { + expected.Range(func(k string, _ pcommon.Value) bool { ev, _ := expected.Get(k) av, _ := resultMap.Get(k) assert.Equal(t, ev, av) @@ -160,7 +160,7 @@ func Test_ParseJSON(t *testing.T) { func Test_ParseJSON_Error(t *testing.T) { target := &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 1, nil }, } diff --git a/pkg/ottl/ottlfuncs/func_parse_key_value.go b/pkg/ottl/ottlfuncs/func_parse_key_value.go new file mode 100644 index 000000000000..1b896656ebe2 --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_parse_key_value.go @@ -0,0 +1,81 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "fmt" + + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/parseutils" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type ParseKeyValueArguments[K any] struct { + Target ottl.StringGetter[K] + Delimiter ottl.Optional[string] + PairDelimiter ottl.Optional[string] +} + +func NewParseKeyValueFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("ParseKeyValue", &ParseKeyValueArguments[K]{}, createParseKeyValueFunction[K]) +} + +func createParseKeyValueFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*ParseKeyValueArguments[K]) + + if !ok { + return nil, fmt.Errorf("ParseKeyValueFactory args must be of type *ParseKeyValueArguments[K]") + } + + return parseKeyValue[K](args.Target, args.Delimiter, args.PairDelimiter) +} + +func parseKeyValue[K any](target ottl.StringGetter[K], d ottl.Optional[string], p ottl.Optional[string]) (ottl.ExprFunc[K], error) { + delimiter := "=" + if !d.IsEmpty() { + if d.Get() == "" { + return nil, fmt.Errorf("delimiter cannot be set to an empty string") + } + delimiter = d.Get() + } + + pairDelimiter := " " + if !p.IsEmpty() { + if p.Get() == "" { + return nil, fmt.Errorf("pair delimiter cannot be set to an empty string") + } + pairDelimiter = p.Get() + } + + if pairDelimiter == delimiter { + return nil, fmt.Errorf("pair delimiter %q cannot be equal to delimiter %q", pairDelimiter, delimiter) + } + + return func(ctx context.Context, tCtx K) (any, error) { + source, err := target.Get(ctx, tCtx) + if err != nil { + return nil, err + } + + if source == "" { + return nil, fmt.Errorf("cannot parse from empty target") + } + + pairs, err := parseutils.SplitString(source, pairDelimiter) + if err != nil { + return nil, fmt.Errorf("splitting source %q into pairs failed: %w", source, err) + } + + parsed, err := parseutils.ParseKeyValuePairs(pairs, delimiter) + if err != nil { + return nil, fmt.Errorf("failed to split pairs into key-values: %w", err) + } + + result := pcommon.NewMap() + err = result.FromRaw(parsed) + return result, err + }, nil +} diff --git a/pkg/ottl/ottlfuncs/func_parse_key_value_test.go b/pkg/ottl/ottlfuncs/func_parse_key_value_test.go new file mode 100644 index 000000000000..25665fab60f2 --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_parse_key_value_test.go @@ -0,0 +1,376 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +func Test_parseKeyValue(t *testing.T) { + tests := []struct { + name string + target ottl.StringGetter[any] + delimiter ottl.Optional[string] + pairDelimiter ottl.Optional[string] + expected map[string]any + }{ + { + name: "simple", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "name=ottl func=key_value", nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: map[string]any{ + "name": "ottl", + "func": "key_value", + }, + }, + { + name: "large", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `name=ottl age=1 job="software engineering" location="grand rapids michigan" src="10.3.3.76" dst=172.217.0.10 protocol=udp sport=57112 port=443 translated_src_ip=96.63.176.3 translated_port=57112`, nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: map[string]any{ + "age": "1", + "port": "443", + "dst": "172.217.0.10", + "job": "software engineering", + "location": "grand rapids michigan", + "name": "ottl", + "protocol": "udp", + "sport": "57112", + "src": "10.3.3.76", + "translated_port": "57112", + "translated_src_ip": "96.63.176.3", + }, + }, + { + name: "embedded double quotes in single quoted value", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `a=b c='this is a "co ol" value'`, nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: map[string]any{ + "a": "b", + "c": "this is a \"co ol\" value", + }, + }, + { + name: "double quotes", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `requestClientApplication="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0"`, nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: map[string]any{ + "requestClientApplication": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0", + }, + }, + { + name: "single quotes", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "requestClientApplication='Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0'", nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: map[string]any{ + "requestClientApplication": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0", + }, + }, + { + name: "double quotes strip leading & trailing spaces", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `name=" ottl " func=" key_ value"`, nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: map[string]any{ + "name": "ottl", + "func": "key_ value", + }, + }, + { + name: "! delimiter && whitespace pair delimiter", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return " name!ottl func!key_value hello!world ", nil + }, + }, + delimiter: ottl.NewTestingOptional[string]("!"), + pairDelimiter: ottl.Optional[string]{}, + expected: map[string]any{ + "name": "ottl", + "func": "key_value", + "hello": "world", + }, + }, + { + name: "!! delimiter && whitespace pair delimiter with newlines", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return ` +name!!ottl +func!!key_value hello!!world `, nil + }, + }, + delimiter: ottl.NewTestingOptional[string]("!!"), + pairDelimiter: ottl.Optional[string]{}, + expected: map[string]any{ + "name": "ottl", + "func": "key_value", + "hello": "world", + }, + }, + { + name: "!! delimiter && newline pair delimiter", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `name!!ottl +func!! key_value another!!pair +hello!!world `, nil + }, + }, + delimiter: ottl.NewTestingOptional[string]("!!"), + pairDelimiter: ottl.NewTestingOptional[string]("\n"), + expected: map[string]any{ + "name": "ottl", + "func": "key_value another!!pair", + "hello": "world", + }, + }, + { + name: "quoted value contains delimiter and pair delimiter", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `name="ottl="_func="=key_value"`, nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.NewTestingOptional("_"), + expected: map[string]any{ + "name": "ottl=", + "func": "=key_value", + }, + }, + { + name: "complicated delimiters", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `k1@*v1_!_k2@**v2_!__k3@@*v3__`, nil + }, + }, + delimiter: ottl.NewTestingOptional("@*"), + pairDelimiter: ottl.NewTestingOptional("_!_"), + expected: map[string]any{ + "k1": "v1", + "k2": "*v2", + "_k3@": "v3__", + }, + }, + { + name: "leading and trailing pair delimiter", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return " k1=v1 k2==v2 k3=v3= ", nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: map[string]any{ + "k1": "v1", + "k2": "=v2", + "k3": "v3=", + }, + }, + { + name: "embedded double quotes end single quoted value", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `a=b c='this is a "co ol"'`, nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: map[string]any{ + "a": "b", + "c": "this is a \"co ol\"", + }, + }, + { + name: "more quotes", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "a=b c=d'='", nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: map[string]any{ + "a": "b", + "c": "d=", + }, + }, + + { + name: "long pair delimiter", + target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "a=b c=d", nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.NewTestingOptional("aaaaaaaaaaaaaaaa"), + expected: map[string]any{ + "a": "b c=d", // occurs because `SplitString()` returns original string and `strings.SplitN` with N=2 will split on just the first instance of delimiter("=") + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + exprFunc, err := parseKeyValue[any](tt.target, tt.delimiter, tt.pairDelimiter) + assert.NoError(t, err) + + result, err := exprFunc(context.Background(), nil) + assert.NoError(t, err) + + actual, ok := result.(pcommon.Map) + assert.True(t, ok) + + expected := pcommon.NewMap() + assert.NoError(t, expected.FromRaw(tt.expected)) + + assert.Equal(t, expected.Len(), actual.Len()) + expected.Range(func(k string, _ pcommon.Value) bool { + ev, _ := expected.Get(k) + av, ok := actual.Get(k) + assert.True(t, ok) + assert.Equal(t, ev, av) + return true + }) + }) + } +} + +func Test_parseKeyValue_equal_delimiters(t *testing.T) { + target := ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "", nil + }, + } + delimiter := ottl.NewTestingOptional[string]("=") + pairDelimiter := ottl.NewTestingOptional[string]("=") + _, err := parseKeyValue[any](target, delimiter, pairDelimiter) + assert.Error(t, err) + + delimiter = ottl.NewTestingOptional[string](" ") + _, err = parseKeyValue[any](target, delimiter, ottl.Optional[string]{}) + assert.Error(t, err) +} + +func Test_parseKeyValue_bad_target(t *testing.T) { + target := ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return 1, nil + }, + } + delimiter := ottl.NewTestingOptional[string]("=") + pairDelimiter := ottl.NewTestingOptional[string]("!") + exprFunc, err := parseKeyValue[any](target, delimiter, pairDelimiter) + assert.NoError(t, err) + _, err = exprFunc(context.Background(), nil) + assert.Error(t, err) +} + +func Test_parseKeyValue_empty_target(t *testing.T) { + target := ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "", nil + }, + } + delimiter := ottl.NewTestingOptional[string]("=") + pairDelimiter := ottl.NewTestingOptional[string]("!") + exprFunc, err := parseKeyValue[any](target, delimiter, pairDelimiter) + assert.NoError(t, err) + _, err = exprFunc(context.Background(), nil) + assert.Error(t, err) +} + +func Test_parseKeyValue_bad_split(t *testing.T) { + target := ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "name=ottl!hello_world", nil + }, + } + delimiter := ottl.NewTestingOptional[string]("=") + pairDelimiter := ottl.NewTestingOptional[string]("!") + exprFunc, err := parseKeyValue[any](target, delimiter, pairDelimiter) + assert.NoError(t, err) + _, err = exprFunc(context.Background(), nil) + assert.ErrorContains(t, err, "failed to split pairs into key-values: cannot split \"hello_world\" into 2 items, got 1 item(s)") +} + +func Test_parseKeyValue_mismatch_quotes(t *testing.T) { + target := ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `k1=v1 k2='v2"`, nil + }, + } + exprFunc, err := parseKeyValue[any](target, ottl.Optional[string]{}, ottl.Optional[string]{}) + assert.NoError(t, err) + _, err = exprFunc(context.Background(), nil) + assert.Error(t, err) +} + +func Test_parseKeyValue_bad_delimiter(t *testing.T) { + target := ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "a=b c=d", nil + }, + } + + // covers too long of a delimiter && delimiter not found + delimiter := ottl.NewTestingOptional[string]("=============") + exprFunc, err := parseKeyValue[any](target, delimiter, ottl.Optional[string]{}) + assert.NoError(t, err) + _, err = exprFunc(context.Background(), nil) + assert.ErrorContains(t, err, "failed to split pairs into key-values: cannot split \"a=b\" into 2 items, got 1 item(s)") +} + +func Test_parseKeyValue_empty_delimiters(t *testing.T) { + target := ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "a=b c=d", nil + }, + } + delimiter := ottl.NewTestingOptional[string]("") + + _, err := parseKeyValue[any](target, delimiter, ottl.Optional[string]{}) + assert.ErrorContains(t, err, "delimiter cannot be set to an empty string") + + _, err = parseKeyValue[any](target, ottl.Optional[string]{}, delimiter) + assert.ErrorContains(t, err, "pair delimiter cannot be set to an empty string") +} diff --git a/pkg/ottl/ottlfuncs/func_parse_xml.go b/pkg/ottl/ottlfuncs/func_parse_xml.go new file mode 100644 index 000000000000..42dac93307df --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_parse_xml.go @@ -0,0 +1,134 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "bytes" + "context" + "encoding/xml" + "errors" + "fmt" + "strings" + + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type ParseXMLArguments[K any] struct { + Target ottl.StringGetter[K] +} + +func NewParseXMLFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("ParseXML", &ParseXMLArguments[K]{}, createParseXMLFunction[K]) +} + +func createParseXMLFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*ParseXMLArguments[K]) + + if !ok { + return nil, fmt.Errorf("ParseXMLFactory args must be of type *ParseXMLArguments[K]") + } + + return parseXML(args.Target), nil +} + +// parseXML returns a `pcommon.Map` struct that is a result of parsing the target string as XML +func parseXML[K any](target ottl.StringGetter[K]) ottl.ExprFunc[K] { + return func(ctx context.Context, tCtx K) (any, error) { + targetVal, err := target.Get(ctx, tCtx) + if err != nil { + return nil, err + } + + parsedXML := xmlElement{} + + decoder := xml.NewDecoder(strings.NewReader(targetVal)) + err = decoder.Decode(&parsedXML) + if err != nil { + return nil, fmt.Errorf("unmarshal xml: %w", err) + } + + if decoder.InputOffset() != int64(len(targetVal)) { + return nil, errors.New("trailing bytes after parsing xml") + } + + parsedMap := pcommon.NewMap() + parsedXML.intoMap(parsedMap) + + return parsedMap, nil + } +} + +type xmlElement struct { + tag string + attributes []xml.Attr + text string + children []xmlElement +} + +// UnmarshalXML implements xml.Unmarshaler for xmlElement +func (a *xmlElement) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { + a.tag = start.Name.Local + a.attributes = start.Attr + + for { + tok, err := d.Token() + if err != nil { + return fmt.Errorf("decode next token: %w", err) + } + + switch t := tok.(type) { + case xml.StartElement: + child := xmlElement{} + err := d.DecodeElement(&child, &t) + if err != nil { + return err + } + + a.children = append(a.children, child) + case xml.EndElement: + // End element means we've reached the end of parsing + return nil + case xml.CharData: + // Strip leading/trailing spaces to ignore newlines and + // indentation in formatted XML + a.text += string(bytes.TrimSpace([]byte(t))) + case xml.Comment: // ignore comments + case xml.ProcInst: // ignore processing instructions + case xml.Directive: // ignore directives + default: + return fmt.Errorf("unexpected token type %T", t) + } + } +} + +// intoMap converts and adds the xmlElement into the provided pcommon.Map. +func (a xmlElement) intoMap(m pcommon.Map) { + m.EnsureCapacity(4) + + m.PutStr("tag", a.tag) + + if a.text != "" { + m.PutStr("content", a.text) + } + + if len(a.attributes) > 0 { + attrs := m.PutEmptyMap("attributes") + attrs.EnsureCapacity(len(a.attributes)) + + for _, attr := range a.attributes { + attrs.PutStr(attr.Name.Local, attr.Value) + } + } + + if len(a.children) > 0 { + children := m.PutEmptySlice("children") + children.EnsureCapacity(len(a.children)) + + for _, child := range a.children { + child.intoMap(children.AppendEmpty().SetEmptyMap()) + } + } +} diff --git a/pkg/ottl/ottlfuncs/func_parse_xml_test.go b/pkg/ottl/ottlfuncs/func_parse_xml_test.go new file mode 100644 index 000000000000..8c348d3a6e76 --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_parse_xml_test.go @@ -0,0 +1,309 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +func Test_ParseXML(t *testing.T) { + tests := []struct { + name string + oArgs ottl.Arguments + want map[string]any + createError string + parseError string + }{ + { + name: "Text values in nested elements", + oArgs: &ParseXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "00001Joejoe.smith@example.comUser did a thing", nil + }, + }, + }, + want: map[string]any{ + "tag": "Log", + "children": []any{ + map[string]any{ + "tag": "User", + "children": []any{ + map[string]any{ + "tag": "ID", + "content": "00001", + }, + map[string]any{ + "tag": "Name", + "content": "Joe", + }, + map[string]any{ + "tag": "Email", + "content": "joe.smith@example.com", + }, + }, + }, + map[string]any{ + "tag": "Text", + "content": "User did a thing", + }, + }, + }, + }, + { + name: "Formatted example", + oArgs: &ParseXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return ` + + + 00001 + Joe + joe.smith@example.com + + User did a thing + `, nil + }, + }, + }, + want: map[string]any{ + "tag": "Log", + "children": []any{ + map[string]any{ + "tag": "User", + "children": []any{ + map[string]any{ + "tag": "ID", + "content": "00001", + }, + map[string]any{ + "tag": "Name", + "content": "Joe", + }, + map[string]any{ + "tag": "Email", + "content": "joe.smith@example.com", + }, + }, + }, + map[string]any{ + "tag": "Text", + "content": "User did a thing", + }, + }, + }, + }, + { + name: "Multiple tags with the same name", + oArgs: &ParseXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `This record has a collision`, nil + }, + }, + }, + want: map[string]any{ + "tag": "Log", + "content": "This record has a collision", + "children": []any{ + map[string]any{ + "tag": "User", + "attributes": map[string]any{ + "id": "0001", + }, + }, + map[string]any{ + "tag": "User", + "attributes": map[string]any{ + "id": "0002", + }, + }, + }, + }, + }, + { + name: "Multiple lines of content", + oArgs: &ParseXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return ` + This record has multiple lines of + + text content + `, nil + }, + }, + }, + want: map[string]any{ + "tag": "Log", + "content": "This record has multiple lines oftext content", + "children": []any{ + map[string]any{ + "tag": "User", + "attributes": map[string]any{ + "id": "0001", + }, + }, + }, + }, + }, + { + name: "Attribute only element", + oArgs: &ParseXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return ``, nil + }, + }, + }, + want: map[string]any{ + "tag": "HostInfo", + "attributes": map[string]any{ + "hostname": "example.com", + "zone": "east-1", + "cloudprovider": "aws", + }, + }, + }, + { + name: "Ignores XML declaration", + oArgs: &ParseXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `Log content`, nil + }, + }, + }, + want: map[string]any{ + "tag": "Log", + "content": "Log content", + }, + }, + { + name: "Ignores comments", + oArgs: &ParseXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `This has a comment `, nil + }, + }, + }, + want: map[string]any{ + "tag": "Log", + "content": "This has a comment", + }, + }, + { + name: "Ignores processing instructions", + oArgs: &ParseXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `Log content`, nil + }, + }, + }, + want: map[string]any{ + "tag": "Log", + "content": "Log content", + }, + }, + { + name: "Ignores directives", + oArgs: &ParseXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `Log content`, nil + }, + }, + }, + want: map[string]any{ + "tag": "Log", + "content": "Log content", + }, + }, + { + name: "Missing closing element", + oArgs: &ParseXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return ``, nil + }, + }, + }, + parseError: "unmarshal xml: decode next token: XML syntax error on line 1: unexpected EOF", + }, + { + name: "Missing nested closing element", + oArgs: &ParseXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return ``, nil + }, + }, + }, + parseError: "unmarshal xml: decode next token: XML syntax error on line 1: element closed by ", + }, + { + name: "Multiple XML elements in payload (trailing bytes)", + oArgs: &ParseXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return ``, nil + }, + }, + }, + parseError: "trailing bytes after parsing xml", + }, + { + name: "Error getting target", + oArgs: &ParseXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "", fmt.Errorf("failed to get string") + }, + }, + }, + parseError: "error getting value in ottl.StandardStringGetter[interface {}]: failed to get string", + }, + { + name: "Invalid arguments", + oArgs: nil, + createError: "ParseXMLFactory args must be of type *ParseXMLArguments[K]", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + exprFunc, err := createParseXMLFunction[any](ottl.FunctionContext{}, tt.oArgs) + if tt.createError != "" { + require.ErrorContains(t, err, tt.createError) + return + } + + require.NoError(t, err) + + result, err := exprFunc(context.Background(), nil) + if tt.parseError != "" { + require.ErrorContains(t, err, tt.parseError) + return + } + + assert.NoError(t, err) + + resultMap, ok := result.(pcommon.Map) + require.True(t, ok) + + require.Equal(t, tt.want, resultMap.AsRaw()) + }) + } +} diff --git a/pkg/ottl/ottlfuncs/func_replace_all_matches.go b/pkg/ottl/ottlfuncs/func_replace_all_matches.go index 597cf878a12c..650630e00f0b 100644 --- a/pkg/ottl/ottlfuncs/func_replace_all_matches.go +++ b/pkg/ottl/ottlfuncs/func_replace_all_matches.go @@ -14,10 +14,11 @@ import ( ) type ReplaceAllMatchesArguments[K any] struct { - Target ottl.PMapGetter[K] - Pattern string - Replacement ottl.StringGetter[K] - Function ottl.Optional[ottl.FunctionGetter[K]] + Target ottl.PMapGetter[K] + Pattern string + Replacement ottl.StringGetter[K] + Function ottl.Optional[ottl.FunctionGetter[K]] + ReplacementFormat ottl.Optional[ottl.StringGetter[K]] } type replaceAllMatchesFuncArgs[K any] struct { @@ -35,10 +36,10 @@ func createReplaceAllMatchesFunction[K any](_ ottl.FunctionContext, oArgs ottl.A return nil, fmt.Errorf("ReplaceAllMatchesFactory args must be of type *ReplaceAllMatchesArguments[K]") } - return replaceAllMatches(args.Target, args.Pattern, args.Replacement, args.Function) + return replaceAllMatches(args.Target, args.Pattern, args.Replacement, args.Function, args.ReplacementFormat) } -func replaceAllMatches[K any](target ottl.PMapGetter[K], pattern string, replacement ottl.StringGetter[K], fn ottl.Optional[ottl.FunctionGetter[K]]) (ottl.ExprFunc[K], error) { +func replaceAllMatches[K any](target ottl.PMapGetter[K], pattern string, replacement ottl.StringGetter[K], fn ottl.Optional[ottl.FunctionGetter[K]], replacementFormat ottl.Optional[ottl.StringGetter[K]]) (ottl.ExprFunc[K], error) { glob, err := glob.Compile(pattern) if err != nil { return nil, fmt.Errorf("the pattern supplied to replace_match is not a valid pattern: %w", err) @@ -68,9 +69,12 @@ func replaceAllMatches[K any](target ottl.PMapGetter[K], pattern string, replace if !ok { return nil, fmt.Errorf("replacement value is not a string") } - replacementVal = replacementValStr + replacementVal, err = applyReplaceFormat(ctx, tCtx, replacementFormat, replacementValStr) + if err != nil { + return nil, err + } } - val.Range(func(key string, value pcommon.Value) bool { + val.Range(func(_ string, value pcommon.Value) bool { if glob.Match(value.Str()) { value.SetStr(replacementVal) } diff --git a/pkg/ottl/ottlfuncs/func_replace_all_matches_test.go b/pkg/ottl/ottlfuncs/func_replace_all_matches_test.go index 88d1d7fe019e..a70d56eb80df 100644 --- a/pkg/ottl/ottlfuncs/func_replace_all_matches_test.go +++ b/pkg/ottl/ottlfuncs/func_replace_all_matches_test.go @@ -25,23 +25,29 @@ func Test_replaceAllMatches(t *testing.T) { FCtx: ottl.FunctionContext{ Set: componenttest.NewNopTelemetrySettings(), }, - Fact: StandardConverters[pcommon.Map]()["SHA256"], + Fact: optionalFnTestFactory[pcommon.Map](), + } + prefix := ottl.StandardStringGetter[pcommon.Map]{ + Getter: func(context.Context, pcommon.Map) (any, error) { + return "prefix=%s", nil + }, } optionalArg := ottl.NewTestingOptional[ottl.FunctionGetter[pcommon.Map]](ottlValue) target := &ottl.StandardPMapGetter[pcommon.Map]{ - Getter: func(ctx context.Context, tCtx pcommon.Map) (any, error) { + Getter: func(_ context.Context, tCtx pcommon.Map) (any, error) { return tCtx, nil }, } tests := []struct { - name string - target ottl.PMapGetter[pcommon.Map] - pattern string - replacement ottl.StringGetter[pcommon.Map] - function ottl.Optional[ottl.FunctionGetter[pcommon.Map]] - want func(pcommon.Map) + name string + target ottl.PMapGetter[pcommon.Map] + pattern string + replacement ottl.StringGetter[pcommon.Map] + function ottl.Optional[ottl.FunctionGetter[pcommon.Map]] + replacementFormat ottl.Optional[ottl.StringGetter[pcommon.Map]] + want func(pcommon.Map) }{ { name: "replace only matches (with hash function)", @@ -52,10 +58,11 @@ func Test_replaceAllMatches(t *testing.T) { return "hello {universe}", nil }, }, - function: optionalArg, + function: optionalArg, + replacementFormat: ottl.NewTestingOptional[ottl.StringGetter[pcommon.Map]](prefix), want: func(expectedMap pcommon.Map) { - expectedMap.PutStr("test", "4804d6b7f03268e33f78c484977f3d81771220df07cc6aac4ad4868102141fad") - expectedMap.PutStr("test2", "4804d6b7f03268e33f78c484977f3d81771220df07cc6aac4ad4868102141fad") + expectedMap.PutStr("test", "prefix=hash(hello {universe})") + expectedMap.PutStr("test2", "prefix=hash(hello {universe})") expectedMap.PutStr("test3", "goodbye") }, }, @@ -68,7 +75,8 @@ func Test_replaceAllMatches(t *testing.T) { return "hello {universe}", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Map]]{}, want: func(expectedMap pcommon.Map) { expectedMap.PutStr("test", "hello {universe}") expectedMap.PutStr("test2", "hello {universe}") @@ -84,7 +92,8 @@ func Test_replaceAllMatches(t *testing.T) { return "nothing {matches}", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Map]]{}, want: func(expectedMap pcommon.Map) { expectedMap.PutStr("test", "hello world") expectedMap.PutStr("test2", "hello") @@ -97,7 +106,7 @@ func Test_replaceAllMatches(t *testing.T) { scenarioMap := pcommon.NewMap() input.CopyTo(scenarioMap) - exprFunc, err := replaceAllMatches(tt.target, tt.pattern, tt.replacement, tt.function) + exprFunc, err := replaceAllMatches(tt.target, tt.pattern, tt.replacement, tt.function, tt.replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, scenarioMap) @@ -115,7 +124,7 @@ func Test_replaceAllMatches(t *testing.T) { func Test_replaceAllMatches_bad_input(t *testing.T) { input := pcommon.NewValueStr("not a map") target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } @@ -125,8 +134,9 @@ func Test_replaceAllMatches_bad_input(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replaceAllMatches[any](target, "*", replacement, function) + exprFunc, err := replaceAllMatches[any](target, "*", replacement, function, replacementFormat) assert.NoError(t, err) _, err = exprFunc(nil, input) assert.Error(t, err) @@ -135,7 +145,7 @@ func Test_replaceAllMatches_bad_input(t *testing.T) { func Test_replaceAllMatches_bad_function_input(t *testing.T) { input := pcommon.NewValueInt(1) target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } @@ -145,8 +155,9 @@ func Test_replaceAllMatches_bad_function_input(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replaceAllMatches[any](target, "regexp", replacement, function) + exprFunc, err := replaceAllMatches[any](target, "regexp", replacement, function, replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, input) @@ -158,7 +169,7 @@ func Test_replaceAllMatches_bad_function_input(t *testing.T) { func Test_replaceAllMatches_bad_function_result(t *testing.T) { input := pcommon.NewValueInt(1) target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } @@ -174,8 +185,9 @@ func Test_replaceAllMatches_bad_function_result(t *testing.T) { Fact: StandardConverters[any]()["IsString"], } function := ottl.NewTestingOptional[ottl.FunctionGetter[any]](ottlValue) + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replaceAllMatches[any](target, "regexp", replacement, function) + exprFunc, err := replaceAllMatches[any](target, "regexp", replacement, function, replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, input) @@ -185,7 +197,7 @@ func Test_replaceAllMatches_bad_function_result(t *testing.T) { func Test_replaceAllMatches_get_nil(t *testing.T) { target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } @@ -195,8 +207,9 @@ func Test_replaceAllMatches_get_nil(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replaceAllMatches[any](target, "*", replacement, function) + exprFunc, err := replaceAllMatches[any](target, "*", replacement, function, replacementFormat) assert.NoError(t, err) _, err = exprFunc(nil, nil) assert.Error(t, err) diff --git a/pkg/ottl/ottlfuncs/func_replace_all_patterns.go b/pkg/ottl/ottlfuncs/func_replace_all_patterns.go index 2c7ee3ef3386..0f3aae69e8c2 100644 --- a/pkg/ottl/ottlfuncs/func_replace_all_patterns.go +++ b/pkg/ottl/ottlfuncs/func_replace_all_patterns.go @@ -19,15 +19,12 @@ const ( ) type ReplaceAllPatternsArguments[K any] struct { - Target ottl.PMapGetter[K] - Mode string - RegexPattern string - Replacement ottl.StringGetter[K] - Function ottl.Optional[ottl.FunctionGetter[K]] -} - -type replaceAllPatternFuncArgs[K any] struct { - Input ottl.StringGetter[K] + Target ottl.PMapGetter[K] + Mode string + RegexPattern string + Replacement ottl.StringGetter[K] + Function ottl.Optional[ottl.FunctionGetter[K]] + ReplacementFormat ottl.Optional[ottl.StringGetter[K]] } func NewReplaceAllPatternsFactory[K any]() ottl.Factory[K] { @@ -41,10 +38,10 @@ func createReplaceAllPatternsFunction[K any](_ ottl.FunctionContext, oArgs ottl. return nil, fmt.Errorf("ReplaceAllPatternsFactory args must be of type *ReplaceAllPatternsArguments[K]") } - return replaceAllPatterns(args.Target, args.Mode, args.RegexPattern, args.Replacement, args.Function) + return replaceAllPatterns(args.Target, args.Mode, args.RegexPattern, args.Replacement, args.Function, args.ReplacementFormat) } -func replaceAllPatterns[K any](target ottl.PMapGetter[K], mode string, regexPattern string, replacement ottl.StringGetter[K], fn ottl.Optional[ottl.FunctionGetter[K]]) (ottl.ExprFunc[K], error) { +func replaceAllPatterns[K any](target ottl.PMapGetter[K], mode string, regexPattern string, replacement ottl.StringGetter[K], fn ottl.Optional[ottl.FunctionGetter[K]], replacementFormat ottl.Optional[ottl.StringGetter[K]]) (ottl.ExprFunc[K], error) { compiledPattern, err := regexp.Compile(regexPattern) if err != nil { return nil, fmt.Errorf("the regex pattern supplied to replace_all_patterns is not a valid pattern: %w", err) @@ -59,26 +56,9 @@ func replaceAllPatterns[K any](target ottl.PMapGetter[K], mode string, regexPatt if err != nil { return nil, err } - if fn.IsEmpty() { - replacementVal, err = replacement.Get(ctx, tCtx) - if err != nil { - return nil, err - } - } else { - fnVal := fn.Get() - replacementExpr, errNew := fnVal.Get(&replaceAllPatternFuncArgs[K]{Input: replacement}) - if errNew != nil { - return nil, errNew - } - replacementValRaw, errNew := replacementExpr.Eval(ctx, tCtx) - if errNew != nil { - return nil, errNew - } - replacementValStr, ok := replacementValRaw.(string) - if !ok { - return nil, fmt.Errorf("replacement value is not a string") - } - replacementVal = replacementValStr + replacementVal, err = replacement.Get(ctx, tCtx) + if err != nil { + return nil, err } updated := pcommon.NewMap() updated.EnsureCapacity(val.Len()) @@ -86,15 +66,31 @@ func replaceAllPatterns[K any](target ottl.PMapGetter[K], mode string, regexPatt switch mode { case modeValue: if compiledPattern.MatchString(originalValue.Str()) { - updatedString := compiledPattern.ReplaceAllString(originalValue.Str(), replacementVal) - updated.PutStr(key, updatedString) + if !fn.IsEmpty() { + updatedString, err := applyOptReplaceFunction(ctx, tCtx, compiledPattern, fn, originalValue.Str(), replacementVal, replacementFormat) + if err != nil { + return false + } + updated.PutStr(key, updatedString) + } else { + updatedString := compiledPattern.ReplaceAllString(originalValue.Str(), replacementVal) + updated.PutStr(key, updatedString) + } } else { originalValue.CopyTo(updated.PutEmpty(key)) } case modeKey: if compiledPattern.MatchString(key) { - updatedKey := compiledPattern.ReplaceAllString(key, replacementVal) - originalValue.CopyTo(updated.PutEmpty(updatedKey)) + if !fn.IsEmpty() { + updatedString, err := applyOptReplaceFunction(ctx, tCtx, compiledPattern, fn, key, replacementVal, replacementFormat) + if err != nil { + return false + } + updated.PutStr(key, updatedString) + } else { + updatedKey := compiledPattern.ReplaceAllString(key, replacementVal) + originalValue.CopyTo(updated.PutEmpty(updatedKey)) + } } else { originalValue.CopyTo(updated.PutEmpty(key)) } diff --git a/pkg/ottl/ottlfuncs/func_replace_all_patterns_test.go b/pkg/ottl/ottlfuncs/func_replace_all_patterns_test.go index c171b40e9cea..534bd80f2c07 100644 --- a/pkg/ottl/ottlfuncs/func_replace_all_patterns_test.go +++ b/pkg/ottl/ottlfuncs/func_replace_all_patterns_test.go @@ -28,24 +28,35 @@ func Test_replaceAllPatterns(t *testing.T) { FCtx: ottl.FunctionContext{ Set: componenttest.NewNopTelemetrySettings(), }, - Fact: StandardConverters[pcommon.Map]()["SHA256"], + Fact: optionalFnTestFactory[pcommon.Map](), + } + prefix := ottl.StandardStringGetter[pcommon.Map]{ + Getter: func(context.Context, pcommon.Map) (any, error) { + return "prefix=%s", nil + }, + } + invalidPrefix := ottl.StandardStringGetter[pcommon.Map]{ + Getter: func(context.Context, pcommon.Map) (any, error) { + return "prefix=", nil + }, } optionalArg := ottl.NewTestingOptional[ottl.FunctionGetter[pcommon.Map]](ottlValue) target := &ottl.StandardPMapGetter[pcommon.Map]{ - Getter: func(ctx context.Context, tCtx pcommon.Map) (any, error) { + Getter: func(_ context.Context, tCtx pcommon.Map) (any, error) { return tCtx, nil }, } tests := []struct { - name string - target ottl.PMapGetter[pcommon.Map] - mode string - pattern string - replacement ottl.StringGetter[pcommon.Map] - function ottl.Optional[ottl.FunctionGetter[pcommon.Map]] - want func(pcommon.Map) + name string + target ottl.PMapGetter[pcommon.Map] + mode string + pattern string + replacement ottl.StringGetter[pcommon.Map] + replacementFormat ottl.Optional[ottl.StringGetter[pcommon.Map]] + function ottl.Optional[ottl.FunctionGetter[pcommon.Map]] + want func(pcommon.Map) }{ { name: "replace only matches (with hash function)", @@ -57,16 +68,115 @@ func Test_replaceAllPatterns(t *testing.T) { return "hello {universe}", nil }, }, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Map]]{}, + function: optionalArg, + want: func(expectedMap pcommon.Map) { + expectedMap.PutStr("test", "hash(hello {universe}) world") + expectedMap.PutStr("test2", "hash(hello {universe})") + expectedMap.PutStr("test3", "goodbye world1 and world2") + expectedMap.PutInt("test4", 1234) + expectedMap.PutDouble("test5", 1234) + expectedMap.PutBool("test6", true) + }, + }, + { + name: "replace only matches (with capture group and hash function)", + target: target, + mode: modeValue, + pattern: "(hello)", + replacement: ottl.StandardStringGetter[pcommon.Map]{ + Getter: func(context.Context, pcommon.Map) (any, error) { + return "$1", nil + }, + }, function: optionalArg, want: func(expectedMap pcommon.Map) { - expectedMap.PutStr("test", "4804d6b7f03268e33f78c484977f3d81771220df07cc6aac4ad4868102141fad world") - expectedMap.PutStr("test2", "4804d6b7f03268e33f78c484977f3d81771220df07cc6aac4ad4868102141fad") + expectedMap.PutStr("test", "hash(hello) world") + expectedMap.PutStr("test2", "hash(hello)") expectedMap.PutStr("test3", "goodbye world1 and world2") expectedMap.PutInt("test4", 1234) expectedMap.PutDouble("test5", 1234) expectedMap.PutBool("test6", true) }, }, + { + name: "replace only matches (no capture group and with hash function)", + target: target, + mode: modeValue, + pattern: "hello", + replacement: ottl.StandardStringGetter[pcommon.Map]{ + Getter: func(context.Context, pcommon.Map) (any, error) { + return "$1", nil + }, + }, + function: optionalArg, + want: func(expectedMap pcommon.Map) { + expectedMap.PutStr("test", "hash() world") + expectedMap.PutStr("test2", "hash()") + expectedMap.PutStr("test3", "goodbye world1 and world2") + expectedMap.PutInt("test4", 1234) + expectedMap.PutDouble("test5", 1234) + expectedMap.PutBool("test6", true) + }, + }, + { + name: "replace only matches (no capture group or hash function)", + target: target, + mode: modeValue, + pattern: "hello", + replacement: ottl.StandardStringGetter[pcommon.Map]{ + Getter: func(context.Context, pcommon.Map) (any, error) { + return "$1", nil + }, + }, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + want: func(expectedMap pcommon.Map) { + expectedMap.PutStr("test", " world") + expectedMap.PutStr("test2", "") + expectedMap.PutStr("test3", "goodbye world1 and world2") + expectedMap.PutInt("test4", 1234) + expectedMap.PutDouble("test5", 1234) + expectedMap.PutBool("test6", true) + }, + }, + { + name: "replace only matches (with replacement format)", + target: target, + mode: modeValue, + pattern: "hello", + replacement: ottl.StandardStringGetter[pcommon.Map]{ + Getter: func(context.Context, pcommon.Map) (any, error) { + return "hello {universe}", nil + }, + }, + replacementFormat: ottl.NewTestingOptional[ottl.StringGetter[pcommon.Map]](prefix), + function: optionalArg, + want: func(expectedMap pcommon.Map) { + expectedMap.PutStr("test", "prefix=hash(hello {universe}) world") + expectedMap.PutStr("test2", "prefix=hash(hello {universe})") + expectedMap.PutStr("test3", "goodbye world1 and world2") + expectedMap.PutInt("test4", 1234) + expectedMap.PutDouble("test5", 1234) + expectedMap.PutBool("test6", true) + }, + }, + { + name: "replace only matches (with invalid replacement format)", + target: target, + mode: modeValue, + pattern: "hello", + replacement: ottl.StandardStringGetter[pcommon.Map]{ + Getter: func(context.Context, pcommon.Map) (any, error) { + return "hello {universe}", nil + }, + }, + replacementFormat: ottl.NewTestingOptional[ottl.StringGetter[pcommon.Map]](invalidPrefix), + function: optionalArg, + want: func(expectedMap pcommon.Map) { + expectedMap.PutEmpty("test") + expectedMap.Remove("test") + }, + }, { name: "replace only matches", target: target, @@ -77,7 +187,8 @@ func Test_replaceAllPatterns(t *testing.T) { return "hello {universe}", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Map]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, want: func(expectedMap pcommon.Map) { expectedMap.PutStr("test", "hello {universe} world") expectedMap.PutStr("test2", "hello {universe}") @@ -97,7 +208,8 @@ func Test_replaceAllPatterns(t *testing.T) { return "nothing {matches}", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Map]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, want: func(expectedMap pcommon.Map) { expectedMap.PutStr("test", "hello world") expectedMap.PutStr("test2", "hello") @@ -117,7 +229,8 @@ func Test_replaceAllPatterns(t *testing.T) { return "**** ", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Map]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, want: func(expectedMap pcommon.Map) { expectedMap.PutStr("test", "hello **** ") expectedMap.PutStr("test2", "hello") @@ -127,6 +240,106 @@ func Test_replaceAllPatterns(t *testing.T) { expectedMap.PutBool("test6", true) }, }, + { + name: "regex match (with multiple capture groups)", + target: target, + mode: modeValue, + pattern: `(world1) and (world2)`, + replacement: ottl.StandardStringGetter[pcommon.Map]{ + Getter: func(context.Context, pcommon.Map) (any, error) { + return "blue-$1 and blue-$2", nil + }, + }, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + want: func(expectedMap pcommon.Map) { + expectedMap.PutStr("test", "hello world") + expectedMap.PutStr("test2", "hello") + expectedMap.PutStr("test3", "goodbye blue-world1 and blue-world2") + expectedMap.PutInt("test4", 1234) + expectedMap.PutDouble("test5", 1234) + expectedMap.PutBool("test6", true) + }, + }, + { + name: "regex match (with multiple matches from one capture group)", + target: target, + mode: modeValue, + pattern: `(world\d)`, + replacement: ottl.StandardStringGetter[pcommon.Map]{ + Getter: func(context.Context, pcommon.Map) (any, error) { + return "blue-$1", nil + }, + }, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + want: func(expectedMap pcommon.Map) { + expectedMap.PutStr("test", "hello world") + expectedMap.PutStr("test2", "hello") + expectedMap.PutStr("test3", "goodbye blue-world1 and blue-world2") + expectedMap.PutInt("test4", 1234) + expectedMap.PutDouble("test5", 1234) + expectedMap.PutBool("test6", true) + }, + }, + { + name: "regex match (with multiple capture groups and hash function)", + target: target, + mode: modeValue, + pattern: `(world1) and (world2)`, + replacement: ottl.StandardStringGetter[pcommon.Map]{ + Getter: func(context.Context, pcommon.Map) (any, error) { + return "$1", nil + }, + }, + function: optionalArg, + want: func(expectedMap pcommon.Map) { + expectedMap.PutStr("test", "hello world") + expectedMap.PutStr("test2", "hello") + expectedMap.PutStr("test3", "goodbye hash(world1)") + expectedMap.PutInt("test4", 1234) + expectedMap.PutDouble("test5", 1234) + expectedMap.PutBool("test6", true) + }, + }, + { + name: "regex match (with multiple capture groups and hash function)", + target: target, + mode: modeValue, + pattern: `(world1) and (world2)`, + replacement: ottl.StandardStringGetter[pcommon.Map]{ + Getter: func(context.Context, pcommon.Map) (any, error) { + return "$2", nil + }, + }, + function: optionalArg, + want: func(expectedMap pcommon.Map) { + expectedMap.PutStr("test", "hello world") + expectedMap.PutStr("test2", "hello") + expectedMap.PutStr("test3", "goodbye hash(world2)") + expectedMap.PutInt("test4", 1234) + expectedMap.PutDouble("test5", 1234) + expectedMap.PutBool("test6", true) + }, + }, + { + name: "regex match (with multiple matches from one capture group and hash function)", + target: target, + mode: modeValue, + pattern: `(world\d)`, + replacement: ottl.StandardStringGetter[pcommon.Map]{ + Getter: func(context.Context, pcommon.Map) (any, error) { + return "$1", nil + }, + }, + function: optionalArg, + want: func(expectedMap pcommon.Map) { + expectedMap.PutStr("test", "hello world") + expectedMap.PutStr("test2", "hello") + expectedMap.PutStr("test3", "goodbye hash(world1) and hash(world2)") + expectedMap.PutInt("test4", 1234) + expectedMap.PutDouble("test5", 1234) + expectedMap.PutBool("test6", true) + }, + }, { name: "replace only matches", target: target, @@ -137,7 +350,8 @@ func Test_replaceAllPatterns(t *testing.T) { return "foo", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Map]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, want: func(expectedMap pcommon.Map) { expectedMap.Clear() expectedMap.PutStr("test", "hello world") @@ -158,7 +372,8 @@ func Test_replaceAllPatterns(t *testing.T) { return "nothing {matches}", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Map]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, want: func(expectedMap pcommon.Map) { expectedMap.Clear() expectedMap.PutStr("test", "hello world") @@ -179,7 +394,8 @@ func Test_replaceAllPatterns(t *testing.T) { return "test.", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Map]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, want: func(expectedMap pcommon.Map) { expectedMap.Clear() expectedMap.PutStr("test.", "hello world") @@ -200,7 +416,8 @@ func Test_replaceAllPatterns(t *testing.T) { return "world-$1", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Map]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, want: func(expectedMap pcommon.Map) { expectedMap.Clear() expectedMap.PutStr("test", "hello world") @@ -221,7 +438,8 @@ func Test_replaceAllPatterns(t *testing.T) { return "test-$1", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Map]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, want: func(expectedMap pcommon.Map) { expectedMap.PutStr("test", "hello world") expectedMap.PutStr("test-2", "hello") @@ -241,7 +459,8 @@ func Test_replaceAllPatterns(t *testing.T) { return "$$world-$1", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Map]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Map]]{}, want: func(expectedMap pcommon.Map) { expectedMap.Clear() expectedMap.PutStr("test", "hello world") @@ -258,11 +477,11 @@ func Test_replaceAllPatterns(t *testing.T) { scenarioMap := pcommon.NewMap() input.CopyTo(scenarioMap) - exprFunc, err := replaceAllPatterns[pcommon.Map](tt.target, tt.mode, tt.pattern, tt.replacement, tt.function) + exprFunc, err := replaceAllPatterns[pcommon.Map](tt.target, tt.mode, tt.pattern, tt.replacement, tt.function, tt.replacementFormat) assert.NoError(t, err) _, err = exprFunc(nil, scenarioMap) - assert.Nil(t, err) + assert.NoError(t, err) expected := pcommon.NewMap() tt.want(expected) @@ -275,7 +494,7 @@ func Test_replaceAllPatterns(t *testing.T) { func Test_replaceAllPatterns_bad_input(t *testing.T) { input := pcommon.NewValueStr("not a map") target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } @@ -285,9 +504,10 @@ func Test_replaceAllPatterns_bad_input(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replaceAllPatterns[any](target, modeValue, "regexpattern", replacement, function) - assert.Nil(t, err) + exprFunc, err := replaceAllPatterns[any](target, modeValue, "regexpattern", replacement, function, replacementFormat) + assert.NoError(t, err) _, err = exprFunc(nil, input) assert.Error(t, err) @@ -296,7 +516,7 @@ func Test_replaceAllPatterns_bad_input(t *testing.T) { func Test_replaceAllPatterns_bad_function_input(t *testing.T) { input := pcommon.NewValueInt(1) target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } @@ -306,8 +526,9 @@ func Test_replaceAllPatterns_bad_function_input(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replaceAllPatterns[any](target, modeValue, "regexp", replacement, function) + exprFunc, err := replaceAllPatterns[any](target, modeValue, "regexp", replacement, function, replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, input) @@ -319,7 +540,7 @@ func Test_replaceAllPatterns_bad_function_input(t *testing.T) { func Test_replaceAllPatterns_bad_function_result(t *testing.T) { input := pcommon.NewValueInt(1) target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } @@ -335,8 +556,9 @@ func Test_replaceAllPatterns_bad_function_result(t *testing.T) { Fact: StandardConverters[any]()["IsString"], } function := ottl.NewTestingOptional[ottl.FunctionGetter[any]](ottlValue) + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replaceAllPatterns[any](target, modeValue, "regexp", replacement, function) + exprFunc, err := replaceAllPatterns[any](target, modeValue, "regexp", replacement, function, replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, input) @@ -346,7 +568,7 @@ func Test_replaceAllPatterns_bad_function_result(t *testing.T) { func Test_replaceAllPatterns_get_nil(t *testing.T) { target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } @@ -356,8 +578,9 @@ func Test_replaceAllPatterns_get_nil(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replaceAllPatterns[any](target, modeValue, "regexp", replacement, function) + exprFunc, err := replaceAllPatterns[any](target, modeValue, "regexp", replacement, function, replacementFormat) assert.NoError(t, err) _, err = exprFunc(nil, nil) @@ -366,7 +589,7 @@ func Test_replaceAllPatterns_get_nil(t *testing.T) { func Test_replaceAllPatterns_invalid_pattern(t *testing.T) { target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { t.Errorf("nothing should be received in this scenario") return nil, nil }, @@ -377,9 +600,10 @@ func Test_replaceAllPatterns_invalid_pattern(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} invalidRegexPattern := "*" - exprFunc, err := replaceAllPatterns[any](target, modeValue, invalidRegexPattern, replacement, function) + exprFunc, err := replaceAllPatterns[any](target, modeValue, invalidRegexPattern, replacement, function, replacementFormat) require.Error(t, err) assert.ErrorContains(t, err, "error parsing regexp:") assert.Nil(t, exprFunc) @@ -387,7 +611,7 @@ func Test_replaceAllPatterns_invalid_pattern(t *testing.T) { func Test_replaceAllPatterns_invalid_model(t *testing.T) { target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { t.Errorf("nothing should be received in this scenario") return nil, nil }, @@ -398,9 +622,10 @@ func Test_replaceAllPatterns_invalid_model(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} invalidMode := "invalid" - exprFunc, err := replaceAllPatterns[any](target, invalidMode, "regex", replacement, function) + exprFunc, err := replaceAllPatterns[any](target, invalidMode, "regex", replacement, function, replacementFormat) assert.Nil(t, exprFunc) assert.Contains(t, err.Error(), "invalid mode") } diff --git a/pkg/ottl/ottlfuncs/func_replace_match.go b/pkg/ottl/ottlfuncs/func_replace_match.go index 123320caa421..21cf825234bc 100644 --- a/pkg/ottl/ottlfuncs/func_replace_match.go +++ b/pkg/ottl/ottlfuncs/func_replace_match.go @@ -13,10 +13,11 @@ import ( ) type ReplaceMatchArguments[K any] struct { - Target ottl.GetSetter[K] - Pattern string - Replacement ottl.StringGetter[K] - Function ottl.Optional[ottl.FunctionGetter[K]] + Target ottl.GetSetter[K] + Pattern string + Replacement ottl.StringGetter[K] + Function ottl.Optional[ottl.FunctionGetter[K]] + ReplacementFormat ottl.Optional[ottl.StringGetter[K]] } type replaceMatchFuncArgs[K any] struct { @@ -34,10 +35,10 @@ func createReplaceMatchFunction[K any](_ ottl.FunctionContext, oArgs ottl.Argume return nil, fmt.Errorf("ReplaceMatchFactory args must be of type *ReplaceMatchArguments[K]") } - return replaceMatch(args.Target, args.Pattern, args.Replacement, args.Function) + return replaceMatch(args.Target, args.Pattern, args.Replacement, args.Function, args.ReplacementFormat) } -func replaceMatch[K any](target ottl.GetSetter[K], pattern string, replacement ottl.StringGetter[K], fn ottl.Optional[ottl.FunctionGetter[K]]) (ottl.ExprFunc[K], error) { +func replaceMatch[K any](target ottl.GetSetter[K], pattern string, replacement ottl.StringGetter[K], fn ottl.Optional[ottl.FunctionGetter[K]], replacementFormat ottl.Optional[ottl.StringGetter[K]]) (ottl.ExprFunc[K], error) { glob, err := glob.Compile(pattern) if err != nil { return nil, fmt.Errorf("the pattern supplied to replace_match is not a valid pattern: %w", err) @@ -67,7 +68,10 @@ func replaceMatch[K any](target ottl.GetSetter[K], pattern string, replacement o if !ok { return nil, fmt.Errorf("replacement value is not a string") } - replacementVal = replacementValStr + replacementVal, err = applyReplaceFormat(ctx, tCtx, replacementFormat, replacementValStr) + if err != nil { + return nil, err + } } if err != nil { return nil, err diff --git a/pkg/ottl/ottlfuncs/func_replace_match_test.go b/pkg/ottl/ottlfuncs/func_replace_match_test.go index 5de8512f1c1e..22db0a7d445a 100644 --- a/pkg/ottl/ottlfuncs/func_replace_match_test.go +++ b/pkg/ottl/ottlfuncs/func_replace_match_test.go @@ -21,26 +21,32 @@ func Test_replaceMatch(t *testing.T) { FCtx: ottl.FunctionContext{ Set: componenttest.NewNopTelemetrySettings(), }, - Fact: StandardConverters[pcommon.Value]()["SHA256"], + Fact: optionalFnTestFactory[pcommon.Value](), + } + passwdPrefix := ottl.StandardStringGetter[pcommon.Value]{ + Getter: func(context.Context, pcommon.Value) (any, error) { + return "passwd=%s", nil + }, } optionalArg := ottl.NewTestingOptional[ottl.FunctionGetter[pcommon.Value]](ottlValue) target := &ottl.StandardGetSetter[pcommon.Value]{ - Getter: func(ctx context.Context, tCtx pcommon.Value) (any, error) { + Getter: func(_ context.Context, tCtx pcommon.Value) (any, error) { return tCtx.Str(), nil }, - Setter: func(ctx context.Context, tCtx pcommon.Value, val any) error { + Setter: func(_ context.Context, tCtx pcommon.Value, val any) error { tCtx.SetStr(val.(string)) return nil }, } tests := []struct { - name string - target ottl.GetSetter[pcommon.Value] - pattern string - replacement ottl.StringGetter[pcommon.Value] - function ottl.Optional[ottl.FunctionGetter[pcommon.Value]] - want func(pcommon.Value) + name string + target ottl.GetSetter[pcommon.Value] + pattern string + replacement ottl.StringGetter[pcommon.Value] + function ottl.Optional[ottl.FunctionGetter[pcommon.Value]] + replacementFormat ottl.Optional[ottl.StringGetter[pcommon.Value]] + want func(pcommon.Value) }{ { name: "replace match (with hash function)", @@ -51,9 +57,10 @@ func Test_replaceMatch(t *testing.T) { return "hello {universe}", nil }, }, - function: optionalArg, + function: optionalArg, + replacementFormat: ottl.NewTestingOptional[ottl.StringGetter[pcommon.Value]](passwdPrefix), want: func(expectedValue pcommon.Value) { - expectedValue.SetStr("4804d6b7f03268e33f78c484977f3d81771220df07cc6aac4ad4868102141fad") + expectedValue.SetStr("passwd=hash(hello {universe})") }, }, { @@ -65,7 +72,8 @@ func Test_replaceMatch(t *testing.T) { return "hello {universe}", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Value]]{}, want: func(expectedValue pcommon.Value) { expectedValue.SetStr("hello {universe}") }, @@ -79,7 +87,8 @@ func Test_replaceMatch(t *testing.T) { return "goodbye {universe}", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Value]]{}, want: func(expectedValue pcommon.Value) { expectedValue.SetStr("hello world") }, @@ -89,7 +98,7 @@ func Test_replaceMatch(t *testing.T) { t.Run(tt.name, func(t *testing.T) { scenarioValue := pcommon.NewValueStr(input.Str()) - exprFunc, err := replaceMatch(tt.target, tt.pattern, tt.replacement, tt.function) + exprFunc, err := replaceMatch(tt.target, tt.pattern, tt.replacement, tt.function, tt.replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, scenarioValue) assert.NoError(t, err) @@ -106,10 +115,10 @@ func Test_replaceMatch(t *testing.T) { func Test_replaceMatch_bad_input(t *testing.T) { input := pcommon.NewValueInt(1) target := &ottl.StandardGetSetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, - Setter: func(ctx context.Context, tCtx any, val any) error { + Setter: func(_ context.Context, _ any, _ any) error { t.Errorf("nothing should be set in this scenario") return nil }, @@ -120,8 +129,9 @@ func Test_replaceMatch_bad_input(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replaceMatch[any](target, "*", replacement, function) + exprFunc, err := replaceMatch[any](target, "*", replacement, function, replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, input) @@ -134,10 +144,10 @@ func Test_replaceMatch_bad_input(t *testing.T) { func Test_replaceMatch_bad_function_input(t *testing.T) { input := pcommon.NewValueInt(1) target := &ottl.StandardGetSetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, - Setter: func(ctx context.Context, tCtx any, val any) error { + Setter: func(_ context.Context, _ any, _ any) error { t.Errorf("nothing should be set in this scenario") return nil }, @@ -148,8 +158,9 @@ func Test_replaceMatch_bad_function_input(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replaceMatch[any](target, "regexp", replacement, function) + exprFunc, err := replaceMatch[any](target, "regexp", replacement, function, replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, input) @@ -161,10 +172,10 @@ func Test_replaceMatch_bad_function_input(t *testing.T) { func Test_replaceMatch_bad_function_result(t *testing.T) { input := pcommon.NewValueInt(1) target := &ottl.StandardGetSetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, - Setter: func(ctx context.Context, tCtx any, val any) error { + Setter: func(_ context.Context, _ any, _ any) error { t.Errorf("nothing should be set in this scenario") return nil }, @@ -181,8 +192,9 @@ func Test_replaceMatch_bad_function_result(t *testing.T) { Fact: StandardConverters[any]()["IsString"], } function := ottl.NewTestingOptional[ottl.FunctionGetter[any]](ottlValue) + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replaceMatch[any](target, "regexp", replacement, function) + exprFunc, err := replaceMatch[any](target, "regexp", replacement, function, replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, input) @@ -193,10 +205,10 @@ func Test_replaceMatch_bad_function_result(t *testing.T) { func Test_replaceMatch_get_nil(t *testing.T) { target := &ottl.StandardGetSetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, - Setter: func(ctx context.Context, tCtx any, val any) error { + Setter: func(_ context.Context, _ any, _ any) error { t.Errorf("nothing should be set in this scenario") return nil }, @@ -207,8 +219,9 @@ func Test_replaceMatch_get_nil(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replaceMatch[any](target, "*", replacement, function) + exprFunc, err := replaceMatch[any](target, "*", replacement, function, replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, nil) diff --git a/pkg/ottl/ottlfuncs/func_replace_pattern.go b/pkg/ottl/ottlfuncs/func_replace_pattern.go index aed32367ddc6..b77d3463d19b 100644 --- a/pkg/ottl/ottlfuncs/func_replace_pattern.go +++ b/pkg/ottl/ottlfuncs/func_replace_pattern.go @@ -7,15 +7,17 @@ import ( "context" "fmt" "regexp" + "strings" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" ) type ReplacePatternArguments[K any] struct { - Target ottl.GetSetter[K] - RegexPattern string - Replacement ottl.StringGetter[K] - Function ottl.Optional[ottl.FunctionGetter[K]] + Target ottl.GetSetter[K] + RegexPattern string + Replacement ottl.StringGetter[K] + Function ottl.Optional[ottl.FunctionGetter[K]] + ReplacementFormat ottl.Optional[ottl.StringGetter[K]] } type replacePatternFuncArgs[K any] struct { @@ -33,10 +35,69 @@ func createReplacePatternFunction[K any](_ ottl.FunctionContext, oArgs ottl.Argu return nil, fmt.Errorf("ReplacePatternFactory args must be of type *ReplacePatternArguments[K]") } - return replacePattern(args.Target, args.RegexPattern, args.Replacement, args.Function) + return replacePattern(args.Target, args.RegexPattern, args.Replacement, args.Function, args.ReplacementFormat) } -func replacePattern[K any](target ottl.GetSetter[K], regexPattern string, replacement ottl.StringGetter[K], fn ottl.Optional[ottl.FunctionGetter[K]]) (ottl.ExprFunc[K], error) { +func validFormatString(formatString string) bool { + // Check for exactly one %s and no other invalid format specifiers + validPattern := `^(.*?%s.*?)$` + validRegex := regexp.MustCompile(validPattern) + invalidPattern := `%[^s]` + invalidRegex := regexp.MustCompile(invalidPattern) + + return validRegex.MatchString(formatString) && !invalidRegex.MatchString(formatString) +} + +func applyReplaceFormat[K any](ctx context.Context, tCtx K, replacementFormat ottl.Optional[ottl.StringGetter[K]], replacementVal string) (string, error) { + if !replacementFormat.IsEmpty() { // If replacementFormat is not empty, add it to the replacement value + formatString := replacementFormat.Get() + formatStringVal, errFmt := formatString.Get(ctx, tCtx) + if errFmt != nil { + return "", errFmt + } + if !validFormatString(formatStringVal) { + return "", fmt.Errorf("replacementFormat must be format string containing a single %%s and no other format specifiers") + } + replacementVal = fmt.Sprintf(formatStringVal, replacementVal) + } + return replacementVal, nil +} + +func applyOptReplaceFunction[K any](ctx context.Context, tCtx K, compiledPattern *regexp.Regexp, fn ottl.Optional[ottl.FunctionGetter[K]], originalValStr string, replacementVal string, replacementFormat ottl.Optional[ottl.StringGetter[K]]) (string, error) { + var updatedString string + updatedString = originalValStr + submatches := compiledPattern.FindAllStringSubmatchIndex(updatedString, -1) + for _, submatch := range submatches { + fullMatch := originalValStr[submatch[0]:submatch[1]] + result := compiledPattern.ExpandString([]byte{}, replacementVal, originalValStr, submatch) + fnVal := fn.Get() + replaceValGetter := ottl.StandardStringGetter[K]{ + Getter: func(context.Context, K) (any, error) { + return string(result), nil + }, + } + replacementExpr, errNew := fnVal.Get(&replacePatternFuncArgs[K]{Input: replaceValGetter}) + if errNew != nil { + return "", errNew + } + replacementValRaw, errNew := replacementExpr.Eval(ctx, tCtx) + if errNew != nil { + return "", errNew + } + replacementValStr, ok := replacementValRaw.(string) + if !ok { + return "", fmt.Errorf("the replacement value must be a string") + } + replacementValStr, errNew = applyReplaceFormat(ctx, tCtx, replacementFormat, replacementValStr) + if errNew != nil { + return "", errNew + } + updatedString = strings.ReplaceAll(updatedString, fullMatch, replacementValStr) + } + return updatedString, nil +} + +func replacePattern[K any](target ottl.GetSetter[K], regexPattern string, replacement ottl.StringGetter[K], fn ottl.Optional[ottl.FunctionGetter[K]], replacementFormat ottl.Optional[ottl.StringGetter[K]]) (ottl.ExprFunc[K], error) { compiledPattern, err := regexp.Compile(regexPattern) if err != nil { return nil, fmt.Errorf("the regex pattern supplied to replace_pattern is not a valid pattern: %w", err) @@ -47,36 +108,31 @@ func replacePattern[K any](target ottl.GetSetter[K], regexPattern string, replac if err != nil { return nil, err } - if fn.IsEmpty() { - replacementVal, err = replacement.Get(ctx, tCtx) - if err != nil { - return nil, err - } - } else { - fnVal := fn.Get() - replacementExpr, errNew := fnVal.Get(&replacePatternFuncArgs[K]{Input: replacement}) - if errNew != nil { - return nil, errNew - } - replacementValRaw, errNew := replacementExpr.Eval(ctx, tCtx) - if errNew != nil { - return nil, errNew - } - replacementValStr, ok := replacementValRaw.(string) - if !ok { - return nil, fmt.Errorf("replacement value is not a string") - } - replacementVal = replacementValStr - } if originalVal == nil { return nil, nil } + replacementVal, err = replacement.Get(ctx, tCtx) + if err != nil { + return nil, err + } if originalValStr, ok := originalVal.(string); ok { if compiledPattern.MatchString(originalValStr) { - updatedStr := compiledPattern.ReplaceAllString(originalValStr, replacementVal) - err = target.Set(ctx, tCtx, updatedStr) - if err != nil { - return nil, err + if !fn.IsEmpty() { + var updatedString string + updatedString, err = applyOptReplaceFunction[K](ctx, tCtx, compiledPattern, fn, originalValStr, replacementVal, replacementFormat) + if err != nil { + return nil, err + } + err = target.Set(ctx, tCtx, updatedString) + if err != nil { + return nil, err + } + } else { + updatedStr := compiledPattern.ReplaceAllString(originalValStr, replacementVal) + err = target.Set(ctx, tCtx, updatedStr) + if err != nil { + return nil, err + } } } } diff --git a/pkg/ottl/ottlfuncs/func_replace_pattern_test.go b/pkg/ottl/ottlfuncs/func_replace_pattern_test.go index 66edf7d25177..1ccfcf712081 100644 --- a/pkg/ottl/ottlfuncs/func_replace_pattern_test.go +++ b/pkg/ottl/ottlfuncs/func_replace_pattern_test.go @@ -5,6 +5,7 @@ package ottlfuncs import ( "context" + "fmt" "testing" "github.com/stretchr/testify/assert" @@ -15,45 +16,143 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" ) +type optionalFnTestArgs[K any] struct { + Target ottl.StringGetter[K] +} + +func optionalFnTestFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("Test", &optionalFnTestArgs[K]{}, createTestFunction[K]) +} + +func createTestFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*optionalFnTestArgs[K]) + + if !ok { + return nil, fmt.Errorf("TestFactory args must be of type *optionalFnTestArgs[K]") + } + + return hashString(args.Target), nil +} + +func hashString[K any](target ottl.StringGetter[K]) ottl.ExprFunc[K] { + + return func(ctx context.Context, tCtx K) (any, error) { + val, err := target.Get(ctx, tCtx) + if err != nil { + return nil, err + } + return fmt.Sprintf("hash(%s)", val), nil + } +} + func Test_replacePattern(t *testing.T) { input := pcommon.NewValueStr("application passwd=sensitivedtata otherarg=notsensitive key1 key2") ottlValue := ottl.StandardFunctionGetter[pcommon.Value]{ FCtx: ottl.FunctionContext{ Set: componenttest.NewNopTelemetrySettings(), }, - Fact: StandardConverters[pcommon.Value]()["SHA256"], + Fact: optionalFnTestFactory[pcommon.Value](), + } + passwdPrefix := ottl.StandardStringGetter[pcommon.Value]{ + Getter: func(context.Context, pcommon.Value) (any, error) { + return "passwd=%s", nil + }, + } + passwdSuffix := ottl.StandardStringGetter[pcommon.Value]{ + Getter: func(context.Context, pcommon.Value) (any, error) { + return "%s (passwd)", nil + }, } optionalArg := ottl.NewTestingOptional[ottl.FunctionGetter[pcommon.Value]](ottlValue) target := &ottl.StandardGetSetter[pcommon.Value]{ - Getter: func(ctx context.Context, tCtx pcommon.Value) (any, error) { + Getter: func(_ context.Context, tCtx pcommon.Value) (any, error) { return tCtx.Str(), nil }, - Setter: func(ctx context.Context, tCtx pcommon.Value, val any) error { + Setter: func(_ context.Context, tCtx pcommon.Value, val any) error { tCtx.SetStr(val.(string)) return nil }, } tests := []struct { - name string - target ottl.GetSetter[pcommon.Value] - pattern string - replacement ottl.StringGetter[pcommon.Value] - function ottl.Optional[ottl.FunctionGetter[pcommon.Value]] - want func(pcommon.Value) + name string + target ottl.GetSetter[pcommon.Value] + pattern string + replacement ottl.StringGetter[pcommon.Value] + replacementFormat ottl.Optional[ottl.StringGetter[pcommon.Value]] + function ottl.Optional[ottl.FunctionGetter[pcommon.Value]] + want func(pcommon.Value) }{ { name: "replace regex match (with hash function)", target: target, - pattern: `passwd\=[^\s]*(\s?)`, + pattern: `passwd\=([^\s]*)\s?`, replacement: ottl.StandardStringGetter[pcommon.Value]{ Getter: func(context.Context, pcommon.Value) (any, error) { - return "passwd=*** ", nil + return "$1", nil + }, + }, + replacementFormat: ottl.NewTestingOptional[ottl.StringGetter[pcommon.Value]](passwdPrefix), + function: optionalArg, + want: func(expectedValue pcommon.Value) { + expectedValue.SetStr("application passwd=hash(sensitivedtata)otherarg=notsensitive key1 key2") + }, + }, + { + name: "replace regex match (static text)", + target: target, + pattern: `passwd\=([^\s]*)`, + replacement: ottl.StandardStringGetter[pcommon.Value]{ + Getter: func(context.Context, pcommon.Value) (any, error) { + return "passwd", nil }, }, function: optionalArg, want: func(expectedValue pcommon.Value) { - expectedValue.SetStr("application 0f2407f2d83337b1f757eb1754a7643ce0e8fba620bc605c54566cd6dfd838beotherarg=notsensitive key1 key2") + expectedValue.SetStr("application hash(passwd) otherarg=notsensitive key1 key2") + }, + }, + { + name: "replace regex match (no capture group with $1 and hash function)", + target: target, + pattern: `passwd\=[^\s]*\s?`, + replacement: ottl.StandardStringGetter[pcommon.Value]{ + Getter: func(context.Context, pcommon.Value) (any, error) { + return "$1", nil + }, + }, + function: optionalArg, + want: func(expectedValue pcommon.Value) { + expectedValue.SetStr("application hash()otherarg=notsensitive key1 key2") + }, + }, + { + name: "replace regex match (no capture group or hash function with $1)", + target: target, + pattern: `passwd\=[^\s]*\s?`, + replacement: ottl.StandardStringGetter[pcommon.Value]{ + Getter: func(context.Context, pcommon.Value) (any, error) { + return "$1", nil + }, + }, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, + want: func(expectedValue pcommon.Value) { + expectedValue.SetStr("application otherarg=notsensitive key1 key2") + }, + }, + { + name: "replace regex match (with hash function)", + target: target, + pattern: `passwd\=[^\s]*`, + replacement: ottl.StandardStringGetter[pcommon.Value]{ + Getter: func(context.Context, pcommon.Value) (any, error) { + return "passwd=***", nil + }, + }, + replacementFormat: ottl.NewTestingOptional[ottl.StringGetter[pcommon.Value]](passwdSuffix), + function: optionalArg, + want: func(expectedValue pcommon.Value) { + expectedValue.SetStr("application hash(passwd=***) (passwd) otherarg=notsensitive key1 key2") }, }, { @@ -65,7 +164,8 @@ func Test_replacePattern(t *testing.T) { return "passwd=*** ", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Value]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, want: func(expectedValue pcommon.Value) { expectedValue.SetStr("application passwd=*** otherarg=notsensitive key1 key2") }, @@ -79,7 +179,8 @@ func Test_replacePattern(t *testing.T) { return "shouldnotbeinoutput", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Value]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, want: func(expectedValue pcommon.Value) { expectedValue.SetStr("application passwd=sensitivedtata otherarg=notsensitive key1 key2") }, @@ -93,7 +194,8 @@ func Test_replacePattern(t *testing.T) { return "**** ", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Value]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, want: func(expectedValue pcommon.Value) { expectedValue.SetStr("application passwd=sensitivedtata otherarg=notsensitive **** **** ") }, @@ -107,7 +209,8 @@ func Test_replacePattern(t *testing.T) { return "$1:$2", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Value]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, want: func(expectedValue pcommon.Value) { expectedValue.SetStr("application passwd:sensitivedtata otherarg:notsensitive key1 key2") }, @@ -121,7 +224,8 @@ func Test_replacePattern(t *testing.T) { return "passwd=$$$$$$ ", nil }, }, - function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, + replacementFormat: ottl.Optional[ottl.StringGetter[pcommon.Value]]{}, + function: ottl.Optional[ottl.FunctionGetter[pcommon.Value]]{}, want: func(expectedValue pcommon.Value) { expectedValue.SetStr("application passwd=$$$ otherarg=notsensitive key1 key2") }, @@ -130,7 +234,7 @@ func Test_replacePattern(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { scenarioValue := pcommon.NewValueStr(input.Str()) - exprFunc, err := replacePattern(tt.target, tt.pattern, tt.replacement, tt.function) + exprFunc, err := replacePattern(tt.target, tt.pattern, tt.replacement, tt.function, tt.replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, scenarioValue) @@ -141,6 +245,7 @@ func Test_replacePattern(t *testing.T) { tt.want(expected) assert.Equal(t, expected, scenarioValue) + }) } } @@ -148,10 +253,10 @@ func Test_replacePattern(t *testing.T) { func Test_replacePattern_bad_input(t *testing.T) { input := pcommon.NewValueInt(1) target := &ottl.StandardGetSetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, - Setter: func(ctx context.Context, tCtx any, val any) error { + Setter: func(_ context.Context, _ any, _ any) error { t.Errorf("nothing should be set in this scenario") return nil }, @@ -162,8 +267,9 @@ func Test_replacePattern_bad_input(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replacePattern[any](target, "regexp", replacement, function) + exprFunc, err := replacePattern[any](target, "regexp", replacement, function, replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, input) @@ -175,10 +281,10 @@ func Test_replacePattern_bad_input(t *testing.T) { func Test_replacePattern_bad_function_input(t *testing.T) { input := pcommon.NewValueInt(1) target := &ottl.StandardGetSetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, - Setter: func(ctx context.Context, tCtx any, val any) error { + Setter: func(_ context.Context, _ any, _ any) error { t.Errorf("nothing should be set in this scenario") return nil }, @@ -189,8 +295,9 @@ func Test_replacePattern_bad_function_input(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replacePattern[any](target, "regexp", replacement, function) + exprFunc, err := replacePattern[any](target, "regexp", replacement, function, replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, input) @@ -202,10 +309,10 @@ func Test_replacePattern_bad_function_input(t *testing.T) { func Test_replacePattern_bad_function_result(t *testing.T) { input := pcommon.NewValueInt(1) target := &ottl.StandardGetSetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, - Setter: func(ctx context.Context, tCtx any, val any) error { + Setter: func(_ context.Context, _ any, _ any) error { t.Errorf("nothing should be set in this scenario") return nil }, @@ -222,22 +329,23 @@ func Test_replacePattern_bad_function_result(t *testing.T) { Fact: StandardConverters[any]()["IsString"], } function := ottl.NewTestingOptional[ottl.FunctionGetter[any]](ottlValue) + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replacePattern[any](target, "regexp", replacement, function) + exprFunc, err := replacePattern[any](target, "regexp", replacement, function, replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, input) require.Error(t, err) - assert.ErrorContains(t, err, "replacement value is not a string") + assert.ErrorContains(t, err, "expected string but got nil") assert.Nil(t, result) } func Test_replacePattern_get_nil(t *testing.T) { target := &ottl.StandardGetSetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, - Setter: func(ctx context.Context, tCtx any, val any) error { + Setter: func(_ context.Context, _ any, _ any) error { t.Errorf("nothing should be set in this scenario") return nil }, @@ -248,8 +356,9 @@ func Test_replacePattern_get_nil(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} - exprFunc, err := replacePattern[any](target, `nomatch\=[^\s]*(\s?)`, replacement, function) + exprFunc, err := replacePattern[any](target, `nomatch\=[^\s]*(\s?)`, replacement, function, replacementFormat) assert.NoError(t, err) result, err := exprFunc(nil, nil) @@ -259,11 +368,11 @@ func Test_replacePattern_get_nil(t *testing.T) { func Test_replacePatterns_invalid_pattern(t *testing.T) { target := &ottl.StandardGetSetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { t.Errorf("nothing should be received in this scenario") return nil, nil }, - Setter: func(ctx context.Context, tCtx any, val any) error { + Setter: func(_ context.Context, _ any, _ any) error { t.Errorf("nothing should be set in this scenario") return nil }, @@ -274,9 +383,48 @@ func Test_replacePatterns_invalid_pattern(t *testing.T) { }, } function := ottl.Optional[ottl.FunctionGetter[any]]{} + replacementFormat := ottl.Optional[ottl.StringGetter[any]]{} invalidRegexPattern := "*" - _, err := replacePattern[any](target, invalidRegexPattern, replacement, function) + _, err := replacePattern[any](target, invalidRegexPattern, replacement, function, replacementFormat) require.Error(t, err) assert.ErrorContains(t, err, "error parsing regexp:") } + +func Test_replacePattern_bad_format_string(t *testing.T) { + input := pcommon.NewValueStr("application passwd=sensitivedtata otherarg=notsensitive key1 key2") + target := &ottl.StandardGetSetter[pcommon.Value]{ + Getter: func(_ context.Context, tCtx pcommon.Value) (any, error) { + return tCtx.Str(), nil + }, + Setter: func(_ context.Context, tCtx pcommon.Value, val any) error { + tCtx.SetStr(val.(string)) + return nil + }, + } + replacement := &ottl.StandardStringGetter[pcommon.Value]{ + Getter: func(context.Context, pcommon.Value) (any, error) { + return "passwd=*** ", nil + }, + } + ottlValue := ottl.StandardFunctionGetter[pcommon.Value]{ + FCtx: ottl.FunctionContext{ + Set: componenttest.NewNopTelemetrySettings(), + }, + Fact: StandardConverters[pcommon.Value]()["SHA256"], + } + passwdPrefix := ottl.StandardStringGetter[pcommon.Value]{ + Getter: func(context.Context, pcommon.Value) (any, error) { + return "passwd=", nil + }, + } + replacementFormat := ottl.NewTestingOptional[ottl.StringGetter[pcommon.Value]](passwdPrefix) // This is not a valid format string + function := ottl.NewTestingOptional[ottl.FunctionGetter[pcommon.Value]](ottlValue) + + exprFunc, err := replacePattern[pcommon.Value](target, `passwd\=[^\s]*`, replacement, function, replacementFormat) + assert.NoError(t, err) + result, err := exprFunc(nil, input) + require.Error(t, err) + assert.ErrorContains(t, err, "replacementFormat must be format string containing a single %s") + assert.Nil(t, result) +} diff --git a/pkg/ottl/ottlfuncs/func_seconds_test.go b/pkg/ottl/ottlfuncs/func_seconds_test.go index 5b218b8eb1a4..70914b9f7364 100644 --- a/pkg/ottl/ottlfuncs/func_seconds_test.go +++ b/pkg/ottl/ottlfuncs/func_seconds_test.go @@ -22,7 +22,7 @@ func Test_Seconds(t *testing.T) { { name: "100 seconds", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("100s") }, }, @@ -31,7 +31,7 @@ func Test_Seconds(t *testing.T) { { name: "1 hour", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("100h") }, }, @@ -40,7 +40,7 @@ func Test_Seconds(t *testing.T) { { name: "11 mins", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("11m") }, }, @@ -49,7 +49,7 @@ func Test_Seconds(t *testing.T) { { name: "50 microseconds", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("11us") }, }, @@ -58,7 +58,7 @@ func Test_Seconds(t *testing.T) { { name: "1 hour 40 mins 3 seconds 30 milliseconds 100 microseconds 1 nanosecond", duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.ParseDuration("1h40m3s30ms100us1ns") }, }, diff --git a/pkg/ottl/ottlfuncs/func_set_test.go b/pkg/ottl/ottlfuncs/func_set_test.go index 90666002153f..7fbf3b2fc765 100644 --- a/pkg/ottl/ottlfuncs/func_set_test.go +++ b/pkg/ottl/ottlfuncs/func_set_test.go @@ -17,7 +17,7 @@ func Test_set(t *testing.T) { input := pcommon.NewValueStr("original name") target := &ottl.StandardGetSetter[pcommon.Value]{ - Setter: func(ctx context.Context, tCtx pcommon.Value, val any) error { + Setter: func(_ context.Context, tCtx pcommon.Value, val any) error { tCtx.SetStr(val.(string)) return nil }, @@ -33,7 +33,7 @@ func Test_set(t *testing.T) { name: "set name", setter: target, getter: ottl.StandardGetSetter[pcommon.Value]{ - Getter: func(ctx context.Context, tCtx pcommon.Value) (any, error) { + Getter: func(_ context.Context, _ pcommon.Value) (any, error) { return "new name", nil }, }, @@ -45,7 +45,7 @@ func Test_set(t *testing.T) { name: "set nil value", setter: target, getter: ottl.StandardGetSetter[pcommon.Value]{ - Getter: func(ctx context.Context, tCtx pcommon.Value) (any, error) { + Getter: func(_ context.Context, _ pcommon.Value) (any, error) { return nil, nil }, }, @@ -74,14 +74,14 @@ func Test_set(t *testing.T) { func Test_set_get_nil(t *testing.T) { setter := &ottl.StandardGetSetter[any]{ - Setter: func(ctx context.Context, tCtx any, val any) error { + Setter: func(_ context.Context, _ any, _ any) error { t.Errorf("nothing should be set in this scenario") return nil }, } getter := &ottl.StandardGetSetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } diff --git a/pkg/ottl/ottlfuncs/func_split_test.go b/pkg/ottl/ottlfuncs/func_split_test.go index 9d12d0044d92..33f8e467b332 100644 --- a/pkg/ottl/ottlfuncs/func_split_test.go +++ b/pkg/ottl/ottlfuncs/func_split_test.go @@ -22,7 +22,7 @@ func Test_split(t *testing.T) { { name: "split string", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "A|B|C", nil }, }, @@ -32,7 +32,7 @@ func Test_split(t *testing.T) { { name: "split empty string", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "", nil }, }, @@ -42,7 +42,7 @@ func Test_split(t *testing.T) { { name: "split empty delimiter", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "A|B|C", nil }, }, @@ -52,7 +52,7 @@ func Test_split(t *testing.T) { { name: "split empty string and empty delimiter", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "", nil }, }, @@ -72,7 +72,7 @@ func Test_split(t *testing.T) { func Test_Split_Error(t *testing.T) { target := &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 1, nil }, } diff --git a/pkg/ottl/ottlfuncs/func_string.go b/pkg/ottl/ottlfuncs/func_string.go new file mode 100644 index 000000000000..c677421e73b4 --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_string.go @@ -0,0 +1,42 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type StringArguments[K any] struct { + Target ottl.StringLikeGetter[K] +} + +func NewStringFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("String", &StringArguments[K]{}, createStringFunction[K]) +} + +func createStringFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*StringArguments[K]) + + if !ok { + return nil, fmt.Errorf("StringFactory args must be of type *StringArguments[K]") + } + + return stringFunc(args.Target), nil +} + +func stringFunc[K any](target ottl.StringLikeGetter[K]) ottl.ExprFunc[K] { + return func(ctx context.Context, tCtx K) (any, error) { + value, err := target.Get(ctx, tCtx) + if err != nil { + return nil, err + } + if value == nil { + return nil, nil + } + return *value, nil + } +} diff --git a/pkg/ottl/ottlfuncs/func_string_test.go b/pkg/ottl/ottlfuncs/func_string_test.go new file mode 100644 index 000000000000..3bd2d1b71bcc --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_string_test.go @@ -0,0 +1,99 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +func Test_String(t *testing.T) { + tests := []struct { + name string + value any + expected any + err bool + }{ + { + name: "string", + value: "test", + expected: string("test"), + }, + { + name: "empty string", + value: "", + expected: string(""), + }, + { + name: "a number string", + value: "333", + expected: string("333"), + }, + { + name: "int64", + value: int64(333), + expected: string("333"), + }, + { + name: "float64", + value: float64(2.7), + expected: string("2.7"), + }, + { + name: "float64 without decimal", + value: float64(55), + expected: string("55"), + }, + { + name: "true", + value: true, + expected: string("true"), + }, + { + name: "false", + value: false, + expected: string("false"), + }, + { + name: "nil", + value: nil, + expected: nil, + }, + { + name: "byte", + value: []byte{123}, + expected: string("7b"), + }, + { + name: "map", + value: map[int]bool{1: true}, + expected: string("{\"1\":true}"), + }, + { + name: "slice", + value: []int{1, 2, 3}, + expected: string("[1,2,3]"), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + exprFunc := stringFunc(&ottl.StandardStringLikeGetter[any]{ + Getter: func(context.Context, any) (any, error) { + return tt.value, nil + }, + }) + result, err := exprFunc(nil, nil) + if tt.err { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + assert.Equal(t, tt.expected, result) + }) + } +} diff --git a/pkg/ottl/ottlfuncs/func_substring_test.go b/pkg/ottl/ottlfuncs/func_substring_test.go index 5a65afff4bfb..491a14f45d8c 100644 --- a/pkg/ottl/ottlfuncs/func_substring_test.go +++ b/pkg/ottl/ottlfuncs/func_substring_test.go @@ -23,7 +23,7 @@ func Test_substring(t *testing.T) { { name: "substring", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "123456789", nil }, }, @@ -42,7 +42,7 @@ func Test_substring(t *testing.T) { { name: "substring with result of total string", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "123456789", nil }, }, @@ -79,7 +79,7 @@ func Test_substring_validation(t *testing.T) { { name: "substring with result of empty string", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "123456789", nil }, }, @@ -97,7 +97,7 @@ func Test_substring_validation(t *testing.T) { { name: "substring with invalid start index", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "123456789", nil }, }, @@ -133,7 +133,7 @@ func Test_substring_error(t *testing.T) { { name: "substring empty string", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "", nil }, }, @@ -151,7 +151,7 @@ func Test_substring_error(t *testing.T) { { name: "substring with invalid length index", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "123456789", nil }, }, @@ -169,7 +169,7 @@ func Test_substring_error(t *testing.T) { { name: "substring non-string", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return 123456789, nil }, }, @@ -187,7 +187,7 @@ func Test_substring_error(t *testing.T) { { name: "substring nil string", target: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return nil, nil }, }, diff --git a/pkg/ottl/ottlfuncs/func_time_test.go b/pkg/ottl/ottlfuncs/func_time_test.go index eae82bf3bf33..5f373026e9a7 100644 --- a/pkg/ottl/ottlfuncs/func_time_test.go +++ b/pkg/ottl/ottlfuncs/func_time_test.go @@ -24,7 +24,7 @@ func Test_Time(t *testing.T) { { name: "simple short form", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "2023-04-12", nil }, }, @@ -34,7 +34,7 @@ func Test_Time(t *testing.T) { { name: "simple short form with short year and slashes", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "11/11/11", nil }, }, @@ -44,7 +44,7 @@ func Test_Time(t *testing.T) { { name: "month day year", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "02/04/2023", nil }, }, @@ -54,7 +54,7 @@ func Test_Time(t *testing.T) { { name: "simple long form", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "July 31, 1993", nil }, }, @@ -64,7 +64,7 @@ func Test_Time(t *testing.T) { { name: "date with timestamp", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "Mar 14 2023 17:02:59", nil }, }, @@ -74,7 +74,7 @@ func Test_Time(t *testing.T) { { name: "day of the week long form", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "Monday, May 01, 2023", nil }, }, @@ -84,7 +84,7 @@ func Test_Time(t *testing.T) { { name: "short weekday, short month, long format", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "Sat, May 20, 2023", nil }, }, @@ -94,7 +94,7 @@ func Test_Time(t *testing.T) { { name: "short months", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "Feb 15, 2023", nil }, }, @@ -104,7 +104,7 @@ func Test_Time(t *testing.T) { { name: "timestamp with time zone offset", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "2023-05-26 12:34:56 HST", nil }, }, @@ -114,7 +114,7 @@ func Test_Time(t *testing.T) { { name: "short date with timestamp without time zone offset", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "2023-05-26T12:34:56 GMT", nil }, }, @@ -124,7 +124,7 @@ func Test_Time(t *testing.T) { { name: "RFC 3339 in custom format", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "2012-11-01T22:08:41+0000 EST", nil }, }, @@ -134,7 +134,7 @@ func Test_Time(t *testing.T) { { name: "RFC 3339 in custom format before 2000", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "1986-10-01T00:17:33 MST", nil }, }, @@ -144,7 +144,7 @@ func Test_Time(t *testing.T) { { name: "no location", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "2022/01/01", nil }, }, @@ -173,7 +173,7 @@ func Test_TimeError(t *testing.T) { { name: "invalid short format", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "11/11/11", nil }, }, @@ -183,7 +183,7 @@ func Test_TimeError(t *testing.T) { { name: "invalid RFC3339 with no time", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "", nil }, }, @@ -211,7 +211,7 @@ func Test_TimeFormatError(t *testing.T) { { name: "invalid short with no format", time: &ottl.StandardStringGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "11/11/11", nil }, }, diff --git a/pkg/ottl/ottlfuncs/func_truncate_all.go b/pkg/ottl/ottlfuncs/func_truncate_all.go index dd47e7e96d87..b10479bd6e3a 100644 --- a/pkg/ottl/ottlfuncs/func_truncate_all.go +++ b/pkg/ottl/ottlfuncs/func_truncate_all.go @@ -44,7 +44,7 @@ func TruncateAll[K any](target ottl.PMapGetter[K], limit int64) (ottl.ExprFunc[K if err != nil { return nil, err } - val.Range(func(key string, value pcommon.Value) bool { + val.Range(func(_ string, value pcommon.Value) bool { stringVal := value.Str() if int64(len(stringVal)) > limit { value.SetStr(stringVal[:limit]) diff --git a/pkg/ottl/ottlfuncs/func_truncate_all_test.go b/pkg/ottl/ottlfuncs/func_truncate_all_test.go index a04ecac3089f..f2c43a349ab1 100644 --- a/pkg/ottl/ottlfuncs/func_truncate_all_test.go +++ b/pkg/ottl/ottlfuncs/func_truncate_all_test.go @@ -21,7 +21,7 @@ func Test_truncateAll(t *testing.T) { input.PutBool("test3", true) target := &ottl.StandardPMapGetter[pcommon.Map]{ - Getter: func(ctx context.Context, tCtx pcommon.Map) (any, error) { + Getter: func(_ context.Context, tCtx pcommon.Map) (any, error) { return tCtx, nil }, } @@ -102,7 +102,7 @@ func Test_truncateAll_validation(t *testing.T) { func Test_truncateAll_bad_input(t *testing.T) { input := pcommon.NewValueStr("not a map") target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } @@ -116,7 +116,7 @@ func Test_truncateAll_bad_input(t *testing.T) { func Test_truncateAll_get_nil(t *testing.T) { target := &ottl.StandardPMapGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, } diff --git a/pkg/ottl/ottlfuncs/func_truncate_time_test.go b/pkg/ottl/ottlfuncs/func_truncate_time_test.go index 33781d3b478e..48864f6e04f3 100644 --- a/pkg/ottl/ottlfuncs/func_truncate_time_test.go +++ b/pkg/ottl/ottlfuncs/func_truncate_time_test.go @@ -24,47 +24,47 @@ func Test_TruncateTime(t *testing.T) { { name: "truncate to 1s", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { - return time.Date(2022, 1, 1, 1, 1, 1, 999999999, time.Local), nil + Getter: func(_ context.Context, _ any) (any, error) { + return time.Date(2022, 1, 1, 1, 1, 1, 999999999, time.UTC), nil }, }, duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { d, _ := time.ParseDuration("1s") return d, nil }, }, - expected: time.Date(2022, 1, 1, 1, 1, 1, 0, time.Local), + expected: time.Date(2022, 1, 1, 1, 1, 1, 0, time.UTC), }, { name: "truncate to 1ms", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { - return time.Date(2022, 1, 1, 1, 1, 1, 999999999, time.Local), nil + Getter: func(_ context.Context, _ any) (any, error) { + return time.Date(2022, 1, 1, 1, 1, 1, 999999999, time.UTC), nil }, }, duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { d, _ := time.ParseDuration("1ms") return d, nil }, }, - expected: time.Date(2022, 1, 1, 1, 1, 1, 999000000, time.Local), + expected: time.Date(2022, 1, 1, 1, 1, 1, 999000000, time.UTC), }, { name: "truncate old time", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { - return time.Date(1980, 9, 9, 9, 59, 59, 999999999, time.Local), nil + Getter: func(_ context.Context, _ any) (any, error) { + return time.Date(1980, 9, 9, 9, 59, 59, 999999999, time.UTC), nil }, }, duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { d, _ := time.ParseDuration("1h") return d, nil }, }, - expected: time.Date(1980, 9, 9, 9, 0, 0, 0, time.Local), + expected: time.Date(1980, 9, 9, 9, 0, 0, 0, time.UTC), }, } for _, tt := range tests { @@ -88,12 +88,12 @@ func Test_TruncateTimeError(t *testing.T) { { name: "not a time", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "11/11/11", nil }, }, duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { d, _ := time.ParseDuration("1ms") return d, nil }, @@ -103,12 +103,12 @@ func Test_TruncateTimeError(t *testing.T) { { name: "not a duration", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Now(), nil }, }, duration: &ottl.StandardDurationGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return "string", nil }, }, diff --git a/pkg/ottl/ottlfuncs/func_unix.go b/pkg/ottl/ottlfuncs/func_unix.go new file mode 100644 index 000000000000..06de04b413ba --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_unix.go @@ -0,0 +1,50 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "fmt" + "time" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type UnixArguments[K any] struct { + Seconds ottl.IntGetter[K] + Nanoseconds ottl.Optional[ottl.IntGetter[K]] +} + +func NewUnixFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("Unix", &UnixArguments[K]{}, createUnixFunction[K]) +} +func createUnixFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*UnixArguments[K]) + + if !ok { + return nil, fmt.Errorf("UnixFactory args must be of type *UnixArguments[K]") + } + + return Unix(args.Seconds, args.Nanoseconds) +} + +func Unix[K any](seconds ottl.IntGetter[K], nanoseconds ottl.Optional[ottl.IntGetter[K]]) (ottl.ExprFunc[K], error) { + return func(ctx context.Context, tCtx K) (any, error) { + sec, err := seconds.Get(ctx, tCtx) + if err != nil { + return nil, err + } + + var nsec int64 + + if !nanoseconds.IsEmpty() { + nsec, err = nanoseconds.Get().Get(ctx, tCtx) + if err != nil { + return nil, err + } + } + + return time.Unix(sec, nsec), nil + }, nil +} diff --git a/pkg/ottl/ottlfuncs/func_unix_micro_test.go b/pkg/ottl/ottlfuncs/func_unix_micro_test.go index 86759fa202f1..d42dc0d8815a 100644 --- a/pkg/ottl/ottlfuncs/func_unix_micro_test.go +++ b/pkg/ottl/ottlfuncs/func_unix_micro_test.go @@ -22,7 +22,7 @@ func Test_TimeUnixMicro(t *testing.T) { { name: "January 1, 2023", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(2023, 1, 1, 0, 0, 0, 0, time.Local), nil }, }, @@ -31,7 +31,7 @@ func Test_TimeUnixMicro(t *testing.T) { { name: "April 30, 2001, 3pm", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(2001, 4, 30, 15, 0, 0, 0, time.Local), nil }, }, @@ -40,7 +40,7 @@ func Test_TimeUnixMicro(t *testing.T) { { name: "November 12, 1980, 4:35:01am", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(1980, 11, 12, 4, 35, 1, 0, time.Local), nil }, }, @@ -49,7 +49,7 @@ func Test_TimeUnixMicro(t *testing.T) { { name: "October 4, 2020, 5:05 5 microseconds 5 nanosecs", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(2020, 10, 4, 5, 5, 5, 5, time.Local), nil }, }, diff --git a/pkg/ottl/ottlfuncs/func_unix_milli_test.go b/pkg/ottl/ottlfuncs/func_unix_milli_test.go index 798b755f69aa..f4a187a2ba2f 100644 --- a/pkg/ottl/ottlfuncs/func_unix_milli_test.go +++ b/pkg/ottl/ottlfuncs/func_unix_milli_test.go @@ -22,7 +22,7 @@ func Test_TimeUnixMilli(t *testing.T) { { name: "January 1, 2022", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(2022, 1, 1, 0, 0, 0, 0, time.Local), nil }, }, @@ -31,7 +31,7 @@ func Test_TimeUnixMilli(t *testing.T) { { name: "May 30, 2002, 3pm", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(2002, 5, 30, 15, 0, 0, 0, time.Local), nil }, }, @@ -40,7 +40,7 @@ func Test_TimeUnixMilli(t *testing.T) { { name: "September 12, 1980, 4:35:01am", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(1980, 9, 12, 4, 35, 1, 0, time.Local), nil }, }, @@ -49,7 +49,7 @@ func Test_TimeUnixMilli(t *testing.T) { { name: "October 4, 2020, 5:05 5 microseconds 5 nanosecs", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(2020, 10, 4, 5, 5, 5, 5, time.Local), nil }, }, diff --git a/pkg/ottl/ottlfuncs/func_unix_nano_test.go b/pkg/ottl/ottlfuncs/func_unix_nano_test.go index 25d40c532f0d..8699a7a82dd2 100644 --- a/pkg/ottl/ottlfuncs/func_unix_nano_test.go +++ b/pkg/ottl/ottlfuncs/func_unix_nano_test.go @@ -22,7 +22,7 @@ func Test_TimeUnixNano(t *testing.T) { { name: "January 1, 2023", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(2023, 1, 1, 0, 0, 0, 0, time.Local), nil }, }, @@ -31,7 +31,7 @@ func Test_TimeUnixNano(t *testing.T) { { name: "April 30, 2000, 1pm", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(2000, 4, 30, 13, 0, 0, 0, time.Local), nil }, }, @@ -40,7 +40,7 @@ func Test_TimeUnixNano(t *testing.T) { { name: "December 12, 1980, 4:35:01am", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(1980, 12, 12, 4, 35, 1, 0, time.Local), nil }, }, @@ -49,7 +49,7 @@ func Test_TimeUnixNano(t *testing.T) { { name: "October 4, 2020, 5:05 5 microseconds 5 nanosecs", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(2020, 10, 4, 5, 5, 5, 5, time.Local), nil }, }, diff --git a/pkg/ottl/ottlfuncs/func_unix_seconds_test.go b/pkg/ottl/ottlfuncs/func_unix_seconds_test.go index c0eabdaef415..a2c81f4285f2 100644 --- a/pkg/ottl/ottlfuncs/func_unix_seconds_test.go +++ b/pkg/ottl/ottlfuncs/func_unix_seconds_test.go @@ -22,7 +22,7 @@ func Test_TimeUnixSeconds(t *testing.T) { { name: "January 1, 2023", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(2023, 1, 1, 0, 0, 0, 0, time.Local), nil }, }, @@ -31,7 +31,7 @@ func Test_TimeUnixSeconds(t *testing.T) { { name: "March 31, 2000, 4pm", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(2000, 3, 31, 16, 0, 0, 0, time.Local), nil }, }, @@ -40,7 +40,7 @@ func Test_TimeUnixSeconds(t *testing.T) { { name: "December 12, 1980, 4:35:01am", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(1980, 12, 12, 4, 35, 1, 0, time.Local), nil }, }, @@ -49,7 +49,7 @@ func Test_TimeUnixSeconds(t *testing.T) { { name: "October 4, 2020, 5:05 5 microseconds 5 nanosecs", time: &ottl.StandardTimeGetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, _ any) (any, error) { return time.Date(2020, 10, 4, 5, 5, 5, 5, time.Local), nil }, }, diff --git a/pkg/ottl/ottlfuncs/func_unix_test.go b/pkg/ottl/ottlfuncs/func_unix_test.go new file mode 100644 index 000000000000..1225a56ce1a9 --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_unix_test.go @@ -0,0 +1,44 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/assert" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +func Test_Unix(t *testing.T) { + tests := []struct { + name string + seconds ottl.IntGetter[any] + nanoseconds ottl.Optional[ottl.IntGetter[any]] + expected int64 + }{ + { + name: "January 1, 2023", + seconds: &ottl.StandardIntGetter[any]{ + Getter: func(context.Context, any) (any, error) { + return int64(1672527600), nil + }, + }, + nanoseconds: ottl.Optional[ottl.IntGetter[any]]{}, + expected: int64(1672527600), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + exprFunc, err := Unix(tt.seconds, tt.nanoseconds) + assert.NoError(t, err) + result, err := exprFunc(nil, nil) + assert.NoError(t, err) + want := time.Unix(tt.expected, 0) + assert.Equal(t, want, result) + }) + } +} diff --git a/pkg/ottl/ottlfuncs/func_uuid.go b/pkg/ottl/ottlfuncs/func_uuid.go index 9c03835f5037..fec985989d2d 100644 --- a/pkg/ottl/ottlfuncs/func_uuid.go +++ b/pkg/ottl/ottlfuncs/func_uuid.go @@ -12,7 +12,7 @@ import ( ) func uuid[K any]() (ottl.ExprFunc[K], error) { - return func(ctx context.Context, tCtx K) (any, error) { + return func(_ context.Context, _ K) (any, error) { u := guuid.New() return u.String(), nil }, nil diff --git a/pkg/ottl/ottlfuncs/functions.go b/pkg/ottl/ottlfuncs/functions.go index e892135c45e8..25a596c3c78a 100644 --- a/pkg/ottl/ottlfuncs/functions.go +++ b/pkg/ottl/ottlfuncs/functions.go @@ -12,6 +12,7 @@ func StandardFuncs[K any]() map[string]ottl.Factory[K] { // Editors NewDeleteKeyFactory[K](), NewDeleteMatchingKeysFactory[K](), + NewFlattenFactory[K](), NewKeepKeysFactory[K](), NewLimitFactory[K](), NewMergeMapsFactory[K](), @@ -34,15 +35,19 @@ func StandardConverters[K any]() map[string]ottl.Factory[K] { func converters[K any]() []ottl.Factory[K] { return []ottl.Factory[K]{ // Converters + NewBase64DecodeFactory[K](), NewConcatFactory[K](), NewConvertCaseFactory[K](), NewDoubleFactory[K](), NewDurationFactory[K](), NewExtractPatternsFactory[K](), NewFnvFactory[K](), + NewHourFactory[K](), NewHoursFactory[K](), NewIntFactory[K](), NewIsBoolFactory[K](), + NewIsDoubleFactory[K](), + NewIsIntFactory[K](), NewIsMapFactory[K](), NewIsMatchFactory[K](), NewIsStringFactory[K](), @@ -53,16 +58,21 @@ func converters[K any]() []ottl.Factory[K] { NewMinutesFactory[K](), NewNanosecondsFactory[K](), NewNowFactory[K](), + NewParseCSVFactory[K](), NewParseJSONFactory[K](), + NewParseKeyValueFactory[K](), + NewParseXMLFactory[K](), NewSecondsFactory[K](), NewSHA1Factory[K](), NewSHA256Factory[K](), NewSpanIDFactory[K](), NewSplitFactory[K](), + NewStringFactory[K](), NewSubstringFactory[K](), NewTimeFactory[K](), NewTruncateTimeFactory[K](), NewTraceIDFactory[K](), + NewUnixFactory[K](), NewUnixMicroFactory[K](), NewUnixMilliFactory[K](), NewUnixNanoFactory[K](), diff --git a/pkg/ottl/ottlfuncs/package_test.go b/pkg/ottl/ottlfuncs/package_test.go new file mode 100644 index 000000000000..7082a6c2353c --- /dev/null +++ b/pkg/ottl/ottlfuncs/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/ottl/ottltest/package_test.go b/pkg/ottl/ottltest/package_test.go new file mode 100644 index 000000000000..2767c49b06a9 --- /dev/null +++ b/pkg/ottl/ottltest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottltest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/ottl/package_test.go b/pkg/ottl/package_test.go new file mode 100644 index 000000000000..cecdd3359175 --- /dev/null +++ b/pkg/ottl/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottl + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/ottl/parser.go b/pkg/ottl/parser.go index fe67e31cefb7..f5b0bf632bed 100644 --- a/pkg/ottl/parser.go +++ b/pkg/ottl/parser.go @@ -5,40 +5,14 @@ package ottl // import "github.com/open-telemetry/opentelemetry-collector-contri import ( "context" + "errors" "fmt" - "strings" "github.com/alecthomas/participle/v2" "go.opentelemetry.io/collector/component" - "go.uber.org/multierr" "go.uber.org/zap" ) -type ErrorMode string - -const ( - IgnoreError ErrorMode = "ignore" - PropagateError ErrorMode = "propagate" -) - -func (e *ErrorMode) UnmarshalText(text []byte) error { - str := ErrorMode(strings.ToLower(string(text))) - switch str { - case IgnoreError, PropagateError: - *e = str - return nil - default: - return fmt.Errorf("unknown error mode %v", str) - } -} - -type Parser[K any] struct { - functions map[string]Factory[K] - pathParser PathExpressionParser[K] - enumParser EnumParser - telemetrySettings component.TelemetrySettings -} - // Statement holds a top level Statement for processing telemetry data. A Statement is a combination of a function // invocation and the boolean expression to match telemetry for invoking the function. type Statement[K any] struct { @@ -66,6 +40,26 @@ func (s *Statement[K]) Execute(ctx context.Context, tCtx K) (any, bool, error) { return result, condition, nil } +// Condition holds a top level Condition. A Condition is a boolean expression to match telemetry. +type Condition[K any] struct { + condition BoolExpr[K] + origText string +} + +// Eval returns true if the condition was met for the given TransformContext and false otherwise. +func (c *Condition[K]) Eval(ctx context.Context, tCtx K) (bool, error) { + return c.condition.Eval(ctx, tCtx) +} + +// Parser provides the means to parse OTTL StatementSequence and Conditions given a specific set of functions, +// a PathExpressionParser, and an EnumParser. +type Parser[K any] struct { + functions map[string]Factory[K] + pathParser PathExpressionParser[K] + enumParser EnumParser + telemetrySettings component.TelemetrySettings +} + func NewParser[K any]( functions map[string]Factory[K], pathParser PathExpressionParser[K], @@ -99,28 +93,30 @@ func WithEnumParser[K any](parser EnumParser) Option[K] { // ParseStatements parses string statements into ottl.Statement objects ready for execution. // Returns a slice of statements and a nil error on successful parsing. -// If parsing fails, returns an empty slice with a multierr error containing -// an error per failed statement. +// If parsing fails, returns nil and a joined error containing each error per failed statement. func (p *Parser[K]) ParseStatements(statements []string) ([]*Statement[K], error) { parsedStatements := make([]*Statement[K], 0, len(statements)) - var parseErr error + var parseErrs []error for _, statement := range statements { ps, err := p.ParseStatement(statement) if err != nil { - parseErr = multierr.Append(parseErr, fmt.Errorf("unable to parse OTTL statement %q: %w", statement, err)) + parseErrs = append(parseErrs, fmt.Errorf("unable to parse OTTL statement %q: %w", statement, err)) continue } parsedStatements = append(parsedStatements, ps) } - if parseErr != nil { - return nil, parseErr + if len(parseErrs) > 0 { + return nil, errors.Join(parseErrs...) } return parsedStatements, nil } +// ParseStatement parses a single string statement into a Statement struct ready for execution. +// Returns a Statement and a nil error on successful parsing. +// If parsing fails, returns nil and an error. func (p *Parser[K]) ParseStatement(statement string) (*Statement[K], error) { parsed, err := parseStatement(statement) if err != nil { @@ -141,7 +137,49 @@ func (p *Parser[K]) ParseStatement(statement string) (*Statement[K], error) { }, nil } +// ParseConditions parses string conditions into a Condition slice ready for execution. +// Returns a slice of Condition and a nil error on successful parsing. +// If parsing fails, returns nil and an error containing each error per failed condition. +func (p *Parser[K]) ParseConditions(conditions []string) ([]*Condition[K], error) { + parsedConditions := make([]*Condition[K], 0, len(conditions)) + var parseErrs []error + + for _, condition := range conditions { + ps, err := p.ParseCondition(condition) + if err != nil { + parseErrs = append(parseErrs, fmt.Errorf("unable to parse OTTL condition %q: %w", condition, err)) + continue + } + parsedConditions = append(parsedConditions, ps) + } + + if len(parseErrs) > 0 { + return nil, errors.Join(parseErrs...) + } + + return parsedConditions, nil +} + +// ParseCondition parses a single string condition into a Condition objects ready for execution. +// Returns an Condition and a nil error on successful parsing. +// If parsing fails, returns nil and an error. +func (p *Parser[K]) ParseCondition(condition string) (*Condition[K], error) { + parsed, err := parseCondition(condition) + if err != nil { + return nil, err + } + expression, err := p.newBoolExpr(parsed) + if err != nil { + return nil, err + } + return &Condition[K]{ + condition: expression, + origText: condition, + }, nil +} + var parser = newParser[parsedStatement]() +var conditionParser = newParser[booleanExpression]() func parseStatement(raw string) (*parsedStatement, error) { parsed, err := parser.ParseString("", raw) @@ -157,6 +195,20 @@ func parseStatement(raw string) (*parsedStatement, error) { return parsed, nil } +func parseCondition(raw string) (*booleanExpression, error) { + parsed, err := conditionParser.ParseString("", raw) + + if err != nil { + return nil, fmt.Errorf("condition has invalid syntax: %w", err) + } + err = parsed.checkForCustomError() + if err != nil { + return nil, err + } + + return parsed, nil +} + // newParser returns a parser that can be used to read a string into a parsedStatement. An error will be returned if the string // is not formatted for the DSL. func newParser[G any]() *participle.Parser[G] { @@ -173,24 +225,30 @@ func newParser[G any]() *participle.Parser[G] { return parser } -// Statements represents a list of statements that will be executed sequentially for a TransformContext. -type Statements[K any] struct { +// StatementSequence represents a list of statements that will be executed sequentially for a TransformContext +// and will handle errors based on an ErrorMode. +type StatementSequence[K any] struct { statements []*Statement[K] errorMode ErrorMode telemetrySettings component.TelemetrySettings } -type StatementsOption[K any] func(*Statements[K]) +type StatementSequenceOption[K any] func(*StatementSequence[K]) -func WithErrorMode[K any](errorMode ErrorMode) StatementsOption[K] { - return func(s *Statements[K]) { +// WithStatementSequenceErrorMode sets the ErrorMode of a StatementSequence +func WithStatementSequenceErrorMode[K any](errorMode ErrorMode) StatementSequenceOption[K] { + return func(s *StatementSequence[K]) { s.errorMode = errorMode } } -func NewStatements[K any](statements []*Statement[K], telemetrySettings component.TelemetrySettings, options ...StatementsOption[K]) Statements[K] { - s := Statements[K]{ +// NewStatementSequence creates a new StatementSequence with the provided Statement slice and component.TelemetrySettings. +// The default ErrorMode is `Propagate`. +// You may also augment the StatementSequence with a slice of StatementSequenceOption. +func NewStatementSequence[K any](statements []*Statement[K], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption[K]) StatementSequence[K] { + s := StatementSequence[K]{ statements: statements, + errorMode: PropagateError, telemetrySettings: telemetrySettings, } for _, op := range options { @@ -199,8 +257,11 @@ func NewStatements[K any](statements []*Statement[K], telemetrySettings componen return s } -// Execute is a function that will execute all the statements in the Statements list. -func (s *Statements[K]) Execute(ctx context.Context, tCtx K) error { +// Execute is a function that will execute all the statements in the StatementSequence list. +// When the ErrorMode of the StatementSequence is `propagate`, errors cause the execution to halt and the error is returned. +// When the ErrorMode of the StatementSequence is `ignore`, errors are logged and execution continues to the next statement. +// When the ErrorMode of the StatementSequence is `silent`, errors are not logged and execution continues to the next statement. +func (s *StatementSequence[K]) Execute(ctx context.Context, tCtx K) error { for _, statement := range s.statements { _, _, err := statement.Execute(ctx, tCtx) if err != nil { @@ -208,30 +269,94 @@ func (s *Statements[K]) Execute(ctx context.Context, tCtx K) error { err = fmt.Errorf("failed to execute statement: %v, %w", statement.origText, err) return err } - s.telemetrySettings.Logger.Warn("failed to execute statement", zap.Error(err), zap.String("statement", statement.origText)) + if s.errorMode == IgnoreError { + s.telemetrySettings.Logger.Warn("failed to execute statement", zap.Error(err), zap.String("statement", statement.origText)) + } } } return nil } -// Eval returns true if any statement's condition is true and returns false otherwise. -// Does not execute the statement's function. -// When errorMode is `propagate`, errors cause the evaluation to be false and an error is returned. -// When errorMode is `ignore`, errors cause evaluation to continue to the next statement. -func (s *Statements[K]) Eval(ctx context.Context, tCtx K) (bool, error) { - for _, statement := range s.statements { - match, err := statement.condition.Eval(ctx, tCtx) +// ConditionSequence represents a list of Conditions that will be evaluated sequentially for a TransformContext +// and will handle errors returned by conditions based on an ErrorMode. +// By default, the conditions are ORed together, but they can be ANDed together using the WithLogicOperation option. +type ConditionSequence[K any] struct { + conditions []*Condition[K] + errorMode ErrorMode + telemetrySettings component.TelemetrySettings + logicOp LogicOperation +} + +type ConditionSequenceOption[K any] func(*ConditionSequence[K]) + +// WithConditionSequenceErrorMode sets the ErrorMode of a ConditionSequence +func WithConditionSequenceErrorMode[K any](errorMode ErrorMode) ConditionSequenceOption[K] { + return func(c *ConditionSequence[K]) { + c.errorMode = errorMode + } +} + +// WithLogicOperation sets the LogicOperation of a ConditionSequence +// When setting AND the conditions will be ANDed together. +// When setting OR the conditions will be ORed together. +func WithLogicOperation[K any](logicOp LogicOperation) ConditionSequenceOption[K] { + return func(c *ConditionSequence[K]) { + c.logicOp = logicOp + } +} + +// NewConditionSequence creates a new ConditionSequence with the provided Condition slice and component.TelemetrySettings. +// The default ErrorMode is `Propagate` and the default LogicOperation is `OR`. +// You may also augment the ConditionSequence with a slice of ConditionSequenceOption. +func NewConditionSequence[K any](conditions []*Condition[K], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption[K]) ConditionSequence[K] { + c := ConditionSequence[K]{ + conditions: conditions, + errorMode: PropagateError, + telemetrySettings: telemetrySettings, + logicOp: Or, + } + for _, op := range options { + op(&c) + } + return c +} + +// Eval evaluates the result of each Condition in the ConditionSequence. +// The boolean logic between conditions is based on the ConditionSequence's Logic Operator. +// If using the default OR LogicOperation, if any Condition evaluates to true, then true is returned and if all Conditions evaluate to false, then false is returned. +// If using the AND LogicOperation, if any Condition evaluates to false, then false is returned and if all Conditions evaluate to true, then true is returned. +// When the ErrorMode of the ConditionSequence is `propagate`, errors cause the evaluation to be false and an error is returned. +// When the ErrorMode of the ConditionSequence is `ignore`, errors are logged and cause the evaluation to continue to the next condition. +// When the ErrorMode of the ConditionSequence is `silent`, errors are not logged and cause the evaluation to continue to the next condition. +// When using the AND LogicOperation with the `ignore` ErrorMode the sequence will evaluate to false if all conditions error. +func (c *ConditionSequence[K]) Eval(ctx context.Context, tCtx K) (bool, error) { + var atLeastOneMatch bool + for _, condition := range c.conditions { + match, err := condition.Eval(ctx, tCtx) if err != nil { - if s.errorMode == PropagateError { - err = fmt.Errorf("failed to eval statement: %v, %w", statement.origText, err) + if c.errorMode == PropagateError { + err = fmt.Errorf("failed to eval condition: %v, %w", condition.origText, err) return false, err } - s.telemetrySettings.Logger.Warn("failed to eval statement", zap.Error(err), zap.String("statement", statement.origText)) + if c.errorMode == IgnoreError { + c.telemetrySettings.Logger.Warn("failed to eval condition", zap.Error(err), zap.String("condition", condition.origText)) + } continue } if match { - return true, nil + if c.logicOp == Or { + return true, nil + } + atLeastOneMatch = true + } + if !match && c.logicOp == And { + return false, nil } } - return false, nil + // When ANDing it is possible to arrive here not because everything was true, but because everything errored and was ignored. + // In that situation, we don't want to return True when no conditions actually passed. In a situation when everything failed + // we are essentially left with an empty set, which is normally evaluated in mathematics as False. We will use that + // idea to return False when ANDing and everything errored. We use atLeastOneMatch here to return true if anything did match. + // It is not possible to get here if any condition during an AND explicitly failed. + return c.logicOp == And && atLeastOneMatch, nil } diff --git a/pkg/ottl/parser_test.go b/pkg/ottl/parser_test.go index df63d9384076..c3c730bfa8da 100644 --- a/pkg/ottl/parser_test.go +++ b/pkg/ottl/parser_test.go @@ -5,6 +5,7 @@ package ottl import ( "context" + "errors" "fmt" "reflect" "regexp" @@ -13,7 +14,6 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component/componenttest" - "go.uber.org/multierr" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottltest" ) @@ -105,8 +105,8 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "bear", }, @@ -138,14 +138,14 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "foo", }, { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("bar"), }, @@ -179,11 +179,11 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("message"), }, @@ -202,11 +202,11 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("device_name"), }, @@ -219,7 +219,7 @@ func Test_parse(t *testing.T) { }, { Value: value{ - Enum: (*EnumSymbol)(ottltest.Strp("SHA256")), + Enum: (*enumSymbol)(ottltest.Strp("SHA256")), }, }, }, @@ -237,11 +237,11 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("message"), }, @@ -272,11 +272,11 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("message"), }, @@ -289,7 +289,7 @@ func Test_parse(t *testing.T) { }, { Value: value{ - Enum: (*EnumSymbol)(ottltest.Strp("S")), + Enum: (*enumSymbol)(ottltest.Strp("S")), }, }, }, @@ -307,14 +307,14 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "foo", }, { Name: "bar", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("x"), }, @@ -336,7 +336,7 @@ func Test_parse(t *testing.T) { Literal: &mathExprLiteral{ Converter: &converter{ Function: "Test", - Keys: []Key{ + Keys: []key{ { Int: ottltest.Intp(0), }, @@ -363,14 +363,14 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "foo", }, { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("bar"), }, @@ -397,8 +397,8 @@ func Test_parse(t *testing.T) { Comparison: &comparison{ Left: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -406,7 +406,7 @@ func Test_parse(t *testing.T) { }, }, }, - Op: EQ, + Op: eq, Right: value{ String: ottltest.Strp("fido"), }, @@ -426,14 +426,14 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "foo", }, { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("bar"), }, @@ -460,8 +460,8 @@ func Test_parse(t *testing.T) { Comparison: &comparison{ Left: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -469,7 +469,7 @@ func Test_parse(t *testing.T) { }, }, }, - Op: NE, + Op: ne, Right: value{ String: ottltest.Strp("fido"), }, @@ -489,14 +489,14 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "foo", }, { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("bar"), }, @@ -523,8 +523,8 @@ func Test_parse(t *testing.T) { Comparison: &comparison{ Left: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -532,7 +532,7 @@ func Test_parse(t *testing.T) { }, }, }, - Op: EQ, + Op: eq, Right: value{ String: ottltest.Strp("fido"), }, @@ -613,11 +613,11 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("bytes"), }, @@ -648,11 +648,11 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("test"), }, @@ -683,11 +683,11 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("test"), }, @@ -700,7 +700,7 @@ func Test_parse(t *testing.T) { }, { Value: value{ - Enum: (*EnumSymbol)(ottltest.Strp("TEST_ENUM")), + Enum: (*enumSymbol)(ottltest.Strp("TEST_ENUM")), }, }, }, @@ -718,11 +718,11 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("test"), }, @@ -755,11 +755,11 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("test"), }, @@ -796,11 +796,11 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("test"), }, @@ -840,11 +840,11 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("test"), }, @@ -911,11 +911,11 @@ func Test_parse(t *testing.T) { }, { Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("test"), }, @@ -944,11 +944,11 @@ func Test_parse(t *testing.T) { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "attributes", - Keys: []Key{ + Keys: []key{ { String: ottltest.Strp("test"), }, @@ -971,7 +971,7 @@ func Test_parse(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: SUB, + Operator: sub, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -1001,7 +1001,7 @@ func Test_parse(t *testing.T) { }, Right: []*opAddSubTerm{ { - Operator: ADD, + Operator: add, Term: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ @@ -1010,7 +1010,7 @@ func Test_parse(t *testing.T) { }, Right: []*opMultDivValue{ { - Operator: MULT, + Operator: mult, Value: &mathValue{ Literal: &mathExprLiteral{ Int: ottltest.Intp(2), @@ -1023,14 +1023,14 @@ func Test_parse(t *testing.T) { }, }, }, - Op: EQ, + Op: eq, Right: value{ MathExpression: &mathExpression{ Left: &addSubTerm{ Left: &mathValue{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "three", }, @@ -1040,7 +1040,7 @@ func Test_parse(t *testing.T) { }, Right: []*opMultDivValue{ { - Operator: DIV, + Operator: div, Value: &mathValue{ Literal: &mathExprLiteral{ Converter: &converter{ @@ -1088,49 +1088,199 @@ func Test_parse(t *testing.T) { } } -func testParsePath(val *Path) (GetSetter[any], error) { - if val != nil && len(val.Fields) > 0 && (val.Fields[0].Name == "name" || val.Fields[0].Name == "attributes") { +func Test_parseCondition_full(t *testing.T) { + tests := []struct { + name string + condition string + expected *booleanExpression + }{ + { + name: "where == clause", + condition: `name == "fido"`, + expected: &booleanExpression{ + Left: &term{ + Left: &booleanValue{ + Comparison: &comparison{ + Left: value{ + Literal: &mathExprLiteral{ + Path: &path{ + Fields: []field{ + { + Name: "name", + }, + }, + }, + }, + }, + Op: eq, + Right: value{ + String: ottltest.Strp("fido"), + }, + }, + }, + }, + }, + }, + { + name: "where != clause", + condition: `name != "fido"`, + expected: &booleanExpression{ + Left: &term{ + Left: &booleanValue{ + Comparison: &comparison{ + Left: value{ + Literal: &mathExprLiteral{ + Path: &path{ + Fields: []field{ + { + Name: "name", + }, + }, + }, + }, + }, + Op: ne, + Right: value{ + String: ottltest.Strp("fido"), + }, + }, + }, + }, + }, + }, + { + name: "Converter math mathExpression", + condition: `1 + 1 * 2 == three / One()`, + expected: &booleanExpression{ + Left: &term{ + Left: &booleanValue{ + Comparison: &comparison{ + Left: value{ + MathExpression: &mathExpression{ + Left: &addSubTerm{ + Left: &mathValue{ + Literal: &mathExprLiteral{ + Int: ottltest.Intp(1), + }, + }, + }, + Right: []*opAddSubTerm{ + { + Operator: add, + Term: &addSubTerm{ + Left: &mathValue{ + Literal: &mathExprLiteral{ + Int: ottltest.Intp(1), + }, + }, + Right: []*opMultDivValue{ + { + Operator: mult, + Value: &mathValue{ + Literal: &mathExprLiteral{ + Int: ottltest.Intp(2), + }, + }, + }, + }, + }, + }, + }, + }, + }, + Op: eq, + Right: value{ + MathExpression: &mathExpression{ + Left: &addSubTerm{ + Left: &mathValue{ + Literal: &mathExprLiteral{ + Path: &path{ + Fields: []field{ + { + Name: "three", + }, + }, + }, + }, + }, + Right: []*opMultDivValue{ + { + Operator: div, + Value: &mathValue{ + Literal: &mathExprLiteral{ + Converter: &converter{ + Function: "One", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.condition, func(t *testing.T) { + parsed, err := parseCondition(tt.condition) + assert.NoError(t, err) + assert.EqualValues(t, tt.expected, parsed) + }) + } +} + +func testParsePath[K any](p Path[K]) (GetSetter[any], error) { + if p != nil && (p.Name() == "name" || p.Name() == "attributes") { + if p.Name() == "attributes" { + p.Keys() + } + return &StandardGetSetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { return tCtx, nil }, - Setter: func(ctx context.Context, tCtx any, val any) error { + Setter: func(_ context.Context, tCtx any, val any) error { reflect.DeepEqual(tCtx, val) return nil }, }, nil } - if val.Fields[0].Name == "dur1" || val.Fields[0].Name == "dur2" { + if p != nil && (p.Name() == "dur1" || p.Name() == "dur2") { return &StandardGetSetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { m, ok := tCtx.(map[string]time.Duration) if !ok { return nil, fmt.Errorf("unable to convert transform context to map of strings to times") } - return m[val.Fields[0].Name], nil + return m[p.Name()], nil }, - Setter: func(ctx context.Context, tCtx any, val any) error { + Setter: func(_ context.Context, tCtx any, val any) error { reflect.DeepEqual(tCtx, val) return nil }, }, nil } - if val.Fields[0].Name == "time1" || val.Fields[0].Name == "time2" { + if p != nil && (p.Name() == "time1" || p.Name() == "time2") { return &StandardGetSetter[any]{ - Getter: func(ctx context.Context, tCtx any) (any, error) { + Getter: func(_ context.Context, tCtx any) (any, error) { m, ok := tCtx.(map[string]time.Time) if !ok { return nil, fmt.Errorf("unable to convert transform context to map of strings to times") } - return m[val.Fields[0].Name], nil + return m[p.Name()], nil }, - Setter: func(ctx context.Context, tCtx any, val any) error { + Setter: func(_ context.Context, tCtx any, val any) error { reflect.DeepEqual(tCtx, val) return nil }, }, nil } - return nil, fmt.Errorf("bad path %v", val) + return nil, fmt.Errorf("bad path %v", p) } // Helper for test cases where the WHERE clause is all that matters. @@ -1143,8 +1293,8 @@ func setNameTest(b *booleanExpression) *parsedStatement { { Value: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -1379,8 +1529,8 @@ func Test_parseWhere(t *testing.T) { Comparison: &comparison{ Left: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -1388,7 +1538,7 @@ func Test_parseWhere(t *testing.T) { }, }, }, - Op: NE, + Op: ne, Right: value{ String: ottltest.Strp("foo"), }, @@ -1401,8 +1551,8 @@ func Test_parseWhere(t *testing.T) { Comparison: &comparison{ Left: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -1410,7 +1560,7 @@ func Test_parseWhere(t *testing.T) { }, }, }, - Op: NE, + Op: ne, Right: value{ String: ottltest.Strp("bar"), }, @@ -1429,8 +1579,8 @@ func Test_parseWhere(t *testing.T) { Comparison: &comparison{ Left: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -1438,7 +1588,7 @@ func Test_parseWhere(t *testing.T) { }, }, }, - Op: EQ, + Op: eq, Right: value{ String: ottltest.Strp("foo"), }, @@ -1453,8 +1603,8 @@ func Test_parseWhere(t *testing.T) { Comparison: &comparison{ Left: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -1462,7 +1612,7 @@ func Test_parseWhere(t *testing.T) { }, }, }, - Op: EQ, + Op: eq, Right: value{ String: ottltest.Strp("bar"), }, @@ -1505,8 +1655,8 @@ func Test_parseWhere(t *testing.T) { Comparison: &comparison{ Left: value{ Literal: &mathExprLiteral{ - Path: &Path{ - Fields: []Field{ + Path: &path{ + Fields: []field{ { Name: "name", }, @@ -1514,7 +1664,7 @@ func Test_parseWhere(t *testing.T) { }, }, }, - Op: EQ, + Op: eq, Right: value{ String: ottltest.Strp("bar"), }, @@ -1634,21 +1784,55 @@ func Test_ParseStatements_Error(t *testing.T) { p, _ := NewParser( CreateFactoryMap[any](), - testParsePath, + testParsePath[any], componenttest.NewNopTelemetrySettings(), WithEnumParser[any](testParseEnum), ) _, err := p.ParseStatements(statements) - assert.Error(t, err) - multiErrs := multierr.Errors(err) + var e interface{ Unwrap() []error } + if errors.As(err, &e) { + uw := e.Unwrap() + assert.Len(t, uw, len(statements), "ParseStatements didn't return an error per statement") + + for i, statementErr := range uw { + assert.ErrorContains(t, statementErr, fmt.Sprintf("unable to parse OTTL statement %q", statements[i])) + } + } else { + assert.Fail(t, "ParseStatements didn't return an error per statement") + } +} + +func Test_ParseConditions_Error(t *testing.T) { + conditions := []string{ + `True(`, + `"foo == "foo"`, + `set()`, + } + + p, _ := NewParser( + CreateFactoryMap[any](), + testParsePath[any], + componenttest.NewNopTelemetrySettings(), + WithEnumParser[any](testParseEnum), + ) + + _, err := p.ParseConditions(conditions) + + assert.Error(t, err) - assert.Len(t, multiErrs, len(statements), "ParseStatements didn't return an error per statement") + var e interface{ Unwrap() []error } + if errors.As(err, &e) { + uw := e.Unwrap() + assert.Len(t, uw, len(conditions), "ParseConditions didn't return an error per condition") - for i, statementErr := range multiErrs { - assert.ErrorContains(t, statementErr, fmt.Sprintf("unable to parse OTTL statement %q", statements[i])) + for i, conditionErr := range uw { + assert.ErrorContains(t, conditionErr, fmt.Sprintf("unable to parse OTTL condition %q", conditions[i])) + } + } else { + assert.Fail(t, "ParseConditions didn't return an error per condition") } } @@ -1724,7 +1908,66 @@ func Test_parseStatement(t *testing.T) { } } -func Test_Execute(t *testing.T) { +// This test doesn't validate parser results, simply checks whether the parse succeeds or not. +// It's a fast way to check a large range of possible syntaxes. +func Test_parseCondition(t *testing.T) { + tests := []struct { + condition string + wantErr bool + }{ + {`set(`, true}, + {`set("foo)`, true}, + {`set(name.)`, true}, + {`("foo")`, true}, + {`name =||= "fido"`, true}, + {`name = "fido"`, true}, + {`name or "fido"`, true}, + {`name and "fido"`, true}, + {`name and`, true}, + {`name or`, true}, + {`(`, true}, + {`)`, true}, + {`(name == "fido"))`, true}, + {`((name == "fido")`, true}, + {`set()`, true}, + {`Int() == 1`, false}, + {`1 == Int()`, false}, + {`true and 1 == Int() `, false}, + {`false or 1 == Int() `, false}, + {`service == "pinger" or foo.attributes["endpoint"] == "/x/alive"`, false}, + {`service == "pinger" or foo.attributes["verb"] == "GET" and foo.attributes["endpoint"] == "/x/alive"`, false}, + {`animal > "cat"`, false}, + {`animal >= "cat"`, false}, + {`animal <= "cat"`, false}, + {`animal < "cat"`, false}, + {`animal =< "dog"`, true}, + {`animal => "dog"`, true}, + {`animal <> "dog"`, true}, + {`animal = "dog"`, true}, + {`animal`, true}, + {`animal ==`, true}, + {`==`, true}, + {`== animal`, true}, + {`attributes["path"] == "/healthcheck"`, false}, + {`One() == 1`, false}, + {`test(fail())`, true}, + {`Test()`, false}, + } + pat := regexp.MustCompile("[^a-zA-Z0-9]+") + for _, tt := range tests { + name := pat.ReplaceAllString(tt.condition, "_") + t.Run(name, func(t *testing.T) { + ast, err := parseCondition(tt.condition) + if (err != nil) != tt.wantErr { + t.Errorf("parseCondition(%s) error = %v, wantErr %v", tt.condition, err, tt.wantErr) + t.Errorf("AST: %+v", ast) + return + } + }) + } +} + +func Test_Statement_Execute(t *testing.T) { tests := []struct { name string condition boolExpressionEvaluator[any] @@ -1735,7 +1978,7 @@ func Test_Execute(t *testing.T) { { name: "Condition matched", condition: alwaysTrue[any], - function: func(ctx context.Context, tCtx any) (any, error) { + function: func(_ context.Context, _ any) (any, error) { return 1, nil }, expectedCondition: true, @@ -1744,7 +1987,7 @@ func Test_Execute(t *testing.T) { { name: "Condition not matched", condition: alwaysFalse[any], - function: func(ctx context.Context, tCtx any) (any, error) { + function: func(_ context.Context, _ any) (any, error) { return 1, nil }, expectedCondition: false, @@ -1753,7 +1996,7 @@ func Test_Execute(t *testing.T) { { name: "No result", condition: alwaysTrue[any], - function: func(ctx context.Context, tCtx any) (any, error) { + function: func(_ context.Context, _ any) (any, error) { return nil, nil }, expectedCondition: true, @@ -1775,6 +2018,36 @@ func Test_Execute(t *testing.T) { } } +func Test_Condition_Eval(t *testing.T) { + tests := []struct { + name string + condition boolExpressionEvaluator[any] + expectedResult bool + }{ + { + name: "Condition matched", + condition: alwaysTrue[any], + expectedResult: true, + }, + { + name: "Condition not matched", + condition: alwaysFalse[any], + expectedResult: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + condition := Condition[any]{ + condition: BoolExpr[any]{tt.condition}, + } + + result, err := condition.Eval(context.Background(), nil) + assert.NoError(t, err) + assert.Equal(t, tt.expectedResult, result) + }) + } +} + func Test_Statements_Execute_Error(t *testing.T) { tests := []struct { name string @@ -1787,7 +2060,7 @@ func Test_Statements_Execute_Error(t *testing.T) { condition: func(context.Context, any) (bool, error) { return true, fmt.Errorf("test") }, - function: func(ctx context.Context, tCtx any) (any, error) { + function: func(_ context.Context, _ any) (any, error) { return 1, nil }, errorMode: IgnoreError, @@ -1797,7 +2070,7 @@ func Test_Statements_Execute_Error(t *testing.T) { condition: func(context.Context, any) (bool, error) { return true, fmt.Errorf("test") }, - function: func(ctx context.Context, tCtx any) (any, error) { + function: func(_ context.Context, _ any) (any, error) { return 1, nil }, errorMode: PropagateError, @@ -1807,7 +2080,7 @@ func Test_Statements_Execute_Error(t *testing.T) { condition: func(context.Context, any) (bool, error) { return true, nil }, - function: func(ctx context.Context, tCtx any) (any, error) { + function: func(_ context.Context, _ any) (any, error) { return 1, fmt.Errorf("test") }, errorMode: IgnoreError, @@ -1817,15 +2090,35 @@ func Test_Statements_Execute_Error(t *testing.T) { condition: func(context.Context, any) (bool, error) { return true, nil }, - function: func(ctx context.Context, tCtx any) (any, error) { + function: func(_ context.Context, _ any) (any, error) { return 1, fmt.Errorf("test") }, errorMode: PropagateError, }, + { + name: "SilentError error from condition", + condition: func(context.Context, any) (bool, error) { + return true, fmt.Errorf("test") + }, + function: func(_ context.Context, _ any) (any, error) { + return 1, nil + }, + errorMode: SilentError, + }, + { + name: "SilentError error from function", + condition: func(context.Context, any) (bool, error) { + return true, nil + }, + function: func(_ context.Context, _ any) (any, error) { + return 1, fmt.Errorf("test") + }, + errorMode: SilentError, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - statements := Statements[any]{ + statements := StatementSequence[any]{ statements: []*Statement[any]{ { condition: BoolExpr[any]{tt.condition}, @@ -1846,82 +2139,146 @@ func Test_Statements_Execute_Error(t *testing.T) { } } -func Test_Statements_Eval(t *testing.T) { +func Test_ConditionSequence_Eval(t *testing.T) { tests := []struct { name string conditions []boolExpressionEvaluator[any] function ExprFunc[any] errorMode ErrorMode + logicOp LogicOperation expectedResult bool }{ { - name: "True", + name: "True with OR", conditions: []boolExpressionEvaluator[any]{ alwaysTrue[any], }, errorMode: IgnoreError, + logicOp: Or, expectedResult: true, }, { - name: "At least one True", + name: "At least one True with OR", conditions: []boolExpressionEvaluator[any]{ alwaysFalse[any], alwaysFalse[any], alwaysTrue[any], }, errorMode: IgnoreError, + logicOp: Or, expectedResult: true, }, { - name: "False", + name: "False with OR", conditions: []boolExpressionEvaluator[any]{ alwaysFalse[any], alwaysFalse[any], }, errorMode: IgnoreError, + logicOp: Or, + expectedResult: false, + }, + { + name: "Single erroring condition is treated as false when using Ignore with OR", + conditions: []boolExpressionEvaluator[any]{ + func(context.Context, any) (bool, error) { + return true, fmt.Errorf("test") + }, + }, + errorMode: IgnoreError, + logicOp: Or, expectedResult: false, }, { - name: "Error is false when using Ignore", + name: "erroring condition is ignored when using Ignore with OR", + conditions: []boolExpressionEvaluator[any]{ + func(context.Context, any) (bool, error) { + return true, fmt.Errorf("test") + }, + alwaysTrue[any], + }, + errorMode: IgnoreError, + logicOp: Or, + expectedResult: true, + }, + { + name: "True with AND", + conditions: []boolExpressionEvaluator[any]{ + alwaysTrue[any], + alwaysTrue[any], + }, + errorMode: IgnoreError, + logicOp: And, + expectedResult: true, + }, + { + name: "At least one False with AND", conditions: []boolExpressionEvaluator[any]{ alwaysFalse[any], + alwaysTrue[any], + alwaysTrue[any], + }, + errorMode: IgnoreError, + logicOp: And, + expectedResult: false, + }, + { + name: "False with AND", + conditions: []boolExpressionEvaluator[any]{ + alwaysFalse[any], + }, + errorMode: IgnoreError, + logicOp: And, + expectedResult: false, + }, + { + name: "Single erroring condition is treated as false when using Ignore with AND", + conditions: []boolExpressionEvaluator[any]{ + func(context.Context, any) (bool, error) { + return true, fmt.Errorf("test") + }, + }, + errorMode: IgnoreError, + logicOp: And, + expectedResult: false, + }, + { + name: "erroring condition is ignored when using Ignore with AND", + conditions: []boolExpressionEvaluator[any]{ func(context.Context, any) (bool, error) { return true, fmt.Errorf("test") }, alwaysTrue[any], }, errorMode: IgnoreError, + logicOp: And, expectedResult: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - var rawStatements []*Statement[any] + var rawStatements []*Condition[any] for _, condition := range tt.conditions { - rawStatements = append(rawStatements, &Statement[any]{ + rawStatements = append(rawStatements, &Condition[any]{ condition: BoolExpr[any]{condition}, - function: Expr[any]{ - exprFunc: func(ctx context.Context, tCtx any) (any, error) { - return nil, fmt.Errorf("function should not be called") - }, - }, }) } - statements := Statements[any]{ - statements: rawStatements, + conditions := ConditionSequence[any]{ + conditions: rawStatements, telemetrySettings: componenttest.NewNopTelemetrySettings(), errorMode: tt.errorMode, + logicOp: tt.logicOp, } - result, err := statements.Eval(context.Background(), nil) + result, err := conditions.Eval(context.Background(), nil) assert.NoError(t, err) assert.Equal(t, tt.expectedResult, result) }) } } -func Test_Statements_Eval_Error(t *testing.T) { +func Test_ConditionSequence_Eval_Error(t *testing.T) { tests := []struct { name string conditions []boolExpressionEvaluator[any] @@ -1929,7 +2286,7 @@ func Test_Statements_Eval_Error(t *testing.T) { errorMode ErrorMode }{ { - name: "Propagate Error from function", + name: "Propagate Error from condition", conditions: []boolExpressionEvaluator[any]{ func(context.Context, any) (bool, error) { return true, fmt.Errorf("test") @@ -1937,30 +2294,47 @@ func Test_Statements_Eval_Error(t *testing.T) { }, errorMode: PropagateError, }, + { + name: "Ignore Error from function with IgnoreError", + conditions: []boolExpressionEvaluator[any]{ + func(context.Context, any) (bool, error) { + return true, fmt.Errorf("test") + }, + }, + errorMode: IgnoreError, + }, + { + name: "Ignore Error from function with SilentError", + conditions: []boolExpressionEvaluator[any]{ + func(context.Context, any) (bool, error) { + return true, fmt.Errorf("test") + }, + }, + errorMode: SilentError, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - var rawStatements []*Statement[any] + var rawConditions []*Condition[any] for _, condition := range tt.conditions { - rawStatements = append(rawStatements, &Statement[any]{ + rawConditions = append(rawConditions, &Condition[any]{ condition: BoolExpr[any]{condition}, - function: Expr[any]{ - exprFunc: func(ctx context.Context, tCtx any) (any, error) { - return nil, fmt.Errorf("function should not be called") - }, - }, }) } - statements := Statements[any]{ - statements: rawStatements, + conditions := ConditionSequence[any]{ + conditions: rawConditions, telemetrySettings: componenttest.NewNopTelemetrySettings(), errorMode: tt.errorMode, } - result, err := statements.Eval(context.Background(), nil) - assert.Error(t, err) + result, err := conditions.Eval(context.Background(), nil) assert.False(t, result) + if tt.errorMode == PropagateError { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } }) } } diff --git a/pkg/pdatatest/go.mod b/pkg/pdatatest/go.mod index 1dbff75e9a96..f0ed42817ca8 100644 --- a/pkg/pdatatest/go.mod +++ b/pkg/pdatatest/go.mod @@ -1,17 +1,18 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 ) require ( - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect @@ -19,12 +20,12 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/pdatatest/go.sum b/pkg/pdatatest/go.sum index 631af84dc5a1..88e7d75f89c0 100644 --- a/pkg/pdatatest/go.sum +++ b/pkg/pdatatest/go.sum @@ -1,5 +1,5 @@ -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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -9,14 +9,17 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS 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/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +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/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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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= @@ -25,14 +28,17 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY 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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +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= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -44,16 +50,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -66,15 +72,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/pkg/pdatatest/plogtest/package_test.go b/pkg/pdatatest/plogtest/package_test.go new file mode 100644 index 000000000000..b5f0fa32c557 --- /dev/null +++ b/pkg/pdatatest/plogtest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package plogtest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/pdatatest/pmetrictest/package_test.go b/pkg/pdatatest/pmetrictest/package_test.go new file mode 100644 index 000000000000..6100efca34d3 --- /dev/null +++ b/pkg/pdatatest/pmetrictest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package pmetrictest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/pdatatest/ptracetest/package_test.go b/pkg/pdatatest/ptracetest/package_test.go new file mode 100644 index 000000000000..3f9a3ad40b72 --- /dev/null +++ b/pkg/pdatatest/ptracetest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ptracetest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/pdatatest/ptracetest/testdata/ignore-attribute-value/actual.yaml b/pkg/pdatatest/ptracetest/testdata/ignore-attribute-value/actual.yaml index 2183acea9c37..042e8ee25274 100644 --- a/pkg/pdatatest/ptracetest/testdata/ignore-attribute-value/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/ignore-attribute-value/actual.yaml @@ -20,7 +20,7 @@ resourceSpans: - attributes: - key: testKey2 value: - stringValue: teststringvalue2 + stringValue: unpredictable parentSpanId: "" spanId: "" status: {} diff --git a/pkg/pdatatest/ptracetest/testdata/ignore-attribute-value/expected.yaml b/pkg/pdatatest/ptracetest/testdata/ignore-attribute-value/expected.yaml index 042e8ee25274..2183acea9c37 100644 --- a/pkg/pdatatest/ptracetest/testdata/ignore-attribute-value/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/ignore-attribute-value/expected.yaml @@ -20,7 +20,7 @@ resourceSpans: - attributes: - key: testKey2 value: - stringValue: unpredictable + stringValue: teststringvalue2 parentSpanId: "" spanId: "" status: {} diff --git a/pkg/pdatatest/ptracetest/testdata/ignore-end-timestamp/actual.yaml b/pkg/pdatatest/ptracetest/testdata/ignore-end-timestamp/actual.yaml index d6602fc6fc53..8191dc41f6f8 100644 --- a/pkg/pdatatest/ptracetest/testdata/ignore-end-timestamp/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/ignore-end-timestamp/actual.yaml @@ -16,7 +16,5 @@ resourceSpans: name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b - endTimeUnixNano: "11651379494838206464" status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 - diff --git a/pkg/pdatatest/ptracetest/testdata/ignore-end-timestamp/expected.yaml b/pkg/pdatatest/ptracetest/testdata/ignore-end-timestamp/expected.yaml index 8191dc41f6f8..368785e0f0e1 100644 --- a/pkg/pdatatest/ptracetest/testdata/ignore-end-timestamp/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/ignore-end-timestamp/expected.yaml @@ -16,5 +16,6 @@ resourceSpans: name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b + endTimeUnixNano: "11651379494838206464" status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 diff --git a/pkg/pdatatest/ptracetest/testdata/ignore-spanid/actual.yaml b/pkg/pdatatest/ptracetest/testdata/ignore-spanid/actual.yaml index 817c4fc938d1..3b3954599639 100644 --- a/pkg/pdatatest/ptracetest/testdata/ignore-spanid/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/ignore-spanid/actual.yaml @@ -15,7 +15,5 @@ resourceSpans: stringValue: value1 name: span1 parentSpanId: "" - spanId: fd0da883bb27cd6b status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 - diff --git a/pkg/pdatatest/ptracetest/testdata/ignore-spanid/expected.yaml b/pkg/pdatatest/ptracetest/testdata/ignore-spanid/expected.yaml index 3b3954599639..8191dc41f6f8 100644 --- a/pkg/pdatatest/ptracetest/testdata/ignore-spanid/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/ignore-spanid/expected.yaml @@ -15,5 +15,6 @@ resourceSpans: stringValue: value1 name: span1 parentSpanId: "" + spanId: fd0da883bb27cd6b status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 diff --git a/pkg/pdatatest/ptracetest/testdata/ignore-start-timestamp/actual.yaml b/pkg/pdatatest/ptracetest/testdata/ignore-start-timestamp/actual.yaml index d87405374e69..8191dc41f6f8 100644 --- a/pkg/pdatatest/ptracetest/testdata/ignore-start-timestamp/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/ignore-start-timestamp/actual.yaml @@ -16,7 +16,5 @@ resourceSpans: name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b - startTimeUnixNano: "11651379494838206464" status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 - diff --git a/pkg/pdatatest/ptracetest/testdata/ignore-start-timestamp/expected.yaml b/pkg/pdatatest/ptracetest/testdata/ignore-start-timestamp/expected.yaml index 8191dc41f6f8..dd50da9b7e79 100644 --- a/pkg/pdatatest/ptracetest/testdata/ignore-start-timestamp/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/ignore-start-timestamp/expected.yaml @@ -16,5 +16,6 @@ resourceSpans: name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b + startTimeUnixNano: "11651379494838206464" status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 diff --git a/pkg/pdatatest/ptracetest/testdata/ignore-traceid/actual.yaml b/pkg/pdatatest/ptracetest/testdata/ignore-traceid/actual.yaml index 817c4fc938d1..f01f0307bac4 100644 --- a/pkg/pdatatest/ptracetest/testdata/ignore-traceid/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/ignore-traceid/actual.yaml @@ -17,5 +17,3 @@ resourceSpans: parentSpanId: "" spanId: fd0da883bb27cd6b status: {} - traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 - diff --git a/pkg/pdatatest/ptracetest/testdata/ignore-traceid/expected.yaml b/pkg/pdatatest/ptracetest/testdata/ignore-traceid/expected.yaml index f01f0307bac4..8191dc41f6f8 100644 --- a/pkg/pdatatest/ptracetest/testdata/ignore-traceid/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/ignore-traceid/expected.yaml @@ -17,3 +17,4 @@ resourceSpans: parentSpanId: "" spanId: fd0da883bb27cd6b status: {} + traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-attributes-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-attributes-mismatch/actual.yaml index e845db6e4f77..28510fc30b9d 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-attributes-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-attributes-mismatch/actual.yaml @@ -20,7 +20,7 @@ resourceSpans: - attributes: - key: key2 value: - stringValue: value2 + stringValue: value3 parentSpanId: "" spanId: "" status: {} diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-attributes-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-attributes-mismatch/expected.yaml index 28510fc30b9d..e845db6e4f77 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-attributes-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-attributes-mismatch/expected.yaml @@ -20,7 +20,7 @@ resourceSpans: - attributes: - key: key2 value: - stringValue: value3 + stringValue: value2 parentSpanId: "" spanId: "" status: {} diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedattributescount-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedattributescount-mismatch/actual.yaml index 8191dc41f6f8..c7cd6a74086f 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedattributescount-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedattributescount-mismatch/actual.yaml @@ -13,6 +13,7 @@ resourceSpans: - key: key1 value: stringValue: value1 + droppedAttributesCount: 1 name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedattributescount-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedattributescount-mismatch/expected.yaml index c7cd6a74086f..8191dc41f6f8 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedattributescount-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedattributescount-mismatch/expected.yaml @@ -13,7 +13,6 @@ resourceSpans: - key: key1 value: stringValue: value1 - droppedAttributesCount: 1 name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedeventscount-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedeventscount-mismatch/actual.yaml index 8191dc41f6f8..e8b685b3b5bb 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedeventscount-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedeventscount-mismatch/actual.yaml @@ -13,6 +13,7 @@ resourceSpans: - key: key1 value: stringValue: value1 + droppedEventsCount: 1 name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedeventscount-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedeventscount-mismatch/expected.yaml index e8b685b3b5bb..8191dc41f6f8 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedeventscount-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedeventscount-mismatch/expected.yaml @@ -13,7 +13,6 @@ resourceSpans: - key: key1 value: stringValue: value1 - droppedEventsCount: 1 name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedlinkscount-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedlinkscount-mismatch/actual.yaml index 8191dc41f6f8..1bb2c13ad084 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedlinkscount-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedlinkscount-mismatch/actual.yaml @@ -13,6 +13,7 @@ resourceSpans: - key: key1 value: stringValue: value1 + droppedLinksCount: 1 name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedlinkscount-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedlinkscount-mismatch/expected.yaml index 1bb2c13ad084..8191dc41f6f8 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedlinkscount-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-droppedlinkscount-mismatch/expected.yaml @@ -13,7 +13,6 @@ resourceSpans: - key: key1 value: stringValue: value1 - droppedLinksCount: 1 name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-endtimestamp-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-endtimestamp-mismatch/actual.yaml index eaa0db29ef38..4c3b545ee928 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-endtimestamp-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-endtimestamp-mismatch/actual.yaml @@ -13,7 +13,7 @@ resourceSpans: - key: key1 value: stringValue: value1 - endTimeUnixNano: "11651379494838206464" + endTimeUnixNano: "11651379494838206400" name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-endtimestamp-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-endtimestamp-mismatch/expected.yaml index 4c3b545ee928..eaa0db29ef38 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-endtimestamp-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-endtimestamp-mismatch/expected.yaml @@ -13,7 +13,7 @@ resourceSpans: - key: key1 value: stringValue: value1 - endTimeUnixNano: "11651379494838206400" + endTimeUnixNano: "11651379494838206464" name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-mismatch/actual.yaml index 4a7bca4a0df8..e10af274c4da 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-mismatch/actual.yaml @@ -13,8 +13,6 @@ resourceSpans: - key: key1 value: stringValue: value1 - events: - - name: Sub span event parentSpanId: "" spanId: "" status: {} diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-mismatch/expected.yaml index e10af274c4da..4a7bca4a0df8 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-mismatch/expected.yaml @@ -13,6 +13,8 @@ resourceSpans: - key: key1 value: stringValue: value1 + events: + - name: Sub span event parentSpanId: "" spanId: "" status: {} diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-name-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-name-mismatch/actual.yaml index e1f054accf3b..0c43ec75f6d6 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-name-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-name-mismatch/actual.yaml @@ -14,7 +14,7 @@ resourceSpans: value: stringValue: value1 events: - - name: event1 + - name: event2 parentSpanId: "" spanId: "" status: {} diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-name-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-name-mismatch/expected.yaml index 0c43ec75f6d6..e1f054accf3b 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-name-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-name-mismatch/expected.yaml @@ -14,7 +14,7 @@ resourceSpans: value: stringValue: value1 events: - - name: event2 + - name: event1 parentSpanId: "" spanId: "" status: {} diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-kind-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-kind-mismatch/actual.yaml index 3bcbfcc7bebf..78ccfee19106 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-kind-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-kind-mismatch/actual.yaml @@ -13,7 +13,7 @@ resourceSpans: - key: key1 value: stringValue: value1 - kind: 2 + kind: 1 name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-kind-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-kind-mismatch/expected.yaml index 78ccfee19106..3bcbfcc7bebf 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-kind-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-kind-mismatch/expected.yaml @@ -13,7 +13,7 @@ resourceSpans: - key: key1 value: stringValue: value1 - kind: 1 + kind: 2 name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-mismatch/actual.yaml index 99f7cc7c344c..e10af274c4da 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-mismatch/actual.yaml @@ -13,16 +13,6 @@ resourceSpans: - key: key1 value: stringValue: value1 - links: - - attributes: - - key: testKey1 - value: - stringValue: teststringvalue1 - - key: testKey2 - value: - stringValue: teststringvalue2 - spanId: fd0da883bb27cd6b - traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 parentSpanId: "" spanId: "" status: {} diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-mismatch/expected.yaml index e10af274c4da..99f7cc7c344c 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-mismatch/expected.yaml @@ -13,6 +13,16 @@ resourceSpans: - key: key1 value: stringValue: value1 + links: + - attributes: + - key: testKey1 + value: + stringValue: teststringvalue1 + - key: testKey2 + value: + stringValue: teststringvalue2 + spanId: fd0da883bb27cd6b + traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 parentSpanId: "" spanId: "" status: {} diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-spanid-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-spanid-mismatch/actual.yaml index bc1ff37c83bb..972040290a3f 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-spanid-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-spanid-mismatch/actual.yaml @@ -14,7 +14,7 @@ resourceSpans: value: stringValue: value1 links: - - spanId: "" + - spanId: fd0da883bb27cd6b traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 parentSpanId: "" spanId: "" diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-spanid-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-spanid-mismatch/expected.yaml index 972040290a3f..bc1ff37c83bb 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-spanid-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-links-spanid-mismatch/expected.yaml @@ -14,7 +14,7 @@ resourceSpans: value: stringValue: value1 links: - - spanId: fd0da883bb27cd6b + - spanId: "" traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 parentSpanId: "" spanId: "" diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-parentspanid-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-parentspanid-mismatch/actual.yaml index 2a8446e61e6e..725c2484f868 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-parentspanid-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-parentspanid-mismatch/actual.yaml @@ -13,7 +13,7 @@ resourceSpans: - key: key1 value: stringValue: value1 - parentSpanId: bcff497b5a47310f + parentSpanId: 310fbcff497b5a47 spanId: fd0da883bb27cd6b status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-parentspanid-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-parentspanid-mismatch/expected.yaml index 725c2484f868..2a8446e61e6e 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-parentspanid-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-parentspanid-mismatch/expected.yaml @@ -13,7 +13,7 @@ resourceSpans: - key: key1 value: stringValue: value1 - parentSpanId: 310fbcff497b5a47 + parentSpanId: bcff497b5a47310f spanId: fd0da883bb27cd6b status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-spanid-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-spanid-mismatch/actual.yaml index 32fafc017821..c1dfdf0cf3b3 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-spanid-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-spanid-mismatch/actual.yaml @@ -14,6 +14,6 @@ resourceSpans: value: stringValue: value1 parentSpanId: "" - spanId: fd0da883bb27cd6b + spanId: d0dfa883bb27cd6b status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-spanid-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-spanid-mismatch/expected.yaml index c1dfdf0cf3b3..32fafc017821 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-spanid-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-spanid-mismatch/expected.yaml @@ -14,6 +14,6 @@ resourceSpans: value: stringValue: value1 parentSpanId: "" - spanId: d0dfa883bb27cd6b + spanId: fd0da883bb27cd6b status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-starttimestamp-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-starttimestamp-mismatch/actual.yaml index dd50da9b7e79..c7b15909afa3 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-starttimestamp-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-starttimestamp-mismatch/actual.yaml @@ -16,6 +16,6 @@ resourceSpans: name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b - startTimeUnixNano: "11651379494838206464" + startTimeUnixNano: "11651379494838206400" status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-starttimestamp-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-starttimestamp-mismatch/expected.yaml index c7b15909afa3..dd50da9b7e79 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-starttimestamp-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-starttimestamp-mismatch/expected.yaml @@ -16,6 +16,6 @@ resourceSpans: name: span1 parentSpanId: "" spanId: fd0da883bb27cd6b - startTimeUnixNano: "11651379494838206400" + startTimeUnixNano: "11651379494838206464" status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-status-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-status-mismatch/actual.yaml index da5360514b26..e10af274c4da 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-status-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-status-mismatch/actual.yaml @@ -15,6 +15,5 @@ resourceSpans: stringValue: value1 parentSpanId: "" spanId: "" - status: - code: 1 + status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-status-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-status-mismatch/expected.yaml index e10af274c4da..da5360514b26 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-status-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-status-mismatch/expected.yaml @@ -15,5 +15,6 @@ resourceSpans: stringValue: value1 parentSpanId: "" spanId: "" - status: {} + status: + code: 1 traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-traceid-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-traceid-mismatch/actual.yaml index e10af274c4da..0854d8f8469d 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-traceid-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-traceid-mismatch/actual.yaml @@ -16,4 +16,4 @@ resourceSpans: parentSpanId: "" spanId: "" status: {} - traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 + traceId: b8cb1765a7b0acf0b66aa4623fcb7bd5 diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-traceid-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-traceid-mismatch/expected.yaml index 0854d8f8469d..e10af274c4da 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-traceid-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-traceid-mismatch/expected.yaml @@ -16,4 +16,4 @@ resourceSpans: parentSpanId: "" spanId: "" status: {} - traceId: b8cb1765a7b0acf0b66aa4623fcb7bd5 + traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-tracestate-mismatch/actual.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-tracestate-mismatch/actual.yaml index 7cd945900f2c..2d63f1fee865 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-tracestate-mismatch/actual.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-tracestate-mismatch/actual.yaml @@ -17,4 +17,4 @@ resourceSpans: spanId: fd0da883bb27cd6b status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 - traceState: xx + traceState: yy diff --git a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-tracestate-mismatch/expected.yaml b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-tracestate-mismatch/expected.yaml index 2d63f1fee865..7cd945900f2c 100644 --- a/pkg/pdatatest/ptracetest/testdata/scopespans-spans-tracestate-mismatch/expected.yaml +++ b/pkg/pdatatest/ptracetest/testdata/scopespans-spans-tracestate-mismatch/expected.yaml @@ -17,4 +17,4 @@ resourceSpans: spanId: fd0da883bb27cd6b status: {} traceId: 8c8b1765a7b0acf0b66aa4623fcb7bd5 - traceState: yy + traceState: xx diff --git a/pkg/pdatatest/ptracetest/traces.go b/pkg/pdatatest/ptracetest/traces.go index 0e89813880dc..087f9e5a3029 100644 --- a/pkg/pdatatest/ptracetest/traces.go +++ b/pkg/pdatatest/ptracetest/traces.go @@ -206,7 +206,7 @@ func CompareScopeSpans(expected, actual ptrace.ScopeSpans) error { } for as, es := range matchingSpans { - errs = multierr.Append(errs, internal.AddErrPrefix(fmt.Sprintf(`span "%s"`, es.Name()), CompareSpan(as, es))) + errs = multierr.Append(errs, internal.AddErrPrefix(fmt.Sprintf(`span "%s"`, es.Name()), CompareSpan(es, as))) } return errs @@ -340,7 +340,7 @@ func compareSpanEventSlice(expected, actual ptrace.SpanEventSlice) (errs error) } for ae, ee := range matchingSpanEvents { - errs = multierr.Append(errs, internal.AddErrPrefix(fmt.Sprintf(`span event "%s"`, ee.Name()), CompareSpanEvent(ae, ee))) + errs = multierr.Append(errs, internal.AddErrPrefix(fmt.Sprintf(`span event "%s"`, ee.Name()), CompareSpanEvent(ee, ae))) } return errs @@ -420,7 +420,7 @@ func compareSpanLinkSlice(expected, actual ptrace.SpanLinkSlice) (errs error) { } for al, el := range matchingSpanLinks { - errs = multierr.Append(errs, internal.AddErrPrefix(fmt.Sprintf(`span link "%s"`, el.SpanID()), CompareSpanLink(al, el))) + errs = multierr.Append(errs, internal.AddErrPrefix(fmt.Sprintf(`span link "%s"`, el.SpanID()), CompareSpanLink(el, al))) } return errs diff --git a/pkg/pdatautil/go.mod b/pkg/pdatautil/go.mod index 81238d637160..eca104da1d24 100644 --- a/pkg/pdatautil/go.mod +++ b/pkg/pdatautil/go.mod @@ -1,11 +1,12 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil -go 1.20 +go 1.21 require ( - github.com/cespare/xxhash/v2 v2.2.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/cespare/xxhash/v2 v2.3.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.uber.org/goleak v1.3.0 ) require ( @@ -15,12 +16,12 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/pdatautil/go.sum b/pkg/pdatautil/go.sum index b80e0c6948a8..f37ef96fc65b 100644 --- a/pkg/pdatautil/go.sum +++ b/pkg/pdatautil/go.sum @@ -1,5 +1,5 @@ -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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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= @@ -9,21 +9,26 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS 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/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +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/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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -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/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +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= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -35,16 +40,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -57,15 +62,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/pkg/pdatautil/hash.go b/pkg/pdatautil/hash.go index 650258445b4c..6826de769b89 100644 --- a/pkg/pdatautil/hash.go +++ b/pkg/pdatautil/hash.go @@ -82,7 +82,7 @@ func (hw *hashWriter) writeMapHash(m pcommon.Map) { // on the first call due to it being cleared of any added keys at then end of the function. nextIndex := len(hw.keysBuf) - m.Range(func(k string, v pcommon.Value) bool { + m.Range(func(k string, _ pcommon.Value) bool { hw.keysBuf = append(hw.keysBuf, k) return true }) diff --git a/pkg/pdatautil/package_test.go b/pkg/pdatautil/package_test.go new file mode 100644 index 000000000000..319544fa4620 --- /dev/null +++ b/pkg/pdatautil/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package pdatautil + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/resourcetotelemetry/go.mod b/pkg/resourcetotelemetry/go.mod index 529a3d7c1d6a..29e05b707aad 100644 --- a/pkg/resourcetotelemetry/go.mod +++ b/pkg/resourcetotelemetry/go.mod @@ -1,45 +1,44 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/exporter v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.uber.org/goleak v1.3.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/component v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector/component v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/resourcetotelemetry/go.sum b/pkg/resourcetotelemetry/go.sum index 9b4fae6fc761..9f5e515356d4 100644 --- a/pkg/resourcetotelemetry/go.sum +++ b/pkg/resourcetotelemetry/go.sum @@ -1,8 +1,16 @@ +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.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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= @@ -10,9 +18,8 @@ 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/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/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/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/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -21,14 +28,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -38,38 +45,52 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/exporter v0.98.0 h1:eN2qtkiwpeX9gBu9JZw1k/CZ3N9wZE1aGJ1A0EvwJ7w= +go.opentelemetry.io/collector/exporter v0.98.0/go.mod h1:GCW46a0VAuW7nljlW//GgFXI+8mSrJjrdEKVO9icExE= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -79,16 +100,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.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= @@ -101,15 +122,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/pkg/resourcetotelemetry/package_test.go b/pkg/resourcetotelemetry/package_test.go new file mode 100644 index 000000000000..90d6b75be038 --- /dev/null +++ b/pkg/resourcetotelemetry/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package resourcetotelemetry + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/resourcetotelemetry/resource_to_telemetry.go b/pkg/resourcetotelemetry/resource_to_telemetry.go index b4658878556d..ca5ad9d72409 100644 --- a/pkg/resourcetotelemetry/resource_to_telemetry.go +++ b/pkg/resourcetotelemetry/resource_to_telemetry.go @@ -36,8 +36,8 @@ func (wme *wrapperMetricsExporter) ConsumeMetrics(ctx context.Context, md pmetri } func (wme *wrapperMetricsExporter) Capabilities() consumer.Capabilities { - // Always return false since this wrapper clones the data. - return consumer.Capabilities{MutatesData: false} + // Always return true since this wrapper modifies data inplace. + return consumer.Capabilities{MutatesData: true} } func (wme *wrapperMetricsExporter) convertToMetricsAttributes(md pmetric.Metrics) pmetric.Metrics { @@ -114,6 +114,7 @@ func addAttributesToExponentialHistogramDataPoints(ps pmetric.ExponentialHistogr } func joinAttributeMaps(from, to pcommon.Map) { + to.EnsureCapacity(from.Len() + to.Len()) from.Range(func(k string, v pcommon.Value) bool { v.CopyTo(to.PutEmpty(k)) return true diff --git a/pkg/resourcetotelemetry/resource_to_telemetry_test.go b/pkg/resourcetotelemetry/resource_to_telemetry_test.go index 202c3d936652..99376957f5b4 100644 --- a/pkg/resourcetotelemetry/resource_to_telemetry_test.go +++ b/pkg/resourcetotelemetry/resource_to_telemetry_test.go @@ -3,9 +3,11 @@ package resourcetotelemetry import ( + "fmt" "testing" "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/pcommon" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" ) @@ -19,15 +21,11 @@ func TestConvertResourceToAttributes(t *testing.T) { assert.Equal(t, 1, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).Sum().DataPoints().At(0).Attributes().Len()) wme := &wrapperMetricsExporter{} - cloneMd := wme.convertToMetricsAttributes(md) + md = wme.convertToMetricsAttributes(md) // After converting resource to labels - assert.Equal(t, 1, cloneMd.ResourceMetrics().At(0).Resource().Attributes().Len()) - assert.Equal(t, 2, cloneMd.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).Sum().DataPoints().At(0).Attributes().Len()) - assert.Equal(t, 1, md.ResourceMetrics().At(0).Resource().Attributes().Len()) - assert.Equal(t, 1, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).Sum().DataPoints().At(0).Attributes().Len()) - + assert.Equal(t, 2, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).Sum().DataPoints().At(0).Attributes().Len()) } func TestConvertResourceToAttributesAllDataTypesEmptyDataPoint(t *testing.T) { @@ -45,27 +43,86 @@ func TestConvertResourceToAttributesAllDataTypesEmptyDataPoint(t *testing.T) { assert.Equal(t, 0, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(6).ExponentialHistogram().DataPoints().At(0).Attributes().Len()) wme := &wrapperMetricsExporter{} - cloneMd := wme.convertToMetricsAttributes(md) + md = wme.convertToMetricsAttributes(md) // After converting resource to labels - assert.Equal(t, 1, cloneMd.ResourceMetrics().At(0).Resource().Attributes().Len()) - assert.Equal(t, 1, cloneMd.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).Gauge().DataPoints().At(0).Attributes().Len()) - assert.Equal(t, 1, cloneMd.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(1).Gauge().DataPoints().At(0).Attributes().Len()) - assert.Equal(t, 1, cloneMd.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(2).Sum().DataPoints().At(0).Attributes().Len()) - assert.Equal(t, 1, cloneMd.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(3).Sum().DataPoints().At(0).Attributes().Len()) - assert.Equal(t, 1, cloneMd.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(4).Histogram().DataPoints().At(0).Attributes().Len()) - assert.Equal(t, 1, cloneMd.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(5).Summary().DataPoints().At(0).Attributes().Len()) - assert.Equal(t, 1, cloneMd.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(6).ExponentialHistogram().DataPoints().At(0).Attributes().Len()) - assert.Equal(t, 1, md.ResourceMetrics().At(0).Resource().Attributes().Len()) - assert.Equal(t, 0, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).Gauge().DataPoints().At(0).Attributes().Len()) - assert.Equal(t, 0, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(1).Gauge().DataPoints().At(0).Attributes().Len()) - assert.Equal(t, 0, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(2).Sum().DataPoints().At(0).Attributes().Len()) - assert.Equal(t, 0, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(3).Sum().DataPoints().At(0).Attributes().Len()) - assert.Equal(t, 0, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(4).Histogram().DataPoints().At(0).Attributes().Len()) - assert.Equal(t, 0, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(5).Summary().DataPoints().At(0).Attributes().Len()) - assert.Equal(t, 0, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(6).ExponentialHistogram().DataPoints().At(0).Attributes().Len()) + assert.Equal(t, 1, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).Gauge().DataPoints().At(0).Attributes().Len()) + assert.Equal(t, 1, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(1).Gauge().DataPoints().At(0).Attributes().Len()) + assert.Equal(t, 1, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(2).Sum().DataPoints().At(0).Attributes().Len()) + assert.Equal(t, 1, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(3).Sum().DataPoints().At(0).Attributes().Len()) + assert.Equal(t, 1, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(4).Histogram().DataPoints().At(0).Attributes().Len()) + assert.Equal(t, 1, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(5).Summary().DataPoints().At(0).Attributes().Len()) + assert.Equal(t, 1, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(6).ExponentialHistogram().DataPoints().At(0).Attributes().Len()) + +} + +func BenchmarkJoinAttributes(b *testing.B) { + type args struct { + from int + to int + } + tests := []struct { + name string + args args + }{ + { + name: "merge 10 into 10", + args: args{ + from: 10, + to: 10, + }, + }, + { + name: "merge 10 into 20", + args: args{ + from: 10, + to: 20, + }, + }, + { + name: "merge 20 into 10", + args: args{ + from: 20, + to: 10, + }, + }, + { + name: "merge 30 into 10", + args: args{ + from: 30, + to: 10, + }, + }, + { + name: "merge 10 into 30", + args: args{ + from: 10, + to: 30, + }, + }, + } + b.ReportAllocs() + for _, tt := range tests { + b.Run(tt.name, func(b *testing.B) { + b.ResetTimer() + from := initMetricAttributes(tt.args.from, 0) + for i := 0; i < b.N; i++ { + to := initMetricAttributes(tt.args.to, tt.args.from) + joinAttributeMaps(from, to) + } + }) + } + +} +func initMetricAttributes(capacity int, idx int) pcommon.Map { + dest := pcommon.NewMap() + dest.EnsureCapacity(capacity) + for i := 0; i < capacity; i++ { + dest.PutStr(fmt.Sprintf("label-name-for-index-%d", i+idx), fmt.Sprintf("label-value-for-index-%d", i+idx)) + } + return dest } func TestClearAfterCopy(t *testing.T) { diff --git a/pkg/sampling/Makefile b/pkg/sampling/Makefile new file mode 100644 index 000000000000..ded7a36092dc --- /dev/null +++ b/pkg/sampling/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/pkg/sampling/README.md b/pkg/sampling/README.md new file mode 100644 index 000000000000..eb3a4f8cc181 --- /dev/null +++ b/pkg/sampling/README.md @@ -0,0 +1,23 @@ +# pkg/sampling + +## Overview + +This package contains utilities for parsing and interpreting the W3C +[TraceState](https://www.w3.org/TR/trace-context/#tracestate-header) +and all sampling-relevant fields specified by OpenTelemetry that may +be found in the OpenTelemetry section of the W3C TraceState. + +This package implements the draft specification in [OTEP +235](https://github.com/open-telemetry/oteps/pull/235), which +specifies two fields used by the OpenTelemetry consistent probability +sampling scheme. + +These are: + +- `th`: the Threshold used to determine whether a TraceID is sampled +- `rv`: an explicit randomness value, which overrides randomness in the TraceID + +[OTEP 235](https://github.com/open-telemetry/oteps/pull/235) contains +details on how to interpret these fields. The are not meant to be +human readable, with a few exceptions. The tracestate entry `ot=th:0` +indicates 100% sampling. diff --git a/pkg/sampling/common.go b/pkg/sampling/common.go new file mode 100644 index 000000000000..ad94bac763eb --- /dev/null +++ b/pkg/sampling/common.go @@ -0,0 +1,125 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sampling // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling" + +import ( + "errors" + "io" + "strings" + + "go.uber.org/multierr" +) + +// KV represents a key-value parsed from a section of the TraceState. +type KV struct { + Key string + Value string +} + +var ( + // ErrTraceStateSize is returned when a TraceState is over its + // size limit, as specified by W3C. + ErrTraceStateSize = errors.New("invalid tracestate size") +) + +// keyValueScanner defines distinct scanner behaviors for lists of +// key-values. +type keyValueScanner struct { + // maxItems is 32 or -1 + maxItems int + // trim is set if OWS (optional whitespace) should be removed + trim bool + // separator is , or ; + separator byte + // equality is = or : + equality byte +} + +// commonTraceState is embedded in both W3C and OTel trace states. +type commonTraceState struct { + kvs []KV +} + +// ExtraValues returns additional values are carried in this +// tracestate object (W3C or OpenTelemetry). +func (cts commonTraceState) ExtraValues() []KV { + return cts.kvs +} + +// trimOws removes optional whitespace on both ends of a string. +// this uses the strict definition for optional whitespace tiven +// in https://www.w3.org/TR/trace-context/#tracestate-header-field-values +func trimOws(input string) string { + return strings.Trim(input, " \t") +} + +// scanKeyValues is common code to scan either W3C or OTel tracestate +// entries, as parameterized in the keyValueScanner struct. +func (s keyValueScanner) scanKeyValues(input string, f func(key, value string) error) error { + var rval error + items := 0 + for input != "" { + items++ + if s.maxItems > 0 && items >= s.maxItems { + // W3C specifies max 32 entries, tested here + // instead of via the regexp. + return ErrTraceStateSize + } + + sep := strings.IndexByte(input, s.separator) + + var member string + if sep < 0 { + member = input + input = "" + } else { + member = input[:sep] + input = input[sep+1:] + } + + if s.trim { + // Trim only required for W3C; OTel does not + // specify whitespace for its value encoding. + member = trimOws(member) + } + + if member == "" { + // W3C allows empty list members. + continue + } + + eq := strings.IndexByte(member, s.equality) + if eq < 0 { + // We expect to find the `s.equality` + // character in this string because we have + // already validated the whole input syntax + // before calling this parser. I.e., this can + // never happen, and if it did, the result + // would be to skip malformed entries. + continue + } + if err := f(member[:eq], member[eq+1:]); err != nil { + rval = multierr.Append(rval, err) + } + } + return rval +} + +// serializer assists with checking and combining errors from +// (io.StringWriter).WriteString(). +type serializer struct { + writer io.StringWriter + err error +} + +// write handles errors from io.StringWriter. +func (ser *serializer) write(str string) { + _, err := ser.writer.WriteString(str) + ser.check(err) +} + +// check handles errors (e.g., from another serializer). +func (ser *serializer) check(err error) { + ser.err = multierr.Append(ser.err, err) +} diff --git a/pkg/sampling/doc.go b/pkg/sampling/doc.go new file mode 100644 index 000000000000..0c5b1052bbc5 --- /dev/null +++ b/pkg/sampling/doc.go @@ -0,0 +1,94 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// # TraceState representation +// +// A [W3CTraceState] object parses and stores the OpenTelemetry +// tracestate field and any other fields that are present in the +// W3C tracestate header, part of the [W3C tracecontext specification]. +// +// An [OpenTelemetryTraceState] object parses and stores fields of +// the OpenTelemetry-specific tracestate field, including those recognized +// for probability sampling and any other fields that are present. The +// syntax of the OpenTelemetry field is specified in [Tracestate handling]. +// +// The probability sampling-specific fields used here are specified in +// [OTEP 235]. The principal named fields are: +// +// - T-value: The sampling rejection threshold, expresses a 56-bit +// hexadecimal number of traces that will be rejected by sampling. +// - R-value: The sampling randomness value can be implicit in a TraceID, +// otherwise it is explicitly encoded as an R-value. +// +// # Low-level types +// +// The three key data types implemented in this package represent sampling +// decisions. +// +// - [Threshold]: Represents an exact sampling probability. +// - [Randomness]: Randomness used for sampling decisions. +// - [Threshold.Probability]: a float64 in the range [MinSamplingProbability, 1.0]. +// +// # Example use-case +// +// To configure a consistent tail sampler in an OpenTelemetry +// Collector using a fixed probability for all traces in an +// "equalizing" arrangement, where the effect of sampling is +// conditioned on how much sampling has already taken place, use the +// following pseudocode. +// +// func Setup() { +// // Get a fixed probability value from the configuration, in +// // the range (0, 1]. +// probability := *FLAG_probability +// +// // Calculate the sampling threshold from probability using 3 +// // hex digits of precision. +// fixedThreshold, err = ProbabilityToThresholdWithPrecision(probability, 3) +// if err != nil { +// // error case: Probability is not valid. +// } +// } +// +// func MakeDecision(tracestate string, tid TraceID) bool { +// // Parse the incoming tracestate +// ts, err := NewW3CTraceState(tracestate) +// if err != nil { +// // error case: Tracestate is ill-formed. +// } +// // For an absolute probability sample, we check the incoming +// // tracestate to see whether it was already sampled enough. +// if threshold, hasThreshold := ts.OTelValue().TValueThreshold(); hasThreshold { +// // If the incoming tracestate was already sampled at +// // least as much as our threshold implies, then its +// // (rejection) threshold is higher. If so, then no +// // further sampling is called for. +// if ThresholdGreater(threshold, fixedThreshold) { +// // Do not update. +// return true +// } +// // The error below is ignored because we've tested +// // the equivalent condition above. This lowers the sampling +// // probability expressed in the tracestate T-value. +// _ = ts.OTelValue().UpdateThresholdWithSampling(fixedThreshold) +// } +// var rnd Randomness +// // If the R-value is present, use it. If not, rely on TraceID +// // randomness. Note that OTLP v1.1.0 introduces a new Span flag +// // to convey trace randomness correctly, and if the context has +// // neither the randomness bit set or the R-value set, we need a +// // fallback, which can be to synthesize an R-value or to assume +// // the TraceID has sufficient randomness. This detail is left +// // out of scope. +// if rv, hasRand := ts.OTelValue().RValueRandomness(); hasRand { +// rnd = rv +// } else { +// rnd = TraceIDToRandomness(tid) +// } +// return fixedThreshold.ShouldSample(rnd) +// } +// +// [W3C tracecontext specification]: https://www.w3.org/TR/trace-context/#tracestate-header +// [Tracestate handling]: https://opentelemetry.io/docs/specs/otel/trace/tracestate-handling/ + +package sampling // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling" diff --git a/pkg/sampling/encoding_test.go b/pkg/sampling/encoding_test.go new file mode 100644 index 000000000000..2d4bbcd86fab --- /dev/null +++ b/pkg/sampling/encoding_test.go @@ -0,0 +1,302 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sampling + +import ( + "encoding/binary" + "errors" + "fmt" + "math/rand" + "strconv" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +// must panics when the error is non-nil and returns the +// generic argument. this does not call require.NoError() in order to +// use a one-line test calling convention, meaning `must(functionCall())` +// ensures there is no error and returns the first argument. +// +// To do the same with NoError() means rewriting the expression with +// a two-line statement: +// +// value, err := functionCall() +// require.NoError(t, value) +func must[T any](t T, err error) T { + if err != nil { + panic(err) + } + return t +} + +// mustNot panics when the error is nil. this does not call +// require.Error() in order to use a one-line test calling +// convention, meaning `mustNot(functionCall())` ensures there is an +// error without requiring a separate variable assignment. +// +// To do the same with Error() means rewriting the expression with +// a two-line statement: +// +// _, err := functionCall() +// require.Error(t, value) +func mustNot[T any](_ T, err error) error { + if err == nil { + return fmt.Errorf("expected an error, got nil") + } + return err +} + +func probabilityToTValue(prob float64) (string, error) { + th, err := ProbabilityToThreshold(prob) + return th.TValue(), err +} + +func tValueToProbability(tv string) (float64, error) { + th, err := TValueToThreshold(tv) + return th.Probability(), err +} + +func TestValidProbabilityToTValue(t *testing.T) { + require.Equal(t, "0", must(probabilityToTValue(1.0))) + require.Equal(t, "8", must(probabilityToTValue(0.5))) + require.Equal(t, "ffffffffffffff", must(probabilityToTValue(0x1p-56))) + require.Equal(t, "aaaaaaaaaaaaac", must(probabilityToTValue(1/3.))) + require.Equal(t, "55555555555558", must(probabilityToTValue(2/3.))) + require.Equal(t, "54", must(probabilityToTValue(1-0x54p-8))) // 0x54p-8 is approximately 1/3 + require.Equal(t, "01", must(probabilityToTValue(1-0x1p-8))) +} + +func TestThresholdGreater(t *testing.T) { + require.True(t, ThresholdGreater( + must(TValueToThreshold("5")), + must(TValueToThreshold("4")), + )) + + require.True(t, ThresholdGreater( + must(TValueToThreshold("4")), + must(TValueToThreshold("04")), + )) + + require.False(t, ThresholdGreater( + must(TValueToThreshold("234")), + must(TValueToThreshold("4")), + )) + + require.True(t, ThresholdGreater( + must(TValueToThreshold("4")), + must(TValueToThreshold("234")), + )) +} + +func TestInvalidprobabilityToTValue(t *testing.T) { + // Too small + require.Error(t, mustNot(probabilityToTValue(0x1p-57))) + require.Error(t, mustNot(probabilityToTValue(0x1p-57))) + + // Too big + require.Error(t, mustNot(probabilityToTValue(1.1))) + require.Error(t, mustNot(probabilityToTValue(1.1))) +} + +func TestTValueToProbability(t *testing.T) { + require.Equal(t, 0.5, must(tValueToProbability("8"))) + require.Equal(t, 1-0x444p-12, must(tValueToProbability("444"))) + require.Equal(t, 1.0, must(tValueToProbability("0"))) + + // 0x55555554p-32 is very close to 1/3 + require.InEpsilon(t, 1-1/3., must(tValueToProbability("55555554")), 1e-9) +} + +func TestProbabilityToThreshold(t *testing.T) { + require.Equal(t, + must(TValueToThreshold("8")), + must(ProbabilityToThreshold(0.5))) + require.Equal(t, + must(TValueToThreshold("ffffffffffffff")), + must(ProbabilityToThreshold(0x1p-56))) + require.Equal(t, + must(TValueToThreshold("ffffffffffff00")), + must(ProbabilityToThreshold(0x100p-56))) + require.Equal(t, + must(TValueToThreshold("00000000000010")), + must(ProbabilityToThreshold(1.0-0x1p-52))) + require.Equal(t, + AlwaysSampleThreshold, + must(ProbabilityToThreshold(1.0))) + + zt, err := ProbabilityToThreshold(0) + require.Equal(t, zt, AlwaysSampleThreshold) + require.Error(t, err) + require.Equal(t, err, ErrProbabilityRange) +} + +func TestShouldSample(t *testing.T) { + // Test four boundary conditions for 50% sampling, + thresh := must(ProbabilityToThreshold(0.5)) + // Smallest TraceID that should NOT sample. + require.False(t, thresh.ShouldSample(TraceIDToRandomness(pcommon.TraceID{ + // 9 meaningless bytes + 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, + 0, // randomness starts here + 0, 0, 0, 0, 0, 0, + }))) + // Largest TraceID that should NOT sample. + require.False(t, thresh.ShouldSample(TraceIDToRandomness(pcommon.TraceID{ + // 9 meaningless bytes + 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, + 0x7f, // randomness starts here + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + }))) + // Smallest TraceID that should sample. + require.True(t, thresh.ShouldSample(TraceIDToRandomness(pcommon.TraceID{ + // 9 meaningless bytes + 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, + 0x80, // randomness starts here + 0, 0, 0, 0, 0, 0, + }))) + // Largest TraceID that should sample. + require.True(t, thresh.ShouldSample(TraceIDToRandomness(pcommon.TraceID{ + // 9 meaningless bytes + 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, + 0xff, // randomness starts here + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + }))) +} + +func TestRValueSyntax(t *testing.T) { + type testCase struct { + in string + expectErr error + } + for _, test := range []testCase{ + // correct cases + {"12341234123412", nil}, + + // wrong size + {"123412341234120", ErrRValueSize}, + {"1234123412341", ErrRValueSize}, + {"", ErrRValueSize}, + + // bad syntax + {"abcdefgabcdefg", strconv.ErrSyntax}, + } { + t.Run(testName(test.in), func(t *testing.T) { + rnd, err := RValueToRandomness(test.in) + + if test.expectErr != nil { + require.True(t, errors.Is(err, test.expectErr), + "%q: not expecting %v wanted %v", test.in, err, test.expectErr, + ) + require.Equal(t, must(RValueToRandomness("00000000000000")), rnd) + } else { + require.NoError(t, err, "%q", test.in) + + val, err := strconv.ParseUint(test.in, 16, 64) + require.NoError(t, err) + + require.Equal(t, TraceIDToRandomness( + // This explicitly constructs a TraceID from 9 random + // bytes plus the 7 lowest bytes of the input value. + pcommon.TraceID{ + byte(rand.Intn(256)), // 0 + byte(rand.Intn(256)), // 1 + byte(rand.Intn(256)), // 2 + byte(rand.Intn(256)), // 3 + byte(rand.Intn(256)), // 4 + byte(rand.Intn(256)), // 5 + byte(rand.Intn(256)), // 6 + byte(rand.Intn(256)), // 7 + byte(rand.Intn(256)), // 8 + byte(val >> 48 & 0xff), // 9 + byte(val >> 40 & 0xff), // 10 + byte(val >> 32 & 0xff), // 11 + byte(val >> 24 & 0xff), // 12 + byte(val >> 16 & 0xff), // 13 + byte(val >> 8 & 0xff), // 14 + byte(val >> 0 & 0xff), // 15 + }, + ), rnd) + } + }) + } +} + +func TestTValueSyntax(t *testing.T) { + type testCase struct { + in string + expectErr error + } + for _, test := range []testCase{ + // correct cases + {"1", nil}, + + // syntax error + {"", ErrTValueEmpty}, + {"g", strconv.ErrSyntax}, + } { + t.Run(testName(test.in), func(t *testing.T) { + _, err := TValueToThreshold(test.in) + + if test.expectErr != nil { + require.True(t, errors.Is(err, test.expectErr), + "%q: not expecting %v wanted %v", test.in, err, test.expectErr, + ) + } else { + require.NoError(t, err, "%q", test.in) + } + }) + } +} + +// There were two benchmarks used to choose the implementation for the +// Threshold type in this package. The results indicate that it is +// faster to compare a 56-bit number than to compare as 7 element +// []byte. + +type benchTIDs [1024]pcommon.TraceID + +func (tids *benchTIDs) init() { + for i := range tids { + binary.BigEndian.PutUint64(tids[i][:8], rand.Uint64()) + binary.BigEndian.PutUint64(tids[i][8:], rand.Uint64()) + } +} + +// The current implementation, using unsigned: +// +// BenchmarkThresholdCompareAsUint64-10 1000000000 0.4515 ns/op 0 B/op 0 allocs/op +// +// vs the tested and rejected, using bytes: +// +// BenchmarkThresholdCompareAsBytes-10 528679580 2.288 ns/op 0 B/op 0 allocs/op +func BenchmarkThresholdCompareAsUint64(b *testing.B) { + var tids benchTIDs + var comps [1024]Threshold + tids.init() + for i := range comps { + var err error + comps[i], err = ProbabilityToThreshold(rand.Float64()) + if err != nil { + b.Fatal(err) + } + } + + b.ReportAllocs() + b.ResetTimer() + yes := 0 + no := 0 + for i := 0; i < b.N; i++ { + idx := i % len(tids) + tid := tids[idx] + comp := comps[idx] + + if comp.ShouldSample(TraceIDToRandomness(tid)) { + yes++ + } else { + no++ + } + } +} diff --git a/pkg/sampling/go.mod b/pkg/sampling/go.mod new file mode 100644 index 000000000000..a794c1d66432 --- /dev/null +++ b/pkg/sampling/go.mod @@ -0,0 +1,24 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling + +go 1.21 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.uber.org/multierr v1.11.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/pkg/sampling/go.sum b/pkg/sampling/go.sum new file mode 100644 index 000000000000..ecafb4694223 --- /dev/null +++ b/pkg/sampling/go.sum @@ -0,0 +1,75 @@ +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +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/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/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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +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= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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/pkg/sampling/metadata.yaml b/pkg/sampling/metadata.yaml new file mode 100644 index 000000000000..8fe70cf1d9ec --- /dev/null +++ b/pkg/sampling/metadata.yaml @@ -0,0 +1,4 @@ +status: + class: pkg + codeowners: + active: [kentquirk, jmacd] diff --git a/pkg/sampling/oteltracestate.go b/pkg/sampling/oteltracestate.go new file mode 100644 index 000000000000..fbd277347175 --- /dev/null +++ b/pkg/sampling/oteltracestate.go @@ -0,0 +1,246 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sampling // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling" + +import ( + "errors" + "io" + "regexp" + "strconv" +) + +// OpenTelemetryTraceState represents the `ot` section of the W3C tracestate +// which is specified generically in https://opentelemetry.io/docs/specs/otel/trace/tracestate-handling/. +// +// OpenTelemetry defines two specific values that convey sampling +// probability, known as T-Value (with "th", for threshold), R-Value +// (with key "rv", for random value), and extra values. +type OpenTelemetryTraceState struct { + commonTraceState + + // sampling r and t-values + rnd Randomness // r value parsed, as unsigned + rvalue string // 14 ASCII hex digits + threshold Threshold // t value parsed, as a threshold + tvalue string // 1-14 ASCII hex digits +} + +const ( + // rValueFieldName is the OTel tracestate field for R-value + rValueFieldName = "rv" + // tValueFieldName is the OTel tracestate field for T-value + tValueFieldName = "th" + + // hardMaxOTelLength is the maximum encoded size of an OTel + // tracestate value. + hardMaxOTelLength = 256 + + // chr = ucalpha / lcalpha / DIGIT / "." / "_" / "-" + // ucalpha = %x41-5A ; A-Z + // lcalpha = %x61-7A ; a-z + // key = lcalpha *(lcalpha / DIGIT ) + // value = *(chr) + // list-member = key ":" value + // list = list-member *( ";" list-member ) + otelKeyRegexp = lcAlphaRegexp + lcAlphanumRegexp + `*` + otelValueRegexp = `[a-zA-Z0-9._\-]*` + otelMemberRegexp = `(?:` + otelKeyRegexp + `:` + otelValueRegexp + `)` + otelSemicolonMemberRegexp = `(?:` + `;` + otelMemberRegexp + `)` + otelTracestateRegexp = `^` + otelMemberRegexp + otelSemicolonMemberRegexp + `*$` +) + +var ( + otelTracestateRe = regexp.MustCompile(otelTracestateRegexp) + + otelSyntax = keyValueScanner{ + maxItems: -1, + trim: false, + separator: ';', + equality: ':', + } + + // ErrInconsistentSampling is returned when a sampler update + // is illogical, indicating that the tracestate was not + // modified. Preferably, Samplers will avoid seeing this + // error by using a ThresholdGreater() test, which allows them + // to report a more clear error to the user. For example, if + // data arrives sampled at 1/100 and an equalizing sampler is + // configured for 1/2 sampling, the Sampler may detect the + // illogical condition itself using ThresholdGreater and skip + // the call to UpdateTValueWithSampling, which will have no + // effect and return this error. How a sampler decides to + // handle this condition is up to the sampler: for example the + // equalizing sampler can decide to pass through a span + // indicating 1/100 sampling or it can reject the span. + ErrInconsistentSampling = errors.New("cannot raise existing sampling probability") +) + +// NewOpenTelemetryTraceState returns a parsed representation of the +// OpenTelemetry tracestate section. Errors indicate an invalid +// tracestate was received. +func NewOpenTelemetryTraceState(input string) (OpenTelemetryTraceState, error) { + otts := OpenTelemetryTraceState{} + + if len(input) > hardMaxOTelLength { + return otts, ErrTraceStateSize + } + + if !otelTracestateRe.MatchString(input) { + return otts, strconv.ErrSyntax + } + + err := otelSyntax.scanKeyValues(input, func(key, value string) error { + var err error + switch key { + case rValueFieldName: + if otts.rnd, err = RValueToRandomness(value); err == nil { + otts.rvalue = value + } else { + // RValueRandomness() will return false, the error + // accumulates and is returned below. + otts.rvalue = "" + otts.rnd = Randomness{} + } + case tValueFieldName: + if otts.threshold, err = TValueToThreshold(value); err == nil { + otts.tvalue = value + } else { + // TValueThreshold() will return false, the error + // accumulates and is returned below. + otts.tvalue = "" + otts.threshold = AlwaysSampleThreshold + } + default: + otts.kvs = append(otts.kvs, KV{ + Key: key, + Value: value, + }) + } + return err + }) + + return otts, err +} + +// RValue returns the R-value (key: "rv") as a string or empty if +// there is no R-value set. +func (otts *OpenTelemetryTraceState) RValue() string { + return otts.rvalue +} + +// RValueRandomness returns the randomness object corresponding with +// RValue() and a boolean indicating whether the R-value is set. +func (otts *OpenTelemetryTraceState) RValueRandomness() (Randomness, bool) { + return otts.rnd, len(otts.rvalue) != 0 +} + +// TValue returns the T-value (key: "th") as a string or empty if +// there is no T-value set. +func (otts *OpenTelemetryTraceState) TValue() string { + return otts.tvalue +} + +// TValueThreshold returns the threshold object corresponding with +// TValue() and a boolean (equal to len(TValue()) != 0 indicating +// whether the T-value is valid. +func (otts *OpenTelemetryTraceState) TValueThreshold() (Threshold, bool) { + return otts.threshold, len(otts.tvalue) != 0 +} + +// UpdateTValueWithSampling modifies the TValue of this object, which +// changes its adjusted count. It is not logical to modify a sampling +// probability in the direction of larger probability. This prevents +// accidental loss of adjusted count. +// +// If the change of TValue leads to inconsistency, an error is returned. +func (otts *OpenTelemetryTraceState) UpdateTValueWithSampling(sampledThreshold Threshold) error { + // Note: there was once a code path here that optimized for + // cases where a static threshold is used, in which case the + // call to TValue() causes an unnecessary allocation per data + // item (w/ a constant result). We have eliminated that + // parameter, due to the significant potential for mis-use. + // Therefore, this method always recomputes TValue() of the + // sampledThreshold (on success). A future method such as + // UpdateTValueWithSamplingFixedTValue() could extend this + // API to address this allocation, although it is probably + // not significant. + if len(otts.TValue()) != 0 && ThresholdGreater(otts.threshold, sampledThreshold) { + return ErrInconsistentSampling + } + // Note NeverSampleThreshold is the (exclusive) upper boundary + // of valid thresholds, so the test above permits never- + // sampled updates, in which case the TValue() here is empty. + otts.threshold = sampledThreshold + otts.tvalue = sampledThreshold.TValue() + return nil +} + +// AdjustedCount returns the adjusted count for this item. If the +// TValue string is empty, this returns 0, otherwise returns +// Threshold.AdjustedCount(). +func (otts *OpenTelemetryTraceState) AdjustedCount() float64 { + if len(otts.tvalue) == 0 { + // Note: this case covers the zero state, where + // len(tvalue) == 0 and threshold == AlwaysSampleThreshold. + // We return 0 to indicate that no information is available. + return 0 + } + return otts.threshold.AdjustedCount() +} + +// ClearTValue is used to unset TValue, for use in cases where it is +// inconsistent on arrival. +func (otts *OpenTelemetryTraceState) ClearTValue() { + otts.tvalue = "" + otts.threshold = Threshold{} +} + +// SetRValue establishes explicit randomness for this TraceState. +func (otts *OpenTelemetryTraceState) SetRValue(randomness Randomness) { + otts.rnd = randomness + otts.rvalue = randomness.RValue() +} + +// ClearRValue unsets explicit randomness. +func (otts *OpenTelemetryTraceState) ClearRValue() { + otts.rvalue = "" + otts.rnd = Randomness{} +} + +// HasAnyValue returns true if there are any fields in this +// tracestate, including any extra values. +func (otts *OpenTelemetryTraceState) HasAnyValue() bool { + return len(otts.RValue()) != 0 || len(otts.TValue()) != 0 || len(otts.ExtraValues()) != 0 +} + +// Serialize encodes this TraceState object. +func (otts *OpenTelemetryTraceState) Serialize(w io.StringWriter) error { + ser := serializer{writer: w} + cnt := 0 + sep := func() { + if cnt != 0 { + ser.write(";") + } + cnt++ + } + if len(otts.RValue()) != 0 { + sep() + ser.write(rValueFieldName) + ser.write(":") + ser.write(otts.RValue()) + } + if len(otts.TValue()) != 0 { + sep() + ser.write(tValueFieldName) + ser.write(":") + ser.write(otts.TValue()) + } + for _, kv := range otts.ExtraValues() { + sep() + ser.write(kv.Key) + ser.write(":") + ser.write(kv.Value) + } + return ser.err +} diff --git a/pkg/sampling/oteltracestate_test.go b/pkg/sampling/oteltracestate_test.go new file mode 100644 index 000000000000..4330c01466ab --- /dev/null +++ b/pkg/sampling/oteltracestate_test.go @@ -0,0 +1,344 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sampling + +import ( + "errors" + "fmt" + "strconv" + "strings" + "testing" + + "github.com/stretchr/testify/require" +) + +// ExampleOpenTelemetryTraceState_AdjustedCount shows how to access +// the adjusted count for a sampled context when it has non-zero +// probability. +func ExampleOpenTelemetryTraceState_AdjustedCount() { + w3c, err := NewW3CTraceState("ot=th:c") + if err != nil { + panic(err) + } + ot := w3c.OTelValue() + + fmt.Printf("Adjusted count for T-value %q: %f", ot.TValue(), ot.AdjustedCount()) + + // Output: + // Adjusted count for T-value "c": 4.000000 +} + +func testName(in string) string { + if len(in) > 32 { + return in[:32] + "..." + } + return in +} + +func TestEmptyOpenTelemetryTraceState(t *testing.T) { + // Empty value is invalid + _, err := NewOpenTelemetryTraceState("") + require.Error(t, err) +} + +func TestOpenTelemetryTraceStateTValueSerialize(t *testing.T) { + const orig = "rv:10000000000000;th:3;a:b;c:d" + otts, err := NewOpenTelemetryTraceState(orig) + require.NoError(t, err) + require.Equal(t, "3", otts.TValue()) + tv, hasTv := otts.TValueThreshold() + require.True(t, hasTv) + require.Equal(t, 1-0x3p-4, tv.Probability()) + + require.NotEqual(t, "", otts.RValue()) + require.Equal(t, "10000000000000", otts.RValue()) + rv, hasRv := otts.RValueRandomness() + require.True(t, hasRv) + require.Equal(t, "10000000000000", rv.RValue()) + + require.True(t, otts.HasAnyValue()) + var w strings.Builder + require.NoError(t, otts.Serialize(&w)) + require.Equal(t, orig, w.String()) +} + +func TestOpenTelemetryTraceStateZero(t *testing.T) { + const orig = "th:0" + otts, err := NewOpenTelemetryTraceState(orig) + require.NoError(t, err) + require.True(t, otts.HasAnyValue()) + require.Equal(t, "0", otts.TValue()) + tv, hasTv := otts.TValueThreshold() + require.True(t, hasTv) + require.Equal(t, 1.0, tv.Probability()) + + var w strings.Builder + require.NoError(t, otts.Serialize(&w)) + require.Equal(t, orig, w.String()) +} + +func TestOpenTelemetryTraceStateRValuePValue(t *testing.T) { + // Ensures the caller can handle RValueSizeError and search + // for p-value in extra-values. + const orig = "rv:3;p:2" + otts, err := NewOpenTelemetryTraceState(orig) + require.Error(t, err) + require.Equal(t, ErrRValueSize, err) + require.Equal(t, "", otts.RValue()) + + // The error is oblivious to the old r-value, but that's ok. + require.Contains(t, err.Error(), "14 hex digits") + + require.Equal(t, []KV{{"p", "2"}}, otts.ExtraValues()) + + var w strings.Builder + require.NoError(t, otts.Serialize(&w)) + require.Equal(t, "p:2", w.String()) +} + +func TestOpenTelemetryTraceStateTValueUpdate(t *testing.T) { + const orig = "rv:abcdefabcdefab" + otts, err := NewOpenTelemetryTraceState(orig) + require.NoError(t, err) + require.Equal(t, "", otts.TValue()) + require.NotEqual(t, "", otts.RValue()) + + th, _ := TValueToThreshold("3") + require.NoError(t, otts.UpdateTValueWithSampling(th)) + + require.Equal(t, "3", otts.TValue()) + tv, hasTv := otts.TValueThreshold() + require.True(t, hasTv) + require.Equal(t, 1-0x3p-4, tv.Probability()) + + const updated = "rv:abcdefabcdefab;th:3" + var w strings.Builder + require.NoError(t, otts.Serialize(&w)) + require.Equal(t, updated, w.String()) +} + +func TestOpenTelemetryTraceStateRTUpdate(t *testing.T) { + otts, err := NewOpenTelemetryTraceState("a:b") + require.NoError(t, err) + require.Equal(t, "", otts.TValue()) + require.Equal(t, "", otts.RValue()) + require.True(t, otts.HasAnyValue()) + + th, _ := TValueToThreshold("3") + require.NoError(t, otts.UpdateTValueWithSampling(th)) + otts.SetRValue(must(RValueToRandomness("00000000000003"))) + + const updated = "rv:00000000000003;th:3;a:b" + var w strings.Builder + require.NoError(t, otts.Serialize(&w)) + require.Equal(t, updated, w.String()) +} + +func TestOpenTelemetryTraceStateRTClear(t *testing.T) { + otts, err := NewOpenTelemetryTraceState("a:b;rv:12341234123412;th:1234") + require.NoError(t, err) + + otts.ClearTValue() + otts.ClearRValue() + + const updated = "a:b" + var w strings.Builder + require.NoError(t, otts.Serialize(&w)) + require.Equal(t, updated, w.String()) +} + +func TestParseOpenTelemetryTraceState(t *testing.T) { + type testCase struct { + in string + rval string + tval string + extra []string + expectErr error + } + const ns = "" + for _, test := range []testCase{ + // t-value correct cases + {"th:2", ns, "2", nil, nil}, + {"th:ab", ns, "ab", nil, nil}, + {"th:abcdefabcdefab", ns, "abcdefabcdefab", nil, nil}, + + // correct with trailing zeros. the parser does not re-format + // to remove trailing zeros. + {"th:1000", ns, "1000", nil, nil}, + + // syntax errors + {"", ns, ns, nil, strconv.ErrSyntax}, + {"th:1;", ns, ns, nil, strconv.ErrSyntax}, + {"th:1=p:2", ns, ns, nil, strconv.ErrSyntax}, + {"th:1;p:2=s:3", ns, ns, nil, strconv.ErrSyntax}, + {":1;p:2=s:3", ns, ns, nil, strconv.ErrSyntax}, + {":;p:2=s:3", ns, ns, nil, strconv.ErrSyntax}, + {":;:", ns, ns, nil, strconv.ErrSyntax}, + {":", ns, ns, nil, strconv.ErrSyntax}, + {"th:;p=1", ns, ns, nil, strconv.ErrSyntax}, + {"th:$", ns, ns, nil, strconv.ErrSyntax}, // not-hexadecimal + {"th:0x1p+3", ns, ns, nil, strconv.ErrSyntax}, // + is invalid + {"th:14.5", ns, ns, nil, strconv.ErrSyntax}, // integer syntax + {"th:-1", ns, ns, nil, strconv.ErrSyntax}, // non-negative + + // too many digits + {"th:ffffffffffffffff", ns, ns, nil, ErrTValueSize}, + {"th:100000000000000", ns, ns, nil, ErrTValueSize}, + + // one field + {"e100:1", ns, ns, []string{"e100:1"}, nil}, + + // two fields + {"e1:1;e2:2", ns, ns, []string{"e1:1", "e2:2"}, nil}, + + // one extra key, two ways + {"th:2;extra:stuff", ns, "2", []string{"extra:stuff"}, nil}, + {"extra:stuff;th:2", ns, "2", []string{"extra:stuff"}, nil}, + + // two extra fields + {"e100:100;th:1;e101:101", ns, "1", []string{"e100:100", "e101:101"}, nil}, + {"th:1;e100:100;e101:101", ns, "1", []string{"e100:100", "e101:101"}, nil}, + {"e100:100;e101:101;th:1", ns, "1", []string{"e100:100", "e101:101"}, nil}, + + // parse error prevents capturing unrecognized keys + {"1:1;u:V", ns, ns, nil, strconv.ErrSyntax}, + {"X:1;u:V", ns, ns, nil, strconv.ErrSyntax}, + {"x:1;u:V", ns, ns, []string{"x:1", "u:V"}, nil}, + + // r-value + {"rv:22222222222222;extra:stuff", "22222222222222", ns, []string{"extra:stuff"}, nil}, + {"extra:stuff;rv:22222222222222", "22222222222222", ns, []string{"extra:stuff"}, nil}, + {"rv:ffffffffffffff", "ffffffffffffff", ns, nil, nil}, + + // r-value range error (15 bytes of hex or more) + {"rv:100000000000000", ns, ns, nil, ErrRValueSize}, + {"rv:fffffffffffffffff", ns, ns, nil, ErrRValueSize}, + + // no trailing ; + {"x:1;", ns, ns, nil, strconv.ErrSyntax}, + + // empty key + {"x:", ns, ns, []string{"x:"}, nil}, + + // charset test + {"x:0X1FFF;y:.-_-.;z:", ns, ns, []string{"x:0X1FFF", "y:.-_-.", "z:"}, nil}, + {"x1y2z3:1-2-3;y1:y_1;xy:-;th:50", ns, "50", []string{"x1y2z3:1-2-3", "y1:y_1", "xy:-"}, nil}, + + // size exceeded + {"x:" + strings.Repeat("_", 255), ns, ns, nil, ErrTraceStateSize}, + {"x:" + strings.Repeat("_", 254), ns, ns, []string{"x:" + strings.Repeat("_", 254)}, nil}, + } { + t.Run(testName(test.in), func(t *testing.T) { + otts, err := NewOpenTelemetryTraceState(test.in) + + if test.expectErr != nil { + require.True(t, errors.Is(err, test.expectErr), "%q: not expecting %v wanted %v", test.in, err, test.expectErr) + } else { + require.NoError(t, err) + } + require.Equal(t, test.rval, otts.RValue()) + require.Equal(t, test.tval, otts.TValue()) + var expect []KV + for _, ex := range test.extra { + k, v, _ := strings.Cut(ex, ":") + expect = append(expect, KV{ + Key: k, + Value: v, + }) + } + require.Equal(t, expect, otts.ExtraValues()) + + if test.expectErr != nil { + return + } + // on success Serialize() should not modify + // test by re-parsing + var w strings.Builder + require.NoError(t, otts.Serialize(&w)) + cpy, err := NewOpenTelemetryTraceState(w.String()) + require.NoError(t, err) + require.Equal(t, otts, cpy) + }) + } +} + +func TestUpdateTValueWithSampling(t *testing.T) { + type testCase struct { + // The input otel tracestate; no error conditions tested + in string + + // The incoming adjusted count; defined whether + // t-value is present or not. + adjCountIn float64 + + // the update probability; threshold and tvalue are + // derived from this + prob float64 + + // when update error is expected + updateErr error + + // output t-value + out string + + // output adjusted count + adjCountOut float64 + } + for _, test := range []testCase{ + // 8/16 in, sampled at 2/16 (smaller prob) => adjCount 8 + {"th:8", 2, 0x2p-4, nil, "th:e", 8}, + + // 8/16 in, sampled at 14/16 (larger prob) => error, adjCount 2 + {"th:8", 2, 0xep-4, ErrInconsistentSampling, "th:8", 2}, + + // 1/16 in, 50% update (larger prob) => (error) + {"th:f", 16, 0x8p-4, ErrInconsistentSampling, "th:f", 16}, + + // 1/1 sampling in, 1/16 update + {"th:0", 1, 0x1p-4, nil, "th:f", 16}, + + // no t-value in, 1/16 update + {"", 0, 0x1p-4, nil, "th:f", 16}, + + // none in, 100% update + {"", 0, 1, nil, "th:0", 1}, + + // 1/2 in, 100% update (error) + {"th:8", 2, 1, ErrInconsistentSampling, "th:8", 2}, + + // 1/1 in, 0x1p-56 update + {"th:0", 1, 0x1p-56, nil, "th:ffffffffffffff", 0x1p56}, + + // 1/1 in, 0x1p-56 update + {"th:0", 1, 0x1p-56, nil, "th:ffffffffffffff", 0x1p56}, + + // 2/3 in, 1/3 update. Note that 0x555 + 0xaab = 0x1000. + {"th:555", 1 / (1 - 0x555p-12), 0x555p-12, nil, "th:aab", 1 / (1 - 0xaabp-12)}, + } { + t.Run(test.in+"/"+test.out, func(t *testing.T) { + otts := OpenTelemetryTraceState{} + if test.in != "" { + var err error + otts, err = NewOpenTelemetryTraceState(test.in) + require.NoError(t, err) + } + + require.Equal(t, test.adjCountIn, otts.AdjustedCount()) + + newTh, err := ProbabilityToThreshold(test.prob) + require.NoError(t, err) + + upErr := otts.UpdateTValueWithSampling(newTh) + + require.Equal(t, test.updateErr, upErr) + + var outData strings.Builder + err = otts.Serialize(&outData) + require.NoError(t, err) + require.Equal(t, test.out, outData.String()) + + require.Equal(t, test.adjCountOut, otts.AdjustedCount()) + }) + } +} diff --git a/pkg/sampling/probability.go b/pkg/sampling/probability.go new file mode 100644 index 000000000000..1aeebdd86021 --- /dev/null +++ b/pkg/sampling/probability.go @@ -0,0 +1,82 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sampling // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling" + +import ( + "errors" + "math" +) + +// ErrProbabilityRange is returned when a value should be in the range [1/MaxAdjustedCount, 1]. +var ErrProbabilityRange = errors.New("sampling probability out of the range [1/MaxAdjustedCount, 1]") + +// MinSamplingProbability is the smallest representable probability +// and is the inverse of MaxAdjustedCount. +const MinSamplingProbability = 1.0 / float64(MaxAdjustedCount) + +// probabilityInRange tests MinSamplingProb <= prob <= 1. +func probabilityInRange(prob float64) bool { + return prob >= MinSamplingProbability && prob <= 1 +} + +// ProbabilityToThreshold converts a probability to a Threshold. It +// returns an error when the probability is out-of-range. +func ProbabilityToThreshold(prob float64) (Threshold, error) { + return ProbabilityToThresholdWithPrecision(prob, NumHexDigits) +} + +// ProbabilityToThresholdWithPrecision is like ProbabilityToThreshold +// with support for reduced precision. The `precision` argument determines +// how many significant hex digits will be used to encode the exact +// probability. +func ProbabilityToThresholdWithPrecision(fraction float64, precision int) (Threshold, error) { + // Assume full precision at 0. + if precision == 0 { + precision = NumHexDigits + } + if !probabilityInRange(fraction) { + return AlwaysSampleThreshold, ErrProbabilityRange + } + // Special case for prob == 1. + if fraction == 1 { + return AlwaysSampleThreshold, nil + } + + // Calculate the amount of precision needed to encode the + // threshold with reasonable precision. Here, we count the + // number of leading `0` or `f` characters and automatically + // add precision to preserve relative error near the extremes. + // + // Frexp() normalizes both the fraction and one-minus the + // fraction, because more digits of precision are needed if + // either value is near zero. Frexp returns an exponent <= 0. + // + // If `exp <= -4`, there will be a leading hex `0` or `f`. + // For every multiple of -4, another leading `0` or `f` + // appears, so this raises precision accordingly. + _, expF := math.Frexp(fraction) + _, expR := math.Frexp(1 - fraction) + precision = min(NumHexDigits, max(precision+expF/-hexBits, precision+expR/-hexBits)) + + // Compute the threshold + scaled := uint64(math.Round(fraction * float64(MaxAdjustedCount))) + threshold := MaxAdjustedCount - scaled + + // Round to the specified precision, if less than the maximum. + if shift := hexBits * (NumHexDigits - precision); shift != 0 { + half := uint64(1) << (shift - 1) + threshold += half + threshold >>= shift + threshold <<= shift + } + + return Threshold{ + unsigned: threshold, + }, nil +} + +// Probability is the sampling ratio in the range [MinSamplingProb, 1]. +func (t Threshold) Probability() float64 { + return float64(MaxAdjustedCount-t.unsigned) / float64(MaxAdjustedCount) +} diff --git a/pkg/sampling/probability_test.go b/pkg/sampling/probability_test.go new file mode 100644 index 000000000000..1d843753af69 --- /dev/null +++ b/pkg/sampling/probability_test.go @@ -0,0 +1,292 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sampling // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling" + +import ( + "fmt" + "math" + "testing" + + "github.com/stretchr/testify/require" +) + +// ExampleProbabilityToThresholdWithPrecision demonstrates how 1/3, +// 2/3, and 3/3 are encoded with precision 3. When working with +// arbitrary floating point values, it is recommended to use an +// explicit precision parameter so that T-values are both reasonably +// compact and accurate. +func ExampleProbabilityToThresholdWithPrecision() { + const divisor = 3.0 + const precision = 3 + + for dividend := 1.0; dividend <= divisor; dividend++ { + tval, _ := ProbabilityToThresholdWithPrecision(dividend/divisor, precision) + fmt.Println(tval.TValue()) + } + + // Output: + // aab + // 555 + // 0 +} + +// ExampleProbabilityToThreshold_rounding demonstrates that with full +// precision, the resulting t-value appears to round in an unexpected +// way. +func ExampleProbabilityToThreshold_rounding() { + // 1/3 sampling corresponds with a rejection threshold of (1 - 1/3). + const exampleProb = 1.0 / 3.0 + + // 1/3 in decimal is the repeating fraction of 6 (0.333333), while in + // hexadecimal it is the repeating fraction of a (0x0.555555). + tval, _ := ProbabilityToThreshold(exampleProb) + + // Note the trailing hex "c" below, which does not match + // intuition for a repeating pattern of hex "a" digits. Why + // is the final digit not hex "b"? The reason it is hex "c" + // is that ProbabilityToThreshold computes the number of spans + // selected as a 56-bit integer using a 52-bit significand. + // Because the fraction uses fewer bits than the threshold, + // the last digit rounds down, with 0x55555555555554 spans + // rejected out of 0x100000000000000. The subtraction of 0x4 + // from 0x10 leads to a trailing hex "c". + fmt.Println(tval.TValue()) + + // Output: + // aaaaaaaaaaaaac +} + +// ExampleProbabilityToThreshold_limitedprecision demonstrates the +// gap between Threshold values and probability values is not equal, +// clarifying which conversions are lossy. +func ExampleProbabilityToThreshold_limitedprecision() { + next := func(x float64, n int) float64 { + for ; n < 0; n++ { + x = math.Nextafter(x, 0) + } + return x + } + + // At probability 50% or above, only 52 bits of precision are + // available for floating point representation. + // + // In the range 1/2 to 1: 52 bits of precision are available; 4 trailing zero bits; + // In the range 1/4 to 1/2: 52 bits of precision are available; 3 trailing zero bits; + // In the range 1/8 to 1/4: 52 bits of precision are available; 2 trailing zero bits; + // In the range 1/16 to 1/8: 52 bits of precision are available; 1 trailing zero bits; + // Probabilties less than 1/16: 51 bits of precision are available + // Probabilties less than 1/32: 50 bits of precision are available. + // ... + // Probabilties less than 0x1p-N: 55-N bits of precision are available. + // ... + // Probabilities less than 0x1p-55: 0 bits of precision. + const large = 15.0 / 16 + const half = 8.0 / 16 + const quarter = 4.0 / 16 + const eighth = 2.0 / 16 + const small = 1.0 / 16 + for _, prob := range []float64{ + // Values from 1/2 to 15/16: last T-value digit always "8". + next(large, 0), + next(large, -1), + next(large, -2), + next(large, -3), + 0, + // Values from 1/4 to 1/2: last T-value digit always + // "4", "8", or "c". + next(half, 0), + next(half, -1), + next(half, -2), + next(half, -3), + 0, + // Values from 1/8 to 1/4, last T-value digit can be any + // even hex digit. + next(quarter, 0), + next(quarter, -1), + next(quarter, -2), + next(quarter, -3), + 0, + // Values from 1/16 to 1/8: Every adjacent probability + // value maps to an exact Threshold. + next(eighth, 0), + next(eighth, -1), + next(eighth, -2), + next(eighth, -3), + 0, + // Values less than 1/16 demonstrate lossy behavior. + // Here probability values can express more values + // than Thresholds can, so multiple probability values + // map to the same Threshold. Here, 1/16 and the next + // descending floating point value both map to T-value + // "f". + next(small, 0), + next(small, -1), + next(small, -2), + next(small, -3), + } { + if prob == 0 { + fmt.Println("--") + continue + } + tval, _ := ProbabilityToThreshold(prob) + fmt.Println(tval.TValue()) + } + + // Output: + // 1 + // 10000000000008 + // 1000000000001 + // 10000000000018 + // -- + // 8 + // 80000000000004 + // 80000000000008 + // 8000000000000c + // -- + // c + // c0000000000002 + // c0000000000004 + // c0000000000006 + // -- + // e + // e0000000000001 + // e0000000000002 + // e0000000000003 + // -- + // f + // f + // f0000000000001 + // f0000000000001 +} + +// ExampleProbabilityToThreshold_verysmall shows the smallest +// expressible sampling probability values. +func ExampleProbabilityToThreshold_verysmall() { + for _, prob := range []float64{ + MinSamplingProbability, // Skip 1 out of 2**56 + 0x2p-56, // Skip 2 out of 2**56 + 0x3p-56, // Skip 3 out of 2**56 + 0x4p-56, // Skip 4 out of 2**56 + 0x8p-56, // Skip 8 out of 2**56 + 0x10p-56, // Skip 0x10 out of 2**56 + } { + // Note that precision is automatically raised for + // such small probabilities, because leading 'f' and + // '0' digits are discounted. + tval, _ := ProbabilityToThresholdWithPrecision(prob, 3) + fmt.Println(tval.TValue()) + } + + // Output: + // ffffffffffffff + // fffffffffffffe + // fffffffffffffd + // fffffffffffffc + // fffffffffffff8 + // fffffffffffff +} + +func TestProbabilityToThresholdWithPrecision(t *testing.T) { + type kase struct { + prob float64 + exact string + rounded []string + } + + for _, test := range []kase{ + // Note: remember 8 is half of 16: hex rounds up at 8+, down at 7-. + { + 1 - 0x456789ap-28, + "456789a", + []string{ + "45678a", + "45679", + "4568", + "456", + "45", + "4", + }, + }, + // Add 3 leading zeros + { + 1 - 0x456789ap-40, + "000456789a", + []string{ + "00045678a", + "00045679", + "0004568", + "000456", + "00045", + "0004", + }, + }, + // Rounding up + { + 1 - 0x789abcdefp-40, + "0789abcdef", + []string{ + "0789abcdef", + "0789abcdf", + "0789abce", + "0789abd", + "0789ac", + "0789b", + "078a", + "079", + "08", + }, + }, + // Rounding down + { + 1 - 0x12345678p-32, + "12345678", + []string{ + "1234568", + "123456", + "12345", + "1234", + "123", + "12", + "1", + }, + }, + // Zeros + { + 1 - 0x80801p-28, + "0080801", + []string{ + "00808", + "008", + }, + }, + // 100% sampling + { + 1, + "0", + []string{ + "0", + }, + }, + } { + t.Run(test.exact, func(t *testing.T) { + th, err := ProbabilityToThreshold(test.prob) + require.NoError(t, err) + require.Equal(t, th.TValue(), test.exact) + + for _, round := range test.rounded { + t.Run(round, func(t *testing.T) { + // Requested precision is independent of leading zeros, + // so strip them to calculate test precision. + strip := round + for len(strip) > 0 && strip[0] == '0' { + strip = strip[1:] + } + rth, err := ProbabilityToThresholdWithPrecision(test.prob, len(strip)) + require.NoError(t, err) + require.Equal(t, round, rth.TValue()) + }) + } + }) + } +} diff --git a/pkg/sampling/randomness.go b/pkg/sampling/randomness.go new file mode 100644 index 000000000000..8e1cac2f0fcb --- /dev/null +++ b/pkg/sampling/randomness.go @@ -0,0 +1,116 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sampling // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling" + +import ( + "encoding/binary" + "errors" + "strconv" + + "go.opentelemetry.io/collector/pdata/pcommon" +) + +// numRandomnessValues equals MaxAdjustedCount--this variable has been +// introduced to improve readability. Recall that MaxAdjustedCount is +// 2**56 which is one greater than the maximum RValue +// ("ffffffffffffff", i.e., "100000000000000"). +const numRandomnessValues = MaxAdjustedCount + +// ErrRValueSize is returned by RValueToRandomess in case of +// unexpected size. +var ErrRValueSize = errors.New("r-value must have 14 hex digits") + +// leastHalfTraceIDThresholdMask is the mask to use on the +// least-significant half of the TraceID, i.e., bytes 8-15. +// Because this is a 56 bit mask, the result after masking is +// the unsigned value of bytes 9 through 15. +// +// This helps extract 56 bits of randomness from the second half of +// the TraceID, as specified in https://www.w3.org/TR/trace-context-2/#randomness-of-trace-id +const leastHalfTraceIDThresholdMask = MaxAdjustedCount - 1 + +// AllProbabilitiesRandomness is sampled at all probabilities. +var AllProbabilitiesRandomness = Randomness{unsigned: numRandomnessValues - 1} + +// Randomness may be derived from R-value or TraceID. +// +// Randomness contains 56 bits of randomness, derived in one of two ways, see: +// https://www.w3.org/TR/trace-context-2/#randomness-of-trace-id +type Randomness struct { + // unsigned is in the range [0, MaxAdjustedCount-1] + unsigned uint64 +} + +// TraceIDToRandomness returns randomness from a TraceID (assumes +// the traceparent random flag was set). +func TraceIDToRandomness(id pcommon.TraceID) Randomness { + // To get the 56 bits we want, take the second half of the trace ID, + leastHalf := binary.BigEndian.Uint64(id[8:]) + return Randomness{ + // Then apply the mask to get the least-significant 56 bits / 7 bytes. + // Equivalently stated: zero the most-significant 8 bits. + unsigned: leastHalf & leastHalfTraceIDThresholdMask, + } +} + +// RValueToRandomness parses NumHexDigits hex bytes into a Randomness. +func RValueToRandomness(s string) (Randomness, error) { + if len(s) != NumHexDigits { + return Randomness{}, ErrRValueSize + } + + unsigned, err := strconv.ParseUint(s, hexBase, 64) + if err != nil { + return Randomness{}, err + } + + return Randomness{ + unsigned: unsigned, + }, nil +} + +// RValue formats the r-value encoding. +func (rnd Randomness) RValue() string { + // The important part here is to format a full 14-byte hex + // string, including leading zeros. We could accomplish the + // same with custom code or with fmt.Sprintf directives, but + // here we let strconv.FormatUint fill in leading zeros, as + // follows: + // + // Format (numRandomnessValues+Randomness) as a hex string + // Strip the leading hex digit, which is a "1" by design + // + // For example, a randomness that requires two leading zeros + // (all in hexadecimal): + // + // randomness is 7 bytes: aabbccddeeff + // numRandomnessValues is 2^56: 100000000000000 + // randomness+numRandomnessValues: 100aabbccddeeff + // strip the leading "1": 00aabbccddeeff + // + // If the value is out-of-range, the empty string will be + // returned. + if rnd.unsigned >= numRandomnessValues { + return "" + } + return strconv.FormatUint(numRandomnessValues+rnd.unsigned, hexBase)[1:] +} + +// Unsigned returns the unsigned representation of the random value. +// Items of data SHOULD be sampled when: +// +// Threshold.Unsigned() <= // Randomness.Unsigned(). +func (rnd Randomness) Unsigned() uint64 { + return rnd.unsigned +} + +// UnsignedToRandomness constructs a randomness using 56 random bits +// of unsigned number. If the input is out of range, an invalid value +// will be returned with an error. +func UnsignedToRandomness(x uint64) (Randomness, error) { + if x >= MaxAdjustedCount { + return AllProbabilitiesRandomness, ErrRValueSize + } + return Randomness{unsigned: x}, nil +} diff --git a/pkg/sampling/randomness_test.go b/pkg/sampling/randomness_test.go new file mode 100644 index 000000000000..9d4a164b6509 --- /dev/null +++ b/pkg/sampling/randomness_test.go @@ -0,0 +1,51 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sampling // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling" + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +func TestExplicitRandomness(t *testing.T) { + const val uint64 = 0x80000000000000 + rv, err := UnsignedToRandomness(val) + require.NoError(t, err) + require.Equal(t, val, rv.Unsigned()) + + rv, err = UnsignedToRandomness(MaxAdjustedCount) + require.Equal(t, err, ErrRValueSize) + require.Equal(t, AllProbabilitiesRandomness.Unsigned(), rv.Unsigned()) +} + +func ExampleTraceIDToRandomness() { + // TraceID represented in hex as "abababababababababd29d6a7215ced0" + var exampleTid = pcommon.TraceID{ + // 9 meaningless bytes + 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, + // 7 bytes randomness + 0xd2, 0x9d, 0x6a, 0x72, 0x15, 0xce, 0xd0, + } + rnd := TraceIDToRandomness(exampleTid) + + fmt.Printf("TraceIDToRandomness(%q).RValue() = %s", exampleTid, rnd.RValue()) + + // Output: TraceIDToRandomness("abababababababababd29d6a7215ced0").RValue() = d29d6a7215ced0 +} + +func ExampleRValueToRandomness() { + // Any 14 hex digits is a valid R-value. + const exampleRvalue = "d29d6a7215ced0" + + // This converts to the internal unsigned integer representation. + rnd, _ := RValueToRandomness(exampleRvalue) + + // The result prints the same as the input. + fmt.Printf("RValueToRandomness(%q).RValue() = %s", exampleRvalue, rnd.RValue()) + + // Output: RValueToRandomness("d29d6a7215ced0").RValue() = d29d6a7215ced0 +} diff --git a/pkg/sampling/threshold.go b/pkg/sampling/threshold.go new file mode 100644 index 000000000000..044fef736d5b --- /dev/null +++ b/pkg/sampling/threshold.go @@ -0,0 +1,156 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sampling // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling" + +import ( + "errors" + "strconv" + "strings" +) + +const ( + // MaxAdjustedCount is 2^56 i.e. 0x100000000000000 i.e., 1<<56. + MaxAdjustedCount uint64 = 1 << 56 + + // NumHexDigits is the number of hex digits equalling 56 bits. + // This is the limit of sampling precision. + NumHexDigits = 56 / hexBits + + hexBits = 4 + hexBase = 16 +) + +// Threshold represents an exact sampling probability using 56 bits of +// precision. A Threshold expresses the number of spans, out of 2**56, +// that are rejected. +// +// These 56 bits are compared against 56 bits of randomness, either +// extracted from an R-value or a TraceID having the W3C-specified +// randomness bit set. +// +// Because Thresholds store 56 bits of information and floating point +// values store 52 bits of significand, some conversions between +// Threshold and probability values are lossy. The kinds of loss that +// occur depend on where in the probability scale it happens, as the +// step between adjacent floating point values adjusts with the exponent. +type Threshold struct { + // unsigned is in the range [0, MaxAdjustedCount] + // - 0 represents always sampling (0 Random values are less-than) + // - 1 represents sampling 1-in-(MaxAdjustedCount-1) + // - MaxAdjustedCount represents always sampling 1-in- + unsigned uint64 +} + +var ( + // ErrTValueSize is returned for t-values longer than NumHexDigits hex digits. + ErrTValueSize = errors.New("t-value exceeds 14 hex digits") + + // ErrEmptyTValue indicates no t-value was found, i.e., no threshold available. + ErrTValueEmpty = errors.New("t-value is empty") + + // AlwaysSampleThreshold represents 100% sampling. + AlwaysSampleThreshold = Threshold{unsigned: 0} + + // NeverSampledThreshold is a threshold value that will always not sample. + // The TValue() corresponding with this threshold is an empty string. + NeverSampleThreshold = Threshold{unsigned: MaxAdjustedCount} +) + +// TValueToThreshold returns a Threshold. Because TValue strings +// have trailing zeros omitted, this function performs the reverse. +func TValueToThreshold(s string) (Threshold, error) { + if len(s) > NumHexDigits { + return AlwaysSampleThreshold, ErrTValueSize + } + if len(s) == 0 { + return AlwaysSampleThreshold, ErrTValueEmpty + } + + // Having checked length above, there are no range errors + // possible. Parse the hex string to an unsigned value. + unsigned, err := strconv.ParseUint(s, hexBase, 64) + if err != nil { + return AlwaysSampleThreshold, err // e.g. parse error + } + + // The unsigned value requires shifting to account for the + // trailing zeros that were omitted by the encoding (see + // TValue for the reverse). Compute the number to shift by: + extendByHexZeros := NumHexDigits - len(s) + return Threshold{ + unsigned: unsigned << (hexBits * extendByHexZeros), + }, nil +} + +// UnsignedToThreshold constructs a threshold expressed in terms +// defined by number of rejections out of MaxAdjustedCount, which +// equals the number of randomness values. +func UnsignedToThreshold(unsigned uint64) (Threshold, error) { + if unsigned >= MaxAdjustedCount { + return NeverSampleThreshold, ErrTValueSize + } + return Threshold{unsigned: unsigned}, nil +} + +// TValue encodes a threshold, which is a variable-length hex string +// up to 14 characters. The empty string is returned for 100% +// sampling. +func (th Threshold) TValue() string { + // Always-sample is a special case because TrimRight() below + // will trim it to the empty string, which represents no t-value. + switch th { + case AlwaysSampleThreshold: + return "0" + case NeverSampleThreshold: + return "" + } + // For thresholds other than the extremes, format a full-width + // (14 digit) unsigned value with leading zeros, then, remove + // the trailing zeros. Use the logic for (Randomness).RValue(). + digits := Randomness(th).RValue() + + // Remove trailing zeros. + return strings.TrimRight(digits, "0") +} + +// ShouldSample returns true when the span passes this sampler's +// consistent sampling decision. The sampling decision can be +// expressed as a T <= R. +func (th Threshold) ShouldSample(rnd Randomness) bool { + return th.unsigned <= rnd.unsigned +} + +// Unsigned expresses the number of Randomness values (out of +// MaxAdjustedCount) that are rejected or not sampled. 0 means 100% +// sampling. +func (th Threshold) Unsigned() uint64 { + return th.unsigned +} + +// AdjustedCount returns the adjusted count for this item, which is +// the representativity of the item due to sampling, equal to the +// inverse of sampling probability. If the threshold equals +// NeverSampleThreshold, the item should not have been sampled, in +// which case the Adjusted count is zero. +// +// This term is defined here: +// https://opentelemetry.io/docs/specs/otel/trace/tracestate-probability-sampling/ +func (th Threshold) AdjustedCount() float64 { + if th == NeverSampleThreshold { + return 0 + } + return 1.0 / th.Probability() +} + +// ThresholdGreater allows direct comparison of Threshold values. +// Greater thresholds equate with smaller sampling probabilities. +func ThresholdGreater(a, b Threshold) bool { + return a.unsigned > b.unsigned +} + +// ThresholdLessThan allows direct comparison of Threshold values. +// Smaller thresholds equate with greater sampling probabilities. +func ThresholdLessThan(a, b Threshold) bool { + return a.unsigned < b.unsigned +} diff --git a/pkg/sampling/threshold_test.go b/pkg/sampling/threshold_test.go new file mode 100644 index 000000000000..f05fb1033f23 --- /dev/null +++ b/pkg/sampling/threshold_test.go @@ -0,0 +1,87 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sampling // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling" + +import ( + "encoding/hex" + "fmt" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +func TestExplicitThreshold(t *testing.T) { + const val uint64 = 0x80000000000000 + th, err := UnsignedToThreshold(val) + require.NoError(t, err) + require.Equal(t, val, th.Unsigned()) + + th, err = UnsignedToThreshold(MaxAdjustedCount) + require.Equal(t, err, ErrTValueSize) + require.Equal(t, MaxAdjustedCount, th.Unsigned()) + + // Note: the input is more out-of-range than above, test th == + // NeverSampleThreshold. + th, err = UnsignedToThreshold(MaxAdjustedCount + 10) + require.Equal(t, err, ErrTValueSize) + require.Equal(t, NeverSampleThreshold, th) +} + +// ExampleTValueToThreshold demonstrates how to convert a T-value +// string to a Threshold value. +func ExampleTValueToThreshold() { + // "c" corresponds with rejecting 3/4 traces (or 0xc out of + // 0x10), which is 25% sampling. + const exampleTvalue = "c" + + tval, _ := TValueToThreshold(exampleTvalue) + + fmt.Printf("Probability(%q) = %f", exampleTvalue, tval.Probability()) + + // Output: + // Probability("c") = 0.250000 +} + +// ExampleTValueToThreshold demonstrates how to calculate whether a +// Threshold, calculated from a T-value, should be sampled at a given +// probability. +func ExampleThreshold_ShouldSample() { + const exampleTvalue = "c" + const exampleRvalue = "d29d6a7215ced0" + + tval, _ := TValueToThreshold(exampleTvalue) + rval, _ := RValueToRandomness(exampleRvalue) + + fmt.Printf("TValueToThreshold(%q).ShouldSample(RValueToRandomness(%q) = %v", + tval.TValue(), rval.RValue(), tval.ShouldSample(rval)) + + // Output: + // TValueToThreshold("c").ShouldSample(RValueToRandomness("d29d6a7215ced0") = true +} + +// ExampleTValueToThreshold_traceid demonstrates how to calculate whether a +// Threshold, calculated from a T-value, should be sampled at a given +// probability. +func ExampleThreshold_ShouldSample_traceid() { + const exampleTvalue = "c" + + // The leading 9 bytes (18 hex digits) of the TraceID string + // are not used, only the trailing 7 bytes (14 hex digits, + // i.e., 56 bits) are used. Here, the dont-care digits are + // set to 0xab and the R-value is "bd29d6a7215ced0". + const exampleHexTraceID = "abababababababababd29d6a7215ced0" + var tid pcommon.TraceID + idbytes, _ := hex.DecodeString(exampleHexTraceID) + copy(tid[:], idbytes) + + tval, _ := TValueToThreshold(exampleTvalue) + rval := TraceIDToRandomness(tid) + + fmt.Printf("TValueToThreshold(%q).ShouldSample(TraceIDToRandomness(%q) = %v", + tval.TValue(), exampleHexTraceID, tval.ShouldSample(rval)) + + // Output: + // TValueToThreshold("c").ShouldSample(TraceIDToRandomness("abababababababababd29d6a7215ced0") = true +} diff --git a/pkg/sampling/w3ctracestate.go b/pkg/sampling/w3ctracestate.go new file mode 100644 index 000000000000..a0ebac614d6a --- /dev/null +++ b/pkg/sampling/w3ctracestate.go @@ -0,0 +1,177 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sampling // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling" + +import ( + "io" + "regexp" + "strconv" + "strings" +) + +// W3CTraceState represents the a parsed W3C `tracestate` header. +// +// This type receives and passes through `tracestate` fields defined +// by all vendors, while it parses and validates the +// [OpenTelemetryTraceState] field. After parsing the W3CTraceState, +// access the OpenTelemetry-defined fields using +// [W3CTraceState.OTelValue]. +type W3CTraceState struct { + // commonTraceState holds "extra" values (e.g., + // vendor-specific tracestate fields) which are propagated but + // not used by Sampling logic. + commonTraceState + + // otts stores OpenTelemetry-specified tracestate fields. + otts OpenTelemetryTraceState +} + +const ( + hardMaxNumPairs = 32 + hardMaxW3CLength = 1024 + hardMaxKeyLength = 256 + hardMaxTenantLength = 241 + hardMaxSystemLength = 14 + + otelVendorCode = "ot" + + // keyRegexp is not an exact test, it permits all the + // characters and then we check various conditions. + + // key = simple-key / multi-tenant-key + // simple-key = lcalpha 0*255( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ) + // multi-tenant-key = tenant-id "@" system-id + // tenant-id = ( lcalpha / DIGIT ) 0*240( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ) + // system-id = lcalpha 0*13( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ) + // lcalpha = %x61-7A ; a-z + + lcAlphaRegexp = `[a-z]` + lcAlphanumPunctRegexp = `[a-z0-9\-\*/_]` + lcAlphanumRegexp = `[a-z0-9]` + multiTenantSep = `@` + tenantIDRegexp = lcAlphanumRegexp + lcAlphanumPunctRegexp + `*` + systemIDRegexp = lcAlphaRegexp + lcAlphanumPunctRegexp + `*` + multiTenantKeyRegexp = tenantIDRegexp + multiTenantSep + systemIDRegexp + simpleKeyRegexp = lcAlphaRegexp + lcAlphanumPunctRegexp + `*` + keyRegexp = `(?:(?:` + simpleKeyRegexp + `)|(?:` + multiTenantKeyRegexp + `))` + + // value = 0*255(chr) nblk-chr + // nblk-chr = %x21-2B / %x2D-3C / %x3E-7E + // chr = %x20 / nblk-chr + // + // Note the use of double-quoted strings in two places below. + // This is for \x expansion in these two cases. Also note + // \x2d is a hyphen character, so a quoted \ (i.e., \\\x2d) + // appears below. + valueNonblankCharRegexp = "[\x21-\x2b\\\x2d-\x3c\x3e-\x7e]" + valueCharRegexp = "[\x20-\x2b\\\x2d-\x3c\x3e-\x7e]" + valueRegexp = valueCharRegexp + `{0,255}` + valueNonblankCharRegexp + + // tracestate = list-member 0*31( OWS "," OWS list-member ) + // list-member = (key "=" value) / OWS + + owsCharSet = ` \t` + owsRegexp = `(?:[` + owsCharSet + `]*)` + w3cMemberRegexp = `(?:` + keyRegexp + `=` + valueRegexp + `)?` + + w3cOwsMemberOwsRegexp = `(?:` + owsRegexp + w3cMemberRegexp + owsRegexp + `)` + w3cCommaOwsMemberOwsRegexp = `(?:` + `,` + w3cOwsMemberOwsRegexp + `)` + + w3cTracestateRegexp = `^` + w3cOwsMemberOwsRegexp + w3cCommaOwsMemberOwsRegexp + `*$` + + // Note that fixed limits on tracestate size are captured above + // as '*' regular expressions, which allows the parser to exceed + // fixed limits, which are checked in code. This keeps the size + // of the compiled regexp reasonable. Some of the regexps above + // are too complex to expand e.g., 31 times. In the case of + // w3cTracestateRegexp, 32 elements are allowed, which means we + // want the w3cCommaOwsMemberOwsRegexp element to match at most + // 31 times, but this is checked in code. +) + +var ( + w3cTracestateRe = regexp.MustCompile(w3cTracestateRegexp) + + w3cSyntax = keyValueScanner{ + maxItems: hardMaxNumPairs, + trim: true, + separator: ',', + equality: '=', + } +) + +// NewW3CTraceState parses a W3C trace state, with special attention +// to the embedded OpenTelemetry trace state field. +func NewW3CTraceState(input string) (w3c W3CTraceState, _ error) { + if len(input) > hardMaxW3CLength { + return w3c, ErrTraceStateSize + } + + if !w3cTracestateRe.MatchString(input) { + return w3c, strconv.ErrSyntax + } + + err := w3cSyntax.scanKeyValues(input, func(key, value string) error { + if len(key) > hardMaxKeyLength { + return ErrTraceStateSize + } + if tenant, system, found := strings.Cut(key, multiTenantSep); found { + if len(tenant) > hardMaxTenantLength { + return ErrTraceStateSize + } + if len(system) > hardMaxSystemLength { + return ErrTraceStateSize + } + } + switch key { + case otelVendorCode: + var err error + w3c.otts, err = NewOpenTelemetryTraceState(value) + return err + default: + w3c.kvs = append(w3c.kvs, KV{ + Key: key, + Value: value, + }) + return nil + } + }) + return w3c, err +} + +// HasAnyValue indicates whether there are any values in this +// tracestate, including extra values. +func (w3c *W3CTraceState) HasAnyValue() bool { + return w3c.OTelValue().HasAnyValue() || len(w3c.ExtraValues()) != 0 +} + +// OTelValue returns the OpenTelemetry tracestate value. +func (w3c *W3CTraceState) OTelValue() *OpenTelemetryTraceState { + return &w3c.otts +} + +// Serialize encodes this tracestate object for use as a W3C +// tracestate header value. +func (w3c *W3CTraceState) Serialize(w io.StringWriter) error { + ser := serializer{writer: w} + cnt := 0 + sep := func() { + if cnt != 0 { + ser.write(",") + } + cnt++ + } + if w3c.otts.HasAnyValue() { + sep() + ser.write("ot=") + ser.check(w3c.otts.Serialize(w)) + } + for _, kv := range w3c.ExtraValues() { + sep() + ser.write(kv.Key) + ser.write("=") + ser.write(kv.Value) + } + return ser.err +} diff --git a/pkg/sampling/w3ctracestate_test.go b/pkg/sampling/w3ctracestate_test.go new file mode 100644 index 000000000000..02eccf35c01b --- /dev/null +++ b/pkg/sampling/w3ctracestate_test.go @@ -0,0 +1,161 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sampling + +import ( + "errors" + "fmt" + "strconv" + "strings" + "testing" + + "github.com/stretchr/testify/require" +) + +// ExampleW3CTraceState_Serialize shows how to parse and print a W3C +// tracestate. +func ExampleW3CTraceState() { + // This tracestate value encodes two sections, "ot" from + // OpenTelemetry and "zz" from a vendor. + w3c, err := NewW3CTraceState("ot=th:c;rv:d29d6a7215ced0;pn:abc,zz=vendorcontent") + if err != nil { + panic(err) + } + ot := w3c.OTelValue() + + fmt.Println("T-Value:", ot.TValue()) + fmt.Println("R-Value:", ot.RValue()) + fmt.Println("OTel Extra:", ot.ExtraValues()) + fmt.Println("Other Extra:", w3c.ExtraValues()) + + // Output: + // T-Value: c + // R-Value: d29d6a7215ced0 + // OTel Extra: [{pn abc}] + // Other Extra: [{zz vendorcontent}] +} + +// ExampleW3CTraceState_Serialize shows how to modify and serialize a +// new W3C tracestate. +func ExampleW3CTraceState_Serialize() { + w3c, err := NewW3CTraceState("") + if err != nil { + panic(err) + } + // Suppose a parent context was unsampled, the child span has + // been sampled at 25%. The child's context should carry the + // T-value of "c", serialize as "ot=th:c". + th, err := ProbabilityToThreshold(0.25) + if err != nil { + panic(err) + } + + // The update uses both the Threshold and its encoded string + // value, since in some code paths the Threshold will have + // just been parsed from a T-value, and in other code paths + // the T-value will be precalculated. + err = w3c.OTelValue().UpdateTValueWithSampling(th) + if err != nil { + panic(err) + } + + var buf strings.Builder + err = w3c.Serialize(&buf) + if err != nil { + panic(err) + } + + fmt.Println(buf.String()) + + // Output: + // ot=th:c +} + +func TestParseW3CTraceState(t *testing.T) { + type testCase struct { + in string + rval string + tval string + extra map[string]string + expectErr error + } + const ns = "" + for _, test := range []testCase{ + // correct cases, with various whitespace + {"ot=th:1", ns, "1", nil, nil}, + {" ot=th:1 ", ns, "1", nil, nil}, + {" ot=th:1,other=value ", ns, "1", map[string]string{ + "other": "value", + }, nil}, + {",,,", ns, ns, nil, nil}, + {" , ot=th:1, , other=value ", ns, "1", map[string]string{ + "other": "value", + }, nil}, + {"ot=th:100;rv:abcdabcdabcdff", "abcdabcdabcdff", "100", nil, nil}, + {" ot=th:100;rv:abcdabcdabcdff", "abcdabcdabcdff", "100", nil, nil}, + {"ot=th:100;rv:abcdabcdabcdff ", "abcdabcdabcdff", "100", nil, nil}, + {"ot=rv:11111111111111", "11111111111111", ns, nil, nil}, + {"ot=rv:ffffffffffffff,unknown=value,other=something", "ffffffffffffff", ns, map[string]string{ + "other": "something", + "unknown": "value", + }, nil}, + + // syntax errors + {"-1=2", ns, ns, nil, strconv.ErrSyntax}, // invalid key char + {"=", ns, ns, nil, strconv.ErrSyntax}, // invalid empty key + + // size errors + {strings.Repeat("x", hardMaxKeyLength+1) + "=v", ns, ns, nil, ErrTraceStateSize}, // too long simple key + {strings.Repeat("x", hardMaxTenantLength+1) + "@y=v", ns, ns, nil, ErrTraceStateSize}, // too long multitenant-id + {"y@" + strings.Repeat("x", hardMaxSystemLength+1) + "=v", ns, ns, nil, ErrTraceStateSize}, // too long system-id + {"x=" + strings.Repeat("y", hardMaxW3CLength-1), ns, ns, nil, ErrTraceStateSize}, + {strings.Repeat("x=y,", hardMaxNumPairs) + "x=y", ns, ns, nil, ErrTraceStateSize}, + } { + t.Run(testName(test.in), func(t *testing.T) { + w3c, err := NewW3CTraceState(test.in) + + if test.expectErr != nil { + require.True(t, errors.Is(err, test.expectErr), + "%q: not expecting %v wanted %v", test.in, err, test.expectErr, + ) + } else { + require.NoError(t, err, "%q", test.in) + } + if test.rval != ns { + require.True(t, w3c.OTelValue().HasAnyValue()) + require.True(t, w3c.HasAnyValue()) + require.Equal(t, test.rval, w3c.OTelValue().RValue()) + } else { + require.Equal(t, "", w3c.OTelValue().RValue()) + } + if test.tval != ns { + require.True(t, w3c.OTelValue().HasAnyValue()) + require.True(t, w3c.HasAnyValue()) + require.NotEqual(t, "", w3c.OTelValue().TValue()) + require.Equal(t, test.tval, w3c.OTelValue().TValue()) + } else { + require.Equal(t, "", w3c.OTelValue().TValue()) + } + if test.extra != nil { + require.True(t, w3c.HasAnyValue()) + actual := map[string]string{} + for _, kv := range w3c.ExtraValues() { + actual[kv.Key] = kv.Value + } + require.Equal(t, test.extra, actual) + } + + if test.expectErr != nil { + return + } + // on success Serialize() should not modify + // test by re-parsing + var w strings.Builder + require.NoError(t, w3c.Serialize(&w)) + cpy, err := NewW3CTraceState(w.String()) + require.NoError(t, err, "with %v", w.String()) + require.Equal(t, w3c, cpy, "with %v", w.String()) + }) + } +} diff --git a/pkg/stanza/adapter/benchmark_test.go b/pkg/stanza/adapter/benchmark_test.go index 13aa91f123d0..19d825cd5078 100644 --- a/pkg/stanza/adapter/benchmark_test.go +++ b/pkg/stanza/adapter/benchmark_test.go @@ -109,7 +109,9 @@ func BenchmarkEndToEnd(b *testing.B) { } } -const benchType = "bench" +const benchTypeStr = "bench" + +var benchType = component.MustNewType(benchTypeStr) type BenchConfig struct { BaseConfig @@ -139,18 +141,18 @@ func (f BenchReceiverType) InputConfig(cfg component.Config) operator.Config { } func init() { - operator.Register(benchType, func() operator.Builder { return NewBenchOpConfig() }) + operator.Register(benchTypeStr, func() operator.Builder { return NewBenchOpConfig() }) } // NewBenchOpConfig creates a new benchmarking operator config with default values func NewBenchOpConfig() *BenchOpConfig { - return NewBenchOpConfigWithID(benchType) + return NewBenchOpConfigWithID(benchTypeStr) } // NewBenchOpConfigWithID creates a new noop operator config with default values func NewBenchOpConfigWithID(operatorID string) *BenchOpConfig { return &BenchOpConfig{ - InputConfig: helper.NewInputConfig(operatorID, benchType), + InputConfig: helper.NewInputConfig(operatorID, benchTypeStr), } } diff --git a/pkg/stanza/adapter/converter.go b/pkg/stanza/adapter/converter.go index ada2d75823b1..d5d95215a647 100644 --- a/pkg/stanza/adapter/converter.go +++ b/pkg/stanza/adapter/converter.go @@ -148,19 +148,35 @@ func (c *Converter) workerLoop() { } resourceHashToIdx := make(map[uint64]int) + scopeIdxByResource := make(map[uint64]map[string]int) pLogs := plog.NewLogs() var sl plog.ScopeLogs + for _, e := range entries { resourceID := HashResource(e.Resource) + var rl plog.ResourceLogs + resourceIdx, ok := resourceHashToIdx[resourceID] if !ok { resourceHashToIdx[resourceID] = pLogs.ResourceLogs().Len() - rl := pLogs.ResourceLogs().AppendEmpty() + + rl = pLogs.ResourceLogs().AppendEmpty() upsertToMap(e.Resource, rl.Resource().Attributes()) + + scopeIdxByResource[resourceID] = map[string]int{e.ScopeName: 0} sl = rl.ScopeLogs().AppendEmpty() + sl.Scope().SetName(e.ScopeName) } else { - sl = pLogs.ResourceLogs().At(resourceIdx).ScopeLogs().At(0) + rl = pLogs.ResourceLogs().At(resourceIdx) + scopeIdxInResource, ok := scopeIdxByResource[resourceID][e.ScopeName] + if !ok { + scopeIdxByResource[resourceID][e.ScopeName] = rl.ScopeLogs().Len() + sl = rl.ScopeLogs().AppendEmpty() + sl.Scope().SetName(e.ScopeName) + } else { + sl = pLogs.ResourceLogs().At(resourceIdx).ScopeLogs().At(scopeIdxInResource) + } } convertInto(e, sl.LogRecords().AppendEmpty()) } diff --git a/pkg/stanza/adapter/converter_test.go b/pkg/stanza/adapter/converter_test.go index baf775fe39ab..5199fe391cbf 100644 --- a/pkg/stanza/adapter/converter_test.go +++ b/pkg/stanza/adapter/converter_test.go @@ -89,6 +89,53 @@ func complexEntriesForNDifferentHosts(count int, n int) []*entry.Entry { return ret } +func complexEntriesForNDifferentHostsMDifferentScopes(count int, n int, m int) []*entry.Entry { + ret := make([]*entry.Entry, count) + for i := 0; i < count; i++ { + for j := 0; j < m; j++ { + e := entry.New() + e.Severity = entry.Error + e.Resource = map[string]any{ + "host": fmt.Sprintf("host-%d", i%n), + "bool": true, + "int": 123, + "double": 12.34, + "string": "hello", + "object": map[string]any{ + "bool": true, + "int": 123, + "double": 12.34, + "string": "hello", + }, + } + e.Body = map[string]any{ + "bool": true, + "int": 123, + "double": 12.34, + "string": "hello", + "bytes": []byte("asdf"), + "object": map[string]any{ + "bool": true, + "int": 123, + "double": 12.34, + "string": "hello", + "bytes": []byte("asdf"), + "object": map[string]any{ + "bool": true, + "int": 123, + "double": 12.34, + "string": "hello", + "bytes": []byte("asdf"), + }, + }, + } + e.ScopeName = fmt.Sprintf("scope-%d", i%m) + ret[i] = e + } + } + return ret +} + func complexEntry() *entry.Entry { e := entry.New() e.Severity = entry.Error @@ -320,6 +367,70 @@ func TestHashResource(t *testing.T) { } } +func TestAllConvertedEntriesScopeGrouping(t *testing.T) { + t.Parallel() + + testcases := []struct { + numberOFScopes int + logsPerScope int + scopeName string + }{ + { + numberOFScopes: 1, + logsPerScope: 100, + }, + { + numberOFScopes: 2, + logsPerScope: 50, + }, + } + + for i, tc := range testcases { + tc := tc + + t.Run(strconv.Itoa(i), func(t *testing.T) { + t.Parallel() + + converter := NewConverter(zap.NewNop()) + converter.Start() + defer converter.Stop() + + go func() { + entries := complexEntriesForNDifferentHostsMDifferentScopes(100, 1, tc.numberOFScopes) + assert.NoError(t, converter.Batch(entries)) + }() + + var ( + timeoutTimer = time.NewTimer(10 * time.Second) + ch = converter.OutChannel() + ) + defer timeoutTimer.Stop() + + select { + case pLogs, ok := <-ch: + if !ok { + break + } + + rLogs := pLogs.ResourceLogs() + rLog := rLogs.At(0) + + ills := rLog.ScopeLogs() + require.Equal(t, ills.Len(), tc.numberOFScopes) + + for i := 0; i < tc.numberOFScopes; i++ { + sl := ills.At(i) + require.Equal(t, sl.Scope().Name(), fmt.Sprintf("scope-%d", i%tc.numberOFScopes)) + require.Equal(t, sl.LogRecords().Len(), tc.logsPerScope) + } + + case <-timeoutTimer.C: + break + } + }) + } +} + func TestAllConvertedEntriesAreSentAndReceived(t *testing.T) { t.Parallel() diff --git a/pkg/stanza/adapter/factory.go b/pkg/stanza/adapter/factory.go index 34907b3d3951..5cdd7c9bfbc5 100644 --- a/pkg/stanza/adapter/factory.go +++ b/pkg/stanza/adapter/factory.go @@ -35,7 +35,7 @@ func NewFactory(logReceiverType LogReceiverType, sl component.StabilityLevel) rc func createLogsReceiver(logReceiverType LogReceiverType) rcvr.CreateLogsFunc { return func( - ctx context.Context, + _ context.Context, params rcvr.CreateSettings, cfg component.Config, nextConsumer consumer.Logs, diff --git a/pkg/stanza/adapter/integration_test.go b/pkg/stanza/adapter/integration_test.go index ec31ff723019..eaa9fcaf8dd1 100644 --- a/pkg/stanza/adapter/integration_test.go +++ b/pkg/stanza/adapter/integration_test.go @@ -36,7 +36,7 @@ func createNoopReceiver(nextConsumer consumer.Logs) (*receiver, error) { return nil, err } - receiverID := component.NewID("test") + receiverID := component.MustNewID("test") obsrecv, err := receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{ ReceiverID: receiverID, ReceiverCreateSettings: receivertest.NewNopCreateSettings(), @@ -46,7 +46,7 @@ func createNoopReceiver(nextConsumer consumer.Logs) (*receiver, error) { } return &receiver{ - id: component.NewID("testReceiver"), + id: component.MustNewID("testReceiver"), pipe: pipe, emitter: emitter, consumer: nextConsumer, @@ -96,6 +96,45 @@ func BenchmarkEmitterToConsumer(b *testing.B) { } } +func BenchmarkEmitterToConsumerScopeGroupping(b *testing.B) { + const ( + entryCount = 1_000_000 + hostsCount = 2 + scopesCount = 2 + ) + + var ( + entries = complexEntriesForNDifferentHostsMDifferentScopes(entryCount, hostsCount, scopesCount) + ) + + cl := &consumertest.LogsSink{} + logsReceiver, err := createNoopReceiver(cl) + require.NoError(b, err) + + err = logsReceiver.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(b, err) + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + cl.Reset() + + go func() { + ctx := context.Background() + for _, e := range entries { + _ = logsReceiver.emitter.Process(ctx, e) + } + }() + + require.Eventually(b, + func() bool { + return cl.LogRecordCount() == entryCount + }, + 30*time.Second, 5*time.Millisecond, "Did not receive all logs (only received %d)", cl.LogRecordCount(), + ) + } +} + func TestEmitterToConsumer(t *testing.T) { const ( entryCount = 1_000 @@ -110,6 +149,7 @@ func TestEmitterToConsumer(t *testing.T) { err = logsReceiver.Start(context.Background(), componenttest.NewNopHost()) require.NoError(t, err) + defer func() { require.NoError(t, logsReceiver.Shutdown(context.Background())) }() go func() { ctx := context.Background() diff --git a/pkg/stanza/adapter/mocks_test.go b/pkg/stanza/adapter/mocks_test.go index 71c6362f3e77..c2854bb50960 100644 --- a/pkg/stanza/adapter/mocks_test.go +++ b/pkg/stanza/adapter/mocks_test.go @@ -56,7 +56,9 @@ func (o *UnstartableOperator) Process(_ context.Context, _ *entry.Entry) error { return nil } -const testType = "test" +const testTypeStr = "test" + +var testType = component.MustNewType(testTypeStr) type TestConfig struct { BaseConfig `mapstructure:",squash"` diff --git a/pkg/stanza/adapter/package_test.go b/pkg/stanza/adapter/package_test.go new file mode 100644 index 000000000000..23f61a5be546 --- /dev/null +++ b/pkg/stanza/adapter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package adapter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/adapter/receiver_test.go b/pkg/stanza/adapter/receiver_test.go index c137a9244d5b..5dce972694bf 100644 --- a/pkg/stanza/adapter/receiver_test.go +++ b/pkg/stanza/adapter/receiver_test.go @@ -151,7 +151,7 @@ func BenchmarkReadLine(b *testing.B) { storageClient := storagetest.NewInMemoryClient( component.KindReceiver, - component.NewID("foolog"), + component.MustNewID("foolog"), "test", ) @@ -216,7 +216,7 @@ func BenchmarkParseAndMap(b *testing.B) { storageClient := storagetest.NewInMemoryClient( component.KindReceiver, - component.NewID("foolog"), + component.MustNewID("foolog"), "test", ) diff --git a/pkg/stanza/adapter/register.go b/pkg/stanza/adapter/register.go index 0197e6d58943..8105ef17d587 100644 --- a/pkg/stanza/adapter/register.go +++ b/pkg/stanza/adapter/register.go @@ -8,6 +8,7 @@ import ( _ "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/stdout" _ "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/csv" _ "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/json" + _ "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/jsonarray" _ "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/keyvalue" _ "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/regex" _ "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/scope" @@ -17,6 +18,7 @@ import ( _ "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/trace" _ "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/uri" _ "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/add" + _ "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/assignkeys" _ "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/copy" _ "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/filter" _ "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/flatten" diff --git a/pkg/stanza/adapter/storage_test.go b/pkg/stanza/adapter/storage_test.go index 4848edc1629d..4a3d2faf1267 100644 --- a/pkg/stanza/adapter/storage_test.go +++ b/pkg/stanza/adapter/storage_test.go @@ -77,6 +77,7 @@ func TestFindCorrectStorageExtension(t *testing.T) { err := r.Start(context.Background(), host) require.NoError(t, err) require.NotNil(t, r.storageClient) + defer func() { require.NoError(t, r.Shutdown(context.Background())) }() clientCreatorID, err := storagetest.CreatorID(context.Background(), r.storageClient) require.NoError(t, err) @@ -84,7 +85,7 @@ func TestFindCorrectStorageExtension(t *testing.T) { } func TestFailOnMissingStorageExtension(t *testing.T) { - id := component.NewIDWithName("test", "missing") + id := component.MustNewIDWithName("test", "missing") r := createReceiver(t, id) err := r.Start(context.Background(), storagetest.NewStorageHost()) require.Error(t, err) diff --git a/pkg/stanza/attrs/attrs.go b/pkg/stanza/attrs/attrs.go deleted file mode 100644 index 8ef87327ac84..000000000000 --- a/pkg/stanza/attrs/attrs.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attrs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/attrs" - -const ( - LogFileName = "log.file.name" - LogFilePath = "log.file.path" - LogFileNameResolved = "log.file.name_resolved" - LogFilePathResolved = "log.file.path_resolved" -) diff --git a/pkg/stanza/docs/operators/README.md b/pkg/stanza/docs/operators/README.md index 69b42906df53..3ee3744a6f72 100644 --- a/pkg/stanza/docs/operators/README.md +++ b/pkg/stanza/docs/operators/README.md @@ -18,6 +18,7 @@ Inputs: Parsers: - [csv_parser](./csv_parser.md) - [json_parser](./json_parser.md) +- [json_array_parser](./json_array_parser.md) - [regex_parser](./regex_parser.md) - [scope_name_parser](./scope_name_parser.md) - [syslog_parser](./syslog_parser.md) @@ -43,3 +44,4 @@ General purpose: - [retain](./retain.md) - [router](./router.md) - [unquote](./unquote.md) +- [assign_keys](./assign_keys.md) diff --git a/pkg/stanza/docs/operators/add.md b/pkg/stanza/docs/operators/add.md index e45952bdfaf4..f9da77315119 100644 --- a/pkg/stanza/docs/operators/add.md +++ b/pkg/stanza/docs/operators/add.md @@ -22,7 +22,7 @@ Add a string to the body ```yaml - type: add field: body.key2 - value: body.val2 + value: val2 ``` @@ -91,7 +91,7 @@ Add a value to the body using an expression "attributes": { }, "body": { "key1": "val1", - "key2": "val_suffix" + "key2": "val1_suffix" } } ``` @@ -135,7 +135,7 @@ Add an object to the body "body": { "key1": "val1", "key2": { - "nestedkey":"nested value" + "nestedkey":"nestedvalue" } } } diff --git a/pkg/stanza/docs/operators/assign_keys.md b/pkg/stanza/docs/operators/assign_keys.md new file mode 100644 index 000000000000..57a90f3bfa0a --- /dev/null +++ b/pkg/stanza/docs/operators/assign_keys.md @@ -0,0 +1,99 @@ +## `assign_keys` operator + +The `assign_keys` assigns keys from the configuration to an input list. the output is a map containing these key-value pairs + +### Configuration Fields + +| Field | Default | Description | +| --- | --- | --- | +| `id` | `assign_keys` | A unique identifier for the operator. | +| `output` | Next in pipeline | The connected operator(s) that will receive all outbound entries. | +| `field` | required | The [field](../types/field.md) to assign keys to. | +| `keys` | required | The list of strings to be used as the keys to the input list's values. Its length is expected to be equal to the length of the values list from field. In case there is a mismatch, an error will result. | +| `on_error` | `send` | The behavior of the operator if it encounters an error. See [on_error](../types/on_error.md). | +| `if` | | An [expression](../types/expression.md) that, when set, will be evaluated to determine whether this operator should be used for the given entry. This allows you to do easy conditional parsing without branching logic with routers. | + +### Example Configurations: + +
+Assign keys to a list in body +
+
+ +```yaml +- type: assign_keys + field: body + keys: ["foo", "bar", "charlie", "foxtrot"] +``` + +
+ + + + + +
Input Entry Output Entry
+ +```json +{ + "body": [1, "debug", "Debug Message", true] +} +``` + + + +```json + { + "body": { + "foo": 1, + "bar": "debug", + "charlie": "Debug Message", + "foxtrot": true, + } + } +``` + +
+
+Assign keys to a list in an attributes field +
+
+ +```yaml +- type: assign_keys + field: attributes.input + keys: ["foo", "bar"] +``` + + + + + + + +
Input Entry Output Entry
+ +```json +{ + "attributes": { + "input": [1, "debug"], + "field2": "unchanged", + } +} +``` + + + +```json +{ + "attributes": { + "input": { + "foo": 1, + "bar": "debug", + }, + "field2": "unchanged", + } +} +``` + +
\ No newline at end of file diff --git a/pkg/stanza/docs/operators/file_input.md b/pkg/stanza/docs/operators/file_input.md index a2b93f56db2f..fadfe71852d6 100644 --- a/pkg/stanza/docs/operators/file_input.md +++ b/pkg/stanza/docs/operators/file_input.md @@ -18,6 +18,8 @@ The `file_input` operator reads logs from files. It will place the lines read in | `include_file_path` | `false` | Whether to add the file path as the attribute `log.file.path`. | | `include_file_name_resolved` | `false` | Whether to add the file name after symlinks resolution as the attribute `log.file.name_resolved`. | | `include_file_path_resolved` | `false` | Whether to add the file path after symlinks resolution as the attribute `log.file.path_resolved`. | +| `include_file_owner_name` | `false` | Whether to add the file owner name as the attribute `log.file.owner.name`. Not supported for windows. | +| `include_file_owner_group_name` | `false` | Whether to add the file group name as the attribute `log.file.owner.group.name`. Not supported for windows. | | `preserve_leading_whitespaces` | `false` | Whether to preserve leading whitespaces. | | `preserve_trailing_whitespaces` | `false` | Whether to preserve trailing whitespaces. | | `start_at` | `end` | At startup, where to start reading logs from the file. Options are `beginning` or `end`. This setting will be ignored if previously read file offsets are retrieved from a persistence mechanism. | 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/docs/operators/json_array_parser.md b/pkg/stanza/docs/operators/json_array_parser.md new file mode 100644 index 000000000000..734fed54b560 --- /dev/null +++ b/pkg/stanza/docs/operators/json_array_parser.md @@ -0,0 +1,170 @@ +## `json_array_parser` operator + +The `json_array_parser` operator parses the string-type field selected by `parse_from` assumed to be of a json array format into a list. +A JArray string (or a json array string) is a string that represents a JSON array. A JSON array is a type of data structure that is used to store data in a structured way. It consists of an ordered list of values that can be either strings, numbers, objects, or even other arrays. +#### Examples: +a simple json array string with strictly strings in it: +``` +"[\"Foo\", \"Bar\", \"Charlie\"]" +``` + +json array after parsing: +```json +["Foo", "Bar", "Charlie"] +``` + +a more complex json array string with different types in it without nested objects: +``` +"[\"Hello\", 42, true, null]" +``` + +json array after parsing: +```json +["Hello", 42, true, null] +``` + +a more complex json array string with different types in it with nested objects: +``` +"[\"Hello\", 42, {\"name\": \"Alice\", \"age\": 25}, [1, 2, 3], true, null]" +``` + +json array after parsing: +```json +["Hello", 42, {"name": "Alice", "age": 25}, [1, 2, 3], true, null] +``` + +Notice that for this example, the current parser will parse every nested object as a string and so the result is actually this - +```json +["Hello", 42, "{\"name\": \"Alice\", \"age\": 25}", "[1, 2, 3]", true, null] +``` + +More information on json arrays can be found [here](https://json-schema.org/understanding-json-schema/reference/array) + + +### Configuration Fields + +| Field | Default | Description | +|--------------------|------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| +| `id` | `json_array_parser` | A unique identifier for the operator. | +| `output` | Next in pipeline | The connected operator(s) that will receive all outbound entries. | +| `header` | optional | A string of comma delimited field names. When a header is set, the output will be a map containing the header fields as keys and the parsed input json array fields as matching values | +| `parse_from` | `body` | The [field](../types/field.md) from which the value will be parsed. | +| `parse_to` | required. can be one of `body` or a nested field inside `body`, `attributes` or `resource` (ie `attributes.parsed`). When a header is used, `attributes` is also valid | The [field](../types/field.md) to which the value will be parsed. | +| `on_error` | `send` | The behavior of the operator if it encounters an error. See [on_error](../types/on_error.md). | +| `timestamp` | `nil` | An optional [timestamp](../types/timestamp.md) block which will parse a timestamp field before passing the entry to the output operator. | +| `severity` | `nil` | An optional [severity](../types/severity.md) block which will parse a severity field before passing the entry to the output operator. | + +### Embedded Operations + +The `json_array_parser` can be configured to embed certain operations such as timestamp and severity parsing. For more information, see [complex parsers](../types/parsers.md#complex-parsers). + +### Example Configurations + +#### Parse the field `body` with a json array parser into an attributes field + +Configuration: + +```yaml +- type: json_array_parser + parse_from: body + parse_to: attributes.output +``` + + + + + + + +
Input Entry Output Entry
+ +```json +{ + "body": "[1,\"debug\",\"Debug Message\", true]" +} +``` + + + +```json +{ + "attributes": { + "output": [1, "debug", "Debug Message", true] + } +} +``` + +
+ +#### Parse the field `body` with a json array parser + +Configuration: + +```yaml +- type: json_array_parser + parse_to: body +``` + + + + + + + +
Input Entry Output Entry
+ +```json +{ + "body": "[1,\"debug\",\"Debug Message\", true]" +} +``` + + + +```json +{ + "body": [1, "debug", "Debug Message", true] +} +``` + +
+ +#### Parse the field `body` with a json array parser and a header into attributes + +Configuration: + +```yaml +- type: json_array_parser + parse_to: attributes + header: origin,sev,message,isBool +``` + + + + + + + +
Input Entry Output Entry
+ +```json +{ + "body": "[1,\"debug\",\"Debug Message\", true]" +} +``` + + + +```json +{ + "body": "[1,\"debug\",\"Debug Message\", true]", + "attributes": { + "origin": 1, + "sev": "debug", + "message": "Debug Message", + "isBool": true, + } +} +``` + +
\ No newline at end of file diff --git a/pkg/stanza/docs/operators/recombine.md b/pkg/stanza/docs/operators/recombine.md index 56b483fb914a..c0632dcc67fe 100644 --- a/pkg/stanza/docs/operators/recombine.md +++ b/pkg/stanza/docs/operators/recombine.md @@ -14,7 +14,7 @@ The `recombine` operator combines consecutive logs into single logs based on sim | `combine_field` | required | The [field](../types/field.md) from all the entries that will recombined. | | `combine_with` | `"\n"` | The string that is put between the combined entries. This can be an empty string as well. When using special characters like `\n`, be sure to enclose the value in double quotes: `"\n"`. | | `max_batch_size` | 1000 | The maximum number of consecutive entries that will be combined into a single entry. | -| `overwrite_with` | `oldest` | Whether to use the fields from the `oldest` or the `newest` entry for all the fields that are not combined. | +| `overwrite_with` | `newest` | Whether to use the fields from the `oldest` or the `newest` entry for all the fields that are not combined. | | `force_flush_period` | `5s` | Flush timeout after which entries will be flushed aborting the wait for their sub parts to be merged with. | | `source_identifier` | `$attributes["file.path"]` | The [field](../types/field.md) to separate one source of logs from others when combining them. | | `max_sources` | 1000 | The maximum number of unique sources allowed concurrently to be tracked for combining separately. | diff --git a/pkg/stanza/docs/operators/regex_parser.md b/pkg/stanza/docs/operators/regex_parser.md index 01eef7e59dec..9b29401209ff 100644 --- a/pkg/stanza/docs/operators/regex_parser.md +++ b/pkg/stanza/docs/operators/regex_parser.md @@ -4,7 +4,7 @@ The `regex_parser` operator parses the string-type field selected by `parse_from #### Regex Syntax -This operator makes use of [Go regular expression](https://github.com/google/re2/wiki/Syntax). When writing a regex, consider using a tool such as (regex101)[https://regex101.com/?flavor=golang]. +This operator makes use of [Go regular expression](https://github.com/google/re2/wiki/Syntax). When writing a regex, consider using a tool such as [regex101](https://regex101.com/?flavor=golang). ### Configuration Fields diff --git a/pkg/stanza/docs/operators/syslog_parser.md b/pkg/stanza/docs/operators/syslog_parser.md index 4606c5fa3d45..1445a02c74f1 100644 --- a/pkg/stanza/docs/operators/syslog_parser.md +++ b/pkg/stanza/docs/operators/syslog_parser.md @@ -14,6 +14,7 @@ The `syslog_parser` operator parses the string-type field selected by `parse_fro | `protocol` | required | The protocol to parse the syslog messages as. Options are `rfc3164` and `rfc5424`. | | `location` | `UTC` | The geographic location (timezone) to use when parsing the timestamp (Syslog RFC 3164 only). The available locations depend on the local IANA Time Zone database. [This page](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) contains many examples, such as `America/New_York`. | | `enable_octet_counting` | `false` | Wether or not to enable [RFC 6587](https://www.rfc-editor.org/rfc/rfc6587#section-3.4.1) Octet Counting on syslog parsing (Syslog RFC 5424 only). | +| `allow_skip_pri_header` | `false` | Allow parsing records without the PRI header. If this setting is enabled, messages without the PRI header will be successfully parsed. The `severity` and `severity_text` fields as well as the `priority` and `facility` attributes will not be set. If this setting is disabled (the default), messages without PRI header will throw an exception. To set this setting to `true`, the `enable_octet_counting` setting must be `false`.| | `non_transparent_framing_trailer` | `nil` | The framing trailer, either `LF` or `NUL`, when using [RFC 6587](https://www.rfc-editor.org/rfc/rfc6587#section-3.4.2) Non-Transparent-Framing (Syslog RFC 5424 only). | | `timestamp` | `nil` | An optional [timestamp](../types/timestamp.md) block which will parse a timestamp field before passing the entry to the output operator | | `severity` | `nil` | An optional [severity](../types/severity.md) block which will parse a severity field before passing the entry to the output operator | diff --git a/pkg/stanza/docs/types/expression.md b/pkg/stanza/docs/types/expression.md index d56d03732daa..9ae6bf078f7f 100644 --- a/pkg/stanza/docs/types/expression.md +++ b/pkg/stanza/docs/types/expression.md @@ -4,7 +4,7 @@ Expressions give the config flexibility by allowing dynamic business logic rules Most notably, expressions can be used to route log records and add new fields based on the contents of the log entry being processed. -For reference documentation of the expression language, see [here](https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md). +For reference documentation of the expression language, see [here](https://github.com/expr-lang/expr/blob/master/docs/language-definition.md). Available to the expressions are a few special variables: - `body` contains the entry's body diff --git a/pkg/stanza/docs/types/timestamp.md b/pkg/stanza/docs/types/timestamp.md index e7a50eade1d8..a7442203ee4f 100644 --- a/pkg/stanza/docs/types/timestamp.md +++ b/pkg/stanza/docs/types/timestamp.md @@ -13,6 +13,71 @@ If a timestamp block is specified, the parser operator will perform the timestam | `layout` | required | The exact layout of the timestamp to be parsed. | | `location` | `Local` | The geographic location (timezone) to use when parsing a timestamp that does not include a timezone. The available locations depend on the local IANA Time Zone database. [This page](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) contains many examples, such as `America/New_York`. | +## Layout Types + +### `strptime` and `gotime` + +The `strptime` layout type approximates familiar strptime/strftime formats. See the table below for a list of supported directives. + +The `gotime` layout type uses Golang's native time parsing capabilities. Golang takes an [unconventional approach](https://www.pauladamsmith.com/blog/2011/05/go_time.html) to time parsing. Finer details are documented [here](https://golang.org/src/time/format.go?s=25102:25148#L9). + +| `strptime` directive | `gotime` equivalent | Description | +| --- | --- | --- | +| `%Y` | `2006` | Year, zero-padded (0001, 0002, ..., 2019, 2020, ..., 9999) | +| `%y` | `06` | Year, last two digits, zero-padded (01, ..., 99) | +| `%m` | `01` | Month as a decimal number (01, 02, ..., 12) | +| `%o` | `_1` | Month as a space-padded number ( 1, 2, ..., 12) | +| `%q` | `1` | Month as a unpadded number (1,2,...,12) | +| `%b` | `Jan` | Abbreviated month name (Jan, Feb, ...) | +| `%B` | `January` | Full month name (January, February, ...) | +| `%d` | `02` | Day of the month, zero-padded (01, 02, ..., 31) | +| `%e` | `_2` | Day of the month, space-padded ( 1, 2, ..., 31) | +| `%g` | `2` | Day of the month, unpadded (1,2,...,31) | +| `%a` | `Mon` | Abbreviated weekday name (Sun, Mon, ...) | +| `%A` | `Monday` | Full weekday name (Sunday, Monday, ...) | +| `%H` | `15` | Hour (24-hour clock) as a zero-padded decimal number (00, ..., 24) | +| `%I` | `3` | Hour (12-hour clock) as a zero-padded decimal number (00, ..., 12) | +| `%l` | `03` | Hour (12-hour clock: 0, ..., 12) | +| `%p` | `PM` | Locale’s equivalent of either AM or PM | +| `%P` | `pm` | Locale’s equivalent of either am or pm | +| `%M` | `04` | Minute, zero-padded (00, 01, ..., 59) | +| `%S` | `05` | Second as a zero-padded decimal number (00, 01, ..., 59) | +| `%L` | `999` | Millisecond as a decimal number, zero-padded on the left (000, 001, ..., 999) | +| `%f` | `999999` | Microsecond as a decimal number, zero-padded on the left (000000, ..., 999999) | +| `%s` | `99999999` | Nanosecond as a decimal number, zero-padded on the left (000000, ..., 999999) | +| `%Z` | `MST` | Timezone name or abbreviation or empty (UTC, EST, CST) | +| `%z` | `Z0700` | UTC offset in the form ±HHMM[SS[.ffffff]] or empty(+0000, -0400) | +| `%i` | `-07` | UTC offset in the form ±HH or empty(+00, -04) | +| `%j` | `-07:00` | UTC offset in the form ±HH:MM or empty(+00:00, -04:00) | +| `%k` | `-07:00:00` | UTC offset in the form ±HH:MM:SS or empty(+00:00:00, -04:00:00) | +| `%D` | `01/02/2006` | Short MM/DD/YY date, equivalent to `%m/%d/%y` | +| `%F` | `2006-01-02` | Short YYYY-MM-DD date, equivalent to `%Y-%m-%d` | +| `%T` | `15:04:05` | ISO 8601 time format (HH:MM:SS), equivalent to `%H:%M:%S` | +| `%r` | `03:04:05 pm` | 12-hour clock time, equivalent to `%l:%M:%S %p` | +| `%c` | `Mon Jan 02 15:04:05 2006` | Date and time representation, equivalent to `%a %b %d %H:%M:%S %Y` | +| `%R` | `15:04` | 24-hour HH:MM time, equivalent to `%H:%M` | +| `%n` | `\n` | New-line character | +| `%t` | `\t` | Horizontal-tab character | +| `%%` | `%` | Percent sign | + +### `epoch` + +The `epoch` layout type uses can consume epoch-based timestamps. The following layouts are supported: + +| Layout | Meaning | Example | `parse_from` data type support | +| --- | --- | --- | --- | +| `s` | Seconds since the epoch | 1136214245 | `string`, `int64`, `float64` | +| `ms` | Milliseconds since the epoch | 1136214245123 | `string`, `int64`, `float64` | +| `us` | Microseconds since the epoch | 1136214245123456 | `string`, `int64`, `float64` | +| `ns` | Nanoseconds since the epoch | 1136214245123456789 | `string`, `int64`, `float64`[2] | +| `s.ms` | Seconds plus milliseconds since the epoch | 1136214245.123 | `string`, `int64`[1], `float64` | +| `s.us` | Seconds plus microseconds since the epoch | 1136214245.123456 | `string`, `int64`[1], `float64` | +| `s.ns` | Seconds plus nanoseconds since the epoch | 1136214245.123456789 | `string`, `int64`[1], `float64`[2] | + +[1] Interpretted as seconds. Equivalent to using `s` layout.
+[2] Due to floating point precision limitations, loss of up to 100ns may be expected. + + ### How to specify timestamp parsing parameters ```yaml @@ -145,8 +210,6 @@ but you could also use a `timestamp` block inside the `json_parser`. #### Parse a timestamp using a `strptime` layout -The default `layout_type` is `strptime`, which uses "directives" such as `%Y` (4-digit year) and `%H` (2-digit hour). A full list of supported directives is found [here](../../../../internal/coreinternal/timeutils/internal/ctimefmt/ctimefmt.go#L68). - Configuration: ```yaml - type: time_parser @@ -187,8 +250,6 @@ Configuration: #### Parse a timestamp using a `gotime` layout -The `gotime` layout type uses Golang's native time parsing capabilities. Golang takes an [unconventional approach](https://www.pauladamsmith.com/blog/2011/05/go_time.html) to time parsing. Finer details are well-documented [here](https://golang.org/src/time/format.go?s=25102:25148#L9). - Configuration: ```yaml - type: time_parser @@ -229,23 +290,6 @@ Configuration: #### Parse a timestamp using an `epoch` layout -The `epoch` layout type uses can consume epoch-based timestamps. The following layouts are supported: - -| Layout | Meaning | Example | `parse_from` data type support | -| --- | --- | --- | --- | -| `s` | Seconds since the epoch | 1136214245 | `string`, `int64`, `float64` | -| `ms` | Milliseconds since the epoch | 1136214245123 | `string`, `int64`, `float64` | -| `us` | Microseconds since the epoch | 1136214245123456 | `string`, `int64`, `float64` | -| `ns` | Nanoseconds since the epoch | 1136214245123456789 | `string`, `int64`, `float64`[2] | -| `s.ms` | Seconds plus milliseconds since the epoch | 1136214245.123 | `string`, `int64`[1], `float64` | -| `s.us` | Seconds plus microseconds since the epoch | 1136214245.123456 | `string`, `int64`[1], `float64` | -| `s.ns` | Seconds plus nanoseconds since the epoch | 1136214245.123456789 | `string`, `int64`[1], `float64`[2] | - -[1] Interpretted as seconds. Equivalent to using `s` layout.
-[2] Due to floating point precision limitations, loss of up to 100ns may be expected. - - - Configuration: ```yaml - type: time_parser diff --git a/pkg/stanza/entry/package_test.go b/pkg/stanza/entry/package_test.go new file mode 100644 index 000000000000..286a2ea4c4f2 --- /dev/null +++ b/pkg/stanza/entry/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package entry + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/errors/error_test.go b/pkg/stanza/errors/error_test.go index c7caa515c16e..b8b270d7e3c8 100644 --- a/pkg/stanza/errors/error_test.go +++ b/pkg/stanza/errors/error_test.go @@ -89,7 +89,7 @@ func TestMarshalLogObject(t *testing.T) { out, err := enc.EncodeEntry(entry, fields) require.NoError(t, err) - expected := `{"level":"debug","ts":-6795364578.8713455,"logger":"testlogger","msg":"Got an error","error":{"description":"Test error"}}` + "\n" + expected := `{"level":"debug","logger":"testlogger","msg":"Got an error","error":{"description":"Test error"}}` + "\n" require.Equal(t, expected, out.String()) }) @@ -98,7 +98,7 @@ func TestMarshalLogObject(t *testing.T) { out, err := enc.EncodeEntry(entry, fields) require.NoError(t, err) - expected := `{"level":"debug","ts":-6795364578.8713455,"logger":"testlogger","msg":"Got an error","error":{"description":"Test error","suggestion":"Fix it","details":{"foo":"bar"}}}` + "\n" + expected := `{"level":"debug","logger":"testlogger","msg":"Got an error","error":{"description":"Test error","suggestion":"Fix it","details":{"foo":"bar"}}}` + "\n" require.Equal(t, expected, out.String()) }) } diff --git a/pkg/stanza/errors/package_test.go b/pkg/stanza/errors/package_test.go new file mode 100644 index 000000000000..b2126218306a --- /dev/null +++ b/pkg/stanza/errors/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package errors + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/fileconsumer/attrs/attrs.go b/pkg/stanza/fileconsumer/attrs/attrs.go new file mode 100644 index 000000000000..0b174a97a812 --- /dev/null +++ b/pkg/stanza/fileconsumer/attrs/attrs.go @@ -0,0 +1,72 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package attrs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/attrs" + +import ( + "fmt" + "os" + "path/filepath" + "runtime" +) + +const ( + LogFileName = "log.file.name" + LogFilePath = "log.file.path" + LogFileNameResolved = "log.file.name_resolved" + LogFilePathResolved = "log.file.path_resolved" + LogFileOwnerName = "log.file.owner.name" + LogFileOwnerGroupName = "log.file.owner.group.name" +) + +type Resolver struct { + IncludeFileName bool `mapstructure:"include_file_name,omitempty"` + IncludeFilePath bool `mapstructure:"include_file_path,omitempty"` + IncludeFileNameResolved bool `mapstructure:"include_file_name_resolved,omitempty"` + IncludeFilePathResolved bool `mapstructure:"include_file_path_resolved,omitempty"` + IncludeFileOwnerName bool `mapstructure:"include_file_owner_name,omitempty"` + IncludeFileOwnerGroupName bool `mapstructure:"include_file_owner_group_name,omitempty"` +} + +func (r *Resolver) Resolve(file *os.File) (attributes map[string]any, err error) { + var path = file.Name() + // size 2 is sufficient if not resolving symlinks. This optimizes for the most performant cases. + attributes = make(map[string]any, 2) + if r.IncludeFileName { + attributes[LogFileName] = filepath.Base(path) + } + if r.IncludeFilePath { + attributes[LogFilePath] = path + } + if r.IncludeFileOwnerName || r.IncludeFileOwnerGroupName { + err = r.addOwnerInfo(file, attributes) + if err != nil { + return nil, err + } + } + if !r.IncludeFileNameResolved && !r.IncludeFilePathResolved { + return attributes, nil + } + + resolved := path + // Dirty solution, waiting for this permanent fix https://github.com/golang/go/issues/39786 + // EvalSymlinks on windows is partially working depending on the way you use Symlinks and Junctions + if runtime.GOOS != "windows" { + resolved, err = filepath.EvalSymlinks(path) + if err != nil { + return nil, fmt.Errorf("resolve symlinks: %w", err) + } + } + abs, err := filepath.Abs(resolved) + if err != nil { + return nil, fmt.Errorf("resolve abs: %w", err) + } + + if r.IncludeFileNameResolved { + attributes[LogFileNameResolved] = filepath.Base(abs) + } + if r.IncludeFilePathResolved { + attributes[LogFilePathResolved] = abs + } + return attributes, nil +} diff --git a/pkg/stanza/fileconsumer/attrs/attrs_test.go b/pkg/stanza/fileconsumer/attrs/attrs_test.go new file mode 100644 index 000000000000..c93cdef40d6e --- /dev/null +++ b/pkg/stanza/fileconsumer/attrs/attrs_test.go @@ -0,0 +1,92 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package attrs + +import ( + "fmt" + "path/filepath" + "runtime" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/filetest" +) + +func TestResolver(t *testing.T) { + t.Parallel() + + for i := 0; i < 64; i++ { + + // Create a 4 bit string where each bit represents the value of a config option + bitString := fmt.Sprintf("%06b", i) + + // Create a resolver with a config that matches the bit pattern of i + r := Resolver{ + IncludeFileName: bitString[0] == '1', + IncludeFilePath: bitString[1] == '1', + IncludeFileNameResolved: bitString[2] == '1', + IncludeFilePathResolved: bitString[3] == '1', + IncludeFileOwnerName: bitString[4] == '1' && runtime.GOOS != "windows", + IncludeFileOwnerGroupName: bitString[5] == '1' && runtime.GOOS != "windows", + } + + t.Run(bitString, func(t *testing.T) { + // Create a file + tempDir := t.TempDir() + temp := filetest.OpenTemp(t, tempDir) + + attributes, err := r.Resolve(temp) + assert.NoError(t, err) + + var expectLen int + if r.IncludeFileName { + expectLen++ + assert.Equal(t, filepath.Base(temp.Name()), attributes[LogFileName]) + } else { + assert.Empty(t, attributes[LogFileName]) + } + if r.IncludeFilePath { + expectLen++ + assert.Equal(t, temp.Name(), attributes[LogFilePath]) + } else { + assert.Empty(t, attributes[LogFilePath]) + } + + // We don't have an independent way to resolve the path, so the only meangingful validate + // is to ensure that the resolver returns nothing vs something based on the config. + if r.IncludeFileNameResolved { + expectLen++ + assert.NotNil(t, attributes[LogFileNameResolved]) + assert.IsType(t, "", attributes[LogFileNameResolved]) + } else { + assert.Empty(t, attributes[LogFileNameResolved]) + } + if r.IncludeFilePathResolved { + expectLen++ + assert.NotNil(t, attributes[LogFilePathResolved]) + assert.IsType(t, "", attributes[LogFilePathResolved]) + } else { + assert.Empty(t, attributes[LogFilePathResolved]) + } + if r.IncludeFileOwnerName { + expectLen++ + assert.NotNil(t, attributes[LogFileOwnerName]) + assert.IsType(t, "", attributes[LogFileOwnerName]) + } else { + assert.Empty(t, attributes[LogFileOwnerName]) + assert.Empty(t, attributes[LogFileOwnerName]) + } + if r.IncludeFileOwnerGroupName { + expectLen++ + assert.NotNil(t, attributes[LogFileOwnerGroupName]) + assert.IsType(t, "", attributes[LogFileOwnerGroupName]) + } else { + assert.Empty(t, attributes[LogFileOwnerGroupName]) + assert.Empty(t, attributes[LogFileOwnerGroupName]) + } + assert.Equal(t, expectLen, len(attributes)) + }) + } +} diff --git a/pkg/stanza/fileconsumer/attrs/owner_other.go b/pkg/stanza/fileconsumer/attrs/owner_other.go new file mode 100644 index 000000000000..b9b7d40b5a97 --- /dev/null +++ b/pkg/stanza/fileconsumer/attrs/owner_other.go @@ -0,0 +1,37 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build !windows + +package attrs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/attrs" + +import ( + "fmt" + "os" + "os/user" + "syscall" +) + +func (r *Resolver) addOwnerInfo(file *os.File, attributes map[string]any) error { + fileInfo, errStat := file.Stat() + if errStat != nil { + return fmt.Errorf("resolve file stat: %w", errStat) + } + fileStat := fileInfo.Sys().(*syscall.Stat_t) + + if r.IncludeFileOwnerName { + fileOwner, errFileUser := user.LookupId(fmt.Sprint(fileStat.Uid)) + if errFileUser != nil { + return fmt.Errorf("resolve file owner name: %w", errFileUser) + } + attributes[LogFileOwnerName] = fileOwner.Username + } + if r.IncludeFileOwnerGroupName { + fileGroup, errFileGroup := user.LookupGroupId(fmt.Sprint(fileStat.Gid)) + if errFileGroup != nil { + return fmt.Errorf("resolve file group name: %w", errFileGroup) + } + attributes[LogFileOwnerGroupName] = fileGroup.Name + } + return nil +} diff --git a/pkg/stanza/fileconsumer/attrs/owner_windows.go b/pkg/stanza/fileconsumer/attrs/owner_windows.go new file mode 100644 index 000000000000..25d5e15fe986 --- /dev/null +++ b/pkg/stanza/fileconsumer/attrs/owner_windows.go @@ -0,0 +1,15 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build windows + +package attrs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/attrs" + +import ( + "fmt" + "os" +) + +func (r *Resolver) addOwnerInfo(file *os.File, attributes map[string]any) error { + return fmt.Errorf("owner info not implemented for windows") +} diff --git a/pkg/stanza/fileconsumer/benchmark_test.go b/pkg/stanza/fileconsumer/benchmark_test.go index 0d6cbd9335f8..9a9c161a5395 100644 --- a/pkg/stanza/fileconsumer/benchmark_test.go +++ b/pkg/stanza/fileconsumer/benchmark_test.go @@ -4,12 +4,17 @@ package fileconsumer import ( + "context" + "fmt" "os" "path/filepath" + "sync" "testing" + "time" "github.com/stretchr/testify/require" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/filetest" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fingerprint" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" ) @@ -20,22 +25,6 @@ type fileInputBenchmark struct { config func() *Config } -type benchFile struct { - *os.File - log func(int) -} - -func simpleTextFile(b *testing.B, file *os.File) *benchFile { - line := string(tokenWithLength(49)) + "\n" - return &benchFile{ - File: file, - log: func(_ int) { - _, err := file.WriteString(line) - require.NoError(b, err) - }, - } -} - func BenchmarkFileInput(b *testing.B) { cases := []fileInputBenchmark{ { @@ -141,16 +130,50 @@ func BenchmarkFileInput(b *testing.B) { return cfg }, }, + { + name: "Many", + paths: func() []string { + paths := make([]string, 100) + for i := range paths { + paths[i] = fmt.Sprintf("file%d.log", i) + } + return paths + }(), + config: func() *Config { + cfg := NewConfig() + cfg.Include = []string{"file*.log"} + cfg.MaxConcurrentFiles = 100 + return cfg + }, + }, + } + + // Pregenerate some lines which we can write to the files + // to avoid measuring the time it takes to generate them + // and to reduce the amount of syscalls in the benchmark. + uniqueLines := 10 + severalLines := "" + for i := 0; i < uniqueLines; i++ { + severalLines += string(filetest.TokenWithLength(999)) + "\n" } for _, bench := range cases { b.Run(bench.name, func(b *testing.B) { rootDir := b.TempDir() - var files []*benchFile + var files []*os.File for _, path := range bench.paths { - file := openFile(b, filepath.Join(rootDir, path)) - files = append(files, simpleTextFile(b, file)) + f := filetest.OpenFile(b, filepath.Join(rootDir, path)) + // Initialize the file to ensure a unique fingerprint + _, err := f.WriteString(f.Name() + "\n") + require.NoError(b, err) + // Write half the content before starting the benchmark + for i := 0; i < b.N/2; i++ { + _, err := f.WriteString(severalLines) + require.NoError(b, err) + } + require.NoError(b, f.Sync()) + files = append(files, f) } cfg := bench.config() @@ -158,39 +181,47 @@ func BenchmarkFileInput(b *testing.B) { cfg.Include[i] = filepath.Join(rootDir, inc) } cfg.StartAt = "beginning" + // Use aggressive poll interval so we're not measuring excess sleep time + cfg.PollInterval = time.Microsecond - received := make(chan []byte) - - op, err := cfg.Build(testutil.Logger(b), emitOnChan(received)) - require.NoError(b, err) - - // write half the lines before starting - mid := b.N / 2 - for i := 0; i < mid; i++ { - for _, file := range files { - file.log(i) + doneChan := make(chan bool, len(files)) + callback := func(_ context.Context, token []byte, _ map[string]any) error { + if len(token) == 0 { + doneChan <- true } + return nil } + op, err := cfg.Build(testutil.Logger(b), callback) + require.NoError(b, err) b.ResetTimer() - err = op.Start(testutil.NewUnscopedMockPersister()) + require.NoError(b, op.Start(testutil.NewUnscopedMockPersister())) defer func() { require.NoError(b, op.Stop()) }() - require.NoError(b, err) - // write the remainder of lines while running - go func() { - for i := mid; i < b.N; i++ { - for _, file := range files { - file.log(i) + var wg sync.WaitGroup + for _, file := range files { + wg.Add(1) + go func(f *os.File) { + defer wg.Done() + // Write the other half of the content while running + for i := 0; i < b.N/2; i++ { + _, err := f.WriteString(severalLines) + require.NoError(b, err) } - } - }() + // Signal end of file + _, err := f.WriteString("\n") + require.NoError(b, err) + require.NoError(b, f.Sync()) + }(file) + } - for i := 0; i < b.N*len(files); i++ { - <-received + // Timer continues to run until all files have been read + for dones := 0; dones < len(files); dones++ { + <-doneChan } + wg.Wait() }) } } diff --git a/pkg/stanza/fileconsumer/config.go b/pkg/stanza/fileconsumer/config.go index 41cbfa4e7451..02de7d59e9e7 100644 --- a/pkg/stanza/fileconsumer/config.go +++ b/pkg/stanza/fileconsumer/config.go @@ -7,6 +7,7 @@ import ( "bufio" "errors" "fmt" + "runtime" "time" "go.opentelemetry.io/collector/featuregate" @@ -14,10 +15,13 @@ import ( "golang.org/x/text/encoding" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/decode" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/attrs" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/emit" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fingerprint" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/header" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/scanner" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/tracker" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/matcher" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" @@ -26,11 +30,9 @@ import ( ) const ( - defaultMaxLogSize = 1024 * 1024 defaultMaxConcurrentFiles = 1024 defaultEncoding = "utf-8" defaultPollInterval = 200 * time.Millisecond - defaultFlushPeriod = 500 * time.Millisecond ) var allowFileDeletion = featuregate.GlobalRegistry().MustRegister( @@ -50,40 +52,35 @@ var AllowHeaderMetadataParsing = featuregate.GlobalRegistry().MustRegister( // NewConfig creates a new input config with default values func NewConfig() *Config { return &Config{ - IncludeFileName: true, - IncludeFilePath: false, - IncludeFileNameResolved: false, - IncludeFilePathResolved: false, - PollInterval: defaultPollInterval, - Encoding: defaultEncoding, - StartAt: "end", - FingerprintSize: fingerprint.DefaultSize, - MaxLogSize: defaultMaxLogSize, - MaxConcurrentFiles: defaultMaxConcurrentFiles, - MaxBatches: 0, - FlushPeriod: defaultFlushPeriod, + PollInterval: defaultPollInterval, + MaxConcurrentFiles: defaultMaxConcurrentFiles, + StartAt: "end", + FingerprintSize: fingerprint.DefaultSize, + MaxLogSize: reader.DefaultMaxLogSize, + Encoding: defaultEncoding, + FlushPeriod: reader.DefaultFlushPeriod, + Resolver: attrs.Resolver{ + IncludeFileName: true, + }, } } // Config is the configuration of a file input operator type Config struct { - matcher.Criteria `mapstructure:",squash"` - IncludeFileName bool `mapstructure:"include_file_name,omitempty"` - IncludeFilePath bool `mapstructure:"include_file_path,omitempty"` - IncludeFileNameResolved bool `mapstructure:"include_file_name_resolved,omitempty"` - IncludeFilePathResolved bool `mapstructure:"include_file_path_resolved,omitempty"` - PollInterval time.Duration `mapstructure:"poll_interval,omitempty"` - StartAt string `mapstructure:"start_at,omitempty"` - FingerprintSize helper.ByteSize `mapstructure:"fingerprint_size,omitempty"` - MaxLogSize helper.ByteSize `mapstructure:"max_log_size,omitempty"` - MaxConcurrentFiles int `mapstructure:"max_concurrent_files,omitempty"` - MaxBatches int `mapstructure:"max_batches,omitempty"` - DeleteAfterRead bool `mapstructure:"delete_after_read,omitempty"` - SplitConfig split.Config `mapstructure:"multiline,omitempty"` - TrimConfig trim.Config `mapstructure:",squash,omitempty"` - Encoding string `mapstructure:"encoding,omitempty"` - FlushPeriod time.Duration `mapstructure:"force_flush_period,omitempty"` - Header *HeaderConfig `mapstructure:"header,omitempty"` + matcher.Criteria `mapstructure:",squash"` + attrs.Resolver `mapstructure:",squash"` + PollInterval time.Duration `mapstructure:"poll_interval,omitempty"` + MaxConcurrentFiles int `mapstructure:"max_concurrent_files,omitempty"` + MaxBatches int `mapstructure:"max_batches,omitempty"` + StartAt string `mapstructure:"start_at,omitempty"` + FingerprintSize helper.ByteSize `mapstructure:"fingerprint_size,omitempty"` + MaxLogSize helper.ByteSize `mapstructure:"max_log_size,omitempty"` + Encoding string `mapstructure:"encoding,omitempty"` + SplitConfig split.Config `mapstructure:"multiline,omitempty"` + TrimConfig trim.Config `mapstructure:",squash,omitempty"` + FlushPeriod time.Duration `mapstructure:"force_flush_period,omitempty"` + Header *HeaderConfig `mapstructure:"header,omitempty"` + DeleteAfterRead bool `mapstructure:"delete_after_read,omitempty"` } type HeaderConfig struct { @@ -91,20 +88,35 @@ type HeaderConfig struct { MetadataOperators []operator.Config `mapstructure:"metadata_operators"` } -// Build will build a file input operator from the supplied configuration -func (c Config) Build(logger *zap.SugaredLogger, emit emit.Callback) (*Manager, error) { +// Deprecated [v0.97.0] Use Build and WithSplitFunc option instead +func (c Config) BuildWithSplitFunc(logger *zap.SugaredLogger, emit emit.Callback, splitFunc bufio.SplitFunc) (*Manager, error) { + return c.Build(logger, emit, WithSplitFunc(splitFunc)) +} + +func (c Config) Build(logger *zap.SugaredLogger, emit emit.Callback, opts ...Option) (*Manager, error) { if err := c.validate(); err != nil { return nil, err } + if emit == nil { + return nil, fmt.Errorf("must provide emit function") + } + + o := new(options) + for _, opt := range opts { + opt(o) + } enc, err := decode.LookupEncoding(c.Encoding) if err != nil { - return nil, err + return nil, fmt.Errorf("failed to find encoding: %w", err) } - splitFunc, err := c.SplitConfig.Func(enc, false, int(c.MaxLogSize)) - if err != nil { - return nil, err + splitFunc := o.splitFunc + if splitFunc == nil { + splitFunc, err = c.SplitConfig.Func(enc, false, int(c.MaxLogSize)) + if err != nil { + return nil, err + } } trimFunc := trim.Nop @@ -112,21 +124,6 @@ func (c Config) Build(logger *zap.SugaredLogger, emit emit.Callback) (*Manager, trimFunc = c.TrimConfig.Func() } - return c.buildManager(logger, emit, splitFunc, trimFunc) -} - -// BuildWithSplitFunc will build a file input operator with customized splitFunc function -func (c Config) BuildWithSplitFunc(logger *zap.SugaredLogger, emit emit.Callback, splitFunc bufio.SplitFunc) (*Manager, error) { - if err := c.validate(); err != nil { - return nil, err - } - return c.buildManager(logger, emit, splitFunc, c.TrimConfig.Func()) -} - -func (c Config) buildManager(logger *zap.SugaredLogger, emit emit.Callback, splitFunc bufio.SplitFunc, trimFunc trim.Func) (*Manager, error) { - if emit == nil { - return nil, fmt.Errorf("must provide emit function") - } var startAtBeginning bool switch c.StartAt { case "beginning": @@ -137,11 +134,6 @@ func (c Config) buildManager(logger *zap.SugaredLogger, emit emit.Callback, spli return nil, fmt.Errorf("invalid start_at location '%s'", c.StartAt) } - enc, err := decode.LookupEncoding(c.Encoding) - if err != nil { - return nil, fmt.Errorf("failed to find encoding: %w", err) - } - var hCfg *header.Config if c.Header != nil { hCfg, err = header.NewConfig(c.Header.Pattern, c.Header.MetadataOperators, enc) @@ -155,72 +147,52 @@ func (c Config) buildManager(logger *zap.SugaredLogger, emit emit.Callback, spli return nil, err } + readerFactory := reader.Factory{ + SugaredLogger: logger.With("component", "fileconsumer"), + FromBeginning: startAtBeginning, + FingerprintSize: int(c.FingerprintSize), + InitialBufferSize: scanner.DefaultBufferSize, + MaxLogSize: int(c.MaxLogSize), + Encoding: enc, + SplitFunc: splitFunc, + TrimFunc: trimFunc, + FlushTimeout: c.FlushPeriod, + EmitFunc: emit, + Attributes: c.Resolver, + HeaderConfig: hCfg, + DeleteAtEOF: c.DeleteAfterRead, + } + return &Manager{ SugaredLogger: logger.With("component", "fileconsumer"), - cancel: func() {}, - readerFactory: reader.Factory{ - SugaredLogger: logger.With("component", "fileconsumer"), - Config: &reader.Config{ - FingerprintSize: int(c.FingerprintSize), - MaxLogSize: int(c.MaxLogSize), - Emit: emit, - IncludeFileName: c.IncludeFileName, - IncludeFilePath: c.IncludeFilePath, - IncludeFileNameResolved: c.IncludeFileNameResolved, - IncludeFilePathResolved: c.IncludeFilePathResolved, - DeleteAtEOF: c.DeleteAfterRead, - FlushTimeout: c.FlushPeriod, - }, - FromBeginning: startAtBeginning, - Encoding: enc, - SplitFunc: splitFunc, - TrimFunc: trimFunc, - HeaderConfig: hCfg, - }, - fileMatcher: fileMatcher, - pollInterval: c.PollInterval, - maxBatchFiles: c.MaxConcurrentFiles / 2, - maxBatches: c.MaxBatches, - previousPollFiles: make([]*reader.Reader, 0, c.MaxConcurrentFiles/2), - knownFiles: []*reader.Metadata{}, + readerFactory: readerFactory, + fileMatcher: fileMatcher, + pollInterval: c.PollInterval, + maxBatchFiles: c.MaxConcurrentFiles / 2, + maxBatches: c.MaxBatches, + tracker: tracker.New(logger.With("component", "fileconsumer"), c.MaxConcurrentFiles/2), }, nil } func (c Config) validate() error { - if c.DeleteAfterRead && !allowFileDeletion.IsEnabled() { - return fmt.Errorf("`delete_after_read` requires feature gate `%s`", allowFileDeletion.ID()) - } - - if c.Header != nil && !AllowHeaderMetadataParsing.IsEnabled() { - return fmt.Errorf("`header` requires feature gate `%s`", AllowHeaderMetadataParsing.ID()) - } - if _, err := matcher.New(c.Criteria); err != nil { return err } - if c.MaxLogSize <= 0 { - return fmt.Errorf("`max_log_size` must be positive") - } - - if c.MaxConcurrentFiles <= 1 { - return fmt.Errorf("`max_concurrent_files` must be greater than 1") - } - if c.FingerprintSize < fingerprint.MinSize { - return fmt.Errorf("`fingerprint_size` must be at least %d bytes", fingerprint.MinSize) + return fmt.Errorf("'fingerprint_size' must be at least %d bytes", fingerprint.MinSize) } - if c.DeleteAfterRead && c.StartAt == "end" { - return fmt.Errorf("`delete_after_read` cannot be used with `start_at: end`") + if c.MaxLogSize <= 0 { + return fmt.Errorf("'max_log_size' must be positive") } - if c.Header != nil && c.StartAt == "end" { - return fmt.Errorf("`header` cannot be specified with `start_at: end`") + if c.MaxConcurrentFiles <= 1 { + return fmt.Errorf("'max_concurrent_files' must be positive") } if c.MaxBatches < 0 { - return errors.New("`max_batches` must not be negative") + return errors.New("'max_batches' must not be negative") } enc, err := decode.LookupEncoding(c.Encoding) @@ -228,11 +200,43 @@ func (c Config) validate() error { return err } + if c.DeleteAfterRead { + if !allowFileDeletion.IsEnabled() { + return fmt.Errorf("'delete_after_read' requires feature gate '%s'", allowFileDeletion.ID()) + } + if c.StartAt == "end" { + return fmt.Errorf("'delete_after_read' cannot be used with 'start_at: end'") + } + } + if c.Header != nil { - if _, err := header.NewConfig(c.Header.Pattern, c.Header.MetadataOperators, enc); err != nil { - return fmt.Errorf("invalid config for `header`: %w", err) + if !AllowHeaderMetadataParsing.IsEnabled() { + return fmt.Errorf("'header' requires feature gate '%s'", AllowHeaderMetadataParsing.ID()) + } + if c.StartAt == "end" { + return fmt.Errorf("'header' cannot be specified with 'start_at: end'") + } + if _, errConfig := header.NewConfig(c.Header.Pattern, c.Header.MetadataOperators, enc); errConfig != nil { + return fmt.Errorf("invalid config for 'header': %w", errConfig) } } + if runtime.GOOS == "windows" && (c.Resolver.IncludeFileOwnerName || c.Resolver.IncludeFileOwnerGroupName) { + return fmt.Errorf("'include_file_owner_name' or 'include_file_owner_group_name' it's not supported for windows: %w", err) + } + return nil } + +type options struct { + splitFunc bufio.SplitFunc +} + +type Option func(*options) + +// WithSplitFunc overrides the split func which is normally built from other settings on the config +func WithSplitFunc(f bufio.SplitFunc) Option { + return func(o *options) { + o.splitFunc = f + } +} diff --git a/pkg/stanza/fileconsumer/config_test.go b/pkg/stanza/fileconsumer/config_test.go index 43171be5c96c..fcf1b3659e2f 100644 --- a/pkg/stanza/fileconsumer/config_test.go +++ b/pkg/stanza/fileconsumer/config_test.go @@ -4,6 +4,7 @@ package fileconsumer import ( + "fmt" "path/filepath" "testing" "time" @@ -11,8 +12,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/featuregate" + "go.uber.org/zap" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/emittest" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fingerprint" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/matcher" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" @@ -23,17 +27,19 @@ import ( func TestNewConfig(t *testing.T) { cfg := NewConfig() + assert.Equal(t, 200*time.Millisecond, cfg.PollInterval) + assert.Equal(t, defaultMaxConcurrentFiles, cfg.MaxConcurrentFiles) + assert.Equal(t, "end", cfg.StartAt) + assert.Equal(t, fingerprint.DefaultSize, int(cfg.FingerprintSize)) + assert.Equal(t, defaultEncoding, cfg.Encoding) + assert.Equal(t, reader.DefaultMaxLogSize, int(cfg.MaxLogSize)) + assert.Equal(t, reader.DefaultFlushPeriod, cfg.FlushPeriod) assert.True(t, cfg.IncludeFileName) assert.False(t, cfg.IncludeFilePath) assert.False(t, cfg.IncludeFileNameResolved) assert.False(t, cfg.IncludeFilePathResolved) - assert.Equal(t, "end", cfg.StartAt) - assert.Equal(t, 200*time.Millisecond, cfg.PollInterval) - assert.Equal(t, fingerprint.DefaultSize, int(cfg.FingerprintSize)) - assert.Equal(t, defaultEncoding, cfg.Encoding) - assert.Equal(t, defaultMaxLogSize, int(cfg.MaxLogSize)) - assert.Equal(t, defaultMaxConcurrentFiles, cfg.MaxConcurrentFiles) - assert.Equal(t, defaultFlushPeriod, cfg.FlushPeriod) + assert.False(t, cfg.IncludeFileOwnerName) + assert.False(t, cfg.IncludeFileOwnerGroupName) } func TestUnmarshal(t *testing.T) { @@ -445,7 +451,7 @@ func TestBuild(t *testing.T) { }{ { "Basic", - func(cfg *Config) {}, + func(_ *Config) {}, require.NoError, func(t *testing.T, m *Manager) { require.Equal(t, m.pollInterval, 10*time.Millisecond) @@ -482,7 +488,7 @@ func TestBuild(t *testing.T) { cfg.SplitConfig.LineStartPattern = "START.*" }, require.NoError, - func(t *testing.T, f *Manager) {}, + func(_ *testing.T, _ *Manager) {}, }, { "MultilineConfiguredEndPattern", @@ -490,7 +496,7 @@ func TestBuild(t *testing.T) { cfg.SplitConfig.LineEndPattern = "END.*" }, require.NoError, - func(t *testing.T, f *Manager) {}, + func(_ *testing.T, _ *Manager) {}, }, { "InvalidEncoding", @@ -511,9 +517,9 @@ func TestBuild(t *testing.T) { }, { "NoLineStartOrEnd", - func(cfg *Config) {}, + func(_ *Config) {}, require.NoError, - func(t *testing.T, f *Manager) {}, + func(_ *testing.T, _ *Manager) {}, }, { "InvalidLineStartRegex", @@ -612,7 +618,7 @@ func TestBuild(t *testing.T) { } }, require.NoError, - func(t *testing.T, f *Manager) {}, + func(_ *testing.T, _ *Manager) {}, }, } @@ -623,7 +629,7 @@ func TestBuild(t *testing.T) { cfg := basicConfig() tc.modifyBaseConfig(cfg) - input, err := cfg.Build(testutil.Logger(t), nopEmitFunc) + input, err := cfg.Build(testutil.Logger(t), emittest.Nop) tc.errorRequirement(t, err) if err != nil { return @@ -653,7 +659,7 @@ func TestBuildWithSplitFunc(t *testing.T) { }{ { "Basic", - func(cfg *Config) {}, + func(_ *Config) {}, require.NoError, func(t *testing.T, m *Manager) { require.Equal(t, m.pollInterval, 10*time.Millisecond) @@ -702,7 +708,7 @@ func TestBuildWithSplitFunc(t *testing.T) { return len(data), data, nil } - input, err := cfg.BuildWithSplitFunc(testutil.Logger(t), nopEmitFunc, splitNone) + input, err := cfg.BuildWithSplitFunc(testutil.Logger(t), emittest.Nop, splitNone) tc.errorRequirement(t, err) if err != nil { return @@ -789,7 +795,7 @@ func TestBuildWithHeader(t *testing.T) { cfg := basicConfig() tc.modifyBaseConfig(cfg) - input, err := cfg.Build(testutil.Logger(t), nopEmitFunc) + input, err := cfg.Build(testutil.Logger(t), emittest.Nop) tc.errorRequirement(t, err) if err != nil { return @@ -798,3 +804,50 @@ func TestBuildWithHeader(t *testing.T) { }) } } + +// includeDir is a builder-like helper for quickly setting up a test config +func (c *Config) includeDir(dir string) *Config { + c.Include = append(c.Include, fmt.Sprintf("%s/*", dir)) + return c +} + +// withHeader is a builder-like helper for quickly setting up a test config header +func (c *Config) withHeader(headerMatchPattern, extractRegex string) *Config { + regexOpConfig := regex.NewConfig() + regexOpConfig.Regex = extractRegex + + c.Header = &HeaderConfig{ + Pattern: headerMatchPattern, + MetadataOperators: []operator.Config{ + { + Builder: regexOpConfig, + }, + }, + } + + return c +} + +const mockOperatorType = "mock" + +func init() { + operator.Register(mockOperatorType, func() operator.Builder { return newMockOperatorConfig(NewConfig()) }) +} + +type mockOperatorConfig struct { + helper.BasicConfig `mapstructure:",squash"` + *Config `mapstructure:",squash"` +} + +func newMockOperatorConfig(cfg *Config) *mockOperatorConfig { + return &mockOperatorConfig{ + BasicConfig: helper.NewBasicConfig(mockOperatorType, mockOperatorType), + Config: cfg, + } +} + +// This function is impelmented for compatibility with operatortest +// but is not meant to be used directly +func (h *mockOperatorConfig) Build(*zap.SugaredLogger) (operator.Operator, error) { + panic("not impelemented") +} diff --git a/pkg/stanza/fileconsumer/design.md b/pkg/stanza/fileconsumer/design.md index 9fa2b69582b5..34d7fee70063 100644 --- a/pkg/stanza/fileconsumer/design.md +++ b/pkg/stanza/fileconsumer/design.md @@ -9,30 +9,44 @@ The effective search space (`include - exclude`) is referred to colloquially as # Fingerprints -Files are identified and tracked using fingerprints. A fingerprint is the first `N` bytes of the file, with the default for `N` being `1000`. +Files are identified and tracked using fingerprints. A fingerprint is the first `N` bytes of the file, +with the default for `N` being `1000`. ### Fingerprint Growth -When a file is smaller than `N` bytes, the fingerprint is the entire contents of the file. A fingerprint that is less than `N` bytes will be compared to other fingerprints using a prefix check. As the file grows, its fingerprint will be updated, until it reaches the full size of `N`. +When a file is smaller than `N` bytes, the fingerprint is the entire contents of the file. A fingerprint that is +less than `N` bytes will be compared to other fingerprints using a prefix check. As the file grows, its fingerprint +will be updated, until it reaches the full size of `N`. ### Deduplication of Files Multiple files with the same fingerprint are handled as if they are the same file. -Most commonly, this circumstance is observed during file rotation that depends on a copy/truncate strategy. After copying the file, but before truncating the original, two files with the same content briefly exist. If the `file_input` operator happens to observe both files at the same time, it will detect a duplicate fingerprint and ingest only one of the files. +Most commonly, this circumstance is observed during file rotation that depends on a copy/truncate strategy. +After copying the file, but before truncating the original, two files with the same content briefly exist. +If the `file_input` operator happens to observe both files at the same time, it will detect a duplicate fingerprint +and ingest only one of the files. -If logs are replicated to multiple files, or if log files are copied manually, it is not understood to be of any significant value to ingest the duplicates. As a result, fingerprints are not designed to differentiate between these files, and double ingestion of the same content is not supported automatically. +If logs are replicated to multiple files, or if log files are copied manually, it is not understood to be of any +significant value to ingest the duplicates. As a result, fingerprints are not designed to differentiate between these +files, and double ingestion of the same content is not supported automatically. -In some rare circumstances, a logger may print a very verbose preamble to each log file. When this occurs, fingerprinting may fail to differentiate files from one another. This can be overcome by customizing the size of the fingerprint using the `fingerprint_size` setting. +In some rare circumstances, a logger may print a very verbose preamble to each log file. When this occurs, +fingerprinting may fail to differentiate files from one another. This can be overcome by customizing the size +of the fingerprint using the `fingerprint_size` setting. ### Log line ordering across file rotations -In general, we offer no guarantees as to the relative ordering of log lines originating from different files. For the common use case of files being rotated outside the watched pattern, we make a best-effort attempt at reading the rotated file to the end before reading the new file. This guarantees log line ordering across rotations, assuming the following conditions are met: +In general, we offer no guarantees as to the relative ordering of log lines originating from different files. +For the common use case of files being rotated outside the watched pattern, we make a best-effort attempt at reading +the rotated file to the end before reading the new file. This guarantees log line ordering across rotations, +assuming the following conditions are met: * rotated file names don't match the watched pattern * rotated files aren't written to after the rotation -A minor reordering of log lines often doesn't matter, but it can when using the recombine operator later in the pipeline, for example. +A minor reordering of log lines often doesn't matter, but it can when using the recombine operator later in the +pipeline, for example. # Readers @@ -51,24 +65,34 @@ A Reader contains the following: As implied by the name, Readers are responsible for consuming data as it is written to a file. -Before a Reader begins consuming, it will seek the file's last known offset. If no offset is known for the file, then the Reader will seek either the beginning or end of the file, according to the `start_at` setting. It will then begin reading from there. +Before a Reader begins consuming, it will seek the file's last known offset. If no offset is known for the file, then +the Reader will seek either the beginning or end of the file, according to the `start_at` setting. It will then begin +reading from there. -While a file is shorter than the length of a fingerprint, its Reader will continuously append to the fingerprint, as it consumes newly written data. +While a file is shorter than the length of a fingerprint, its Reader will continuously append to the fingerprint, +as it consumes newly written data. -A Reader consumes a file using a `bufio.Scanner`, with the Scanner's buffer size defined by the `max_log_size` setting, and the Scanner's split func defined by the `multiline` setting. +A Reader consumes a file using a `bufio.Scanner`, with the Scanner's buffer size defined by the `max_log_size` setting, +and the Scanner's split func defined by the `multiline` setting. -As each log is read from the file, it is decoded according to the `encoding` function, and then emitted from the operator. +As each log is read from the file, it is decoded according to the `encoding` function, and then emitted from +the operator. The Reader's offset is updated accordingly whenever a log is emitted. ### Persistence -Readers are always instantiated with an open file handle. Eventually, the file handle is closed, but the Reader is not immediately discarded. Rather, it is maintained for a fixed number of "poll cycles" (see Polling section below) as a reference to the file's metadata, which may be useful for detecting files that have been moved or copied, and for recalling metadata such as the file's previous path. +Readers are always instantiated with an open file handle. Eventually, the file handle is closed, but the Reader is +not immediately discarded. Rather, it is maintained for a fixed number of "poll cycles" (see Polling section below) +as a reference to the file's metadata, which may be useful for detecting files that have been moved or copied, +and for recalling metadata such as the file's previous path. Readers are maintained for a fixed period of time, and then discarded. -When the `file_input` operator makes use of a persistence mechanism to save and recall its state, it is simply Setting and Getting a slice of Readers. These Readers contain all the information necessary to pick up exactly where the operator left off. +When the `file_input` operator makes use of a persistence mechanism to save and recall its state, it is simply +Setting and Getting a slice of Readers. These Readers contain all the information necessary to pick up exactly +where the operator left off. # Polling @@ -80,18 +104,26 @@ Each poll cycle runs through a series of steps which are presented below. ### Detailed Poll Cycle 1. Dequeuing - 1. If any matches are queued from the previous cycle, an appropriate number are dequeued, and processed the same as would a newly matched set of files. + 1. If any matches are queued from the previous cycle, an appropriate number are dequeued, and processed the same + as would a newly matched set of files. 2. Aging - 1. If no queued files were left over from the previous cycle, then all previously matched files have been consumed, and we are ready to query the file system again. Prior to doing so, we will increment the "generation" of all historical Readers. Eventually, these Readers will be discarded based on their age. Until that point, they may be useful references. + 1. If no queued files were left over from the previous cycle, then all previously matched files have been consumed, + and we are ready to query the file system again. Prior to doing so, we will increment the "generation" of all + historical Readers. Eventually, these Readers will be discarded based on their age. Until that point, they may + be useful references. 3. Matching 1. The file system is searched for files with a path that matches the `include` setting. 2. Files that match the `exclude` setting are discarded. - 3. As a special case, on the first poll cycle, a warning is printed if no files are matched. Execution continues regardless. + 3. As a special case, on the first poll cycle, a warning is printed if no files are matched. + Execution continues regardless. 4. Queueing - 1. If the number of matched files is less than or equal to the maximum degree of concurrency, as defined by the `max_concurrent_files` setting, then no queueing occurs. + 1. If the number of matched files is less than or equal to the maximum degree of concurrency, as defined + by the `max_concurrent_files` setting, then no queueing occurs. 2. Else, queueing occurs, which means the following: - - Matched files are split into two sets, such that the first is small enough to respect `max_concurrent_files`, and the second contains the remaining files (called the queue). - - The current poll interval will begin processing the first set of files, just as if they were the only ones found during the matching phase. + - Matched files are split into two sets, such that the first is small enough to respect `max_concurrent_files`, + and the second contains the remaining files (called the queue). + - The current poll interval will begin processing the first set of files, just as if they were the + only ones found during the matching phase. - Subsequent poll cycles will pull matches off of the queue, until the queue is empty. - The `max_concurrent_files` setting is respected at all times. 5. Opening @@ -104,27 +136,38 @@ Each poll cycle runs through a series of steps which are presented below. 1. The first `N` bytes of each file are read. (See fingerprinting section above.) 7. Exclusion 1. Empty files are closed immediately and discarded. (There is nothing to read.) - 2. Fingerprints found in this batch are cross referenced against each other to detect duplicates. Duplicate files are closed immediately and discarded. - - In the vast majority of cases, this occurs during file rotation that uses the copy/truncate method. (See fingerprinting section above.) + 2. Fingerprints found in this batch are cross referenced against each other to detect duplicates. Duplicate + files are closed immediately and discarded. + - In the vast majority of cases, this occurs during file rotation that uses the copy/truncate method. + (See fingerprinting section above.) 8. Reader Creation 1. Each file handle is wrapped into a `Reader` along with some metadata. (See Reader section above) - - During the creation of a `Reader`, the file's fingerprint is cross referenced with previously known fingerprints. - - If a file's fingerprint matches one that has recently been seen, then metadata is copied over from the previous iteration of the Reader. Most importantly, the offset is accurately maintained in this way. - - If a file's fingerprint does not match any recently seen files, then its offset is initialized according to the `start_at` setting. + - During the creation of a `Reader`, the file's fingerprint is cross referenced with previously + known fingerprints. + - If a file's fingerprint matches one that has recently been seen, then metadata is copied over from the + previous iteration of the Reader. Most importantly, the offset is accurately maintained in this way. + - If a file's fingerprint does not match any recently seen files, then its offset is initialized + according to the `start_at` setting. 9. Detection of Lost Files - 1. Fingerprints are used to cross reference the matched files from this poll cycle against the matched file from the previous poll cycle. Files that were matched in the previous cycle but were not matched in this cycle are referred to as "lost files". + 1. Fingerprints are used to cross reference the matched files from this poll cycle against the matched + file from the previous poll cycle. Files that were matched in the previous cycle but were not matched + in this cycle are referred to as "lost files". 2. File become "lost" for several reasons: - The file may have been deleted, typically due to rotation limits or ttl-based pruning. - The file may have been rotated to another location. - If the file was moved, the open file handle from the previous poll cycle may be useful. 10. Consumption - 1. Lost files are consumed. In some cases, such as deletion, this operation will fail. However, if a file was moved, we may be able to consume the remainder of its content. + 1. Lost files are consumed. In some cases, such as deletion, this operation will fail. However, if a file + was moved, we may be able to consume the remainder of its content. - We do not expect to match this file again, so the best we can do is finish consuming their current contents. - We can reasonably expect in most cases that these files are no longer being written to. 2. Matched files (from this poll cycle) are consumed. - - These file handles will be left open until the next poll cycle, when they will be used to detect and potentially consume lost files. - - Typically, we can expect to find most of these files again. However, these files are consumed greedily in case we do not see them again. - 3. All open files are consumed concurrently. This includes both the lost files from the previous cycle, and the matched files from this cycle. + - These file handles will be left open until the next poll cycle, when they will be used to detect and + potentially consume lost files. + - Typically, we can expect to find most of these files again. However, these files are consumed greedily + in case we do not see them again. + 3. All open files are consumed concurrently. This includes both the lost files from the previous cycle, and the + matched files from this cycle. 11. Closing 1. All files from the previous poll cycle are closed. 12. Archiving @@ -132,7 +175,8 @@ Each poll cycle runs through a series of steps which are presented below. 2. The same Readers are also retained as a separate slice, for easy access in the next poll cycle. 13. Pruning 1. The historical record is purged of Readers that have existed for 3 generations. - - This number is somewhat arbitrary, and should probably be made configurable. However, its exact purpose is quite obscure. + - This number is somewhat arbitrary, and should probably be made configurable. However, its exact purpose + is quite obscure. 14. Persistence 1. The historical record of readers is synced to whatever persistence mechanism was provided to the operator. 15. End Poll Cycle @@ -152,11 +196,15 @@ Whenever the operator starts, it: When the operator shuts down, the following occurs: - If a poll cycle is not currently underway, the operator simply closes any open files. -- Otherwise, the current poll cycle is signaled to stop immediately, which in turn signals all Readers to stop immediately. - - If a Reader is idle or in between log entries, it will return immediately. Otherwise it will return after consuming one final log entry. - - Once all Readers have stopped, the remainder of the poll cycle completes as usual, which includes the steps labeled `Closing`, `Archiving`, `Pruning`, and `Persistence`. +- Otherwise, the current poll cycle is signaled to stop immediately, which in turn signals all Readers to + stop immediately. + - If a Reader is idle or in between log entries, it will return immediately. Otherwise it will return + after consuming one final log entry. + - Once all Readers have stopped, the remainder of the poll cycle completes as usual, which includes + the steps labeled `Closing`, `Archiving`, `Pruning`, and `Persistence`. -The net effect of the shut down routine is that all files are checkpointed in a normal manner (i.e. not in the middle of a log entry), and all checkpoints are persisted. +The net effect of the shut down routine is that all files are checkpointed in a normal manner +(i.e. not in the middle of a log entry), and all checkpoints are persisted. # Known Limitations @@ -164,8 +212,10 @@ The net effect of the shut down routine is that all files are checkpointed in a ### Potential data loss when maximum concurrency must be enforced The operator may lose a small percentage of logs, if both of the following conditions are true: -1. The number of files being matched exceeds the maximum degree of concurrency allowed by the `max_concurrent_files` setting. -2. Files are being "lost". That is, file rotation is moving files out of the operator's matching pattern, such that subsequent polling cycles will not find these files. +1. The number of files being matched exceeds the maximum degree of concurrency allowed + by the `max_concurrent_files` setting. +2. Files are being "lost". That is, file rotation is moving files out of the operator's matching pattern, + such that subsequent polling cycles will not find these files. When both of these conditions occur, it is impossible for the operator to both: 1. Respect the specified concurrency limitation. @@ -175,16 +225,21 @@ When this scenario occurs, a design tradeoff must be made. The choice is between 1. Ensure that `max_concurrent_files` is always respected. 2. Risk losing a small percentage of log entries. -The current design chooses to guarantee the maximum degree of concurrency because failure to do so risks harming the operator's host system. While the loss of logs is not ideal, it is less likely to harm the operator's host system, and is therefore considered the more acceptable of the two options. +The current design chooses to guarantee the maximum degree of concurrency because failure to do so risks +harming the operator's host system. While the loss of logs is not ideal, it is less likely to harm +the operator's host system, and is therefore considered the more acceptable of the two options. ### Potential data loss when file rotation via copy/truncate rotates backup files out of operator's matching pattern The operator may lose a small percentage of logs, if both of the following conditions are true: 1. Files are being rotated using the copy/truncate strategy. -2. Files are being "lost". That is, file rotation is moving files out of the operator's matching pattern, such that subsequent polling cycles will not find these files. +2. Files are being "lost". That is, file rotation is moving files out of the operator's matching pattern, + such that subsequent polling cycles will not find these files. -When both of these conditions occur, it is possible that a file is written to (then copied elsewhere) and then truncated before the operator has a chance to consume the new data. +When both of these conditions occur, it is possible that a file is written to (then copied elsewhere) and +then truncated before the operator has a chance to consume the new data. ### Potential failure to consume files when file rotation via move/create is used on Windows -On Windows, rotation of files using the Move/Create strategy may cause errors and loss of data, because Golang does not currently support the Windows mechanism for `FILE_SHARE_DELETE`. +On Windows, rotation of files using the Move/Create strategy may cause errors and loss of data, +because Golang does not currently support the Windows mechanism for `FILE_SHARE_DELETE`. diff --git a/pkg/stanza/fileconsumer/file.go b/pkg/stanza/fileconsumer/file.go index bbb072db9078..94b72b132b71 100644 --- a/pkg/stanza/fileconsumer/file.go +++ b/pkg/stanza/fileconsumer/file.go @@ -15,6 +15,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/checkpoint" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fingerprint" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/tracker" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/matcher" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" ) @@ -26,32 +27,20 @@ type Manager struct { readerFactory reader.Factory fileMatcher *matcher.Matcher + tracker *tracker.Tracker pollInterval time.Duration persister operator.Persister maxBatches int maxBatchFiles int - - previousPollFiles []*reader.Reader - knownFiles []*reader.Metadata - - // This value approximates the expected number of files which we will find in a single poll cycle. - // It is updated each poll cycle using a simple moving average calculation which assigns 20% weight - // to the most recent poll cycle. - // It is used to regulate the size of knownFiles. The goal is to allow knownFiles - // to contain checkpoints from a few previous poll cycles, but not grow unbounded. - movingAverageMatches int } func (m *Manager) Start(persister operator.Persister) error { ctx, cancel := context.WithCancel(context.Background()) m.cancel = cancel - if matches, err := m.fileMatcher.MatchFiles(); err != nil { + if _, err := m.fileMatcher.MatchFiles(); err != nil { m.Warnf("finding files: %v", err) - } else { - m.movingAverageMatches = len(matches) - m.knownFiles = make([]*reader.Metadata, 0, 4*len(matches)) } if persister != nil { @@ -63,7 +52,7 @@ func (m *Manager) Start(persister operator.Persister) error { if len(offsets) > 0 { m.Infow("Resuming from previously known offset(s). 'start_at' setting is not applicable.") m.readerFactory.FromBeginning = true - m.knownFiles = append(m.knownFiles, offsets...) + m.tracker.LoadMetadata(offsets) } } @@ -73,26 +62,19 @@ func (m *Manager) Start(persister operator.Persister) error { return nil } -func (m *Manager) closePreviousFiles() { - if len(m.knownFiles) > 4*m.movingAverageMatches { - m.knownFiles = m.knownFiles[m.movingAverageMatches:] - } - for _, r := range m.previousPollFiles { - m.knownFiles = append(m.knownFiles, r.Close()) - } -} - // Stop will stop the file monitoring process func (m *Manager) Stop() error { - m.cancel() + if m.cancel != nil { + m.cancel() + m.cancel = nil + } m.wg.Wait() - m.closePreviousFiles() + m.tracker.ClosePreviousFiles() if m.persister != nil { - if err := checkpoint.Save(context.Background(), m.persister, m.knownFiles); err != nil { + if err := checkpoint.Save(context.Background(), m.persister, m.tracker.GetMetadata()); err != nil { m.Errorw("save offsets", zap.Error(err)) } } - m.cancel = nil return nil } @@ -126,10 +108,8 @@ func (m *Manager) poll(ctx context.Context) { matches, err := m.fileMatcher.MatchFiles() if err != nil { m.Debugf("finding files: %v", err) - } else { - m.movingAverageMatches = (m.movingAverageMatches*3 + len(matches)) / 4 } - m.Debugf("matched files", zap.Strings("paths", matches)) + m.Debugw("matched files", zap.Strings("paths", matches)) for len(matches) > m.maxBatchFiles { m.consume(ctx, matches[:m.maxBatchFiles]) @@ -149,25 +129,23 @@ func (m *Manager) poll(ctx context.Context) { // Any new files that appear should be consumed entirely m.readerFactory.FromBeginning = true if m.persister != nil { - if err := checkpoint.Save(context.Background(), m.persister, m.knownFiles); err != nil { + if err := checkpoint.Save(context.Background(), m.persister, m.tracker.GetMetadata()); err != nil { m.Errorw("save offsets", zap.Error(err)) } } + // rotate at end of every poll() + m.tracker.EndPoll() } func (m *Manager) consume(ctx context.Context, paths []string) { m.Debug("Consuming files", zap.Strings("paths", paths)) - readers := m.makeReaders(paths) + m.makeReaders(paths) - // take care of files which disappeared from the pattern since the last poll cycle - // this can mean either files which were removed, or rotated into a name not matching the pattern - // we do this before reading existing files to ensure we emit older log lines before newer ones - m.readLostFiles(ctx, readers) - m.closePreviousFiles() + m.readLostFiles(ctx) // read new readers to end var wg sync.WaitGroup - for _, r := range readers { + for _, r := range m.tracker.CurrentPollFiles() { wg.Add(1) go func(r *reader.Reader) { defer wg.Done() @@ -176,7 +154,7 @@ func (m *Manager) consume(ctx context.Context, paths []string) { } wg.Wait() - m.previousPollFiles = readers + m.tracker.EndConsume() } func (m *Manager) makeFingerprint(path string) (*fingerprint.Fingerprint, *os.File) { @@ -194,7 +172,7 @@ func (m *Manager) makeFingerprint(path string) (*fingerprint.Fingerprint, *os.Fi return nil, nil } - if len(fp.FirstBytes) == 0 { + if fp.Len() == 0 { // Empty file, don't read it until we can compare its fingerprint if err = file.Close(); err != nil { m.Debugw("problem closing file", zap.Error(err)) @@ -207,9 +185,7 @@ func (m *Manager) makeFingerprint(path string) (*fingerprint.Fingerprint, *os.Fi // makeReader take a file path, then creates reader, // discarding any that have a duplicate fingerprint to other files that have already // been read this polling interval -func (m *Manager) makeReaders(paths []string) []*reader.Reader { - readers := make([]*reader.Reader, 0, len(paths)) -OUTER: +func (m *Manager) makeReaders(paths []string) { for _, path := range paths { fp, file := m.makeFingerprint(path) if fp == nil { @@ -218,13 +194,13 @@ OUTER: // Exclude duplicate paths with the same content. This can happen when files are // being rotated with copy/truncate strategy. (After copy, prior to truncate.) - for _, r := range readers { - if fp.Equal(r.Fingerprint) { - if err := file.Close(); err != nil { - m.Debugw("problem closing file", zap.Error(err)) - } - continue OUTER + if r := m.tracker.GetCurrentFile(fp); r != nil { + // re-add the reader as Match() removes duplicates + m.tracker.Add(r) + if err := file.Close(); err != nil { + m.Debugw("problem closing file", zap.Error(err)) } + continue } r, err := m.newReader(file, fp) @@ -233,31 +209,19 @@ OUTER: continue } - readers = append(readers, r) + m.tracker.Add(r) } - return readers } func (m *Manager) newReader(file *os.File, fp *fingerprint.Fingerprint) (*reader.Reader, error) { // Check previous poll cycle for match - for i := 0; i < len(m.previousPollFiles); i++ { - oldReader := m.previousPollFiles[i] - if fp.StartsWith(oldReader.Fingerprint) { - // Keep the new reader and discard the old. This ensures that if the file was - // copied to another location and truncated, our handle is updated. - m.previousPollFiles = append(m.previousPollFiles[:i], m.previousPollFiles[i+1:]...) - return m.readerFactory.NewReaderFromMetadata(file, oldReader.Close()) - } + if oldReader := m.tracker.GetOpenFile(fp); oldReader != nil { + return m.readerFactory.NewReaderFromMetadata(file, oldReader.Close()) } - // Iterate backwards to match newest first - for i := len(m.knownFiles) - 1; i >= 0; i-- { - oldMetadata := m.knownFiles[i] - if fp.StartsWith(oldMetadata.Fingerprint) { - // Remove the old metadata from the list. We will keep updating it and save it again later. - m.knownFiles = append(m.knownFiles[:i], m.knownFiles[i+1:]...) - return m.readerFactory.NewReaderFromMetadata(file, oldMetadata) - } + // Cleck for closed files for match + if oldMetadata := m.tracker.GetClosedFile(fp); oldMetadata != nil { + return m.readerFactory.NewReaderFromMetadata(file, oldMetadata) } // If we don't match any previously known files, create a new reader from scratch diff --git a/pkg/stanza/fileconsumer/file_other.go b/pkg/stanza/fileconsumer/file_other.go index d613433bd940..816a0cee5037 100644 --- a/pkg/stanza/fileconsumer/file_other.go +++ b/pkg/stanza/fileconsumer/file_other.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !windows -// +build !windows package fileconsumer // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer" @@ -13,12 +12,20 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" ) -func (m *Manager) readLostFiles(ctx context.Context, newReaders []*reader.Reader) { - // Detect files that have been rotated out of matching pattern - lostReaders := make([]*reader.Reader, 0, len(m.previousPollFiles)) +// Take care of files which disappeared from the pattern since the last poll cycle +// this can mean either files which were removed, or rotated into a name not matching the pattern +// we do this before reading existing files to ensure we emit older log lines before newer ones +func (m *Manager) readLostFiles(ctx context.Context) { + if m.readerFactory.DeleteAtEOF { + // Lost files are not expected when delete_at_eof is enabled + // since we are deleting the files before they can become lost. + return + } + previousPollFiles := m.tracker.PreviousPollFiles() + lostReaders := make([]*reader.Reader, 0, len(previousPollFiles)) OUTER: - for _, oldReader := range m.previousPollFiles { - for _, newReader := range newReaders { + for _, oldReader := range previousPollFiles { + for _, newReader := range m.tracker.CurrentPollFiles() { if newReader.Fingerprint.StartsWith(oldReader.Fingerprint) { continue OUTER } diff --git a/pkg/stanza/fileconsumer/file_test.go b/pkg/stanza/fileconsumer/file_test.go index cc34a6bcddca..7017516fed95 100644 --- a/pkg/stanza/fileconsumer/file_test.go +++ b/pkg/stanza/fileconsumer/file_test.go @@ -18,7 +18,10 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/featuregate" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/attrs" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/attrs" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/emittest" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/filetest" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/matcher" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" @@ -35,11 +38,11 @@ func TestDefaultBehaviors(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) - temp := openTemp(t, tempDir) + temp := filetest.OpenTemp(t, tempDir) tempName := filepath.Base(temp.Name()) - writeString(t, temp, " testlog1 \n") + filetest.WriteString(t, temp, " testlog1 \n") require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) defer func() { @@ -47,255 +50,24 @@ func TestDefaultBehaviors(t *testing.T) { }() // Should not emit the pre-existing token, even after flush period - expectNoTokensUntil(t, emitCalls, defaultFlushPeriod) + sink.ExpectNoCallsUntil(t, reader.DefaultFlushPeriod) // Complete token should be emitted quickly - writeString(t, temp, " testlog2 \n") - call := waitForEmit(t, emitCalls) - assert.Equal(t, []byte("testlog2"), call.token) - assert.Len(t, call.attrs, 1) - assert.Equal(t, tempName, call.attrs[attrs.LogFileName]) + filetest.WriteString(t, temp, " testlog2 \n") + token, attributes := sink.NextCall(t) + assert.Equal(t, []byte("testlog2"), token) + assert.Len(t, attributes, 1) + assert.Equal(t, tempName, attributes[attrs.LogFileName]) // Incomplete token should not be emitted until after flush period - writeString(t, temp, " testlog3 ") - expectNoTokensUntil(t, emitCalls, defaultFlushPeriod/2) - time.Sleep(defaultFlushPeriod) - - call = waitForEmit(t, emitCalls) - assert.Equal(t, []byte("testlog3"), call.token) - assert.Len(t, call.attrs, 1) - assert.Equal(t, tempName, call.attrs[attrs.LogFileName]) -} - -func TestCleanStop(t *testing.T) { - t.Parallel() - t.Skip(`Skipping due to goroutine leak in opencensus. -See this issue for details: https://github.com/census-instrumentation/opencensus-go/issues/1191#issuecomment-610440163`) - // defer goleak.VerifyNone(t) - - tempDir := t.TempDir() - cfg := NewConfig().includeDir(tempDir) - cfg.StartAt = "beginning" - operator, _ := buildTestManager(t, cfg) - - _ = openTemp(t, tempDir) - require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) - require.NoError(t, operator.Stop()) -} - -// AddFields tests that the `log.file.name` and `log.file.path` fields are included -// when IncludeFileName and IncludeFilePath are set to true -func TestAddFileFields(t *testing.T) { - t.Parallel() - - tempDir := t.TempDir() - cfg := NewConfig().includeDir(tempDir) - cfg.StartAt = "beginning" - cfg.IncludeFileName = true - cfg.IncludeFilePath = true - cfg.IncludeFileNameResolved = false - cfg.IncludeFilePathResolved = false - operator, emitCalls := buildTestManager(t, cfg) - - // Create a file, then start - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog\n") - - require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) - defer func() { - require.NoError(t, operator.Stop()) - }() - - emitCall := waitForEmit(t, emitCalls) - require.Equal(t, filepath.Base(temp.Name()), emitCall.attrs[attrs.LogFileName]) - require.Equal(t, temp.Name(), emitCall.attrs[attrs.LogFilePath]) - require.Nil(t, emitCall.attrs[attrs.LogFileNameResolved]) - require.Nil(t, emitCall.attrs[attrs.LogFilePathResolved]) -} - -// AddFileResolvedFields tests that the `log.file.name_resolved` and `log.file.path_resolved` fields are included -// when IncludeFileNameResolved and IncludeFilePathResolved are set to true -func TestAddFileResolvedFields(t *testing.T) { - if runtime.GOOS == windowsOS { - t.Skip("Windows symlinks usage disabled for now. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21088") - } - t.Parallel() - - tempDir := t.TempDir() - cfg := NewConfig().includeDir(tempDir) - cfg.StartAt = "beginning" - cfg.IncludeFileName = true - cfg.IncludeFilePath = true - cfg.IncludeFileNameResolved = true - cfg.IncludeFilePathResolved = true - operator, emitCalls := buildTestManager(t, cfg) - - // Create temp dir with log file - dir := t.TempDir() - - file, err := os.CreateTemp(dir, "") - require.NoError(t, err) - t.Cleanup(func() { - require.NoError(t, file.Close()) - }) - - // Create symbolic link in monitored directory - symLinkPath := filepath.Join(tempDir, "symlink") - err = os.Symlink(file.Name(), symLinkPath) - require.NoError(t, err) - - // Populate data - writeString(t, file, "testlog\n") - - // Resolve path - realPath, err := filepath.EvalSymlinks(file.Name()) - require.NoError(t, err) - resolved, err := filepath.Abs(realPath) - require.NoError(t, err) - - require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) - defer func() { - require.NoError(t, operator.Stop()) - }() - - emitCall := waitForEmit(t, emitCalls) - require.Equal(t, filepath.Base(symLinkPath), emitCall.attrs[attrs.LogFileName]) - require.Equal(t, symLinkPath, emitCall.attrs[attrs.LogFilePath]) - require.Equal(t, filepath.Base(resolved), emitCall.attrs[attrs.LogFileNameResolved]) - require.Equal(t, resolved, emitCall.attrs[attrs.LogFilePathResolved]) -} - -// AddFileResolvedFields tests that the `log.file.name_resolved` and `log.file.path_resolved` fields are included -// when IncludeFileNameResolved and IncludeFilePathResolved are set to true and underlaying symlink change -// Scenario: -// monitored file (symlink) -> middleSymlink -> file_1 -// monitored file (symlink) -> middleSymlink -> file_2 -func TestAddFileResolvedFieldsWithChangeOfSymlinkTarget(t *testing.T) { - if runtime.GOOS == windowsOS { - t.Skip("Windows symlinks usage disabled for now. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21088") - } - t.Parallel() - - tempDir := t.TempDir() - cfg := NewConfig().includeDir(tempDir) - cfg.StartAt = "beginning" - cfg.IncludeFileName = true - cfg.IncludeFilePath = true - cfg.IncludeFileNameResolved = true - cfg.IncludeFilePathResolved = true - operator, emitCalls := buildTestManager(t, cfg) - - // Create temp dir with log file - dir := t.TempDir() - - file1, err := os.CreateTemp(dir, "") - require.NoError(t, err) - t.Cleanup(func() { - require.NoError(t, file1.Close()) - }) - - file2, err := os.CreateTemp(dir, "") - require.NoError(t, err) - t.Cleanup(func() { - require.NoError(t, file2.Close()) - }) - - // Resolve paths - real1, err := filepath.EvalSymlinks(file1.Name()) - require.NoError(t, err) - resolved1, err := filepath.Abs(real1) - require.NoError(t, err) - - real2, err := filepath.EvalSymlinks(file2.Name()) - require.NoError(t, err) - resolved2, err := filepath.Abs(real2) - require.NoError(t, err) - - // Create symbolic link in monitored directory - // symLinkPath(target of file input) -> middleSymLinkPath -> file1 - middleSymLinkPath := filepath.Join(dir, "symlink") - symLinkPath := filepath.Join(tempDir, "symlink") - err = os.Symlink(file1.Name(), middleSymLinkPath) - require.NoError(t, err) - err = os.Symlink(middleSymLinkPath, symLinkPath) - require.NoError(t, err) - - // Populate data - writeString(t, file1, "testlog\n") - - require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) - defer func() { - require.NoError(t, operator.Stop()) - }() - - emitCall := waitForEmit(t, emitCalls) - require.Equal(t, filepath.Base(symLinkPath), emitCall.attrs[attrs.LogFileName]) - require.Equal(t, symLinkPath, emitCall.attrs[attrs.LogFilePath]) - require.Equal(t, filepath.Base(resolved1), emitCall.attrs[attrs.LogFileNameResolved]) - require.Equal(t, resolved1, emitCall.attrs[attrs.LogFilePathResolved]) - - // Change middleSymLink to point to file2 - err = os.Remove(middleSymLinkPath) - require.NoError(t, err) - err = os.Symlink(file2.Name(), middleSymLinkPath) - require.NoError(t, err) - - // Populate data (different content due to fingerprint) - writeString(t, file2, "testlog2\n") - - emitCall = waitForEmit(t, emitCalls) - require.Equal(t, filepath.Base(symLinkPath), emitCall.attrs[attrs.LogFileName]) - require.Equal(t, symLinkPath, emitCall.attrs[attrs.LogFilePath]) - require.Equal(t, filepath.Base(resolved2), emitCall.attrs[attrs.LogFileNameResolved]) - require.Equal(t, resolved2, emitCall.attrs[attrs.LogFilePathResolved]) -} - -func TestFileFieldsUpdatedAfterRestart(t *testing.T) { - t.Parallel() - - tempDir := t.TempDir() - cfg := NewConfig().includeDir(tempDir) - cfg.StartAt = "beginning" - cfg.IncludeFileName = true - cfg.IncludeFilePath = true - op1, emitCalls1 := buildTestManager(t, cfg) - - // Create a file, then start - temp, err := os.CreateTemp(tempDir, "") - require.NoError(t, err) - writeString(t, temp, "testlog1\n") - - persister := testutil.NewUnscopedMockPersister() - require.NoError(t, op1.Start(persister)) - - emitCall1 := waitForEmit(t, emitCalls1) - assert.Equal(t, []byte("testlog1"), emitCall1.token) - assert.Equal(t, filepath.Base(temp.Name()), emitCall1.attrs[attrs.LogFileName]) - assert.Equal(t, temp.Name(), emitCall1.attrs[attrs.LogFilePath]) - assert.Nil(t, emitCall1.attrs[attrs.LogFileNameResolved]) - assert.Nil(t, emitCall1.attrs[attrs.LogFilePathResolved]) - - require.NoError(t, op1.Stop()) - temp.Close() // On windows, we must close the file before renaming it - - newPath := temp.Name() + "_renamed" - require.NoError(t, os.Rename(temp.Name(), newPath)) - - temp = openFile(t, newPath) - writeString(t, temp, "testlog2\n") - - op2, emitCalls2 := buildTestManager(t, cfg) - - require.NoError(t, op2.Start(persister)) - - emitCall2 := waitForEmit(t, emitCalls2) - assert.Equal(t, []byte("testlog2"), emitCall2.token) - assert.Equal(t, filepath.Base(newPath), emitCall2.attrs[attrs.LogFileName]) - assert.Equal(t, newPath, emitCall2.attrs[attrs.LogFilePath]) - assert.Nil(t, emitCall2.attrs[attrs.LogFileNameResolved]) - assert.Nil(t, emitCall2.attrs[attrs.LogFilePathResolved]) - - require.NoError(t, op2.Stop()) + filetest.WriteString(t, temp, " testlog3 ") + sink.ExpectNoCallsUntil(t, reader.DefaultFlushPeriod/2) + time.Sleep(reader.DefaultFlushPeriod) + + token, attributes = sink.NextCall(t) + assert.Equal(t, []byte("testlog3"), token) + assert.Len(t, attributes, 1) + assert.Equal(t, tempName, attributes[attrs.LogFileName]) } // ReadExistingLogs tests that, when starting from beginning, we @@ -306,19 +78,19 @@ func TestReadExistingLogs(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) // Create a file, then start - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog1\ntestlog2\n") + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, "testlog1\ntestlog2\n") require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) defer func() { require.NoError(t, operator.Stop()) }() - waitForToken(t, emitCalls, []byte("testlog1")) - waitForToken(t, emitCalls, []byte("testlog2")) + sink.ExpectToken(t, []byte("testlog1")) + sink.ExpectToken(t, []byte("testlog2")) } // TestReadUsingNopEncoding tests when nop encoding is set, that the splitfunction returns all bytes unchanged. @@ -326,40 +98,40 @@ func TestReadUsingNopEncoding(t *testing.T) { tcs := []struct { testName string input []byte - test func(*testing.T, chan *emitParams) + test func(*testing.T, *emittest.Sink) }{ { "simple", []byte("testlog1"), - func(t *testing.T, c chan *emitParams) { - waitForToken(t, c, []byte("testlog1")) + func(t *testing.T, sink *emittest.Sink) { + sink.ExpectToken(t, []byte("testlog1")) }, }, { "longer than maxlogsize", []byte("testlog1testlog2testlog3"), - func(t *testing.T, c chan *emitParams) { - waitForToken(t, c, []byte("testlog1")) - waitForToken(t, c, []byte("testlog2")) - waitForToken(t, c, []byte("testlog3")) + func(t *testing.T, sink *emittest.Sink) { + sink.ExpectToken(t, []byte("testlog1")) + sink.ExpectToken(t, []byte("testlog2")) + sink.ExpectToken(t, []byte("testlog3")) }, }, { "doesn't hit max log size before eof", []byte("testlog1testlog2test"), - func(t *testing.T, c chan *emitParams) { - waitForToken(t, c, []byte("testlog1")) - waitForToken(t, c, []byte("testlog2")) - waitForToken(t, c, []byte("test")) + func(t *testing.T, sink *emittest.Sink) { + sink.ExpectToken(t, []byte("testlog1")) + sink.ExpectToken(t, []byte("testlog2")) + sink.ExpectToken(t, []byte("test")) }, }, { "special characters", []byte("testlog1\n\ttestlog2\n\t"), - func(t *testing.T, c chan *emitParams) { - waitForToken(t, c, []byte("testlog1")) - waitForToken(t, c, []byte("\n\ttestlo")) - waitForToken(t, c, []byte("g2\n\t")) + func(t *testing.T, sink *emittest.Sink) { + sink.ExpectToken(t, []byte("testlog1")) + sink.ExpectToken(t, []byte("\n\ttestlo")) + sink.ExpectToken(t, []byte("g2\n\t")) }, }, } @@ -374,10 +146,10 @@ func TestReadUsingNopEncoding(t *testing.T) { cfg.StartAt = "beginning" cfg.MaxLogSize = 8 cfg.Encoding = "nop" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) // Create a file, then start - temp := openTemp(t, tempDir) + temp := filetest.OpenTemp(t, tempDir) bytesWritten, err := temp.Write(tc.input) require.Greater(t, bytesWritten, 0) require.NoError(t, err) @@ -386,7 +158,7 @@ func TestReadUsingNopEncoding(t *testing.T) { require.NoError(t, operator.Stop()) }() - tc.test(t, emitCalls) + tc.test(t, sink) }) } } @@ -395,54 +167,54 @@ func TestNopEncodingDifferentLogSizes(t *testing.T) { tcs := []struct { testName string input []byte - test func(*testing.T, chan *emitParams) + test func(*testing.T, *emittest.Sink) maxLogSize helper.ByteSize }{ { "same size", []byte("testlog1"), - func(t *testing.T, c chan *emitParams) { - waitForToken(t, c, []byte("testlog1")) + func(t *testing.T, sink *emittest.Sink) { + sink.ExpectToken(t, []byte("testlog1")) }, 8, }, { "massive log size", []byte("testlog1"), - func(t *testing.T, c chan *emitParams) { - waitForToken(t, c, []byte("testlog1")) + func(t *testing.T, sink *emittest.Sink) { + sink.ExpectToken(t, []byte("testlog1")) }, 8000000, }, { "slightly larger log size", []byte("testlog1"), - func(t *testing.T, c chan *emitParams) { - waitForToken(t, c, []byte("testlog1")) + func(t *testing.T, sink *emittest.Sink) { + sink.ExpectToken(t, []byte("testlog1")) }, 9, }, { "slightly smaller log size", []byte("testlog1"), - func(t *testing.T, c chan *emitParams) { - waitForToken(t, c, []byte("testlog")) - waitForToken(t, c, []byte("1")) + func(t *testing.T, sink *emittest.Sink) { + sink.ExpectToken(t, []byte("testlog")) + sink.ExpectToken(t, []byte("1")) }, 7, }, { "tiny log size", []byte("testlog1"), - func(t *testing.T, c chan *emitParams) { - waitForToken(t, c, []byte("t")) - waitForToken(t, c, []byte("e")) - waitForToken(t, c, []byte("s")) - waitForToken(t, c, []byte("t")) - waitForToken(t, c, []byte("l")) - waitForToken(t, c, []byte("o")) - waitForToken(t, c, []byte("g")) - waitForToken(t, c, []byte("1")) + func(t *testing.T, sink *emittest.Sink) { + sink.ExpectToken(t, []byte("t")) + sink.ExpectToken(t, []byte("e")) + sink.ExpectToken(t, []byte("s")) + sink.ExpectToken(t, []byte("t")) + sink.ExpectToken(t, []byte("l")) + sink.ExpectToken(t, []byte("o")) + sink.ExpectToken(t, []byte("g")) + sink.ExpectToken(t, []byte("1")) }, 1, }, @@ -458,10 +230,10 @@ func TestNopEncodingDifferentLogSizes(t *testing.T) { cfg.StartAt = "beginning" cfg.MaxLogSize = tc.maxLogSize cfg.Encoding = "nop" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) // Create a file, then start - temp := openTemp(t, tempDir) + temp := filetest.OpenTemp(t, tempDir) bytesWritten, err := temp.Write(tc.input) require.Greater(t, bytesWritten, 0) require.NoError(t, err) @@ -470,7 +242,7 @@ func TestNopEncodingDifferentLogSizes(t *testing.T) { require.NoError(t, operator.Stop()) }() - tc.test(t, emitCalls) + tc.test(t, sink) }) } } @@ -483,21 +255,21 @@ func TestReadNewLogs(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) operator.persister = testutil.NewUnscopedMockPersister() // Poll once so we know this isn't a new file operator.poll(context.Background()) // Create a new file - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog\n") + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, "testlog\n") // Poll a second time after the file has been created operator.poll(context.Background()) // Expect the message to come through - waitForToken(t, emitCalls, []byte("testlog")) + sink.ExpectToken(t, []byte("testlog")) } // ReadExistingAndNewLogs tests that, on startup, if start_at @@ -508,21 +280,21 @@ func TestReadExistingAndNewLogs(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) operator.persister = testutil.NewUnscopedMockPersister() // Start with a file with an entry in it, and expect that entry // to come through when we poll for the first time - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog1\n") + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, "testlog1\n") operator.poll(context.Background()) - waitForToken(t, emitCalls, []byte("testlog1")) + sink.ExpectToken(t, []byte("testlog1")) // Write a second entry, and expect that entry to come through // as well - writeString(t, temp, "testlog2\n") + filetest.WriteString(t, temp, "testlog2\n") operator.poll(context.Background()) - waitForToken(t, emitCalls, []byte("testlog2")) + sink.ExpectToken(t, []byte("testlog2")) } // StartAtEnd tests that when `start_at` is configured to `end`, @@ -532,20 +304,20 @@ func TestStartAtEnd(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) operator.persister = testutil.NewUnscopedMockPersister() - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog1\n") + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, "testlog1\n") // Expect no entries on the first poll operator.poll(context.Background()) - expectNoTokens(t, emitCalls) + sink.ExpectNoCalls(t) // Expect any new entries after the first poll - writeString(t, temp, "testlog2\n") + filetest.WriteString(t, temp, "testlog2\n") operator.poll(context.Background()) - waitForToken(t, emitCalls, []byte("testlog2")) + sink.ExpectToken(t, []byte("testlog2")) } // StartAtEndNewFile tests that when `start_at` is configured to `end`, @@ -560,16 +332,16 @@ func TestStartAtEndNewFile(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) operator.persister = testutil.NewUnscopedMockPersister() operator.poll(context.Background()) - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog1\ntestlog2\n") + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, "testlog1\ntestlog2\n") operator.poll(context.Background()) - waitForToken(t, emitCalls, []byte("testlog1")) - waitForToken(t, emitCalls, []byte("testlog2")) + sink.ExpectToken(t, []byte("testlog1")) + sink.ExpectToken(t, []byte("testlog2")) } // NoNewline tests that an entry will still be sent eventually @@ -581,18 +353,18 @@ func TestNoNewline(t *testing.T) { cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" cfg.FlushPeriod = time.Nanosecond - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog1\ntestlog2") + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, "testlog1\ntestlog2") require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) defer func() { require.NoError(t, operator.Stop()) }() - waitForToken(t, emitCalls, []byte("testlog1")) - waitForToken(t, emitCalls, []byte("testlog2")) + sink.ExpectToken(t, []byte("testlog1")) + sink.ExpectToken(t, []byte("testlog2")) } // TestEmptyLine tests that the any empty lines are consumed @@ -602,19 +374,19 @@ func TestEmptyLine(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog1\n\ntestlog2\n") + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, "testlog1\n\ntestlog2\n") require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) defer func() { require.NoError(t, operator.Stop()) }() - waitForToken(t, emitCalls, []byte("testlog1")) - waitForToken(t, emitCalls, []byte("")) - waitForToken(t, emitCalls, []byte("testlog2")) + sink.ExpectToken(t, []byte("testlog1")) + sink.ExpectToken(t, []byte("")) + sink.ExpectToken(t, []byte("testlog2")) } // TestMultipleEmpty tests that multiple empty lines @@ -625,23 +397,23 @@ func TestMultipleEmpty(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) - temp := openTemp(t, tempDir) - writeString(t, temp, "\n\ntestlog1\n\n\ntestlog2\n") + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, "\n\ntestlog1\n\n\ntestlog2\n") require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) defer func() { require.NoError(t, operator.Stop()) }() - waitForToken(t, emitCalls, []byte("")) - waitForToken(t, emitCalls, []byte("")) - waitForToken(t, emitCalls, []byte("testlog1")) - waitForToken(t, emitCalls, []byte("")) - waitForToken(t, emitCalls, []byte("")) - waitForToken(t, emitCalls, []byte("testlog2")) - expectNoTokensUntil(t, emitCalls, time.Second) + sink.ExpectToken(t, []byte("")) + sink.ExpectToken(t, []byte("")) + sink.ExpectToken(t, []byte("testlog1")) + sink.ExpectToken(t, []byte("")) + sink.ExpectToken(t, []byte("")) + sink.ExpectToken(t, []byte("testlog2")) + sink.ExpectNoCallsUntil(t, time.Second) } // TestLeadingEmpty tests that the the operator handles a leading @@ -652,20 +424,20 @@ func TestLeadingEmpty(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) - temp := openTemp(t, tempDir) - writeString(t, temp, "\ntestlog1\ntestlog2\n") + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, "\ntestlog1\ntestlog2\n") require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) defer func() { require.NoError(t, operator.Stop()) }() - waitForToken(t, emitCalls, []byte("")) - waitForToken(t, emitCalls, []byte("testlog1")) - waitForToken(t, emitCalls, []byte("testlog2")) - expectNoTokensUntil(t, emitCalls, time.Second) + sink.ExpectToken(t, []byte("")) + sink.ExpectToken(t, []byte("testlog1")) + sink.ExpectToken(t, []byte("testlog2")) + sink.ExpectNoCallsUntil(t, time.Second) } // SplitWrite tests a line written in two writes @@ -676,18 +448,18 @@ func TestSplitWrite(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) operator.persister = testutil.NewUnscopedMockPersister() - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog1") + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, "testlog1") operator.poll(context.Background()) - writeString(t, temp, "testlog2\n") + filetest.WriteString(t, temp, "testlog2\n") operator.poll(context.Background()) - waitForToken(t, emitCalls, []byte("testlog1testlog2")) + sink.ExpectToken(t, []byte("testlog1testlog2")) } func TestIgnoreEmptyFiles(t *testing.T) { @@ -696,25 +468,25 @@ func TestIgnoreEmptyFiles(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) operator.persister = testutil.NewUnscopedMockPersister() - temp := openTemp(t, tempDir) - temp2 := openTemp(t, tempDir) - temp3 := openTemp(t, tempDir) - temp4 := openTemp(t, tempDir) + temp := filetest.OpenTemp(t, tempDir) + temp2 := filetest.OpenTemp(t, tempDir) + temp3 := filetest.OpenTemp(t, tempDir) + temp4 := filetest.OpenTemp(t, tempDir) - writeString(t, temp, "testlog1\n") - writeString(t, temp3, "testlog2\n") + filetest.WriteString(t, temp, "testlog1\n") + filetest.WriteString(t, temp3, "testlog2\n") operator.poll(context.Background()) - waitForTokens(t, emitCalls, []byte("testlog1"), []byte("testlog2")) + sink.ExpectTokens(t, []byte("testlog1"), []byte("testlog2")) - writeString(t, temp2, "testlog3\n") - writeString(t, temp4, "testlog4\n") + filetest.WriteString(t, temp2, "testlog3\n") + filetest.WriteString(t, temp4, "testlog4\n") operator.poll(context.Background()) - waitForTokens(t, emitCalls, []byte("testlog3"), []byte("testlog4")) + sink.ExpectTokens(t, []byte("testlog3"), []byte("testlog4")) } func TestDecodeBufferIsResized(t *testing.T) { @@ -723,18 +495,18 @@ func TestDecodeBufferIsResized(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) defer func() { require.NoError(t, operator.Stop()) }() - temp := openTemp(t, tempDir) - expected := tokenWithLength(1<<12 + 1) - writeString(t, temp, string(expected)+"\n") + temp := filetest.OpenTemp(t, tempDir) + expected := filetest.TokenWithLength(1<<12 + 1) + filetest.WriteString(t, temp, string(expected)+"\n") - waitForToken(t, emitCalls, expected) + sink.ExpectToken(t, expected) } func TestMultiFileSimple(t *testing.T) { @@ -743,20 +515,20 @@ func TestMultiFileSimple(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) - temp1 := openTemp(t, tempDir) - temp2 := openTemp(t, tempDir) + temp1 := filetest.OpenTemp(t, tempDir) + temp2 := filetest.OpenTemp(t, tempDir) - writeString(t, temp1, "testlog1\n") - writeString(t, temp2, "testlog2\n") + filetest.WriteString(t, temp1, "testlog1\n") + filetest.WriteString(t, temp2, "testlog2\n") require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) defer func() { require.NoError(t, operator.Stop()) }() - waitForTokens(t, emitCalls, []byte("testlog1"), []byte("testlog2")) + sink.ExpectTokens(t, []byte("testlog1"), []byte("testlog2")) } func TestMultiFileSort(t *testing.T) { @@ -775,21 +547,21 @@ func TestMultiFileSort(t *testing.T) { }, } - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) - temp1 := openTempWithPattern(t, tempDir, ".*log1") - temp2 := openTempWithPattern(t, tempDir, ".*log2") + temp1 := filetest.OpenTempWithPattern(t, tempDir, ".*log1") + temp2 := filetest.OpenTempWithPattern(t, tempDir, ".*log2") - writeString(t, temp1, "testlog1\n") - writeString(t, temp2, "testlog2\n") + filetest.WriteString(t, temp1, "testlog1\n") + filetest.WriteString(t, temp2, "testlog2\n") require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) defer func() { require.NoError(t, operator.Stop()) }() - waitForTokens(t, emitCalls, []byte("testlog2")) - expectNoTokens(t, emitCalls) + sink.ExpectTokens(t, []byte("testlog2")) + sink.ExpectNoCalls(t) } func TestMultiFileSortTimestamp(t *testing.T) { @@ -809,21 +581,21 @@ func TestMultiFileSortTimestamp(t *testing.T) { }, } - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) - temp1 := openTempWithPattern(t, tempDir, ".*2023020602.log") - temp2 := openTempWithPattern(t, tempDir, ".*2023020603.log") + temp1 := filetest.OpenTempWithPattern(t, tempDir, ".*2023020602.log") + temp2 := filetest.OpenTempWithPattern(t, tempDir, ".*2023020603.log") - writeString(t, temp1, "testlog1\n") - writeString(t, temp2, "testlog2\n") + filetest.WriteString(t, temp1, "testlog1\n") + filetest.WriteString(t, temp2, "testlog2\n") require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) defer func() { require.NoError(t, operator.Stop()) }() - waitForTokens(t, emitCalls, []byte("testlog2")) - expectNoTokens(t, emitCalls) + sink.ExpectTokens(t, []byte("testlog2")) + sink.ExpectNoCalls(t) } func TestMultiFileParallel_PreloadedFiles(t *testing.T) { @@ -834,7 +606,7 @@ func TestMultiFileParallel_PreloadedFiles(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) numFiles := 10 numMessages := 100 @@ -848,12 +620,12 @@ func TestMultiFileParallel_PreloadedFiles(t *testing.T) { var wg sync.WaitGroup for i := 0; i < numFiles; i++ { - temp := openTemp(t, tempDir) + temp := filetest.OpenTemp(t, tempDir) wg.Add(1) go func(tf *os.File, f int) { defer wg.Done() for j := 0; j < numMessages; j++ { - writeString(t, tf, getMessage(f, j)+"\n") + filetest.WriteString(t, tf, getMessage(f, j)+"\n") } }(temp, i) } @@ -863,7 +635,7 @@ func TestMultiFileParallel_PreloadedFiles(t *testing.T) { require.NoError(t, operator.Stop()) }() - waitForTokens(t, emitCalls, expected...) + sink.ExpectTokens(t, expected...) wg.Wait() } @@ -875,7 +647,7 @@ func TestMultiFileParallel_LiveFiles(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) numFiles := 10 numMessages := 100 @@ -894,7 +666,7 @@ func TestMultiFileParallel_LiveFiles(t *testing.T) { temps := make([]*os.File, 0, numFiles) for i := 0; i < numFiles; i++ { - temps = append(temps, openTemp(t, tempDir)) + temps = append(temps, filetest.OpenTemp(t, tempDir)) } var wg sync.WaitGroup @@ -903,12 +675,12 @@ func TestMultiFileParallel_LiveFiles(t *testing.T) { go func(tf *os.File, f int) { defer wg.Done() for j := 0; j < numMessages; j++ { - writeString(t, tf, getMessage(f, j)+"\n") + filetest.WriteString(t, tf, getMessage(f, j)+"\n") } }(temp, i) } - waitForTokens(t, emitCalls, expected...) + sink.ExpectTokens(t, expected...) wg.Wait() } @@ -925,6 +697,7 @@ func TestRestartOffsets(t *testing.T) { } for _, tc := range testCases { + tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() @@ -934,32 +707,32 @@ func TestRestartOffsets(t *testing.T) { persister := testutil.NewUnscopedMockPersister() - logFile := openTemp(t, tempDir) + logFile := filetest.OpenTemp(t, tempDir) - before1stRun := tokenWithLength(tc.lineLength) - during1stRun := tokenWithLength(tc.lineLength) - duringRestart := tokenWithLength(tc.lineLength) - during2ndRun := tokenWithLength(tc.lineLength) + before1stRun := filetest.TokenWithLength(tc.lineLength) + during1stRun := filetest.TokenWithLength(tc.lineLength) + duringRestart := filetest.TokenWithLength(tc.lineLength) + during2ndRun := filetest.TokenWithLength(tc.lineLength) - operatorOne, emitCallsOne := buildTestManager(t, cfg) - writeString(t, logFile, string(before1stRun)+"\n") + operatorOne, sink1 := testManager(t, cfg) + filetest.WriteString(t, logFile, string(before1stRun)+"\n") require.NoError(t, operatorOne.Start(persister)) if tc.startAt == "beginning" { - waitForToken(t, emitCallsOne, before1stRun) + sink1.ExpectToken(t, before1stRun) } else { - expectNoTokensUntil(t, emitCallsOne, 500*time.Millisecond) + sink1.ExpectNoCallsUntil(t, 500*time.Millisecond) } - writeString(t, logFile, string(during1stRun)+"\n") - waitForToken(t, emitCallsOne, during1stRun) + filetest.WriteString(t, logFile, string(during1stRun)+"\n") + sink1.ExpectToken(t, during1stRun) require.NoError(t, operatorOne.Stop()) - writeString(t, logFile, string(duringRestart)+"\n") + filetest.WriteString(t, logFile, string(duringRestart)+"\n") - operatorTwo, emitCallsTwo := buildTestManager(t, cfg) + operatorTwo, sink2 := testManager(t, cfg) require.NoError(t, operatorTwo.Start(persister)) - waitForToken(t, emitCallsTwo, duringRestart) - writeString(t, logFile, string(during2ndRun)+"\n") - waitForToken(t, emitCallsTwo, during2ndRun) + sink2.ExpectToken(t, duringRestart) + filetest.WriteString(t, logFile, string(during2ndRun)+"\n") + sink2.ExpectToken(t, during2ndRun) require.NoError(t, operatorTwo.Stop()) }) } @@ -971,7 +744,7 @@ func TestManyLogsDelivered(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) count := 1000 expectedTokens := make([]string, 0, count) @@ -986,7 +759,7 @@ func TestManyLogsDelivered(t *testing.T) { }() // Write lots of logs - temp := openTemp(t, tempDir) + temp := filetest.OpenTemp(t, tempDir) for _, message := range expectedTokens { _, err := temp.WriteString(message + "\n") require.NoError(t, err) @@ -994,9 +767,9 @@ func TestManyLogsDelivered(t *testing.T) { // Expect each of them to come through once for _, message := range expectedTokens { - waitForToken(t, emitCalls, []byte(message)) + sink.ExpectToken(t, []byte(message)) } - expectNoTokens(t, emitCalls) + sink.ExpectNoCalls(t) } func TestFileBatching(t *testing.T) { @@ -1013,20 +786,20 @@ func TestFileBatching(t *testing.T) { cfg.StartAt = "beginning" cfg.MaxConcurrentFiles = maxConcurrentFiles cfg.MaxBatches = maxBatches - emitCalls := make(chan *emitParams, files*linesPerFile) - operator, _ := buildTestManager(t, cfg, withEmitChan(emitCalls)) + sink := emittest.NewSink(emittest.WithCallBuffer(files * linesPerFile)) + operator := testManagerWithSink(t, cfg, sink) operator.persister = testutil.NewUnscopedMockPersister() temps := make([]*os.File, 0, files) for i := 0; i < files; i++ { - temps = append(temps, openTemp(t, tempDir)) + temps = append(temps, filetest.OpenTemp(t, tempDir)) } // Write logs to each file expectedTokens := make([][]byte, 0, files*linesPerFile) for i, temp := range temps { for j := 0; j < linesPerFile; j++ { - message := fmt.Sprintf("%s %d %d", tokenWithLength(100), i, j) + message := fmt.Sprintf("%s %d %d", filetest.TokenWithLength(100), i, j) _, err := temp.WriteString(message + "\n") require.NoError(t, err) expectedTokens = append(expectedTokens, []byte(message)) @@ -1036,14 +809,14 @@ func TestFileBatching(t *testing.T) { // Poll and wait for all lines operator.poll(context.Background()) actualTokens := make([][]byte, 0, files*linesPerFile) - actualTokens = append(actualTokens, waitForNTokens(t, emitCalls, len(expectedTokens))...) + actualTokens = append(actualTokens, sink.NextTokens(t, len(expectedTokens))...) require.ElementsMatch(t, expectedTokens, actualTokens) // Write more logs to each file so we can validate that all files are still known expectedTokens = make([][]byte, 0, files*linesPerFile) for i, temp := range temps { for j := 0; j < linesPerFile; j++ { - message := fmt.Sprintf("%s %d %d", tokenWithLength(20), i, j) + message := fmt.Sprintf("%s %d %d", filetest.TokenWithLength(20), i, j) _, err := temp.WriteString(message + "\n") require.NoError(t, err) expectedTokens = append(expectedTokens, []byte(message)) @@ -1053,7 +826,7 @@ func TestFileBatching(t *testing.T) { // Poll again and wait for all new lines operator.poll(context.Background()) actualTokens = make([][]byte, 0, files*linesPerFile) - actualTokens = append(actualTokens, waitForNTokens(t, emitCalls, len(expectedTokens))...) + actualTokens = append(actualTokens, sink.NextTokens(t, len(expectedTokens))...) require.ElementsMatch(t, expectedTokens, actualTokens) } @@ -1069,12 +842,12 @@ func TestFileBatchingRespectsStartAtEnd(t *testing.T) { cfg.StartAt = "end" cfg.MaxConcurrentFiles = maxConcurrentFiles - operator, emitChan := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) operator.persister = testutil.NewUnscopedMockPersister() temps := make([]*os.File, 0, initFiles+moreFiles) for i := 0; i < initFiles; i++ { - temps = append(temps, openTemp(t, tempDir)) + temps = append(temps, filetest.OpenTemp(t, tempDir)) } // Write one log to each file @@ -1086,11 +859,11 @@ func TestFileBatchingRespectsStartAtEnd(t *testing.T) { // Poll and expect no logs operator.poll(context.Background()) - expectNoTokens(t, emitChan) + sink.ExpectNoCalls(t) // Create some more files for i := 0; i < moreFiles; i++ { - temps = append(temps, openTemp(t, tempDir)) + temps = append(temps, filetest.OpenTemp(t, tempDir)) } // Write a log to each file @@ -1104,174 +877,7 @@ func TestFileBatchingRespectsStartAtEnd(t *testing.T) { // Poll again and expect one line from each file. operator.poll(context.Background()) - waitForTokens(t, emitChan, expectedTokens...) -} - -func TestFileReader_FingerprintUpdated(t *testing.T) { - t.Parallel() - - tempDir := t.TempDir() - cfg := NewConfig().includeDir(tempDir) - cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) - - temp := openTemp(t, tempDir) - tempCopy := openFile(t, temp.Name()) - fp, err := operator.readerFactory.NewFingerprint(temp) - require.NoError(t, err) - - reader, err := operator.readerFactory.NewReader(tempCopy, fp) - require.NoError(t, err) - defer reader.Close() - - writeString(t, temp, "testlog1\n") - reader.ReadToEnd(context.Background()) - waitForToken(t, emitCalls, []byte("testlog1")) - require.Equal(t, []byte("testlog1\n"), reader.Fingerprint.FirstBytes) -} - -// Test that a fingerprint: -// - Starts empty -// - Updates as a file is read -// - Stops updating when the max fingerprint size is reached -// - Stops exactly at max fingerprint size, regardless of content -func TestFingerprintGrowsAndStops(t *testing.T) { - t.Parallel() - - // Use a number with many factors. - // Sometimes fingerprint length will align with - // the end of a line, sometimes not. Test both. - maxFP := 360 - - // Use prime numbers to ensure variation in - // whether or not they are factors of maxFP - lineLens := []int{3, 5, 7, 11, 13, 17, 19, 23, 27} - - for _, lineLen := range lineLens { - t.Run(fmt.Sprintf("%d", lineLen), func(t *testing.T) { - t.Parallel() - - tempDir := t.TempDir() - cfg := NewConfig().includeDir(tempDir) - cfg.StartAt = "beginning" - cfg.FingerprintSize = helper.ByteSize(maxFP) - operator, _ := buildTestManager(t, cfg) - - temp := openTemp(t, tempDir) - tempCopy := openFile(t, temp.Name()) - fp, err := operator.readerFactory.NewFingerprint(temp) - require.NoError(t, err) - require.Equal(t, []byte(""), fp.FirstBytes) - - reader, err := operator.readerFactory.NewReader(tempCopy, fp) - require.NoError(t, err) - defer reader.Close() - - // keep track of what has been written to the file - var fileContent []byte - - // keep track of expected fingerprint size - expectedFP := 0 - - // Write lines until file is much larger than the length of the fingerprint - for len(fileContent) < 2*maxFP { - expectedFP += lineLen - if expectedFP > maxFP { - expectedFP = maxFP - } - - line := string(tokenWithLength(lineLen-1)) + "\n" - fileContent = append(fileContent, []byte(line)...) - - writeString(t, temp, line) - reader.ReadToEnd(context.Background()) - require.Equal(t, fileContent[:expectedFP], reader.Fingerprint.FirstBytes) - } - }) - } -} - -// This is same test like TestFingerprintGrowsAndStops, but with additional check for fingerprint size check -// Test that a fingerprint: -// - Starts empty -// - Updates as a file is read -// - Stops updating when the max fingerprint size is reached -// - Stops exactly at max fingerprint size, regardless of content -// - Do not change size after fingerprint configuration change -func TestFingerprintChangeSize(t *testing.T) { - t.Parallel() - - // Use a number with many factors. - // Sometimes fingerprint length will align with - // the end of a line, sometimes not. Test both. - maxFP := 360 - - // Use prime numbers to ensure variation in - // whether or not they are factors of maxFP - lineLens := []int{3, 5, 7, 11, 13, 17, 19, 23, 27} - - for _, lineLen := range lineLens { - t.Run(fmt.Sprintf("%d", lineLen), func(t *testing.T) { - t.Parallel() - - tempDir := t.TempDir() - cfg := NewConfig().includeDir(tempDir) - cfg.StartAt = "beginning" - cfg.FingerprintSize = helper.ByteSize(maxFP) - operator, _ := buildTestManager(t, cfg) - - temp := openTemp(t, tempDir) - tempCopy := openFile(t, temp.Name()) - fp, err := operator.readerFactory.NewFingerprint(temp) - require.NoError(t, err) - require.Equal(t, []byte(""), fp.FirstBytes) - - reader, err := operator.readerFactory.NewReader(tempCopy, fp) - require.NoError(t, err) - defer reader.Close() - - // keep track of what has been written to the file - var fileContent []byte - - // keep track of expected fingerprint size - expectedFP := 0 - - // Write lines until file is much larger than the length of the fingerprint - for len(fileContent) < 2*maxFP { - expectedFP += lineLen - if expectedFP > maxFP { - expectedFP = maxFP - } - - line := string(tokenWithLength(lineLen-1)) + "\n" - fileContent = append(fileContent, []byte(line)...) - - writeString(t, temp, line) - reader.ReadToEnd(context.Background()) - require.Equal(t, fileContent[:expectedFP], reader.Fingerprint.FirstBytes) - } - - // Test fingerprint change - // Change fingerprint and try to read file again - // We do not expect fingerprint change - // We test both increasing and decreasing fingerprint size - reader.Config.FingerprintSize = maxFP * (lineLen / 3) - line := string(tokenWithLength(lineLen-1)) + "\n" - fileContent = append(fileContent, []byte(line)...) - - writeString(t, temp, line) - reader.ReadToEnd(context.Background()) - require.Equal(t, fileContent[:expectedFP], reader.Fingerprint.FirstBytes) - - reader.Config.FingerprintSize = maxFP / 2 - line = string(tokenWithLength(lineLen-1)) + "\n" - fileContent = append(fileContent, []byte(line)...) - - writeString(t, temp, line) - reader.ReadToEnd(context.Background()) - require.Equal(t, fileContent[:expectedFP], reader.Fingerprint.FirstBytes) - }) - } + sink.ExpectTokens(t, expectedTokens...) } func TestEncodings(t *testing.T) { @@ -1285,8 +891,8 @@ func TestEncodings(t *testing.T) { { "Nop", []byte{0xc5, '\n'}, - "", - [][]byte{{0xc5}}, + "nop", + [][]byte{{0xc5, '\n'}}, }, { "InvalidUTFReplacement", @@ -1333,6 +939,7 @@ func TestEncodings(t *testing.T) { } for _, tc := range cases { + tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() @@ -1340,10 +947,10 @@ func TestEncodings(t *testing.T) { cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" cfg.Encoding = tc.encoding - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) // Populate the file - temp := openTemp(t, tempDir) + temp := filetest.OpenTemp(t, tempDir) _, err := temp.Write(tc.contents) require.NoError(t, err) @@ -1352,7 +959,7 @@ func TestEncodings(t *testing.T) { require.NoError(t, operator.Stop()) }() - waitForTokens(t, emitCalls, tc.expected...) + sink.ExpectTokens(t, tc.expected...) }) } } @@ -1364,19 +971,17 @@ func TestDeleteAfterRead(t *testing.T) { linesPerFile := 10 totalLines := files * linesPerFile - expectedTokens := make([][]byte, 0, totalLines) - actualTokens := make([][]byte, 0, totalLines) - tempDir := t.TempDir() temps := make([]*os.File, 0, files) for i := 0; i < files; i++ { - temps = append(temps, openTemp(t, tempDir)) + temps = append(temps, filetest.OpenTemp(t, tempDir)) } - // Write logs to each file + expectedTokens := make([][]byte, 0, totalLines) + actualTokens := make([][]byte, 0, totalLines) for i, temp := range temps { for j := 0; j < linesPerFile; j++ { - line := tokenWithLength(100) + line := filetest.TokenWithLength(100) message := fmt.Sprintf("%s %d %d", line, i, j) _, err := temp.WriteString(message + "\n") require.NoError(t, err) @@ -1390,11 +995,40 @@ func TestDeleteAfterRead(t *testing.T) { cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" cfg.DeleteAfterRead = true - emitCalls := make(chan *emitParams, totalLines) - operator, _ := buildTestManager(t, cfg, withEmitChan(emitCalls)) + sink := emittest.NewSink(emittest.WithCallBuffer(totalLines)) + operator := testManagerWithSink(t, cfg, sink) operator.persister = testutil.NewUnscopedMockPersister() operator.poll(context.Background()) - actualTokens = append(actualTokens, waitForNTokens(t, emitCalls, totalLines)...) + actualTokens = append(actualTokens, sink.NextTokens(t, totalLines)...) + + require.ElementsMatch(t, expectedTokens, actualTokens) + + for _, temp := range temps { + _, err := os.Stat(temp.Name()) + require.True(t, os.IsNotExist(err)) + } + + // Make more files to ensure deleted files do not cause problems on next poll + temps = make([]*os.File, 0, files) + for i := 0; i < files; i++ { + temps = append(temps, filetest.OpenTemp(t, tempDir)) + } + + expectedTokens = make([][]byte, 0, totalLines) + actualTokens = make([][]byte, 0, totalLines) + for i, temp := range temps { + for j := 0; j < linesPerFile; j++ { + line := filetest.TokenWithLength(200) + message := fmt.Sprintf("%s %d %d", line, i, j) + _, err := temp.WriteString(message + "\n") + require.NoError(t, err) + expectedTokens = append(expectedTokens, []byte(message)) + } + require.NoError(t, temp.Close()) + } + + operator.poll(context.Background()) + actualTokens = append(actualTokens, sink.NextTokens(t, totalLines)...) require.ElementsMatch(t, expectedTokens, actualTokens) @@ -1420,20 +1054,20 @@ func TestMaxBatching(t *testing.T) { cfg.StartAt = "beginning" cfg.MaxConcurrentFiles = maxConcurrentFiles cfg.MaxBatches = maxBatches - emitCalls := make(chan *emitParams, files*linesPerFile) - operator, _ := buildTestManager(t, cfg, withEmitChan(emitCalls)) + sink := emittest.NewSink(emittest.WithCallBuffer(files * linesPerFile)) + operator := testManagerWithSink(t, cfg, sink) operator.persister = testutil.NewUnscopedMockPersister() temps := make([]*os.File, 0, files) for i := 0; i < files; i++ { - temps = append(temps, openTemp(t, tempDir)) + temps = append(temps, filetest.OpenTemp(t, tempDir)) } // Write logs to each file numExpectedTokens := expectedMaxFilesPerPoll * linesPerFile for i, temp := range temps { for j := 0; j < linesPerFile; j++ { - message := fmt.Sprintf("%s %d %d", tokenWithLength(100), i, j) + message := fmt.Sprintf("%s %d %d", filetest.TokenWithLength(100), i, j) _, err := temp.WriteString(message + "\n") require.NoError(t, err) } @@ -1442,13 +1076,13 @@ func TestMaxBatching(t *testing.T) { // Poll and wait for all lines operator.poll(context.Background()) actualTokens := make([][]byte, 0, numExpectedTokens) - actualTokens = append(actualTokens, waitForNTokens(t, emitCalls, numExpectedTokens)...) + actualTokens = append(actualTokens, sink.NextTokens(t, numExpectedTokens)...) require.Len(t, actualTokens, numExpectedTokens) // Write more logs to each file so we can validate that all files are still known for i, temp := range temps { for j := 0; j < linesPerFile; j++ { - message := fmt.Sprintf("%s %d %d", tokenWithLength(20), i, j) + message := fmt.Sprintf("%s %d %d", filetest.TokenWithLength(20), i, j) _, err := temp.WriteString(message + "\n") require.NoError(t, err) } @@ -1457,7 +1091,7 @@ func TestMaxBatching(t *testing.T) { // Poll again and wait for all new lines operator.poll(context.Background()) actualTokens = make([][]byte, 0, numExpectedTokens) - actualTokens = append(actualTokens, waitForNTokens(t, emitCalls, numExpectedTokens)...) + actualTokens = append(actualTokens, sink.NextTokens(t, numExpectedTokens)...) require.Len(t, actualTokens, numExpectedTokens) } @@ -1474,18 +1108,18 @@ func TestReadExistingLogsWithHeader(t *testing.T) { cfg.StartAt = "beginning" cfg = cfg.withHeader("^#", "(?P[A-z]+): (?P[A-z]+)") - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) // Create a file, then start - temp := openTemp(t, tempDir) - writeString(t, temp, "#headerField: headerValue\ntestlog\n") + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, "#headerField: headerValue\ntestlog\n") require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) defer func() { require.NoError(t, operator.Stop()) }() - waitForTokenWithAttributes(t, emitCalls, []byte("testlog"), map[string]any{ + sink.ExpectCall(t, []byte("testlog"), map[string]any{ "header_key": "headerField", "header_value": "headerValue", attrs.LogFileName: filepath.Base(temp.Name()), @@ -1493,10 +1127,8 @@ func TestReadExistingLogsWithHeader(t *testing.T) { } func TestDeleteAfterRead_SkipPartials(t *testing.T) { - bytesPerLine := 100 - shortFileLine := tokenWithLength(bytesPerLine - 1) + shortFileLine := "short file line" longFileLines := 100000 - longFileFirstLine := "first line of long file\n" require.NoError(t, featuregate.GlobalRegistry().Set(allowFileDeletion.ID(), true)) defer func() { @@ -1507,26 +1139,24 @@ func TestDeleteAfterRead_SkipPartials(t *testing.T) { cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" cfg.DeleteAfterRead = true - emitCalls := make(chan *emitParams, longFileLines+1) - operator, _ := buildTestManager(t, cfg, withEmitChan(emitCalls)) + sink := emittest.NewSink(emittest.WithCallBuffer(longFileLines + 1)) + operator := testManagerWithSink(t, cfg, sink) operator.persister = testutil.NewUnscopedMockPersister() - shortFile := openTemp(t, tempDir) - _, err := shortFile.WriteString(string(shortFileLine) + "\n") + shortFile := filetest.OpenTemp(t, tempDir) + _, err := shortFile.WriteString(shortFileLine + "\n") require.NoError(t, err) require.NoError(t, shortFile.Close()) - longFile := openTemp(t, tempDir) - _, err = longFile.WriteString(longFileFirstLine) - require.NoError(t, err) + longFile := filetest.OpenTemp(t, tempDir) for line := 0; line < longFileLines; line++ { - _, err := longFile.WriteString(string(tokenWithLength(bytesPerLine-1)) + "\n") + _, err := longFile.WriteString(string(filetest.TokenWithLength(100)) + "\n") require.NoError(t, err) } require.NoError(t, longFile.Close()) // Verify we have no checkpointed files - require.Equal(t, 0, len(operator.knownFiles)) + require.Equal(t, 0, operator.tracker.TotalReaders()) // Wait until the only line in the short file and // at least one line from the long file have been consumed @@ -1540,22 +1170,26 @@ func TestDeleteAfterRead_SkipPartials(t *testing.T) { operator.poll(ctx) }() - for !(shortOne && longOne) { - if line := waitForEmit(t, emitCalls); string(line.token) == string(shortFileLine) { + for !shortOne || !longOne { + if token := sink.NextToken(t); string(token) == shortFileLine { shortOne = true } else { longOne = true } } + // Short file was fully consumed and should eventually be deleted. + // Enforce assertion before canceling because EOF is not necessarily detected + // immediately when the token is emitted. An additional scan may be necessary. + require.EventuallyWithT(t, func(c *assert.CollectT) { + assert.NoFileExists(c, shortFile.Name()) + }, 100*time.Millisecond, time.Millisecond) + // Stop consuming before long file has been fully consumed cancel() wg.Wait() - // short file was fully consumed and should have been deleted - require.NoFileExists(t, shortFile.Name()) - - // long file was partially consumed and should NOT have been deleted + // Long file was partially consumed and should NOT have been deleted. require.FileExists(t, longFile.Name()) } @@ -1570,28 +1204,28 @@ func TestHeaderPersistance(t *testing.T) { cfg.StartAt = "beginning" cfg = cfg.withHeader("^#", "(?P[A-z]+): (?P[A-z]+)") - op1, emitCalls1 := buildTestManager(t, cfg) + op1, sink1 := testManager(t, cfg) // Create a file, then start - temp := openTemp(t, tempDir) - writeString(t, temp, "#headerField: headerValue\nlog line\n") + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, "#headerField: headerValue\nlog line\n") persister := testutil.NewUnscopedMockPersister() require.NoError(t, op1.Start(persister)) - waitForTokenWithAttributes(t, emitCalls1, []byte("log line"), map[string]any{ + sink1.ExpectCall(t, []byte("log line"), map[string]any{ "header_key": "headerField", "header_value": "headerValue", attrs.LogFileName: filepath.Base(temp.Name()), }) require.NoError(t, op1.Stop()) - writeString(t, temp, "log line 2\n") + filetest.WriteString(t, temp, "log line 2\n") - op2, emitCalls2 := buildTestManager(t, cfg) + op2, sink2 := testManager(t, cfg) require.NoError(t, op2.Start(persister)) - waitForTokenWithAttributes(t, emitCalls2, []byte("log line 2"), map[string]any{ + sink2.ExpectCall(t, []byte("log line 2"), map[string]any{ "header_key": "headerField", "header_value": "headerValue", attrs.LogFileName: filepath.Base(temp.Name()), @@ -1610,11 +1244,11 @@ func TestHeaderPersistanceInHeader(t *testing.T) { cfg1.StartAt = "beginning" cfg1 = cfg1.withHeader(`^\|`, "headerField1: (?P[A-z0-9]+)") - op1, _ := buildTestManager(t, cfg1) + op1, _ := testManager(t, cfg1) // Create a file, then start - temp := openTemp(t, tempDir) - writeString(t, temp, "|headerField1: headerValue1\n") + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, "|headerField1: headerValue1\n") persister := testutil.NewUnscopedMockPersister() @@ -1623,16 +1257,16 @@ func TestHeaderPersistanceInHeader(t *testing.T) { time.Sleep(2 * cfg1.PollInterval) require.NoError(t, op1.Stop()) - writeString(t, temp, "|headerField2: headerValue2\nlog line\n") + filetest.WriteString(t, temp, "|headerField2: headerValue2\nlog line\n") cfg2 := NewConfig().includeDir(tempDir) cfg2.StartAt = "beginning" cfg2 = cfg2.withHeader(`^\|`, "headerField2: (?P[A-z0-9]+)") - op2, emitCalls := buildTestManager(t, cfg2) + op2, sink := testManager(t, cfg2) require.NoError(t, op2.Start(persister)) - waitForTokenWithAttributes(t, emitCalls, []byte("log line"), map[string]any{ + sink.ExpectCall(t, []byte("log line"), map[string]any{ "header_value_1": "headerValue1", "header_value_2": "headerValue2", attrs.LogFileName: filepath.Base(temp.Name()), @@ -1646,32 +1280,146 @@ func TestStalePartialFingerprintDiscarded(t *testing.T) { cfg := NewConfig().includeDir(tempDir) cfg.FingerprintSize = 18 cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) operator.persister = testutil.NewUnscopedMockPersister() // Both of they will be include - file1 := openTempWithPattern(t, tempDir, "*.log1") - file2 := openTempWithPattern(t, tempDir, "*.log2") + file1 := filetest.OpenTempWithPattern(t, tempDir, "*.log1") + file2 := filetest.OpenTempWithPattern(t, tempDir, "*.log2") // Two same fingerprint file , and smaller than config size content := "aaaaaaaaaaa" - writeString(t, file1, content+"\n") - writeString(t, file2, content+"\n") + filetest.WriteString(t, file1, content+"\n") + filetest.WriteString(t, file2, content+"\n") operator.poll(context.Background()) // one file will be exclude, ingest only one content - waitForToken(t, emitCalls, []byte(content)) - expectNoTokens(t, emitCalls) + sink.ExpectToken(t, []byte(content)) + sink.ExpectNoCalls(t) operator.wg.Wait() - require.Len(t, operator.previousPollFiles, 1) + if runtime.GOOS != "windows" { + // On windows, we never keep files in previousPollFiles, so we don't expect to see them here + require.Equal(t, len(operator.tracker.PreviousPollFiles()), 1) + } // keep append data to file1 and file2 newContent := "bbbbbbbbbbbb" newContent1 := "ddd" - writeString(t, file1, newContent1+"\n") - writeString(t, file2, newContent+"\n") + filetest.WriteString(t, file1, newContent1+"\n") + filetest.WriteString(t, file2, newContent+"\n") operator.poll(context.Background()) // We should have updated the offset for one of the files, so the second file should now // be ingested from the beginning - waitForTokens(t, emitCalls, []byte(content), []byte(newContent1), []byte(newContent)) + sink.ExpectTokens(t, []byte(content), []byte(newContent1), []byte(newContent)) + operator.wg.Wait() +} + +func TestWindowsFilesClosedImmediately(t *testing.T) { + t.Parallel() + + tempDir := t.TempDir() + cfg := NewConfig().includeDir(tempDir) + cfg.StartAt = "beginning" + operator, sink := testManager(t, cfg) + + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, "testlog\n") + require.NoError(t, temp.Close()) + + operator.poll(context.Background()) + sink.ExpectToken(t, []byte("testlog")) + + // On Windows, poll should close the file after reading it. We can test this by trying to move it. + require.NoError(t, os.Rename(temp.Name(), temp.Name()+"_renamed")) +} + +func TestDelayedDisambiguation(t *testing.T) { + t.Parallel() + tempDir := t.TempDir() + cfg := NewConfig().includeDir(tempDir) + cfg.FingerprintSize = 18 + cfg.StartAt = "beginning" + operator, sink := testManager(t, cfg) + operator.persister = testutil.NewMockPersister("test") + + // Two identical files, smaller than fingerprint size + file1 := filetest.OpenTempWithPattern(t, tempDir, "*.log1") + file2 := filetest.OpenTempWithPattern(t, tempDir, "*.log2") + + sameContent := "aaaaaaaaaaa" + filetest.WriteString(t, file1, sameContent+"\n") + filetest.WriteString(t, file2, sameContent+"\n") + operator.poll(context.Background()) + + token, attributes := sink.NextCall(t) + require.Equal(t, []byte(sameContent), token) + sink.ExpectNoCallsUntil(t, 100*time.Millisecond) operator.wg.Wait() + + // Append different data + newContent1 := "more content in file 1 only" + newContent2 := "different content in file 2" + filetest.WriteString(t, file1, newContent1+"\n") + filetest.WriteString(t, file2, newContent2+"\n") + operator.poll(context.Background()) + + var sameTokenOtherFile emittest.Call + if attributes[attrs.LogFileName].(string) == filepath.Base(file1.Name()) { + sameTokenOtherFile = emittest.Call{Token: []byte(sameContent), Attrs: map[string]any{attrs.LogFileName: filepath.Base(file2.Name())}} + } else { + sameTokenOtherFile = emittest.Call{Token: []byte(sameContent), Attrs: map[string]any{attrs.LogFileName: filepath.Base(file1.Name())}} + } + newFromFile1 := emittest.Call{Token: []byte(newContent1), Attrs: map[string]any{attrs.LogFileName: filepath.Base(file1.Name())}} + newFromFile2 := emittest.Call{Token: []byte(newContent2), Attrs: map[string]any{attrs.LogFileName: filepath.Base(file2.Name())}} + sink.ExpectCalls(t, &sameTokenOtherFile, &newFromFile1, &newFromFile2) +} + +func TestNoLostPartial(t *testing.T) { + t.Parallel() + tempDir := t.TempDir() + cfg := NewConfig().includeDir(tempDir) + cfg.FingerprintSize = 18 + cfg.StartAt = "beginning" + operator, sink := testManager(t, cfg) + operator.persister = testutil.NewMockPersister("test") + + // Two same fingerprint file , and smaller than config size + file1 := filetest.OpenTempWithPattern(t, tempDir, "*.log1") + file2 := filetest.OpenTempWithPattern(t, tempDir, "*.log2") + + sameContent := "aaaaaaaaaaa" + filetest.WriteString(t, file1, sameContent+"\n") + filetest.WriteString(t, file2, sameContent+"\n") + operator.poll(context.Background()) + + token, attributes := sink.NextCall(t) + require.Equal(t, []byte(sameContent), token) + sink.ExpectNoCallsUntil(t, 100*time.Millisecond) + operator.wg.Wait() + + newContent1 := "additional content in file 1 only" + filetest.WriteString(t, file1, newContent1+"\n") + + var otherFileName string + if attributes[attrs.LogFileName].(string) == filepath.Base(file1.Name()) { + otherFileName = filepath.Base(file2.Name()) + } else { + otherFileName = filepath.Base(file1.Name()) + } + + var foundSameFromOtherFile, foundNewFromFileOne bool + require.Eventually(t, func() bool { + operator.poll(context.Background()) + defer operator.wg.Wait() + + token, attributes = sink.NextCall(t) + switch { + case string(token) == sameContent && attributes[attrs.LogFileName].(string) == otherFileName: + foundSameFromOtherFile = true + case string(token) == newContent1 && attributes[attrs.LogFileName].(string) == filepath.Base(file1.Name()): + foundNewFromFileOne = true + default: + t.Errorf("unexpected token from file %q: %s", filepath.Base(attributes[attrs.LogFileName].(string)), token) + } + return foundSameFromOtherFile && foundNewFromFileOne + }, time.Second, 100*time.Millisecond) } diff --git a/pkg/stanza/fileconsumer/file_windows.go b/pkg/stanza/fileconsumer/file_windows.go index eb79821c3569..d92679197abd 100644 --- a/pkg/stanza/fileconsumer/file_windows.go +++ b/pkg/stanza/fileconsumer/file_windows.go @@ -2,16 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package fileconsumer // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer" import ( "context" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" ) -func (m *Manager) readLostFiles(ctx context.Context, newReaders []*reader.Reader) { - return +// Noop on windows because we close files immediately after reading. +func (m *Manager) readLostFiles(ctx context.Context) { } diff --git a/pkg/stanza/fileconsumer/internal/checkpoint/checkpoint.go b/pkg/stanza/fileconsumer/internal/checkpoint/checkpoint.go index 964a2e324c09..b75933abcc28 100644 --- a/pkg/stanza/fileconsumer/internal/checkpoint/checkpoint.go +++ b/pkg/stanza/fileconsumer/internal/checkpoint/checkpoint.go @@ -68,6 +68,9 @@ func Load(ctx context.Context, persister operator.Persister) ([]*reader.Metadata if err = dec.Decode(rmd); err != nil { return nil, err } + if rmd.FileAttributes == nil { + rmd.FileAttributes = map[string]any{} + } // Migrate readers that used FileAttributes.HeaderAttributes // This block can be removed in a future release, tentatively v0.90.0 diff --git a/pkg/stanza/fileconsumer/internal/checkpoint/checkpoint_test.go b/pkg/stanza/fileconsumer/internal/checkpoint/checkpoint_test.go index fd239efdb755..fea2ca2bc5a7 100644 --- a/pkg/stanza/fileconsumer/internal/checkpoint/checkpoint_test.go +++ b/pkg/stanza/fileconsumer/internal/checkpoint/checkpoint_test.go @@ -52,8 +52,9 @@ func TestNopEncodingDifferentLogSizes(t *testing.T) { "one", []*reader.Metadata{ { - Fingerprint: &fingerprint.Fingerprint{FirstBytes: []byte("foo")}, - Offset: 3, + FileAttributes: make(map[string]any), + Fingerprint: fingerprint.New([]byte("foo")), + Offset: 3, }, }, }, @@ -61,12 +62,14 @@ func TestNopEncodingDifferentLogSizes(t *testing.T) { "two", []*reader.Metadata{ { - Fingerprint: &fingerprint.Fingerprint{FirstBytes: []byte("foo")}, - Offset: 3, + FileAttributes: make(map[string]any), + Fingerprint: fingerprint.New([]byte("foo")), + Offset: 3, }, { - Fingerprint: &fingerprint.Fingerprint{FirstBytes: []byte("barrrr")}, - Offset: 6, + FileAttributes: make(map[string]any), + Fingerprint: fingerprint.New([]byte("barrrr")), + Offset: 6, }, }, }, @@ -74,19 +77,20 @@ func TestNopEncodingDifferentLogSizes(t *testing.T) { "other_fields", []*reader.Metadata{ { - Fingerprint: &fingerprint.Fingerprint{FirstBytes: []byte("foo")}, + Fingerprint: fingerprint.New([]byte("foo")), Offset: 3, FileAttributes: map[string]any{ "hello": "world", }, }, { - Fingerprint: &fingerprint.Fingerprint{FirstBytes: []byte("barrrr")}, + FileAttributes: make(map[string]any), + Fingerprint: fingerprint.New([]byte("barrrr")), Offset: 6, HeaderFinalized: true, }, { - Fingerprint: &fingerprint.Fingerprint{FirstBytes: []byte("ab")}, + Fingerprint: fingerprint.New([]byte("ab")), Offset: 2, FileAttributes: map[string]any{ "hello2": "world2", @@ -117,7 +121,7 @@ func TestMigrateHeaderAttributes(t *testing.T) { p := testutil.NewUnscopedMockPersister() saveDeprecated(t, p, &deprecatedMetadata{ Metadata: reader.Metadata{ - Fingerprint: &fingerprint.Fingerprint{FirstBytes: []byte("foo")}, + Fingerprint: fingerprint.New([]byte("foo")), Offset: 3, FileAttributes: map[string]any{ "HeaderAttributes": map[string]any{ @@ -130,7 +134,7 @@ func TestMigrateHeaderAttributes(t *testing.T) { assert.NoError(t, err) assert.Equal(t, []*reader.Metadata{ { - Fingerprint: &fingerprint.Fingerprint{FirstBytes: []byte("foo")}, + Fingerprint: fingerprint.New([]byte("foo")), Offset: 3, FileAttributes: map[string]any{ "hello": "world", diff --git a/pkg/stanza/fileconsumer/internal/checkpoint/package_test.go b/pkg/stanza/fileconsumer/internal/checkpoint/package_test.go new file mode 100644 index 000000000000..993410d0ab84 --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/checkpoint/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package checkpoint + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/fileconsumer/internal/emittest/nop.go b/pkg/stanza/fileconsumer/internal/emittest/nop.go new file mode 100644 index 000000000000..09c91b7949db --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/emittest/nop.go @@ -0,0 +1,12 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package emittest // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/emittest" + +import ( + "context" +) + +func Nop(_ context.Context, _ []byte, _ map[string]any) error { + return nil +} diff --git a/pkg/stanza/fileconsumer/internal/emittest/nop_test.go b/pkg/stanza/fileconsumer/internal/emittest/nop_test.go new file mode 100644 index 000000000000..470327925fd4 --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/emittest/nop_test.go @@ -0,0 +1,15 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package emittest + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestNop(t *testing.T) { + require.NoError(t, Nop(context.Background(), nil, nil)) +} diff --git a/pkg/stanza/fileconsumer/internal/emittest/package_test.go b/pkg/stanza/fileconsumer/internal/emittest/package_test.go new file mode 100644 index 000000000000..d46233685d4f --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/emittest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package emittest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/fileconsumer/internal/emittest/sink.go b/pkg/stanza/fileconsumer/internal/emittest/sink.go new file mode 100644 index 000000000000..7f5fd77d367b --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/emittest/sink.go @@ -0,0 +1,155 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package emittest // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/emittest" + +import ( + "context" + "fmt" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/emit" +) + +type sinkCfg struct { + emitChanLen int + timeout time.Duration +} + +type SinkOpt func(*sinkCfg) + +type Call struct { + Token []byte + Attrs map[string]any +} + +type Sink struct { + emitChan chan *Call + timeout time.Duration + emit.Callback +} + +func WithCallBuffer(n int) SinkOpt { + return func(cfg *sinkCfg) { + cfg.emitChanLen = n + } +} + +func WithTimeout(d time.Duration) SinkOpt { + return func(cfg *sinkCfg) { + cfg.timeout = d + } +} + +func NewSink(opts ...SinkOpt) *Sink { + cfg := &sinkCfg{ + emitChanLen: 100, + timeout: 3 * time.Second, + } + for _, opt := range opts { + opt(cfg) + } + emitChan := make(chan *Call, cfg.emitChanLen) + return &Sink{ + emitChan: emitChan, + timeout: cfg.timeout, + Callback: func(_ context.Context, token []byte, attrs map[string]any) error { + copied := make([]byte, len(token)) + copy(copied, token) + emitChan <- &Call{copied, attrs} + return nil + }, + } +} + +func (s *Sink) NextToken(t *testing.T) []byte { + token, _ := s.NextCall(t) + return token +} + +func (s *Sink) NextTokens(t *testing.T, n int) [][]byte { + emitChan := make([][]byte, 0, n) + for i := 0; i < n; i++ { + select { + case call := <-s.emitChan: + emitChan = append(emitChan, call.Token) + case <-time.After(s.timeout): + assert.Fail(t, "Timed out waiting for message") + return nil + } + } + return emitChan +} + +func (s *Sink) NextCall(t *testing.T) ([]byte, map[string]any) { + select { + case c := <-s.emitChan: + return c.Token, c.Attrs + case <-time.After(s.timeout): + assert.Fail(t, "Timed out waiting for message") + return nil, nil + } +} + +func (s *Sink) ExpectToken(t *testing.T, expected []byte) { + select { + case call := <-s.emitChan: + assert.Equal(t, expected, call.Token) + case <-time.After(s.timeout): + assert.Fail(t, fmt.Sprintf("Timed out waiting for token: %s", expected)) + } +} + +func (s *Sink) ExpectTokens(t *testing.T, expected ...[]byte) { + actual := make([][]byte, 0, len(expected)) + for i := 0; i < len(expected); i++ { + select { + case call := <-s.emitChan: + actual = append(actual, call.Token) + case <-time.After(s.timeout): + assert.Fail(t, fmt.Sprintf("timeout: expected: %d, actual: %d", len(expected), i)) + return + } + } + require.ElementsMatch(t, expected, actual) +} + +func (s *Sink) ExpectCall(t *testing.T, expected []byte, attrs map[string]any) { + select { + case c := <-s.emitChan: + assert.Equal(t, expected, c.Token) + assert.Equal(t, attrs, c.Attrs) + case <-time.After(s.timeout): + assert.Fail(t, fmt.Sprintf("Timed out waiting for token: %s", expected)) + } +} + +func (s *Sink) ExpectCalls(t *testing.T, expected ...*Call) { + actual := make([]*Call, 0, len(expected)) + for i := 0; i < len(expected); i++ { + select { + case call := <-s.emitChan: + actual = append(actual, call) + case <-time.After(s.timeout): + assert.Fail(t, fmt.Sprintf("timeout: expected: %d, actual: %d", len(expected), i)) + return + } + } + require.ElementsMatch(t, expected, actual) +} + +func (s *Sink) ExpectNoCalls(t *testing.T) { + s.ExpectNoCallsUntil(t, 200*time.Millisecond) +} + +func (s *Sink) ExpectNoCallsUntil(t *testing.T, d time.Duration) { + select { + case c := <-s.emitChan: + assert.Fail(t, "Received unexpected message", "Message: %s", c.Token) + case <-time.After(d): + } +} diff --git a/pkg/stanza/fileconsumer/internal/emittest/sink_test.go b/pkg/stanza/fileconsumer/internal/emittest/sink_test.go new file mode 100644 index 000000000000..326400b7e3e8 --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/emittest/sink_test.go @@ -0,0 +1,209 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package emittest + +import ( + "context" + "fmt" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestNextToken(t *testing.T) { + s, testCalls := sinkTest(t) + for _, c := range testCalls { + token := s.NextToken(t) + assert.Equal(t, c.Token, token) + } +} + +func TestNextTokenTimeout(t *testing.T) { + s, testCalls := sinkTest(t, WithTimeout(10*time.Millisecond)) + for _, c := range testCalls { + token := s.NextToken(t) + assert.Equal(t, c.Token, token) + } + + // Create a new T so we can expect it to fail without failing the overall test. + tt := new(testing.T) + s.NextToken(tt) + assert.True(t, tt.Failed()) +} + +func TestNextTokens(t *testing.T) { + s, testCalls := sinkTest(t) + for i := 0; i < 5; i++ { + tokens := s.NextTokens(t, 2) + assert.Equal(t, testCalls[2*i].Token, tokens[0]) + assert.Equal(t, testCalls[2*i+1].Token, tokens[1]) + } +} + +func TestNextTokensTimeout(t *testing.T) { + s, testCalls := sinkTest(t, WithTimeout(10*time.Millisecond)) + for i := 0; i < 5; i++ { + tokens := s.NextTokens(t, 2) + assert.Equal(t, testCalls[2*i].Token, tokens[0]) + assert.Equal(t, testCalls[2*i+1].Token, tokens[1]) + } + + // Create a new T so we can expect it to fail without failing the overall test. + tt := new(testing.T) + s.NextTokens(tt, 2) + assert.True(t, tt.Failed()) +} + +func TestNextCall(t *testing.T) { + s, testCalls := sinkTest(t) + for _, c := range testCalls { + token, attributes := s.NextCall(t) + require.Equal(t, c.Token, token) + require.Equal(t, c.Attrs, attributes) + } +} + +func TestNextCallTimeout(t *testing.T) { + s, testCalls := sinkTest(t, WithTimeout(10*time.Millisecond)) + for _, c := range testCalls { + token, attributes := s.NextCall(t) + require.Equal(t, c.Token, token) + require.Equal(t, c.Attrs, attributes) + } + + // Create a new T so we can expect it to fail without failing the overall test. + tt := new(testing.T) + s.NextCall(tt) + assert.True(t, tt.Failed()) +} + +func TestExpectToken(t *testing.T) { + s, testCalls := sinkTest(t) + for _, c := range testCalls { + s.ExpectToken(t, c.Token) + } +} + +func TestExpectTokenTimeout(t *testing.T) { + s, testCalls := sinkTest(t, WithTimeout(10*time.Millisecond)) + for _, c := range testCalls { + s.ExpectToken(t, c.Token) + } + + // Create a new T so we can expect it to fail without failing the overall test. + tt := new(testing.T) + s.ExpectToken(tt, []byte("foo")) + assert.True(t, tt.Failed()) +} + +func TestExpectTokens(t *testing.T) { + s, testCalls := sinkTest(t) + for i := 0; i < 5; i++ { + s.ExpectTokens(t, testCalls[2*i].Token, testCalls[2*i+1].Token) + } +} + +func TestExpectTokensTimeout(t *testing.T) { + s, testCalls := sinkTest(t, WithTimeout(10*time.Millisecond)) + for i := 0; i < 5; i++ { + s.ExpectTokens(t, testCalls[2*i].Token, testCalls[2*i+1].Token) + } + + // Create a new T so we can expect it to fail without failing the overall test. + tt := new(testing.T) + s.ExpectTokens(tt, []byte("foo"), []byte("bar")) + assert.True(t, tt.Failed()) +} + +func TestExpectCall(t *testing.T) { + s, testCalls := sinkTest(t) + for _, c := range testCalls { + s.ExpectCall(t, c.Token, c.Attrs) + } +} + +func TestExpectCallTimeout(t *testing.T) { + s, testCalls := sinkTest(t, WithTimeout(10*time.Millisecond)) + for _, c := range testCalls { + s.ExpectCall(t, c.Token, c.Attrs) + } + + // Create a new T so we can expect it to fail without failing the overall test. + tt := new(testing.T) + s.ExpectCall(tt, []byte("foo"), nil) + assert.True(t, tt.Failed()) +} + +func TestExpectCalls(t *testing.T) { + s, testCalls := sinkTest(t) + testCallsOutOfOrder := make([]*Call, 0, 10) + for i := 0; i < len(testCalls); i += 2 { + testCallsOutOfOrder = append(testCallsOutOfOrder, testCalls[i]) + } + for i := 1; i < len(testCalls); i += 2 { + testCallsOutOfOrder = append(testCallsOutOfOrder, testCalls[i]) + } + s.ExpectCalls(t, testCallsOutOfOrder...) +} + +func TestExpectCallsTimeout(t *testing.T) { + s, testCalls := sinkTest(t, WithTimeout(10*time.Millisecond)) + testCallsOutOfOrder := make([]*Call, 0, 10) + for i := 0; i < len(testCalls); i += 2 { + testCallsOutOfOrder = append(testCallsOutOfOrder, testCalls[i]) + } + for i := 1; i < len(testCalls); i += 2 { + testCallsOutOfOrder = append(testCallsOutOfOrder, testCalls[i]) + } + s.ExpectCalls(t, testCallsOutOfOrder...) + + // Create a new T so we can expect it to fail without failing the overall test. + tt := new(testing.T) + s.ExpectCalls(tt, new(Call)) + assert.True(t, tt.Failed()) +} + +func TestExpectNoCalls(t *testing.T) { + s, _ := sinkTest(t) + s.NextTokens(t, 10) // drain the channel + s.ExpectNoCalls(t) +} + +func TestExpectNoCallsFailure(t *testing.T) { + s, _ := sinkTest(t) + s.NextTokens(t, 9) // partially drain the channel + + // Create a new T so we can expect it to fail without failing the overall test. + tt := new(testing.T) + s.ExpectNoCalls(tt) + assert.True(t, tt.Failed()) +} + +func TestWithCallBuffer(t *testing.T) { + s, testCalls := sinkTest(t, WithCallBuffer(5)) + for i := 0; i < 10; i++ { + s.ExpectCall(t, testCalls[i].Token, testCalls[i].Attrs) + } +} + +func sinkTest(t *testing.T, opts ...SinkOpt) (*Sink, []*Call) { + s := NewSink(opts...) + testCalls := make([]*Call, 0, 10) + for i := 0; i < 10; i++ { + testCalls = append(testCalls, &Call{ + Token: []byte(fmt.Sprintf("token-%d", i)), + Attrs: map[string]any{ + "key": fmt.Sprintf("value-%d", i), + }, + }) + } + go func() { + for _, c := range testCalls { + require.NoError(t, s.Callback(context.Background(), c.Token, c.Attrs)) + } + }() + return s, testCalls +} diff --git a/pkg/stanza/fileconsumer/internal/fileset/fileset.go b/pkg/stanza/fileconsumer/internal/fileset/fileset.go new file mode 100644 index 000000000000..3d1cf50fb143 --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/fileset/fileset.go @@ -0,0 +1,76 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package fileset // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fileset" + +import ( + "errors" + + "golang.org/x/exp/slices" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fingerprint" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" +) + +var errFilesetEmpty = errors.New("pop() on empty Fileset") + +var ( + _ Matchable = (*reader.Reader)(nil) + _ Matchable = (*reader.Metadata)(nil) +) + +type Matchable interface { + GetFingerprint() *fingerprint.Fingerprint +} + +type Fileset[T Matchable] struct { + readers []T +} + +func New[T Matchable](capacity int) *Fileset[T] { + return &Fileset[T]{readers: make([]T, 0, capacity)} +} + +func (set *Fileset[T]) Len() int { + return len(set.readers) +} + +func (set *Fileset[T]) Get() []T { + return set.readers +} + +func (set *Fileset[T]) Pop() (T, error) { + // return first element from the array and remove it + var val T + if len(set.readers) == 0 { + return val, errFilesetEmpty + } + r := set.readers[0] + set.readers = slices.Delete(set.readers, 0, 1) + return r, nil +} + +func (set *Fileset[T]) Add(readers ...T) { + // add open readers + set.readers = append(set.readers, readers...) +} + +func (set *Fileset[T]) Match(fp *fingerprint.Fingerprint, cmp func(a, b *fingerprint.Fingerprint) bool) T { + var val T + for idx, r := range set.readers { + if cmp(fp, r.GetFingerprint()) { + set.readers = append(set.readers[:idx], set.readers[idx+1:]...) + return r + } + } + return val +} + +// comparators +func StartsWith(a, b *fingerprint.Fingerprint) bool { + return a.StartsWith(b) +} + +func Equal(a, b *fingerprint.Fingerprint) bool { + return a.Equal(b) +} diff --git a/pkg/stanza/fileconsumer/internal/fileset/fileset_test.go b/pkg/stanza/fileconsumer/internal/fileset/fileset_test.go new file mode 100644 index 000000000000..0d83ef8d5db6 --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/fileset/fileset_test.go @@ -0,0 +1,110 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package fileset // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fileset" + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fingerprint" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" +) + +type test[T Matchable] struct { + name string + fileset *Fileset[T] + ops []func(t *testing.T, fileset *Fileset[T]) +} + +func (t *test[T]) init() { + t.fileset = New[T](10) +} + +func push[T Matchable](ele ...T) func(t *testing.T, fileset *Fileset[T]) { + return func(t *testing.T, fileset *Fileset[T]) { + pr := fileset.Len() + fileset.Add(ele...) + require.Equal(t, pr+len(ele), fileset.Len()) + } +} + +func pop[T Matchable](expectedErr error, expectedElemet T) func(t *testing.T, fileset *Fileset[T]) { + return func(t *testing.T, fileset *Fileset[T]) { + pr := fileset.Len() + el, err := fileset.Pop() + if expectedErr == nil { + require.NoError(t, err) + require.Equal(t, el, expectedElemet) + require.Equal(t, pr-1, fileset.Len()) + } else { + require.ErrorIs(t, err, expectedErr) + } + } +} + +func match[T Matchable](ele T, expect bool) func(t *testing.T, fileset *Fileset[T]) { + return func(t *testing.T, fileset *Fileset[T]) { + pr := fileset.Len() + r := fileset.Match(ele.GetFingerprint(), StartsWith) + if expect { + require.NotNil(t, r) + require.Equal(t, pr-1, fileset.Len()) + } else { + require.Nil(t, r) + require.Equal(t, pr, fileset.Len()) + } + + } +} + +func newReader(bytes []byte) *reader.Reader { + return &reader.Reader{ + Metadata: &reader.Metadata{ + Fingerprint: fingerprint.New(bytes), + }, + } +} + +func TestFilesetReader(t *testing.T) { + testCases := []test[*reader.Reader]{ + { + name: "test_match_push_reset", + ops: []func(t *testing.T, fileset *Fileset[*reader.Reader]){ + push(newReader([]byte("ABCDEF")), newReader([]byte("QWERT"))), + + // match() removes the matched item and returns it + match(newReader([]byte("ABCDEFGHI")), true), + match(newReader([]byte("ABCDEFGHI")), false), + + push(newReader([]byte("XYZ"))), + match(newReader([]byte("ABCDEF")), false), + match(newReader([]byte("QWERT")), true), // should still be present + match(newReader([]byte("XYZabc")), true), + pop(errFilesetEmpty, newReader([]byte(""))), + }, + }, + { + name: "test_pop", + ops: []func(t *testing.T, fileset *Fileset[*reader.Reader]){ + push(newReader([]byte("ABCDEF")), newReader([]byte("QWERT"))), + pop(nil, newReader([]byte("ABCDEF"))), + pop(nil, newReader([]byte("QWERT"))), + pop(errFilesetEmpty, newReader([]byte(""))), + + push(newReader([]byte("XYZ"))), + pop(nil, newReader([]byte("XYZ"))), + pop(errFilesetEmpty, newReader([]byte(""))), + }, + }, + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + tc.init() + for _, op := range tc.ops { + op(t, tc.fileset) + } + }) + } +} diff --git a/pkg/stanza/fileconsumer/internal/filetest/filetest.go b/pkg/stanza/fileconsumer/internal/filetest/filetest.go new file mode 100644 index 000000000000..4c58cf3762a9 --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/filetest/filetest.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filetest // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/filetest" + +import ( + "math/rand" + "os" + "path/filepath" + "testing" + + "github.com/stretchr/testify/require" +) + +func OpenFile(tb testing.TB, path string) *os.File { + file, err := os.OpenFile(path, os.O_CREATE|os.O_RDWR, 0600) + require.NoError(tb, err) + tb.Cleanup(func() { _ = file.Close() }) + return file +} + +func OpenTemp(t testing.TB, tempDir string) *os.File { + return OpenTempWithPattern(t, tempDir, "") +} + +func ReopenTemp(t testing.TB, name string) *os.File { + return OpenTempWithPattern(t, filepath.Dir(name), filepath.Base(name)) +} + +func OpenTempWithPattern(t testing.TB, tempDir, pattern string) *os.File { + file, err := os.CreateTemp(tempDir, pattern) + require.NoError(t, err) + t.Cleanup(func() { _ = file.Close() }) + return file +} + +func WriteString(t testing.TB, file *os.File, s string) { + _, err := file.WriteString(s) + require.NoError(t, err) +} + +func TokenWithLength(length int) []byte { + charset := "abcdefghijklmnopqrstuvwxyz" + b := make([]byte, length) + for i := range b { + b[i] = charset[rand.Intn(len(charset))] + } + return b +} diff --git a/pkg/stanza/fileconsumer/internal/filetest/package_test.go b/pkg/stanza/fileconsumer/internal/filetest/package_test.go new file mode 100644 index 000000000000..3582380f3fc0 --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/filetest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filetest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/fileconsumer/internal/fingerprint/fingerprint.go b/pkg/stanza/fileconsumer/internal/fingerprint/fingerprint.go index fb23296afae9..a61346d8db1c 100644 --- a/pkg/stanza/fileconsumer/internal/fingerprint/fingerprint.go +++ b/pkg/stanza/fileconsumer/internal/fingerprint/fingerprint.go @@ -5,6 +5,7 @@ package fingerprint // import "github.com/open-telemetry/opentelemetry-collector import ( "bytes" + "encoding/json" "errors" "fmt" "io" @@ -18,32 +19,31 @@ const MinSize = 16 // bytes // Fingerprint is used to identify a file // A file's fingerprint is the first N bytes of the file type Fingerprint struct { - FirstBytes []byte + firstBytes []byte } -// New creates a new fingerprint from an open file -func New(file *os.File, size int) (*Fingerprint, error) { - buf := make([]byte, size) +func New(first []byte) *Fingerprint { + return &Fingerprint{firstBytes: first} +} +func NewFromFile(file *os.File, size int) (*Fingerprint, error) { + buf := make([]byte, size) n, err := file.ReadAt(buf, 0) if err != nil && !errors.Is(err, io.EOF) { return nil, fmt.Errorf("reading fingerprint bytes: %w", err) } - - fp := &Fingerprint{ - FirstBytes: buf[:n], - } - - return fp, nil + return New(buf[:n]), nil } // Copy creates a new copy of the fingerprint func (f Fingerprint) Copy() *Fingerprint { - buf := make([]byte, len(f.FirstBytes), cap(f.FirstBytes)) - n := copy(buf, f.FirstBytes) - return &Fingerprint{ - FirstBytes: buf[:n], - } + buf := make([]byte, len(f.firstBytes), cap(f.firstBytes)) + n := copy(buf, f.firstBytes) + return New(buf[:n]) +} + +func (f *Fingerprint) Len() int { + return len(f.firstBytes) } // Equal returns true if the fingerprints have the same FirstBytes, @@ -51,13 +51,13 @@ func (f Fingerprint) Copy() *Fingerprint { // because the primary purpose of a fingerprint is to convey a unique // identity, and only the FirstBytes field contributes to this goal. func (f Fingerprint) Equal(other *Fingerprint) bool { - l0 := len(other.FirstBytes) - l1 := len(f.FirstBytes) + l0 := len(other.firstBytes) + l1 := len(f.firstBytes) if l0 != l1 { return false } for i := 0; i < l0; i++ { - if other.FirstBytes[i] != f.FirstBytes[i] { + if other.firstBytes[i] != f.firstBytes[i] { return false } } @@ -71,13 +71,31 @@ func (f Fingerprint) Equal(other *Fingerprint) bool { // a fingerprint. As the file grows, its fingerprint is updated // until it reaches a maximum size, as configured on the operator func (f Fingerprint) StartsWith(old *Fingerprint) bool { - l0 := len(old.FirstBytes) + l0 := len(old.firstBytes) if l0 == 0 { return false } - l1 := len(f.FirstBytes) + l1 := len(f.firstBytes) if l0 > l1 { return false } - return bytes.Equal(old.FirstBytes[:l0], f.FirstBytes[:l0]) + return bytes.Equal(old.firstBytes[:l0], f.firstBytes[:l0]) +} + +func (f *Fingerprint) MarshalJSON() ([]byte, error) { + m := marshal{FirstBytes: f.firstBytes} + return json.Marshal(&m) +} + +func (f *Fingerprint) UnmarshalJSON(data []byte) error { + m := new(marshal) + if err := json.Unmarshal(data, m); err != nil { + return err + } + f.firstBytes = m.FirstBytes + return nil +} + +type marshal struct { + FirstBytes []byte `json:"first_bytes"` } diff --git a/pkg/stanza/fileconsumer/internal/fingerprint/fingerprint_test.go b/pkg/stanza/fileconsumer/internal/fingerprint/fingerprint_test.go index ff3532456ccd..78f844ef54ac 100644 --- a/pkg/stanza/fileconsumer/internal/fingerprint/fingerprint_test.go +++ b/pkg/stanza/fileconsumer/internal/fingerprint/fingerprint_test.go @@ -36,11 +36,11 @@ func TestNewDoesNotModifyOffset(t *testing.T) { _, err = temp.Seek(0, 0) require.NoError(t, err) - fp, err := New(temp, len(fingerprint)) + fp, err := NewFromFile(temp, len(fingerprint)) require.NoError(t, err) // Validate the fingerprint is the correct size - require.Equal(t, len(fingerprint), len(fp.FirstBytes)) + require.Equal(t, len(fingerprint), len(fp.firstBytes)) // Validate that reading the fingerprint did not adjust the // file descriptor's internal offset (as using Seek does) @@ -52,6 +52,11 @@ func TestNewDoesNotModifyOffset(t *testing.T) { } func TestNew(t *testing.T) { + fp := New([]byte("hello")) + require.Equal(t, []byte("hello"), fp.firstBytes) +} + +func TestNewFromFile(t *testing.T) { cases := []struct { name string fingerprintSize int @@ -109,6 +114,7 @@ func TestNew(t *testing.T) { } for _, tc := range cases { + tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() @@ -125,15 +131,15 @@ func TestNew(t *testing.T) { require.NoError(t, err) require.Equal(t, tc.fileSize, int(info.Size())) - fp, err := New(temp, tc.fingerprintSize) + fp, err := NewFromFile(temp, tc.fingerprintSize) require.NoError(t, err) - require.Equal(t, tc.expectedLen, len(fp.FirstBytes)) + require.Equal(t, tc.expectedLen, len(fp.firstBytes)) }) } } -func TestFingerprintCopy(t *testing.T) { +func TestCopy(t *testing.T) { t.Parallel() cases := []string{ "", @@ -145,36 +151,36 @@ func TestFingerprintCopy(t *testing.T) { } for _, tc := range cases { - fp := &Fingerprint{FirstBytes: []byte(tc)} + fp := New([]byte(tc)) cp := fp.Copy() // Did not change original - require.Equal(t, tc, string(fp.FirstBytes)) + require.Equal(t, tc, string(fp.firstBytes)) // Copy is also good - require.Equal(t, tc, string(cp.FirstBytes)) + require.Equal(t, tc, string(cp.firstBytes)) // Modify copy - cp.FirstBytes = append(cp.FirstBytes, []byte("also")...) + cp.firstBytes = append(cp.firstBytes, []byte("also")...) // Still did not change original - require.Equal(t, tc, string(fp.FirstBytes)) + require.Equal(t, tc, string(fp.firstBytes)) // Copy is modified - require.Equal(t, tc+"also", string(cp.FirstBytes)) + require.Equal(t, tc+"also", string(cp.firstBytes)) } } func TestEqual(t *testing.T) { - empty := &Fingerprint{FirstBytes: []byte("")} - empty2 := &Fingerprint{FirstBytes: []byte("")} - hello := &Fingerprint{FirstBytes: []byte("hello")} - hello2 := &Fingerprint{FirstBytes: []byte("hello")} - world := &Fingerprint{FirstBytes: []byte("world")} - world2 := &Fingerprint{FirstBytes: []byte("world")} - helloworld := &Fingerprint{FirstBytes: []byte("helloworld")} - helloworld2 := &Fingerprint{FirstBytes: []byte("helloworld")} + empty := New([]byte("")) + empty2 := New([]byte("")) + hello := New([]byte("hello")) + hello2 := New([]byte("hello")) + world := New([]byte("world")) + world2 := New([]byte("world")) + helloworld := New([]byte("helloworld")) + helloworld2 := New([]byte("helloworld")) require.True(t, empty.Equal(empty2)) require.True(t, hello.Equal(hello2)) @@ -192,10 +198,10 @@ func TestEqual(t *testing.T) { } func TestStartsWith(t *testing.T) { - empty := &Fingerprint{FirstBytes: []byte("")} - hello := &Fingerprint{FirstBytes: []byte("hello")} - world := &Fingerprint{FirstBytes: []byte("world")} - helloworld := &Fingerprint{FirstBytes: []byte("helloworld")} + empty := New([]byte("")) + hello := New([]byte("hello")) + world := New([]byte("world")) + helloworld := New([]byte("helloworld")) // Empty never matches require.False(t, hello.StartsWith(empty)) @@ -244,7 +250,7 @@ func TestStartsWith_FromFile(t *testing.T) { _, err = fullFile.Write(content) require.NoError(t, err) - fff, err := New(fullFile, fingerprintSize) + fff, err := NewFromFile(fullFile, fingerprintSize) require.NoError(t, err) partialFile, err := os.CreateTemp(tempDir, "") @@ -262,7 +268,7 @@ func TestStartsWith_FromFile(t *testing.T) { _, err = partialFile.Write(content[i:i]) require.NoError(t, err) - pff, err := New(partialFile, fingerprintSize) + pff, err := NewFromFile(partialFile, fingerprintSize) require.NoError(t, err) require.True(t, fff.StartsWith(pff)) @@ -277,3 +283,14 @@ func tokenWithLength(length int) []byte { } return b } + +func TestMarshalUnmarshal(t *testing.T) { + fp := New([]byte("hello")) + b, err := fp.MarshalJSON() + require.NoError(t, err) + + fp2 := new(Fingerprint) + require.NoError(t, fp2.UnmarshalJSON(b)) + + require.Equal(t, fp, fp2) +} diff --git a/pkg/stanza/fileconsumer/internal/fingerprint/package_test.go b/pkg/stanza/fileconsumer/internal/fingerprint/package_test.go new file mode 100644 index 000000000000..9aa983541ef2 --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/fingerprint/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package fingerprint + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/fileconsumer/internal/header/package_test.go b/pkg/stanza/fileconsumer/internal/header/package_test.go new file mode 100644 index 000000000000..e4f09f9a6c74 --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/header/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package header + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/fileconsumer/internal/reader/factory.go b/pkg/stanza/fileconsumer/internal/reader/factory.go index c083122e42fe..1e1d37b0dbcd 100644 --- a/pkg/stanza/fileconsumer/internal/reader/factory.go +++ b/pkg/stanza/fileconsumer/internal/reader/factory.go @@ -5,39 +5,55 @@ package reader // import "github.com/open-telemetry/opentelemetry-collector-cont import ( "bufio" + "errors" + "fmt" "os" - "path/filepath" - "runtime" "time" "go.uber.org/zap" "golang.org/x/text/encoding" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/attrs" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/decode" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/attrs" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/emit" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fingerprint" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/header" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/flush" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/trim" ) +const ( + DefaultMaxLogSize = 1024 * 1024 + DefaultFlushPeriod = 500 * time.Millisecond +) + type Factory struct { *zap.SugaredLogger - Config *Config - FromBeginning bool - Encoding encoding.Encoding - HeaderConfig *header.Config - SplitFunc bufio.SplitFunc - TrimFunc trim.Func + HeaderConfig *header.Config + FromBeginning bool + FingerprintSize int + InitialBufferSize int + MaxLogSize int + Encoding encoding.Encoding + SplitFunc bufio.SplitFunc + TrimFunc trim.Func + FlushTimeout time.Duration + EmitFunc emit.Callback + Attributes attrs.Resolver + DeleteAtEOF bool } func (f *Factory) NewFingerprint(file *os.File) (*fingerprint.Fingerprint, error) { - return fingerprint.New(file, f.Config.FingerprintSize) + return fingerprint.NewFromFile(file, f.FingerprintSize) } func (f *Factory) NewReader(file *os.File, fp *fingerprint.Fingerprint) (*Reader, error) { - m := &Metadata{Fingerprint: fp, FileAttributes: map[string]any{}} - if f.Config.FlushTimeout > 0 { + attributes, err := f.Attributes.Resolve(file) + if err != nil { + return nil, err + } + m := &Metadata{Fingerprint: fp, FileAttributes: attributes} + if f.FlushTimeout > 0 { m.FlushState = &flush.State{LastDataChange: time.Now()} } return f.NewReaderFromMetadata(file, m) @@ -45,72 +61,60 @@ func (f *Factory) NewReader(file *os.File, fp *fingerprint.Fingerprint) (*Reader func (f *Factory) NewReaderFromMetadata(file *os.File, m *Metadata) (r *Reader, err error) { r = &Reader{ - Config: f.Config, - Metadata: m, - file: file, - fileName: file.Name(), - logger: f.SugaredLogger.With("path", file.Name()), - decoder: decode.New(f.Encoding), - lineSplitFunc: f.SplitFunc, + Metadata: m, + logger: f.SugaredLogger.With("path", file.Name()), + file: file, + fileName: file.Name(), + fingerprintSize: f.FingerprintSize, + initialBufferSize: f.InitialBufferSize, + maxLogSize: f.MaxLogSize, + decoder: decode.New(f.Encoding), + lineSplitFunc: f.SplitFunc, + deleteAtEOF: f.DeleteAtEOF, } - flushFunc := m.FlushState.Func(f.SplitFunc, f.Config.FlushTimeout) - r.lineSplitFunc = trim.WithFunc(trim.ToLength(flushFunc, f.Config.MaxLogSize), f.TrimFunc) + if r.Fingerprint.Len() > r.fingerprintSize { + // User has reconfigured fingerprint_size + shorter, rereadErr := fingerprint.NewFromFile(file, r.fingerprintSize) + if rereadErr != nil { + return nil, fmt.Errorf("reread fingerprint: %w", err) + } + if !r.Fingerprint.StartsWith(shorter) { + return nil, errors.New("file truncated") + } + m.Fingerprint = shorter + } if !f.FromBeginning { - if err = r.offsetToEnd(); err != nil { - return nil, err + var info os.FileInfo + if info, err = r.file.Stat(); err != nil { + return nil, fmt.Errorf("stat: %w", err) } + r.Offset = info.Size() } + flushFunc := m.FlushState.Func(f.SplitFunc, f.FlushTimeout) + r.lineSplitFunc = trim.WithFunc(trim.ToLength(flushFunc, f.MaxLogSize), f.TrimFunc) + r.emitFunc = f.EmitFunc if f.HeaderConfig == nil || m.HeaderFinalized { r.splitFunc = r.lineSplitFunc - r.processFunc = f.Config.Emit + r.processFunc = r.emitFunc } else { - r.splitFunc = f.HeaderConfig.SplitFunc r.headerReader, err = header.NewReader(f.SugaredLogger, *f.HeaderConfig) if err != nil { return nil, err } + r.splitFunc = f.HeaderConfig.SplitFunc r.processFunc = r.headerReader.Process } - // Resolve file name and path attributes - resolved := r.fileName - - // Dirty solution, waiting for this permanent fix https://github.com/golang/go/issues/39786 - // EvalSymlinks on windows is partially working depending on the way you use Symlinks and Junctions - if runtime.GOOS != "windows" { - resolved, err = filepath.EvalSymlinks(r.fileName) - if err != nil { - f.Errorf("resolve symlinks: %w", err) - } - } - abs, err := filepath.Abs(resolved) + attributes, err := f.Attributes.Resolve(file) if err != nil { - f.Errorf("resolve abs: %w", err) + return nil, err } - - if f.Config.IncludeFileName { - r.FileAttributes[attrs.LogFileName] = filepath.Base(r.fileName) - } else if r.FileAttributes[attrs.LogFileName] != nil { - delete(r.FileAttributes, attrs.LogFileName) + // Copy attributes into existing map to avoid overwriting header attributes + for k, v := range attributes { + r.FileAttributes[k] = v } - if f.Config.IncludeFilePath { - r.FileAttributes[attrs.LogFilePath] = r.fileName - } else if r.FileAttributes[attrs.LogFilePath] != nil { - delete(r.FileAttributes, attrs.LogFilePath) - } - if f.Config.IncludeFileNameResolved { - r.FileAttributes[attrs.LogFileNameResolved] = filepath.Base(abs) - } else if r.FileAttributes[attrs.LogFileNameResolved] != nil { - delete(r.FileAttributes, attrs.LogFileNameResolved) - } - if f.Config.IncludeFilePathResolved { - r.FileAttributes[attrs.LogFilePathResolved] = abs - } else if r.FileAttributes[attrs.LogFilePathResolved] != nil { - delete(r.FileAttributes, attrs.LogFilePathResolved) - } - return r, nil } diff --git a/pkg/stanza/fileconsumer/internal/reader/factory_test.go b/pkg/stanza/fileconsumer/internal/reader/factory_test.go new file mode 100644 index 000000000000..c83537996406 --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/reader/factory_test.go @@ -0,0 +1,158 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package reader + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/unicode" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/attrs" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/emittest" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/filetest" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fingerprint" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/scanner" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/split" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/trim" +) + +const ( + defaultMaxLogSize = 1024 * 1024 + defaultFlushPeriod = 500 * time.Millisecond +) + +func testFactory(t *testing.T, opts ...testFactoryOpt) (*Factory, *emittest.Sink) { + cfg := &testFactoryCfg{ + fromBeginning: true, + fingerprintSize: fingerprint.DefaultSize, + initialBufferSize: scanner.DefaultBufferSize, + maxLogSize: defaultMaxLogSize, + encoding: unicode.UTF8, + trimFunc: trim.Whitespace, + flushPeriod: defaultFlushPeriod, + sinkChanSize: 100, + attributes: attrs.Resolver{ + IncludeFileName: true, + }, + } + for _, opt := range opts { + opt(cfg) + } + + splitFunc, err := cfg.splitCfg.Func(cfg.encoding, false, cfg.maxLogSize) + require.NoError(t, err) + + sink := emittest.NewSink(emittest.WithCallBuffer(cfg.sinkChanSize)) + return &Factory{ + SugaredLogger: testutil.Logger(t), + FromBeginning: cfg.fromBeginning, + FingerprintSize: cfg.fingerprintSize, + InitialBufferSize: cfg.initialBufferSize, + MaxLogSize: cfg.maxLogSize, + Encoding: cfg.encoding, + SplitFunc: splitFunc, + TrimFunc: cfg.trimFunc, + FlushTimeout: cfg.flushPeriod, + EmitFunc: sink.Callback, + Attributes: cfg.attributes, + }, sink +} + +type testFactoryOpt func(*testFactoryCfg) + +type testFactoryCfg struct { + fromBeginning bool + fingerprintSize int + initialBufferSize int + maxLogSize int + encoding encoding.Encoding + splitCfg split.Config + trimFunc trim.Func + flushPeriod time.Duration + sinkChanSize int + attributes attrs.Resolver +} + +func withFingerprintSize(size int) testFactoryOpt { + return func(c *testFactoryCfg) { + c.fingerprintSize = size + } +} + +func withSplitConfig(cfg split.Config) testFactoryOpt { + return func(c *testFactoryCfg) { + c.splitCfg = cfg + } +} + +func withInitialBufferSize(size int) testFactoryOpt { + return func(c *testFactoryCfg) { + c.initialBufferSize = size + } +} + +func withMaxLogSize(size int) testFactoryOpt { + return func(c *testFactoryCfg) { + c.maxLogSize = size + } +} + +func withFlushPeriod(flushPeriod time.Duration) testFactoryOpt { + return func(c *testFactoryCfg) { + c.flushPeriod = flushPeriod + } +} + +func withSinkChanSize(n int) testFactoryOpt { + return func(c *testFactoryCfg) { + c.sinkChanSize = n + } +} + +func fromEnd() testFactoryOpt { + return func(c *testFactoryCfg) { + c.fromBeginning = false + } +} + +func TestStartAt(t *testing.T) { + tempDir := t.TempDir() + temp := filetest.OpenTemp(t, tempDir) + content := "some text\n" + _, err := temp.WriteString(content) + require.NoError(t, err) + + f, _ := testFactory(t, withFingerprintSize(len(content)*2)) + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + r, err := f.NewReader(temp, fp) + require.NoError(t, err) + assert.Equal(t, int64(0), r.Offset) + + f, _ = testFactory(t, withFingerprintSize(len(content)/2), fromEnd()) + fp, err = f.NewFingerprint(temp) + require.NoError(t, err) + r, err = f.NewReader(temp, fp) + require.NoError(t, err) + assert.Equal(t, int64(len(content)), r.Offset) + + f, _ = testFactory(t, withFingerprintSize(len(content)/2)) + fp, err = f.NewFingerprint(temp) + require.NoError(t, err) + r, err = f.NewReader(temp, fp) + require.NoError(t, err) + assert.Equal(t, int64(0), r.Offset) + + f, _ = testFactory(t, withFingerprintSize(len(content)/2), fromEnd()) + fp, err = f.NewFingerprint(temp) + require.NoError(t, err) + r, err = f.NewReader(temp, fp) + require.NoError(t, err) + assert.Equal(t, int64(len(content)), r.Offset) +} diff --git a/pkg/stanza/fileconsumer/internal/reader/fingerprint_test.go b/pkg/stanza/fileconsumer/internal/reader/fingerprint_test.go new file mode 100644 index 000000000000..f6ce84ee584e --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/reader/fingerprint_test.go @@ -0,0 +1,349 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package reader + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/filetest" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fingerprint" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/scanner" +) + +func TestReaderUpdateFingerprint(t *testing.T) { + bufferSizes := []int{2, 3, 5, 8, 10, 13, 20, 50} + testCases := []updateFingerprintTest{ + { + name: "new_file", + fingerprintSize: 10, + maxLogSize: 100, + initBytes: []byte(""), + moreBytes: []byte("1234567890\n"), + expectTokens: [][]byte{[]byte("1234567890")}, + expectOffset: 11, + expectFingerprint: []byte("1234567890"), + }, + { + name: "existing_partial_line_from_start", + fingerprintSize: 10, + maxLogSize: 100, + fromBeginning: true, + initBytes: []byte("foo"), + moreBytes: []byte("1234567890\n"), + expectTokens: [][]byte{[]byte("foo1234567890")}, + expectOffset: 14, + expectFingerprint: []byte("foo1234567"), + }, + { + name: "existing_partial_line", + fingerprintSize: 10, + maxLogSize: 100, + initBytes: []byte("foo"), + moreBytes: []byte("1234567890\n"), + expectTokens: [][]byte{[]byte("1234567890")}, + expectOffset: 14, + expectFingerprint: []byte("foo1234567"), + }, + { + name: "existing_full_line_from_start", + fingerprintSize: 10, + maxLogSize: 100, + fromBeginning: true, + initBytes: []byte("foo\n"), + moreBytes: []byte("1234567890\n"), + expectTokens: [][]byte{[]byte("foo"), []byte("1234567890")}, + expectOffset: 15, + expectFingerprint: []byte("foo\n123456"), + }, + { + name: "existing_full_line", + fingerprintSize: 10, + maxLogSize: 100, + initBytes: []byte("foo\n"), + moreBytes: []byte("1234567890\n"), + expectTokens: [][]byte{[]byte("1234567890")}, + expectOffset: 15, + expectFingerprint: []byte("foo\n123456"), + }, + { + name: "split_none_from_start", + fingerprintSize: 10, + maxLogSize: 100, + fromBeginning: true, + initBytes: []byte("foo"), + moreBytes: []byte("1234567890"), + expectTokens: [][]byte{}, + expectOffset: 0, + expectFingerprint: []byte("foo1234567"), + }, + { + name: "split_none", + fingerprintSize: 10, + maxLogSize: 100, + initBytes: []byte("foo"), + moreBytes: []byte("1234567890"), + expectTokens: [][]byte{}, + expectOffset: 3, + expectFingerprint: []byte("foo1234567"), + }, + { + name: "split_mid_from_start", + fingerprintSize: 10, + maxLogSize: 100, + fromBeginning: true, + initBytes: []byte("foo"), + moreBytes: []byte("12345\n67890"), + expectTokens: [][]byte{[]byte("foo12345")}, + expectOffset: 9, + expectFingerprint: []byte("foo12345\n6"), + }, + { + name: "split_mid", + fingerprintSize: 10, + maxLogSize: 100, + initBytes: []byte("foo"), + moreBytes: []byte("12345\n67890"), + expectTokens: [][]byte{[]byte("12345")}, + expectOffset: 9, + expectFingerprint: []byte("foo12345\n6"), + }, + { + name: "clean_end_from_start", + fingerprintSize: 10, + maxLogSize: 100, + fromBeginning: true, + initBytes: []byte("foo"), + moreBytes: []byte("12345\n67890\n"), + expectTokens: [][]byte{[]byte("foo12345"), []byte("67890")}, + expectOffset: 15, + expectFingerprint: []byte("foo12345\n6"), + }, + { + name: "clean_end", + fingerprintSize: 10, + maxLogSize: 100, + initBytes: []byte("foo"), + moreBytes: []byte("12345\n67890\n"), + expectTokens: [][]byte{[]byte("12345"), []byte("67890")}, + expectOffset: 15, + expectFingerprint: []byte("foo12345\n6"), + }, + { + name: "full_lines_only_from_start", + fingerprintSize: 10, + maxLogSize: 100, + fromBeginning: true, + initBytes: []byte("foo\n"), + moreBytes: []byte("12345\n67890\n"), + expectTokens: [][]byte{[]byte("foo"), []byte("12345"), []byte("67890")}, + expectOffset: 16, + expectFingerprint: []byte("foo\n12345\n"), + }, + { + name: "full_lines_only", + fingerprintSize: 10, + maxLogSize: 100, + initBytes: []byte("foo\n"), + moreBytes: []byte("12345\n67890\n"), + expectTokens: [][]byte{[]byte("12345"), []byte("67890")}, + expectOffset: 16, + expectFingerprint: []byte("foo\n12345\n"), + }, + { + name: "small_max_log_size_from_start", + fingerprintSize: 20, + maxLogSize: 4, + fromBeginning: true, + initBytes: []byte("foo"), + moreBytes: []byte("1234567890\nbar\nhelloworld\n"), + expectTokens: [][]byte{[]byte("foo1"), []byte("2345"), []byte("6789"), []byte("0"), []byte("bar"), []byte("hell"), []byte("owor"), []byte("ld")}, + expectOffset: 29, + expectFingerprint: []byte("foo1234567890\nbar\nhe"), + }, + { + name: "small_max_log_size", + fingerprintSize: 20, + maxLogSize: 4, + initBytes: []byte("foo"), + moreBytes: []byte("1234567890\nbar\nhelloworld\n"), + expectTokens: [][]byte{[]byte("1234"), []byte("5678"), []byte("90"), []byte("bar"), []byte("hell"), []byte("owor"), []byte("ld")}, + expectOffset: 29, + expectFingerprint: []byte("foo1234567890\nbar\nhe"), + }, + { + name: "leading_empty_from_start", + fingerprintSize: 10, + maxLogSize: 100, + fromBeginning: true, + initBytes: []byte(""), + moreBytes: []byte("\n12345\n67890\n"), + expectTokens: [][]byte{[]byte(""), []byte("12345"), []byte("67890")}, + expectOffset: 13, + expectFingerprint: []byte("\n12345\n678"), + }, + { + name: "leading_empty", + fingerprintSize: 10, + maxLogSize: 100, + initBytes: []byte(""), + moreBytes: []byte("\n12345\n67890\n"), + expectTokens: [][]byte{[]byte(""), []byte("12345"), []byte("67890")}, + expectOffset: 13, + expectFingerprint: []byte("\n12345\n678"), + }, + { + name: "multiple_empty_from_start", + fingerprintSize: 10, + maxLogSize: 100, + fromBeginning: true, + initBytes: []byte(""), + moreBytes: []byte("\n\n12345\n\n67890\n\n"), + expectTokens: [][]byte{[]byte(""), []byte(""), []byte("12345"), []byte(""), []byte("67890"), []byte("")}, + expectOffset: 16, + expectFingerprint: []byte("\n\n12345\n\n6"), + }, + { + name: "multiple_empty", + fingerprintSize: 10, + maxLogSize: 100, + initBytes: []byte(""), + moreBytes: []byte("\n\n12345\n\n67890\n\n"), + expectTokens: [][]byte{[]byte(""), []byte(""), []byte("12345"), []byte(""), []byte("67890"), []byte("")}, + expectOffset: 16, + expectFingerprint: []byte("\n\n12345\n\n6"), + }, + { + name: "multiple_empty_partial_end_from_start", + fingerprintSize: 10, + maxLogSize: 100, + fromBeginning: true, + initBytes: []byte(""), + moreBytes: []byte("\n\n12345\n\n67890"), + expectTokens: [][]byte{[]byte(""), []byte(""), []byte("12345"), []byte("")}, + expectOffset: 9, + expectFingerprint: []byte("\n\n12345\n\n6"), + }, + { + name: "multiple_empty_partial_end", + fingerprintSize: 10, + maxLogSize: 100, + initBytes: []byte(""), + moreBytes: []byte("\n\n12345\n\n67890"), + expectTokens: [][]byte{[]byte(""), []byte(""), []byte("12345"), []byte("")}, + expectOffset: 9, + expectFingerprint: []byte("\n\n12345\n\n6"), + }, + } + + for _, tc := range testCases { + for _, bufferSize := range bufferSizes { + t.Run(fmt.Sprintf("%s/bufferSize:%d", tc.name, bufferSize), tc.run(bufferSize)) + } + } +} + +type updateFingerprintTest struct { + name string + fingerprintSize int + maxLogSize int + fromBeginning bool + initBytes []byte + moreBytes []byte + expectTokens [][]byte + expectOffset int64 + expectFingerprint []byte +} + +func (tc updateFingerprintTest) run(bufferSize int) func(*testing.T) { + return func(t *testing.T) { + opts := []testFactoryOpt{ + withFingerprintSize(tc.fingerprintSize), + withInitialBufferSize(bufferSize), + withMaxLogSize(tc.maxLogSize), + withFlushPeriod(0), + } + if !tc.fromBeginning { + opts = append(opts, fromEnd()) + } + f, sink := testFactory(t, opts...) + + temp := filetest.OpenTemp(t, t.TempDir()) + _, err := temp.Write(tc.initBytes) + require.NoError(t, err) + + fi, err := temp.Stat() + require.NoError(t, err) + require.Equal(t, int64(len(tc.initBytes)), fi.Size()) + + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + r, err := f.NewReader(temp, fp) + require.NoError(t, err) + require.Same(t, temp, r.file) + + if tc.fromBeginning { + assert.Equal(t, int64(0), r.Offset) + } else { + assert.Equal(t, int64(len(tc.initBytes)), r.Offset) + } + assert.Equal(t, fingerprint.New(tc.initBytes), r.Fingerprint) + + i, err := temp.Write(tc.moreBytes) + require.NoError(t, err) + require.Equal(t, i, len(tc.moreBytes)) + + r.ReadToEnd(context.Background()) + + sink.ExpectTokens(t, tc.expectTokens...) + + assert.Equal(t, tc.expectOffset, r.Offset) + assert.Equal(t, fingerprint.New(tc.expectFingerprint), r.Fingerprint) + } +} + +// TestReadingWithLargeFingerPrintSizeAndFileLargerThanScannerBuf tests for reading of log file when: +// - fingerprint size is larger than the size of scanner default buffer (defaultBufSize) +// - size of the log file is lower than fingerprint size +func TestReadingWithLargeFingerPrintSizeAndFileLargerThanScannerBuf(t *testing.T) { + t.Parallel() + tempDir := t.TempDir() + + // Generate log lines + body := "abcdefghijklmnopqrstuvwxyz1234567890" + fileContent := "" + expected := [][]byte{} + fingerPrintSize := scanner.DefaultBufferSize + 2*1024 + + for i := 0; len(fileContent) < fingerPrintSize-1024; i++ { + log := fmt.Sprintf("line %d log %s, end of line %d", i, body, i) + fileContent += fmt.Sprintf("%s\n", log) + expected = append(expected, []byte(log)) + } + + temp := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp, fileContent) + + f, sink := testFactory(t, + withFingerprintSize(fingerPrintSize), + withMaxLogSize(defaultMaxLogSize), + withSinkChanSize(1000), + ) + + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + + r, err := f.NewReader(temp, fp) + require.NoError(t, err) + + initialFingerPrintSize := r.Fingerprint.Len() + r.ReadToEnd(context.Background()) + require.Equal(t, initialFingerPrintSize, r.Fingerprint.Len()) + + sink.ExpectTokens(t, expected...) +} diff --git a/pkg/stanza/fileconsumer/internal/reader/package_test.go b/pkg/stanza/fileconsumer/internal/reader/package_test.go new file mode 100644 index 000000000000..107daf352af7 --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/reader/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package reader + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/fileconsumer/internal/reader/reader.go b/pkg/stanza/fileconsumer/internal/reader/reader.go index 720f50b9d9d5..ae5f4a5e29b9 100644 --- a/pkg/stanza/fileconsumer/internal/reader/reader.go +++ b/pkg/stanza/fileconsumer/internal/reader/reader.go @@ -7,9 +7,7 @@ import ( "bufio" "context" "errors" - "fmt" "os" - "time" "go.uber.org/zap" @@ -21,18 +19,6 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/flush" ) -type Config struct { - FingerprintSize int - MaxLogSize int - Emit emit.Callback - IncludeFileName bool - IncludeFilePath bool - IncludeFileNameResolved bool - IncludeFilePathResolved bool - DeleteAtEOF bool - FlushTimeout time.Duration -} - type Metadata struct { Fingerprint *fingerprint.Fingerprint Offset int64 @@ -43,33 +29,21 @@ type Metadata struct { // Reader manages a single file type Reader struct { - *Config *Metadata - fileName string - logger *zap.SugaredLogger - file *os.File - lineSplitFunc bufio.SplitFunc - splitFunc bufio.SplitFunc - decoder *decode.Decoder - headerReader *header.Reader - processFunc emit.Callback -} - -// offsetToEnd sets the starting offset -func (r *Reader) offsetToEnd() error { - info, err := r.file.Stat() - if err != nil { - return fmt.Errorf("stat: %w", err) - } - r.Offset = info.Size() - return nil -} - -func (r *Reader) NewFingerprintFromFile() (*fingerprint.Fingerprint, error) { - if r.file == nil { - return nil, errors.New("file is nil") - } - return fingerprint.New(r.file, r.FingerprintSize) + logger *zap.SugaredLogger + fileName string + file *os.File + fingerprintSize int + initialBufferSize int + maxLogSize int + lineSplitFunc bufio.SplitFunc + splitFunc bufio.SplitFunc + decoder *decode.Decoder + headerReader *header.Reader + processFunc emit.Callback + emitFunc emit.Callback + deleteAtEOF bool + needsUpdateFingerprint bool } // ReadToEnd will read until the end of the file @@ -79,10 +53,15 @@ func (r *Reader) ReadToEnd(ctx context.Context) { return } - s := scanner.New(r, r.MaxLogSize, scanner.DefaultBufferSize, r.Offset, r.splitFunc) + defer func() { + if r.needsUpdateFingerprint { + r.updateFingerprint() + } + }() + + s := scanner.New(r, r.maxLogSize, r.initialBufferSize, r.Offset, r.splitFunc) // Iterate over the tokenized file, emitting entries as we go - var eof bool for { select { case <-ctx.Done(): @@ -92,55 +71,58 @@ func (r *Reader) ReadToEnd(ctx context.Context) { ok := s.Scan() if !ok { - if err := s.Error(); err == nil { - eof = true - } else { + if err := s.Error(); err != nil { r.logger.Errorw("Failed during scan", zap.Error(err)) + } else if r.deleteAtEOF { + r.delete() } - break + return } token, err := r.decoder.Decode(s.Bytes()) if err != nil { r.logger.Errorw("decode: %w", zap.Error(err)) - } else if err := r.processFunc(ctx, token, r.FileAttributes); err != nil { - if errors.Is(err, header.ErrEndOfHeader) { - r.finalizeHeader() - - // Now that the header is consumed, use the normal split and process functions. - // Recreate the scanner with the normal split func. - // Do not use the updated offset from the old scanner, as the most recent token - // could be split differently with the new splitter. - r.splitFunc = r.lineSplitFunc - r.processFunc = r.Emit - if _, err = r.file.Seek(r.Offset, 0); err != nil { - r.logger.Errorw("Failed to seek post-header", zap.Error(err)) - return - } - s = scanner.New(r, r.MaxLogSize, scanner.DefaultBufferSize, r.Offset, r.splitFunc) - } else { - r.logger.Errorw("process: %w", zap.Error(err)) - } + r.Offset = s.Pos() // move past the bad token or we may be stuck + continue } - r.Offset = s.Pos() - } - if eof && r.DeleteAtEOF { - r.delete() - } -} + err = r.processFunc(ctx, token, r.FileAttributes) + if err == nil { + r.Offset = s.Pos() // successful emit, update offset + continue + } -func (r *Reader) finalizeHeader() { - if err := r.headerReader.Stop(); err != nil { - r.logger.Errorw("Failed to stop header pipeline during finalization", zap.Error(err)) + if !errors.Is(err, header.ErrEndOfHeader) { + r.logger.Errorw("process: %w", zap.Error(err)) + r.Offset = s.Pos() // move past the bad token or we may be stuck + continue + } + + // Clean up the header machinery + if err = r.headerReader.Stop(); err != nil { + r.logger.Errorw("Failed to stop header pipeline during finalization", zap.Error(err)) + } + r.headerReader = nil + r.HeaderFinalized = true + + // Switch to the normal split and process functions. + r.splitFunc = r.lineSplitFunc + r.processFunc = r.emitFunc + + // Recreate the scanner with the normal split func. + // Do not use the updated offset from the old scanner, as the most recent token + // could be split differently with the new splitter. + if _, err = r.file.Seek(r.Offset, 0); err != nil { + r.logger.Errorw("Failed to seek post-header", zap.Error(err)) + return + } + s = scanner.New(r, r.maxLogSize, scanner.DefaultBufferSize, r.Offset, r.splitFunc) } - r.headerReader = nil - r.HeaderFinalized = true } // Delete will close and delete the file func (r *Reader) delete() { - r.Close() + r.close() if err := os.Remove(r.fileName); err != nil { r.logger.Errorf("could not delete %s", r.fileName) } @@ -148,6 +130,13 @@ func (r *Reader) delete() { // Close will close the file and return the metadata func (r *Reader) Close() *Metadata { + r.close() + m := r.Metadata + r.Metadata = nil + return m +} + +func (r *Reader) close() { if r.file != nil { if err := r.file.Close(); err != nil { r.logger.Debugw("Problem closing reader", zap.Error(err)) @@ -160,38 +149,19 @@ func (r *Reader) Close() *Metadata { r.logger.Errorw("Failed to stop header pipeline", zap.Error(err)) } } - m := r.Metadata - r.Metadata = nil - return m } // Read from the file and update the fingerprint if necessary -func (r *Reader) Read(dst []byte) (int, error) { - // Skip if fingerprint is already built - // or if fingerprint is behind Offset - if len(r.Fingerprint.FirstBytes) == r.FingerprintSize || int(r.Offset) > len(r.Fingerprint.FirstBytes) { - return r.file.Read(dst) - } - n, err := r.file.Read(dst) - appendCount := min0(n, r.FingerprintSize-int(r.Offset)) - // return for n == 0 or r.Offset >= r.FingerprintSize - if appendCount == 0 { - return n, err +func (r *Reader) Read(dst []byte) (n int, err error) { + n, err = r.file.Read(dst) + if n == 0 || err != nil { + return } - // for appendCount==0, the following code would add `0` to fingerprint - r.Fingerprint.FirstBytes = append(r.Fingerprint.FirstBytes[:r.Offset], dst[:appendCount]...) - return n, err -} - -func min0(a, b int) int { - if a < 0 || b < 0 { - return 0 - } - if a < b { - return a + if !r.needsUpdateFingerprint && r.Fingerprint.Len() < r.fingerprintSize { + r.needsUpdateFingerprint = true } - return b + return } func (r *Reader) NameEquals(other *Reader) bool { @@ -203,7 +173,7 @@ func (r *Reader) Validate() bool { if r.file == nil { return false } - refreshedFingerprint, err := fingerprint.New(r.file, r.FingerprintSize) + refreshedFingerprint, err := fingerprint.NewFromFile(r.file, r.fingerprintSize) if err != nil { return false } @@ -212,3 +182,22 @@ func (r *Reader) Validate() bool { } return false } + +func (m Metadata) GetFingerprint() *fingerprint.Fingerprint { + return m.Fingerprint +} + +func (r *Reader) updateFingerprint() { + r.needsUpdateFingerprint = false + if r.file == nil { + return + } + refreshedFingerprint, err := fingerprint.NewFromFile(r.file, r.fingerprintSize) + if err != nil { + return + } + if r.Fingerprint.Len() > 0 && !refreshedFingerprint.StartsWith(r.Fingerprint) { + return // fingerprint tampered, likely due to truncation + } + r.Fingerprint = refreshedFingerprint +} diff --git a/pkg/stanza/fileconsumer/internal/reader/reader_test.go b/pkg/stanza/fileconsumer/internal/reader/reader_test.go new file mode 100644 index 000000000000..8107fe235693 --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/reader/reader_test.go @@ -0,0 +1,185 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package reader + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/filetest" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fingerprint" +) + +func TestFileReader_FingerprintUpdated(t *testing.T) { + t.Parallel() + + tempDir := t.TempDir() + temp := filetest.OpenTemp(t, tempDir) + tempCopy := filetest.OpenFile(t, temp.Name()) + + f, sink := testFactory(t) + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + + reader, err := f.NewReader(tempCopy, fp) + require.NoError(t, err) + defer reader.Close() + + filetest.WriteString(t, temp, "testlog1\n") + reader.ReadToEnd(context.Background()) + sink.ExpectToken(t, []byte("testlog1")) + require.Equal(t, fingerprint.New([]byte("testlog1\n")), reader.Fingerprint) +} + +// Test that a fingerprint: +// - Starts empty +// - Updates as a file is read +// - Stops updating when the max fingerprint size is reached +// - Stops exactly at max fingerprint size, regardless of content +func TestFingerprintGrowsAndStops(t *testing.T) { + t.Parallel() + + // Use a number with many factors. + // Sometimes fingerprint length will align with + // the end of a line, sometimes not. Test both. + fpSize := 360 + + // Use prime numbers to ensure variation in + // whether or not they are factors of fpSize + lineLens := []int{3, 5, 7, 11, 13, 17, 19, 23, 27} + + for _, lineLen := range lineLens { + lineLen := lineLen + t.Run(fmt.Sprintf("%d", lineLen), func(t *testing.T) { + t.Parallel() + + tempDir := t.TempDir() + temp := filetest.OpenTemp(t, tempDir) + tempCopy := filetest.OpenFile(t, temp.Name()) + + f, _ := testFactory(t, withSinkChanSize(3*fpSize/lineLen), withFingerprintSize(fpSize)) + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + require.Equal(t, fingerprint.New([]byte("")), fp) + + reader, err := f.NewReader(tempCopy, fp) + require.NoError(t, err) + defer reader.Close() + + // keep track of what has been written to the file + var fileContent []byte + + // keep track of expected fingerprint size + expectedFP := 0 + + // Write lines until file is much larger than the length of the fingerprint + for len(fileContent) < 2*fpSize { + expectedFP += lineLen + if expectedFP > fpSize { + expectedFP = fpSize + } + + line := string(filetest.TokenWithLength(lineLen-1)) + "\n" + fileContent = append(fileContent, []byte(line)...) + + filetest.WriteString(t, temp, line) + reader.ReadToEnd(context.Background()) + require.Equal(t, fingerprint.New(fileContent[:expectedFP]), reader.Fingerprint) + } + }) + } +} + +// This is same test like TestFingerprintGrowsAndStops, but with additional check for fingerprint size check +// Test that a fingerprint: +// - Starts empty +// - Updates as a file is read +// - Stops updating when the max fingerprint size is reached +// - Stops exactly at max fingerprint size, regardless of content +// - Do not change size after fingerprint configuration change +func TestFingerprintChangeSize(t *testing.T) { + t.Parallel() + + // Use a number with many factors. + // Sometimes fingerprint length will align with + // the end of a line, sometimes not. Test both. + fpSize := 360 + + // Use prime numbers to ensure variation in + // whether or not they are factors of fpSize + lineLens := []int{3, 4, 5, 6, 7, 8, 11, 12, 13, 17, 19, 23, 27, 36} + + for _, lineLen := range lineLens { + lineLen := lineLen + t.Run(fmt.Sprintf("%d", lineLen), func(t *testing.T) { + t.Parallel() + + f, _ := testFactory(t, withSinkChanSize(3*fpSize/lineLen), withFingerprintSize(fpSize)) + + tempDir := t.TempDir() + temp := filetest.OpenTemp(t, tempDir) + + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + require.Equal(t, fingerprint.New([]byte("")), fp) + + reader, err := f.NewReader(filetest.OpenFile(t, temp.Name()), fp) + require.NoError(t, err) + + // keep track of what has been written to the file + var fileContent []byte + + // keep track of expected fingerprint size + expectedFP := 0 + + // Write lines until file is much larger than the length of the fingerprint + for len(fileContent) < 2*fpSize { + expectedFP += lineLen + if expectedFP > fpSize { + expectedFP = fpSize + } + + line := string(filetest.TokenWithLength(lineLen-1)) + "\n" + fileContent = append(fileContent, []byte(line)...) + + filetest.WriteString(t, temp, line) + reader.ReadToEnd(context.Background()) + require.Equal(t, fingerprint.New(fileContent[:expectedFP]), reader.Fingerprint) + } + + // Recreate the factory with a larger fingerprint size + fpSizeUp := fpSize * 2 + f, _ = testFactory(t, withSinkChanSize(3*fpSize/lineLen), withFingerprintSize(fpSizeUp)) + + // Recreate the reader with the new factory + reader, err = f.NewReaderFromMetadata(filetest.OpenFile(t, temp.Name()), reader.Close()) + require.NoError(t, err) + + line := string(filetest.TokenWithLength(lineLen-1)) + "\n" + fileContent = append(fileContent, []byte(line)...) + + filetest.WriteString(t, temp, line) + reader.ReadToEnd(context.Background()) + require.Equal(t, fingerprint.New(fileContent[:fpSizeUp]), reader.Fingerprint) + + // Recreate the factory with a smaller fingerprint size + fpSizeDown := fpSize / 2 + f, _ = testFactory(t, withSinkChanSize(3*fpSize/lineLen), withFingerprintSize(fpSizeDown)) + + // Recreate the reader with the new factory + reader, err = f.NewReaderFromMetadata(filetest.OpenFile(t, temp.Name()), reader.Close()) + require.NoError(t, err) + + line = string(filetest.TokenWithLength(lineLen-1)) + "\n" + fileContent = append(fileContent, []byte(line)...) + + filetest.WriteString(t, temp, line) + reader.ReadToEnd(context.Background()) + require.Equal(t, fingerprint.New(fileContent[:fpSizeDown]), reader.Fingerprint) + }) + } +} diff --git a/pkg/stanza/fileconsumer/internal/reader/split_test.go b/pkg/stanza/fileconsumer/internal/reader/split_test.go new file mode 100644 index 000000000000..7f9d02b78942 --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/reader/split_test.go @@ -0,0 +1,220 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package reader + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/decode" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/filetest" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fingerprint" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/header" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/regex" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/split" +) + +func TestPersistFlusher(t *testing.T) { + flushPeriod := 100 * time.Millisecond + f, sink := testFactory(t, withFlushPeriod(flushPeriod)) + + temp := filetest.OpenTemp(t, t.TempDir()) + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + + r, err := f.NewReader(temp, fp) + require.NoError(t, err) + + _, err = temp.WriteString("log with newline\nlog without newline") + require.NoError(t, err) + + // ReadToEnd will return when we hit eof, but we shouldn't emit the unfinished log yet + r.ReadToEnd(context.Background()) + sink.ExpectToken(t, []byte("log with newline")) + + // Even trying again shouldn't produce the log yet because the flush period still hasn't expired. + r.ReadToEnd(context.Background()) + sink.ExpectNoCallsUntil(t, 2*flushPeriod) + + // A copy of the reader should remember that we last emitted about 200ms ago. + copyReader, err := f.NewReaderFromMetadata(temp, r.Metadata) + assert.NoError(t, err) + + // This time, the flusher will kick in and we should emit the unfinished log. + // If the copy did not remember when we last emitted a log, then the flushPeriod + // will not be expired at this point so we won't see the unfinished log. + copyReader.ReadToEnd(context.Background()) + sink.ExpectToken(t, []byte("log without newline")) +} + +func TestTokenization(t *testing.T) { + testCases := []struct { + testName string + fileContent []byte + expected [][]byte + }{ + { + "simple", + []byte("testlog1\ntestlog2\n"), + [][]byte{ + []byte("testlog1"), + []byte("testlog2"), + }, + }, + { + "empty_only", + []byte("\n"), + [][]byte{ + []byte(""), + }, + }, + { + "empty_first", + []byte("\ntestlog1\ntestlog2\n"), + [][]byte{ + []byte(""), + []byte("testlog1"), + []byte("testlog2"), + }, + }, + { + "empty_between_lines", + []byte("testlog1\n\ntestlog2\n"), + [][]byte{ + []byte("testlog1"), + []byte(""), + []byte("testlog2"), + }, + }, + { + "multiple_empty", + []byte("\n\ntestlog1\n\n\ntestlog2\n"), + [][]byte{ + []byte(""), + []byte(""), + []byte("testlog1"), + []byte(""), + []byte(""), + []byte("testlog2"), + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.testName, func(t *testing.T) { + f, sink := testFactory(t) + + temp := filetest.OpenTemp(t, t.TempDir()) + _, err := temp.Write(tc.fileContent) + require.NoError(t, err) + + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + + r, err := f.NewReader(temp, fp) + require.NoError(t, err) + + r.ReadToEnd(context.Background()) + + for _, expected := range tc.expected { + require.Equal(t, expected, sink.NextToken(t)) + } + }) + } +} + +func TestTokenizationTooLong(t *testing.T) { + fileContent := []byte("aaaaaaaaaaaaaaaaaaaaaa\naaa\n") + expected := [][]byte{ + []byte("aaaaaaaaaa"), + []byte("aaaaaaaaaa"), + []byte("aa"), + []byte("aaa"), + } + + f, sink := testFactory(t, withMaxLogSize(10)) + + temp := filetest.OpenTemp(t, t.TempDir()) + _, err := temp.Write(fileContent) + require.NoError(t, err) + + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + + r, err := f.NewReader(temp, fp) + require.NoError(t, err) + + r.ReadToEnd(context.Background()) + + for _, expected := range expected { + require.Equal(t, expected, sink.NextToken(t)) + } +} + +func TestTokenizationTooLongWithLineStartPattern(t *testing.T) { + fileContent := []byte("aaa2023-01-01aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2023-01-01 2 2023-01-01") + expected := [][]byte{ + []byte("aaa"), + []byte("2023-01-01aaaaa"), + []byte("aaaaaaaaaaaaaaa"), + []byte("aaaaaaaaaaaaaaa"), + []byte("aaaaa"), + []byte("2023-01-01 2"), + } + + sCfg := split.Config{LineStartPattern: `\d+-\d+-\d+`} + f, sink := testFactory(t, withSplitConfig(sCfg), withMaxLogSize(15)) + + temp := filetest.OpenTemp(t, t.TempDir()) + _, err := temp.Write(fileContent) + require.NoError(t, err) + + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + + r, err := f.NewReader(temp, fp) + require.NoError(t, err) + + r.ReadToEnd(context.Background()) + + for _, expected := range expected { + require.Equal(t, expected, sink.NextToken(t)) + } +} + +func TestHeaderFingerprintIncluded(t *testing.T) { + fileContent := []byte("#header-line\naaa\n") + + f, _ := testFactory(t, withMaxLogSize(10)) + + regexConf := regex.NewConfig() + regexConf.Regex = "^#(?P
.*)" + + enc, err := decode.LookupEncoding("utf-8") + require.NoError(t, err) + + h, err := header.NewConfig("^#", []operator.Config{{Builder: regexConf}}, enc) + require.NoError(t, err) + f.HeaderConfig = h + + temp := filetest.OpenTemp(t, t.TempDir()) + + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + + r, err := f.NewReader(temp, fp) + require.NoError(t, err) + + _, err = temp.Write(fileContent) + require.NoError(t, err) + + r.ReadToEnd(context.Background()) + + require.Equal(t, fingerprint.New([]byte("#header-line\naaa\n")), r.Fingerprint) +} diff --git a/pkg/stanza/fileconsumer/internal/reader/validate_test.go b/pkg/stanza/fileconsumer/internal/reader/validate_test.go new file mode 100644 index 000000000000..2761e6b7fa7c --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/reader/validate_test.go @@ -0,0 +1,142 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package reader + +import ( + "context" + "os" + "runtime" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/filetest" +) + +// When a file it moved, we should detect that our old handle is still valid. +func TestValidateMoved(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("Moving files while open is unsupported on Windows") + } + t.Parallel() + + tempDir := t.TempDir() + temp := filetest.OpenTemp(t, tempDir) + _, err := temp.WriteString("testlog1\n") + require.NoError(t, err) + + f, sink := testFactory(t) + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + + reader, err := f.NewReader(temp, fp) + require.NoError(t, err) + + reader.ReadToEnd(context.Background()) + sink.ExpectToken(t, []byte("testlog1")) + + // Validate before moving + assert.True(t, reader.Validate()) + + // Move the file + require.NoError(t, os.Rename(temp.Name(), temp.Name()+".old")) + + // Validate after moving + assert.True(t, reader.Validate()) + + _, err = temp.WriteString("testlog2\n") + require.NoError(t, err) + + reader.ReadToEnd(context.Background()) + sink.ExpectToken(t, []byte("testlog2")) + + // Validate after writing to the moved file + assert.True(t, reader.Validate()) +} + +func TestInvalidateTruncated(t *testing.T) { + t.Parallel() + + tempDir := t.TempDir() + temp := filetest.OpenTemp(t, tempDir) + _, err := temp.WriteString("testlog1\n") + require.NoError(t, err) + + f, sink := testFactory(t) + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + + reader, err := f.NewReader(temp, fp) + require.NoError(t, err) + + reader.ReadToEnd(context.Background()) + sink.ExpectToken(t, []byte("testlog1")) + + // Validate before truncating + assert.True(t, reader.Validate()) + + // Truncate the file + require.NoError(t, temp.Truncate(0)) + + // Invalidate after truncating + assert.False(t, reader.Validate()) + + // Write different content to the file + _, err = temp.WriteString("testlog2\n") + require.NoError(t, err) + + // Still invalid + assert.False(t, reader.Validate()) +} + +func TestInvalidateClosed(t *testing.T) { + t.Parallel() + + tempDir := t.TempDir() + temp := filetest.OpenTemp(t, tempDir) + _, err := temp.WriteString("testlog1\n") + require.NoError(t, err) + + f, _ := testFactory(t) + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + + reader, err := f.NewReader(temp, fp) + require.NoError(t, err) + + // Validate before closing + assert.True(t, reader.Validate()) + + // Close the file using the reader to drop the handle. + reader.Close() + + // Invalidate after closing + assert.False(t, reader.Validate()) +} + +func TestInvalidateUnreadable(t *testing.T) { + t.Parallel() + + tempDir := t.TempDir() + temp := filetest.OpenTemp(t, tempDir) + _, err := temp.WriteString("testlog1\n") + require.NoError(t, err) + + f, _ := testFactory(t) + fp, err := f.NewFingerprint(temp) + require.NoError(t, err) + + reader, err := f.NewReader(temp, fp) + require.NoError(t, err) + + // Validate before closing + assert.True(t, reader.Validate()) + + // Close the file using our direct handle. The reader still has a handle but cannot be read. + require.NoError(t, temp.Close()) + + // Invalidate unreadable file + assert.False(t, reader.Validate()) +} diff --git a/pkg/stanza/fileconsumer/internal/scanner/package_test.go b/pkg/stanza/fileconsumer/internal/scanner/package_test.go new file mode 100644 index 000000000000..3c760ebaaa6b --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/scanner/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package scanner + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/fileconsumer/internal/tracker/tracker.go b/pkg/stanza/fileconsumer/internal/tracker/tracker.go new file mode 100644 index 000000000000..6c255f2fc02b --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/tracker/tracker.go @@ -0,0 +1,106 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package tracker // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/tracker" + +import ( + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fileset" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fingerprint" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" +) + +type Tracker struct { + *zap.SugaredLogger + + maxBatchFiles int + + currentPollFiles *fileset.Fileset[*reader.Reader] + previousPollFiles *fileset.Fileset[*reader.Reader] + knownFiles []*fileset.Fileset[*reader.Metadata] +} + +func New(logger *zap.SugaredLogger, maxBatchFiles int) *Tracker { + knownFiles := make([]*fileset.Fileset[*reader.Metadata], 3) + for i := 0; i < len(knownFiles); i++ { + knownFiles[i] = fileset.New[*reader.Metadata](maxBatchFiles) + } + return &Tracker{ + SugaredLogger: logger.With("component", "fileconsumer"), + maxBatchFiles: maxBatchFiles, + currentPollFiles: fileset.New[*reader.Reader](maxBatchFiles), + previousPollFiles: fileset.New[*reader.Reader](maxBatchFiles), + knownFiles: knownFiles, + } +} + +func (t *Tracker) Add(reader *reader.Reader) { + // add a new reader for tracking + t.currentPollFiles.Add(reader) +} + +func (t *Tracker) GetCurrentFile(fp *fingerprint.Fingerprint) *reader.Reader { + return t.currentPollFiles.Match(fp, fileset.Equal) +} + +func (t *Tracker) GetOpenFile(fp *fingerprint.Fingerprint) *reader.Reader { + return t.previousPollFiles.Match(fp, fileset.StartsWith) +} + +func (t *Tracker) GetClosedFile(fp *fingerprint.Fingerprint) *reader.Metadata { + for i := 0; i < len(t.knownFiles); i++ { + if oldMetadata := t.knownFiles[i].Match(fp, fileset.StartsWith); oldMetadata != nil { + return oldMetadata + } + } + return nil +} + +func (t *Tracker) GetMetadata() []*reader.Metadata { + // return all known metadata for checkpoining + allCheckpoints := make([]*reader.Metadata, 0, t.TotalReaders()) + for _, knownFiles := range t.knownFiles { + allCheckpoints = append(allCheckpoints, knownFiles.Get()...) + } + + for _, r := range t.previousPollFiles.Get() { + allCheckpoints = append(allCheckpoints, r.Metadata) + } + return allCheckpoints +} + +func (t *Tracker) LoadMetadata(metadata []*reader.Metadata) { + t.knownFiles[0].Add(metadata...) +} + +func (t *Tracker) CurrentPollFiles() []*reader.Reader { + return t.currentPollFiles.Get() +} + +func (t *Tracker) PreviousPollFiles() []*reader.Reader { + return t.previousPollFiles.Get() +} + +func (t *Tracker) ClosePreviousFiles() { + // t.previousPollFiles -> t.knownFiles[0] + + for r, _ := t.previousPollFiles.Pop(); r != nil; r, _ = t.previousPollFiles.Pop() { + t.knownFiles[0].Add(r.Close()) + } +} + +func (t *Tracker) EndPoll() { + // shift the filesets at end of every poll() call + // t.knownFiles[0] -> t.knownFiles[1] -> t.knownFiles[2] + copy(t.knownFiles[1:], t.knownFiles) + t.knownFiles[0] = fileset.New[*reader.Metadata](t.maxBatchFiles) +} + +func (t *Tracker) TotalReaders() int { + total := t.previousPollFiles.Len() + for i := 0; i < len(t.knownFiles); i++ { + total += t.knownFiles[i].Len() + } + return total +} diff --git a/pkg/stanza/fileconsumer/internal/tracker/tracker_other.go b/pkg/stanza/fileconsumer/internal/tracker/tracker_other.go new file mode 100644 index 000000000000..d23ebf9521b6 --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/tracker/tracker_other.go @@ -0,0 +1,21 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build !windows + +package tracker // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/tracker" + +import ( + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fileset" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" +) + +// On non-windows platforms, we keep files open between poll cycles so that we can detect +// and read "lost" files, which have been moved out of the matching pattern. +func (t *Tracker) EndConsume() { + t.ClosePreviousFiles() + + // t.currentPollFiles -> t.previousPollFiles + t.previousPollFiles = t.currentPollFiles + t.currentPollFiles = fileset.New[*reader.Reader](t.maxBatchFiles) +} diff --git a/pkg/stanza/fileconsumer/internal/tracker/tracker_windows.go b/pkg/stanza/fileconsumer/internal/tracker/tracker_windows.go new file mode 100644 index 000000000000..98cb0d6e57ea --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/tracker/tracker_windows.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build windows +// +build windows + +package tracker // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/tracker" + +import ( + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fileset" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" +) + +// On windows, we close files immediately after reading because they cannot be moved while open. +func (t *Tracker) EndConsume() { + // t.currentPollFiles -> t.previousPollFiles + t.previousPollFiles = t.currentPollFiles + t.ClosePreviousFiles() + t.currentPollFiles = fileset.New[*reader.Reader](t.maxBatchFiles) +} diff --git a/pkg/stanza/fileconsumer/internal/trie/package_test.go b/pkg/stanza/fileconsumer/internal/trie/package_test.go new file mode 100644 index 000000000000..59ce51dcd89c --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/trie/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package trie + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/fileconsumer/internal/util/package_test.go b/pkg/stanza/fileconsumer/internal/util/package_test.go new file mode 100644 index 000000000000..451fe8d8117c --- /dev/null +++ b/pkg/stanza/fileconsumer/internal/util/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package util + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/fileconsumer/matcher/internal/filter/package_test.go b/pkg/stanza/fileconsumer/matcher/internal/filter/package_test.go new file mode 100644 index 000000000000..ab3099a83e53 --- /dev/null +++ b/pkg/stanza/fileconsumer/matcher/internal/filter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/fileconsumer/matcher/internal/finder/package_test.go b/pkg/stanza/fileconsumer/matcher/internal/finder/package_test.go new file mode 100644 index 000000000000..ff99ce164228 --- /dev/null +++ b/pkg/stanza/fileconsumer/matcher/internal/finder/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package finder + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/fileconsumer/matcher/matcher_test.go b/pkg/stanza/fileconsumer/matcher/matcher_test.go index 2c8f799ac915..759ca8a7275f 100644 --- a/pkg/stanza/fileconsumer/matcher/matcher_test.go +++ b/pkg/stanza/fileconsumer/matcher/matcher_test.go @@ -712,7 +712,40 @@ func TestMatcher(t *testing.T) { }, expected: []string{"err.b.1.2023020602.log"}, }, - } + { + name: "Recursive match - include", + files: []string{ + filepath.Join("a", "1.log"), + filepath.Join("a", "2.log"), + filepath.Join("a", "b", "1.log"), + filepath.Join("a", "b", "2.log"), + filepath.Join("a", "b", "c", "1.log"), + filepath.Join("a", "b", "c", "2.log"), + }, + include: []string{filepath.Join("**", "1.log")}, + exclude: []string{}, + expected: []string{ + filepath.Join("a", "1.log"), + filepath.Join("a", "b", "1.log"), + filepath.Join("a", "b", "c", "1.log"), + }, + }, + { + name: "Recursive match - include and exclude", + files: []string{ + filepath.Join("a", "1.log"), + filepath.Join("a", "2.log"), + filepath.Join("a", "b", "1.log"), + filepath.Join("a", "b", "2.log"), + filepath.Join("a", "b", "c", "1.log"), + filepath.Join("a", "b", "c", "2.log"), + }, + include: []string{filepath.Join("**", "1.log")}, + exclude: []string{filepath.Join("**", "b", "**", "1.log")}, + expected: []string{ + filepath.Join("a", "1.log"), + }, + }} for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { diff --git a/pkg/stanza/fileconsumer/matcher/package_test.go b/pkg/stanza/fileconsumer/matcher/package_test.go new file mode 100644 index 000000000000..35f6590ce199 --- /dev/null +++ b/pkg/stanza/fileconsumer/matcher/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package matcher + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/fileconsumer/package_test.go b/pkg/stanza/fileconsumer/package_test.go new file mode 100644 index 000000000000..ce83ffab6419 --- /dev/null +++ b/pkg/stanza/fileconsumer/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package fileconsumer + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/fileconsumer/reader_test.go b/pkg/stanza/fileconsumer/reader_test.go deleted file mode 100644 index 723c8a31de54..000000000000 --- a/pkg/stanza/fileconsumer/reader_test.go +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package fileconsumer - -import ( - "context" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/decode" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fingerprint" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/header" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/regex" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/split" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/trim" -) - -func TestPersistFlusher(t *testing.T) { - flushPeriod := 100 * time.Millisecond - f, emitChan := testReaderFactory(t, split.Config{}, defaultMaxLogSize, flushPeriod) - - temp := openTemp(t, t.TempDir()) - fp, err := f.NewFingerprint(temp) - require.NoError(t, err) - - r, err := f.NewReader(temp, fp) - require.NoError(t, err) - - _, err = temp.WriteString("log with newline\nlog without newline") - require.NoError(t, err) - - // ReadToEnd will return when we hit eof, but we shouldn't emit the unfinished log yet - r.ReadToEnd(context.Background()) - waitForToken(t, emitChan, []byte("log with newline")) - - // Even trying again shouldn't produce the log yet because the flush period still hasn't expired. - r.ReadToEnd(context.Background()) - expectNoTokensUntil(t, emitChan, 2*flushPeriod) - - // A copy of the reader should remember that we last emitted about 200ms ago. - copyReader, err := f.NewReaderFromMetadata(temp, r.Metadata) - assert.NoError(t, err) - - // This time, the flusher will kick in and we should emit the unfinished log. - // If the copy did not remember when we last emitted a log, then the flushPeriod - // will not be expired at this point so we won't see the unfinished log. - copyReader.ReadToEnd(context.Background()) - waitForToken(t, emitChan, []byte("log without newline")) -} - -func TestTokenization(t *testing.T) { - testCases := []struct { - testName string - fileContent []byte - expected [][]byte - }{ - { - "simple", - []byte("testlog1\ntestlog2\n"), - [][]byte{ - []byte("testlog1"), - []byte("testlog2"), - }, - }, - { - "empty_only", - []byte("\n"), - [][]byte{ - []byte(""), - }, - }, - { - "empty_first", - []byte("\ntestlog1\ntestlog2\n"), - [][]byte{ - []byte(""), - []byte("testlog1"), - []byte("testlog2"), - }, - }, - { - "empty_between_lines", - []byte("testlog1\n\ntestlog2\n"), - [][]byte{ - []byte("testlog1"), - []byte(""), - []byte("testlog2"), - }, - }, - { - "multiple_empty", - []byte("\n\ntestlog1\n\n\ntestlog2\n"), - [][]byte{ - []byte(""), - []byte(""), - []byte("testlog1"), - []byte(""), - []byte(""), - []byte("testlog2"), - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.testName, func(t *testing.T) { - f, emitChan := testReaderFactory(t, split.Config{}, defaultMaxLogSize, defaultFlushPeriod) - - temp := openTemp(t, t.TempDir()) - _, err := temp.Write(tc.fileContent) - require.NoError(t, err) - - fp, err := f.NewFingerprint(temp) - require.NoError(t, err) - - r, err := f.NewReader(temp, fp) - require.NoError(t, err) - - r.ReadToEnd(context.Background()) - - for _, expected := range tc.expected { - require.Equal(t, expected, readToken(t, emitChan)) - } - }) - } -} - -func TestTokenizationTooLong(t *testing.T) { - fileContent := []byte("aaaaaaaaaaaaaaaaaaaaaa\naaa\n") - expected := [][]byte{ - []byte("aaaaaaaaaa"), - []byte("aaaaaaaaaa"), - []byte("aa"), - []byte("aaa"), - } - - f, emitChan := testReaderFactory(t, split.Config{}, 10, defaultFlushPeriod) - - temp := openTemp(t, t.TempDir()) - _, err := temp.Write(fileContent) - require.NoError(t, err) - - fp, err := f.NewFingerprint(temp) - require.NoError(t, err) - - r, err := f.NewReader(temp, fp) - require.NoError(t, err) - - r.ReadToEnd(context.Background()) - - for _, expected := range expected { - require.Equal(t, expected, readToken(t, emitChan)) - } -} - -func TestTokenizationTooLongWithLineStartPattern(t *testing.T) { - fileContent := []byte("aaa2023-01-01aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2023-01-01 2 2023-01-01") - expected := [][]byte{ - []byte("aaa"), - []byte("2023-01-01aaaaa"), - []byte("aaaaaaaaaaaaaaa"), - []byte("aaaaaaaaaaaaaaa"), - []byte("aaaaa"), - []byte("2023-01-01 2"), - } - - sCfg := split.Config{} - sCfg.LineStartPattern = `\d+-\d+-\d+` - f, emitChan := testReaderFactory(t, sCfg, 15, defaultFlushPeriod) - - temp := openTemp(t, t.TempDir()) - _, err := temp.Write(fileContent) - require.NoError(t, err) - - fp, err := f.NewFingerprint(temp) - require.NoError(t, err) - - r, err := f.NewReader(temp, fp) - require.NoError(t, err) - - r.ReadToEnd(context.Background()) - - for _, expected := range expected { - require.Equal(t, expected, readToken(t, emitChan)) - } -} - -func TestHeaderFingerprintIncluded(t *testing.T) { - fileContent := []byte("#header-line\naaa\n") - - f, _ := testReaderFactory(t, split.Config{}, 10, defaultFlushPeriod) - - regexConf := regex.NewConfig() - regexConf.Regex = "^#(?P
.*)" - - enc, err := decode.LookupEncoding("utf-8") - require.NoError(t, err) - - h, err := header.NewConfig("^#", []operator.Config{{Builder: regexConf}}, enc) - require.NoError(t, err) - f.HeaderConfig = h - - temp := openTemp(t, t.TempDir()) - - fp, err := f.NewFingerprint(temp) - require.NoError(t, err) - - r, err := f.NewReader(temp, fp) - require.NoError(t, err) - - _, err = temp.Write(fileContent) - require.NoError(t, err) - - r.ReadToEnd(context.Background()) - - require.Equal(t, []byte("#header-line\naaa\n"), r.Fingerprint.FirstBytes) -} - -func testReaderFactory(t *testing.T, sCfg split.Config, maxLogSize int, flushPeriod time.Duration) (*reader.Factory, chan *emitParams) { - emitChan := make(chan *emitParams, 100) - enc, err := decode.LookupEncoding(defaultEncoding) - require.NoError(t, err) - - splitFunc, err := sCfg.Func(enc, false, maxLogSize) - require.NoError(t, err) - - return &reader.Factory{ - SugaredLogger: testutil.Logger(t), - Config: &reader.Config{ - FingerprintSize: fingerprint.DefaultSize, - MaxLogSize: maxLogSize, - Emit: testEmitFunc(emitChan), - FlushTimeout: flushPeriod, - }, - FromBeginning: true, - Encoding: enc, - SplitFunc: splitFunc, - TrimFunc: trim.Whitespace, - }, emitChan -} - -func readToken(t *testing.T, c chan *emitParams) []byte { - select { - case call := <-c: - return call.token - case <-time.After(3 * time.Second): - require.FailNow(t, "Timed out waiting for token") - } - return nil -} diff --git a/pkg/stanza/fileconsumer/rotation_test.go b/pkg/stanza/fileconsumer/rotation_test.go index f016149bb416..008bb01bb71f 100644 --- a/pkg/stanza/fileconsumer/rotation_test.go +++ b/pkg/stanza/fileconsumer/rotation_test.go @@ -16,88 +16,28 @@ import ( "github.com/stretchr/testify/require" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/filetest" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" ) const windowsOS = "windows" -func TestMultiFileRotate(t *testing.T) { +func TestCopyTruncate(t *testing.T) { if runtime.GOOS == windowsOS { - // Windows has very poor support for moving active files, so rotation is less commonly used - t.Skip() - } - t.Parallel() - - getMessage := func(f, k, m int) string { return fmt.Sprintf("file %d-%d, message %d", f, k, m) } - - tempDir := t.TempDir() - cfg := NewConfig().includeDir(tempDir) - cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) - - numFiles := 3 - numMessages := 3 - numRotations := 3 - - expected := make([][]byte, 0, numFiles*numMessages*numRotations) - for i := 0; i < numFiles; i++ { - for j := 0; j < numMessages; j++ { - for k := 0; k < numRotations; k++ { - expected = append(expected, []byte(getMessage(i, k, j))) - } - } - } - - require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) - defer func() { - require.NoError(t, operator.Stop()) - }() - - temps := make([]*os.File, 0, numFiles) - for i := 0; i < numFiles; i++ { - temps = append(temps, openTemp(t, tempDir)) - } - - var wg sync.WaitGroup - for i, temp := range temps { - wg.Add(1) - go func(tf *os.File, f int) { - defer wg.Done() - for k := 0; k < numRotations; k++ { - for j := 0; j < numMessages; j++ { - writeString(t, tf, getMessage(f, k, j)+"\n") - } - - require.NoError(t, tf.Close()) - require.NoError(t, os.Rename(tf.Name(), fmt.Sprintf("%s.%d", tf.Name(), k))) - tf = reopenTemp(t, tf.Name()) - } - }(temp, i) - } - - waitForTokens(t, emitCalls, expected...) - wg.Wait() -} - -func TestMultiFileRotateSlow(t *testing.T) { - if runtime.GOOS == windowsOS { - // Windows has very poor support for moving active files, so rotation is less commonly used - t.Skip() + t.Skip("Rotation tests have been flaky on Windows. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16331") } - - t.Parallel() - tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + cfg.PollInterval = 10 * time.Millisecond + operator, sink := testManager(t, cfg) getMessage := func(f, k, m int) string { return fmt.Sprintf("file %d-%d, message %d", f, k, m) } fileName := func(f, k int) string { return filepath.Join(tempDir, fmt.Sprintf("file%d.rot%d.log", f, k)) } baseFileName := func(f int) string { return filepath.Join(tempDir, fmt.Sprintf("file%d.log", f)) } numFiles := 3 - numMessages := 30 + numMessages := 300 numRotations := 3 expected := make([][]byte, 0, numFiles*numMessages*numRotations) @@ -120,31 +60,38 @@ func TestMultiFileRotateSlow(t *testing.T) { go func(fn int) { defer wg.Done() + file := filetest.OpenFile(t, baseFileName(fn)) for rotationNum := 0; rotationNum < numRotations; rotationNum++ { - file := openFile(t, baseFileName(fn)) for messageNum := 0; messageNum < numMessages; messageNum++ { - writeString(t, file, getMessage(fn, rotationNum, messageNum)+"\n") - time.Sleep(5 * time.Millisecond) + filetest.WriteString(t, file, getMessage(fn, rotationNum, messageNum)+"\n") + time.Sleep(10 * time.Millisecond) } - - require.NoError(t, file.Close()) - require.NoError(t, os.Rename(baseFileName(fn), fileName(fn, rotationNum))) + require.NoError(t, file.Sync()) + _, err := file.Seek(0, 0) + require.NoError(t, err) + dst := filetest.OpenFile(t, fileName(fn, rotationNum)) + _, err = io.Copy(dst, file) + require.NoError(t, err) + require.NoError(t, dst.Close()) + require.NoError(t, file.Truncate(0)) + _, err = file.Seek(0, 0) + require.NoError(t, err) } }(fileNum) } - waitForTokens(t, emitCalls, expected...) + sink.ExpectTokens(t, expected...) wg.Wait() } -func TestMultiCopyTruncateSlow(t *testing.T) { +func TestMoveCreate(t *testing.T) { if runtime.GOOS == windowsOS { t.Skip("Rotation tests have been flaky on Windows. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16331") } tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) getMessage := func(f, k, m int) string { return fmt.Sprintf("file %d-%d, message %d", f, k, m) } fileName := func(f, k int) string { return filepath.Join(tempDir, fmt.Sprintf("file%d.rot%d.log", f, k)) } @@ -175,179 +122,21 @@ func TestMultiCopyTruncateSlow(t *testing.T) { defer wg.Done() for rotationNum := 0; rotationNum < numRotations; rotationNum++ { - file := openFile(t, baseFileName(fn)) + file := filetest.OpenFile(t, baseFileName(fn)) for messageNum := 0; messageNum < numMessages; messageNum++ { - writeString(t, file, getMessage(fn, rotationNum, messageNum)+"\n") - time.Sleep(5 * time.Millisecond) + filetest.WriteString(t, file, getMessage(fn, rotationNum, messageNum)+"\n") + time.Sleep(10 * time.Millisecond) } - - _, err := file.Seek(0, 0) - require.NoError(t, err) - dst := openFile(t, fileName(fn, rotationNum)) - _, err = io.Copy(dst, file) - require.NoError(t, err) - require.NoError(t, dst.Close()) - require.NoError(t, file.Truncate(0)) - _, err = file.Seek(0, 0) - require.NoError(t, err) - file.Close() + require.NoError(t, file.Close()) + require.NoError(t, os.Rename(baseFileName(fn), fileName(fn, rotationNum))) } }(fileNum) } - waitForTokens(t, emitCalls, expected...) + sink.ExpectTokens(t, expected...) wg.Wait() } -type rotationTest struct { - name string - totalLines int - maxLinesPerFile int - maxBackupFiles int - writeInterval time.Duration - pollInterval time.Duration - ephemeralLines bool -} - -/* -When log files are rotated at extreme speeds, it is possible to miss some log entries. -This can happen when an individual log entry is written and deleted within the duration -of a single poll interval. For example, consider the following scenario: - - A log file may have up to 9 backups (10 total log files) - - Each log file may contain up to 10 entries - - Log entries are written at an interval of 10µs - - Log files are polled at an interval of 100ms - -In this scenario, a log entry that is written may only exist on disk for about 1ms. -A polling interval of 100ms will most likely never produce a chance to read the log file. - -In production settings, this consideration is not very likely to be a problem, but it is -easy to encounter the issue in tests, and difficult to deterministically simulate edge cases. -However, the above understanding does allow for some consistent expectations. - 1. Cases that do not require deletion of old log entries should always pass. - 2. Cases where the polling interval is sufficiently rapid should always pass. - 3. When neither 1 nor 2 is true, there may be missing entries, but still no duplicates. - -The following method is provided largely as documentation of how this is expected to behave. -In practice, timing is largely dependent on the responsiveness of system calls. -*/ -func (rt rotationTest) expectEphemeralLines() bool { - // primary + backups - maxLinesInAllFiles := rt.maxLinesPerFile + rt.maxLinesPerFile*rt.maxBackupFiles - - // Will the test write enough lines to result in deletion of oldest backups? - maxBackupsExceeded := rt.totalLines > maxLinesInAllFiles - - // last line written in primary file will exist for l*b more writes - minTimeToLive := time.Duration(int(rt.writeInterval) * rt.maxLinesPerFile * rt.maxBackupFiles) - - // can a line be written and then rotated to deletion before ever observed? - return maxBackupsExceeded && rt.pollInterval > minTimeToLive -} - -func (rt rotationTest) run(tc rotationTest, copyTruncate, sequential bool) func(t *testing.T) { - return func(t *testing.T) { - - tempDir := t.TempDir() - cfg := NewConfig().includeDir(tempDir) - cfg.StartAt = "beginning" - cfg.PollInterval = tc.pollInterval - emitCalls := make(chan *emitParams, tc.totalLines) - operator, _ := buildTestManager(t, cfg, withEmitChan(emitCalls)) - - logger := getRotatingLogger(t, tempDir, tc.maxLinesPerFile, tc.maxBackupFiles, copyTruncate, sequential) - - expected := make([][]byte, 0, tc.totalLines) - baseStr := string(tokenWithLength(46)) // + ' 123' - for i := 0; i < tc.totalLines; i++ { - expected = append(expected, []byte(fmt.Sprintf("%s %3d", baseStr, i))) - } - - require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) - defer func() { - require.NoError(t, operator.Stop()) - }() - - for _, message := range expected { - logger.Println(string(message)) - time.Sleep(tc.writeInterval) - } - - received := make([][]byte, 0, tc.totalLines) - LOOP: - for { - select { - case call := <-emitCalls: - received = append(received, call.token) - case <-time.After(200 * time.Millisecond): - break LOOP - } - } - - if tc.ephemeralLines { - if !tc.expectEphemeralLines() { - // This is helpful for test development, and ensures the sample computation is used - t.Logf("Potentially unstable ephemerality expectation for test: %s", tc.name) - } - require.Subset(t, expected, received) - } else { - require.ElementsMatch(t, expected, received) - } - } -} - -func TestRotation(t *testing.T) { - if runtime.GOOS == windowsOS { - t.Skip("Rotation tests have been flaky on Windows. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16331") - } - cases := []rotationTest{ - { - name: "NoRotation", - totalLines: 10, - maxLinesPerFile: 10, - maxBackupFiles: 1, - writeInterval: time.Millisecond, - pollInterval: 10 * time.Millisecond, - }, - { - name: "NoDeletion", - totalLines: 20, - maxLinesPerFile: 10, - maxBackupFiles: 1, - writeInterval: time.Millisecond, - pollInterval: 10 * time.Millisecond, - }, - { - name: "Deletion", - totalLines: 30, - maxLinesPerFile: 10, - maxBackupFiles: 1, - writeInterval: time.Millisecond, - pollInterval: 10 * time.Millisecond, - ephemeralLines: true, - }, - { - name: "Deletion/ExceedFingerprint", - totalLines: 300, - maxLinesPerFile: 100, - maxBackupFiles: 1, - writeInterval: time.Millisecond, - pollInterval: 10 * time.Millisecond, - ephemeralLines: true, - }, - } - - for _, tc := range cases { - if runtime.GOOS != windowsOS { - // Windows has very poor support for moving active files, so rotation is less commonly used - t.Run(fmt.Sprintf("%s/MoveCreateTimestamped", tc.name), tc.run(tc, false, false)) - t.Run(fmt.Sprintf("%s/MoveCreateSequential", tc.name), tc.run(tc, false, true)) - } - t.Run(fmt.Sprintf("%s/CopyTruncateTimestamped", tc.name), tc.run(tc, true, false)) - t.Run(fmt.Sprintf("%s/CopyTruncateSequential", tc.name), tc.run(tc, true, true)) - } -} - func TestMoveFile(t *testing.T) { if runtime.GOOS == windowsOS { t.Skip("Moving files while open is unsupported on Windows") @@ -357,15 +146,15 @@ func TestMoveFile(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) operator.persister = testutil.NewUnscopedMockPersister() - temp1 := openTemp(t, tempDir) - writeString(t, temp1, "testlog1\n") + temp1 := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp1, "testlog1\n") temp1.Close() operator.poll(context.Background()) - waitForToken(t, emitCalls, []byte("testlog1")) + sink.ExpectToken(t, []byte("testlog1")) // Wait until all goroutines are finished before renaming operator.wg.Wait() @@ -373,7 +162,7 @@ func TestMoveFile(t *testing.T) { require.NoError(t, err) operator.poll(context.Background()) - expectNoTokens(t, emitCalls) + sink.ExpectNoCalls(t) } func TestTrackMovedAwayFiles(t *testing.T) { @@ -385,15 +174,15 @@ func TestTrackMovedAwayFiles(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) operator.persister = testutil.NewUnscopedMockPersister() - temp1 := openTemp(t, tempDir) - writeString(t, temp1, "testlog1\n") + temp1 := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp1, "testlog1\n") temp1.Close() operator.poll(context.Background()) - waitForToken(t, emitCalls, []byte("testlog1")) + sink.ExpectToken(t, []byte("testlog1")) // Wait until all goroutines are finished before renaming operator.wg.Wait() @@ -408,10 +197,10 @@ func TestTrackMovedAwayFiles(t *testing.T) { movedFile, err := os.OpenFile(newFileName, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) require.NoError(t, err) - writeString(t, movedFile, "testlog2\n") + filetest.WriteString(t, movedFile, "testlog2\n") operator.poll(context.Background()) - waitForToken(t, emitCalls, []byte("testlog2")) + sink.ExpectToken(t, []byte("testlog2")) } // Check if we read log lines from a rotated file before lines from the newly created file @@ -425,19 +214,19 @@ func TestTrackRotatedFilesLogOrder(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) - originalFile := openTemp(t, tempDir) + originalFile := filetest.OpenTemp(t, tempDir) orginalName := originalFile.Name() - writeString(t, originalFile, "testlog1\n") + filetest.WriteString(t, originalFile, "testlog1\n") require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) defer func() { require.NoError(t, operator.Stop()) }() - waitForToken(t, emitCalls, []byte("testlog1")) - writeString(t, originalFile, "testlog2\n") + sink.ExpectToken(t, []byte("testlog1")) + filetest.WriteString(t, originalFile, "testlog2\n") originalFile.Close() newDir := fmt.Sprintf("%s%s", tempDir[:len(tempDir)-1], "_new/") @@ -448,9 +237,9 @@ func TestTrackRotatedFilesLogOrder(t *testing.T) { newFile, err := os.OpenFile(orginalName, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) require.NoError(t, err) - writeString(t, newFile, "testlog3\n") + filetest.WriteString(t, newFile, "testlog3\n") - waitForTokens(t, emitCalls, []byte("testlog2"), []byte("testlog3")) + sink.ExpectTokens(t, []byte("testlog2"), []byte("testlog3")) } // When a file it rotated out of pattern via move/create, we should @@ -465,24 +254,24 @@ func TestRotatedOutOfPatternMoveCreate(t *testing.T) { cfg := NewConfig() cfg.Include = append(cfg.Include, fmt.Sprintf("%s/*.log1", tempDir)) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) operator.persister = testutil.NewUnscopedMockPersister() - originalFile := openTempWithPattern(t, tempDir, "*.log1") + originalFile := filetest.OpenTempWithPattern(t, tempDir, "*.log1") originalFileName := originalFile.Name() - writeString(t, originalFile, "testlog1\n") + filetest.WriteString(t, originalFile, "testlog1\n") operator.poll(context.Background()) - waitForToken(t, emitCalls, []byte("testlog1")) + sink.ExpectToken(t, []byte("testlog1")) // write more log, before next poll() begins - writeString(t, originalFile, "testlog2\n") + filetest.WriteString(t, originalFile, "testlog2\n") // move the file so it no longer matches require.NoError(t, originalFile.Close()) require.NoError(t, os.Rename(originalFileName, originalFileName+".old")) - newFile := openFile(t, originalFileName) + newFile := filetest.OpenFile(t, originalFileName) _, err := newFile.Write([]byte("testlog4\ntestlog5\n")) require.NoError(t, err) @@ -490,7 +279,7 @@ func TestRotatedOutOfPatternMoveCreate(t *testing.T) { operator.poll(context.Background()) // expect remaining log from old file as well as all from new file - waitForTokens(t, emitCalls, []byte("testlog2"), []byte("testlog4"), []byte("testlog5")) + sink.ExpectTokens(t, []byte("testlog2"), []byte("testlog4"), []byte("testlog5")) } // When a file it rotated out of pattern via copy/truncate, we should @@ -502,18 +291,18 @@ func TestRotatedOutOfPatternCopyTruncate(t *testing.T) { cfg := NewConfig() cfg.Include = append(cfg.Include, fmt.Sprintf("%s/*.log1", tempDir)) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) operator.persister = testutil.NewUnscopedMockPersister() - originalFile := openTempWithPattern(t, tempDir, "*.log1") - writeString(t, originalFile, "testlog1\n") + originalFile := filetest.OpenTempWithPattern(t, tempDir, "*.log1") + filetest.WriteString(t, originalFile, "testlog1\n") operator.poll(context.Background()) - waitForToken(t, emitCalls, []byte("testlog1")) + sink.ExpectToken(t, []byte("testlog1")) // write more log, before next poll() begins - writeString(t, originalFile, "testlog2\n") + filetest.WriteString(t, originalFile, "testlog2\n") // copy the file to another file i.e. rotate, out of pattern - newFile := openTempWithPattern(t, tempDir, "*.log2") + newFile := filetest.OpenTempWithPattern(t, tempDir, "*.log2") _, err := originalFile.Seek(0, 0) require.NoError(t, err) _, err = io.Copy(newFile, originalFile) @@ -528,7 +317,7 @@ func TestRotatedOutOfPatternCopyTruncate(t *testing.T) { // poll again operator.poll(context.Background()) - waitForTokens(t, emitCalls, []byte("testlog4"), []byte("testlog5")) + sink.ExpectTokens(t, []byte("testlog4"), []byte("testlog5")) } // TruncateThenWrite tests that, after a file has been truncated, @@ -542,23 +331,23 @@ func TestTruncateThenWrite(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) operator.persister = testutil.NewUnscopedMockPersister() - temp1 := openTemp(t, tempDir) - writeString(t, temp1, "testlog1\ntestlog2\n") + temp1 := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp1, "testlog1\ntestlog2\n") operator.poll(context.Background()) - waitForTokens(t, emitCalls, []byte("testlog1"), []byte("testlog2")) + sink.ExpectTokens(t, []byte("testlog1"), []byte("testlog2")) require.NoError(t, temp1.Truncate(0)) _, err := temp1.Seek(0, 0) require.NoError(t, err) - writeString(t, temp1, "testlog3\n") + filetest.WriteString(t, temp1, "testlog3\n") operator.poll(context.Background()) - waitForToken(t, emitCalls, []byte("testlog3")) - expectNoTokens(t, emitCalls) + sink.ExpectToken(t, []byte("testlog3")) + sink.ExpectNoCalls(t) } // CopyTruncateWriteBoth tests that when a file is copied @@ -574,18 +363,18 @@ func TestCopyTruncateWriteBoth(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) operator.persister = testutil.NewUnscopedMockPersister() - temp1 := openTemp(t, tempDir) - writeString(t, temp1, "testlog1\ntestlog2\n") + temp1 := filetest.OpenTemp(t, tempDir) + filetest.WriteString(t, temp1, "testlog1\ntestlog2\n") operator.poll(context.Background()) - waitForTokens(t, emitCalls, []byte("testlog1"), []byte("testlog2")) + sink.ExpectTokens(t, []byte("testlog1"), []byte("testlog2")) operator.wg.Wait() // wait for all goroutines to finish // Copy the first file to a new file, and add another log - temp2 := openTemp(t, tempDir) + temp2 := filetest.OpenTemp(t, tempDir) _, err := io.Copy(temp2, temp1) require.NoError(t, err) @@ -595,12 +384,12 @@ func TestCopyTruncateWriteBoth(t *testing.T) { require.NoError(t, err) // Write to original and new file - writeString(t, temp2, "testlog3\n") - writeString(t, temp1, "testlog4\n") + filetest.WriteString(t, temp2, "testlog3\n") + filetest.WriteString(t, temp1, "testlog4\n") // Expect both messages to come through operator.poll(context.Background()) - waitForTokens(t, emitCalls, []byte("testlog3"), []byte("testlog4")) + sink.ExpectTokens(t, []byte("testlog3"), []byte("testlog4")) } func TestFileMovedWhileOff_BigFiles(t *testing.T) { @@ -612,36 +401,36 @@ func TestFileMovedWhileOff_BigFiles(t *testing.T) { tempDir := t.TempDir() cfg := NewConfig().includeDir(tempDir) cfg.StartAt = "beginning" - operator, emitCalls := buildTestManager(t, cfg) + operator, sink := testManager(t, cfg) persister := testutil.NewUnscopedMockPersister() - log1 := tokenWithLength(1001) - log2 := tokenWithLength(1002) - log3 := tokenWithLength(1003) + log1 := filetest.TokenWithLength(1001) + log2 := filetest.TokenWithLength(1002) + log3 := filetest.TokenWithLength(1003) - temp := openTemp(t, tempDir) + temp := filetest.OpenTemp(t, tempDir) tempName := temp.Name() - writeString(t, temp, string(log1)+"\n") + filetest.WriteString(t, temp, string(log1)+"\n") // Run the operator to read the first log require.NoError(t, operator.Start(persister)) - waitForToken(t, emitCalls, log1) + sink.ExpectToken(t, log1) require.NoError(t, operator.Stop()) // Write one more log to the original file - writeString(t, temp, string(log2)+"\n") + filetest.WriteString(t, temp, string(log2)+"\n") require.NoError(t, temp.Close()) // Rename the file and open another file in the same location require.NoError(t, os.Rename(tempName, fmt.Sprintf("%s2", tempName))) // Write a different log to the new file - temp2 := reopenTemp(t, tempName) - writeString(t, temp2, string(log3)+"\n") + temp2 := filetest.ReopenTemp(t, tempName) + filetest.WriteString(t, temp2, string(log3)+"\n") // Expect the message written to the new log to come through - operator2, emitCalls2 := buildTestManager(t, cfg) + operator2, sink2 := testManager(t, cfg) require.NoError(t, operator2.Start(persister)) - waitForTokens(t, emitCalls2, log2, log3) + sink2.ExpectTokens(t, log2, log3) require.NoError(t, operator2.Stop()) } diff --git a/pkg/stanza/fileconsumer/util_test.go b/pkg/stanza/fileconsumer/util_test.go index 0407333c7f4e..550ed1ee0245 100644 --- a/pkg/stanza/fileconsumer/util_test.go +++ b/pkg/stanza/fileconsumer/util_test.go @@ -4,241 +4,22 @@ package fileconsumer import ( - "context" - "fmt" - "log" - "math/rand" - "os" - "path/filepath" "testing" - "time" - "github.com/observiq/nanojack" "github.com/stretchr/testify/require" - "go.uber.org/zap" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/emit" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/regex" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/emittest" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" ) -func nopEmitFunc(_ context.Context, _ []byte, _ map[string]any) error { - return nil +func testManager(t *testing.T, cfg *Config) (*Manager, *emittest.Sink) { + sink := emittest.NewSink() + return testManagerWithSink(t, cfg, sink), sink } -func testEmitFunc(emitChan chan *emitParams) emit.Callback { - return func(_ context.Context, token []byte, attrs map[string]any) error { - copied := make([]byte, len(token)) - copy(copied, token) - emitChan <- &emitParams{attrs, copied} - return nil - } -} - -// includeDir is a builder-like helper for quickly setting up a test config -func (c *Config) includeDir(dir string) *Config { - c.Include = append(c.Include, fmt.Sprintf("%s/*", dir)) - return c -} - -// withHeader is a builder-like helper for quickly setting up a test config header -func (c *Config) withHeader(headerMatchPattern, extractRegex string) *Config { - regexOpConfig := regex.NewConfig() - regexOpConfig.Regex = extractRegex - - c.Header = &HeaderConfig{ - Pattern: headerMatchPattern, - MetadataOperators: []operator.Config{ - { - Builder: regexOpConfig, - }, - }, - } - - return c -} - -func emitOnChan(received chan []byte) emit.Callback { - return func(_ context.Context, token []byte, _ map[string]any) error { - received <- token - return nil - } -} - -type emitParams struct { - attrs map[string]any - token []byte -} - -type testManagerConfig struct { - emitChan chan *emitParams -} - -type testManagerOption func(*testManagerConfig) - -func withEmitChan(emitChan chan *emitParams) testManagerOption { - return func(c *testManagerConfig) { - c.emitChan = emitChan - } -} - -func buildTestManager(t *testing.T, cfg *Config, opts ...testManagerOption) (*Manager, chan *emitParams) { - tmc := &testManagerConfig{emitChan: make(chan *emitParams, 100)} - for _, opt := range opts { - opt(tmc) - } - input, err := cfg.Build(testutil.Logger(t), testEmitFunc(tmc.emitChan)) +func testManagerWithSink(t *testing.T, cfg *Config, sink *emittest.Sink) *Manager { + input, err := cfg.Build(testutil.Logger(t), sink.Callback) require.NoError(t, err) - t.Cleanup(func() { input.closePreviousFiles() }) - return input, tmc.emitChan -} - -func openFile(tb testing.TB, path string) *os.File { - file, err := os.OpenFile(path, os.O_CREATE|os.O_RDWR, 0600) - require.NoError(tb, err) - tb.Cleanup(func() { _ = file.Close() }) - return file -} - -func openTemp(t testing.TB, tempDir string) *os.File { - return openTempWithPattern(t, tempDir, "") -} - -func reopenTemp(t testing.TB, name string) *os.File { - return openTempWithPattern(t, filepath.Dir(name), filepath.Base(name)) -} - -func openTempWithPattern(t testing.TB, tempDir, pattern string) *os.File { - file, err := os.CreateTemp(tempDir, pattern) - require.NoError(t, err) - t.Cleanup(func() { _ = file.Close() }) - return file -} - -func getRotatingLogger(t testing.TB, tempDir string, maxLines, maxBackups int, copyTruncate, sequential bool) *log.Logger { - file, err := os.CreateTemp(tempDir, "") - require.NoError(t, err) - require.NoError(t, file.Close()) // will be managed by rotator - - rotator := nanojack.Logger{ - Filename: file.Name(), - MaxLines: maxLines, - MaxBackups: maxBackups, - CopyTruncate: copyTruncate, - Sequential: sequential, - } - - t.Cleanup(func() { _ = rotator.Close() }) - - return log.New(&rotator, "", 0) -} - -func writeString(t testing.TB, file *os.File, s string) { - _, err := file.WriteString(s) - require.NoError(t, err) -} - -func tokenWithLength(length int) []byte { - charset := "abcdefghijklmnopqrstuvwxyz" - b := make([]byte, length) - for i := range b { - b[i] = charset[rand.Intn(len(charset))] - } - return b -} - -func waitForEmit(t *testing.T, c chan *emitParams) *emitParams { - select { - case call := <-c: - return call - case <-time.After(3 * time.Second): - require.FailNow(t, "Timed out waiting for message") - return nil - } -} - -func waitForNTokens(t *testing.T, c chan *emitParams, n int) [][]byte { - emitChan := make([][]byte, 0, n) - for i := 0; i < n; i++ { - select { - case call := <-c: - emitChan = append(emitChan, call.token) - case <-time.After(3 * time.Second): - require.FailNow(t, "Timed out waiting for message") - return nil - } - } - return emitChan -} - -func waitForToken(t *testing.T, c chan *emitParams, expected []byte) { - select { - case call := <-c: - require.Equal(t, expected, call.token) - case <-time.After(3 * time.Second): - require.FailNow(t, fmt.Sprintf("Timed out waiting for token: %s", expected)) - } -} - -func waitForTokenWithAttributes(t *testing.T, c chan *emitParams, expected []byte, attrs map[string]any) { - select { - case call := <-c: - require.Equal(t, expected, call.token) - require.Equal(t, attrs, call.attrs) - case <-time.After(3 * time.Second): - require.FailNow(t, fmt.Sprintf("Timed out waiting for token: %s", expected)) - } -} - -func waitForTokens(t *testing.T, c chan *emitParams, expected ...[]byte) { - actual := make([][]byte, 0, len(expected)) -LOOP: - for { - select { - case call := <-c: - actual = append(actual, call.token) - case <-time.After(3 * time.Second): - break LOOP - } - } - - require.ElementsMatch(t, expected, actual) -} - -func expectNoTokens(t *testing.T, c chan *emitParams) { - expectNoTokensUntil(t, c, 200*time.Millisecond) -} - -func expectNoTokensUntil(t *testing.T, c chan *emitParams, d time.Duration) { - select { - case token := <-c: - require.FailNow(t, "Received unexpected message", "Message: %s", token) - case <-time.After(d): - } -} - -const mockOperatorType = "mock" - -func init() { - operator.Register(mockOperatorType, func() operator.Builder { return newMockOperatorConfig(NewConfig()) }) -} - -type mockOperatorConfig struct { - helper.BasicConfig `mapstructure:",squash"` - *Config `mapstructure:",squash"` -} - -func newMockOperatorConfig(cfg *Config) *mockOperatorConfig { - return &mockOperatorConfig{ - BasicConfig: helper.NewBasicConfig(mockOperatorType, mockOperatorType), - Config: cfg, - } -} - -// This function is impelmented for compatibility with operatortest -// but is not meant to be used directly -func (h *mockOperatorConfig) Build(*zap.SugaredLogger) (operator.Operator, error) { - panic("not impelemented") + t.Cleanup(func() { input.tracker.ClosePreviousFiles() }) + return input } diff --git a/pkg/stanza/flush/package_test.go b/pkg/stanza/flush/package_test.go new file mode 100644 index 000000000000..29b9ca63eb04 --- /dev/null +++ b/pkg/stanza/flush/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package flush + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/go.mod b/pkg/stanza/go.mod index a24898909d92..e2b02902ec32 100644 --- a/pkg/stanza/go.mod +++ b/pkg/stanza/go.mod @@ -1,63 +1,75 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza -go 1.20 +go 1.21 require ( - github.com/antonmedv/expr v1.15.3 github.com/bmatcuk/doublestar/v4 v4.6.1 - github.com/cespare/xxhash/v2 v2.2.0 - github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 + github.com/cespare/xxhash/v2 v2.3.0 + github.com/expr-lang/expr v1.16.3 + github.com/fsnotify/fsnotify v1.7.0 + github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 github.com/jpillora/backoff v1.0.0 github.com/json-iterator/go v1.1.12 - github.com/observiq/nanojack v0.0.0-20201106172433-343928847ebc - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/config/configtls v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/receiver v0.89.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/stretchr/testify v1.9.0 + github.com/valyala/fastjson v1.6.4 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/config/configtls v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/featuregate v1.5.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/receiver v0.98.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 - golang.org/x/sys v0.14.0 + go.uber.org/zap v1.27.0 + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa + golang.org/x/sys v0.18.0 golang.org/x/text v0.14.0 - gonum.org/v1/gonum v0.14.0 + gonum.org/v1/gonum v0.15.0 gopkg.in/yaml.v2 v2.4.0 ) require ( - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/stretchr/objx v0.5.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - golang.org/x/net v0.18.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect + golang.org/x/net v0.23.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/stanza/go.sum b/pkg/stanza/go.sum index edf1fc3b7846..5a5a1f983a4b 100644 --- a/pkg/stanza/go.sum +++ b/pkg/stanza/go.sum @@ -1,63 +1,41 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= 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/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= -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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/expr-lang/expr v1.16.3 h1:NLldf786GffptcXNxxJx5dQ+FzeWDKChBDqOOwyK8to= +github.com/expr-lang/expr v1.16.3/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= 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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 h1:s9ZL6ZhFF8y6ebnm1FLvobkzoIu5xwDQUcRPk/IEhpM= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6/go.mod h1:aXdIdfn2OcGnMhOTojXmwZqXKgC3MU5riiNvzwwG9OY= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 h1:2r2WiFeAwiJ/uyx1qIKnV1L4C9w/2V8ehlbJY4gjFaM= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4/go.mod h1:1yEQhaLb/cETXCqQmdh7lDjupNAReO7c83AHyK2dJ48= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -68,17 +46,16 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 h1:bCiVCRCs1Heq84lurVinUPy19keqGEe4jh5vtK37jcg= github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -86,155 +63,133 @@ 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/observiq/nanojack v0.0.0-20201106172433-343928847ebc h1:49ewVBwLcy+eYqI4R0ICilCI4dPjddpFXWv3liXzUxM= -github.com/observiq/nanojack v0.0.0-20201106172433-343928847ebc/go.mod h1:WXIHwGy+c7/IK2PiJ4oxuTHkpnkSut7TNFpKnI5llPU= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.6.1/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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= +github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= 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/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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/sync v0.0.0-20220722155255-886fb9371eb4/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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= 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/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 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/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.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/pkg/stanza/operator/config.go b/pkg/stanza/operator/config.go index 99256be30518..f9934c6a06ff 100644 --- a/pkg/stanza/operator/config.go +++ b/pkg/stanza/operator/config.go @@ -107,7 +107,7 @@ func (c *Config) Unmarshal(component *confmap.Conf) error { } builder := builderFunc() - if err := component.Unmarshal(builder, confmap.WithErrorUnused()); err != nil { + if err := component.Unmarshal(builder, confmap.WithIgnoreUnused()); err != nil { return fmt.Errorf("unmarshal to %s: %w", typeString, err) } diff --git a/pkg/stanza/operator/helper/expr_string.go b/pkg/stanza/operator/helper/expr_string.go index 571751e01698..9ec71be8c025 100644 --- a/pkg/stanza/operator/helper/expr_string.go +++ b/pkg/stanza/operator/helper/expr_string.go @@ -9,9 +9,9 @@ import ( "strings" "sync" - "github.com/antonmedv/expr" - "github.com/antonmedv/expr/ast" - "github.com/antonmedv/expr/vm" + "github.com/expr-lang/expr" + "github.com/expr-lang/expr/ast" + "github.com/expr-lang/expr/vm" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/errors" diff --git a/pkg/stanza/operator/helper/input.go b/pkg/stanza/operator/helper/input.go index 9b6fa5e44c6e..214fa3242f2a 100644 --- a/pkg/stanza/operator/helper/input.go +++ b/pkg/stanza/operator/helper/input.go @@ -83,8 +83,8 @@ func (i *InputOperator) CanProcess() bool { } // Process will always return an error if called. -func (i *InputOperator) Process(_ context.Context, entry *entry.Entry) error { - i.Errorw("Operator received an entry, but can not process", zap.Any("entry", entry)) +func (i *InputOperator) Process(_ context.Context, _ *entry.Entry) error { + i.Errorw("Operator received an entry, but can not process") return errors.NewError( "Operator can not process logs.", "Ensure that operator is not configured to receive logs from other operators", diff --git a/pkg/stanza/operator/helper/ip_resolver_test.go b/pkg/stanza/operator/helper/ip_resolver_test.go index d660810817bb..7f4c82eec3d0 100644 --- a/pkg/stanza/operator/helper/ip_resolver_test.go +++ b/pkg/stanza/operator/helper/ip_resolver_test.go @@ -18,6 +18,7 @@ func TestIPResolverCacheLookup(t *testing.T) { } require.Equal(t, "definitely invalid hostname", resolver.GetHostFromIP("127.0.0.1")) + resolver.Stop() } func TestIPResolverCacheInvalidation(t *testing.T) { @@ -45,6 +46,7 @@ func TestIPResolver100Hits(t *testing.T) { for i := 0; i < 100; i++ { require.Equal(t, "definitely invalid hostname", resolver.GetHostFromIP("127.0.0.1")) } + resolver.Stop() } func TestIPResolverWithMultipleStops(_ *testing.T) { diff --git a/pkg/stanza/operator/helper/package_test.go b/pkg/stanza/operator/helper/package_test.go new file mode 100644 index 000000000000..c41dd2a22337 --- /dev/null +++ b/pkg/stanza/operator/helper/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package helper + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/helper/time.go b/pkg/stanza/operator/helper/time.go index 411012f5897d..158fffc8bee7 100644 --- a/pkg/stanza/operator/helper/time.go +++ b/pkg/stanza/operator/helper/time.go @@ -31,7 +31,7 @@ const NativeKey = "native" // provided for operator development // NewTimeParser creates a new time parser with default values func NewTimeParser() TimeParser { return TimeParser{ - LayoutType: "strptime", + LayoutType: StrptimeKey, } } @@ -48,7 +48,7 @@ type TimeParser struct { // Unmarshal starting from default settings func (t *TimeParser) Unmarshal(component *confmap.Conf) error { cfg := NewTimeParser() - err := component.Unmarshal(&cfg, confmap.WithErrorUnused()) + err := component.Unmarshal(&cfg, confmap.WithIgnoreUnused()) if err != nil { return err } diff --git a/pkg/stanza/operator/helper/transformer.go b/pkg/stanza/operator/helper/transformer.go index df888b8c530f..bc19174e44cd 100644 --- a/pkg/stanza/operator/helper/transformer.go +++ b/pkg/stanza/operator/helper/transformer.go @@ -7,7 +7,7 @@ import ( "context" "fmt" - "github.com/antonmedv/expr/vm" + "github.com/expr-lang/expr/vm" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" @@ -95,7 +95,7 @@ func (t *TransformerOperator) ProcessWith(ctx context.Context, entry *entry.Entr // HandleEntryError will handle an entry error using the on_error strategy. func (t *TransformerOperator) HandleEntryError(ctx context.Context, entry *entry.Entry, err error) error { - t.Errorw("Failed to process entry", zap.Any("error", err), zap.Any("action", t.OnError), zap.Any("entry", entry)) + t.Errorw("Failed to process entry", zap.Any("error", err), zap.Any("action", t.OnError)) if t.OnError == SendOnError { t.Write(ctx, entry) } diff --git a/pkg/stanza/operator/helper/transformer_test.go b/pkg/stanza/operator/helper/transformer_test.go index f59c30adfab9..59e53462b56b 100644 --- a/pkg/stanza/operator/helper/transformer_test.go +++ b/pkg/stanza/operator/helper/transformer_test.go @@ -77,7 +77,7 @@ func TestTransformerDropOnError(t *testing.T) { } ctx := context.Background() testEntry := entry.New() - transform := func(e *entry.Entry) error { + transform := func(_ *entry.Entry) error { return fmt.Errorf("Failure") } @@ -104,7 +104,7 @@ func TestTransformerSendOnError(t *testing.T) { } ctx := context.Background() testEntry := entry.New() - transform := func(e *entry.Entry) error { + transform := func(_ *entry.Entry) error { return fmt.Errorf("Failure") } @@ -131,7 +131,7 @@ func TestTransformerProcessWithValid(t *testing.T) { } ctx := context.Background() testEntry := entry.New() - transform := func(e *entry.Entry) error { + transform := func(_ *entry.Entry) error { return nil } diff --git a/pkg/stanza/operator/helper/writer.go b/pkg/stanza/operator/helper/writer.go index ced6b5533adc..dc0bc251520b 100644 --- a/pkg/stanza/operator/helper/writer.go +++ b/pkg/stanza/operator/helper/writer.go @@ -94,8 +94,8 @@ func (w *WriterOperator) SetOutputs(operators []operator.Operator) error { } // SetOutputIDs will set the outputs of the operator. -func (w *WriterOperator) SetOutputIDs(opIds []string) { - w.OutputIDs = opIds +func (w *WriterOperator) SetOutputIDs(opIDs []string) { + w.OutputIDs = opIDs } // FindOperator will find an operator matching the supplied id. diff --git a/pkg/stanza/operator/input/file/config_test.go b/pkg/stanza/operator/input/file/config_test.go index 429b7489e42c..4788e66c59a9 100644 --- a/pkg/stanza/operator/input/file/config_test.go +++ b/pkg/stanza/operator/input/file/config_test.go @@ -442,7 +442,7 @@ func TestBuild(t *testing.T) { }{ { "Default", - func(cfg *Config) {}, + func(_ *Config) {}, require.NoError, func(t *testing.T, f *Input) { require.Equal(t, f.OutputOperators[0], fakeOutput) @@ -479,7 +479,7 @@ func TestBuild(t *testing.T) { cfg.SplitConfig.LineStartPattern = "START.*" }, require.NoError, - func(t *testing.T, f *Input) {}, + func(_ *testing.T, _ *Input) {}, }, { "MultilineConfiguredEndPattern", @@ -487,7 +487,7 @@ func TestBuild(t *testing.T) { cfg.SplitConfig.LineEndPattern = "END.*" }, require.NoError, - func(t *testing.T, f *Input) {}, + func(_ *testing.T, _ *Input) {}, }, { "InvalidEncoding", @@ -508,9 +508,9 @@ func TestBuild(t *testing.T) { }, { "NoLineStartOrEnd", - func(cfg *Config) {}, + func(_ *Config) {}, require.NoError, - func(t *testing.T, f *Input) {}, + func(_ *testing.T, _ *Input) {}, }, { "InvalidLineStartRegex", diff --git a/pkg/stanza/operator/input/file/file.go b/pkg/stanza/operator/input/file/file.go deleted file mode 100644 index 4e42725dce4d..000000000000 --- a/pkg/stanza/operator/input/file/file.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package file // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file" - -import ( - "context" - "fmt" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -type toBodyFunc func([]byte) any - -// Input is an operator that monitors files for entries -type Input struct { - helper.InputOperator - - fileConsumer *fileconsumer.Manager - - toBody toBodyFunc -} - -// Start will start the file monitoring process -func (f *Input) Start(persister operator.Persister) error { - return f.fileConsumer.Start(persister) -} - -// Stop will stop the file monitoring process -func (f *Input) Stop() error { - return f.fileConsumer.Stop() -} - -func (f *Input) emit(ctx context.Context, token []byte, attrs map[string]any) error { - if len(token) == 0 { - return nil - } - - ent, err := f.NewEntry(f.toBody(token)) - if err != nil { - return fmt.Errorf("create entry: %w", err) - } - - for k, v := range attrs { - if err := ent.Set(entry.NewAttributeField(k), v); err != nil { - f.Errorf("set attribute: %w", err) - } - } - f.Write(ctx, ent) - return nil -} diff --git a/pkg/stanza/operator/input/file/file_test.go b/pkg/stanza/operator/input/file/file_test.go deleted file mode 100644 index b3adb53b7177..000000000000 --- a/pkg/stanza/operator/input/file/file_test.go +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package file - -import ( - "os" - "path/filepath" - "runtime" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" -) - -// AddFileResolvedFields tests that the `log.file.name_resolved` and `log.file.path_resolved` fields are included -// when IncludeFileNameResolved and IncludeFilePathResolved are set to true -func TestAddFileResolvedFields(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("Windows symlinks usage disabled for now. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21088") - } - t.Parallel() - operator, logReceived, tempDir := newTestFileOperator(t, func(cfg *Config) { - cfg.IncludeFileName = true - cfg.IncludeFilePath = true - cfg.IncludeFileNameResolved = true - cfg.IncludeFilePathResolved = true - }) - - // Create temp dir with log file - dir := t.TempDir() - - file, err := os.CreateTemp(dir, "") - require.NoError(t, err) - t.Cleanup(func() { - require.NoError(t, file.Close()) - }) - - // Create symbolic link in monitored directory - symLinkPath := filepath.Join(tempDir, "symlink") - err = os.Symlink(file.Name(), symLinkPath) - require.NoError(t, err) - - // Populate data - writeString(t, file, "testlog\n") - - // Resolve path - realPath, err := filepath.EvalSymlinks(file.Name()) - require.NoError(t, err) - resolved, err := filepath.Abs(realPath) - require.NoError(t, err) - - require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) - defer func() { - require.NoError(t, operator.Stop()) - }() - - e := waitForOne(t, logReceived) - require.Equal(t, filepath.Base(symLinkPath), e.Attributes["log.file.name"]) - require.Equal(t, symLinkPath, e.Attributes["log.file.path"]) - require.Equal(t, filepath.Base(resolved), e.Attributes["log.file.name_resolved"]) - require.Equal(t, resolved, e.Attributes["log.file.path_resolved"]) -} - -// ReadExistingLogs tests that, when starting from beginning, we -// read all the lines that are already there -func TestReadExistingLogs(t *testing.T) { - t.Parallel() - operator, logReceived, tempDir := newTestFileOperator(t, nil) - - // Create a file, then start - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog1\ntestlog2\n") - - require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) - defer func() { - require.NoError(t, operator.Stop()) - }() - - waitForMessage(t, logReceived, "testlog1") - waitForMessage(t, logReceived, "testlog2") -} - -// TestReadUsingNopEncoding tests when nop encoding is set, that the splitfunction returns all bytes unchanged. -func TestReadUsingNopEncoding(t *testing.T) { - tcs := []struct { - testName string - input []byte - test func(*testing.T, chan *entry.Entry) - }{ - { - "simple", - []byte("testlog1"), - func(t *testing.T, c chan *entry.Entry) { - waitForByteMessage(t, c, []byte("testlog1")) - }, - }, - { - "longer than maxlogsize", - []byte("testlog1testlog2testlog3"), - func(t *testing.T, c chan *entry.Entry) { - waitForByteMessage(t, c, []byte("testlog1")) - waitForByteMessage(t, c, []byte("testlog2")) - waitForByteMessage(t, c, []byte("testlog3")) - }, - }, - { - "doesn't hit max log size before eof", - []byte("testlog1testlog2test"), - func(t *testing.T, c chan *entry.Entry) { - waitForByteMessage(t, c, []byte("testlog1")) - waitForByteMessage(t, c, []byte("testlog2")) - waitForByteMessage(t, c, []byte("test")) - }, - }, - { - "special characters", - []byte("testlog1\n\ttestlog2\n\t"), - func(t *testing.T, c chan *entry.Entry) { - waitForByteMessage(t, c, []byte("testlog1")) - waitForByteMessage(t, c, []byte("\n\ttestlo")) - waitForByteMessage(t, c, []byte("g2\n\t")) - }, - }, - } - - t.Parallel() - - for _, tc := range tcs { - t.Run(tc.testName, func(t *testing.T) { - operator, logReceived, tempDir := newTestFileOperator(t, func(cfg *Config) { - cfg.MaxLogSize = 8 - cfg.Encoding = "nop" - }) - // Create a file, then start - temp := openTemp(t, tempDir) - bytesWritten, err := temp.Write(tc.input) - require.Greater(t, bytesWritten, 0) - require.NoError(t, err) - require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) - defer func() { - require.NoError(t, operator.Stop()) - }() - - tc.test(t, logReceived) - }) - } -} - -// ReadNewLogs tests that, after starting, if a new file is created -// all the entries in that file are read from the beginning -func TestReadNewLogs(t *testing.T) { - t.Parallel() - operator, logReceived, tempDir := newTestFileOperator(t, nil) - - require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) - defer func() { - require.NoError(t, operator.Stop()) - }() - - // Create a new file - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog\n") - - // Expect the message to come through - waitForMessage(t, logReceived, "testlog") -} - -// ReadExistingAndNewLogs tests that, on startup, if start_at -// is set to `beginning`, we read the logs that are there, and -// we read any additional logs that are written after startup -func TestReadExistingAndNewLogs(t *testing.T) { - t.Parallel() - operator, logReceived, tempDir := newTestFileOperator(t, nil) - - // Start with a file with an entry in it, and expect that entry - // to come through when we poll for the first time - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog1\n") - - require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) - defer func() { - require.NoError(t, operator.Stop()) - }() - - waitForMessage(t, logReceived, "testlog1") - - // Write a second entry, and expect that entry to come through - // as well - writeString(t, temp, "testlog2\n") - waitForMessage(t, logReceived, "testlog2") -} - -// StartAtEnd tests that when `start_at` is configured to `end`, -// we don't read any entries that were in the file before startup -func TestStartAtEnd(t *testing.T) { - t.Parallel() - - var pollInterval time.Duration - operator, logReceived, tempDir := newTestFileOperator(t, func(cfg *Config) { - cfg.StartAt = "end" - pollInterval = cfg.PollInterval - }) - - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog1\n") - - require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) - defer func() { - require.NoError(t, operator.Stop()) - }() - - time.Sleep(2 * pollInterval) - - expectNoMessages(t, logReceived) - - // Expect any new entries after the first poll - writeString(t, temp, "testlog2\n") - waitForMessage(t, logReceived, "testlog2") -} - -// SkipEmpty tests that the any empty lines are skipped -func TestSkipEmpty(t *testing.T) { - t.Parallel() - operator, logReceived, tempDir := newTestFileOperator(t, nil) - - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog1\n\ntestlog2\n") - - require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) - defer func() { - require.NoError(t, operator.Stop()) - }() - - waitForMessage(t, logReceived, "testlog1") - waitForMessage(t, logReceived, "testlog2") -} diff --git a/pkg/stanza/operator/input/file/input.go b/pkg/stanza/operator/input/file/input.go new file mode 100644 index 000000000000..7afdd484a241 --- /dev/null +++ b/pkg/stanza/operator/input/file/input.go @@ -0,0 +1,54 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package file // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file" + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +type toBodyFunc func([]byte) any + +// Input is an operator that monitors files for entries +type Input struct { + helper.InputOperator + + fileConsumer *fileconsumer.Manager + + toBody toBodyFunc +} + +// Start will start the file monitoring process +func (i *Input) Start(persister operator.Persister) error { + return i.fileConsumer.Start(persister) +} + +// Stop will stop the file monitoring process +func (i *Input) Stop() error { + return i.fileConsumer.Stop() +} + +func (i *Input) emit(ctx context.Context, token []byte, attrs map[string]any) error { + if len(token) == 0 { + return nil + } + + ent, err := i.NewEntry(i.toBody(token)) + if err != nil { + return fmt.Errorf("create entry: %w", err) + } + + for k, v := range attrs { + if err := ent.Set(entry.NewAttributeField(k), v); err != nil { + i.Errorf("set attribute: %w", err) + } + } + i.Write(ctx, ent) + return nil +} diff --git a/pkg/stanza/operator/input/file/input_test.go b/pkg/stanza/operator/input/file/input_test.go new file mode 100644 index 000000000000..0fcbeab36f33 --- /dev/null +++ b/pkg/stanza/operator/input/file/input_test.go @@ -0,0 +1,246 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package file + +import ( + "os" + "path/filepath" + "runtime" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +// AddFileResolvedFields tests that the `log.file.name_resolved` and `log.file.path_resolved` fields are included +// when IncludeFileNameResolved and IncludeFilePathResolved are set to true +func TestAddFileResolvedFields(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("Windows symlinks usage disabled for now. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21088") + } + t.Parallel() + operator, logReceived, tempDir := newTestFileOperator(t, func(cfg *Config) { + cfg.IncludeFileName = true + cfg.IncludeFilePath = true + cfg.IncludeFileNameResolved = true + cfg.IncludeFilePathResolved = true + cfg.IncludeFileOwnerName = runtime.GOOS != "windows" + cfg.IncludeFileOwnerGroupName = runtime.GOOS != "windows" + }) + + // Create temp dir with log file + dir := t.TempDir() + + file, err := os.CreateTemp(dir, "") + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, file.Close()) + }) + + // Create symbolic link in monitored directory + symLinkPath := filepath.Join(tempDir, "symlink") + err = os.Symlink(file.Name(), symLinkPath) + require.NoError(t, err) + + // Populate data + writeString(t, file, "testlog\n") + + // Resolve path + realPath, err := filepath.EvalSymlinks(file.Name()) + require.NoError(t, err) + resolved, err := filepath.Abs(realPath) + require.NoError(t, err) + + require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) + defer func() { + require.NoError(t, operator.Stop()) + }() + + e := waitForOne(t, logReceived) + require.Equal(t, filepath.Base(symLinkPath), e.Attributes["log.file.name"]) + require.Equal(t, symLinkPath, e.Attributes["log.file.path"]) + require.Equal(t, filepath.Base(resolved), e.Attributes["log.file.name_resolved"]) + require.Equal(t, resolved, e.Attributes["log.file.path_resolved"]) + if runtime.GOOS != "windows" { + require.NotNil(t, e.Attributes["log.file.owner.name"]) + require.NotNil(t, e.Attributes["log.file.owner.group.name"]) + } +} + +// ReadExistingLogs tests that, when starting from beginning, we +// read all the lines that are already there +func TestReadExistingLogs(t *testing.T) { + t.Parallel() + operator, logReceived, tempDir := newTestFileOperator(t, nil) + + // Create a file, then start + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog1\ntestlog2\n") + + require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) + defer func() { + require.NoError(t, operator.Stop()) + }() + + waitForMessage(t, logReceived, "testlog1") + waitForMessage(t, logReceived, "testlog2") +} + +// TestReadUsingNopEncoding tests when nop encoding is set, that the splitfunction returns all bytes unchanged. +func TestReadUsingNopEncoding(t *testing.T) { + tcs := []struct { + testName string + input []byte + test func(*testing.T, chan *entry.Entry) + }{ + { + "simple", + []byte("testlog1"), + func(t *testing.T, c chan *entry.Entry) { + waitForByteMessage(t, c, []byte("testlog1")) + }, + }, + { + "longer than maxlogsize", + []byte("testlog1testlog2testlog3"), + func(t *testing.T, c chan *entry.Entry) { + waitForByteMessage(t, c, []byte("testlog1")) + waitForByteMessage(t, c, []byte("testlog2")) + waitForByteMessage(t, c, []byte("testlog3")) + }, + }, + { + "doesn't hit max log size before eof", + []byte("testlog1testlog2test"), + func(t *testing.T, c chan *entry.Entry) { + waitForByteMessage(t, c, []byte("testlog1")) + waitForByteMessage(t, c, []byte("testlog2")) + waitForByteMessage(t, c, []byte("test")) + }, + }, + { + "special characters", + []byte("testlog1\n\ttestlog2\n\t"), + func(t *testing.T, c chan *entry.Entry) { + waitForByteMessage(t, c, []byte("testlog1")) + waitForByteMessage(t, c, []byte("\n\ttestlo")) + waitForByteMessage(t, c, []byte("g2\n\t")) + }, + }, + } + + t.Parallel() + + for _, tc := range tcs { + t.Run(tc.testName, func(t *testing.T) { + operator, logReceived, tempDir := newTestFileOperator(t, func(cfg *Config) { + cfg.MaxLogSize = 8 + cfg.Encoding = "nop" + }) + // Create a file, then start + temp := openTemp(t, tempDir) + bytesWritten, err := temp.Write(tc.input) + require.Greater(t, bytesWritten, 0) + require.NoError(t, err) + require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) + defer func() { + require.NoError(t, operator.Stop()) + }() + + tc.test(t, logReceived) + }) + } +} + +// ReadNewLogs tests that, after starting, if a new file is created +// all the entries in that file are read from the beginning +func TestReadNewLogs(t *testing.T) { + t.Parallel() + operator, logReceived, tempDir := newTestFileOperator(t, nil) + + require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) + defer func() { + require.NoError(t, operator.Stop()) + }() + + // Create a new file + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog\n") + + // Expect the message to come through + waitForMessage(t, logReceived, "testlog") +} + +// ReadExistingAndNewLogs tests that, on startup, if start_at +// is set to `beginning`, we read the logs that are there, and +// we read any additional logs that are written after startup +func TestReadExistingAndNewLogs(t *testing.T) { + t.Parallel() + operator, logReceived, tempDir := newTestFileOperator(t, nil) + + // Start with a file with an entry in it, and expect that entry + // to come through when we poll for the first time + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog1\n") + + require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) + defer func() { + require.NoError(t, operator.Stop()) + }() + + waitForMessage(t, logReceived, "testlog1") + + // Write a second entry, and expect that entry to come through + // as well + writeString(t, temp, "testlog2\n") + waitForMessage(t, logReceived, "testlog2") +} + +// StartAtEnd tests that when `start_at` is configured to `end`, +// we don't read any entries that were in the file before startup +func TestStartAtEnd(t *testing.T) { + t.Parallel() + + var pollInterval time.Duration + operator, logReceived, tempDir := newTestFileOperator(t, func(cfg *Config) { + cfg.StartAt = "end" + pollInterval = cfg.PollInterval + }) + + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog1\n") + + require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) + defer func() { + require.NoError(t, operator.Stop()) + }() + + time.Sleep(2 * pollInterval) + + expectNoMessages(t, logReceived) + + // Expect any new entries after the first poll + writeString(t, temp, "testlog2\n") + waitForMessage(t, logReceived, "testlog2") +} + +// SkipEmpty tests that the any empty lines are skipped +func TestSkipEmpty(t *testing.T) { + t.Parallel() + operator, logReceived, tempDir := newTestFileOperator(t, nil) + + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog1\n\ntestlog2\n") + + require.NoError(t, operator.Start(testutil.NewUnscopedMockPersister())) + defer func() { + require.NoError(t, operator.Stop()) + }() + + waitForMessage(t, logReceived, "testlog1") + waitForMessage(t, logReceived, "testlog2") +} diff --git a/pkg/stanza/operator/input/file/package_test.go b/pkg/stanza/operator/input/file/package_test.go new file mode 100644 index 000000000000..7d83c3249eb2 --- /dev/null +++ b/pkg/stanza/operator/input/file/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package file + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/input/generate/config.go b/pkg/stanza/operator/input/generate/config.go new file mode 100644 index 000000000000..85409cc36f4d --- /dev/null +++ b/pkg/stanza/operator/input/generate/config.go @@ -0,0 +1,50 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package generate // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/generate" + +import ( + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "generate_input" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig("") }) +} + +// NewConfig creates a new generate input config with default values +func NewConfig(operatorID string) *Config { + return &Config{ + InputConfig: helper.NewInputConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a generate input operator. +type Config struct { + helper.InputConfig `mapstructure:",squash"` + Entry entry.Entry `mapstructure:"entry"` + Count int `mapstructure:"count"` + Static bool `mapstructure:"static"` +} + +// Build will build a generate input operator. +func (c *Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + inputOperator, err := c.InputConfig.Build(logger) + if err != nil { + return nil, err + } + + c.Entry.Body = recursiveMapInterfaceToMapString(c.Entry.Body) + + return &Input{ + InputOperator: inputOperator, + entry: c.Entry, + count: c.Count, + static: c.Static, + }, nil +} diff --git a/pkg/stanza/operator/input/generate/generate.go b/pkg/stanza/operator/input/generate/generate.go deleted file mode 100644 index d62e21a965bd..000000000000 --- a/pkg/stanza/operator/input/generate/generate.go +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package generate // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/generate" - -import ( - "context" - "fmt" - "sync" - "time" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -func init() { - operator.Register("generate_input", func() operator.Builder { return NewConfig("") }) -} - -// NewConfig creates a new generate input config with default values -func NewConfig(operatorID string) *Config { - return &Config{ - InputConfig: helper.NewInputConfig(operatorID, "generate_input"), - } -} - -// Config is the configuration of a generate input operator. -type Config struct { - helper.InputConfig `mapstructure:",squash"` - Entry entry.Entry `mapstructure:"entry"` - Count int `mapstructure:"count"` - Static bool `mapstructure:"static"` -} - -// Build will build a generate input operator. -func (c *Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - inputOperator, err := c.InputConfig.Build(logger) - if err != nil { - return nil, err - } - - c.Entry.Body = recursiveMapInterfaceToMapString(c.Entry.Body) - - return &Input{ - InputOperator: inputOperator, - entry: c.Entry, - count: c.Count, - static: c.Static, - }, nil -} - -// Input is an operator that generates log entries. -type Input struct { - helper.InputOperator - entry entry.Entry - count int - static bool - wg sync.WaitGroup - cancel context.CancelFunc -} - -// Start will start generating log entries. -func (g *Input) Start(_ operator.Persister) error { - ctx, cancel := context.WithCancel(context.Background()) - g.cancel = cancel - - g.wg.Add(1) - go func() { - defer g.wg.Done() - i := 0 - for { - select { - case <-ctx.Done(): - return - default: - } - - entry := g.entry.Copy() - if !g.static { - entry.Timestamp = time.Now() - } - g.Write(ctx, entry) - - i++ - if i == g.count { - return - } - } - }() - - return nil -} - -// Stop will stop generating logs. -func (g *Input) Stop() error { - g.cancel() - g.wg.Wait() - return nil -} - -func recursiveMapInterfaceToMapString(m any) any { - switch m := m.(type) { - case map[string]any: - newMap := make(map[string]any) - for k, v := range m { - newMap[k] = recursiveMapInterfaceToMapString(v) - } - return newMap - case map[any]any: - newMap := make(map[string]any) - for k, v := range m { - str, ok := k.(string) - if !ok { - str = fmt.Sprintf("%v", k) - } - newMap[str] = recursiveMapInterfaceToMapString(v) - } - return newMap - default: - return m - } -} diff --git a/pkg/stanza/operator/input/generate/input.go b/pkg/stanza/operator/input/generate/input.go new file mode 100644 index 000000000000..a07be4ff16bd --- /dev/null +++ b/pkg/stanza/operator/input/generate/input.go @@ -0,0 +1,87 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package generate // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/generate" + +import ( + "context" + "fmt" + "sync" + "time" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Input is an operator that generates log entries. +type Input struct { + helper.InputOperator + entry entry.Entry + count int + static bool + wg sync.WaitGroup + cancel context.CancelFunc +} + +// Start will start generating log entries. +func (i *Input) Start(_ operator.Persister) error { + ctx, cancel := context.WithCancel(context.Background()) + i.cancel = cancel + + i.wg.Add(1) + go func() { + defer i.wg.Done() + n := 0 + for { + select { + case <-ctx.Done(): + return + default: + } + + entry := i.entry.Copy() + if !i.static { + entry.Timestamp = time.Now() + } + i.Write(ctx, entry) + + n++ + if n == i.count { + return + } + } + }() + + return nil +} + +// Stop will stop generating logs. +func (i *Input) Stop() error { + i.cancel() + i.wg.Wait() + return nil +} + +func recursiveMapInterfaceToMapString(m any) any { + switch m := m.(type) { + case map[string]any: + newMap := make(map[string]any) + for k, v := range m { + newMap[k] = recursiveMapInterfaceToMapString(v) + } + return newMap + case map[any]any: + newMap := make(map[string]any) + for k, v := range m { + str, ok := k.(string) + if !ok { + str = fmt.Sprintf("%v", k) + } + newMap[str] = recursiveMapInterfaceToMapString(v) + } + return newMap + default: + return m + } +} diff --git a/pkg/stanza/operator/input/generate/generate_test.go b/pkg/stanza/operator/input/generate/input_test.go similarity index 100% rename from pkg/stanza/operator/input/generate/generate_test.go rename to pkg/stanza/operator/input/generate/input_test.go diff --git a/pkg/stanza/operator/input/generate/package_test.go b/pkg/stanza/operator/input/generate/package_test.go new file mode 100644 index 000000000000..2748b17b3231 --- /dev/null +++ b/pkg/stanza/operator/input/generate/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package generate + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/input/journald/config_all.go b/pkg/stanza/operator/input/journald/config_all.go new file mode 100644 index 000000000000..e7af99b14f24 --- /dev/null +++ b/pkg/stanza/operator/input/journald/config_all.go @@ -0,0 +1,42 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package journald // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/journald" + +import ( + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "journald_input" + +// NewConfig creates a new input config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new input config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + InputConfig: helper.NewInputConfig(operatorID, operatorType), + StartAt: "end", + Priority: "info", + } +} + +// Config is the configuration of a journald input operator +type Config struct { + helper.InputConfig `mapstructure:",squash"` + + Directory *string `mapstructure:"directory,omitempty"` + Files []string `mapstructure:"files,omitempty"` + StartAt string `mapstructure:"start_at,omitempty"` + Units []string `mapstructure:"units,omitempty"` + Priority string `mapstructure:"priority,omitempty"` + Matches []MatchConfig `mapstructure:"matches,omitempty"` + 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/config_linux.go b/pkg/stanza/operator/input/journald/config_linux.go new file mode 100644 index 000000000000..45d297ad27bc --- /dev/null +++ b/pkg/stanza/operator/input/journald/config_linux.go @@ -0,0 +1,152 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build linux + +package journald // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/journald" + +import ( + "context" + "fmt" + "os/exec" + "regexp" + "sort" + "time" + + jsoniter "github.com/json-iterator/go" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" +) + +const waitDuration = 1 * time.Second + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// Build will build a journald input operator from the supplied configuration +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + inputOperator, err := c.InputConfig.Build(logger) + if err != nil { + return nil, err + } + + args, err := c.buildArgs() + if err != nil { + return nil, err + } + + return &Input{ + InputOperator: inputOperator, + newCmd: func(ctx context.Context, cursor []byte) cmd { + if cursor != nil { + args = append(args, "--after-cursor", string(cursor)) + } + return exec.CommandContext(ctx, "journalctl", args...) // #nosec - ... + // journalctl is an executable that is required for this operator to function + }, + json: jsoniter.ConfigFastest, + }, nil +} + +func (c Config) buildArgs() ([]string, error) { + args := make([]string, 0, 10) + + // Export logs in UTC time + args = append(args, "--utc") + + // Export logs as JSON + args = append(args, "--output=json") + + // Continue watching logs until cancelled + args = append(args, "--follow") + + switch c.StartAt { + case "end": + case "beginning": + args = append(args, "--no-tail") + default: + return nil, fmt.Errorf("invalid value '%s' for parameter 'start_at'", c.StartAt) + } + + for _, unit := range c.Units { + args = append(args, "--unit", unit) + } + + for _, identifier := range c.Identifiers { + args = append(args, "--identifier", identifier) + } + + args = append(args, "--priority", c.Priority) + + if len(c.Grep) > 0 { + args = append(args, "--grep", c.Grep) + } + + if c.Dmesg { + args = append(args, "--dmesg") + } + + switch { + case c.Directory != nil: + args = append(args, "--directory", *c.Directory) + case len(c.Files) > 0: + for _, file := range c.Files { + args = append(args, "--file", file) + } + } + + if len(c.Matches) > 0 { + matches, err := c.buildMatchesConfig() + if err != nil { + return nil, err + } + args = append(args, matches...) + } + + if c.All { + args = append(args, "--all") + } + + return args, nil +} + +func buildMatchConfig(mc MatchConfig) ([]string, error) { + re := regexp.MustCompile("^[_A-Z]+$") + + // Sort keys to be consistent with every run and to be predictable for tests + sortedKeys := make([]string, 0, len(mc)) + for key := range mc { + if !re.MatchString(key) { + return []string{}, fmt.Errorf("'%s' is not a valid Systemd field name", key) + } + sortedKeys = append(sortedKeys, key) + } + sort.Strings(sortedKeys) + + configs := []string{} + for _, key := range sortedKeys { + configs = append(configs, fmt.Sprintf("%s=%s", key, mc[key])) + } + + return configs, nil +} + +func (c Config) buildMatchesConfig() ([]string, error) { + matches := []string{} + + for i, mc := range c.Matches { + if i > 0 { + matches = append(matches, "+") + } + mcs, err := buildMatchConfig(mc) + if err != nil { + return []string{}, err + } + + matches = append(matches, mcs...) + } + + return matches, nil +} diff --git a/pkg/stanza/operator/input/journald/config_nonlinux.go b/pkg/stanza/operator/input/journald/config_nonlinux.go new file mode 100644 index 000000000000..5f560bbb4abb --- /dev/null +++ b/pkg/stanza/operator/input/journald/config_nonlinux.go @@ -0,0 +1,18 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build !linux + +package journald // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/journald" + +import ( + "errors" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" +) + +func (c Config) Build(_ *zap.SugaredLogger) (operator.Operator, error) { + return nil, errors.New("journald input operator is only supported on linux") +} diff --git a/pkg/stanza/operator/input/journald/input.go b/pkg/stanza/operator/input/journald/input.go new file mode 100644 index 000000000000..02fc1ac76c50 --- /dev/null +++ b/pkg/stanza/operator/input/journald/input.go @@ -0,0 +1,222 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build linux + +package journald // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/journald" + +import ( + "bufio" + "context" + "errors" + "fmt" + "io" + "os/exec" + "strconv" + "strings" + "sync" + "time" + + jsoniter "github.com/json-iterator/go" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Input is an operator that process logs using journald +type Input struct { + helper.InputOperator + + newCmd func(ctx context.Context, cursor []byte) cmd + + persister operator.Persister + json jsoniter.API + cancel context.CancelFunc + wg sync.WaitGroup +} + +type cmd interface { + StdoutPipe() (io.ReadCloser, error) + StderrPipe() (io.ReadCloser, error) + Start() error + Wait() error +} + +type failedCommand struct { + err string + output string +} + +var lastReadCursorKey = "lastReadCursor" + +// Start will start generating log entries. +func (operator *Input) Start(persister operator.Persister) error { + ctx, cancel := context.WithCancel(context.Background()) + operator.cancel = cancel + + // Start from a cursor if there is a saved offset + cursor, err := persister.Get(ctx, lastReadCursorKey) + if err != nil { + return fmt.Errorf("failed to get journalctl state: %w", err) + } + + operator.persister = persister + + // Start journalctl + journal := operator.newCmd(ctx, cursor) + stdout, err := journal.StdoutPipe() + if err != nil { + return fmt.Errorf("failed to get journalctl stdout: %w", err) + } + stderr, err := journal.StderrPipe() + if err != nil { + return fmt.Errorf("failed to get journalctl stderr: %w", err) + } + err = journal.Start() + if err != nil { + return fmt.Errorf("start journalctl: %w", err) + } + + stderrChan := make(chan string) + failedChan := make(chan failedCommand) + + // Start the wait goroutine + operator.wg.Add(1) + go func() { + defer operator.wg.Done() + err := journal.Wait() + message := <-stderrChan + + f := failedCommand{ + output: message, + } + + if err != nil { + ee := (&exec.ExitError{}) + if ok := errors.As(err, &ee); ok && ee.ExitCode() != 0 { + f.err = ee.Error() + } + } + + select { + case failedChan <- f: + // log an error in case channel is closed + case <-time.After(waitDuration): + operator.Logger().Errorw("journalctl command exited", "error", f.err, "output", f.output) + } + }() + + // Start the stderr reader goroutine + operator.wg.Add(1) + go func() { + defer operator.wg.Done() + + stderrBuf := bufio.NewReader(stderr) + messages := []string{} + + for { + line, err := stderrBuf.ReadBytes('\n') + if err != nil { + if !errors.Is(err, io.EOF) { + operator.Errorw("Received error reading from journalctl stderr", zap.Error(err)) + } + stderrChan <- strings.Join(messages, "\n") + return + } + messages = append(messages, string(line)) + } + }() + + // Start the reader goroutine + operator.wg.Add(1) + go func() { + defer operator.wg.Done() + + stdoutBuf := bufio.NewReader(stdout) + + for { + line, err := stdoutBuf.ReadBytes('\n') + if err != nil { + if !errors.Is(err, io.EOF) { + operator.Errorw("Received error reading from journalctl stdout", zap.Error(err)) + } + return + } + + entry, cursor, err := operator.parseJournalEntry(line) + if err != nil { + operator.Warnw("Failed to parse journal entry", zap.Error(err)) + continue + } + if err := operator.persister.Set(ctx, lastReadCursorKey, []byte(cursor)); err != nil { + operator.Warnw("Failed to set offset", zap.Error(err)) + } + operator.Write(ctx, entry) + } + }() + + // Wait waitDuration for eventual error + select { + case err := <-failedChan: + if err.err == "" { + return fmt.Errorf("journalctl command exited") + } + return fmt.Errorf("journalctl command failed (%v): %v", err.err, err.output) + case <-time.After(waitDuration): + return nil + } +} + +func (operator *Input) parseJournalEntry(line []byte) (*entry.Entry, string, error) { + var body map[string]any + err := operator.json.Unmarshal(line, &body) + if err != nil { + return nil, "", err + } + + timestamp, ok := body["__REALTIME_TIMESTAMP"] + if !ok { + return nil, "", errors.New("journald body missing __REALTIME_TIMESTAMP field") + } + + timestampString, ok := timestamp.(string) + if !ok { + return nil, "", errors.New("journald field for timestamp is not a string") + } + + timestampInt, err := strconv.ParseInt(timestampString, 10, 64) + if err != nil { + return nil, "", fmt.Errorf("parse timestamp: %w", err) + } + + delete(body, "__REALTIME_TIMESTAMP") + + cursor, ok := body["__CURSOR"] + if !ok { + return nil, "", errors.New("journald body missing __CURSOR field") + } + + cursorString, ok := cursor.(string) + if !ok { + return nil, "", errors.New("journald field for cursor is not a string") + } + + entry, err := operator.NewEntry(body) + if err != nil { + return nil, "", fmt.Errorf("failed to create entry: %w", err) + } + + entry.Timestamp = time.Unix(0, timestampInt*1000) // in microseconds + return entry, cursorString, nil +} + +// Stop will stop generating logs. +func (operator *Input) Stop() error { + if operator.cancel != nil { + operator.cancel() + } + operator.wg.Wait() + return nil +} diff --git a/pkg/stanza/operator/input/journald/input_test.go b/pkg/stanza/operator/input/journald/input_test.go new file mode 100644 index 000000000000..9b4e2a5cdca4 --- /dev/null +++ b/pkg/stanza/operator/input/journald/input_test.go @@ -0,0 +1,266 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build linux + +package journald + +import ( + "bytes" + "context" + "io" + "os/exec" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +type fakeJournaldCmd struct { + exitError *exec.ExitError + stdErr string +} + +func (f *fakeJournaldCmd) Start() error { + return nil +} + +func (f *fakeJournaldCmd) StdoutPipe() (io.ReadCloser, error) { + response := `{ "_BOOT_ID": "c4fa36de06824d21835c05ff80c54468", "_CAP_EFFECTIVE": "0", "_TRANSPORT": "journal", "_UID": "1000", "_EXE": "/usr/lib/systemd/systemd", "_AUDIT_LOGINUID": "1000", "MESSAGE": "run-docker-netns-4f76d707d45f.mount: Succeeded.", "_PID": "13894", "_CMDLINE": "/lib/systemd/systemd --user", "_MACHINE_ID": "d777d00e7caf45fbadedceba3975520d", "_SELINUX_CONTEXT": "unconfined\n", "CODE_FUNC": "unit_log_success", "SYSLOG_IDENTIFIER": "systemd", "_HOSTNAME": "myhostname", "MESSAGE_ID": "7ad2d189f7e94e70a38c781354912448", "_SYSTEMD_CGROUP": "/user.slice/user-1000.slice/user@1000.service/init.scope", "_SOURCE_REALTIME_TIMESTAMP": "1587047866229317", "USER_UNIT": "run-docker-netns-4f76d707d45f.mount", "SYSLOG_FACILITY": "3", "_SYSTEMD_SLICE": "user-1000.slice", "_AUDIT_SESSION": "286", "CODE_FILE": "../src/core/unit.c", "_SYSTEMD_USER_UNIT": "init.scope", "_COMM": "systemd", "USER_INVOCATION_ID": "88f7ca6bbf244dc8828fa901f9fe9be1", "CODE_LINE": "5487", "_SYSTEMD_INVOCATION_ID": "83f7fc7799064520b26eb6de1630429c", "PRIORITY": "6", "_GID": "1000", "__REALTIME_TIMESTAMP": "1587047866229555", "_SYSTEMD_UNIT": "user@1000.service", "_SYSTEMD_USER_SLICE": "-.slice", "__CURSOR": "s=b1e713b587ae4001a9ca482c4b12c005;i=1eed30;b=c4fa36de06824d21835c05ff80c54468;m=9f9d630205;t=5a369604ee333;x=16c2d4fd4fdb7c36", "__MONOTONIC_TIMESTAMP": "685540311557", "_SYSTEMD_OWNER_UID": "1000" } +` + reader := bytes.NewReader([]byte(response)) + return io.NopCloser(reader), nil +} + +func (f *fakeJournaldCmd) StderrPipe() (io.ReadCloser, error) { + reader := bytes.NewReader([]byte(f.stdErr)) + return io.NopCloser(reader), nil +} + +func (f *fakeJournaldCmd) Wait() error { + if f.exitError == nil { + return nil + } + + return f.exitError +} + +func TestInputJournald(t *testing.T) { + cfg := NewConfigWithID("my_journald_input") + cfg.OutputIDs = []string{"output"} + + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + + mockOutput := testutil.NewMockOperator("output") + received := make(chan *entry.Entry) + mockOutput.On("Process", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { + received <- args.Get(1).(*entry.Entry) + }).Return(nil) + + err = op.SetOutputs([]operator.Operator{mockOutput}) + require.NoError(t, err) + + op.(*Input).newCmd = func(_ context.Context, _ []byte) cmd { + return &fakeJournaldCmd{} + } + + err = op.Start(testutil.NewUnscopedMockPersister()) + assert.EqualError(t, err, "journalctl command exited") + defer func() { + require.NoError(t, op.Stop()) + }() + + expected := map[string]any{ + "_BOOT_ID": "c4fa36de06824d21835c05ff80c54468", + "_CAP_EFFECTIVE": "0", + "_TRANSPORT": "journal", + "_UID": "1000", + "_EXE": "/usr/lib/systemd/systemd", + "_AUDIT_LOGINUID": "1000", + "MESSAGE": "run-docker-netns-4f76d707d45f.mount: Succeeded.", + "_PID": "13894", + "_CMDLINE": "/lib/systemd/systemd --user", + "_MACHINE_ID": "d777d00e7caf45fbadedceba3975520d", + "_SELINUX_CONTEXT": "unconfined\n", + "CODE_FUNC": "unit_log_success", + "SYSLOG_IDENTIFIER": "systemd", + "_HOSTNAME": "myhostname", + "MESSAGE_ID": "7ad2d189f7e94e70a38c781354912448", + "_SYSTEMD_CGROUP": "/user.slice/user-1000.slice/user@1000.service/init.scope", + "_SOURCE_REALTIME_TIMESTAMP": "1587047866229317", + "USER_UNIT": "run-docker-netns-4f76d707d45f.mount", + "SYSLOG_FACILITY": "3", + "_SYSTEMD_SLICE": "user-1000.slice", + "_AUDIT_SESSION": "286", + "CODE_FILE": "../src/core/unit.c", + "_SYSTEMD_USER_UNIT": "init.scope", + "_COMM": "systemd", + "USER_INVOCATION_ID": "88f7ca6bbf244dc8828fa901f9fe9be1", + "CODE_LINE": "5487", + "_SYSTEMD_INVOCATION_ID": "83f7fc7799064520b26eb6de1630429c", + "PRIORITY": "6", + "_GID": "1000", + "_SYSTEMD_UNIT": "user@1000.service", + "_SYSTEMD_USER_SLICE": "-.slice", + "__CURSOR": "s=b1e713b587ae4001a9ca482c4b12c005;i=1eed30;b=c4fa36de06824d21835c05ff80c54468;m=9f9d630205;t=5a369604ee333;x=16c2d4fd4fdb7c36", + "__MONOTONIC_TIMESTAMP": "685540311557", + "_SYSTEMD_OWNER_UID": "1000", + } + + select { + case e := <-received: + require.Equal(t, expected, e.Body) + case <-time.After(time.Second): + require.FailNow(t, "Timed out waiting for entry to be read") + } +} + +func TestBuildConfig(t *testing.T) { + testCases := []struct { + Name string + Config func(_ *Config) + Expected []string + ExpectedError string + }{ + { + Name: "empty config", + Config: func(_ *Config) {}, + Expected: []string{"--utc", "--output=json", "--follow", "--priority", "info"}, + }, + { + Name: "units", + Config: func(cfg *Config) { + cfg.Units = []string{ + "dbus.service", + "user@1000.service", + } + }, + Expected: []string{"--utc", "--output=json", "--follow", "--unit", "dbus.service", "--unit", "user@1000.service", "--priority", "info"}, + }, + { + Name: "matches", + Config: func(cfg *Config) { + cfg.Matches = []MatchConfig{ + { + "_SYSTEMD_UNIT": "dbus.service", + }, + { + "_UID": "1000", + "_SYSTEMD_UNIT": "user@1000.service", + }, + } + }, + Expected: []string{"--utc", "--output=json", "--follow", "--priority", "info", "_SYSTEMD_UNIT=dbus.service", "+", "_SYSTEMD_UNIT=user@1000.service", "_UID=1000"}, + }, + { + Name: "invalid match", + Config: func(cfg *Config) { + cfg.Matches = []MatchConfig{ + { + "-SYSTEMD_UNIT": "dbus.service", + }, + } + }, + ExpectedError: "'-SYSTEMD_UNIT' is not a valid Systemd field name", + }, + { + Name: "units and matches", + Config: func(cfg *Config) { + cfg.Units = []string{"ssh"} + cfg.Matches = []MatchConfig{ + { + "_SYSTEMD_UNIT": "dbus.service", + }, + } + }, + Expected: []string{"--utc", "--output=json", "--follow", "--unit", "ssh", "--priority", "info", "_SYSTEMD_UNIT=dbus.service"}, + }, + { + Name: "identifiers", + Config: func(cfg *Config) { + cfg.Identifiers = []string{"wireplumber", "systemd"} + }, + Expected: []string{"--utc", "--output=json", "--follow", "--identifier", "wireplumber", "--identifier", "systemd", "--priority", "info"}, + }, + { + Name: "grep", + Config: func(cfg *Config) { + cfg.Grep = "test_grep" + }, + Expected: []string{"--utc", "--output=json", "--follow", "--priority", "info", "--grep", "test_grep"}, + }, + { + Name: "dmesg", + Config: func(cfg *Config) { + cfg.Dmesg = true + }, + 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 { + t.Run(tt.Name, func(t *testing.T) { + cfg := NewConfigWithID("my_journald_input") + tt.Config(cfg) + args, err := cfg.buildArgs() + + if tt.ExpectedError != "" { + require.Error(t, err) + require.ErrorContains(t, err, tt.ExpectedError) + return + } + require.NoError(t, err) + assert.Equal(t, tt.Expected, args) + }) + } +} + +func TestInputJournaldError(t *testing.T) { + cfg := NewConfigWithID("my_journald_input") + cfg.OutputIDs = []string{"output"} + + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + + mockOutput := testutil.NewMockOperator("output") + received := make(chan *entry.Entry) + mockOutput.On("Process", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { + received <- args.Get(1).(*entry.Entry) + }).Return(nil) + + err = op.SetOutputs([]operator.Operator{mockOutput}) + require.NoError(t, err) + + op.(*Input).newCmd = func(_ context.Context, _ []byte) cmd { + return &fakeJournaldCmd{ + exitError: &exec.ExitError{}, + stdErr: "stderr output\n", + } + } + + err = op.Start(testutil.NewUnscopedMockPersister()) + assert.EqualError(t, err, "journalctl command failed (): stderr output\n") + defer func() { + require.NoError(t, op.Stop()) + }() + + select { + case <-received: + case <-time.After(time.Second): + require.FailNow(t, "Timed out waiting for entry to be read") + } +} diff --git a/pkg/stanza/operator/input/journald/journald.go b/pkg/stanza/operator/input/journald/journald.go deleted file mode 100644 index 1a2315af9dc4..000000000000 --- a/pkg/stanza/operator/input/journald/journald.go +++ /dev/null @@ -1,383 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:build linux -// +build linux - -package journald // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/journald" - -import ( - "bufio" - "context" - "errors" - "fmt" - "io" - "os/exec" - "regexp" - "sort" - "strconv" - "strings" - "sync" - "time" - - jsoniter "github.com/json-iterator/go" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "journald_input" -const waitDuration = 1 * time.Second - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new input config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new input config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - InputConfig: helper.NewInputConfig(operatorID, operatorType), - StartAt: "end", - Priority: "info", - } -} - -// Config is the configuration of a journald input operator -type Config struct { - helper.InputConfig `mapstructure:",squash"` - - Directory *string `mapstructure:"directory,omitempty"` - Files []string `mapstructure:"files,omitempty"` - StartAt string `mapstructure:"start_at,omitempty"` - Units []string `mapstructure:"units,omitempty"` - Priority string `mapstructure:"priority,omitempty"` - Matches []MatchConfig `mapstructure:"matches,omitempty"` - Identifiers []string `mapstructure:"identifiers,omitempty"` - Grep string `mapstructure:"grep,omitempty"` - Dmesg bool `mapstructure:"dmesg,omitempty"` -} - -type MatchConfig map[string]string - -// Build will build a journald input operator from the supplied configuration -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - inputOperator, err := c.InputConfig.Build(logger) - if err != nil { - return nil, err - } - - args, err := c.buildArgs() - if err != nil { - return nil, err - } - - return &Input{ - InputOperator: inputOperator, - newCmd: func(ctx context.Context, cursor []byte) cmd { - if cursor != nil { - args = append(args, "--after-cursor", string(cursor)) - } - return exec.CommandContext(ctx, "journalctl", args...) // #nosec - ... - // journalctl is an executable that is required for this operator to function - }, - json: jsoniter.ConfigFastest, - }, nil -} - -func (c Config) buildArgs() ([]string, error) { - args := make([]string, 0, 10) - - // Export logs in UTC time - args = append(args, "--utc") - - // Export logs as JSON - args = append(args, "--output=json") - - // Continue watching logs until cancelled - args = append(args, "--follow") - - switch c.StartAt { - case "end": - case "beginning": - args = append(args, "--no-tail") - default: - return nil, fmt.Errorf("invalid value '%s' for parameter 'start_at'", c.StartAt) - } - - for _, unit := range c.Units { - args = append(args, "--unit", unit) - } - - for _, identifier := range c.Identifiers { - args = append(args, "--identifier", identifier) - } - - args = append(args, "--priority", c.Priority) - - if len(c.Grep) > 0 { - args = append(args, "--grep", c.Grep) - } - - if c.Dmesg { - args = append(args, "--dmesg") - } - - switch { - case c.Directory != nil: - args = append(args, "--directory", *c.Directory) - case len(c.Files) > 0: - for _, file := range c.Files { - args = append(args, "--file", file) - } - } - - if len(c.Matches) > 0 { - matches, err := c.buildMatchesConfig() - if err != nil { - return nil, err - } - args = append(args, matches...) - } - - return args, nil -} - -func buildMatchConfig(mc MatchConfig) ([]string, error) { - re := regexp.MustCompile("^[_A-Z]+$") - - // Sort keys to be consistent with every run and to be predictable for tests - sortedKeys := make([]string, 0, len(mc)) - for key := range mc { - if !re.MatchString(key) { - return []string{}, fmt.Errorf("'%s' is not a valid Systemd field name", key) - } - sortedKeys = append(sortedKeys, key) - } - sort.Strings(sortedKeys) - - configs := []string{} - for _, key := range sortedKeys { - configs = append(configs, fmt.Sprintf("%s=%s", key, mc[key])) - } - - return configs, nil -} - -func (c Config) buildMatchesConfig() ([]string, error) { - matches := []string{} - - for i, mc := range c.Matches { - if i > 0 { - matches = append(matches, "+") - } - mcs, err := buildMatchConfig(mc) - if err != nil { - return []string{}, err - } - - matches = append(matches, mcs...) - } - - return matches, nil -} - -// Input is an operator that process logs using journald -type Input struct { - helper.InputOperator - - newCmd func(ctx context.Context, cursor []byte) cmd - - persister operator.Persister - json jsoniter.API - cancel context.CancelFunc - wg sync.WaitGroup -} - -type cmd interface { - StdoutPipe() (io.ReadCloser, error) - StderrPipe() (io.ReadCloser, error) - Start() error - Wait() error -} - -type failedCommand struct { - err string - output string -} - -var lastReadCursorKey = "lastReadCursor" - -// Start will start generating log entries. -func (operator *Input) Start(persister operator.Persister) error { - ctx, cancel := context.WithCancel(context.Background()) - operator.cancel = cancel - - // Start from a cursor if there is a saved offset - cursor, err := persister.Get(ctx, lastReadCursorKey) - if err != nil { - return fmt.Errorf("failed to get journalctl state: %w", err) - } - - operator.persister = persister - - // Start journalctl - journal := operator.newCmd(ctx, cursor) - stdout, err := journal.StdoutPipe() - if err != nil { - return fmt.Errorf("failed to get journalctl stdout: %w", err) - } - stderr, err := journal.StderrPipe() - if err != nil { - return fmt.Errorf("failed to get journalctl stderr: %w", err) - } - err = journal.Start() - if err != nil { - return fmt.Errorf("start journalctl: %w", err) - } - - stderrChan := make(chan string) - failedChan := make(chan failedCommand) - - // Start the wait goroutine - operator.wg.Add(1) - go func() { - defer operator.wg.Done() - err := journal.Wait() - message := <-stderrChan - - f := failedCommand{ - output: message, - } - - if err != nil { - ee := (&exec.ExitError{}) - if ok := errors.As(err, &ee); ok && ee.ExitCode() != 0 { - f.err = ee.Error() - } - } - - select { - case failedChan <- f: - // log an error in case channel is closed - case <-time.After(waitDuration): - operator.Logger().Errorw("journalctl command exited", "error", f.err, "output", f.output) - } - }() - - // Start the stderr reader goroutine - operator.wg.Add(1) - go func() { - defer operator.wg.Done() - - stderrBuf := bufio.NewReader(stderr) - messages := []string{} - - for { - line, err := stderrBuf.ReadBytes('\n') - if err != nil { - if !errors.Is(err, io.EOF) { - operator.Errorw("Received error reading from journalctl stderr", zap.Error(err)) - } - stderrChan <- strings.Join(messages, "\n") - return - } - messages = append(messages, string(line)) - } - }() - - // Start the reader goroutine - operator.wg.Add(1) - go func() { - defer operator.wg.Done() - - stdoutBuf := bufio.NewReader(stdout) - - for { - line, err := stdoutBuf.ReadBytes('\n') - if err != nil { - if !errors.Is(err, io.EOF) { - operator.Errorw("Received error reading from journalctl stdout", zap.Error(err)) - } - return - } - - entry, cursor, err := operator.parseJournalEntry(line) - if err != nil { - operator.Warnw("Failed to parse journal entry", zap.Error(err)) - continue - } - if err := operator.persister.Set(ctx, lastReadCursorKey, []byte(cursor)); err != nil { - operator.Warnw("Failed to set offset", zap.Error(err)) - } - operator.Write(ctx, entry) - } - }() - - // Wait waitDuration for eventual error - select { - case err := <-failedChan: - if err.err == "" { - return fmt.Errorf("journalctl command exited") - } - return fmt.Errorf("journalctl command failed (%v): %v", err.err, err.output) - case <-time.After(waitDuration): - return nil - } -} - -func (operator *Input) parseJournalEntry(line []byte) (*entry.Entry, string, error) { - var body map[string]any - err := operator.json.Unmarshal(line, &body) - if err != nil { - return nil, "", err - } - - timestamp, ok := body["__REALTIME_TIMESTAMP"] - if !ok { - return nil, "", errors.New("journald body missing __REALTIME_TIMESTAMP field") - } - - timestampString, ok := timestamp.(string) - if !ok { - return nil, "", errors.New("journald field for timestamp is not a string") - } - - timestampInt, err := strconv.ParseInt(timestampString, 10, 64) - if err != nil { - return nil, "", fmt.Errorf("parse timestamp: %w", err) - } - - delete(body, "__REALTIME_TIMESTAMP") - - cursor, ok := body["__CURSOR"] - if !ok { - return nil, "", errors.New("journald body missing __CURSOR field") - } - - cursorString, ok := cursor.(string) - if !ok { - return nil, "", errors.New("journald field for cursor is not a string") - } - - entry, err := operator.NewEntry(body) - if err != nil { - return nil, "", fmt.Errorf("failed to create entry: %w", err) - } - - entry.Timestamp = time.Unix(0, timestampInt*1000) // in microseconds - return entry, cursorString, nil -} - -// Stop will stop generating logs. -func (operator *Input) Stop() error { - operator.cancel() - operator.wg.Wait() - return nil -} diff --git a/pkg/stanza/operator/input/journald/journald_test.go b/pkg/stanza/operator/input/journald/journald_test.go deleted file mode 100644 index fdd9641b5032..000000000000 --- a/pkg/stanza/operator/input/journald/journald_test.go +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:build linux -// +build linux - -package journald - -import ( - "bytes" - "context" - "io" - "os/exec" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" -) - -type fakeJournaldCmd struct { - exitError *exec.ExitError - stdErr string -} - -func (f *fakeJournaldCmd) Start() error { - return nil -} - -func (f *fakeJournaldCmd) StdoutPipe() (io.ReadCloser, error) { - response := `{ "_BOOT_ID": "c4fa36de06824d21835c05ff80c54468", "_CAP_EFFECTIVE": "0", "_TRANSPORT": "journal", "_UID": "1000", "_EXE": "/usr/lib/systemd/systemd", "_AUDIT_LOGINUID": "1000", "MESSAGE": "run-docker-netns-4f76d707d45f.mount: Succeeded.", "_PID": "13894", "_CMDLINE": "/lib/systemd/systemd --user", "_MACHINE_ID": "d777d00e7caf45fbadedceba3975520d", "_SELINUX_CONTEXT": "unconfined\n", "CODE_FUNC": "unit_log_success", "SYSLOG_IDENTIFIER": "systemd", "_HOSTNAME": "myhostname", "MESSAGE_ID": "7ad2d189f7e94e70a38c781354912448", "_SYSTEMD_CGROUP": "/user.slice/user-1000.slice/user@1000.service/init.scope", "_SOURCE_REALTIME_TIMESTAMP": "1587047866229317", "USER_UNIT": "run-docker-netns-4f76d707d45f.mount", "SYSLOG_FACILITY": "3", "_SYSTEMD_SLICE": "user-1000.slice", "_AUDIT_SESSION": "286", "CODE_FILE": "../src/core/unit.c", "_SYSTEMD_USER_UNIT": "init.scope", "_COMM": "systemd", "USER_INVOCATION_ID": "88f7ca6bbf244dc8828fa901f9fe9be1", "CODE_LINE": "5487", "_SYSTEMD_INVOCATION_ID": "83f7fc7799064520b26eb6de1630429c", "PRIORITY": "6", "_GID": "1000", "__REALTIME_TIMESTAMP": "1587047866229555", "_SYSTEMD_UNIT": "user@1000.service", "_SYSTEMD_USER_SLICE": "-.slice", "__CURSOR": "s=b1e713b587ae4001a9ca482c4b12c005;i=1eed30;b=c4fa36de06824d21835c05ff80c54468;m=9f9d630205;t=5a369604ee333;x=16c2d4fd4fdb7c36", "__MONOTONIC_TIMESTAMP": "685540311557", "_SYSTEMD_OWNER_UID": "1000" } -` - reader := bytes.NewReader([]byte(response)) - return io.NopCloser(reader), nil -} - -func (f *fakeJournaldCmd) StderrPipe() (io.ReadCloser, error) { - reader := bytes.NewReader([]byte(f.stdErr)) - return io.NopCloser(reader), nil -} - -func (f *fakeJournaldCmd) Wait() error { - if f.exitError == nil { - return nil - } - - return f.exitError -} - -func TestInputJournald(t *testing.T) { - cfg := NewConfigWithID("my_journald_input") - cfg.OutputIDs = []string{"output"} - - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - - mockOutput := testutil.NewMockOperator("output") - received := make(chan *entry.Entry) - mockOutput.On("Process", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { - received <- args.Get(1).(*entry.Entry) - }).Return(nil) - - err = op.SetOutputs([]operator.Operator{mockOutput}) - require.NoError(t, err) - - op.(*Input).newCmd = func(ctx context.Context, cursor []byte) cmd { - return &fakeJournaldCmd{} - } - - err = op.Start(testutil.NewUnscopedMockPersister()) - assert.EqualError(t, err, "journalctl command exited") - defer func() { - require.NoError(t, op.Stop()) - }() - - expected := map[string]any{ - "_BOOT_ID": "c4fa36de06824d21835c05ff80c54468", - "_CAP_EFFECTIVE": "0", - "_TRANSPORT": "journal", - "_UID": "1000", - "_EXE": "/usr/lib/systemd/systemd", - "_AUDIT_LOGINUID": "1000", - "MESSAGE": "run-docker-netns-4f76d707d45f.mount: Succeeded.", - "_PID": "13894", - "_CMDLINE": "/lib/systemd/systemd --user", - "_MACHINE_ID": "d777d00e7caf45fbadedceba3975520d", - "_SELINUX_CONTEXT": "unconfined\n", - "CODE_FUNC": "unit_log_success", - "SYSLOG_IDENTIFIER": "systemd", - "_HOSTNAME": "myhostname", - "MESSAGE_ID": "7ad2d189f7e94e70a38c781354912448", - "_SYSTEMD_CGROUP": "/user.slice/user-1000.slice/user@1000.service/init.scope", - "_SOURCE_REALTIME_TIMESTAMP": "1587047866229317", - "USER_UNIT": "run-docker-netns-4f76d707d45f.mount", - "SYSLOG_FACILITY": "3", - "_SYSTEMD_SLICE": "user-1000.slice", - "_AUDIT_SESSION": "286", - "CODE_FILE": "../src/core/unit.c", - "_SYSTEMD_USER_UNIT": "init.scope", - "_COMM": "systemd", - "USER_INVOCATION_ID": "88f7ca6bbf244dc8828fa901f9fe9be1", - "CODE_LINE": "5487", - "_SYSTEMD_INVOCATION_ID": "83f7fc7799064520b26eb6de1630429c", - "PRIORITY": "6", - "_GID": "1000", - "_SYSTEMD_UNIT": "user@1000.service", - "_SYSTEMD_USER_SLICE": "-.slice", - "__CURSOR": "s=b1e713b587ae4001a9ca482c4b12c005;i=1eed30;b=c4fa36de06824d21835c05ff80c54468;m=9f9d630205;t=5a369604ee333;x=16c2d4fd4fdb7c36", - "__MONOTONIC_TIMESTAMP": "685540311557", - "_SYSTEMD_OWNER_UID": "1000", - } - - select { - case e := <-received: - require.Equal(t, expected, e.Body) - case <-time.After(time.Second): - require.FailNow(t, "Timed out waiting for entry to be read") - } -} - -func TestBuildConfig(t *testing.T) { - testCases := []struct { - Name string - Config func(cfg *Config) - Expected []string - ExpectedError string - }{ - { - Name: "empty config", - Config: func(cfg *Config) {}, - Expected: []string{"--utc", "--output=json", "--follow", "--priority", "info"}, - }, - { - Name: "units", - Config: func(cfg *Config) { - cfg.Units = []string{ - "dbus.service", - "user@1000.service", - } - }, - Expected: []string{"--utc", "--output=json", "--follow", "--unit", "dbus.service", "--unit", "user@1000.service", "--priority", "info"}, - }, - { - Name: "matches", - Config: func(cfg *Config) { - cfg.Matches = []MatchConfig{ - { - "_SYSTEMD_UNIT": "dbus.service", - }, - { - "_UID": "1000", - "_SYSTEMD_UNIT": "user@1000.service", - }, - } - }, - Expected: []string{"--utc", "--output=json", "--follow", "--priority", "info", "_SYSTEMD_UNIT=dbus.service", "+", "_SYSTEMD_UNIT=user@1000.service", "_UID=1000"}, - }, - { - Name: "invalid match", - Config: func(cfg *Config) { - cfg.Matches = []MatchConfig{ - { - "-SYSTEMD_UNIT": "dbus.service", - }, - } - }, - ExpectedError: "'-SYSTEMD_UNIT' is not a valid Systemd field name", - }, - { - Name: "units and matches", - Config: func(cfg *Config) { - cfg.Units = []string{"ssh"} - cfg.Matches = []MatchConfig{ - { - "_SYSTEMD_UNIT": "dbus.service", - }, - } - }, - Expected: []string{"--utc", "--output=json", "--follow", "--unit", "ssh", "--priority", "info", "_SYSTEMD_UNIT=dbus.service"}, - }, - { - Name: "identifiers", - Config: func(cfg *Config) { - cfg.Identifiers = []string{"wireplumber", "systemd"} - }, - Expected: []string{"--utc", "--output=json", "--follow", "--identifier", "wireplumber", "--identifier", "systemd", "--priority", "info"}, - }, - { - Name: "grep", - Config: func(cfg *Config) { - cfg.Grep = "test_grep" - }, - Expected: []string{"--utc", "--output=json", "--follow", "--priority", "info", "--grep", "test_grep"}, - }, - { - Name: "dmesg", - Config: func(cfg *Config) { - cfg.Dmesg = true - }, - Expected: []string{"--utc", "--output=json", "--follow", "--priority", "info", "--dmesg"}, - }, - } - - for _, tt := range testCases { - t.Run(tt.Name, func(t *testing.T) { - cfg := NewConfigWithID("my_journald_input") - tt.Config(cfg) - args, err := cfg.buildArgs() - - if tt.ExpectedError != "" { - require.Error(t, err) - require.ErrorContains(t, err, tt.ExpectedError) - return - } - require.NoError(t, err) - assert.Equal(t, tt.Expected, args) - }) - } -} - -func TestInputJournaldError(t *testing.T) { - cfg := NewConfigWithID("my_journald_input") - cfg.OutputIDs = []string{"output"} - - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - - mockOutput := testutil.NewMockOperator("output") - received := make(chan *entry.Entry) - mockOutput.On("Process", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { - received <- args.Get(1).(*entry.Entry) - }).Return(nil) - - err = op.SetOutputs([]operator.Operator{mockOutput}) - require.NoError(t, err) - - op.(*Input).newCmd = func(ctx context.Context, cursor []byte) cmd { - return &fakeJournaldCmd{ - exitError: &exec.ExitError{}, - stdErr: "stderr output\n", - } - } - - err = op.Start(testutil.NewUnscopedMockPersister()) - assert.EqualError(t, err, "journalctl command failed (): stderr output\n") - defer func() { - require.NoError(t, op.Stop()) - }() - - select { - case <-received: - case <-time.After(time.Second): - require.FailNow(t, "Timed out waiting for entry to be read") - } -} diff --git a/pkg/stanza/operator/input/journald/package_test.go b/pkg/stanza/operator/input/journald/package_test.go new file mode 100644 index 000000000000..3c2e6d00c1f6 --- /dev/null +++ b/pkg/stanza/operator/input/journald/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package journald + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/input/namedpipe/config_all.go b/pkg/stanza/operator/input/namedpipe/config_all.go new file mode 100644 index 000000000000..64768b64f1c9 --- /dev/null +++ b/pkg/stanza/operator/input/namedpipe/config_all.go @@ -0,0 +1,41 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package namedpipe // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/namedpipe" + +import ( + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/split" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/trim" +) + +const ( + operatorType = "namedpipe" + DefaultMaxLogSize = 1024 * 1024 +) + +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfig creates a new stdin input config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + InputConfig: helper.NewInputConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a stdin input operator. +type Config struct { + helper.InputConfig `mapstructure:",squash"` + BaseConfig `mapstructure:",squash"` +} + +type BaseConfig struct { + Path string `mapstructure:"path"` + Permissions uint32 `mapstructure:"mode"` + Encoding string `mapstructure:"encoding"` + SplitConfig split.Config `mapstructure:"multiline,omitempty"` + TrimConfig trim.Config `mapstructure:",squash"` + MaxLogSize int `mapstructure:"max_log_size"` +} diff --git a/pkg/stanza/operator/input/namedpipe/config_linux.go b/pkg/stanza/operator/input/namedpipe/config_linux.go new file mode 100644 index 000000000000..30ad0253cfe2 --- /dev/null +++ b/pkg/stanza/operator/input/namedpipe/config_linux.go @@ -0,0 +1,52 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build linux + +package namedpipe // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/namedpipe" + +import ( + "fmt" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/decode" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" +) + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// Build will build a namedpipe input operator. +func (c *Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + inputOperator, err := c.InputConfig.Build(logger) + if err != nil { + return nil, err + } + + enc, err := decode.LookupEncoding(c.Encoding) + if err != nil { + return nil, fmt.Errorf("failed to lookup encoding %q: %w", c.Encoding, err) + } + + splitFunc, err := c.SplitConfig.Func(enc, true, DefaultMaxLogSize) + if err != nil { + return nil, fmt.Errorf("failed to create split function: %w", err) + } + + maxLogSize := c.MaxLogSize + if maxLogSize == 0 { + maxLogSize = DefaultMaxLogSize + } + + return &Input{ + InputOperator: inputOperator, + + buffer: make([]byte, maxLogSize), + path: c.Path, + permissions: c.Permissions, + splitFunc: splitFunc, + trimFunc: c.TrimConfig.Func(), + }, nil +} diff --git a/pkg/stanza/operator/input/namedpipe/input.go b/pkg/stanza/operator/input/namedpipe/input.go new file mode 100644 index 000000000000..adcaeadaad02 --- /dev/null +++ b/pkg/stanza/operator/input/namedpipe/input.go @@ -0,0 +1,144 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build linux + +package namedpipe // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/namedpipe" + +import ( + "bufio" + "context" + "fmt" + "os" + "sync" + + "go.uber.org/zap" + "golang.org/x/sys/unix" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/trim" +) + +type Input struct { + helper.InputOperator + + buffer []byte + path string + permissions uint32 + splitFunc bufio.SplitFunc + trimFunc trim.Func + cancel context.CancelFunc + pipe *os.File + wg sync.WaitGroup +} + +func (i *Input) Start(_ operator.Persister) error { + stat, err := os.Stat(i.path) + if err != nil && !os.IsNotExist(err) { + return fmt.Errorf("failed to stat named pipe: %w", err) + } + + if !os.IsNotExist(err) && stat.Mode()&os.ModeNamedPipe == 0 { + return fmt.Errorf("path %s is not a named pipe", i.path) + } + + if os.IsNotExist(err) { + if fifoErr := unix.Mkfifo(i.path, i.permissions); fifoErr != nil { + return fmt.Errorf("failed to create named pipe: %w", fifoErr) + } + } + + // chmod the named pipe because mkfifo respects the umask which may result + // in a named pipe with incorrect permissions. + if chmodErr := os.Chmod(i.path, os.FileMode(i.permissions)); chmodErr != nil { + return fmt.Errorf("failed to chmod named pipe: %w", chmodErr) + } + + watcher, err := NewWatcher(i.path) + if err != nil { + return fmt.Errorf("failed to create watcher: %w", err) + } + + pipe, err := os.OpenFile(i.path, os.O_RDWR, os.ModeNamedPipe) + if err != nil { + return fmt.Errorf("failed to open named pipe: %w", err) + } + + i.pipe = pipe + + ctx, cancel := context.WithCancel(context.Background()) + i.cancel = cancel + + i.wg.Add(2) + go func() { + defer i.wg.Done() + if err := watcher.Watch(ctx); err != nil { + i.Logger().Errorw("failed to watch named pipe", zap.Error(err)) + } + }() + + go func() { + defer i.wg.Done() + for { + select { + case <-watcher.C: + if err := i.process(ctx, pipe); err != nil { + i.Logger().Errorw("failed to process named pipe", zap.Error(err)) + } + case <-ctx.Done(): + return + } + } + }() + + return nil +} + +func (i *Input) Stop() error { + if i.pipe != nil { + i.pipe.Close() + } + + if i.cancel != nil { + i.cancel() + } + + i.wg.Wait() + return nil +} + +func (i *Input) process(ctx context.Context, pipe *os.File) error { + scan := bufio.NewScanner(pipe) + scan.Split(i.splitFunc) + scan.Buffer(i.buffer, len(i.buffer)) + + for scan.Scan() { + line := scan.Bytes() + if len(line) == 0 { + continue + } + + if err := i.sendEntry(ctx, line); err != nil { + return fmt.Errorf("failed to send entry: %w", err) + } + } + + return scan.Err() +} + +// sendEntry sends an entry to the next operator in the pipeline. +func (i *Input) sendEntry(ctx context.Context, bytes []byte) error { + bytes = i.trimFunc(bytes) + if len(bytes) == 0 { + return nil + } + + entry, err := i.NewEntry(string(bytes)) + if err != nil { + return fmt.Errorf("failed to create entry: %w", err) + } + + i.Write(ctx, entry) + return nil +} diff --git a/pkg/stanza/operator/input/namedpipe/input_nonlinux.go b/pkg/stanza/operator/input/namedpipe/input_nonlinux.go new file mode 100644 index 000000000000..8cc0d3168f61 --- /dev/null +++ b/pkg/stanza/operator/input/namedpipe/input_nonlinux.go @@ -0,0 +1,18 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build !linux + +package namedpipe // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/namedpipe" + +import ( + "errors" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" +) + +func (c *Config) Build(_ *zap.SugaredLogger) (operator.Operator, error) { + return nil, errors.New("namedpipe input operator is only supported on linux") +} diff --git a/pkg/stanza/operator/input/namedpipe/input_test.go b/pkg/stanza/operator/input/namedpipe/input_test.go new file mode 100644 index 000000000000..c1d258ab11c6 --- /dev/null +++ b/pkg/stanza/operator/input/namedpipe/input_test.go @@ -0,0 +1,148 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build linux + +package namedpipe + +import ( + "os" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "golang.org/x/sys/unix" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/pipeline" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +// filename attempts to get an unused filename. +func filename(t testing.TB) string { + t.Helper() + + file, err := os.CreateTemp("", "") + require.NoError(t, err) + + name := file.Name() + require.NoError(t, file.Close()) + require.NoError(t, os.Remove(name)) + + return name +} + +// TestCreatePipe tests that the named pipe is created as a pipe with the correct permissions. +func TestCreatePipe(t *testing.T) { + conf := NewConfig() + conf.Path = filename(t) + conf.Permissions = 0666 + + op, err := conf.Build(zaptest.NewLogger(t).Sugar()) + require.NoError(t, err) + + require.NoError(t, op.Start(testutil.NewUnscopedMockPersister())) + defer func() { + require.NoError(t, op.Stop()) + }() + + stat, err := os.Stat(conf.Path) + require.NoError(t, err) + + isPipe := stat.Mode()&os.ModeNamedPipe != 0 + require.True(t, isPipe, "file is not a named pipe") + require.Equal(t, conf.Permissions, uint32(stat.Mode().Perm())) +} + +// TestCreatePipeThatExists tests that the input errors if the named pipe already exists as a file. +func TestCreatePipeFailsWithFile(t *testing.T) { + conf := NewConfig() + conf.Path = filename(t) + conf.Permissions = 0666 + + pipe, err := os.OpenFile(conf.Path, os.O_CREATE, 0) + require.NoError(t, err) + defer func() { + require.NoError(t, pipe.Close()) + }() + + op, err := conf.Build(zaptest.NewLogger(t).Sugar()) + require.NoError(t, err) + + require.Error(t, op.Start(testutil.NewUnscopedMockPersister())) +} + +// TestCreatePipeAlreadyExists tests that the input works if the file already exists as a pipe. +func TestCreatePipeAlreadyExists(t *testing.T) { + conf := NewConfig() + conf.Path = filename(t) + conf.Permissions = 0666 + + require.NoError(t, unix.Mkfifo(conf.Path, conf.Permissions)) + + op, err := conf.Build(zaptest.NewLogger(t).Sugar()) + require.NoError(t, err) + + require.NoError(t, op.Start(testutil.NewUnscopedMockPersister())) + require.NoError(t, op.Stop()) +} + +// TestPipeWrites writes a few logs to the pipe over a few different connections and verifies that they are received. +func TestPipeWrites(t *testing.T) { + fake := testutil.NewFakeOutput(t) + + conf := NewConfig() + conf.Path = filename(t) + conf.Permissions = 0666 + conf.OutputIDs = []string{fake.ID()} + + op, err := conf.Build(zaptest.NewLogger(t).Sugar()) + require.NoError(t, err) + ops := []operator.Operator{op, fake} + + p, err := pipeline.NewDirectedPipeline(ops) + require.NoError(t, err) + + require.NoError(t, p.Start(testutil.NewUnscopedMockPersister())) + defer func() { + require.NoError(t, p.Stop()) + }() + + logs := [][]string{ + {"log1\n", "log2\n"}, + {"log3\n", "log4\n"}, + {"log5\n"}, + } + + for _, toSend := range logs { + pipe, err := os.OpenFile(conf.Path, os.O_WRONLY, 0) + require.NoError(t, err) + defer func() { + require.NoError(t, pipe.Close()) + }() + + for _, log := range toSend { + _, err = pipe.WriteString(log) + require.NoError(t, err) + } + + for _, log := range toSend { + expect := &entry.Entry{ + Body: strings.TrimSpace(log), + } + + select { + case e := <-fake.Received: + obs := time.Now() + expect.ObservedTimestamp = obs + e.ObservedTimestamp = obs + require.Equal(t, expect, e) + case <-time.After(time.Second): + t.Fatal("timed out waiting for entry") + } + } + } +} diff --git a/pkg/stanza/operator/input/namedpipe/package_test.go b/pkg/stanza/operator/input/namedpipe/package_test.go new file mode 100644 index 000000000000..a30fd791db1b --- /dev/null +++ b/pkg/stanza/operator/input/namedpipe/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package namedpipe + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/input/namedpipe/watcher.go b/pkg/stanza/operator/input/namedpipe/watcher.go new file mode 100644 index 000000000000..62c721f0f442 --- /dev/null +++ b/pkg/stanza/operator/input/namedpipe/watcher.go @@ -0,0 +1,70 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build linux + +package namedpipe // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/namedpipe" + +import ( + "context" + "fmt" + + "github.com/fsnotify/fsnotify" +) + +// Watcher watches a file for writes, notifying via `C` when one is observed. +type Watcher struct { + C chan struct{} + watcher *fsnotify.Watcher +} + +// NewWatcher creates a new watcher for the given path. +func NewWatcher(path string) (*Watcher, error) { + watcher, err := newWatcher(path) + if err != nil { + return nil, err + } + + return &Watcher{ + C: make(chan struct{}), + watcher: watcher, + }, nil +} + +// Watch starts the watcher, sending a message to `C` when a write is observed. +func (w *Watcher) Watch(ctx context.Context) error { + defer func() { + w.watcher.Close() + close(w.C) + }() + + for { + select { + case <-ctx.Done(): + return nil + case event := <-w.watcher.Events: + if event.Op&fsnotify.Write == fsnotify.Write { + select { + case w.C <- struct{}{}: + case <-ctx.Done(): + return nil + } + } + case err := <-w.watcher.Errors: + return fmt.Errorf("watcher error: %w", err) + } + } +} + +func newWatcher(path string) (*fsnotify.Watcher, error) { + watcher, err := fsnotify.NewWatcher() + if err != nil { + return nil, fmt.Errorf("failed to create watcher: %w", err) + } + + if err := watcher.Add(path); err != nil { + return nil, fmt.Errorf("failed to add path to watcher: %w", err) + } + + return watcher, nil +} diff --git a/pkg/stanza/operator/input/stdin/config.go b/pkg/stanza/operator/input/stdin/config.go new file mode 100644 index 000000000000..b046792eef56 --- /dev/null +++ b/pkg/stanza/operator/input/stdin/config.go @@ -0,0 +1,44 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package stdin // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/stdin" + +import ( + "os" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "stdin" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig("") }) +} + +// NewConfig creates a new stdin input config with default values +func NewConfig(operatorID string) *Config { + return &Config{ + InputConfig: helper.NewInputConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a stdin input operator. +type Config struct { + helper.InputConfig `mapstructure:",squash"` +} + +// Build will build a stdin input operator. +func (c *Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + inputOperator, err := c.InputConfig.Build(logger) + if err != nil { + return nil, err + } + + return &Input{ + InputOperator: inputOperator, + stdin: os.Stdin, + }, nil +} diff --git a/pkg/stanza/operator/input/stdin/input.go b/pkg/stanza/operator/input/stdin/input.go new file mode 100644 index 000000000000..ab14b900554a --- /dev/null +++ b/pkg/stanza/operator/input/stdin/input.go @@ -0,0 +1,77 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package stdin // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/stdin" + +import ( + "bufio" + "context" + "fmt" + "os" + "sync" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Input is an operator that reads input from stdin +type Input struct { + helper.InputOperator + wg sync.WaitGroup + cancel context.CancelFunc + stdin *os.File +} + +// Start will start generating log entries. +func (i *Input) Start(_ operator.Persister) error { + ctx, cancel := context.WithCancel(context.Background()) + i.cancel = cancel + + stat, err := i.stdin.Stat() + if err != nil { + return fmt.Errorf("failed to stat stdin: %w", err) + } + + if stat.Mode()&os.ModeNamedPipe == 0 { + i.Warn("No data is being written to stdin") + return nil + } + + scanner := bufio.NewScanner(i.stdin) + + i.wg.Add(1) + go func() { + defer i.wg.Done() + for { + select { + case <-ctx.Done(): + return + default: + } + + if ok := scanner.Scan(); !ok { + if err := scanner.Err(); err != nil { + i.Errorf("Scanning failed", zap.Error(err)) + } + i.Infow("Stdin has been closed") + return + } + + e := entry.New() + e.Body = scanner.Text() + i.Write(ctx, e) + } + }() + + return nil +} + +// Stop will stop generating logs. +func (i *Input) Stop() error { + i.cancel() + i.wg.Wait() + return nil +} diff --git a/pkg/stanza/operator/input/stdin/stdin_test.go b/pkg/stanza/operator/input/stdin/input_test.go similarity index 100% rename from pkg/stanza/operator/input/stdin/stdin_test.go rename to pkg/stanza/operator/input/stdin/input_test.go diff --git a/pkg/stanza/operator/input/stdin/package_test.go b/pkg/stanza/operator/input/stdin/package_test.go new file mode 100644 index 000000000000..c5cfd2953796 --- /dev/null +++ b/pkg/stanza/operator/input/stdin/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package stdin + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/input/stdin/stdin.go b/pkg/stanza/operator/input/stdin/stdin.go deleted file mode 100644 index 652c419fec21..000000000000 --- a/pkg/stanza/operator/input/stdin/stdin.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package stdin // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/stdin" - -import ( - "bufio" - "context" - "fmt" - "os" - "sync" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -func init() { - operator.Register("stdin", func() operator.Builder { return NewConfig("") }) -} - -// NewConfig creates a new stdin input config with default values -func NewConfig(operatorID string) *Config { - return &Config{ - InputConfig: helper.NewInputConfig(operatorID, "stdin"), - } -} - -// Config is the configuration of a stdin input operator. -type Config struct { - helper.InputConfig `mapstructure:",squash"` -} - -// Build will build a stdin input operator. -func (c *Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - inputOperator, err := c.InputConfig.Build(logger) - if err != nil { - return nil, err - } - - return &Input{ - InputOperator: inputOperator, - stdin: os.Stdin, - }, nil -} - -// Input is an operator that reads input from stdin -type Input struct { - helper.InputOperator - wg sync.WaitGroup - cancel context.CancelFunc - stdin *os.File -} - -// Start will start generating log entries. -func (g *Input) Start(_ operator.Persister) error { - ctx, cancel := context.WithCancel(context.Background()) - g.cancel = cancel - - stat, err := g.stdin.Stat() - if err != nil { - return fmt.Errorf("failed to stat stdin: %w", err) - } - - if stat.Mode()&os.ModeNamedPipe == 0 { - g.Warn("No data is being written to stdin") - return nil - } - - scanner := bufio.NewScanner(g.stdin) - - g.wg.Add(1) - go func() { - defer g.wg.Done() - for { - select { - case <-ctx.Done(): - return - default: - } - - if ok := scanner.Scan(); !ok { - if err := scanner.Err(); err != nil { - g.Errorf("Scanning failed", zap.Error(err)) - } - g.Infow("Stdin has been closed") - return - } - - e := entry.New() - e.Body = scanner.Text() - g.Write(ctx, e) - } - }() - - return nil -} - -// Stop will stop generating logs. -func (g *Input) Stop() error { - g.cancel() - g.wg.Wait() - return nil -} diff --git a/pkg/stanza/operator/input/syslog/config.go b/pkg/stanza/operator/input/syslog/config.go new file mode 100644 index 000000000000..313e8e88d001 --- /dev/null +++ b/pkg/stanza/operator/input/syslog/config.go @@ -0,0 +1,114 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package syslog // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/syslog" + +import ( + "errors" + "fmt" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/tcp" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/udp" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/syslog" +) + +const operatorType = "syslog_input" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new input config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new input config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + InputConfig: helper.NewInputConfig(operatorID, operatorType), + } +} + +type Config struct { + helper.InputConfig `mapstructure:",squash"` + syslog.BaseConfig `mapstructure:",squash"` + TCP *tcp.BaseConfig `mapstructure:"tcp"` + UDP *udp.BaseConfig `mapstructure:"udp"` +} + +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + inputBase, err := c.InputConfig.Build(logger) + if err != nil { + return nil, err + } + + syslogParserCfg := syslog.NewConfigWithID(inputBase.ID() + "_internal_tcp") + syslogParserCfg.BaseConfig = c.BaseConfig + syslogParserCfg.SetID(inputBase.ID() + "_internal_parser") + syslogParserCfg.OutputIDs = c.OutputIDs + syslogParser, err := syslogParserCfg.Build(logger) + if err != nil { + return nil, fmt.Errorf("failed to resolve syslog config: %w", err) + } + + if c.TCP != nil { + tcpInputCfg := tcp.NewConfigWithID(inputBase.ID() + "_internal_tcp") + tcpInputCfg.InputConfig.AttributerConfig = c.InputConfig.AttributerConfig + tcpInputCfg.InputConfig.IdentifierConfig = c.InputConfig.IdentifierConfig + tcpInputCfg.BaseConfig = *c.TCP + if syslogParserCfg.EnableOctetCounting { + tcpInputCfg.SplitFuncBuilder = OctetSplitFuncBuilder + } + + tcpInput, err := tcpInputCfg.Build(logger) + if err != nil { + return nil, fmt.Errorf("failed to resolve tcp config: %w", err) + } + + tcpInput.SetOutputIDs([]string{syslogParser.ID()}) + if err := tcpInput.SetOutputs([]operator.Operator{syslogParser}); err != nil { + return nil, fmt.Errorf("failed to set outputs") + } + + return &Input{ + InputOperator: inputBase, + tcp: tcpInput.(*tcp.Input), + parser: syslogParser.(*syslog.Parser), + }, nil + } + + if c.UDP != nil { + udpInputCfg := udp.NewConfigWithID(inputBase.ID() + "_internal_udp") + udpInputCfg.InputConfig.AttributerConfig = c.InputConfig.AttributerConfig + udpInputCfg.InputConfig.IdentifierConfig = c.InputConfig.IdentifierConfig + udpInputCfg.BaseConfig = *c.UDP + + // Octet counting and Non-Transparent-Framing are invalid for UDP connections + if syslogParserCfg.EnableOctetCounting || syslogParserCfg.NonTransparentFramingTrailer != nil { + return nil, errors.New("octet_counting and non_transparent_framing is not compatible with UDP") + } + + udpInput, err := udpInputCfg.Build(logger) + if err != nil { + return nil, fmt.Errorf("failed to resolve udp config: %w", err) + } + + udpInput.SetOutputIDs([]string{syslogParser.ID()}) + if err := udpInput.SetOutputs([]operator.Operator{syslogParser}); err != nil { + return nil, fmt.Errorf("failed to set outputs") + } + + return &Input{ + InputOperator: inputBase, + udp: udpInput.(*udp.Input), + parser: syslogParser.(*syslog.Parser), + }, nil + } + + return nil, fmt.Errorf("need tcp config or udp config") +} diff --git a/pkg/stanza/operator/input/syslog/config_test.go b/pkg/stanza/operator/input/syslog/config_test.go index fc8354440db0..b24792726c35 100644 --- a/pkg/stanza/operator/input/syslog/config_test.go +++ b/pkg/stanza/operator/input/syslog/config_test.go @@ -39,8 +39,8 @@ func TestUnmarshal(t *testing.T) { cfg.TCP.Encoding = "utf-16" cfg.TCP.SplitConfig.LineStartPattern = "ABC" cfg.TCP.SplitConfig.LineEndPattern = "" - cfg.TCP.TLS = &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + cfg.TCP.TLS = &configtls.ServerConfig{ + Config: configtls.Config{ CertFile: "foo", KeyFile: "foo2", CAFile: "foo3", diff --git a/pkg/stanza/operator/input/syslog/input.go b/pkg/stanza/operator/input/syslog/input.go new file mode 100644 index 000000000000..428f7a6a6a00 --- /dev/null +++ b/pkg/stanza/operator/input/syslog/input.go @@ -0,0 +1,84 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package syslog // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/syslog" + +import ( + "bufio" + "regexp" + "strconv" + + "golang.org/x/text/encoding" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/tcp" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/udp" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/syslog" +) + +// Input is an operator that listens for log entries over tcp. +type Input struct { + helper.InputOperator + tcp *tcp.Input + udp *udp.Input + parser *syslog.Parser +} + +// Start will start listening for log entries over tcp or udp. +func (i *Input) Start(p operator.Persister) error { + if i.tcp != nil { + return i.tcp.Start(p) + } + return i.udp.Start(p) +} + +// Stop will stop listening for messages. +func (i *Input) Stop() error { + if i.tcp != nil { + return i.tcp.Stop() + } + return i.udp.Stop() +} + +// SetOutputs will set the outputs of the internal syslog parser. +func (i *Input) SetOutputs(operators []operator.Operator) error { + i.parser.SetOutputIDs(i.GetOutputIDs()) + return i.parser.SetOutputs(operators) +} + +func OctetSplitFuncBuilder(_ encoding.Encoding) (bufio.SplitFunc, error) { + return newOctetFrameSplitFunc(true), nil +} + +func newOctetFrameSplitFunc(flushAtEOF bool) bufio.SplitFunc { + frameRegex := regexp.MustCompile(`^[1-9]\d*\s`) + return func(data []byte, atEOF bool) (int, []byte, error) { + frameLoc := frameRegex.FindIndex(data) + if frameLoc == nil { + // Flush if no more data is expected + if len(data) != 0 && atEOF && flushAtEOF { + return len(data), data, nil + } + return 0, nil, nil + } + + frameMaxIndex := frameLoc[1] + // Remove the delimiter (space) between length and log, and parse the length + frameLenValue, err := strconv.Atoi(string(data[:frameMaxIndex-1])) + if err != nil { + // This should not be possible because the regex matched. + // However, return an error just in case. + return 0, nil, err + } + + advance := frameMaxIndex + frameLenValue + if advance > len(data) { + if atEOF && flushAtEOF { + return len(data), data, nil + } + return 0, nil, nil + } + return advance, data[:advance], nil + } +} diff --git a/pkg/stanza/operator/input/syslog/input_test.go b/pkg/stanza/operator/input/syslog/input_test.go new file mode 100644 index 000000000000..054d1ce18fe4 --- /dev/null +++ b/pkg/stanza/operator/input/syslog/input_test.go @@ -0,0 +1,308 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package syslog + +import ( + "fmt" + "net" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/tcp" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/udp" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/syslog" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/pipeline" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/split/splittest" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +var ( + ts = time.Now() + basicConfig = func() *syslog.Config { + cfg := syslog.NewConfigWithID("test_syslog_parser") + return cfg + } + OctetCase = syslog.Case{ + Name: "RFC6587 Octet Counting", + Config: func() *syslog.Config { + cfg := basicConfig() + cfg.Protocol = syslog.RFC5424 + cfg.EnableOctetCounting = true + return cfg + }(), + Input: &entry.Entry{ + Body: `215 <86>1 2015-08-05T21:58:59.693Z 192.168.2.132 SecureAuth0 23108 ID52020 [SecureAuth@27389 UserHostAddress="192.168.2.132" Realm="SecureAuth0" UserID="Tester2" PEN="27389"] Found the user for retrieving user's profile215 <86>1 2016-08-05T21:58:59.693Z 192.168.2.132 SecureAuth0 23108 ID52020 [SecureAuth@27389 UserHostAddress="192.168.2.132" Realm="SecureAuth0" UserID="Tester2" PEN="27389"] Found the user for retrieving user's profile215 <86>1 2017-08-05T21:58:59.693Z 192.168.2.132 SecureAuth0 23108 ID52020 [SecureAuth@27389 UserHostAddress="192.168.2.132" Realm="SecureAuth0" UserID="Tester2" PEN="27389"] Found the user for retrieving user's profile`, + }, + Expect: &entry.Entry{ + Timestamp: time.Date(2015, 8, 5, 21, 58, 59, 693000000, time.UTC), + Severity: entry.Info, + SeverityText: "info", + Attributes: map[string]any{ + "appname": "SecureAuth0", + "facility": 10, + "hostname": "192.168.2.132", + "message": "Found the user for retrieving user's profile", + "msg_id": "ID52020", + "priority": 86, + "proc_id": "23108", + "structured_data": map[string]any{ + "SecureAuth@27389": map[string]any{ + "PEN": "27389", + "Realm": "SecureAuth0", + "UserHostAddress": "192.168.2.132", + "UserID": "Tester2", + }, + }, + "version": 1, + }, + Body: `215 <86>1 2015-08-05T21:58:59.693Z 192.168.2.132 SecureAuth0 23108 ID52020 [SecureAuth@27389 UserHostAddress="192.168.2.132" Realm="SecureAuth0" UserID="Tester2" PEN="27389"] Found the user for retrieving user's profile`, + }, + ValidForTCP: true, + } + WithMetadata = syslog.Case{ + Name: "RFC3164", + Config: func() *syslog.Config { + cfg := basicConfig() + cfg.Protocol = syslog.RFC3164 + return cfg + }(), + Input: &entry.Entry{ + Body: fmt.Sprintf("<34>%s 1.2.3.4 apache_server: test message", ts.Format("Jan _2 15:04:05")), + }, + Expect: &entry.Entry{ + Timestamp: time.Date(ts.Year(), ts.Month(), ts.Day(), ts.Hour(), ts.Minute(), ts.Second(), 0, time.UTC), + Severity: entry.Error2, + SeverityText: "crit", + Resource: map[string]any{ + "service.name": "apache_server", + }, + Attributes: map[string]any{ + "foo": "bar", + "appname": "apache_server", + "facility": 4, + "hostname": "1.2.3.4", + "message": "test message", + "priority": 34, + }, + Body: fmt.Sprintf("<34>%s 1.2.3.4 apache_server: test message", ts.Format("Jan _2 15:04:05")), + }, + ValidForTCP: true, + ValidForUDP: true, + } +) + +func TestInput(t *testing.T) { + cases, err := syslog.CreateCases(basicConfig) + require.NoError(t, err) + cases = append(cases, OctetCase) + + for _, tc := range cases { + cfg := tc.Config.BaseConfig + if tc.ValidForTCP { + t.Run(fmt.Sprintf("TCP-%s", tc.Name), func(t *testing.T) { + InputTest(t, tc, NewConfigWithTCP(&cfg), nil, nil) + }) + } + if tc.ValidForUDP { + t.Run(fmt.Sprintf("UDP-%s", tc.Name), func(t *testing.T) { + InputTest(t, tc, NewConfigWithUDP(&cfg), nil, nil) + }) + } + } + + withMetadataCfg := WithMetadata.Config.BaseConfig + t.Run("TCPWithMetadata", func(t *testing.T) { + cfg := NewConfigWithTCP(&withMetadataCfg) + cfg.IdentifierConfig = helper.NewIdentifierConfig() + cfg.IdentifierConfig.Resource["service.name"] = helper.ExprStringConfig("apache_server") + cfg.AttributerConfig = helper.NewAttributerConfig() + cfg.AttributerConfig.Attributes["foo"] = helper.ExprStringConfig("bar") + InputTest(t, WithMetadata, cfg, map[string]any{"service.name": "apache_server"}, map[string]any{"foo": "bar"}) + }) + + t.Run("UDPWithMetadata", func(t *testing.T) { + cfg := NewConfigWithUDP(&withMetadataCfg) + cfg.IdentifierConfig = helper.NewIdentifierConfig() + cfg.IdentifierConfig.Resource["service.name"] = helper.ExprStringConfig("apache_server") + cfg.AttributerConfig = helper.NewAttributerConfig() + cfg.AttributerConfig.Attributes["foo"] = helper.ExprStringConfig("bar") + InputTest(t, WithMetadata, cfg, map[string]any{"service.name": "apache_server"}, map[string]any{"foo": "bar"}) + }) +} + +func InputTest(t *testing.T, tc syslog.Case, cfg *Config, rsrc map[string]any, attr map[string]any) { + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + + fake := testutil.NewFakeOutput(t) + ops := []operator.Operator{op, fake} + p, err := pipeline.NewDirectedPipeline(ops) + require.NoError(t, err) + + err = p.Start(testutil.NewUnscopedMockPersister()) + require.NoError(t, err) + + var conn net.Conn + if cfg.TCP != nil { + conn, err = net.Dial("tcp", cfg.TCP.ListenAddress) + require.NoError(t, err) + } + if cfg.UDP != nil { + conn, err = net.Dial("udp", cfg.UDP.ListenAddress) + require.NoError(t, err) + } + + if v, ok := tc.Input.Body.(string); ok { + _, err = conn.Write([]byte(v)) + } else { + _, err = conn.Write(tc.Input.Body.([]byte)) + } + + conn.Close() + require.NoError(t, err) + + defer func() { + require.NoError(t, p.Stop()) + }() + select { + case e := <-fake.Received: + // close pipeline to avoid data race + ots := time.Now() + e.ObservedTimestamp = ots + + expect := tc.Expect + expect.ObservedTimestamp = ots + if rsrc != nil { + if expect.Resource == nil { + expect.Resource = rsrc + } else { + for k, v := range rsrc { + expect.Resource[k] = v + } + } + } + if attr != nil { + if expect.Attributes == nil { + expect.Attributes = attr + } else { + for k, v := range attr { + expect.Attributes[k] = v + } + } + } + require.Equal(t, expect, e) + case <-time.After(time.Second): + require.FailNow(t, "Timed out waiting for entry to be processed") + } +} + +func TestSyslogIDs(t *testing.T) { + basicConfig := func() *syslog.BaseConfig { + cfg := syslog.NewConfigWithID("test_syslog_parser") + cfg.Protocol = "RFC3164" + return &cfg.BaseConfig + } + + t.Run("TCP", func(t *testing.T) { + cfg := NewConfigWithTCP(basicConfig()) + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + syslogInputOp := op.(*Input) + require.Equal(t, "test_syslog_internal_tcp", syslogInputOp.tcp.ID()) + require.Equal(t, "test_syslog_internal_parser", syslogInputOp.parser.ID()) + require.Equal(t, []string{syslogInputOp.parser.ID()}, syslogInputOp.tcp.GetOutputIDs()) + require.Equal(t, []string{"fake"}, syslogInputOp.parser.GetOutputIDs()) + require.Equal(t, []string{"fake"}, syslogInputOp.GetOutputIDs()) + }) + t.Run("UDP", func(t *testing.T) { + cfg := NewConfigWithUDP(basicConfig()) + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + syslogInputOp := op.(*Input) + require.Equal(t, "test_syslog_internal_udp", syslogInputOp.udp.ID()) + require.Equal(t, "test_syslog_internal_parser", syslogInputOp.parser.ID()) + require.Equal(t, []string{syslogInputOp.parser.ID()}, syslogInputOp.udp.GetOutputIDs()) + require.Equal(t, []string{"fake"}, syslogInputOp.parser.GetOutputIDs()) + require.Equal(t, []string{"fake"}, syslogInputOp.GetOutputIDs()) + }) +} + +func NewConfigWithTCP(syslogCfg *syslog.BaseConfig) *Config { + cfg := NewConfigWithID("test_syslog") + cfg.BaseConfig = *syslogCfg + cfg.TCP = &tcp.NewConfigWithID("test_syslog_tcp").BaseConfig + cfg.TCP.ListenAddress = ":14201" + cfg.OutputIDs = []string{"fake"} + return cfg +} + +func NewConfigWithUDP(syslogCfg *syslog.BaseConfig) *Config { + cfg := NewConfigWithID("test_syslog") + cfg.BaseConfig = *syslogCfg + cfg.UDP = &udp.NewConfigWithID("test_syslog_udp").BaseConfig + cfg.UDP.ListenAddress = ":12032" + cfg.OutputIDs = []string{"fake"} + return cfg +} + +func TestOctetFramingSplitFunc(t *testing.T) { + testCases := []struct { + name string + input []byte + steps []splittest.Step + }{ + { + name: "OneLogSimple", + input: []byte(`17 my log LOGEND 123`), + steps: []splittest.Step{ + splittest.ExpectToken(`17 my log LOGEND 123`), + }, + }, + { + name: "TwoLogsSimple", + input: []byte(`17 my log LOGEND 12317 my log LOGEND 123`), + steps: []splittest.Step{ + splittest.ExpectToken(`17 my log LOGEND 123`), + splittest.ExpectToken(`17 my log LOGEND 123`), + }, + }, + { + name: "NoMatches", + input: []byte(`no matches in it`), + steps: []splittest.Step{ + splittest.ExpectToken(`no matches in it`), + }, + }, + { + name: "NonMatchesAfter", + input: []byte(`17 my log LOGEND 123my log LOGEND 12317 my log LOGEND 123`), + steps: []splittest.Step{ + splittest.ExpectToken(`17 my log LOGEND 123`), + splittest.ExpectToken(`my log LOGEND 12317 my log LOGEND 123`), + }, + }, + { + name: "HugeLog10000", + input: func() []byte { + newRaw := splittest.GenerateBytes(10000) + newRaw = append([]byte(`10000 `), newRaw...) + return newRaw + }(), + steps: []splittest.Step{ + splittest.ExpectToken(`10000 ` + string(splittest.GenerateBytes(10000))), + }, + }, + } + + for _, tc := range testCases { + splitFunc, err := OctetSplitFuncBuilder(nil) + require.NoError(t, err) + t.Run(tc.name, splittest.New(splitFunc, tc.input, tc.steps...)) + } +} diff --git a/pkg/stanza/operator/input/syslog/package_test.go b/pkg/stanza/operator/input/syslog/package_test.go new file mode 100644 index 000000000000..6ef82f85716f --- /dev/null +++ b/pkg/stanza/operator/input/syslog/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package syslog + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/input/syslog/syslog.go b/pkg/stanza/operator/input/syslog/syslog.go deleted file mode 100644 index d97ab1681475..000000000000 --- a/pkg/stanza/operator/input/syslog/syslog.go +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package syslog // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/syslog" - -import ( - "bufio" - "errors" - "fmt" - "regexp" - "strconv" - - "go.uber.org/zap" - "golang.org/x/text/encoding" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/tcp" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/udp" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/syslog" -) - -const operatorType = "syslog_input" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new input config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new input config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - InputConfig: helper.NewInputConfig(operatorID, operatorType), - } -} - -type Config struct { - helper.InputConfig `mapstructure:",squash"` - syslog.BaseConfig `mapstructure:",squash"` - TCP *tcp.BaseConfig `mapstructure:"tcp"` - UDP *udp.BaseConfig `mapstructure:"udp"` -} - -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - inputBase, err := c.InputConfig.Build(logger) - if err != nil { - return nil, err - } - - syslogParserCfg := syslog.NewConfigWithID(inputBase.ID() + "_internal_tcp") - syslogParserCfg.BaseConfig = c.BaseConfig - syslogParserCfg.SetID(inputBase.ID() + "_internal_parser") - syslogParserCfg.OutputIDs = c.OutputIDs - syslogParser, err := syslogParserCfg.Build(logger) - if err != nil { - return nil, fmt.Errorf("failed to resolve syslog config: %w", err) - } - - if c.TCP != nil { - tcpInputCfg := tcp.NewConfigWithID(inputBase.ID() + "_internal_tcp") - tcpInputCfg.BaseConfig = *c.TCP - if syslogParserCfg.EnableOctetCounting { - tcpInputCfg.SplitFuncBuilder = OctetSplitFuncBuilder - } - - tcpInput, err := tcpInputCfg.Build(logger) - if err != nil { - return nil, fmt.Errorf("failed to resolve tcp config: %w", err) - } - - tcpInput.SetOutputIDs([]string{syslogParser.ID()}) - if err := tcpInput.SetOutputs([]operator.Operator{syslogParser}); err != nil { - return nil, fmt.Errorf("failed to set outputs") - } - - return &Input{ - InputOperator: inputBase, - tcp: tcpInput.(*tcp.Input), - parser: syslogParser.(*syslog.Parser), - }, nil - } - - if c.UDP != nil { - - udpInputCfg := udp.NewConfigWithID(inputBase.ID() + "_internal_udp") - udpInputCfg.BaseConfig = *c.UDP - - // Octet counting and Non-Transparent-Framing are invalid for UDP connections - if syslogParserCfg.EnableOctetCounting || syslogParserCfg.NonTransparentFramingTrailer != nil { - return nil, errors.New("octet_counting and non_transparent_framing is not compatible with UDP") - } - - udpInput, err := udpInputCfg.Build(logger) - if err != nil { - return nil, fmt.Errorf("failed to resolve udp config: %w", err) - } - - udpInput.SetOutputIDs([]string{syslogParser.ID()}) - if err := udpInput.SetOutputs([]operator.Operator{syslogParser}); err != nil { - return nil, fmt.Errorf("failed to set outputs") - } - - return &Input{ - InputOperator: inputBase, - udp: udpInput.(*udp.Input), - parser: syslogParser.(*syslog.Parser), - }, nil - } - - return nil, fmt.Errorf("need tcp config or udp config") -} - -// Input is an operator that listens for log entries over tcp. -type Input struct { - helper.InputOperator - tcp *tcp.Input - udp *udp.Input - parser *syslog.Parser -} - -// Start will start listening for log entries over tcp or udp. -func (t *Input) Start(p operator.Persister) error { - if t.tcp != nil { - return t.tcp.Start(p) - } - return t.udp.Start(p) -} - -// Stop will stop listening for messages. -func (t *Input) Stop() error { - if t.tcp != nil { - return t.tcp.Stop() - } - return t.udp.Stop() -} - -// SetOutputs will set the outputs of the internal syslog parser. -func (t *Input) SetOutputs(operators []operator.Operator) error { - t.parser.SetOutputIDs(t.GetOutputIDs()) - return t.parser.SetOutputs(operators) -} - -func OctetSplitFuncBuilder(_ encoding.Encoding) (bufio.SplitFunc, error) { - return newOctetFrameSplitFunc(true), nil -} - -func newOctetFrameSplitFunc(flushAtEOF bool) bufio.SplitFunc { - frameRegex := regexp.MustCompile(`^[1-9]\d*\s`) - return func(data []byte, atEOF bool) (int, []byte, error) { - frameLoc := frameRegex.FindIndex(data) - if frameLoc == nil { - // Flush if no more data is expected - if len(data) != 0 && atEOF && flushAtEOF { - return len(data), data, nil - } - return 0, nil, nil - } - - frameMaxIndex := frameLoc[1] - // Remove the delimiter (space) between length and log, and parse the length - frameLenValue, err := strconv.Atoi(string(data[:frameMaxIndex-1])) - if err != nil { - // This should not be possible because the regex matched. - // However, return an error just in case. - return 0, nil, err - } - - advance := frameMaxIndex + frameLenValue - if advance > len(data) { - if atEOF && flushAtEOF { - return len(data), data, nil - } - return 0, nil, nil - } - return advance, data[:advance], nil - } -} diff --git a/pkg/stanza/operator/input/syslog/syslog_test.go b/pkg/stanza/operator/input/syslog/syslog_test.go deleted file mode 100644 index 961612b9aea6..000000000000 --- a/pkg/stanza/operator/input/syslog/syslog_test.go +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package syslog - -import ( - "fmt" - "net" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/tcp" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/udp" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/syslog" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/pipeline" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/split/splittest" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" -) - -var ( - basicConfig = func() *syslog.Config { - cfg := syslog.NewConfigWithID("test_syslog_parser") - return cfg - } - OctetCase = syslog.Case{ - Name: "RFC6587 Octet Counting", - Config: func() *syslog.Config { - cfg := basicConfig() - cfg.Protocol = syslog.RFC5424 - cfg.EnableOctetCounting = true - return cfg - }(), - Input: &entry.Entry{ - Body: `215 <86>1 2015-08-05T21:58:59.693Z 192.168.2.132 SecureAuth0 23108 ID52020 [SecureAuth@27389 UserHostAddress="192.168.2.132" Realm="SecureAuth0" UserID="Tester2" PEN="27389"] Found the user for retrieving user's profile215 <86>1 2016-08-05T21:58:59.693Z 192.168.2.132 SecureAuth0 23108 ID52020 [SecureAuth@27389 UserHostAddress="192.168.2.132" Realm="SecureAuth0" UserID="Tester2" PEN="27389"] Found the user for retrieving user's profile215 <86>1 2017-08-05T21:58:59.693Z 192.168.2.132 SecureAuth0 23108 ID52020 [SecureAuth@27389 UserHostAddress="192.168.2.132" Realm="SecureAuth0" UserID="Tester2" PEN="27389"] Found the user for retrieving user's profile`, - }, - Expect: &entry.Entry{ - Timestamp: time.Date(2015, 8, 5, 21, 58, 59, 693000000, time.UTC), - Severity: entry.Info, - SeverityText: "info", - Attributes: map[string]any{ - "appname": "SecureAuth0", - "facility": 10, - "hostname": "192.168.2.132", - "message": "Found the user for retrieving user's profile", - "msg_id": "ID52020", - "priority": 86, - "proc_id": "23108", - "structured_data": map[string]any{ - "SecureAuth@27389": map[string]any{ - "PEN": "27389", - "Realm": "SecureAuth0", - "UserHostAddress": "192.168.2.132", - "UserID": "Tester2", - }, - }, - "version": 1, - }, - Body: `215 <86>1 2015-08-05T21:58:59.693Z 192.168.2.132 SecureAuth0 23108 ID52020 [SecureAuth@27389 UserHostAddress="192.168.2.132" Realm="SecureAuth0" UserID="Tester2" PEN="27389"] Found the user for retrieving user's profile`, - }, - ValidForTCP: true, - } -) - -func TestInput(t *testing.T) { - - cases, err := syslog.CreateCases(basicConfig) - require.NoError(t, err) - cases = append(cases, OctetCase) - - for _, tc := range cases { - cfg := tc.Config.BaseConfig - if tc.ValidForTCP { - t.Run(fmt.Sprintf("TCP-%s", tc.Name), func(t *testing.T) { - InputTest(t, NewConfigWithTCP(&cfg), tc) - }) - } - - if tc.ValidForUDP { - t.Run(fmt.Sprintf("UDP-%s", tc.Name), func(t *testing.T) { - InputTest(t, NewConfigWithUDP(&cfg), tc) - }) - } - } -} - -func InputTest(t *testing.T, cfg *Config, tc syslog.Case) { - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - - fake := testutil.NewFakeOutput(t) - ops := []operator.Operator{op, fake} - p, err := pipeline.NewDirectedPipeline(ops) - require.NoError(t, err) - - err = p.Start(testutil.NewUnscopedMockPersister()) - require.NoError(t, err) - - var conn net.Conn - if cfg.TCP != nil { - conn, err = net.Dial("tcp", cfg.TCP.ListenAddress) - require.NoError(t, err) - } - if cfg.UDP != nil { - conn, err = net.Dial("udp", cfg.UDP.ListenAddress) - require.NoError(t, err) - } - - if v, ok := tc.Input.Body.(string); ok { - _, err = conn.Write([]byte(v)) - } else { - _, err = conn.Write(tc.Input.Body.([]byte)) - } - - conn.Close() - require.NoError(t, err) - - defer func() { - require.NoError(t, p.Stop()) - }() - select { - case e := <-fake.Received: - // close pipeline to avoid data race - ots := time.Now() - e.ObservedTimestamp = ots - tc.Expect.ObservedTimestamp = ots - require.Equal(t, tc.Expect, e) - case <-time.After(time.Second): - require.FailNow(t, "Timed out waiting for entry to be processed") - } -} - -func TestSyslogIDs(t *testing.T) { - basicConfig := func() *syslog.BaseConfig { - cfg := syslog.NewConfigWithID("test_syslog_parser") - cfg.Protocol = "RFC3164" - return &cfg.BaseConfig - } - - t.Run("TCP", func(t *testing.T) { - cfg := NewConfigWithTCP(basicConfig()) - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - syslogInputOp := op.(*Input) - require.Equal(t, "test_syslog_internal_tcp", syslogInputOp.tcp.ID()) - require.Equal(t, "test_syslog_internal_parser", syslogInputOp.parser.ID()) - require.Equal(t, []string{syslogInputOp.parser.ID()}, syslogInputOp.tcp.GetOutputIDs()) - require.Equal(t, []string{"fake"}, syslogInputOp.parser.GetOutputIDs()) - require.Equal(t, []string{"fake"}, syslogInputOp.GetOutputIDs()) - }) - t.Run("UDP", func(t *testing.T) { - cfg := NewConfigWithUDP(basicConfig()) - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - syslogInputOp := op.(*Input) - require.Equal(t, "test_syslog_internal_udp", syslogInputOp.udp.ID()) - require.Equal(t, "test_syslog_internal_parser", syslogInputOp.parser.ID()) - require.Equal(t, []string{syslogInputOp.parser.ID()}, syslogInputOp.udp.GetOutputIDs()) - require.Equal(t, []string{"fake"}, syslogInputOp.parser.GetOutputIDs()) - require.Equal(t, []string{"fake"}, syslogInputOp.GetOutputIDs()) - }) -} - -func NewConfigWithTCP(syslogCfg *syslog.BaseConfig) *Config { - cfg := NewConfigWithID("test_syslog") - cfg.BaseConfig = *syslogCfg - cfg.TCP = &tcp.NewConfigWithID("test_syslog_tcp").BaseConfig - cfg.TCP.ListenAddress = ":14201" - cfg.OutputIDs = []string{"fake"} - return cfg -} - -func NewConfigWithUDP(syslogCfg *syslog.BaseConfig) *Config { - cfg := NewConfigWithID("test_syslog") - cfg.BaseConfig = *syslogCfg - cfg.UDP = &udp.NewConfigWithID("test_syslog_udp").BaseConfig - cfg.UDP.ListenAddress = ":12032" - cfg.OutputIDs = []string{"fake"} - return cfg -} - -func TestOctetFramingSplitFunc(t *testing.T) { - testCases := []struct { - name string - input []byte - steps []splittest.Step - }{ - { - name: "OneLogSimple", - input: []byte(`17 my log LOGEND 123`), - steps: []splittest.Step{ - splittest.ExpectToken(`17 my log LOGEND 123`), - }, - }, - { - name: "TwoLogsSimple", - input: []byte(`17 my log LOGEND 12317 my log LOGEND 123`), - steps: []splittest.Step{ - splittest.ExpectToken(`17 my log LOGEND 123`), - splittest.ExpectToken(`17 my log LOGEND 123`), - }, - }, - { - name: "NoMatches", - input: []byte(`no matches in it`), - steps: []splittest.Step{ - splittest.ExpectToken(`no matches in it`), - }, - }, - { - name: "NonMatchesAfter", - input: []byte(`17 my log LOGEND 123my log LOGEND 12317 my log LOGEND 123`), - steps: []splittest.Step{ - splittest.ExpectToken(`17 my log LOGEND 123`), - splittest.ExpectToken(`my log LOGEND 12317 my log LOGEND 123`), - }, - }, - { - name: "HugeLog10000", - input: func() []byte { - newRaw := splittest.GenerateBytes(10000) - newRaw = append([]byte(`10000 `), newRaw...) - return newRaw - }(), - steps: []splittest.Step{ - splittest.ExpectToken(`10000 ` + string(splittest.GenerateBytes(10000))), - }, - }, - } - - for _, tc := range testCases { - splitFunc, err := OctetSplitFuncBuilder(nil) - require.NoError(t, err) - t.Run(tc.name, splittest.New(splitFunc, tc.input, tc.steps...)) - } -} diff --git a/pkg/stanza/operator/input/tcp/config.go b/pkg/stanza/operator/input/tcp/config.go new file mode 100644 index 000000000000..81ee1b21d0ed --- /dev/null +++ b/pkg/stanza/operator/input/tcp/config.go @@ -0,0 +1,149 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package tcp // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/tcp" + +import ( + "bufio" + "fmt" + "net" + "time" + + "github.com/jpillora/backoff" + "go.opentelemetry.io/collector/config/configtls" + "go.uber.org/zap" + "golang.org/x/text/encoding" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/decode" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/split" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/trim" +) + +const ( + operatorType = "tcp_input" + + // minMaxLogSize is the minimal size which can be used for buffering + // TCP input + minMaxLogSize = 64 * 1024 + + // DefaultMaxLogSize is the max buffer sized used + // if MaxLogSize is not set + DefaultMaxLogSize = 1024 * 1024 +) + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new TCP input config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new TCP input config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + InputConfig: helper.NewInputConfig(operatorID, operatorType), + BaseConfig: BaseConfig{ + OneLogPerPacket: false, + Encoding: "utf-8", + }, + } +} + +// Config is the configuration of a tcp input operator. +type Config struct { + helper.InputConfig `mapstructure:",squash"` + BaseConfig `mapstructure:",squash"` +} + +// BaseConfig is the detailed configuration of a tcp input operator. +type BaseConfig struct { + MaxLogSize helper.ByteSize `mapstructure:"max_log_size,omitempty"` + ListenAddress string `mapstructure:"listen_address,omitempty"` + TLS *configtls.ServerConfig `mapstructure:"tls,omitempty"` + AddAttributes bool `mapstructure:"add_attributes,omitempty"` + OneLogPerPacket bool `mapstructure:"one_log_per_packet,omitempty"` + Encoding string `mapstructure:"encoding,omitempty"` + SplitConfig split.Config `mapstructure:"multiline,omitempty"` + TrimConfig trim.Config `mapstructure:",squash"` + SplitFuncBuilder SplitFuncBuilder +} + +type SplitFuncBuilder func(enc encoding.Encoding) (bufio.SplitFunc, error) + +func (c Config) defaultSplitFuncBuilder(enc encoding.Encoding) (bufio.SplitFunc, error) { + return c.SplitConfig.Func(enc, true, int(c.MaxLogSize)) +} + +// Build will build a tcp input operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + inputOperator, err := c.InputConfig.Build(logger) + if err != nil { + return nil, err + } + + // If MaxLogSize not set, set sane default + if c.MaxLogSize == 0 { + c.MaxLogSize = DefaultMaxLogSize + } + + if c.MaxLogSize < minMaxLogSize { + return nil, fmt.Errorf("invalid value for parameter 'max_log_size', must be equal to or greater than %d bytes", minMaxLogSize) + } + + if c.ListenAddress == "" { + return nil, fmt.Errorf("missing required parameter 'listen_address'") + } + + // validate the input address + if _, err = net.ResolveTCPAddr("tcp", c.ListenAddress); err != nil { + return nil, fmt.Errorf("failed to resolve listen_address: %w", err) + } + + enc, err := decode.LookupEncoding(c.Encoding) + if err != nil { + return nil, err + } + + if c.SplitFuncBuilder == nil { + c.SplitFuncBuilder = c.defaultSplitFuncBuilder + } + + // Build split func + splitFunc, err := c.SplitFuncBuilder(enc) + if err != nil { + return nil, err + } + splitFunc = trim.WithFunc(splitFunc, c.TrimConfig.Func()) + + var resolver *helper.IPResolver + if c.AddAttributes { + resolver = helper.NewIPResolver() + } + + tcpInput := &Input{ + InputOperator: inputOperator, + address: c.ListenAddress, + MaxLogSize: int(c.MaxLogSize), + addAttributes: c.AddAttributes, + OneLogPerPacket: c.OneLogPerPacket, + encoding: enc, + splitFunc: splitFunc, + backoff: backoff.Backoff{ + Max: 3 * time.Second, + }, + resolver: resolver, + } + + if c.TLS != nil { + tcpInput.tls, err = c.TLS.LoadTLSConfig() + if err != nil { + return nil, err + } + } + + return tcpInput, nil +} diff --git a/pkg/stanza/operator/input/tcp/config_test.go b/pkg/stanza/operator/input/tcp/config_test.go index 07e7f9305bf6..b995bc31bf7f 100644 --- a/pkg/stanza/operator/input/tcp/config_test.go +++ b/pkg/stanza/operator/input/tcp/config_test.go @@ -32,8 +32,8 @@ func TestUnmarshal(t *testing.T) { cfg.AddAttributes = true cfg.Encoding = "utf-8" cfg.SplitConfig.LineStartPattern = "ABC" - cfg.TLS = &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + cfg.TLS = &configtls.ServerConfig{ + Config: configtls.Config{ CertFile: "foo", KeyFile: "foo2", CAFile: "foo3", diff --git a/pkg/stanza/operator/input/tcp/input.go b/pkg/stanza/operator/input/tcp/input.go new file mode 100644 index 000000000000..cecfe6fc6a69 --- /dev/null +++ b/pkg/stanza/operator/input/tcp/input.go @@ -0,0 +1,224 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package tcp // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/tcp" + +import ( + "bufio" + "bytes" + "context" + "crypto/rand" + "crypto/tls" + "fmt" + "io" + "net" + "strconv" + "sync" + "time" + + "github.com/jpillora/backoff" + "go.uber.org/zap" + "golang.org/x/text/encoding" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/decode" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Input is an operator that listens for log entries over tcp. +type Input struct { + helper.InputOperator + address string + MaxLogSize int + addAttributes bool + OneLogPerPacket bool + + listener net.Listener + cancel context.CancelFunc + wg sync.WaitGroup + tls *tls.Config + backoff backoff.Backoff + + encoding encoding.Encoding + splitFunc bufio.SplitFunc + resolver *helper.IPResolver +} + +// Start will start listening for log entries over tcp. +func (i *Input) Start(_ operator.Persister) error { + if err := i.configureListener(); err != nil { + return fmt.Errorf("failed to listen on interface: %w", err) + } + + ctx, cancel := context.WithCancel(context.Background()) + i.cancel = cancel + i.goListen(ctx) + return nil +} + +func (i *Input) configureListener() error { + if i.tls == nil { + listener, err := net.Listen("tcp", i.address) + if err != nil { + return fmt.Errorf("failed to configure tcp listener: %w", err) + } + i.listener = listener + return nil + } + + i.tls.Time = time.Now + i.tls.Rand = rand.Reader + + listener, err := tls.Listen("tcp", i.address, i.tls) + if err != nil { + return fmt.Errorf("failed to configure tls listener: %w", err) + } + + i.listener = listener + return nil +} + +// goListenn will listen for tcp connections. +func (i *Input) goListen(ctx context.Context) { + i.wg.Add(1) + + go func() { + defer i.wg.Done() + + for { + conn, err := i.listener.Accept() + if err != nil { + select { + case <-ctx.Done(): + return + default: + i.Debugw("Listener accept error", zap.Error(err)) + time.Sleep(i.backoff.Duration()) + continue + } + } + i.backoff.Reset() + + i.Debugf("Received connection: %s", conn.RemoteAddr().String()) + subctx, cancel := context.WithCancel(ctx) + i.goHandleClose(subctx, conn) + i.goHandleMessages(subctx, conn, cancel) + } + }() +} + +// goHandleClose will wait for the context to finish before closing a connection. +func (i *Input) goHandleClose(ctx context.Context, conn net.Conn) { + i.wg.Add(1) + + go func() { + defer i.wg.Done() + <-ctx.Done() + i.Debugf("Closing connection: %s", conn.RemoteAddr().String()) + if err := conn.Close(); err != nil { + i.Errorf("Failed to close connection: %s", err) + } + }() +} + +// goHandleMessages will handles messages from a tcp connection. +func (i *Input) goHandleMessages(ctx context.Context, conn net.Conn, cancel context.CancelFunc) { + i.wg.Add(1) + + go func() { + defer i.wg.Done() + defer cancel() + + dec := decode.New(i.encoding) + if i.OneLogPerPacket { + var buf bytes.Buffer + _, err := io.Copy(&buf, conn) + if err != nil { + i.Errorw("IO copy net connection buffer error", zap.Error(err)) + } + log := truncateMaxLog(buf.Bytes(), i.MaxLogSize) + i.handleMessage(ctx, conn, dec, log) + return + } + + buf := make([]byte, 0, i.MaxLogSize) + + scanner := bufio.NewScanner(conn) + scanner.Buffer(buf, i.MaxLogSize) + + scanner.Split(i.splitFunc) + + for scanner.Scan() { + i.handleMessage(ctx, conn, dec, scanner.Bytes()) + } + + if err := scanner.Err(); err != nil { + i.Errorw("Scanner error", zap.Error(err)) + } + }() +} + +func (i *Input) handleMessage(ctx context.Context, conn net.Conn, dec *decode.Decoder, log []byte) { + decoded, err := dec.Decode(log) + if err != nil { + i.Errorw("Failed to decode data", zap.Error(err)) + return + } + + entry, err := i.NewEntry(string(decoded)) + if err != nil { + i.Errorw("Failed to create entry", zap.Error(err)) + return + } + + if i.addAttributes { + entry.AddAttribute("net.transport", "IP.TCP") + if addr, ok := conn.RemoteAddr().(*net.TCPAddr); ok { + ip := addr.IP.String() + entry.AddAttribute("net.peer.ip", ip) + entry.AddAttribute("net.peer.port", strconv.FormatInt(int64(addr.Port), 10)) + entry.AddAttribute("net.peer.name", i.resolver.GetHostFromIP(ip)) + } + + if addr, ok := conn.LocalAddr().(*net.TCPAddr); ok { + ip := addr.IP.String() + entry.AddAttribute("net.host.ip", addr.IP.String()) + entry.AddAttribute("net.host.port", strconv.FormatInt(int64(addr.Port), 10)) + entry.AddAttribute("net.host.name", i.resolver.GetHostFromIP(ip)) + } + } + + i.Write(ctx, entry) +} + +func truncateMaxLog(data []byte, maxLogSize int) (token []byte) { + if len(data) >= maxLogSize { + return data[:maxLogSize] + } + + if len(data) == 0 { + return nil + } + + return data +} + +// Stop will stop listening for log entries over TCP. +func (i *Input) Stop() error { + if i.cancel == nil { + return nil + } + i.cancel() + + if i.listener != nil { + if err := i.listener.Close(); err != nil { + i.Errorf("failed to close TCP connection: %s", err) + } + } + + i.wg.Wait() + if i.resolver != nil { + i.resolver.Stop() + } + return nil +} diff --git a/pkg/stanza/operator/input/tcp/input_test.go b/pkg/stanza/operator/input/tcp/input_test.go new file mode 100644 index 000000000000..43b19f23295d --- /dev/null +++ b/pkg/stanza/operator/input/tcp/input_test.go @@ -0,0 +1,456 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package tcp + +import ( + "crypto/tls" + "math/rand" + "net" + "os" + "strconv" + "testing" + "time" + + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/config/configtls" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +const testTLSPrivateKey = ` +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDdNdVRHDoOlwrQ +YNlzP6MdLEIvN03Pv3A/Cdyy8LgKgSEf3kmw8o/75tSQzIAR6v7ts/qq1iAwE3OL +s4r8lASj2wirF2fNxX12OvIP8g3mrs4tCANBh413IywVKcEOrry71/s1k7+hscMv +Fe3NLxD1mNKJogwKyifvSc15zx8ge8SLjp875NiLCni2YYWXBt1pqd4wCol8lX6v +3u2rbNXrQf2sLncD0CE45EWHnzLzK33a0BwxyTXAOdd9kindL2IFct9C2HRQEk5h +GaXbNN0f6EMOZOzadJHfMledKVJ1XOd+t/kaPzY4NLDaGad04pNa+jph54qIVL5b +gCTOivX1AgMBAAECggEBAKPll/hxrn5S4LtFlrdyJfueaCctlaRgFd1PBEs8WU/H +HvDKtNS6031zKHlkW1trPpiF6iqbXdvg/ZI7Y7YCQXHZ/pEtVUa7lVp9EA5KbIxH +ZhEtR6RMt77Wu3mupxCm3MVcoA6xOqGl4JTJbZjBz5H4Ob2p57wyzeXYS7p9gHWC +fSj8tEqJdjLt7lqtqaWg/3iqqnLPdT3fGL6uyVbCDn9VZ23C7+sHiUfG67xHiF97 +UT+O+dfADMY6rLY1njxdD0QGPS7MQLHAgL/ESjROSL4cj1f9VYJFgweAE/UxnDVQ +n3pTzHFItjYWtK75o7Yc/zaHKp5hsXMsiVb9gtmBcaECgYEA+i2viVdZQqItIDiJ +rc7M42Fo6mLv1gToOVaIst7qPmW6BlwSQbX/x2V/2UsMWtcL95mrmRVjK9iH/Pg8 +ZaMlJynpgTM/x0jlZ2gZW1DPJWiCJ97xsdbOBA4JiGExc7odkbZhecfdlf66h0N6 +Ll32k80PNqTDJV8wWuUxsEnJaLkCgYEA4luVgtnhiJx3FIfBM9p/EVearFsQFSil +PPeoJfc5GMGAnNeGBv5YI4wZ5Jaa0qHLg5ps5Y8vO1yWKiAuhgVKXhytOj86XsoL +MdisDYcxzskG/9ipX3fP1rBNgwdzBoP4QcpzV69weDsja8AU2pluKSd3r3nzwqsY +dc/NVJRsYR0CgYAw2scSrOoTZxQk3KWWOXItXRJd4yAuzRqER++97mYT9U2UfFpc +VqwyRhHnXw50ltYRbgLijBinsUstDVTODEPvF/IvdtCXnBagUOXSvT8WcQgpvRG5 +xtbIV+1oooJDtS6dC96RJ4SQDARk8bpkX5kNV9gGtboeDC6nMWa4pFAekQKBgQCm +naM/3gEU/ZbplcOw13QQ39sKYz1DVdfLOMCcsY1lm4l/6WTOYQmfoNCuYe00fcO/ +6zuc/fhWSaB/AZE9NUe4XoNkDIZ6n13+Iu8CRjFzdKWiTWjezOI/tSZY/HK+qQVj +6BFeydSPq3g3J/wxrB5aTKLcl3fGIwquLXeGenoMQQKBgQCWULypEeQwJsyKB57P +JzuCnFMvLL5qSNwot5c7I+AX5yi368dEurQl6pUUJ9VKNbpsUxFIMq9AHpddDoq/ ++nIVt1DYr55ZsUJ6SgYtjvCMT9WOE/1Kqfh6p6y/mgRUl8m6v6gqi5/RfsNWJwfl +iBXhcGCQfkwZ8YIUyTW89qrwMw== +-----END PRIVATE KEY-----` + +const testTLSCertificate = ` +-----BEGIN CERTIFICATE----- +MIIDVDCCAjwCCQCwsE+LGRRtBTANBgkqhkiG9w0BAQsFADBsMQswCQYDVQQGEwJV +UzERMA8GA1UECAwITWljaGlnYW4xFTATBgNVBAcMDEdyYW5kIFJhcGlkczERMA8G +A1UECgwIb2JzZXJ2aVExDzANBgNVBAsMBlN0YW56YTEPMA0GA1UEAwwGU3Rhbnph +MB4XDTIxMDIyNTE3MzgxM1oXDTQ4MDcxMjE3MzgxM1owbDELMAkGA1UEBhMCVVMx +ETAPBgNVBAgMCE1pY2hpZ2FuMRUwEwYDVQQHDAxHcmFuZCBSYXBpZHMxETAPBgNV +BAoMCG9ic2VydmlRMQ8wDQYDVQQLDAZTdGFuemExDzANBgNVBAMMBlN0YW56YTCC +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN011VEcOg6XCtBg2XM/ox0s +Qi83Tc+/cD8J3LLwuAqBIR/eSbDyj/vm1JDMgBHq/u2z+qrWIDATc4uzivyUBKPb +CKsXZ83FfXY68g/yDeauzi0IA0GHjXcjLBUpwQ6uvLvX+zWTv6Gxwy8V7c0vEPWY +0omiDArKJ+9JzXnPHyB7xIuOnzvk2IsKeLZhhZcG3Wmp3jAKiXyVfq/e7ats1etB +/awudwPQITjkRYefMvMrfdrQHDHJNcA5132SKd0vYgVy30LYdFASTmEZpds03R/o +Qw5k7Np0kd8yV50pUnVc5363+Ro/Njg0sNoZp3Tik1r6OmHniohUvluAJM6K9fUC +AwEAATANBgkqhkiG9w0BAQsFAAOCAQEA0u061goAXX7RxtdRO7Twz4zZIGS/oWvn +gj61zZIXt8LaTzRZFU9rs0rp7jPXKaszArJQc29anf1mWtRwQBAY0S0m4DkwoBln +7hMFf9MlisQvBVFjWgDo7QCJJmAxaPc1NZi8GQIANEMMZ+hLK17dhDB+6SdBbV4R +yx+7I3zcXQ+0H4Aym6KmvoIR3QAXsOYJ/43QzlYU63ryGYBAeg+JiD8fnr2W3QHb +BBdatHmcazlytT5KV+bANT/Ermw8y2tpWGWxMxQHveFh1zThYL8vkLi4fmZqqVCI +zv9WEy+9p05Aet+12x3dzRu93+yRIEYbSZ35NOUWfQ+gspF5rGgpxA== +-----END CERTIFICATE-----` + +func tcpInputTest(input []byte, expected []string) func(t *testing.T) { + return func(t *testing.T) { + cfg := NewConfigWithID("test_id") + cfg.ListenAddress = ":0" + + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + + mockOutput := testutil.Operator{} + tcpInput := op.(*Input) + tcpInput.InputOperator.OutputOperators = []operator.Operator{&mockOutput} + + entryChan := make(chan *entry.Entry, 1) + mockOutput.On("Process", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { + entryChan <- args.Get(1).(*entry.Entry) + }).Return(nil) + + err = tcpInput.Start(testutil.NewUnscopedMockPersister()) + require.NoError(t, err) + defer func() { + require.NoError(t, tcpInput.Stop(), "expected to stop tcp input operator without error") + }() + + conn, err := net.Dial("tcp", tcpInput.listener.Addr().String()) + require.NoError(t, err) + defer conn.Close() + + _, err = conn.Write(input) + require.NoError(t, err) + + for _, expectedMessage := range expected { + select { + case entry := <-entryChan: + require.Equal(t, expectedMessage, entry.Body) + case <-time.After(time.Second): + require.FailNow(t, "Timed out waiting for message to be written") + } + } + + select { + case entry := <-entryChan: + require.FailNow(t, "Unexpected entry: %s", entry) + case <-time.After(100 * time.Millisecond): + return + } + } +} + +func tcpInputAttributesTest(input []byte, expected []string) func(t *testing.T) { + return func(t *testing.T) { + cfg := NewConfigWithID("test_id") + cfg.ListenAddress = ":0" + cfg.AddAttributes = true + + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + + mockOutput := testutil.Operator{} + tcpInput := op.(*Input) + tcpInput.InputOperator.OutputOperators = []operator.Operator{&mockOutput} + + entryChan := make(chan *entry.Entry, 1) + mockOutput.On("Process", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { + entryChan <- args.Get(1).(*entry.Entry) + }).Return(nil) + + err = tcpInput.Start(testutil.NewUnscopedMockPersister()) + require.NoError(t, err) + defer func() { + require.NoError(t, tcpInput.Stop(), "expected to stop tcp input operator without error") + }() + + conn, err := net.Dial("tcp", tcpInput.listener.Addr().String()) + require.NoError(t, err) + defer conn.Close() + + _, err = conn.Write(input) + require.NoError(t, err) + + for _, expectedMessage := range expected { + select { + case entry := <-entryChan: + expectedAttributes := map[string]any{ + "net.transport": "IP.TCP", + } + if addr, ok := conn.RemoteAddr().(*net.TCPAddr); ok { + ip := addr.IP.String() + expectedAttributes["net.host.ip"] = addr.IP.String() + expectedAttributes["net.host.port"] = strconv.FormatInt(int64(addr.Port), 10) + expectedAttributes["net.host.name"] = tcpInput.resolver.GetHostFromIP(ip) + } + if addr, ok := conn.LocalAddr().(*net.TCPAddr); ok { + ip := addr.IP.String() + expectedAttributes["net.peer.ip"] = ip + expectedAttributes["net.peer.port"] = strconv.FormatInt(int64(addr.Port), 10) + expectedAttributes["net.peer.name"] = tcpInput.resolver.GetHostFromIP(ip) + } + require.Equal(t, expectedMessage, entry.Body) + require.Equal(t, expectedAttributes, entry.Attributes) + case <-time.After(time.Second): + require.FailNow(t, "Timed out waiting for message to be written") + } + } + + select { + case entry := <-entryChan: + require.FailNow(t, "Unexpected entry: %s", entry) + case <-time.After(100 * time.Millisecond): + return + } + } +} + +func tlsInputTest(input []byte, expected []string) func(t *testing.T) { + return func(t *testing.T) { + f, err := os.Create("test.crt") + require.NoError(t, err) + defer f.Close() + defer os.Remove("test.crt") + _, err = f.WriteString(testTLSCertificate + "\n") + require.NoError(t, err) + f.Close() + + f, err = os.Create("test.key") + require.NoError(t, err) + defer f.Close() + defer os.Remove("test.key") + _, err = f.WriteString(testTLSPrivateKey + "\n") + require.NoError(t, err) + f.Close() + + cfg := NewConfigWithID("test_id") + cfg.ListenAddress = ":0" + cfg.TLS = &configtls.ServerConfig{ + Config: configtls.Config{ + CertFile: "test.crt", + KeyFile: "test.key", + }, + } + + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + + mockOutput := testutil.Operator{} + tcpInput := op.(*Input) + tcpInput.InputOperator.OutputOperators = []operator.Operator{&mockOutput} + + entryChan := make(chan *entry.Entry, 1) + mockOutput.On("Process", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { + entryChan <- args.Get(1).(*entry.Entry) + }).Return(nil) + + err = tcpInput.Start(testutil.NewUnscopedMockPersister()) + require.NoError(t, err) + defer func() { + require.NoError(t, tcpInput.Stop(), "expected to stop tcp input operator without error") + }() + + conn, err := tls.Dial("tcp", tcpInput.listener.Addr().String(), &tls.Config{InsecureSkipVerify: true}) + require.NoError(t, err) + defer conn.Close() + + _, err = conn.Write(input) + require.NoError(t, err) + + for _, expectedMessage := range expected { + select { + case entry := <-entryChan: + require.Equal(t, expectedMessage, entry.Body) + case <-time.After(time.Second): + require.FailNow(t, "Timed out waiting for message to be written") + } + } + + select { + case entry := <-entryChan: + require.FailNow(t, "Unexpected entry: %s", entry) + case <-time.After(100 * time.Millisecond): + return + } + } +} + +func TestBuild(t *testing.T) { + cases := []struct { + name string + inputBody Config + expectErr bool + }{ + { + "default-auto-address", + Config{ + BaseConfig: BaseConfig{ + ListenAddress: ":0", + }, + }, + false, + }, + { + "default-fixed-address", + Config{ + BaseConfig: BaseConfig{ + ListenAddress: "10.0.0.1:0", + }, + }, + false, + }, + { + "default-fixed-address-port", + Config{ + BaseConfig: BaseConfig{ + ListenAddress: "10.0.0.1:9000", + }, + }, + false, + }, + { + "buffer-size-valid-default", + Config{ + BaseConfig: BaseConfig{ + MaxLogSize: 0, + ListenAddress: "10.0.0.1:9000", + }, + }, + false, + }, + { + "buffer-size-valid-min", + Config{ + BaseConfig: BaseConfig{ + MaxLogSize: 65536, + ListenAddress: "10.0.0.1:9000", + }, + }, + false, + }, + { + "buffer-size-negative", + Config{ + BaseConfig: BaseConfig{ + MaxLogSize: -1, + ListenAddress: "10.0.0.1:9000", + }, + }, + true, + }, + { + "tls-enabled-with-no-such-file-error", + Config{ + BaseConfig: BaseConfig{ + MaxLogSize: 65536, + ListenAddress: "10.0.0.1:9000", + TLS: &configtls.ServerConfig{ + Config: configtls.Config{ + CertFile: "/tmp/cert/missing", + KeyFile: "/tmp/key/missing", + }, + }, + }, + }, + true, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + cfg := NewConfigWithID("test_id") + cfg.ListenAddress = tc.inputBody.ListenAddress + cfg.MaxLogSize = tc.inputBody.MaxLogSize + cfg.TLS = tc.inputBody.TLS + _, err := cfg.Build(testutil.Logger(t)) + if tc.expectErr { + require.Error(t, err) + return + } + require.NoError(t, err) + }) + } +} + +func TestTCPInput(t *testing.T) { + t.Run("Simple", tcpInputTest([]byte("message\n"), []string{"message"})) + t.Run("CarriageReturn", tcpInputTest([]byte("message\r\n"), []string{"message"})) +} + +func TestTCPInputAattributes(t *testing.T) { + t.Run("Simple", tcpInputAttributesTest([]byte("message\n"), []string{"message"})) + t.Run("CarriageReturn", tcpInputAttributesTest([]byte("message\r\n"), []string{"message"})) +} + +func TestTLSTCPInput(t *testing.T) { + t.Run("Simple", tlsInputTest([]byte("message\n"), []string{"message"})) + t.Run("CarriageReturn", tlsInputTest([]byte("message\r\n"), []string{"message"})) +} + +func TestFailToBind(t *testing.T) { + ip := "localhost" + port := 0 + minPort := 30000 + maxPort := 40000 + for i := 1; i < 10; i++ { + port = minPort + rand.Intn(maxPort-minPort+1) + _, err := net.DialTimeout("tcp", net.JoinHostPort(ip, strconv.Itoa(port)), time.Second*2) + if err != nil { + // a failed connection indicates that the port is available for use + break + } + } + if port == 0 { + t.Errorf("failed to find a free port between %d and %d", minPort, maxPort) + } + + var startTCP = func(int) (*Input, error) { + cfg := NewConfigWithID("test_id") + cfg.ListenAddress = net.JoinHostPort(ip, strconv.Itoa(port)) + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + mockOutput := testutil.Operator{} + tcpInput := op.(*Input) + tcpInput.InputOperator.OutputOperators = []operator.Operator{&mockOutput} + entryChan := make(chan *entry.Entry, 1) + mockOutput.On("Process", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { + entryChan <- args.Get(1).(*entry.Entry) + }).Return(nil) + err = tcpInput.Start(testutil.NewUnscopedMockPersister()) + return tcpInput, err + } + + first, err := startTCP(port) + require.NoError(t, err, "expected first tcp operator to start") + defer func() { + require.NoError(t, first.Stop(), "expected to stop tcp input operator without error") + require.NoError(t, first.Stop(), "expected stopping an already stopped operator to not return an error") + }() + _, err = startTCP(port) + require.Error(t, err, "expected second tcp operator to fail to start") +} + +func BenchmarkTCPInput(b *testing.B) { + cfg := NewConfigWithID("test_id") + cfg.ListenAddress = ":0" + + op, err := cfg.Build(testutil.Logger(b)) + require.NoError(b, err) + + fakeOutput := testutil.NewFakeOutput(b) + tcpInput := op.(*Input) + tcpInput.InputOperator.OutputOperators = []operator.Operator{fakeOutput} + + err = tcpInput.Start(testutil.NewUnscopedMockPersister()) + require.NoError(b, err) + + done := make(chan struct{}) + go func() { + conn, err := net.Dial("tcp", tcpInput.listener.Addr().String()) + require.NoError(b, err) + defer func() { + err := tcpInput.Stop() + require.NoError(b, err, "expected to stop tcp input operator without error") + + err = conn.Close() + require.NoError(b, err, "expected to close connection without error") + }() + message := []byte("message\n") + for { + select { + case <-done: + return + default: + _, err := conn.Write(message) + require.NoError(b, err) + } + } + }() + + for i := 0; i < b.N; i++ { + <-fakeOutput.Received + } + + defer close(done) +} diff --git a/pkg/stanza/operator/input/tcp/package_test.go b/pkg/stanza/operator/input/tcp/package_test.go new file mode 100644 index 000000000000..4c21e3172255 --- /dev/null +++ b/pkg/stanza/operator/input/tcp/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package tcp + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/input/tcp/tcp.go b/pkg/stanza/operator/input/tcp/tcp.go deleted file mode 100644 index 0b9aff7bd6be..000000000000 --- a/pkg/stanza/operator/input/tcp/tcp.go +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package tcp // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/tcp" - -import ( - "bufio" - "bytes" - "context" - "crypto/rand" - "crypto/tls" - "fmt" - "io" - "net" - "strconv" - "sync" - "time" - - "github.com/jpillora/backoff" - "go.opentelemetry.io/collector/config/configtls" - "go.uber.org/zap" - "golang.org/x/text/encoding" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/decode" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/split" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/trim" -) - -const ( - operatorType = "tcp_input" - - // minMaxLogSize is the minimal size which can be used for buffering - // TCP input - minMaxLogSize = 64 * 1024 - - // DefaultMaxLogSize is the max buffer sized used - // if MaxLogSize is not set - DefaultMaxLogSize = 1024 * 1024 -) - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new TCP input config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new TCP input config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - InputConfig: helper.NewInputConfig(operatorID, operatorType), - BaseConfig: BaseConfig{ - OneLogPerPacket: false, - Encoding: "utf-8", - }, - } -} - -// Config is the configuration of a tcp input operator. -type Config struct { - helper.InputConfig `mapstructure:",squash"` - BaseConfig `mapstructure:",squash"` -} - -// BaseConfig is the detailed configuration of a tcp input operator. -type BaseConfig struct { - MaxLogSize helper.ByteSize `mapstructure:"max_log_size,omitempty"` - ListenAddress string `mapstructure:"listen_address,omitempty"` - TLS *configtls.TLSServerSetting `mapstructure:"tls,omitempty"` - AddAttributes bool `mapstructure:"add_attributes,omitempty"` - OneLogPerPacket bool `mapstructure:"one_log_per_packet,omitempty"` - Encoding string `mapstructure:"encoding,omitempty"` - SplitConfig split.Config `mapstructure:"multiline,omitempty"` - TrimConfig trim.Config `mapstructure:",squash"` - SplitFuncBuilder SplitFuncBuilder `mapstructure:"-"` -} - -type SplitFuncBuilder func(enc encoding.Encoding) (bufio.SplitFunc, error) - -func (c Config) defaultSplitFuncBuilder(enc encoding.Encoding) (bufio.SplitFunc, error) { - return c.SplitConfig.Func(enc, true, int(c.MaxLogSize)) -} - -// Build will build a tcp input operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - inputOperator, err := c.InputConfig.Build(logger) - if err != nil { - return nil, err - } - - // If MaxLogSize not set, set sane default - if c.MaxLogSize == 0 { - c.MaxLogSize = DefaultMaxLogSize - } - - if c.MaxLogSize < minMaxLogSize { - return nil, fmt.Errorf("invalid value for parameter 'max_log_size', must be equal to or greater than %d bytes", minMaxLogSize) - } - - if c.ListenAddress == "" { - return nil, fmt.Errorf("missing required parameter 'listen_address'") - } - - // validate the input address - if _, err = net.ResolveTCPAddr("tcp", c.ListenAddress); err != nil { - return nil, fmt.Errorf("failed to resolve listen_address: %w", err) - } - - enc, err := decode.LookupEncoding(c.Encoding) - if err != nil { - return nil, err - } - - if c.SplitFuncBuilder == nil { - c.SplitFuncBuilder = c.defaultSplitFuncBuilder - } - - // Build split func - splitFunc, err := c.SplitFuncBuilder(enc) - if err != nil { - return nil, err - } - splitFunc = trim.WithFunc(splitFunc, c.TrimConfig.Func()) - - var resolver *helper.IPResolver - if c.AddAttributes { - resolver = helper.NewIPResolver() - } - - tcpInput := &Input{ - InputOperator: inputOperator, - address: c.ListenAddress, - MaxLogSize: int(c.MaxLogSize), - addAttributes: c.AddAttributes, - OneLogPerPacket: c.OneLogPerPacket, - encoding: enc, - splitFunc: splitFunc, - backoff: backoff.Backoff{ - Max: 3 * time.Second, - }, - resolver: resolver, - } - - if c.TLS != nil { - tcpInput.tls, err = c.TLS.LoadTLSConfig() - if err != nil { - return nil, err - } - } - - return tcpInput, nil -} - -// Input is an operator that listens for log entries over tcp. -type Input struct { - helper.InputOperator - address string - MaxLogSize int - addAttributes bool - OneLogPerPacket bool - - listener net.Listener - cancel context.CancelFunc - wg sync.WaitGroup - tls *tls.Config - backoff backoff.Backoff - - encoding encoding.Encoding - splitFunc bufio.SplitFunc - resolver *helper.IPResolver -} - -// Start will start listening for log entries over tcp. -func (t *Input) Start(_ operator.Persister) error { - if err := t.configureListener(); err != nil { - return fmt.Errorf("failed to listen on interface: %w", err) - } - - ctx, cancel := context.WithCancel(context.Background()) - t.cancel = cancel - t.goListen(ctx) - return nil -} - -func (t *Input) configureListener() error { - if t.tls == nil { - listener, err := net.Listen("tcp", t.address) - if err != nil { - return fmt.Errorf("failed to configure tcp listener: %w", err) - } - t.listener = listener - return nil - } - - t.tls.Time = time.Now - t.tls.Rand = rand.Reader - - listener, err := tls.Listen("tcp", t.address, t.tls) - if err != nil { - return fmt.Errorf("failed to configure tls listener: %w", err) - } - - t.listener = listener - return nil -} - -// goListenn will listen for tcp connections. -func (t *Input) goListen(ctx context.Context) { - t.wg.Add(1) - - go func() { - defer t.wg.Done() - - for { - conn, err := t.listener.Accept() - if err != nil { - select { - case <-ctx.Done(): - return - default: - t.Debugw("Listener accept error", zap.Error(err)) - time.Sleep(t.backoff.Duration()) - continue - } - } - t.backoff.Reset() - - t.Debugf("Received connection: %s", conn.RemoteAddr().String()) - subctx, cancel := context.WithCancel(ctx) - t.goHandleClose(subctx, conn) - t.goHandleMessages(subctx, conn, cancel) - } - }() -} - -// goHandleClose will wait for the context to finish before closing a connection. -func (t *Input) goHandleClose(ctx context.Context, conn net.Conn) { - t.wg.Add(1) - - go func() { - defer t.wg.Done() - <-ctx.Done() - t.Debugf("Closing connection: %s", conn.RemoteAddr().String()) - if err := conn.Close(); err != nil { - t.Errorf("Failed to close connection: %s", err) - } - }() -} - -// goHandleMessages will handles messages from a tcp connection. -func (t *Input) goHandleMessages(ctx context.Context, conn net.Conn, cancel context.CancelFunc) { - t.wg.Add(1) - - go func() { - defer t.wg.Done() - defer cancel() - - dec := decode.New(t.encoding) - if t.OneLogPerPacket { - var buf bytes.Buffer - _, err := io.Copy(&buf, conn) - if err != nil { - t.Errorw("IO copy net connection buffer error", zap.Error(err)) - } - log := truncateMaxLog(buf.Bytes(), t.MaxLogSize) - t.handleMessage(ctx, conn, dec, log) - return - } - - buf := make([]byte, 0, t.MaxLogSize) - - scanner := bufio.NewScanner(conn) - scanner.Buffer(buf, t.MaxLogSize) - - scanner.Split(t.splitFunc) - - for scanner.Scan() { - t.handleMessage(ctx, conn, dec, scanner.Bytes()) - } - - if err := scanner.Err(); err != nil { - t.Errorw("Scanner error", zap.Error(err)) - } - }() -} - -func (t *Input) handleMessage(ctx context.Context, conn net.Conn, dec *decode.Decoder, log []byte) { - decoded, err := dec.Decode(log) - if err != nil { - t.Errorw("Failed to decode data", zap.Error(err)) - return - } - - entry, err := t.NewEntry(string(decoded)) - if err != nil { - t.Errorw("Failed to create entry", zap.Error(err)) - return - } - - if t.addAttributes { - entry.AddAttribute("net.transport", "IP.TCP") - if addr, ok := conn.RemoteAddr().(*net.TCPAddr); ok { - ip := addr.IP.String() - entry.AddAttribute("net.peer.ip", ip) - entry.AddAttribute("net.peer.port", strconv.FormatInt(int64(addr.Port), 10)) - entry.AddAttribute("net.peer.name", t.resolver.GetHostFromIP(ip)) - } - - if addr, ok := conn.LocalAddr().(*net.TCPAddr); ok { - ip := addr.IP.String() - entry.AddAttribute("net.host.ip", addr.IP.String()) - entry.AddAttribute("net.host.port", strconv.FormatInt(int64(addr.Port), 10)) - entry.AddAttribute("net.host.name", t.resolver.GetHostFromIP(ip)) - } - } - - t.Write(ctx, entry) -} - -func truncateMaxLog(data []byte, maxLogSize int) (token []byte) { - if len(data) >= maxLogSize { - return data[:maxLogSize] - } - - if len(data) == 0 { - return nil - } - - return data -} - -// Stop will stop listening for log entries over TCP. -func (t *Input) Stop() error { - if t.cancel == nil { - return nil - } - t.cancel() - - if t.listener != nil { - if err := t.listener.Close(); err != nil { - t.Errorf("failed to close TCP connection: %s", err) - } - } - - t.wg.Wait() - if t.resolver != nil { - t.resolver.Stop() - } - return nil -} diff --git a/pkg/stanza/operator/input/tcp/tcp_test.go b/pkg/stanza/operator/input/tcp/tcp_test.go deleted file mode 100644 index 3bb3c0cbe4be..000000000000 --- a/pkg/stanza/operator/input/tcp/tcp_test.go +++ /dev/null @@ -1,456 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package tcp - -import ( - "crypto/tls" - "math/rand" - "net" - "os" - "strconv" - "testing" - "time" - - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/config/configtls" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" -) - -const testTLSPrivateKey = ` ------BEGIN PRIVATE KEY----- -MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDdNdVRHDoOlwrQ -YNlzP6MdLEIvN03Pv3A/Cdyy8LgKgSEf3kmw8o/75tSQzIAR6v7ts/qq1iAwE3OL -s4r8lASj2wirF2fNxX12OvIP8g3mrs4tCANBh413IywVKcEOrry71/s1k7+hscMv -Fe3NLxD1mNKJogwKyifvSc15zx8ge8SLjp875NiLCni2YYWXBt1pqd4wCol8lX6v -3u2rbNXrQf2sLncD0CE45EWHnzLzK33a0BwxyTXAOdd9kindL2IFct9C2HRQEk5h -GaXbNN0f6EMOZOzadJHfMledKVJ1XOd+t/kaPzY4NLDaGad04pNa+jph54qIVL5b -gCTOivX1AgMBAAECggEBAKPll/hxrn5S4LtFlrdyJfueaCctlaRgFd1PBEs8WU/H -HvDKtNS6031zKHlkW1trPpiF6iqbXdvg/ZI7Y7YCQXHZ/pEtVUa7lVp9EA5KbIxH -ZhEtR6RMt77Wu3mupxCm3MVcoA6xOqGl4JTJbZjBz5H4Ob2p57wyzeXYS7p9gHWC -fSj8tEqJdjLt7lqtqaWg/3iqqnLPdT3fGL6uyVbCDn9VZ23C7+sHiUfG67xHiF97 -UT+O+dfADMY6rLY1njxdD0QGPS7MQLHAgL/ESjROSL4cj1f9VYJFgweAE/UxnDVQ -n3pTzHFItjYWtK75o7Yc/zaHKp5hsXMsiVb9gtmBcaECgYEA+i2viVdZQqItIDiJ -rc7M42Fo6mLv1gToOVaIst7qPmW6BlwSQbX/x2V/2UsMWtcL95mrmRVjK9iH/Pg8 -ZaMlJynpgTM/x0jlZ2gZW1DPJWiCJ97xsdbOBA4JiGExc7odkbZhecfdlf66h0N6 -Ll32k80PNqTDJV8wWuUxsEnJaLkCgYEA4luVgtnhiJx3FIfBM9p/EVearFsQFSil -PPeoJfc5GMGAnNeGBv5YI4wZ5Jaa0qHLg5ps5Y8vO1yWKiAuhgVKXhytOj86XsoL -MdisDYcxzskG/9ipX3fP1rBNgwdzBoP4QcpzV69weDsja8AU2pluKSd3r3nzwqsY -dc/NVJRsYR0CgYAw2scSrOoTZxQk3KWWOXItXRJd4yAuzRqER++97mYT9U2UfFpc -VqwyRhHnXw50ltYRbgLijBinsUstDVTODEPvF/IvdtCXnBagUOXSvT8WcQgpvRG5 -xtbIV+1oooJDtS6dC96RJ4SQDARk8bpkX5kNV9gGtboeDC6nMWa4pFAekQKBgQCm -naM/3gEU/ZbplcOw13QQ39sKYz1DVdfLOMCcsY1lm4l/6WTOYQmfoNCuYe00fcO/ -6zuc/fhWSaB/AZE9NUe4XoNkDIZ6n13+Iu8CRjFzdKWiTWjezOI/tSZY/HK+qQVj -6BFeydSPq3g3J/wxrB5aTKLcl3fGIwquLXeGenoMQQKBgQCWULypEeQwJsyKB57P -JzuCnFMvLL5qSNwot5c7I+AX5yi368dEurQl6pUUJ9VKNbpsUxFIMq9AHpddDoq/ -+nIVt1DYr55ZsUJ6SgYtjvCMT9WOE/1Kqfh6p6y/mgRUl8m6v6gqi5/RfsNWJwfl -iBXhcGCQfkwZ8YIUyTW89qrwMw== ------END PRIVATE KEY-----` - -const testTLSCertificate = ` ------BEGIN CERTIFICATE----- -MIIDVDCCAjwCCQCwsE+LGRRtBTANBgkqhkiG9w0BAQsFADBsMQswCQYDVQQGEwJV -UzERMA8GA1UECAwITWljaGlnYW4xFTATBgNVBAcMDEdyYW5kIFJhcGlkczERMA8G -A1UECgwIb2JzZXJ2aVExDzANBgNVBAsMBlN0YW56YTEPMA0GA1UEAwwGU3Rhbnph -MB4XDTIxMDIyNTE3MzgxM1oXDTQ4MDcxMjE3MzgxM1owbDELMAkGA1UEBhMCVVMx -ETAPBgNVBAgMCE1pY2hpZ2FuMRUwEwYDVQQHDAxHcmFuZCBSYXBpZHMxETAPBgNV -BAoMCG9ic2VydmlRMQ8wDQYDVQQLDAZTdGFuemExDzANBgNVBAMMBlN0YW56YTCC -ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN011VEcOg6XCtBg2XM/ox0s -Qi83Tc+/cD8J3LLwuAqBIR/eSbDyj/vm1JDMgBHq/u2z+qrWIDATc4uzivyUBKPb -CKsXZ83FfXY68g/yDeauzi0IA0GHjXcjLBUpwQ6uvLvX+zWTv6Gxwy8V7c0vEPWY -0omiDArKJ+9JzXnPHyB7xIuOnzvk2IsKeLZhhZcG3Wmp3jAKiXyVfq/e7ats1etB -/awudwPQITjkRYefMvMrfdrQHDHJNcA5132SKd0vYgVy30LYdFASTmEZpds03R/o -Qw5k7Np0kd8yV50pUnVc5363+Ro/Njg0sNoZp3Tik1r6OmHniohUvluAJM6K9fUC -AwEAATANBgkqhkiG9w0BAQsFAAOCAQEA0u061goAXX7RxtdRO7Twz4zZIGS/oWvn -gj61zZIXt8LaTzRZFU9rs0rp7jPXKaszArJQc29anf1mWtRwQBAY0S0m4DkwoBln -7hMFf9MlisQvBVFjWgDo7QCJJmAxaPc1NZi8GQIANEMMZ+hLK17dhDB+6SdBbV4R -yx+7I3zcXQ+0H4Aym6KmvoIR3QAXsOYJ/43QzlYU63ryGYBAeg+JiD8fnr2W3QHb -BBdatHmcazlytT5KV+bANT/Ermw8y2tpWGWxMxQHveFh1zThYL8vkLi4fmZqqVCI -zv9WEy+9p05Aet+12x3dzRu93+yRIEYbSZ35NOUWfQ+gspF5rGgpxA== ------END CERTIFICATE-----` - -func tcpInputTest(input []byte, expected []string) func(t *testing.T) { - return func(t *testing.T) { - cfg := NewConfigWithID("test_id") - cfg.ListenAddress = ":0" - - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - - mockOutput := testutil.Operator{} - tcpInput := op.(*Input) - tcpInput.InputOperator.OutputOperators = []operator.Operator{&mockOutput} - - entryChan := make(chan *entry.Entry, 1) - mockOutput.On("Process", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { - entryChan <- args.Get(1).(*entry.Entry) - }).Return(nil) - - err = tcpInput.Start(testutil.NewUnscopedMockPersister()) - require.NoError(t, err) - defer func() { - require.NoError(t, tcpInput.Stop(), "expected to stop tcp input operator without error") - }() - - conn, err := net.Dial("tcp", tcpInput.listener.Addr().String()) - require.NoError(t, err) - defer conn.Close() - - _, err = conn.Write(input) - require.NoError(t, err) - - for _, expectedMessage := range expected { - select { - case entry := <-entryChan: - require.Equal(t, expectedMessage, entry.Body) - case <-time.After(time.Second): - require.FailNow(t, "Timed out waiting for message to be written") - } - } - - select { - case entry := <-entryChan: - require.FailNow(t, "Unexpected entry: %s", entry) - case <-time.After(100 * time.Millisecond): - return - } - } -} - -func tcpInputAttributesTest(input []byte, expected []string) func(t *testing.T) { - return func(t *testing.T) { - cfg := NewConfigWithID("test_id") - cfg.ListenAddress = ":0" - cfg.AddAttributes = true - - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - - mockOutput := testutil.Operator{} - tcpInput := op.(*Input) - tcpInput.InputOperator.OutputOperators = []operator.Operator{&mockOutput} - - entryChan := make(chan *entry.Entry, 1) - mockOutput.On("Process", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { - entryChan <- args.Get(1).(*entry.Entry) - }).Return(nil) - - err = tcpInput.Start(testutil.NewUnscopedMockPersister()) - require.NoError(t, err) - defer func() { - require.NoError(t, tcpInput.Stop(), "expected to stop tcp input operator without error") - }() - - conn, err := net.Dial("tcp", tcpInput.listener.Addr().String()) - require.NoError(t, err) - defer conn.Close() - - _, err = conn.Write(input) - require.NoError(t, err) - - for _, expectedMessage := range expected { - select { - case entry := <-entryChan: - expectedAttributes := map[string]any{ - "net.transport": "IP.TCP", - } - if addr, ok := conn.RemoteAddr().(*net.TCPAddr); ok { - ip := addr.IP.String() - expectedAttributes["net.host.ip"] = addr.IP.String() - expectedAttributes["net.host.port"] = strconv.FormatInt(int64(addr.Port), 10) - expectedAttributes["net.host.name"] = tcpInput.resolver.GetHostFromIP(ip) - } - if addr, ok := conn.LocalAddr().(*net.TCPAddr); ok { - ip := addr.IP.String() - expectedAttributes["net.peer.ip"] = ip - expectedAttributes["net.peer.port"] = strconv.FormatInt(int64(addr.Port), 10) - expectedAttributes["net.peer.name"] = tcpInput.resolver.GetHostFromIP(ip) - } - require.Equal(t, expectedMessage, entry.Body) - require.Equal(t, expectedAttributes, entry.Attributes) - case <-time.After(time.Second): - require.FailNow(t, "Timed out waiting for message to be written") - } - } - - select { - case entry := <-entryChan: - require.FailNow(t, "Unexpected entry: %s", entry) - case <-time.After(100 * time.Millisecond): - return - } - } -} - -func tlsInputTest(input []byte, expected []string) func(t *testing.T) { - return func(t *testing.T) { - f, err := os.Create("test.crt") - require.NoError(t, err) - defer f.Close() - defer os.Remove("test.crt") - _, err = f.WriteString(testTLSCertificate + "\n") - require.NoError(t, err) - f.Close() - - f, err = os.Create("test.key") - require.NoError(t, err) - defer f.Close() - defer os.Remove("test.key") - _, err = f.WriteString(testTLSPrivateKey + "\n") - require.NoError(t, err) - f.Close() - - cfg := NewConfigWithID("test_id") - cfg.ListenAddress = ":0" - cfg.TLS = &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ - CertFile: "test.crt", - KeyFile: "test.key", - }, - } - - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - - mockOutput := testutil.Operator{} - tcpInput := op.(*Input) - tcpInput.InputOperator.OutputOperators = []operator.Operator{&mockOutput} - - entryChan := make(chan *entry.Entry, 1) - mockOutput.On("Process", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { - entryChan <- args.Get(1).(*entry.Entry) - }).Return(nil) - - err = tcpInput.Start(testutil.NewUnscopedMockPersister()) - require.NoError(t, err) - defer func() { - require.NoError(t, tcpInput.Stop(), "expected to stop tcp input operator without error") - }() - - conn, err := tls.Dial("tcp", tcpInput.listener.Addr().String(), &tls.Config{InsecureSkipVerify: true}) - require.NoError(t, err) - defer conn.Close() - - _, err = conn.Write(input) - require.NoError(t, err) - - for _, expectedMessage := range expected { - select { - case entry := <-entryChan: - require.Equal(t, expectedMessage, entry.Body) - case <-time.After(time.Second): - require.FailNow(t, "Timed out waiting for message to be written") - } - } - - select { - case entry := <-entryChan: - require.FailNow(t, "Unexpected entry: %s", entry) - case <-time.After(100 * time.Millisecond): - return - } - } -} - -func TestBuild(t *testing.T) { - cases := []struct { - name string - inputBody Config - expectErr bool - }{ - { - "default-auto-address", - Config{ - BaseConfig: BaseConfig{ - ListenAddress: ":0", - }, - }, - false, - }, - { - "default-fixed-address", - Config{ - BaseConfig: BaseConfig{ - ListenAddress: "10.0.0.1:0", - }, - }, - false, - }, - { - "default-fixed-address-port", - Config{ - BaseConfig: BaseConfig{ - ListenAddress: "10.0.0.1:9000", - }, - }, - false, - }, - { - "buffer-size-valid-default", - Config{ - BaseConfig: BaseConfig{ - MaxLogSize: 0, - ListenAddress: "10.0.0.1:9000", - }, - }, - false, - }, - { - "buffer-size-valid-min", - Config{ - BaseConfig: BaseConfig{ - MaxLogSize: 65536, - ListenAddress: "10.0.0.1:9000", - }, - }, - false, - }, - { - "buffer-size-negative", - Config{ - BaseConfig: BaseConfig{ - MaxLogSize: -1, - ListenAddress: "10.0.0.1:9000", - }, - }, - true, - }, - { - "tls-enabled-with-no-such-file-error", - Config{ - BaseConfig: BaseConfig{ - MaxLogSize: 65536, - ListenAddress: "10.0.0.1:9000", - TLS: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ - CertFile: "/tmp/cert/missing", - KeyFile: "/tmp/key/missing", - }, - }, - }, - }, - true, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - cfg := NewConfigWithID("test_id") - cfg.ListenAddress = tc.inputBody.ListenAddress - cfg.MaxLogSize = tc.inputBody.MaxLogSize - cfg.TLS = tc.inputBody.TLS - _, err := cfg.Build(testutil.Logger(t)) - if tc.expectErr { - require.Error(t, err) - return - } - require.NoError(t, err) - }) - } -} - -func TestTCPInput(t *testing.T) { - t.Run("Simple", tcpInputTest([]byte("message\n"), []string{"message"})) - t.Run("CarriageReturn", tcpInputTest([]byte("message\r\n"), []string{"message"})) -} - -func TestTCPInputAattributes(t *testing.T) { - t.Run("Simple", tcpInputAttributesTest([]byte("message\n"), []string{"message"})) - t.Run("CarriageReturn", tcpInputAttributesTest([]byte("message\r\n"), []string{"message"})) -} - -func TestTLSTCPInput(t *testing.T) { - t.Run("Simple", tlsInputTest([]byte("message\n"), []string{"message"})) - t.Run("CarriageReturn", tlsInputTest([]byte("message\r\n"), []string{"message"})) -} - -func TestFailToBind(t *testing.T) { - ip := "localhost" - port := 0 - minPort := 30000 - maxPort := 40000 - for i := 1; i < 10; i++ { - port = minPort + rand.Intn(maxPort-minPort+1) - _, err := net.DialTimeout("tcp", net.JoinHostPort(ip, strconv.Itoa(port)), time.Second*2) - if err != nil { - // a failed connection indicates that the port is available for use - break - } - } - if port == 0 { - t.Errorf("failed to find a free port between %d and %d", minPort, maxPort) - } - - var startTCP = func(int) (*Input, error) { - cfg := NewConfigWithID("test_id") - cfg.ListenAddress = net.JoinHostPort(ip, strconv.Itoa(port)) - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - mockOutput := testutil.Operator{} - tcpInput := op.(*Input) - tcpInput.InputOperator.OutputOperators = []operator.Operator{&mockOutput} - entryChan := make(chan *entry.Entry, 1) - mockOutput.On("Process", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { - entryChan <- args.Get(1).(*entry.Entry) - }).Return(nil) - err = tcpInput.Start(testutil.NewUnscopedMockPersister()) - return tcpInput, err - } - - first, err := startTCP(port) - require.NoError(t, err, "expected first tcp operator to start") - defer func() { - require.NoError(t, first.Stop(), "expected to stop tcp input operator without error") - require.NoError(t, first.Stop(), "expected stopping an already stopped operator to not return an error") - }() - _, err = startTCP(port) - require.Error(t, err, "expected second tcp operator to fail to start") -} - -func BenchmarkTCPInput(b *testing.B) { - cfg := NewConfigWithID("test_id") - cfg.ListenAddress = ":0" - - op, err := cfg.Build(testutil.Logger(b)) - require.NoError(b, err) - - fakeOutput := testutil.NewFakeOutput(b) - tcpInput := op.(*Input) - tcpInput.InputOperator.OutputOperators = []operator.Operator{fakeOutput} - - err = tcpInput.Start(testutil.NewUnscopedMockPersister()) - require.NoError(b, err) - - done := make(chan struct{}) - go func() { - conn, err := net.Dial("tcp", tcpInput.listener.Addr().String()) - require.NoError(b, err) - defer func() { - err := tcpInput.Stop() - require.NoError(b, err, "expected to stop tcp input operator without error") - - err = conn.Close() - require.NoError(b, err, "expected to close connection without error") - }() - message := []byte("message\n") - for { - select { - case <-done: - return - default: - _, err := conn.Write(message) - require.NoError(b, err) - } - } - }() - - for i := 0; i < b.N; i++ { - <-fakeOutput.Received - } - - defer close(done) -} diff --git a/pkg/stanza/operator/input/udp/config.go b/pkg/stanza/operator/input/udp/config.go new file mode 100644 index 000000000000..6f230fc43d68 --- /dev/null +++ b/pkg/stanza/operator/input/udp/config.go @@ -0,0 +1,144 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package udp // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/udp" + +import ( + "fmt" + "net" + "sync" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/decode" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/split" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/trim" +) + +const ( + operatorType = "udp_input" + + // Maximum UDP packet size + MaxUDPSize = 64 * 1024 + + defaultReaders = 1 + defaultProcessors = 1 + defaultMaxQueueLength = 100 +) + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new UDP input config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new UDP input config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + InputConfig: helper.NewInputConfig(operatorID, operatorType), + BaseConfig: BaseConfig{ + Encoding: "utf-8", + OneLogPerPacket: false, + SplitConfig: split.Config{ + LineEndPattern: ".^", // Use never matching regex to not split data by default + }, + }, + } +} + +// Config is the configuration of a udp input operator. +type Config struct { + helper.InputConfig `mapstructure:",squash"` + BaseConfig `mapstructure:",squash"` +} + +type AsyncConfig struct { + Readers int `mapstructure:"readers,omitempty"` + Processors int `mapstructure:"processors,omitempty"` + MaxQueueLength int `mapstructure:"max_queue_length,omitempty"` +} + +// BaseConfig is the details configuration of a udp input operator. +type BaseConfig struct { + ListenAddress string `mapstructure:"listen_address,omitempty"` + OneLogPerPacket bool `mapstructure:"one_log_per_packet,omitempty"` + AddAttributes bool `mapstructure:"add_attributes,omitempty"` + Encoding string `mapstructure:"encoding,omitempty"` + SplitConfig split.Config `mapstructure:"multiline,omitempty"` + TrimConfig trim.Config `mapstructure:",squash"` + AsyncConfig *AsyncConfig `mapstructure:"async,omitempty"` +} + +// Build will build a udp input operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + inputOperator, err := c.InputConfig.Build(logger) + if err != nil { + return nil, err + } + + if c.ListenAddress == "" { + return nil, fmt.Errorf("missing required parameter 'listen_address'") + } + + address, err := net.ResolveUDPAddr("udp", c.ListenAddress) + if err != nil { + return nil, fmt.Errorf("failed to resolve listen_address: %w", err) + } + + enc, err := decode.LookupEncoding(c.Encoding) + if err != nil { + return nil, err + } + + // Build split func + splitFunc, err := c.SplitConfig.Func(enc, true, MaxUDPSize) + if err != nil { + return nil, err + } + splitFunc = trim.WithFunc(splitFunc, c.TrimConfig.Func()) + + var resolver *helper.IPResolver + if c.AddAttributes { + resolver = helper.NewIPResolver() + } + + if c.AsyncConfig != nil { + if c.AsyncConfig.Readers <= 0 { + c.AsyncConfig.Readers = defaultReaders + } + if c.AsyncConfig.Processors <= 0 { + c.AsyncConfig.Processors = defaultProcessors + } + if c.AsyncConfig.MaxQueueLength <= 0 { + c.AsyncConfig.MaxQueueLength = defaultMaxQueueLength + } + } + + udpInput := &Input{ + InputOperator: inputOperator, + address: address, + buffer: make([]byte, MaxUDPSize), + addAttributes: c.AddAttributes, + encoding: enc, + splitFunc: splitFunc, + resolver: resolver, + OneLogPerPacket: c.OneLogPerPacket, + AsyncConfig: c.AsyncConfig, + } + + if c.AsyncConfig != nil { + udpInput.messageQueue = make(chan messageAndAddress, c.AsyncConfig.MaxQueueLength) + udpInput.readBufferPool = sync.Pool{ + New: func() any { + buffer := make([]byte, MaxUDPSize) + return &buffer + }, + } + } + return udpInput, nil +} diff --git a/pkg/stanza/operator/input/udp/input.go b/pkg/stanza/operator/input/udp/input.go new file mode 100644 index 000000000000..f004b3e7c993 --- /dev/null +++ b/pkg/stanza/operator/input/udp/input.go @@ -0,0 +1,268 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package udp // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/udp" + +import ( + "bufio" + "bytes" + "context" + "fmt" + "net" + "strconv" + "sync" + + "go.uber.org/zap" + "golang.org/x/text/encoding" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/decode" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Input is an operator that listens to a socket for log entries. +type Input struct { + buffer []byte + helper.InputOperator + address *net.UDPAddr + addAttributes bool + OneLogPerPacket bool + AsyncConfig *AsyncConfig + + connection net.PacketConn + cancel context.CancelFunc + wg sync.WaitGroup + wgReader sync.WaitGroup + + encoding encoding.Encoding + splitFunc bufio.SplitFunc + resolver *helper.IPResolver + + messageQueue chan messageAndAddress + readBufferPool sync.Pool + stopOnce sync.Once +} + +type messageAndAddress struct { + Message *[]byte + RemoteAddr net.Addr + MessageLength int +} + +// Start will start listening for messages on a socket. +func (i *Input) Start(_ operator.Persister) error { + ctx, cancel := context.WithCancel(context.Background()) + i.cancel = cancel + + conn, err := net.ListenUDP("udp", i.address) + if err != nil { + return fmt.Errorf("failed to open connection: %w", err) + } + i.connection = conn + + i.goHandleMessages(ctx) + return nil +} + +// goHandleMessages will handle messages from a udp connection. +func (i *Input) goHandleMessages(ctx context.Context) { + if i.AsyncConfig == nil { + i.wg.Add(1) + go i.readAndProcessMessages(ctx) + return + } + + for n := 0; n < i.AsyncConfig.Readers; n++ { + i.wgReader.Add(1) + go i.readMessagesAsync(ctx) + } + + for n := 0; n < i.AsyncConfig.Processors; n++ { + i.wg.Add(1) + go i.processMessagesAsync(ctx) + } +} + +func (i *Input) readAndProcessMessages(ctx context.Context) { + defer i.wg.Done() + + dec := decode.New(i.encoding) + readBuffer := make([]byte, MaxUDPSize) + scannerBuffer := make([]byte, 0, MaxUDPSize) + for { + message, remoteAddr, bufferLength, err := i.readMessage(readBuffer) + message = i.removeTrailingCharactersAndNULsFromBuffer(message, bufferLength) + + if err != nil { + select { + case <-ctx.Done(): + return + default: + i.Errorw("Failed reading messages", zap.Error(err)) + } + break + } + + i.processMessage(ctx, message, remoteAddr, dec, scannerBuffer) + } +} + +func (i *Input) processMessage(ctx context.Context, message []byte, remoteAddr net.Addr, dec *decode.Decoder, scannerBuffer []byte) { + if i.OneLogPerPacket { + log := truncateMaxLog(message) + i.handleMessage(ctx, remoteAddr, dec, log) + return + } + + scanner := bufio.NewScanner(bytes.NewReader(message)) + scanner.Buffer(scannerBuffer, MaxUDPSize) + + scanner.Split(i.splitFunc) + + for scanner.Scan() { + i.handleMessage(ctx, remoteAddr, dec, scanner.Bytes()) + } + if err := scanner.Err(); err != nil { + i.Errorw("Scanner error", zap.Error(err)) + } +} + +func (i *Input) readMessagesAsync(ctx context.Context) { + defer i.wgReader.Done() + + for { + readBuffer := i.readBufferPool.Get().(*[]byte) // Can't reuse the same buffer since same references would be written multiple times to the messageQueue (and cause data override of previous entries) + message, remoteAddr, bufferLength, err := i.readMessage(*readBuffer) + if err != nil { + i.readBufferPool.Put(readBuffer) + select { + case <-ctx.Done(): + return + default: + i.Errorw("Failed reading messages", zap.Error(err)) + } + break + } + + messageAndAddr := messageAndAddress{ + Message: &message, + MessageLength: bufferLength, + RemoteAddr: remoteAddr, + } + + // Send the message to the message queue for processing + i.messageQueue <- messageAndAddr + } +} + +func (i *Input) processMessagesAsync(ctx context.Context) { + defer i.wg.Done() + + dec := decode.New(i.encoding) + scannerBuffer := make([]byte, 0, MaxUDPSize) + + for { + // Read a message from the message queue. + messageAndAddr, ok := <-i.messageQueue + if !ok { + return // Channel closed, exit the goroutine. + } + + trimmedMessage := i.removeTrailingCharactersAndNULsFromBuffer(*messageAndAddr.Message, messageAndAddr.MessageLength) + i.processMessage(ctx, trimmedMessage, messageAndAddr.RemoteAddr, dec, scannerBuffer) + i.readBufferPool.Put(messageAndAddr.Message) + } +} + +func truncateMaxLog(data []byte) (token []byte) { + if len(data) >= MaxUDPSize { + return data[:MaxUDPSize] + } + + if len(data) == 0 { + return nil + } + + return data +} + +func (i *Input) handleMessage(ctx context.Context, remoteAddr net.Addr, dec *decode.Decoder, log []byte) { + decoded := log + if i.encoding != encoding.Nop { + var err error + decoded, err = dec.Decode(log) + if err != nil { + i.Errorw("Failed to decode data", zap.Error(err)) + return + } + } + + entry, err := i.NewEntry(string(decoded)) + if err != nil { + i.Errorw("Failed to create entry", zap.Error(err)) + return + } + + if i.addAttributes { + entry.AddAttribute("net.transport", "IP.UDP") + if addr, ok := i.connection.LocalAddr().(*net.UDPAddr); ok { + ip := addr.IP.String() + entry.AddAttribute("net.host.ip", addr.IP.String()) + entry.AddAttribute("net.host.port", strconv.FormatInt(int64(addr.Port), 10)) + entry.AddAttribute("net.host.name", i.resolver.GetHostFromIP(ip)) + } + + if addr, ok := remoteAddr.(*net.UDPAddr); ok { + ip := addr.IP.String() + entry.AddAttribute("net.peer.ip", ip) + entry.AddAttribute("net.peer.port", strconv.FormatInt(int64(addr.Port), 10)) + entry.AddAttribute("net.peer.name", i.resolver.GetHostFromIP(ip)) + } + } + + i.Write(ctx, entry) +} + +// readMessage will read log messages from the connection. +func (i *Input) readMessage(buffer []byte) ([]byte, net.Addr, int, error) { + n, addr, err := i.connection.ReadFrom(buffer) + if err != nil { + return nil, nil, 0, err + } + + return buffer, addr, n, nil +} + +// This will remove trailing characters and NULs from the buffer +func (i *Input) removeTrailingCharactersAndNULsFromBuffer(buffer []byte, n int) []byte { + // Remove trailing characters and NULs + for ; (n > 0) && (buffer[n-1] < 32); n-- { // nolint + } + + return buffer[:n] +} + +// Stop will stop listening for udp messages. +func (i *Input) Stop() error { + i.stopOnce.Do(func() { + if i.cancel == nil { + return + } + i.cancel() + if i.connection != nil { + if err := i.connection.Close(); err != nil { + i.Errorf("failed to close UDP connection: %s", err) + } + } + if i.AsyncConfig != nil { + i.wgReader.Wait() // only when all async readers are finished, so there's no risk of sending to a closed channel, do we close messageQueue (which allows the async processors to finish) + close(i.messageQueue) + } + + i.wg.Wait() + if i.resolver != nil { + i.resolver.Stop() + } + }) + return nil +} diff --git a/pkg/stanza/operator/input/udp/udp_test.go b/pkg/stanza/operator/input/udp/input_test.go similarity index 100% rename from pkg/stanza/operator/input/udp/udp_test.go rename to pkg/stanza/operator/input/udp/input_test.go diff --git a/pkg/stanza/operator/input/udp/package_test.go b/pkg/stanza/operator/input/udp/package_test.go new file mode 100644 index 000000000000..6ba2328ed650 --- /dev/null +++ b/pkg/stanza/operator/input/udp/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package udp + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/input/udp/udp.go b/pkg/stanza/operator/input/udp/udp.go deleted file mode 100644 index 4d49046cfda1..000000000000 --- a/pkg/stanza/operator/input/udp/udp.go +++ /dev/null @@ -1,390 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package udp // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/udp" - -import ( - "bufio" - "bytes" - "context" - "fmt" - "net" - "strconv" - "sync" - - "go.uber.org/zap" - "golang.org/x/text/encoding" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/decode" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/split" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/trim" -) - -const ( - operatorType = "udp_input" - - // Maximum UDP packet size - MaxUDPSize = 64 * 1024 - - defaultReaders = 1 - defaultProcessors = 1 - defaultMaxQueueLength = 100 -) - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new UDP input config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new UDP input config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - InputConfig: helper.NewInputConfig(operatorID, operatorType), - BaseConfig: BaseConfig{ - Encoding: "utf-8", - OneLogPerPacket: false, - SplitConfig: split.Config{ - LineEndPattern: ".^", // Use never matching regex to not split data by default - }, - }, - } -} - -// Config is the configuration of a udp input operator. -type Config struct { - helper.InputConfig `mapstructure:",squash"` - BaseConfig `mapstructure:",squash"` -} - -type AsyncConfig struct { - Readers int `mapstructure:"readers,omitempty"` - Processors int `mapstructure:"processors,omitempty"` - MaxQueueLength int `mapstructure:"max_queue_length,omitempty"` -} - -// BaseConfig is the details configuration of a udp input operator. -type BaseConfig struct { - ListenAddress string `mapstructure:"listen_address,omitempty"` - OneLogPerPacket bool `mapstructure:"one_log_per_packet,omitempty"` - AddAttributes bool `mapstructure:"add_attributes,omitempty"` - Encoding string `mapstructure:"encoding,omitempty"` - SplitConfig split.Config `mapstructure:"multiline,omitempty"` - TrimConfig trim.Config `mapstructure:",squash"` - AsyncConfig *AsyncConfig `mapstructure:"async,omitempty"` -} - -// Build will build a udp input operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - inputOperator, err := c.InputConfig.Build(logger) - if err != nil { - return nil, err - } - - if c.ListenAddress == "" { - return nil, fmt.Errorf("missing required parameter 'listen_address'") - } - - address, err := net.ResolveUDPAddr("udp", c.ListenAddress) - if err != nil { - return nil, fmt.Errorf("failed to resolve listen_address: %w", err) - } - - enc, err := decode.LookupEncoding(c.Encoding) - if err != nil { - return nil, err - } - - // Build split func - splitFunc, err := c.SplitConfig.Func(enc, true, MaxUDPSize) - if err != nil { - return nil, err - } - splitFunc = trim.WithFunc(splitFunc, c.TrimConfig.Func()) - - var resolver *helper.IPResolver - if c.AddAttributes { - resolver = helper.NewIPResolver() - } - - if c.AsyncConfig != nil { - if c.AsyncConfig.Readers <= 0 { - c.AsyncConfig.Readers = defaultReaders - } - if c.AsyncConfig.Processors <= 0 { - c.AsyncConfig.Processors = defaultProcessors - } - if c.AsyncConfig.MaxQueueLength <= 0 { - c.AsyncConfig.MaxQueueLength = defaultMaxQueueLength - } - } - - udpInput := &Input{ - InputOperator: inputOperator, - address: address, - buffer: make([]byte, MaxUDPSize), - addAttributes: c.AddAttributes, - encoding: enc, - splitFunc: splitFunc, - resolver: resolver, - OneLogPerPacket: c.OneLogPerPacket, - AsyncConfig: c.AsyncConfig, - } - - if c.AsyncConfig != nil { - udpInput.messageQueue = make(chan messageAndAddress, c.AsyncConfig.MaxQueueLength) - udpInput.readBufferPool = sync.Pool{ - New: func() any { - buffer := make([]byte, MaxUDPSize) - return &buffer - }, - } - } - return udpInput, nil -} - -// Input is an operator that listens to a socket for log entries. -type Input struct { - buffer []byte - helper.InputOperator - address *net.UDPAddr - addAttributes bool - OneLogPerPacket bool - AsyncConfig *AsyncConfig - - connection net.PacketConn - cancel context.CancelFunc - wg sync.WaitGroup - - encoding encoding.Encoding - splitFunc bufio.SplitFunc - resolver *helper.IPResolver - - messageQueue chan messageAndAddress - readBufferPool sync.Pool - stopOnce sync.Once -} - -type messageAndAddress struct { - Message *[]byte - RemoteAddr net.Addr - MessageLength int -} - -// Start will start listening for messages on a socket. -func (u *Input) Start(_ operator.Persister) error { - ctx, cancel := context.WithCancel(context.Background()) - u.cancel = cancel - - conn, err := net.ListenUDP("udp", u.address) - if err != nil { - return fmt.Errorf("failed to open connection: %w", err) - } - u.connection = conn - - u.goHandleMessages(ctx) - return nil -} - -// goHandleMessages will handle messages from a udp connection. -func (u *Input) goHandleMessages(ctx context.Context) { - if u.AsyncConfig == nil { - u.wg.Add(1) - go u.readAndProcessMessages(ctx) - return - } - - for i := 0; i < u.AsyncConfig.Readers; i++ { - u.wg.Add(1) - go u.readMessagesAsync(ctx) - } - - for i := 0; i < u.AsyncConfig.Processors; i++ { - u.wg.Add(1) - go u.processMessagesAsync(ctx) - } -} - -func (u *Input) readAndProcessMessages(ctx context.Context) { - defer u.wg.Done() - - dec := decode.New(u.encoding) - readBuffer := make([]byte, MaxUDPSize) - scannerBuffer := make([]byte, 0, MaxUDPSize) - for { - message, remoteAddr, bufferLength, err := u.readMessage(readBuffer) - message = u.removeTrailingCharactersAndNULsFromBuffer(message, bufferLength) - - if err != nil { - select { - case <-ctx.Done(): - return - default: - u.Errorw("Failed reading messages", zap.Error(err)) - } - break - } - - u.processMessage(ctx, message, remoteAddr, dec, scannerBuffer) - } -} - -func (u *Input) processMessage(ctx context.Context, message []byte, remoteAddr net.Addr, dec *decode.Decoder, scannerBuffer []byte) { - if u.OneLogPerPacket { - log := truncateMaxLog(message) - u.handleMessage(ctx, remoteAddr, dec, log) - return - } - - scanner := bufio.NewScanner(bytes.NewReader(message)) - scanner.Buffer(scannerBuffer, MaxUDPSize) - - scanner.Split(u.splitFunc) - - for scanner.Scan() { - u.handleMessage(ctx, remoteAddr, dec, scanner.Bytes()) - } - if err := scanner.Err(); err != nil { - u.Errorw("Scanner error", zap.Error(err)) - } -} - -func (u *Input) readMessagesAsync(ctx context.Context) { - defer u.wg.Done() - - for { - readBuffer := u.readBufferPool.Get().(*[]byte) // Can't reuse the same buffer since same references would be written multiple times to the messageQueue (and cause data override of previous entries) - message, remoteAddr, bufferLength, err := u.readMessage(*readBuffer) - if err != nil { - u.readBufferPool.Put(readBuffer) - select { - case <-ctx.Done(): - return - default: - u.Errorw("Failed reading messages", zap.Error(err)) - } - break - } - - messageAndAddr := messageAndAddress{ - Message: &message, - MessageLength: bufferLength, - RemoteAddr: remoteAddr, - } - - // Send the message to the message queue for processing - u.messageQueue <- messageAndAddr - } -} - -func (u *Input) processMessagesAsync(ctx context.Context) { - defer u.wg.Done() - - dec := decode.New(u.encoding) - scannerBuffer := make([]byte, 0, MaxUDPSize) - - for { - // Read a message from the message queue. - messageAndAddr, ok := <-u.messageQueue - if !ok { - return // Channel closed, exit the goroutine. - } - - trimmedMessage := u.removeTrailingCharactersAndNULsFromBuffer(*messageAndAddr.Message, messageAndAddr.MessageLength) - u.processMessage(ctx, trimmedMessage, messageAndAddr.RemoteAddr, dec, scannerBuffer) - u.readBufferPool.Put(messageAndAddr.Message) - } -} - -func truncateMaxLog(data []byte) (token []byte) { - if len(data) >= MaxUDPSize { - return data[:MaxUDPSize] - } - - if len(data) == 0 { - return nil - } - - return data -} - -func (u *Input) handleMessage(ctx context.Context, remoteAddr net.Addr, dec *decode.Decoder, log []byte) { - decoded, err := dec.Decode(log) - if err != nil { - u.Errorw("Failed to decode data", zap.Error(err)) - return - } - - entry, err := u.NewEntry(string(decoded)) - if err != nil { - u.Errorw("Failed to create entry", zap.Error(err)) - return - } - - if u.addAttributes { - entry.AddAttribute("net.transport", "IP.UDP") - if addr, ok := u.connection.LocalAddr().(*net.UDPAddr); ok { - ip := addr.IP.String() - entry.AddAttribute("net.host.ip", addr.IP.String()) - entry.AddAttribute("net.host.port", strconv.FormatInt(int64(addr.Port), 10)) - entry.AddAttribute("net.host.name", u.resolver.GetHostFromIP(ip)) - } - - if addr, ok := remoteAddr.(*net.UDPAddr); ok { - ip := addr.IP.String() - entry.AddAttribute("net.peer.ip", ip) - entry.AddAttribute("net.peer.port", strconv.FormatInt(int64(addr.Port), 10)) - entry.AddAttribute("net.peer.name", u.resolver.GetHostFromIP(ip)) - } - } - - u.Write(ctx, entry) -} - -// readMessage will read log messages from the connection. -func (u *Input) readMessage(buffer []byte) ([]byte, net.Addr, int, error) { - n, addr, err := u.connection.ReadFrom(buffer) - if err != nil { - return nil, nil, 0, err - } - - return buffer, addr, n, nil -} - -// This will remove trailing characters and NULs from the buffer -func (u *Input) removeTrailingCharactersAndNULsFromBuffer(buffer []byte, n int) []byte { - // Remove trailing characters and NULs - for ; (n > 0) && (buffer[n-1] < 32); n-- { // nolint - } - - return buffer[:n] -} - -// Stop will stop listening for udp messages. -func (u *Input) Stop() error { - u.stopOnce.Do(func() { - if u.AsyncConfig != nil { - close(u.messageQueue) - } - - if u.cancel == nil { - return - } - u.cancel() - if u.connection != nil { - if err := u.connection.Close(); err != nil { - u.Errorf("failed to close UDP connection: %s", err) - } - } - u.wg.Wait() - if u.resolver != nil { - u.resolver.Stop() - } - }) - return nil -} diff --git a/pkg/stanza/operator/input/windows/api.go b/pkg/stanza/operator/input/windows/api.go index c04e142d4e00..eb2ab3ec44ff 100644 --- a/pkg/stanza/operator/input/windows/api.go +++ b/pkg/stanza/operator/input/windows/api.go @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package windows // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" import ( + "errors" "syscall" "unsafe" @@ -68,7 +68,7 @@ const ( // evtSubscribe is the direct syscall implementation of EvtSubscribe (https://docs.microsoft.com/en-us/windows/win32/api/winevt/nf-winevt-evtsubscribe) func evtSubscribe(session uintptr, signalEvent windows.Handle, channelPath *uint16, query *uint16, bookmark uintptr, context uintptr, callback uintptr, flags uint32) (uintptr, error) { handle, _, err := subscribeProc.Call(session, uintptr(signalEvent), uintptr(unsafe.Pointer(channelPath)), uintptr(unsafe.Pointer(query)), bookmark, context, callback, uintptr(flags)) - if err != ErrorSuccess { + if !errors.Is(err, ErrorSuccess) { return 0, err } @@ -78,7 +78,7 @@ func evtSubscribe(session uintptr, signalEvent windows.Handle, channelPath *uint // evtNext is the direct syscall implementation of EvtNext (https://docs.microsoft.com/en-us/windows/win32/api/winevt/nf-winevt-evtnext) func evtNext(resultSet uintptr, eventsSize uint32, events *uintptr, timeout uint32, flags uint32, returned *uint32) error { _, _, err := nextProc.Call(resultSet, uintptr(eventsSize), uintptr(unsafe.Pointer(events)), uintptr(timeout), uintptr(flags), uintptr(unsafe.Pointer(returned))) - if err != ErrorSuccess { + if !errors.Is(err, ErrorSuccess) { return err } @@ -86,21 +86,21 @@ func evtNext(resultSet uintptr, eventsSize uint32, events *uintptr, timeout uint } // evtRender is the direct syscall implementation of EvtRender (https://docs.microsoft.com/en-us/windows/win32/api/winevt/nf-winevt-evtrender) -func evtRender(context uintptr, fragment uintptr, flags uint32, bufferSize uint32, buffer *byte) (*uint32, *uint32, error) { +func evtRender(context uintptr, fragment uintptr, flags uint32, bufferSize uint32, buffer *byte) (*uint32, error) { bufferUsed := new(uint32) propertyCount := new(uint32) _, _, err := renderProc.Call(context, fragment, uintptr(flags), uintptr(bufferSize), uintptr(unsafe.Pointer(buffer)), uintptr(unsafe.Pointer(bufferUsed)), uintptr(unsafe.Pointer(propertyCount))) - if err != ErrorSuccess { - return bufferUsed, propertyCount, err + if !errors.Is(err, ErrorSuccess) { + return bufferUsed, err } - return bufferUsed, propertyCount, nil + return bufferUsed, nil } // evtClose is the direct syscall implementation of EvtClose (https://docs.microsoft.com/en-us/windows/win32/api/winevt/nf-winevt-evtclose) func evtClose(handle uintptr) error { _, _, err := closeProc.Call(handle) - if err != ErrorSuccess { + if !errors.Is(err, ErrorSuccess) { return err } @@ -110,7 +110,7 @@ func evtClose(handle uintptr) error { // evtCreateBookmark is the direct syscall implementation of EvtCreateBookmark (https://docs.microsoft.com/en-us/windows/win32/api/winevt/nf-winevt-evtcreatebookmark) func evtCreateBookmark(bookmarkXML *uint16) (uintptr, error) { handle, _, err := createBookmarkProc.Call(uintptr(unsafe.Pointer(bookmarkXML))) - if err != ErrorSuccess { + if !errors.Is(err, ErrorSuccess) { return 0, err } @@ -120,7 +120,7 @@ func evtCreateBookmark(bookmarkXML *uint16) (uintptr, error) { // evtUpdateBookmark is the direct syscall implementation of EvtUpdateBookmark (https://docs.microsoft.com/en-us/windows/win32/api/winevt/nf-winevt-evtcreatebookmark) func evtUpdateBookmark(bookmark uintptr, event uintptr) error { _, _, err := updateBookmarkProc.Call(bookmark, event) - if err != ErrorSuccess { + if !errors.Is(err, ErrorSuccess) { return err } @@ -130,7 +130,7 @@ func evtUpdateBookmark(bookmark uintptr, event uintptr) error { // evtOpenPublisherMetadata is the direct syscall implementation of EvtOpenPublisherMetadata (https://docs.microsoft.com/en-us/windows/win32/api/winevt/nf-winevt-evtopenpublishermetadata) func evtOpenPublisherMetadata(session uintptr, publisherIdentity *uint16, logFilePath *uint16, locale uint32, flags uint32) (uintptr, error) { handle, _, err := openPublisherMetadataProc.Call(session, uintptr(unsafe.Pointer(publisherIdentity)), uintptr(unsafe.Pointer(logFilePath)), uintptr(locale), uintptr(flags)) - if err != ErrorSuccess { + if !errors.Is(err, ErrorSuccess) { return 0, err } @@ -141,7 +141,7 @@ func evtOpenPublisherMetadata(session uintptr, publisherIdentity *uint16, logFil func evtFormatMessage(publisherMetadata uintptr, event uintptr, messageID uint32, valueCount uint32, values uintptr, flags uint32, bufferSize uint32, buffer *byte) (*uint32, error) { bufferUsed := new(uint32) _, _, err := formatMessageProc.Call(publisherMetadata, event, uintptr(messageID), uintptr(valueCount), values, uintptr(flags), uintptr(bufferSize), uintptr(unsafe.Pointer(buffer)), uintptr(unsafe.Pointer(bufferUsed))) - if err != ErrorSuccess { + if !errors.Is(err, ErrorSuccess) { return bufferUsed, err } diff --git a/pkg/stanza/operator/input/windows/api_test.go b/pkg/stanza/operator/input/windows/api_test.go index 619f9363dec0..95d5635e9b64 100644 --- a/pkg/stanza/operator/input/windows/api_test.go +++ b/pkg/stanza/operator/input/windows/api_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package windows diff --git a/pkg/stanza/operator/input/windows/bookmark.go b/pkg/stanza/operator/input/windows/bookmark.go index 1dc90b3d0e7d..83ee23f665b9 100644 --- a/pkg/stanza/operator/input/windows/bookmark.go +++ b/pkg/stanza/operator/input/windows/bookmark.go @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package windows // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" import ( + "errors" "fmt" "syscall" ) @@ -59,8 +59,8 @@ func (b *Bookmark) Render(buffer Buffer) (string, error) { return "", fmt.Errorf("bookmark handle is not open") } - bufferUsed, _, err := evtRender(0, b.handle, EvtRenderBookmark, buffer.SizeBytes(), buffer.FirstByte()) - if err == ErrorInsufficientBuffer { + bufferUsed, err := evtRender(0, b.handle, EvtRenderBookmark, buffer.SizeBytes(), buffer.FirstByte()) + if errors.Is(err, ErrorInsufficientBuffer) { buffer.UpdateSizeBytes(*bufferUsed) return b.Render(buffer) } diff --git a/pkg/stanza/operator/input/windows/bookmark_test.go b/pkg/stanza/operator/input/windows/bookmark_test.go index 1df2c833e2da..988d6a3bc995 100644 --- a/pkg/stanza/operator/input/windows/bookmark_test.go +++ b/pkg/stanza/operator/input/windows/bookmark_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package windows diff --git a/pkg/stanza/operator/input/windows/config_all.go b/pkg/stanza/operator/input/windows/config_all.go new file mode 100644 index 000000000000..3fe9e71ee352 --- /dev/null +++ b/pkg/stanza/operator/input/windows/config_all.go @@ -0,0 +1,38 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package windows // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" + +import ( + "time" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "windows_eventlog_input" + +// NewConfig will return an event log config with default values. +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfig will return an event log config with default values. +func NewConfigWithID(operatorID string) *Config { + return &Config{ + InputConfig: helper.NewInputConfig(operatorID, operatorType), + MaxReads: 100, + StartAt: "end", + PollInterval: 1 * time.Second, + } +} + +// Config is the configuration of a windows event log operator. +type Config struct { + helper.InputConfig `mapstructure:",squash"` + Channel string `mapstructure:"channel"` + MaxReads int `mapstructure:"max_reads,omitempty"` + StartAt string `mapstructure:"start_at,omitempty"` + PollInterval time.Duration `mapstructure:"poll_interval,omitempty"` + Raw bool `mapstructure:"raw,omitempty"` + ExcludeProviders []string `mapstructure:"exclude_providers,omitempty"` +} diff --git a/pkg/stanza/operator/input/windows/config_windows.go b/pkg/stanza/operator/input/windows/config_windows.go new file mode 100644 index 000000000000..27cd9da1500b --- /dev/null +++ b/pkg/stanza/operator/input/windows/config_windows.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build windows + +package windows // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" + +import ( + "fmt" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" +) + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// Build will build a windows event log operator. +func (c *Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + inputOperator, err := c.InputConfig.Build(logger) + if err != nil { + return nil, err + } + + if c.Channel == "" { + return nil, fmt.Errorf("missing required `channel` field") + } + + if c.MaxReads < 1 { + return nil, fmt.Errorf("the `max_reads` field must be greater than zero") + } + + if c.StartAt != "end" && c.StartAt != "beginning" { + return nil, fmt.Errorf("the `start_at` field must be set to `beginning` or `end`") + } + + return &Input{ + InputOperator: inputOperator, + buffer: NewBuffer(), + channel: c.Channel, + maxReads: c.MaxReads, + startAt: c.StartAt, + pollInterval: c.PollInterval, + raw: c.Raw, + excludeProviders: c.ExcludeProviders, + }, nil +} diff --git a/pkg/stanza/operator/input/windows/event.go b/pkg/stanza/operator/input/windows/event.go index d549e16de540..81eb2cd478c8 100644 --- a/pkg/stanza/operator/input/windows/event.go +++ b/pkg/stanza/operator/input/windows/event.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package windows // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" @@ -25,8 +24,8 @@ func (e *Event) RenderSimple(buffer Buffer) (EventXML, error) { return EventXML{}, fmt.Errorf("event handle does not exist") } - bufferUsed, _, err := evtRender(0, e.handle, EvtRenderEventXML, buffer.SizeBytes(), buffer.FirstByte()) - if err == ErrorInsufficientBuffer { + bufferUsed, err := evtRender(0, e.handle, EvtRenderEventXML, buffer.SizeBytes(), buffer.FirstByte()) + if errors.Is(err, ErrorInsufficientBuffer) { buffer.UpdateSizeBytes(*bufferUsed) return e.RenderSimple(buffer) } @@ -50,7 +49,7 @@ func (e *Event) RenderFormatted(buffer Buffer, publisher Publisher) (EventXML, e } bufferUsed, err := evtFormatMessage(publisher.handle, e.handle, 0, 0, 0, EvtFormatMessageXML, buffer.SizeWide(), buffer.FirstByte()) - if err == ErrorInsufficientBuffer { + if errors.Is(err, ErrorInsufficientBuffer) { // If the bufferUsed is 0 return an error as we don't want to make a recursive call with no buffer if *bufferUsed == 0 { return EventXML{}, errUnknownNextFrame @@ -91,8 +90,8 @@ func (e *Event) RenderRaw(buffer Buffer) (EventRaw, error) { return EventRaw{}, fmt.Errorf("event handle does not exist") } - bufferUsed, _, err := evtRender(0, e.handle, EvtRenderEventXML, buffer.SizeBytes(), buffer.FirstByte()) - if err == ErrorInsufficientBuffer { + bufferUsed, err := evtRender(0, e.handle, EvtRenderEventXML, buffer.SizeBytes(), buffer.FirstByte()) + if errors.Is(err, ErrorInsufficientBuffer) { // If the bufferUsed is 0 return an error as we don't want to make a recursive call with no buffer if *bufferUsed == 0 { return EventRaw{}, errUnknownNextFrame diff --git a/pkg/stanza/operator/input/windows/event_test.go b/pkg/stanza/operator/input/windows/event_test.go index 02dbae880c8c..0acc6240c62c 100644 --- a/pkg/stanza/operator/input/windows/event_test.go +++ b/pkg/stanza/operator/input/windows/event_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package windows diff --git a/pkg/stanza/operator/input/windows/input.go b/pkg/stanza/operator/input/windows/input.go new file mode 100644 index 000000000000..be6b551fa8a2 --- /dev/null +++ b/pkg/stanza/operator/input/windows/input.go @@ -0,0 +1,245 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build windows + +package windows // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" + +import ( + "context" + "fmt" + "sync" + "time" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Input is an operator that creates entries using the windows event log api. +type Input struct { + helper.InputOperator + bookmark Bookmark + subscription Subscription + buffer Buffer + channel string + maxReads int + startAt string + raw bool + excludeProviders []string + pollInterval time.Duration + persister operator.Persister + publisherCache publisherCache + cancel context.CancelFunc + wg sync.WaitGroup +} + +// Start will start reading events from a subscription. +func (i *Input) Start(persister operator.Persister) error { + ctx, cancel := context.WithCancel(context.Background()) + i.cancel = cancel + + i.persister = persister + + i.bookmark = NewBookmark() + offsetXML, err := i.getBookmarkOffset(ctx) + if err != nil { + i.Errorf("Failed to open bookmark, continuing without previous bookmark: %s", err) + _ = i.persister.Delete(ctx, i.channel) + } + + if offsetXML != "" { + if err := i.bookmark.Open(offsetXML); err != nil { + return fmt.Errorf("failed to open bookmark: %w", err) + } + } + + i.subscription = NewSubscription() + if err := i.subscription.Open(i.channel, i.startAt, i.bookmark); err != nil { + return fmt.Errorf("failed to open subscription: %w", err) + } + + i.publisherCache = newPublisherCache() + + i.wg.Add(1) + go i.readOnInterval(ctx) + return nil +} + +// Stop will stop reading events from a subscription. +func (i *Input) Stop() error { + i.cancel() + i.wg.Wait() + + if err := i.subscription.Close(); err != nil { + return fmt.Errorf("failed to close subscription: %w", err) + } + + if err := i.bookmark.Close(); err != nil { + return fmt.Errorf("failed to close bookmark: %w", err) + } + + if err := i.publisherCache.evictAll(); err != nil { + return fmt.Errorf("failed to close publishers: %w", err) + } + + return nil +} + +// readOnInterval will read events with respect to the polling interval. +func (i *Input) readOnInterval(ctx context.Context) { + defer i.wg.Done() + + ticker := time.NewTicker(i.pollInterval) + defer ticker.Stop() + + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + i.readToEnd(ctx) + } + } +} + +// readToEnd will read events from the subscription until it reaches the end of the channel. +func (i *Input) readToEnd(ctx context.Context) { + for { + select { + case <-ctx.Done(): + return + default: + if count := i.read(ctx); count == 0 { + return + } + } + } +} + +// read will read events from the subscription. +func (i *Input) read(ctx context.Context) int { + events, err := i.subscription.Read(i.maxReads) + if err != nil { + i.Errorf("Failed to read events from subscription: %s", err) + return 0 + } + + for n, event := range events { + i.processEvent(ctx, event) + if len(events) == n+1 { + i.updateBookmarkOffset(ctx, event) + } + event.Close() + } + + return len(events) +} + +// processEvent will process and send an event retrieved from windows event log. +func (i *Input) processEvent(ctx context.Context, event Event) { + if i.raw { + if len(i.excludeProviders) > 0 { + simpleEvent, err := event.RenderSimple(i.buffer) + if err != nil { + i.Errorf("Failed to render simple event: %s", err) + return + } + + for _, excludeProvider := range i.excludeProviders { + if simpleEvent.Provider.Name == excludeProvider { + return + } + } + } + + rawEvent, err := event.RenderRaw(i.buffer) + if err != nil { + i.Errorf("Failed to render raw event: %s", err) + return + } + i.sendEventRaw(ctx, rawEvent) + return + } + simpleEvent, err := event.RenderSimple(i.buffer) + if err != nil { + i.Errorf("Failed to render simple event: %s", err) + return + } + + for _, excludeProvider := range i.excludeProviders { + if simpleEvent.Provider.Name == excludeProvider { + return + } + } + + publisher, openPublisherErr := i.publisherCache.get(simpleEvent.Provider.Name) + if openPublisherErr != nil { + i.Warnf("Failed to open the %q event source, respective log entries can't be formatted: %s", simpleEvent.Provider.Name, openPublisherErr) + } + + if !publisher.Valid() { + i.sendEvent(ctx, simpleEvent) + return + } + + formattedEvent, err := event.RenderFormatted(i.buffer, publisher) + if err != nil { + i.Errorf("Failed to render formatted event: %s", err) + i.sendEvent(ctx, simpleEvent) + return + } + + i.sendEvent(ctx, formattedEvent) +} + +// sendEvent will send EventXML as an entry to the operator's output. +func (i *Input) sendEvent(ctx context.Context, eventXML EventXML) { + body := eventXML.parseBody() + entry, err := i.NewEntry(body) + if err != nil { + i.Errorf("Failed to create entry: %s", err) + return + } + + entry.Timestamp = eventXML.parseTimestamp() + entry.Severity = eventXML.parseRenderedSeverity() + i.Write(ctx, entry) +} + +func (i *Input) sendEventRaw(ctx context.Context, eventRaw EventRaw) { + body := eventRaw.parseBody() + entry, err := i.NewEntry(body) + if err != nil { + i.Errorf("Failed to create entry: %s", err) + return + } + + entry.Timestamp = eventRaw.parseTimestamp() + entry.Severity = eventRaw.parseRenderedSeverity() + i.Write(ctx, entry) +} + +// getBookmarkXML will get the bookmark xml from the offsets database. +func (i *Input) getBookmarkOffset(ctx context.Context) (string, error) { + bytes, err := i.persister.Get(ctx, i.channel) + return string(bytes), err +} + +// updateBookmark will update the bookmark xml and save it in the offsets database. +func (i *Input) updateBookmarkOffset(ctx context.Context, event Event) { + if err := i.bookmark.Update(event); err != nil { + i.Errorf("Failed to update bookmark from event: %s", err) + return + } + + bookmarkXML, err := i.bookmark.Render(i.buffer) + if err != nil { + i.Errorf("Failed to render bookmark xml: %s", err) + return + } + + if err := i.persister.Set(ctx, i.channel, []byte(bookmarkXML)); err != nil { + i.Errorf("failed to set offsets: %s", err) + return + } +} diff --git a/pkg/stanza/operator/input/windows/operator.go b/pkg/stanza/operator/input/windows/operator.go deleted file mode 100644 index c34a0db6086d..000000000000 --- a/pkg/stanza/operator/input/windows/operator.go +++ /dev/null @@ -1,311 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:build windows -// +build windows - -package windows // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" - -import ( - "context" - "fmt" - "sync" - "time" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "windows_eventlog_input" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig will return an event log config with default values. -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfig will return an event log config with default values. -func NewConfigWithID(operatorID string) *Config { - return &Config{ - InputConfig: helper.NewInputConfig(operatorID, operatorType), - MaxReads: 100, - StartAt: "end", - PollInterval: 1 * time.Second, - } -} - -// Config is the configuration of a windows event log operator. -type Config struct { - helper.InputConfig `mapstructure:",squash"` - Channel string `mapstructure:"channel"` - MaxReads int `mapstructure:"max_reads,omitempty"` - StartAt string `mapstructure:"start_at,omitempty"` - PollInterval time.Duration `mapstructure:"poll_interval,omitempty"` - Raw bool `mapstructure:"raw,omitempty"` - ExcludeProviders []string `mapstructure:"exclude_providers,omitempty"` -} - -// Build will build a windows event log operator. -func (c *Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - inputOperator, err := c.InputConfig.Build(logger) - if err != nil { - return nil, err - } - - if c.Channel == "" { - return nil, fmt.Errorf("missing required `channel` field") - } - - if c.MaxReads < 1 { - return nil, fmt.Errorf("the `max_reads` field must be greater than zero") - } - - if c.StartAt != "end" && c.StartAt != "beginning" { - return nil, fmt.Errorf("the `start_at` field must be set to `beginning` or `end`") - } - - return &Input{ - InputOperator: inputOperator, - buffer: NewBuffer(), - channel: c.Channel, - maxReads: c.MaxReads, - startAt: c.StartAt, - pollInterval: c.PollInterval, - raw: c.Raw, - excludeProviders: c.ExcludeProviders, - }, nil -} - -// Input is an operator that creates entries using the windows event log api. -type Input struct { - helper.InputOperator - bookmark Bookmark - subscription Subscription - buffer Buffer - channel string - maxReads int - startAt string - raw bool - excludeProviders []string - pollInterval time.Duration - persister operator.Persister - publisherCache publisherCache - cancel context.CancelFunc - wg sync.WaitGroup -} - -// Start will start reading events from a subscription. -func (e *Input) Start(persister operator.Persister) error { - ctx, cancel := context.WithCancel(context.Background()) - e.cancel = cancel - - e.persister = persister - - e.bookmark = NewBookmark() - offsetXML, err := e.getBookmarkOffset(ctx) - if err != nil { - e.Errorf("Failed to open bookmark, continuing without previous bookmark: %s", err) - e.persister.Delete(ctx, e.channel) - } - - if offsetXML != "" { - if err := e.bookmark.Open(offsetXML); err != nil { - return fmt.Errorf("failed to open bookmark: %w", err) - } - } - - e.subscription = NewSubscription() - if err := e.subscription.Open(e.channel, e.startAt, e.bookmark); err != nil { - return fmt.Errorf("failed to open subscription: %w", err) - } - - e.publisherCache = newPublisherCache() - - e.wg.Add(1) - go e.readOnInterval(ctx) - return nil -} - -// Stop will stop reading events from a subscription. -func (e *Input) Stop() error { - e.cancel() - e.wg.Wait() - - if err := e.subscription.Close(); err != nil { - return fmt.Errorf("failed to close subscription: %w", err) - } - - if err := e.bookmark.Close(); err != nil { - return fmt.Errorf("failed to close bookmark: %w", err) - } - - if err := e.publisherCache.evictAll(); err != nil { - return fmt.Errorf("failed to close publishers: %w", err) - } - - return nil -} - -// readOnInterval will read events with respect to the polling interval. -func (e *Input) readOnInterval(ctx context.Context) { - defer e.wg.Done() - - ticker := time.NewTicker(e.pollInterval) - defer ticker.Stop() - - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - e.readToEnd(ctx) - } - } -} - -// readToEnd will read events from the subscription until it reaches the end of the channel. -func (e *Input) readToEnd(ctx context.Context) { - for { - select { - case <-ctx.Done(): - return - default: - if count := e.read(ctx); count == 0 { - return - } - } - } -} - -// read will read events from the subscription. -func (e *Input) read(ctx context.Context) int { - events, err := e.subscription.Read(e.maxReads) - if err != nil { - e.Errorf("Failed to read events from subscription: %s", err) - return 0 - } - - for i, event := range events { - e.processEvent(ctx, event) - if len(events) == i+1 { - e.updateBookmarkOffset(ctx, event) - } - event.Close() - } - - return len(events) -} - -// processEvent will process and send an event retrieved from windows event log. -func (e *Input) processEvent(ctx context.Context, event Event) { - if e.raw { - if len(e.excludeProviders) > 0 { - simpleEvent, err := event.RenderSimple(e.buffer) - if err != nil { - e.Errorf("Failed to render simple event: %s", err) - return - } - - for _, excludeProvider := range e.excludeProviders { - if simpleEvent.Provider.Name == excludeProvider { - return - } - } - } - - rawEvent, err := event.RenderRaw(e.buffer) - if err != nil { - e.Errorf("Failed to render raw event: %s", err) - return - } - e.sendEventRaw(ctx, rawEvent) - return - } - simpleEvent, err := event.RenderSimple(e.buffer) - if err != nil { - e.Errorf("Failed to render simple event: %s", err) - return - } - - for _, excludeProvider := range e.excludeProviders { - if simpleEvent.Provider.Name == excludeProvider { - return - } - } - - publisher, openPublisherErr := e.publisherCache.get(simpleEvent.Provider.Name) - if openPublisherErr != nil { - e.Warnf("Failed to open the %q event source, respective log entries can't be formatted: %s", simpleEvent.Provider.Name, openPublisherErr) - } - - if !publisher.Valid() { - e.sendEvent(ctx, simpleEvent) - return - } - - formattedEvent, err := event.RenderFormatted(e.buffer, publisher) - if err != nil { - e.Errorf("Failed to render formatted event: %s", err) - e.sendEvent(ctx, simpleEvent) - return - } - - e.sendEvent(ctx, formattedEvent) -} - -// sendEvent will send EventXML as an entry to the operator's output. -func (e *Input) sendEvent(ctx context.Context, eventXML EventXML) { - body := eventXML.parseBody() - entry, err := e.NewEntry(body) - if err != nil { - e.Errorf("Failed to create entry: %s", err) - return - } - - entry.Timestamp = eventXML.parseTimestamp() - entry.Severity = eventXML.parseRenderedSeverity() - e.Write(ctx, entry) -} - -func (e *Input) sendEventRaw(ctx context.Context, eventRaw EventRaw) { - body := eventRaw.parseBody() - entry, err := e.NewEntry(body) - if err != nil { - e.Errorf("Failed to create entry: %s", err) - return - } - - entry.Timestamp = eventRaw.parseTimestamp() - entry.Severity = eventRaw.parseRenderedSeverity() - e.Write(ctx, entry) -} - -// getBookmarkXML will get the bookmark xml from the offsets database. -func (e *Input) getBookmarkOffset(ctx context.Context) (string, error) { - bytes, err := e.persister.Get(ctx, e.channel) - return string(bytes), err -} - -// updateBookmark will update the bookmark xml and save it in the offsets database. -func (e *Input) updateBookmarkOffset(ctx context.Context, event Event) { - if err := e.bookmark.Update(event); err != nil { - e.Errorf("Failed to update bookmark from event: %s", err) - return - } - - bookmarkXML, err := e.bookmark.Render(e.buffer) - if err != nil { - e.Errorf("Failed to render bookmark xml: %s", err) - return - } - - if err := e.persister.Set(ctx, e.channel, []byte(bookmarkXML)); err != nil { - e.Errorf("failed to set offsets: %s", err) - return - } -} diff --git a/pkg/stanza/operator/input/windows/os_test.go b/pkg/stanza/operator/input/windows/os_test.go index edc157ee9e2f..0ec3cf17e2e4 100644 --- a/pkg/stanza/operator/input/windows/os_test.go +++ b/pkg/stanza/operator/input/windows/os_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !windows -// +build !windows package windows diff --git a/pkg/stanza/operator/input/windows/package_test.go b/pkg/stanza/operator/input/windows/package_test.go new file mode 100644 index 000000000000..276316ace195 --- /dev/null +++ b/pkg/stanza/operator/input/windows/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package windows + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/input/windows/publisher.go b/pkg/stanza/operator/input/windows/publisher.go index 8000440362e5..31302d8c78a9 100644 --- a/pkg/stanza/operator/input/windows/publisher.go +++ b/pkg/stanza/operator/input/windows/publisher.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package windows // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" diff --git a/pkg/stanza/operator/input/windows/publisher_test.go b/pkg/stanza/operator/input/windows/publisher_test.go index 5fb2dae0ef8c..1a061d976aa5 100644 --- a/pkg/stanza/operator/input/windows/publisher_test.go +++ b/pkg/stanza/operator/input/windows/publisher_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package windows diff --git a/pkg/stanza/operator/input/windows/publishercache.go b/pkg/stanza/operator/input/windows/publishercache.go index e45a0e6bfbc5..d9e08c3e2f98 100644 --- a/pkg/stanza/operator/input/windows/publishercache.go +++ b/pkg/stanza/operator/input/windows/publishercache.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package windows // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" diff --git a/pkg/stanza/operator/input/windows/publishercache_test.go b/pkg/stanza/operator/input/windows/publishercache_test.go index 63f29cb68865..92a2b29f6c63 100644 --- a/pkg/stanza/operator/input/windows/publishercache_test.go +++ b/pkg/stanza/operator/input/windows/publishercache_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package windows @@ -14,7 +13,9 @@ import ( func TestGetValidPublisher(t *testing.T) { publisherCache := newPublisherCache() - defer publisherCache.evictAll() + defer func() { + require.NoError(t, publisherCache.evictAll()) + }() // Provider "Application" exists in all Windows versions. publisher, openPublisherErr := publisherCache.get("Application") @@ -29,7 +30,9 @@ func TestGetValidPublisher(t *testing.T) { func TestGetInvalidPublisher(t *testing.T) { publisherCache := newPublisherCache() - defer publisherCache.evictAll() + defer func() { + require.NoError(t, publisherCache.evictAll()) + }() // Provider "InvalidProvider" does not exist in any Windows version. publisher, openPublisherErr := publisherCache.get("InvalidProvider") @@ -44,7 +47,9 @@ func TestGetInvalidPublisher(t *testing.T) { func TestValidAndInvalidPublishers(t *testing.T) { publisherCache := newPublisherCache() - defer publisherCache.evictAll() + defer func() { + require.NoError(t, publisherCache.evictAll()) + }() // Provider "Application" exists in all Windows versions. publisher, openPublisherErr := publisherCache.get("Application") diff --git a/pkg/stanza/operator/input/windows/subscription.go b/pkg/stanza/operator/input/windows/subscription.go index a08aa1d51ed4..77b6738c27d0 100644 --- a/pkg/stanza/operator/input/windows/subscription.go +++ b/pkg/stanza/operator/input/windows/subscription.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package windows // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" @@ -29,7 +28,9 @@ func (s *Subscription) Open(channel string, startAt string, bookmark Bookmark) e if err != nil { return fmt.Errorf("failed to create signal handle: %w", err) } - defer windows.CloseHandle(signalEvent) + defer func() { + _ = windows.CloseHandle(signalEvent) + }() channelPtr, err := syscall.UTF16PtrFromString(channel) if err != nil { @@ -74,7 +75,7 @@ func (s *Subscription) Read(maxReads int) ([]Event, error) { var eventsRead uint32 err := evtNext(s.handle, uint32(maxReads), &eventHandles[0], 0, 0, &eventsRead) - if err == ErrorInvalidOperation && eventsRead == 0 { + if errors.Is(err, ErrorInvalidOperation) && eventsRead == 0 { return nil, nil } diff --git a/pkg/stanza/operator/output/drop/config.go b/pkg/stanza/operator/output/drop/config.go new file mode 100644 index 000000000000..c1878784a96a --- /dev/null +++ b/pkg/stanza/operator/output/drop/config.go @@ -0,0 +1,41 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package drop // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/drop" + +import ( + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "drop_output" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig("") }) +} + +// NewConfig creates a new drop output config with default values +func NewConfig(operatorID string) *Config { + return &Config{ + OutputConfig: helper.NewOutputConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a drop output operator. +type Config struct { + helper.OutputConfig `mapstructure:",squash"` +} + +// Build will build a drop output operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + outputOperator, err := c.OutputConfig.Build(logger) + if err != nil { + return nil, err + } + + return &Output{ + OutputOperator: outputOperator, + }, nil +} diff --git a/pkg/stanza/operator/output/drop/drop.go b/pkg/stanza/operator/output/drop/drop.go deleted file mode 100644 index 7dcf869bde07..000000000000 --- a/pkg/stanza/operator/output/drop/drop.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package drop // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/drop" - -import ( - "context" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -func init() { - operator.Register("drop_output", func() operator.Builder { return NewConfig("") }) -} - -// NewConfig creates a new drop output config with default values -func NewConfig(operatorID string) *Config { - return &Config{ - OutputConfig: helper.NewOutputConfig(operatorID, "drop_output"), - } -} - -// Config is the configuration of a drop output operator. -type Config struct { - helper.OutputConfig `mapstructure:",squash"` -} - -// Build will build a drop output operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - outputOperator, err := c.OutputConfig.Build(logger) - if err != nil { - return nil, err - } - - return &Output{ - OutputOperator: outputOperator, - }, nil -} - -// Output is an operator that consumes and ignores incoming entries. -type Output struct { - helper.OutputOperator -} - -// Process will drop the incoming entry. -func (p *Output) Process(_ context.Context, _ *entry.Entry) error { - return nil -} diff --git a/pkg/stanza/operator/output/drop/output.go b/pkg/stanza/operator/output/drop/output.go new file mode 100644 index 000000000000..c808359a99d3 --- /dev/null +++ b/pkg/stanza/operator/output/drop/output.go @@ -0,0 +1,21 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package drop // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/drop" + +import ( + "context" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Output is an operator that consumes and ignores incoming entries. +type Output struct { + helper.OutputOperator +} + +// Process will drop the incoming entry. +func (o *Output) Process(_ context.Context, _ *entry.Entry) error { + return nil +} diff --git a/pkg/stanza/operator/output/drop/drop_test.go b/pkg/stanza/operator/output/drop/output_test.go similarity index 100% rename from pkg/stanza/operator/output/drop/drop_test.go rename to pkg/stanza/operator/output/drop/output_test.go diff --git a/pkg/stanza/operator/output/drop/package_test.go b/pkg/stanza/operator/output/drop/package_test.go new file mode 100644 index 000000000000..1846f192ec24 --- /dev/null +++ b/pkg/stanza/operator/output/drop/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package drop + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/output/file/config.go b/pkg/stanza/operator/output/file/config.go new file mode 100644 index 000000000000..17e97f44a036 --- /dev/null +++ b/pkg/stanza/operator/output/file/config.go @@ -0,0 +1,61 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package file // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/file" + +import ( + "fmt" + "html/template" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "file_output" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig("") }) +} + +// NewConfig creates a new file output config with default values +func NewConfig(operatorID string) *Config { + return &Config{ + OutputConfig: helper.NewOutputConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a file output operatorn. +type Config struct { + helper.OutputConfig `mapstructure:",squash"` + + Path string `mapstructure:"path"` + Format string `mapstructure:"format"` +} + +// Build will build a file output operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + outputOperator, err := c.OutputConfig.Build(logger) + if err != nil { + return nil, err + } + + var tmpl *template.Template + if c.Format != "" { + tmpl, err = template.New("file").Parse(c.Format) + if err != nil { + return nil, err + } + } + + if c.Path == "" { + return nil, fmt.Errorf("must provide a path to output to") + } + + return &Output{ + OutputOperator: outputOperator, + path: c.Path, + tmpl: tmpl, + }, nil +} diff --git a/pkg/stanza/operator/output/file/file.go b/pkg/stanza/operator/output/file/file.go deleted file mode 100644 index 7bd676446627..000000000000 --- a/pkg/stanza/operator/output/file/file.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package file // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/file" - -import ( - "context" - "encoding/json" - "fmt" - "html/template" - "os" - "sync" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -func init() { - operator.Register("file_output", func() operator.Builder { return NewConfig("") }) -} - -// NewConfig creates a new file output config with default values -func NewConfig(operatorID string) *Config { - return &Config{ - OutputConfig: helper.NewOutputConfig(operatorID, "file_output"), - } -} - -// Config is the configuration of a file output operatorn. -type Config struct { - helper.OutputConfig `mapstructure:",squash"` - - Path string `mapstructure:"path"` - Format string `mapstructure:"format"` -} - -// Build will build a file output operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - outputOperator, err := c.OutputConfig.Build(logger) - if err != nil { - return nil, err - } - - var tmpl *template.Template - if c.Format != "" { - tmpl, err = template.New("file").Parse(c.Format) - if err != nil { - return nil, err - } - } - - if c.Path == "" { - return nil, fmt.Errorf("must provide a path to output to") - } - - return &Output{ - OutputOperator: outputOperator, - path: c.Path, - tmpl: tmpl, - }, nil -} - -// Output is an operator that writes logs to a file. -type Output struct { - helper.OutputOperator - - path string - tmpl *template.Template - encoder *json.Encoder - file *os.File - mux sync.Mutex -} - -// Start will open the output file. -func (fo *Output) Start(_ operator.Persister) error { - var err error - fo.file, err = os.OpenFile(fo.path, os.O_RDWR|os.O_APPEND|os.O_CREATE, 0600) - if err != nil { - return err - } - - fo.encoder = json.NewEncoder(fo.file) - fo.encoder.SetEscapeHTML(false) - - return nil -} - -// Stop will close the output file. -func (fo *Output) Stop() error { - if fo.file != nil { - if err := fo.file.Close(); err != nil { - fo.Errorf(err.Error()) - } - } - return nil -} - -// Process will write an entry to the output file. -func (fo *Output) Process(_ context.Context, entry *entry.Entry) error { - fo.mux.Lock() - defer fo.mux.Unlock() - - if fo.tmpl != nil { - err := fo.tmpl.Execute(fo.file, entry) - if err != nil { - return err - } - } else { - err := fo.encoder.Encode(entry) - if err != nil { - return err - } - } - - return nil -} diff --git a/pkg/stanza/operator/output/file/output.go b/pkg/stanza/operator/output/file/output.go new file mode 100644 index 000000000000..e84544b468a4 --- /dev/null +++ b/pkg/stanza/operator/output/file/output.go @@ -0,0 +1,71 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package file // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/file" + +import ( + "context" + "encoding/json" + "html/template" + "os" + "sync" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Output is an operator that writes logs to a file. +type Output struct { + helper.OutputOperator + + path string + tmpl *template.Template + encoder *json.Encoder + file *os.File + mux sync.Mutex +} + +// Start will open the output file. +func (o *Output) Start(_ operator.Persister) error { + var err error + o.file, err = os.OpenFile(o.path, os.O_RDWR|os.O_APPEND|os.O_CREATE, 0600) + if err != nil { + return err + } + + o.encoder = json.NewEncoder(o.file) + o.encoder.SetEscapeHTML(false) + + return nil +} + +// Stop will close the output file. +func (o *Output) Stop() error { + if o.file != nil { + if err := o.file.Close(); err != nil { + o.Errorf(err.Error()) + } + } + return nil +} + +// Process will write an entry to the output file. +func (o *Output) Process(_ context.Context, entry *entry.Entry) error { + o.mux.Lock() + defer o.mux.Unlock() + + if o.tmpl != nil { + err := o.tmpl.Execute(o.file, entry) + if err != nil { + return err + } + } else { + err := o.encoder.Encode(entry) + if err != nil { + return err + } + } + + return nil +} diff --git a/pkg/stanza/operator/output/stdout/config.go b/pkg/stanza/operator/output/stdout/config.go new file mode 100644 index 000000000000..a3e361c8c92f --- /dev/null +++ b/pkg/stanza/operator/output/stdout/config.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package stdout // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/stdout" + +import ( + "encoding/json" + "io" + "os" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "stdout" + +// Stdout is a global handle to standard output +var Stdout io.Writer = os.Stdout + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig("") }) +} + +// NewConfig creates a new stdout config with default values +func NewConfig(operatorID string) *Config { + return &Config{ + OutputConfig: helper.NewOutputConfig(operatorID, operatorType), + } +} + +// Config is the configuration of the Stdout operator +type Config struct { + helper.OutputConfig `mapstructure:",squash"` +} + +// Build will build a stdout operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + outputOperator, err := c.OutputConfig.Build(logger) + if err != nil { + return nil, err + } + + return &Output{ + OutputOperator: outputOperator, + encoder: json.NewEncoder(Stdout), + }, nil +} diff --git a/pkg/stanza/operator/output/stdout/output.go b/pkg/stanza/operator/output/stdout/output.go new file mode 100644 index 000000000000..4107441049e5 --- /dev/null +++ b/pkg/stanza/operator/output/stdout/output.go @@ -0,0 +1,33 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package stdout // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/stdout" + +import ( + "context" + "encoding/json" + "sync" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Output is an operator that logs entries using stdout. +type Output struct { + helper.OutputOperator + encoder *json.Encoder + mux sync.Mutex +} + +// Process will log entries received. +func (o *Output) Process(_ context.Context, entry *entry.Entry) error { + o.mux.Lock() + err := o.encoder.Encode(entry) + if err != nil { + o.mux.Unlock() + o.Errorf("Failed to process entry: %s", err) + return err + } + o.mux.Unlock() + return nil +} diff --git a/pkg/stanza/operator/output/stdout/stdout_test.go b/pkg/stanza/operator/output/stdout/output_test.go similarity index 100% rename from pkg/stanza/operator/output/stdout/stdout_test.go rename to pkg/stanza/operator/output/stdout/output_test.go diff --git a/pkg/stanza/operator/output/stdout/package_test.go b/pkg/stanza/operator/output/stdout/package_test.go new file mode 100644 index 000000000000..003776a59ad3 --- /dev/null +++ b/pkg/stanza/operator/output/stdout/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package stdout + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/output/stdout/stdout.go b/pkg/stanza/operator/output/stdout/stdout.go deleted file mode 100644 index ec1d23814685..000000000000 --- a/pkg/stanza/operator/output/stdout/stdout.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package stdout // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/stdout" - -import ( - "context" - "encoding/json" - "io" - "os" - "sync" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -// Stdout is a global handle to standard output -var Stdout io.Writer = os.Stdout - -func init() { - operator.Register("stdout", func() operator.Builder { return NewConfig("") }) -} - -// NewConfig creates a new stdout config with default values -func NewConfig(operatorID string) *Config { - return &Config{ - OutputConfig: helper.NewOutputConfig(operatorID, "stdout"), - } -} - -// Config is the configuration of the Stdout operator -type Config struct { - helper.OutputConfig `mapstructure:",squash"` -} - -// Build will build a stdout operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - outputOperator, err := c.OutputConfig.Build(logger) - if err != nil { - return nil, err - } - - return &Output{ - OutputOperator: outputOperator, - encoder: json.NewEncoder(Stdout), - }, nil -} - -// Output is an operator that logs entries using stdout. -type Output struct { - helper.OutputOperator - encoder *json.Encoder - mux sync.Mutex -} - -// Process will log entries received. -func (o *Output) Process(_ context.Context, entry *entry.Entry) error { - o.mux.Lock() - err := o.encoder.Encode(entry) - if err != nil { - o.mux.Unlock() - o.Errorf("Failed to process entry: %s, $s", err, entry.Body) - return err - } - o.mux.Unlock() - return nil -} diff --git a/pkg/stanza/operator/package_test.go b/pkg/stanza/operator/package_test.go new file mode 100644 index 000000000000..8faa4024c803 --- /dev/null +++ b/pkg/stanza/operator/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package operator + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/parser/csv/config.go b/pkg/stanza/operator/parser/csv/config.go new file mode 100644 index 000000000000..941f418bf7a8 --- /dev/null +++ b/pkg/stanza/operator/parser/csv/config.go @@ -0,0 +1,99 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package csv // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/csv" + +import ( + "errors" + "fmt" + "strings" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "csv_parser" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new csv parser config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new csv parser config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + ParserConfig: helper.NewParserConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a csv parser operator. +type Config struct { + helper.ParserConfig `mapstructure:",squash"` + + Header string `mapstructure:"header"` + HeaderDelimiter string `mapstructure:"header_delimiter"` + HeaderAttribute string `mapstructure:"header_attribute"` + FieldDelimiter string `mapstructure:"delimiter"` + LazyQuotes bool `mapstructure:"lazy_quotes"` + IgnoreQuotes bool `mapstructure:"ignore_quotes"` +} + +// Build will build a csv parser operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + parserOperator, err := c.ParserConfig.Build(logger) + if err != nil { + return nil, err + } + + if c.FieldDelimiter == "" { + c.FieldDelimiter = "," + } + + if c.HeaderDelimiter == "" { + c.HeaderDelimiter = c.FieldDelimiter + } + + if c.IgnoreQuotes && c.LazyQuotes { + return nil, errors.New("only one of 'ignore_quotes' or 'lazy_quotes' can be true") + } + + if len([]rune(c.FieldDelimiter)) != 1 { + return nil, fmt.Errorf("invalid 'delimiter': '%s'", c.FieldDelimiter) + } + + if len([]rune(c.HeaderDelimiter)) != 1 { + return nil, fmt.Errorf("invalid 'header_delimiter': '%s'", c.HeaderDelimiter) + } + + if c.Header == "" && c.HeaderAttribute == "" { + return nil, errors.New("missing required field 'header' or 'header_attribute'") + } + + if c.Header != "" && c.HeaderAttribute != "" { + return nil, errors.New("only one header parameter can be set: 'header' or 'header_attribute'") + } + + if c.Header != "" && !strings.Contains(c.Header, c.HeaderDelimiter) { + return nil, errors.New("missing field delimiter in header") + } + + p := &Parser{ + ParserOperator: parserOperator, + headerAttribute: c.HeaderAttribute, + fieldDelimiter: []rune(c.FieldDelimiter)[0], + headerDelimiter: []rune(c.HeaderDelimiter)[0], + lazyQuotes: c.LazyQuotes, + ignoreQuotes: c.IgnoreQuotes, + } + + if c.Header != "" { + p.parse = generateParseFunc(strings.Split(c.Header, c.HeaderDelimiter), p.fieldDelimiter, c.LazyQuotes, c.IgnoreQuotes) + } + + return p, nil +} diff --git a/pkg/stanza/operator/parser/csv/csv.go b/pkg/stanza/operator/parser/csv/csv.go deleted file mode 100644 index 7829f8e8c592..000000000000 --- a/pkg/stanza/operator/parser/csv/csv.go +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 -package csv // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/csv" - -import ( - "context" - csvparser "encoding/csv" - "errors" - "fmt" - "io" - "strings" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "csv_parser" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new csv parser config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new csv parser config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - ParserConfig: helper.NewParserConfig(operatorID, operatorType), - } -} - -// Config is the configuration of a csv parser operator. -type Config struct { - helper.ParserConfig `mapstructure:",squash"` - - Header string `mapstructure:"header"` - HeaderDelimiter string `mapstructure:"header_delimiter"` - HeaderAttribute string `mapstructure:"header_attribute"` - FieldDelimiter string `mapstructure:"delimiter"` - LazyQuotes bool `mapstructure:"lazy_quotes"` - IgnoreQuotes bool `mapstructure:"ignore_quotes"` -} - -// Build will build a csv parser operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - parserOperator, err := c.ParserConfig.Build(logger) - if err != nil { - return nil, err - } - - if c.FieldDelimiter == "" { - c.FieldDelimiter = "," - } - - if c.HeaderDelimiter == "" { - c.HeaderDelimiter = c.FieldDelimiter - } - - if c.IgnoreQuotes && c.LazyQuotes { - return nil, errors.New("only one of 'ignore_quotes' or 'lazy_quotes' can be true") - } - - fieldDelimiter := []rune(c.FieldDelimiter)[0] - headerDelimiter := []rune(c.HeaderDelimiter)[0] - - if len([]rune(c.FieldDelimiter)) != 1 { - return nil, fmt.Errorf("invalid 'delimiter': '%s'", c.FieldDelimiter) - } - - if len([]rune(c.HeaderDelimiter)) != 1 { - return nil, fmt.Errorf("invalid 'header_delimiter': '%s'", c.HeaderDelimiter) - } - - var headers []string - switch { - case c.Header == "" && c.HeaderAttribute == "": - return nil, errors.New("missing required field 'header' or 'header_attribute'") - case c.Header != "" && c.HeaderAttribute != "": - return nil, errors.New("only one header parameter can be set: 'header' or 'header_attribute'") - case c.Header != "" && !strings.Contains(c.Header, c.HeaderDelimiter): - return nil, errors.New("missing field delimiter in header") - case c.Header != "": - headers = strings.Split(c.Header, c.HeaderDelimiter) - } - - return &Parser{ - ParserOperator: parserOperator, - header: headers, - headerAttribute: c.HeaderAttribute, - fieldDelimiter: fieldDelimiter, - headerDelimiter: headerDelimiter, - lazyQuotes: c.LazyQuotes, - ignoreQuotes: c.IgnoreQuotes, - parse: generateParseFunc(headers, fieldDelimiter, c.LazyQuotes, c.IgnoreQuotes), - }, nil -} - -// Parser is an operator that parses csv in an entry. -type Parser struct { - helper.ParserOperator - fieldDelimiter rune - headerDelimiter rune - header []string - headerAttribute string - lazyQuotes bool - ignoreQuotes bool - parse parseFunc -} - -type parseFunc func(any) (any, error) - -// Process will parse an entry for csv. -func (r *Parser) Process(ctx context.Context, e *entry.Entry) error { - parse := r.parse - - // If we have a headerAttribute set we need to dynamically generate our parser function - if r.headerAttribute != "" { - h, ok := e.Attributes[r.headerAttribute] - if !ok { - err := fmt.Errorf("failed to read dynamic header attribute %s", r.headerAttribute) - r.Error(err) - return err - } - headerString, ok := h.(string) - if !ok { - err := fmt.Errorf("header is expected to be a string but is %T", h) - r.Error(err) - return err - } - headers := strings.Split(headerString, string([]rune{r.headerDelimiter})) - parse = generateParseFunc(headers, r.fieldDelimiter, r.lazyQuotes, r.ignoreQuotes) - } - - return r.ParserOperator.ProcessWith(ctx, e, parse) -} - -// generateParseFunc returns a parse function for a given header, allowing -// each entry to have a potentially unique set of fields when using dynamic -// field names retrieved from an entry's attribute -func generateParseFunc(headers []string, fieldDelimiter rune, lazyQuotes bool, ignoreQuotes bool) parseFunc { - if ignoreQuotes { - return generateSplitParseFunc(headers, fieldDelimiter) - } - return generateCSVParseFunc(headers, fieldDelimiter, lazyQuotes) -} - -// generateCSVParseFunc returns a parse function for a given header and field delimiter, which parses a line of CSV text. -func generateCSVParseFunc(headers []string, fieldDelimiter rune, lazyQuotes bool) parseFunc { - return func(value any) (any, error) { - csvLine, err := valueAsString(value) - if err != nil { - return nil, err - } - - reader := csvparser.NewReader(strings.NewReader(csvLine)) - reader.Comma = fieldDelimiter - reader.FieldsPerRecord = len(headers) - reader.LazyQuotes = lazyQuotes - - // Typically only need one - lines := make([][]string, 0, 1) - for { - line, err := reader.Read() - if errors.Is(err, io.EOF) { - break - } - - if err != nil && len(line) == 0 { - return nil, errors.New("failed to parse entry") - } - - lines = append(lines, line) - } - - /* - This parser is parsing a single value, which came from a single log entry. - Therefore, if there are multiple lines here, it should be assumed that each - subsequent line contains a continuation of the last field in the previous line. - - Given a file w/ headers "A,B,C,D,E" and contents "aa,b\nb,cc,d\nd,ee", - expect reader.Read() to return bodies: - - ["aa","b"] - - ["b","cc","d"] - - ["d","ee"] - */ - - joinedLine := lines[0] - for i := 1; i < len(lines); i++ { - nextLine := lines[i] - - // The first element of the next line is a continuation of the previous line's last element - joinedLine[len(joinedLine)-1] += "\n" + nextLine[0] - - // The remainder are separate elements - for n := 1; n < len(nextLine); n++ { - joinedLine = append(joinedLine, nextLine[n]) - } - } - - return headersMap(headers, joinedLine) - } -} - -// generateSplitParseFunc returns a parse function (which ignores quotes) for a given header and field delimiter. -func generateSplitParseFunc(headers []string, fieldDelimiter rune) parseFunc { - return func(value any) (any, error) { - csvLine, err := valueAsString(value) - if err != nil { - return nil, err - } - - // This parse function does not do any special quote handling; Splitting on the delimiter is sufficient. - fields := strings.Split(csvLine, string(fieldDelimiter)) - return headersMap(headers, fields) - } -} - -// valueAsString interprets the given value as a string. -func valueAsString(value any) (string, error) { - var s string - switch t := value.(type) { - case string: - s += t - case []byte: - s += string(t) - default: - return s, fmt.Errorf("type '%T' cannot be parsed as csv", value) - } - - return s, nil -} - -// headersMap creates a map of headers[i] -> fields[i]. -func headersMap(headers []string, fields []string) (map[string]any, error) { - parsedValues := make(map[string]any) - - if len(fields) != len(headers) { - return nil, fmt.Errorf("wrong number of fields: expected %d, found %d", len(headers), len(fields)) - } - - for i, val := range fields { - parsedValues[headers[i]] = val - } - return parsedValues, nil -} diff --git a/pkg/stanza/operator/parser/csv/package_test.go b/pkg/stanza/operator/parser/csv/package_test.go new file mode 100644 index 000000000000..9a31834bc900 --- /dev/null +++ b/pkg/stanza/operator/parser/csv/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package csv + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/parser/csv/parser.go b/pkg/stanza/operator/parser/csv/parser.go new file mode 100644 index 000000000000..da774dec0378 --- /dev/null +++ b/pkg/stanza/operator/parser/csv/parser.go @@ -0,0 +1,107 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package csv // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/csv" + +import ( + "context" + "fmt" + "strings" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/parseutils" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Parser is an operator that parses csv in an entry. +type Parser struct { + helper.ParserOperator + fieldDelimiter rune + headerDelimiter rune + headerAttribute string + lazyQuotes bool + ignoreQuotes bool + parse parseFunc +} + +type parseFunc func(any) (any, error) + +// Process will parse an entry for csv. +func (p *Parser) Process(ctx context.Context, e *entry.Entry) error { + // Static parse function + if p.parse != nil { + return p.ParserOperator.ProcessWith(ctx, e, p.parse) + } + + // Dynamically generate the parse function based on a header attribute + h, ok := e.Attributes[p.headerAttribute] + if !ok { + err := fmt.Errorf("failed to read dynamic header attribute %s", p.headerAttribute) + p.Error(err) + return err + } + headerString, ok := h.(string) + if !ok { + err := fmt.Errorf("header is expected to be a string but is %T", h) + p.Error(err) + return err + } + headers := strings.Split(headerString, string([]rune{p.headerDelimiter})) + parse := generateParseFunc(headers, p.fieldDelimiter, p.lazyQuotes, p.ignoreQuotes) + return p.ParserOperator.ProcessWith(ctx, e, parse) +} + +// generateParseFunc returns a parse function for a given header, allowing +// each entry to have a potentially unique set of fields when using dynamic +// field names retrieved from an entry's attribute +func generateParseFunc(headers []string, fieldDelimiter rune, lazyQuotes bool, ignoreQuotes bool) parseFunc { + if ignoreQuotes { + return generateSplitParseFunc(headers, fieldDelimiter) + } + return generateCSVParseFunc(headers, fieldDelimiter, lazyQuotes) +} + +// generateCSVParseFunc returns a parse function for a given header and field delimiter, which parses a line of CSV text. +func generateCSVParseFunc(headers []string, fieldDelimiter rune, lazyQuotes bool) parseFunc { + return func(value any) (any, error) { + csvLine, err := valueAsString(value) + if err != nil { + return nil, err + } + + joinedLine, err := parseutils.ReadCSVRow(csvLine, fieldDelimiter, lazyQuotes) + if err != nil { + return nil, err + } + + return parseutils.MapCSVHeaders(headers, joinedLine) + } +} + +// generateSplitParseFunc returns a parse function (which ignores quotes) for a given header and field delimiter. +func generateSplitParseFunc(headers []string, fieldDelimiter rune) parseFunc { + return func(value any) (any, error) { + csvLine, err := valueAsString(value) + if err != nil { + return nil, err + } + + // This parse function does not do any special quote handling; Splitting on the delimiter is sufficient. + fields := strings.Split(csvLine, string(fieldDelimiter)) + return parseutils.MapCSVHeaders(headers, fields) + } +} + +// valueAsString interprets the given value as a string. +func valueAsString(value any) (string, error) { + var s string + switch t := value.(type) { + case string: + s += t + case []byte: + s += string(t) + default: + return s, fmt.Errorf("type '%T' cannot be parsed as csv", value) + } + + return s, nil +} diff --git a/pkg/stanza/operator/parser/csv/csv_test.go b/pkg/stanza/operator/parser/csv/parser_test.go similarity index 100% rename from pkg/stanza/operator/parser/csv/csv_test.go rename to pkg/stanza/operator/parser/csv/parser_test.go diff --git a/pkg/stanza/operator/parser/json/config.go b/pkg/stanza/operator/parser/json/config.go new file mode 100644 index 000000000000..42595239f466 --- /dev/null +++ b/pkg/stanza/operator/parser/json/config.go @@ -0,0 +1,48 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package json // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/json" + +import ( + jsoniter "github.com/json-iterator/go" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "json_parser" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new JSON parser config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new JSON parser config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + ParserConfig: helper.NewParserConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a JSON parser operator. +type Config struct { + helper.ParserConfig `mapstructure:",squash"` +} + +// Build will build a JSON parser operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + parserOperator, err := c.ParserConfig.Build(logger) + if err != nil { + return nil, err + } + + return &Parser{ + ParserOperator: parserOperator, + json: jsoniter.ConfigFastest, + }, nil +} diff --git a/pkg/stanza/operator/parser/json/json.go b/pkg/stanza/operator/parser/json/json.go deleted file mode 100644 index b5e278f551d9..000000000000 --- a/pkg/stanza/operator/parser/json/json.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package json // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/json" - -import ( - "context" - "fmt" - - jsoniter "github.com/json-iterator/go" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "json_parser" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new JSON parser config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new JSON parser config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - ParserConfig: helper.NewParserConfig(operatorID, operatorType), - } -} - -// Config is the configuration of a JSON parser operator. -type Config struct { - helper.ParserConfig `mapstructure:",squash"` -} - -// Build will build a JSON parser operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - parserOperator, err := c.ParserConfig.Build(logger) - if err != nil { - return nil, err - } - - return &Parser{ - ParserOperator: parserOperator, - json: jsoniter.ConfigFastest, - }, nil -} - -// Parser is an operator that parses JSON. -type Parser struct { - helper.ParserOperator - json jsoniter.API -} - -// Process will parse an entry for JSON. -func (j *Parser) Process(ctx context.Context, entry *entry.Entry) error { - return j.ParserOperator.ProcessWith(ctx, entry, j.parse) -} - -// parse will parse a value as JSON. -func (j *Parser) parse(value any) (any, error) { - var parsedValue map[string]any - switch m := value.(type) { - case string: - err := j.json.UnmarshalFromString(m, &parsedValue) - if err != nil { - return nil, err - } - default: - return nil, fmt.Errorf("type %T cannot be parsed as JSON", value) - } - return parsedValue, nil -} diff --git a/pkg/stanza/operator/parser/json/json_test.go b/pkg/stanza/operator/parser/json/json_test.go deleted file mode 100644 index ec353b0f7850..000000000000 --- a/pkg/stanza/operator/parser/json/json_test.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package json - -import ( - "context" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" -) - -func newTestParser(t *testing.T) *Parser { - config := NewConfigWithID("test") - op, err := config.Build(testutil.Logger(t)) - require.NoError(t, err) - return op.(*Parser) -} - -func TestConfigBuild(t *testing.T) { - config := NewConfigWithID("test") - op, err := config.Build(testutil.Logger(t)) - require.NoError(t, err) - require.IsType(t, &Parser{}, op) -} - -func TestConfigBuildFailure(t *testing.T) { - config := NewConfigWithID("test") - config.OnError = "invalid_on_error" - _, err := config.Build(testutil.Logger(t)) - require.Error(t, err) - require.Contains(t, err.Error(), "invalid `on_error` field") -} - -func TestParserStringFailure(t *testing.T) { - parser := newTestParser(t) - _, err := parser.parse("invalid") - require.Error(t, err) - require.Contains(t, err.Error(), "error found in #1 byte") -} - -func TestParserByteFailure(t *testing.T) { - parser := newTestParser(t) - _, err := parser.parse([]byte("invalid")) - require.Error(t, err) - require.Contains(t, err.Error(), "type []uint8 cannot be parsed as JSON") -} - -func TestParserInvalidType(t *testing.T) { - parser := newTestParser(t) - _, err := parser.parse([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type []int cannot be parsed as JSON") -} - -func TestJSONImplementations(t *testing.T) { - require.Implements(t, (*operator.Operator)(nil), new(Parser)) -} - -func TestParser(t *testing.T) { - cases := []struct { - name string - configure func(*Config) - input *entry.Entry - expect *entry.Entry - }{ - { - "simple", - func(p *Config) {}, - &entry.Entry{ - Body: `{}`, - }, - &entry.Entry{ - Attributes: map[string]any{}, - Body: `{}`, - }, - }, - { - "nested", - func(p *Config) {}, - &entry.Entry{ - Body: `{"superkey":"superval"}`, - }, - &entry.Entry{ - Attributes: map[string]any{ - "superkey": "superval", - }, - Body: `{"superkey":"superval"}`, - }, - }, - { - "with_timestamp", - func(p *Config) { - parseFrom := entry.NewAttributeField("timestamp") - p.TimeParser = &helper.TimeParser{ - ParseFrom: &parseFrom, - LayoutType: "epoch", - Layout: "s", - } - }, - &entry.Entry{ - Body: `{"superkey":"superval","timestamp":1136214245}`, - }, - &entry.Entry{ - Attributes: map[string]any{ - "superkey": "superval", - "timestamp": float64(1136214245), - }, - Body: `{"superkey":"superval","timestamp":1136214245}`, - Timestamp: time.Unix(1136214245, 0), - }, - }, - { - "with_scope", - func(p *Config) { - p.ScopeNameParser = &helper.ScopeNameParser{ - ParseFrom: entry.NewAttributeField("logger_name"), - } - }, - &entry.Entry{ - Body: `{"superkey":"superval","logger_name":"logger"}`, - }, - &entry.Entry{ - Attributes: map[string]any{ - "superkey": "superval", - "logger_name": "logger", - }, - Body: `{"superkey":"superval","logger_name":"logger"}`, - ScopeName: "logger", - }, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - cfg := NewConfigWithID("test") - cfg.OutputIDs = []string{"fake"} - tc.configure(cfg) - - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - - fake := testutil.NewFakeOutput(t) - require.NoError(t, op.SetOutputs([]operator.Operator{fake})) - - ots := time.Now() - tc.input.ObservedTimestamp = ots - tc.expect.ObservedTimestamp = ots - - err = op.Process(context.Background(), tc.input) - require.NoError(t, err) - fake.ExpectEntry(t, tc.expect) - }) - } -} diff --git a/pkg/stanza/operator/parser/json/package_test.go b/pkg/stanza/operator/parser/json/package_test.go new file mode 100644 index 000000000000..0a3664f879a1 --- /dev/null +++ b/pkg/stanza/operator/parser/json/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package json + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/parser/json/parser.go b/pkg/stanza/operator/parser/json/parser.go new file mode 100644 index 000000000000..429a49c6ecca --- /dev/null +++ b/pkg/stanza/operator/parser/json/parser.go @@ -0,0 +1,40 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package json // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/json" + +import ( + "context" + "fmt" + + jsoniter "github.com/json-iterator/go" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Parser is an operator that parses JSON. +type Parser struct { + helper.ParserOperator + json jsoniter.API +} + +// Process will parse an entry for JSON. +func (p *Parser) Process(ctx context.Context, entry *entry.Entry) error { + return p.ParserOperator.ProcessWith(ctx, entry, p.parse) +} + +// parse will parse a value as JSON. +func (p *Parser) parse(value any) (any, error) { + var parsedValue map[string]any + switch m := value.(type) { + case string: + err := p.json.UnmarshalFromString(m, &parsedValue) + if err != nil { + return nil, err + } + default: + return nil, fmt.Errorf("type %T cannot be parsed as JSON", value) + } + return parsedValue, nil +} diff --git a/pkg/stanza/operator/parser/json/parser_test.go b/pkg/stanza/operator/parser/json/parser_test.go new file mode 100644 index 000000000000..17380dbe3828 --- /dev/null +++ b/pkg/stanza/operator/parser/json/parser_test.go @@ -0,0 +1,161 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package json + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +func newTestParser(t *testing.T) *Parser { + config := NewConfigWithID("test") + op, err := config.Build(testutil.Logger(t)) + require.NoError(t, err) + return op.(*Parser) +} + +func TestConfigBuild(t *testing.T) { + config := NewConfigWithID("test") + op, err := config.Build(testutil.Logger(t)) + require.NoError(t, err) + require.IsType(t, &Parser{}, op) +} + +func TestConfigBuildFailure(t *testing.T) { + config := NewConfigWithID("test") + config.OnError = "invalid_on_error" + _, err := config.Build(testutil.Logger(t)) + require.Error(t, err) + require.Contains(t, err.Error(), "invalid `on_error` field") +} + +func TestParserStringFailure(t *testing.T) { + parser := newTestParser(t) + _, err := parser.parse("invalid") + require.Error(t, err) + require.Contains(t, err.Error(), "error found in #1 byte") +} + +func TestParserByteFailure(t *testing.T) { + parser := newTestParser(t) + _, err := parser.parse([]byte("invalid")) + require.Error(t, err) + require.Contains(t, err.Error(), "type []uint8 cannot be parsed as JSON") +} + +func TestParserInvalidType(t *testing.T) { + parser := newTestParser(t) + _, err := parser.parse([]int{}) + require.Error(t, err) + require.Contains(t, err.Error(), "type []int cannot be parsed as JSON") +} + +func TestJSONImplementations(t *testing.T) { + require.Implements(t, (*operator.Operator)(nil), new(Parser)) +} + +func TestParser(t *testing.T) { + cases := []struct { + name string + configure func(*Config) + input *entry.Entry + expect *entry.Entry + }{ + { + "simple", + func(_ *Config) {}, + &entry.Entry{ + Body: `{}`, + }, + &entry.Entry{ + Attributes: map[string]any{}, + Body: `{}`, + }, + }, + { + "nested", + func(_ *Config) {}, + &entry.Entry{ + Body: `{"superkey":"superval"}`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "superkey": "superval", + }, + Body: `{"superkey":"superval"}`, + }, + }, + { + "with_timestamp", + func(p *Config) { + parseFrom := entry.NewAttributeField("timestamp") + p.TimeParser = &helper.TimeParser{ + ParseFrom: &parseFrom, + LayoutType: "epoch", + Layout: "s", + } + }, + &entry.Entry{ + Body: `{"superkey":"superval","timestamp":1136214245}`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "superkey": "superval", + "timestamp": float64(1136214245), + }, + Body: `{"superkey":"superval","timestamp":1136214245}`, + Timestamp: time.Unix(1136214245, 0), + }, + }, + { + "with_scope", + func(p *Config) { + p.ScopeNameParser = &helper.ScopeNameParser{ + ParseFrom: entry.NewAttributeField("logger_name"), + } + }, + &entry.Entry{ + Body: `{"superkey":"superval","logger_name":"logger"}`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "superkey": "superval", + "logger_name": "logger", + }, + Body: `{"superkey":"superval","logger_name":"logger"}`, + ScopeName: "logger", + }, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + cfg := NewConfigWithID("test") + cfg.OutputIDs = []string{"fake"} + tc.configure(cfg) + + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + + fake := testutil.NewFakeOutput(t) + require.NoError(t, op.SetOutputs([]operator.Operator{fake})) + + ots := time.Now() + tc.input.ObservedTimestamp = ots + tc.expect.ObservedTimestamp = ots + + err = op.Process(context.Background(), tc.input) + require.NoError(t, err) + fake.ExpectEntry(t, tc.expect) + }) + } +} diff --git a/pkg/stanza/operator/parser/jsonarray/config.go b/pkg/stanza/operator/parser/jsonarray/config.go new file mode 100644 index 000000000000..f046aed64299 --- /dev/null +++ b/pkg/stanza/operator/parser/jsonarray/config.go @@ -0,0 +1,70 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package jsonarray // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/jsonarray" + +import ( + "strings" + + "github.com/valyala/fastjson" + "go.opentelemetry.io/collector/featuregate" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const ( + operatorType = "json_array_parser" + headerDelimiter = "," +) + +var jsonArrayParserFeatureGate = featuregate.GlobalRegistry().MustRegister( + "logs.jsonParserArray", + featuregate.StageAlpha, + featuregate.WithRegisterDescription("When enabled, allows usage of `json_array_parser`."), + featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30321"), +) + +func init() { + if jsonArrayParserFeatureGate.IsEnabled() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) + } +} + +// NewConfig creates a new json array parser config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new json array parser config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + ParserConfig: helper.NewParserConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a json array parser operator. +type Config struct { + helper.ParserConfig `mapstructure:",squash"` + Header string `mapstructure:"header"` +} + +// Build will build a json array parser operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + parserOperator, err := c.ParserConfig.Build(logger) + if err != nil { + return nil, err + } + + if c.Header != "" { + return &Parser{ + ParserOperator: parserOperator, + parse: generateParseToMapFunc(new(fastjson.ParserPool), strings.Split(c.Header, headerDelimiter)), + }, nil + } + + return &Parser{ + ParserOperator: parserOperator, + parse: generateParseToArrayFunc(new(fastjson.ParserPool)), + }, nil +} diff --git a/pkg/stanza/operator/parser/jsonarray/config_test.go b/pkg/stanza/operator/parser/jsonarray/config_test.go new file mode 100644 index 000000000000..59352ef3761c --- /dev/null +++ b/pkg/stanza/operator/parser/jsonarray/config_test.go @@ -0,0 +1,67 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package jsonarray + +import ( + "path/filepath" + "testing" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/operatortest" +) + +func TestConfig(t *testing.T) { + // Manually adding operator to the Registry as its behind a feature gate + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) + + operatortest.ConfigUnmarshalTests{ + DefaultConfig: NewConfig(), + TestsFile: filepath.Join(".", "testdata", "config.yaml"), + Tests: []operatortest.ConfigUnmarshalTest{ + { + Name: "basic", + Expect: func() *Config { + p := NewConfig() + p.ParseFrom = entry.NewBodyField("message") + p.ParseTo = entry.RootableField{Field: entry.NewBodyField("messageParsed")} + return p + }(), + }, + { + Name: "parse_to_attributes", + Expect: func() *Config { + p := NewConfig() + p.ParseFrom = entry.NewBodyField() + p.ParseTo = entry.RootableField{Field: entry.NewAttributeField("output")} + return p + }(), + }, + { + Name: "parse_to_body", + Expect: func() *Config { + p := NewConfig() + p.ParseTo = entry.RootableField{Field: entry.NewBodyField()} + return p + }(), + }, + { + Name: "parse_to_resource", + Expect: func() *Config { + p := NewConfig() + p.ParseTo = entry.RootableField{Field: entry.NewResourceField("output")} + return p + }(), + }, + { + Name: "parse_with_header_as_attributes", + Expect: func() *Config { + p := NewConfig() + p.ParseTo = entry.RootableField{Field: entry.NewAttributeField()} + p.Header = "A,B,C" + return p + }(), + }, + }, + }.Run(t) +} diff --git a/pkg/stanza/operator/parser/jsonarray/parser.go b/pkg/stanza/operator/parser/jsonarray/parser.go new file mode 100644 index 000000000000..c55c55e5ab12 --- /dev/null +++ b/pkg/stanza/operator/parser/jsonarray/parser.go @@ -0,0 +1,125 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package jsonarray // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/jsonarray" + +import ( + "context" + "errors" + "fmt" + + "github.com/valyala/fastjson" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Parser is an operator that parses json array in an entry. +type Parser struct { + helper.ParserOperator + parse parseFunc +} + +type parseFunc func(any) (any, error) + +// Process will parse an entry for json array. +func (p *Parser) Process(ctx context.Context, e *entry.Entry) error { + return p.ParserOperator.ProcessWith(ctx, e, p.parse) +} + +func generateParseToArrayFunc(pool *fastjson.ParserPool) parseFunc { + return func(value any) (any, error) { + jArrayLine, err := valueAsString(value) + if err != nil { + return nil, err + } + + p := pool.Get() + v, err := p.Parse(jArrayLine) + pool.Put(p) + if err != nil { + return nil, errors.New("failed to parse entry") + } + + jArray := v.GetArray() // a is a []*Value slice + parsedValues := make([]any, len(jArray)) + for i := range jArray { + switch jArray[i].Type() { + case fastjson.TypeNumber: + parsedValues[i] = jArray[i].GetInt64() + case fastjson.TypeString: + parsedValues[i] = string(jArray[i].GetStringBytes()) + case fastjson.TypeTrue: + parsedValues[i] = true + case fastjson.TypeFalse: + parsedValues[i] = false + case fastjson.TypeNull: + parsedValues[i] = nil + case fastjson.TypeObject: + // Nested objects handled as a string since this parser doesn't support nested headers + parsedValues[i] = jArray[i].String() + default: + return nil, errors.New("failed to parse entry") + } + } + + return parsedValues, nil + } +} + +func generateParseToMapFunc(pool *fastjson.ParserPool, header []string) parseFunc { + return func(value any) (any, error) { + jArrayLine, err := valueAsString(value) + if err != nil { + return nil, err + } + + p := pool.Get() + v, err := p.Parse(jArrayLine) + pool.Put(p) + if err != nil { + return nil, errors.New("failed to parse entry") + } + + jArray := v.GetArray() // a is a []*Value slice + if len(header) != len(jArray) { + return nil, fmt.Errorf("wrong number of fields: expected %d, found %d", len(header), len(jArray)) + } + parsedValues := make(map[string]any, len(jArray)) + for i := range jArray { + switch jArray[i].Type() { + case fastjson.TypeNumber: + parsedValues[header[i]] = jArray[i].GetInt64() + case fastjson.TypeString: + parsedValues[header[i]] = string(jArray[i].GetStringBytes()) + case fastjson.TypeTrue: + parsedValues[header[i]] = true + case fastjson.TypeFalse: + parsedValues[header[i]] = false + case fastjson.TypeNull: + parsedValues[header[i]] = nil + case fastjson.TypeObject: + // Nested objects handled as a string since this parser doesn't support nested headers + parsedValues[header[i]] = jArray[i].String() + default: + return nil, errors.New("failed to parse entry") + } + } + + return parsedValues, nil + } +} + +// valueAsString interprets the given value as a string. +func valueAsString(value any) (string, error) { + var s string + switch t := value.(type) { + case string: + s += t + case []byte: + s += string(t) + default: + return s, fmt.Errorf("type '%T' cannot be parsed as json array", value) + } + + return s, nil +} diff --git a/pkg/stanza/operator/parser/jsonarray/parser_test.go b/pkg/stanza/operator/parser/jsonarray/parser_test.go new file mode 100644 index 000000000000..8700651e3175 --- /dev/null +++ b/pkg/stanza/operator/parser/jsonarray/parser_test.go @@ -0,0 +1,388 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package jsonarray + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +func newTestParser(t *testing.T) *Parser { + cfg := NewConfigWithID("test") + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + return op.(*Parser) +} + +func TestParserBuildFailure(t *testing.T) { + cfg := NewConfigWithID("test") + cfg.OnError = "invalid_on_error" + _, err := cfg.Build(testutil.Logger(t)) + require.Error(t, err) + require.Contains(t, err.Error(), "invalid `on_error` field") +} + +func TestParserInvalidType(t *testing.T) { + parser := newTestParser(t) + _, err := parser.parse([]int{}) + require.Error(t, err) + require.Contains(t, err.Error(), "type '[]int' cannot be parsed as json array") +} + +func TestParserByteFailureHeadersMismatch(t *testing.T) { + cfg := NewConfigWithID("test") + cfg.Header = "name,sev,msg" + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + parser := op.(*Parser) + _, err = parser.parse("[\"stanza\",\"INFO\",\"started agent\", 42, true]") + require.Error(t, err) + require.Contains(t, err.Error(), "wrong number of fields: expected 3, found 5") +} + +func TestParserJarray(t *testing.T) { + cases := []struct { + name string + configure func(*Config) + inputEntries []entry.Entry + expectedEntries []entry.Entry + expectBuildErr bool + expectProcessErr bool + }{ + { + "basic", + func(p *Config) { + p.ParseTo = entry.RootableField{Field: entry.NewBodyField()} + }, + []entry.Entry{ + { + Body: "[\"stanza\",\"INFO\",\"started agent\", 42, true]", + }, + }, + []entry.Entry{ + { + Body: []any{"stanza", "INFO", "started agent", int64(42), true}, + }, + }, + false, + false, + }, + { + "basic-no-parse_to-fail", + func(_ *Config) { + }, + []entry.Entry{ + { + Body: "[\"stanza\",\"INFO\",\"started agent\", 42, true]", + }, + }, + []entry.Entry{ + { + Body: []any{"stanza", "INFO", "started agent", int64(42), true}, + }, + }, + false, + true, + }, + { + "parse-to-attributes", + func(p *Config) { + p.ParseTo = entry.RootableField{Field: entry.NewAttributeField("output")} + }, + []entry.Entry{ + { + Body: "[\"stanza\",\"INFO\",\"started agent\", 42, true]", + }, + }, + []entry.Entry{ + { + Body: "[\"stanza\",\"INFO\",\"started agent\", 42, true]", + Attributes: map[string]any{ + "output": []any{"stanza", "INFO", "started agent", int64(42), true}, + }, + }, + }, + false, + false, + }, + { + "parse-to-and-from-attributes", + func(p *Config) { + p.ParseTo = entry.RootableField{Field: entry.NewAttributeField("output")} + p.ParseFrom = entry.NewAttributeField("input") + }, + []entry.Entry{ + { + Body: "[\"stanza\",\"INFO\",\"started agent\", 42, true]", + Attributes: map[string]any{ + "input": "[\"stanza\",\"INFO\",\"started agent\", 42, true]", + }, + }, + }, + []entry.Entry{ + { + Body: "[\"stanza\",\"INFO\",\"started agent\", 42, true]", + Attributes: map[string]any{ + "input": "[\"stanza\",\"INFO\",\"started agent\", 42, true]", + "output": []any{"stanza", "INFO", "started agent", int64(42), true}, + }, + }, + }, + false, + false, + }, + { + "nested-object", + func(p *Config) { + p.ParseTo = entry.RootableField{Field: entry.NewBodyField()} + }, + []entry.Entry{ + { + Body: "[\"stanza\", 42, {\"city\": \"New York\", \"zip\": 10001}]", + }, + }, + []entry.Entry{ + { + Body: []any{"stanza", int64(42), "{\"city\":\"New York\",\"zip\":10001}"}, + }, + }, + false, + false, + }, + { + "basic-multiple-static-bodies", + func(p *Config) { + p.ParseTo = entry.RootableField{Field: entry.NewBodyField()} + }, + []entry.Entry{ + { + Body: "[\"stanza\",\"INFO\",\"started agent\", 42, true]", + }, + { + Body: "[\"stanza\",\"ERROR\",\"agent killed\", 9999999, false]", + }, + { + Body: "[\"stanza\",\"INFO\",\"started agent\", 0, null]", + }, + }, + []entry.Entry{ + { + Body: []any{"stanza", "INFO", "started agent", int64(42), true}, + }, + { + Body: []any{"stanza", "ERROR", "agent killed", int64(9999999), false}, + }, + { + Body: []any{"stanza", "INFO", "started agent", int64(0), nil}, + }, + }, + false, + false, + }, + { + "comma in quotes", + func(p *Config) { + p.ParseTo = entry.RootableField{Field: entry.NewBodyField()} + }, + []entry.Entry{ + { + Body: "[\"stanza\",\"Evergreen,49508\",1,\"555-5555\",\"agent\"]", + }, + }, + []entry.Entry{ + { + Body: []any{"stanza", "Evergreen,49508", int64(1), "555-5555", "agent"}, + }, + }, + false, + false, + }, + { + "parse-as-attributes-with-header", + func(p *Config) { + p.ParseTo = entry.RootableField{Field: entry.NewAttributeField()} + p.Header = "origin,sev,message,count,isBool" + }, + []entry.Entry{ + { + Body: "[\"stanza\",\"INFO\",\"started agent\", 42, true]", + }, + }, + []entry.Entry{ + { + Body: "[\"stanza\",\"INFO\",\"started agent\", 42, true]", + Attributes: map[string]any{ + "origin": "stanza", + "sev": "INFO", + "message": "started agent", + "count": int64(42), + "isBool": true, + }, + }, + }, + false, + false, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + cfg := NewConfigWithID("test") + cfg.OutputIDs = []string{"fake"} + tc.configure(cfg) + + op, err := cfg.Build(testutil.Logger(t)) + if tc.expectBuildErr { + require.Error(t, err) + return + } + require.NoError(t, err) + + fake := testutil.NewFakeOutput(t) + require.NoError(t, op.SetOutputs([]operator.Operator{fake})) + + ots := time.Now() + for i := range tc.inputEntries { + inputEntry := tc.inputEntries[i] + inputEntry.ObservedTimestamp = ots + err = op.Process(context.Background(), &inputEntry) + if tc.expectProcessErr { + require.Error(t, err) + return + } + require.NoError(t, err) + + expectedEntry := tc.expectedEntries[i] + expectedEntry.ObservedTimestamp = ots + fake.ExpectEntry(t, &expectedEntry) + } + }) + } +} + +func TestParserJarrayMultiline(t *testing.T) { + cases := []struct { + name string + input string + expected []any + }{ + { + "no_newlines", + "[\"aaaa\",\"bbbb\",12,true,\"eeee\"]", + []any{"aaaa", "bbbb", int64(12), true, "eeee"}, + }, + { + "first_field", + "[\"aa\naa\",\"bbbb\",12,true,\"eeee\"]", + []any{"aa\naa", "bbbb", int64(12), true, "eeee"}, + }, + { + "middle_field", + "[\"aaaa\",\"bb\nbb\",12,true,\"eeee\"]", + []any{"aaaa", "bb\nbb", int64(12), true, "eeee"}, + }, + { + "last_field", + "[\"aaaa\",\"bbbb\",12,true,\"e\neee\"]", + []any{"aaaa", "bbbb", int64(12), true, "e\neee"}, + }, + { + "multiple_fields", + "[\"aaaa\",\"bb\nbb\",12,true,\"e\neee\"]", + []any{"aaaa", "bb\nbb", int64(12), true, "e\neee"}, + }, + { + "multiple_first_field", + "[\"a\na\na\na\",\"bbbb\",\"cccc\",\"dddd\",\"eeee\"]", + []any{"a\na\na\na", "bbbb", "cccc", "dddd", "eeee"}, + }, + { + "multiple_middle_field", + "[\"aaaa\",\"bbbb\",\"c\nc\nc\nc\",\"dddd\",\"eeee\"]", + []any{"aaaa", "bbbb", "c\nc\nc\nc", "dddd", "eeee"}, + }, + { + "multiple_last_field", + "[\"aaaa\",\"bbbb\",\"cccc\",\"dddd\",\"e\ne\ne\ne\"]", + []any{"aaaa", "bbbb", "cccc", "dddd", "e\ne\ne\ne"}, + }, + { + "leading_newline", + "[\"\naaaa\",\"bbbb\",\"cccc\",\"dddd\",\"eeee\"]", + []any{"\naaaa", "bbbb", "cccc", "dddd", "eeee"}, + }, + { + "trailing_newline", + "[\"aaaa\",\"bbbb\",\"cccc\",\"dddd\",\"eeee\n\"]", + []any{"aaaa", "bbbb", "cccc", "dddd", "eeee\n"}, + }, + { + "leading_newline_field", + "[\"aaaa\",\"\nbbbb\",\"\ncccc\",\"\ndddd\",\"eeee\"]", + []any{"aaaa", "\nbbbb", "\ncccc", "\ndddd", "eeee"}, + }, + { + "trailing_newline_field", + "[\"aaaa\",\"bbbb\n\",\"cccc\n\",\"dddd\n\",\"eeee\"]", + []any{"aaaa", "bbbb\n", "cccc\n", "dddd\n", "eeee"}, + }, + { + "empty_lines_unquoted", + "[\"aa\naa\",\"bbbb\",\"c\nccc\",\"dddd\",\"eee\ne\"]", + []any{"aa\naa", "bbbb", "c\nccc", "dddd", "eee\ne"}, + }, + { + "literal_return", + `["aaaa","bb +bb","cccc","dd +dd","eeee"]`, + []any{"aaaa", "bb\nbb", "cccc", "dd\ndd", "eeee"}, + }, + { + "return_in_quotes", + "[\"aaaa\",\"bbbb\",\"cc\ncc\",\"dddd\",\"eeee\"]", + []any{"aaaa", "bbbb", "cc\ncc", "dddd", "eeee"}, + }, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + cfg := NewConfigWithID("test") + cfg.ParseTo = entry.RootableField{Field: entry.NewBodyField()} + cfg.OutputIDs = []string{"fake"} + + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + + fake := testutil.NewFakeOutput(t) + require.NoError(t, op.SetOutputs([]operator.Operator{fake})) + + entry := entry.New() + entry.Body = tc.input + err = op.Process(context.Background(), entry) + require.NoError(t, err) + fake.ExpectBody(t, tc.expected) + fake.ExpectNoEntry(t, 100*time.Millisecond) + }) + } +} + +func TestBuildParserJarray(t *testing.T) { + newBasicParser := func() *Config { + cfg := NewConfigWithID("test") + cfg.OutputIDs = []string{"test"} + return cfg + } + + t.Run("BasicConfig", func(t *testing.T) { + c := newBasicParser() + _, err := c.Build(testutil.Logger(t)) + require.NoError(t, err) + }) +} diff --git a/pkg/stanza/operator/parser/jsonarray/testdata/config.yaml b/pkg/stanza/operator/parser/jsonarray/testdata/config.yaml new file mode 100644 index 000000000000..f50f22b40c59 --- /dev/null +++ b/pkg/stanza/operator/parser/jsonarray/testdata/config.yaml @@ -0,0 +1,18 @@ +basic: + type: json_array_parser + parse_from: body.message + parse_to: body.messageParsed +parse_to_attributes: + type: json_array_parser + parse_from: body + parse_to: attributes.output +parse_to_body: + type: json_array_parser + parse_to: body +parse_to_resource: + type: json_array_parser + parse_to: resource.output +parse_with_header_as_attributes: + type: json_array_parser + parse_to: attributes + header: A,B,C \ No newline at end of file diff --git a/pkg/stanza/operator/parser/keyvalue/config.go b/pkg/stanza/operator/parser/keyvalue/config.go new file mode 100644 index 000000000000..475c6319be7d --- /dev/null +++ b/pkg/stanza/operator/parser/keyvalue/config.go @@ -0,0 +1,67 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package keyvalue // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/keyvalue" + +import ( + "errors" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "key_value_parser" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new key value parser config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new key value parser config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + ParserConfig: helper.NewParserConfig(operatorID, operatorType), + Delimiter: "=", + } +} + +// Config is the configuration of a key value parser operator. +type Config struct { + helper.ParserConfig `mapstructure:",squash"` + + Delimiter string `mapstructure:"delimiter"` + PairDelimiter string `mapstructure:"pair_delimiter"` +} + +// Build will build a key value parser operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + parserOperator, err := c.ParserConfig.Build(logger) + if err != nil { + return nil, err + } + + if c.Delimiter == "" { + return nil, errors.New("delimiter is a required parameter") + } + + pairDelimiter := " " + if c.PairDelimiter != "" { + pairDelimiter = c.PairDelimiter + } + + if c.Delimiter == pairDelimiter { + return nil, errors.New("delimiter and pair_delimiter cannot be the same value") + } + + return &Parser{ + ParserOperator: parserOperator, + delimiter: c.Delimiter, + pairDelimiter: pairDelimiter, + }, nil +} diff --git a/pkg/stanza/operator/parser/keyvalue/keyvalue.go b/pkg/stanza/operator/parser/keyvalue/keyvalue.go deleted file mode 100644 index 64608131e56c..000000000000 --- a/pkg/stanza/operator/parser/keyvalue/keyvalue.go +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package keyvalue // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/keyvalue" - -import ( - "context" - "errors" - "fmt" - "strings" - - "go.uber.org/multierr" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "key_value_parser" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new key value parser config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new key value parser config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - ParserConfig: helper.NewParserConfig(operatorID, operatorType), - Delimiter: "=", - } -} - -// Config is the configuration of a key value parser operator. -type Config struct { - helper.ParserConfig `mapstructure:",squash"` - - Delimiter string `mapstructure:"delimiter"` - PairDelimiter string `mapstructure:"pair_delimiter"` -} - -// Build will build a key value parser operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - parserOperator, err := c.ParserConfig.Build(logger) - if err != nil { - return nil, err - } - - if c.Delimiter == c.PairDelimiter { - return nil, errors.New("delimiter and pair_delimiter cannot be the same value") - } - - if c.Delimiter == "" { - return nil, errors.New("delimiter is a required parameter") - } - - // split on whitespace by default, if pair delimiter is set, use - // strings.Split() - pairSplitFunc := splitStringByWhitespace - if c.PairDelimiter != "" { - pairSplitFunc = func(input string) []string { - return strings.Split(input, c.PairDelimiter) - } - } - - return &Parser{ - ParserOperator: parserOperator, - delimiter: c.Delimiter, - pairSplitFunc: pairSplitFunc, - }, nil -} - -// Parser is an operator that parses key value pairs. -type Parser struct { - helper.ParserOperator - delimiter string - pairSplitFunc func(input string) []string -} - -// Process will parse an entry for key value pairs. -func (kv *Parser) Process(ctx context.Context, entry *entry.Entry) error { - return kv.ParserOperator.ProcessWith(ctx, entry, kv.parse) -} - -// parse will parse a value as key values. -func (kv *Parser) parse(value any) (any, error) { - switch m := value.(type) { - case string: - return kv.parser(m, kv.delimiter) - default: - return nil, fmt.Errorf("type %T cannot be parsed as key value pairs", value) - } -} - -func (kv *Parser) parser(input string, delimiter string) (map[string]any, error) { - if input == "" { - return nil, fmt.Errorf("parse from field %s is empty", kv.ParseFrom.String()) - } - - parsed := make(map[string]any) - - var err error - for _, raw := range kv.pairSplitFunc(input) { - m := strings.Split(raw, delimiter) - if len(m) != 2 { - e := fmt.Errorf("expected '%s' to split by '%s' into two items, got %d", raw, delimiter, len(m)) - err = multierr.Append(err, e) - continue - } - - key := strings.TrimSpace(strings.Trim(m[0], "\"'")) - value := strings.TrimSpace(strings.Trim(m[1], "\"'")) - - parsed[key] = value - } - - return parsed, err -} - -// split on whitespace and preserve quoted text -func splitStringByWhitespace(input string) []string { - quoted := false - raw := strings.FieldsFunc(input, func(r rune) bool { - if r == '"' || r == '\'' { - quoted = !quoted - } - return !quoted && r == ' ' - }) - return raw -} diff --git a/pkg/stanza/operator/parser/keyvalue/keyvalue_test.go b/pkg/stanza/operator/parser/keyvalue/keyvalue_test.go deleted file mode 100644 index 8cfccd8ea363..000000000000 --- a/pkg/stanza/operator/parser/keyvalue/keyvalue_test.go +++ /dev/null @@ -1,596 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package keyvalue - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" -) - -func newTestParser(t *testing.T) *Parser { - config := NewConfigWithID("test") - op, err := config.Build(testutil.Logger(t)) - require.NoError(t, err) - return op.(*Parser) -} - -func TestInit(t *testing.T) { - builder, ok := operator.DefaultRegistry.Lookup("key_value_parser") - require.True(t, ok, "expected key_value_parser to be registered") - require.Equal(t, "key_value_parser", builder().Type()) -} - -func TestConfigBuild(t *testing.T) { - config := NewConfigWithID("test") - op, err := config.Build(testutil.Logger(t)) - require.NoError(t, err) - require.IsType(t, &Parser{}, op) -} - -func TestConfigBuildFailure(t *testing.T) { - config := NewConfigWithID("test") - config.OnError = "invalid_on_error" - _, err := config.Build(testutil.Logger(t)) - require.Error(t, err) - require.Contains(t, err.Error(), "invalid `on_error` field") -} - -func TestBuild(t *testing.T) { - basicConfig := func() *Config { - cfg := NewConfigWithID("test_operator_id") - return cfg - } - - cases := []struct { - name string - input *Config - expectErr bool - }{ - { - "default", - func() *Config { - cfg := basicConfig() - return cfg - }(), - false, - }, - { - "delimiter", - func() *Config { - cfg := basicConfig() - cfg.Delimiter = "/" - return cfg - }(), - false, - }, - { - "missing-delimiter", - func() *Config { - cfg := basicConfig() - cfg.Delimiter = "" - return cfg - }(), - true, - }, - { - "pair-delimiter", - func() *Config { - cfg := basicConfig() - cfg.PairDelimiter = "|" - return cfg - }(), - false, - }, - { - "pair-delimiter-multiline", - func() *Config { - cfg := basicConfig() - cfg.PairDelimiter = "^\n" - return cfg - }(), - false, - }, - { - "same-delimiter-and-pair-delimiter", - func() *Config { - cfg := basicConfig() - cfg.Delimiter = "|" - cfg.PairDelimiter = cfg.Delimiter - return cfg - }(), - true, - }, - { - "unset-delimiter", - func() *Config { - cfg := basicConfig() - cfg.Delimiter = "" - cfg.PairDelimiter = "!" - return cfg - }(), - true, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - cfg := tc.input - _, err := cfg.Build(testutil.Logger(t)) - if tc.expectErr { - require.Error(t, err) - return - } - require.NoError(t, err) - }) - } -} - -func TestParserStringFailure(t *testing.T) { - parser := newTestParser(t) - _, err := parser.parse("invalid") - require.Error(t, err) - require.Contains(t, err.Error(), fmt.Sprintf("expected '%s' to split by '%s' into two items, got", "invalid", parser.delimiter)) -} - -func TestParserInvalidType(t *testing.T) { - parser := newTestParser(t) - _, err := parser.parse([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type []int cannot be parsed as key value pairs") -} - -func TestKVImplementations(t *testing.T) { - require.Implements(t, (*operator.Operator)(nil), new(Parser)) -} - -func TestParser(t *testing.T) { - cases := []struct { - name string - configure func(*Config) - input *entry.Entry - expect *entry.Entry - expectError bool - expectBuildErr bool - }{ - { - "simple", - func(kv *Config) {}, - &entry.Entry{ - Body: "name=stanza age=2", - }, - &entry.Entry{ - Attributes: map[string]any{ - "name": "stanza", - "age": "2", - }, - Body: "name=stanza age=2", - }, - false, - false, - }, - { - "parse-from", - func(kv *Config) { - kv.ParseFrom = entry.NewBodyField("test") - }, - &entry.Entry{ - Body: map[string]any{ - "test": "name=otel age=2", - }, - }, - &entry.Entry{ - Attributes: map[string]any{ - "name": "otel", - "age": "2", - }, - Body: map[string]any{ - "test": "name=otel age=2", - }, - }, - false, - false, - }, - { - "parse-to", - func(kv *Config) { - kv.ParseTo = entry.RootableField{Field: entry.NewBodyField("test")} - }, - &entry.Entry{ - Body: "name=stanza age=10", - }, - &entry.Entry{ - Body: map[string]any{ - "test": map[string]any{ - "name": "stanza", - "age": "10", - }, - }, - }, - false, - false, - }, - { - "from-to", - func(kv *Config) { - kv.ParseFrom = entry.NewAttributeField("from") - kv.ParseTo = entry.RootableField{Field: entry.NewBodyField("to")} - }, - &entry.Entry{ - Attributes: map[string]any{ - "from": "name=stanza age=10", - }, - }, - &entry.Entry{ - Attributes: map[string]any{ - "from": "name=stanza age=10", - }, - Body: map[string]any{ - "to": map[string]any{ - "name": "stanza", - "age": "10", - }, - }, - }, - false, - false, - }, - { - "user-agent", - func(kv *Config) {}, - &entry.Entry{ - Body: `requestClientApplication="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0"`, - }, - &entry.Entry{ - Attributes: map[string]any{ - "requestClientApplication": `Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0`, - }, - Body: `requestClientApplication="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0"`, - }, - false, - false, - }, - { - "double-quotes-removed", - func(kv *Config) {}, - &entry.Entry{ - Body: "name=\"stanza\" age=2", - }, - &entry.Entry{ - Attributes: map[string]any{ - "name": "stanza", - "age": "2", - }, - Body: "name=\"stanza\" age=2", - }, - false, - false, - }, - { - "single-quotes-removed", - func(kv *Config) {}, - &entry.Entry{ - Body: "description='stanza deployment number 5' x=y", - }, - &entry.Entry{ - Attributes: map[string]any{ - "description": "stanza deployment number 5", - "x": "y", - }, - Body: "description='stanza deployment number 5' x=y", - }, - false, - false, - }, - { - "double-quotes-spaces-removed", - func(kv *Config) {}, - &entry.Entry{ - Body: `name=" stanza " age=2`, - }, - &entry.Entry{ - Attributes: map[string]any{ - "name": "stanza", - "age": "2", - }, - Body: `name=" stanza " age=2`, - }, - false, - false, - }, - { - "leading-and-trailing-space", - func(kv *Config) {}, - &entry.Entry{ - Body: `" name "=" stanza " age=2`, - }, - &entry.Entry{ - Attributes: map[string]any{ - "name": "stanza", - "age": "2", - }, - Body: `" name "=" stanza " age=2`, - }, - false, - false, - }, - { - "delimiter", - func(kv *Config) { - kv.Delimiter = "|" - kv.ParseFrom = entry.NewBodyField("testfield") - kv.ParseTo = entry.RootableField{Field: entry.NewBodyField("testparsed")} - }, - &entry.Entry{ - Body: map[string]any{ - "testfield": `name|" stanza " age|2 key|value`, - }, - }, - &entry.Entry{ - Body: map[string]any{ - "testfield": `name|" stanza " age|2 key|value`, - "testparsed": map[string]any{ - "name": "stanza", - "age": "2", - "key": "value", - }, - }, - }, - false, - false, - }, - { - "double-delimiter", - func(kv *Config) { - kv.Delimiter = "==" - }, - &entry.Entry{ - Body: `name==" stanza " age==2 key==value`, - }, - &entry.Entry{ - Attributes: map[string]any{ - "name": "stanza", - "age": "2", - "key": "value", - }, - Body: `name==" stanza " age==2 key==value`, - }, - false, - false, - }, - { - "pair-delimiter", - func(kv *Config) { - kv.PairDelimiter = "|" - }, - &entry.Entry{ - Body: `name=stanza|age=2 | key=value`, - }, - &entry.Entry{ - Attributes: map[string]any{ - "name": "stanza", - "age": "2", - "key": "value", - }, - Body: `name=stanza|age=2 | key=value`, - }, - false, - false, - }, - { - "pair-delimiter-multiline", - func(kv *Config) { - kv.PairDelimiter = "^\n" - }, - &entry.Entry{ - Body: `name=stanza^ -age=2^ -key=value`, - }, - &entry.Entry{ - Attributes: map[string]any{ - "name": "stanza", - "age": "2", - "key": "value", - }, - Body: `name=stanza^ -age=2^ -key=value`, - }, - false, - false, - }, - { - "large", - func(kv *Config) {}, - &entry.Entry{ - Body: "name=stanza age=1 job=\"software engineering\" location=\"grand rapids michigan\" src=\"10.3.3.76\" dst=172.217.0.10 protocol=udp sport=57112 dport=443 translated_src_ip=96.63.176.3 translated_port=57112", - }, - &entry.Entry{ - Attributes: map[string]any{ - "age": "1", - "dport": "443", - "dst": "172.217.0.10", - "job": "software engineering", - "location": "grand rapids michigan", - "name": "stanza", - "protocol": "udp", - "sport": "57112", - "src": "10.3.3.76", - "translated_port": "57112", - "translated_src_ip": "96.63.176.3", - }, - Body: "name=stanza age=1 job=\"software engineering\" location=\"grand rapids michigan\" src=\"10.3.3.76\" dst=172.217.0.10 protocol=udp sport=57112 dport=443 translated_src_ip=96.63.176.3 translated_port=57112", - }, - false, - false, - }, - { - "dell-sonic-wall", - func(kv *Config) {}, - &entry.Entry{ - Body: `id=LVM_Sonicwall sn=22255555 time="2021-09-22 16:30:31" fw=14.165.177.10 pri=6 c=1024 gcat=2 m=97 msg="Web site hit" srcMac=6c:0b:84:3f:fa:63 src=192.168.50.2:52006:X0 srcZone=LAN natSrc=14.165.177.10:58457 dstMac=08:b2:58:46:30:54 dst=15.159.150.83:443:X1 dstZone=WAN natDst=15.159.150.83:443 proto=tcp/https sent=1422 rcvd=5993 rule="6 (LAN->WAN)" app=48 dstname=example.space.dev.com arg=/ code=27 Category="Information Technology/Computers" note="Policy: a0, Info: 888 " n=3412158`, - }, - &entry.Entry{ - Attributes: map[string]any{ - "id": "LVM_Sonicwall", - "sn": "22255555", - "time": "2021-09-22 16:30:31", - "fw": "14.165.177.10", - "pri": "6", - "c": "1024", - "gcat": "2", - "m": "97", - "msg": "Web site hit", - "srcMac": "6c:0b:84:3f:fa:63", - "src": "192.168.50.2:52006:X0", - "srcZone": "LAN", - "natSrc": "14.165.177.10:58457", - "dstMac": "08:b2:58:46:30:54", - "dst": "15.159.150.83:443:X1", - "dstZone": "WAN", - "natDst": "15.159.150.83:443", - "proto": "tcp/https", - "sent": "1422", - "rcvd": "5993", - "rule": "6 (LAN->WAN)", - "app": "48", - "dstname": "example.space.dev.com", - "arg": "/", - "code": "27", - "Category": "Information Technology/Computers", - "note": "Policy: a0, Info: 888", - "n": "3412158", - }, - Body: `id=LVM_Sonicwall sn=22255555 time="2021-09-22 16:30:31" fw=14.165.177.10 pri=6 c=1024 gcat=2 m=97 msg="Web site hit" srcMac=6c:0b:84:3f:fa:63 src=192.168.50.2:52006:X0 srcZone=LAN natSrc=14.165.177.10:58457 dstMac=08:b2:58:46:30:54 dst=15.159.150.83:443:X1 dstZone=WAN natDst=15.159.150.83:443 proto=tcp/https sent=1422 rcvd=5993 rule="6 (LAN->WAN)" app=48 dstname=example.space.dev.com arg=/ code=27 Category="Information Technology/Computers" note="Policy: a0, Info: 888 " n=3412158`, - }, - false, - false, - }, - { - "missing-delimiter", - func(kv *Config) {}, - &entry.Entry{ - Body: `test text`, - }, - &entry.Entry{ - Body: `test text`, - }, - true, - false, - }, - { - "invalid-pair", - func(kv *Config) {}, - &entry.Entry{ - Body: `test=text=abc`, - }, - &entry.Entry{ - Body: `test=text=abc`, - }, - true, - false, - }, - { - "empty-input", - func(kv *Config) {}, - &entry.Entry{}, - &entry.Entry{}, - true, - false, - }, - { - "same-delimiter-and-pair-delimiter", - func(kv *Config) { - kv.Delimiter = "!" - kv.PairDelimiter = kv.Delimiter - }, - &entry.Entry{ - Body: "a=b c=d", - }, - &entry.Entry{ - Body: "a=b c=d", - }, - false, - true, - }, - { - "unset-delimiter", - func(kv *Config) { - kv.Delimiter = "" - kv.PairDelimiter = "!" - }, - &entry.Entry{ - Body: "a=b c=d", - }, - &entry.Entry{ - Body: "a=b c=d", - }, - false, - true, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - cfg := NewConfigWithID("test") - cfg.OutputIDs = []string{"fake"} - tc.configure(cfg) - - op, err := cfg.Build(testutil.Logger(t)) - if tc.expectBuildErr { - require.Error(t, err) - return - } - require.NoError(t, err) - - fake := testutil.NewFakeOutput(t) - require.NoError(t, op.SetOutputs([]operator.Operator{fake})) - - ots := time.Now() - tc.input.ObservedTimestamp = ots - tc.expect.ObservedTimestamp = ots - - err = op.Process(context.Background(), tc.input) - if tc.expectError { - require.Error(t, err) - return - } - require.NoError(t, err) - fake.ExpectEntry(t, tc.expect) - }) - } -} - -func TestSplitStringByWhitespace(t *testing.T) { - cases := []struct { - name string - intput string - output []string - }{ - { - "simple", - "k=v a=b x=\" y \" job=\"software engineering\"", - []string{ - "k=v", - "a=b", - "x=\" y \"", - "job=\"software engineering\"", - }, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - require.Equal(t, tc.output, splitStringByWhitespace(tc.intput)) - }) - } -} diff --git a/pkg/stanza/operator/parser/keyvalue/package_test.go b/pkg/stanza/operator/parser/keyvalue/package_test.go new file mode 100644 index 000000000000..3a00d6731d2a --- /dev/null +++ b/pkg/stanza/operator/parser/keyvalue/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package keyvalue + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/parser/keyvalue/parser.go b/pkg/stanza/operator/parser/keyvalue/parser.go new file mode 100644 index 000000000000..39a0246e9e16 --- /dev/null +++ b/pkg/stanza/operator/parser/keyvalue/parser.go @@ -0,0 +1,48 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package keyvalue // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/keyvalue" + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/parseutils" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Parser is an operator that parses key value pairs. +type Parser struct { + helper.ParserOperator + delimiter string + pairDelimiter string +} + +// Process will parse an entry for key value pairs. +func (p *Parser) Process(ctx context.Context, entry *entry.Entry) error { + return p.ParserOperator.ProcessWith(ctx, entry, p.parse) +} + +// parse will parse a value as key values. +func (p *Parser) parse(value any) (any, error) { + switch m := value.(type) { + case string: + return p.parser(m, p.delimiter, p.pairDelimiter) + default: + return nil, fmt.Errorf("type %T cannot be parsed as key value pairs", value) + } +} + +func (p *Parser) parser(input string, delimiter string, pairDelimiter string) (map[string]any, error) { + if input == "" { + return nil, fmt.Errorf("parse from field %s is empty", p.ParseFrom.String()) + } + + pairs, err := parseutils.SplitString(input, pairDelimiter) + if err != nil { + return nil, fmt.Errorf("failed to parse pairs from input: %w", err) + } + + return parseutils.ParseKeyValuePairs(pairs, delimiter) +} diff --git a/pkg/stanza/operator/parser/keyvalue/parser_test.go b/pkg/stanza/operator/parser/keyvalue/parser_test.go new file mode 100644 index 000000000000..9aacbdf27519 --- /dev/null +++ b/pkg/stanza/operator/parser/keyvalue/parser_test.go @@ -0,0 +1,721 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package keyvalue + +import ( + "context" + "fmt" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +func newTestParser(t *testing.T) *Parser { + config := NewConfigWithID("test") + op, err := config.Build(testutil.Logger(t)) + require.NoError(t, err) + return op.(*Parser) +} + +func TestInit(t *testing.T) { + builder, ok := operator.DefaultRegistry.Lookup("key_value_parser") + require.True(t, ok, "expected key_value_parser to be registered") + require.Equal(t, "key_value_parser", builder().Type()) +} + +func TestConfigBuild(t *testing.T) { + config := NewConfigWithID("test") + op, err := config.Build(testutil.Logger(t)) + require.NoError(t, err) + require.IsType(t, &Parser{}, op) +} + +func TestConfigBuildFailure(t *testing.T) { + config := NewConfigWithID("test") + config.OnError = "invalid_on_error" + _, err := config.Build(testutil.Logger(t)) + require.Error(t, err) + require.Contains(t, err.Error(), "invalid `on_error` field") +} + +func TestBuild(t *testing.T) { + basicConfig := func() *Config { + cfg := NewConfigWithID("test_operator_id") + return cfg + } + + cases := []struct { + name string + input *Config + expectErr bool + }{ + { + "default", + func() *Config { + cfg := basicConfig() + return cfg + }(), + false, + }, + { + "delimiter", + func() *Config { + cfg := basicConfig() + cfg.Delimiter = "/" + return cfg + }(), + false, + }, + { + "missing-delimiter", + func() *Config { + cfg := basicConfig() + cfg.Delimiter = "" + return cfg + }(), + true, + }, + { + "pair-delimiter", + func() *Config { + cfg := basicConfig() + cfg.PairDelimiter = "|" + return cfg + }(), + false, + }, + { + "pair-delimiter-multiline", + func() *Config { + cfg := basicConfig() + cfg.PairDelimiter = "^\n" + return cfg + }(), + false, + }, + { + "same-delimiter-and-pair-delimiter", + func() *Config { + cfg := basicConfig() + cfg.Delimiter = "|" + cfg.PairDelimiter = cfg.Delimiter + return cfg + }(), + true, + }, + { + "pair-delimiter-equals-default-delimiter", + func() *Config { + cfg := basicConfig() + cfg.Delimiter = " " + return cfg + }(), + true, + }, + { + "unset-delimiter", + func() *Config { + cfg := basicConfig() + cfg.Delimiter = "" + cfg.PairDelimiter = "!" + return cfg + }(), + true, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + cfg := tc.input + _, err := cfg.Build(testutil.Logger(t)) + if tc.expectErr { + require.Error(t, err) + return + } + require.NoError(t, err) + }) + } +} + +func TestParserStringFailure(t *testing.T) { + parser := newTestParser(t) + _, err := parser.parse("invalid") + require.Error(t, err) + require.Contains(t, err.Error(), fmt.Sprintf("cannot split %q into 2 items, got 1 item(s)", "invalid")) +} + +func TestParserInvalidType(t *testing.T) { + parser := newTestParser(t) + _, err := parser.parse([]int{}) + require.Error(t, err) + require.Contains(t, err.Error(), "type []int cannot be parsed as key value pairs") +} + +func TestParserEmptyInput(t *testing.T) { + parser := newTestParser(t) + _, err := parser.parse("") + require.Error(t, err) + require.Contains(t, err.Error(), "parse from field body is empty") +} + +func TestKVImplementations(t *testing.T) { + require.Implements(t, (*operator.Operator)(nil), new(Parser)) +} + +func TestParser(t *testing.T) { + cases := []struct { + name string + configure func(*Config) + input *entry.Entry + expect *entry.Entry + expectError bool + expectBuildErr bool + }{ + { + "simple", + func(_ *Config) {}, + &entry.Entry{ + Body: "name=stanza age=2", + }, + &entry.Entry{ + Attributes: map[string]any{ + "name": "stanza", + "age": "2", + }, + Body: "name=stanza age=2", + }, + false, + false, + }, + { + "parse-from", + func(kv *Config) { + kv.ParseFrom = entry.NewBodyField("test") + }, + &entry.Entry{ + Body: map[string]any{ + "test": "name=otel age=2", + }, + }, + &entry.Entry{ + Attributes: map[string]any{ + "name": "otel", + "age": "2", + }, + Body: map[string]any{ + "test": "name=otel age=2", + }, + }, + false, + false, + }, + { + "parse-to", + func(kv *Config) { + kv.ParseTo = entry.RootableField{Field: entry.NewBodyField("test")} + }, + &entry.Entry{ + Body: "name=stanza age=10", + }, + &entry.Entry{ + Body: map[string]any{ + "test": map[string]any{ + "name": "stanza", + "age": "10", + }, + }, + }, + false, + false, + }, + { + "from-to", + func(kv *Config) { + kv.ParseFrom = entry.NewAttributeField("from") + kv.ParseTo = entry.RootableField{Field: entry.NewBodyField("to")} + }, + &entry.Entry{ + Attributes: map[string]any{ + "from": "name=stanza age=10", + }, + }, + &entry.Entry{ + Attributes: map[string]any{ + "from": "name=stanza age=10", + }, + Body: map[string]any{ + "to": map[string]any{ + "name": "stanza", + "age": "10", + }, + }, + }, + false, + false, + }, + { + "user-agent", + func(_ *Config) {}, + &entry.Entry{ + Body: `requestClientApplication="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0"`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "requestClientApplication": `Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0`, + }, + Body: `requestClientApplication="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0"`, + }, + false, + false, + }, + { + "double-quotes-removed", + func(_ *Config) {}, + &entry.Entry{ + Body: "name=\"stanza\" age=2", + }, + &entry.Entry{ + Attributes: map[string]any{ + "name": "stanza", + "age": "2", + }, + Body: "name=\"stanza\" age=2", + }, + false, + false, + }, + { + "single-quotes-removed", + func(_ *Config) {}, + &entry.Entry{ + Body: "description='stanza deployment number 5' x=y", + }, + &entry.Entry{ + Attributes: map[string]any{ + "description": "stanza deployment number 5", + "x": "y", + }, + Body: "description='stanza deployment number 5' x=y", + }, + false, + false, + }, + { + "double-quotes-spaces-removed", + func(_ *Config) {}, + &entry.Entry{ + Body: `name=" stanza " age=2`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "name": "stanza", + "age": "2", + }, + Body: `name=" stanza " age=2`, + }, + false, + false, + }, + { + "leading-and-trailing-space", + func(_ *Config) {}, + &entry.Entry{ + Body: `" name "=" stanza " age=2`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "name": "stanza", + "age": "2", + }, + Body: `" name "=" stanza " age=2`, + }, + false, + false, + }, + { + "delimiter", + func(kv *Config) { + kv.Delimiter = "|" + kv.ParseFrom = entry.NewBodyField("testfield") + kv.ParseTo = entry.RootableField{Field: entry.NewBodyField("testparsed")} + }, + &entry.Entry{ + Body: map[string]any{ + "testfield": `name|" stanza " age|2 key|value`, + }, + }, + &entry.Entry{ + Body: map[string]any{ + "testfield": `name|" stanza " age|2 key|value`, + "testparsed": map[string]any{ + "name": "stanza", + "age": "2", + "key": "value", + }, + }, + }, + false, + false, + }, + { + "double-delimiter", + func(kv *Config) { + kv.Delimiter = "==" + }, + &entry.Entry{ + Body: `name==" stanza " age==2 key==value`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "name": "stanza", + "age": "2", + "key": "value", + }, + Body: `name==" stanza " age==2 key==value`, + }, + false, + false, + }, + { + "pair-delimiter", + func(kv *Config) { + kv.PairDelimiter = "|" + }, + &entry.Entry{ + Body: `name=stanza|age=2 | key=value`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "name": "stanza", + "age": "2", + "key": "value", + }, + Body: `name=stanza|age=2 | key=value`, + }, + false, + false, + }, + { + "pair-delimiter-multiline", + func(kv *Config) { + kv.PairDelimiter = "^\n" + }, + &entry.Entry{ + Body: `name=stanza^ +age=2^ +key=value`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "name": "stanza", + "age": "2", + "key": "value", + }, + Body: `name=stanza^ +age=2^ +key=value`, + }, + false, + false, + }, + { + "large", + func(_ *Config) {}, + &entry.Entry{ + Body: "name=stanza age=1 job=\"software engineering\" location=\"grand rapids michigan\" src=\"10.3.3.76\" dst=172.217.0.10 protocol=udp sport=57112 dport=443 translated_src_ip=96.63.176.3 translated_port=57112", + }, + &entry.Entry{ + Attributes: map[string]any{ + "age": "1", + "dport": "443", + "dst": "172.217.0.10", + "job": "software engineering", + "location": "grand rapids michigan", + "name": "stanza", + "protocol": "udp", + "sport": "57112", + "src": "10.3.3.76", + "translated_port": "57112", + "translated_src_ip": "96.63.176.3", + }, + Body: "name=stanza age=1 job=\"software engineering\" location=\"grand rapids michigan\" src=\"10.3.3.76\" dst=172.217.0.10 protocol=udp sport=57112 dport=443 translated_src_ip=96.63.176.3 translated_port=57112", + }, + false, + false, + }, + { + "dell-sonic-wall", + func(_ *Config) {}, + &entry.Entry{ + Body: `id=LVM_Sonicwall sn=22255555 time="2021-09-22 16:30:31" fw=14.165.177.10 pri=6 c=1024 gcat=2 m=97 msg="Web site hit" srcMac=6c:0b:84:3f:fa:63 src=192.168.50.2:52006:X0 srcZone=LAN natSrc=14.165.177.10:58457 dstMac=08:b2:58:46:30:54 dst=15.159.150.83:443:X1 dstZone=WAN natDst=15.159.150.83:443 proto=tcp/https sent=1422 rcvd=5993 rule="6 (LAN->WAN)" app=48 dstname=example.space.dev.com arg=/ code=27 Category="Information Technology/Computers" note="Policy: a0, Info: 888 " n=3412158`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "id": "LVM_Sonicwall", + "sn": "22255555", + "time": "2021-09-22 16:30:31", + "fw": "14.165.177.10", + "pri": "6", + "c": "1024", + "gcat": "2", + "m": "97", + "msg": "Web site hit", + "srcMac": "6c:0b:84:3f:fa:63", + "src": "192.168.50.2:52006:X0", + "srcZone": "LAN", + "natSrc": "14.165.177.10:58457", + "dstMac": "08:b2:58:46:30:54", + "dst": "15.159.150.83:443:X1", + "dstZone": "WAN", + "natDst": "15.159.150.83:443", + "proto": "tcp/https", + "sent": "1422", + "rcvd": "5993", + "rule": "6 (LAN->WAN)", + "app": "48", + "dstname": "example.space.dev.com", + "arg": "/", + "code": "27", + "Category": "Information Technology/Computers", + "note": "Policy: a0, Info: 888", + "n": "3412158", + }, + Body: `id=LVM_Sonicwall sn=22255555 time="2021-09-22 16:30:31" fw=14.165.177.10 pri=6 c=1024 gcat=2 m=97 msg="Web site hit" srcMac=6c:0b:84:3f:fa:63 src=192.168.50.2:52006:X0 srcZone=LAN natSrc=14.165.177.10:58457 dstMac=08:b2:58:46:30:54 dst=15.159.150.83:443:X1 dstZone=WAN natDst=15.159.150.83:443 proto=tcp/https sent=1422 rcvd=5993 rule="6 (LAN->WAN)" app=48 dstname=example.space.dev.com arg=/ code=27 Category="Information Technology/Computers" note="Policy: a0, Info: 888 " n=3412158`, + }, + false, + false, + }, + { + "missing-delimiter", + func(_ *Config) {}, + &entry.Entry{ + Body: `test text`, + }, + &entry.Entry{ + Body: `test text`, + }, + true, + false, + }, + { + "value-contains-delimiter", + func(_ *Config) {}, + &entry.Entry{ + Body: `test=text=abc`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "test": "text=abc", + }, + Body: `test=text=abc`, + }, + false, + false, + }, + { + "quoted-value-contains-whitespace-delimiter", + func(_ *Config) {}, + &entry.Entry{ + Body: `msg="Message successfully sent at 2023-12-04 06:47:31.204222276 +0000 UTC m=+5115.932279346"`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "msg": `Message successfully sent at 2023-12-04 06:47:31.204222276 +0000 UTC m=+5115.932279346`, + }, + Body: `msg="Message successfully sent at 2023-12-04 06:47:31.204222276 +0000 UTC m=+5115.932279346"`, + }, + false, + false, + }, + { + "multiple-values-contain-delimiter", + func(_ *Config) {}, + &entry.Entry{ + Body: `one=1=i two="2=ii" three=3=iii`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "one": "1=i", + "two": "2=ii", + "three": "3=iii", + }, + Body: `one=1=i two="2=ii" three=3=iii`, + }, + false, + false, + }, + { + "empty-input", + func(_ *Config) {}, + &entry.Entry{}, + &entry.Entry{}, + true, + false, + }, + { + "same-delimiter-and-pair-delimiter", + func(kv *Config) { + kv.Delimiter = "!" + kv.PairDelimiter = kv.Delimiter + }, + &entry.Entry{ + Body: "a=b c=d", + }, + &entry.Entry{ + Body: "a=b c=d", + }, + false, + true, + }, + { + "unset-delimiter", + func(kv *Config) { + kv.Delimiter = "" + kv.PairDelimiter = "!" + }, + &entry.Entry{ + Body: "a=b c=d", + }, + &entry.Entry{ + Body: "a=b c=d", + }, + false, + true, + }, + { + "custom pair delimiter in quoted value", + func(kv *Config) { + kv.PairDelimiter = "_" + }, + &entry.Entry{ + Body: `a=b_c="d_e"`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "a": "b", + "c": "d_e", + }, + Body: `a=b_c="d_e"`, + }, + false, + false, + }, + { + "embedded double quotes in single quoted value", + func(_ *Config) {}, + &entry.Entry{ + Body: `a=b c='this is a "co ol" value'`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "a": "b", + "c": "this is a \"co ol\" value", + }, + Body: `a=b c='this is a "co ol" value'`, + }, + false, + false, + }, + { + "embedded double quotes end single quoted value", + func(_ *Config) {}, + &entry.Entry{ + Body: `a=b c='this is a "co ol"'`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "a": "b", + "c": "this is a \"co ol\"", + }, + Body: `a=b c='this is a "co ol"'`, + }, + false, + false, + }, + { + "leading and trailing pair delimiter w/o quotes", + func(_ *Config) {}, + &entry.Entry{ + Body: " k1=v1 k2==v2 k3=v3= ", + }, + &entry.Entry{ + Attributes: map[string]any{ + "k1": "v1", + "k2": "=v2", + "k3": "v3=", + }, + Body: " k1=v1 k2==v2 k3=v3= ", + }, + false, + false, + }, + { + "complicated delimiters", + func(kv *Config) { + kv.Delimiter = "@*" + kv.PairDelimiter = "_!_" + }, + &entry.Entry{ + Body: `k1@*v1_!_k2@**v2_!__k3@@*v3__`, + }, + &entry.Entry{ + Attributes: map[string]any{ + "k1": "v1", + "k2": "*v2", + "_k3@": "v3__", + }, + Body: `k1@*v1_!_k2@**v2_!__k3@@*v3__`, + }, + false, + false, + }, + { + "unclosed quotes", + func(_ *Config) {}, + &entry.Entry{ + Body: `k1='v1' k2='v2`, + }, + &entry.Entry{ + Body: `k1='v1' k2='v2`, + }, + true, + false, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + cfg := NewConfigWithID("test") + cfg.OutputIDs = []string{"fake"} + tc.configure(cfg) + + op, err := cfg.Build(testutil.Logger(t)) + if tc.expectBuildErr { + require.Error(t, err) + return + } + require.NoError(t, err) + + fake := testutil.NewFakeOutput(t) + require.NoError(t, op.SetOutputs([]operator.Operator{fake})) + + ots := time.Now() + tc.input.ObservedTimestamp = ots + tc.expect.ObservedTimestamp = ots + + err = op.Process(context.Background(), tc.input) + if tc.expectError { + require.Error(t, err) + return + } + require.NoError(t, err) + fake.ExpectEntry(t, tc.expect) + }) + } +} diff --git a/pkg/stanza/operator/parser/regex/cache.go b/pkg/stanza/operator/parser/regex/cache.go index 735831119427..50356780284b 100644 --- a/pkg/stanza/operator/parser/regex/cache.go +++ b/pkg/stanza/operator/parser/regex/cache.go @@ -16,6 +16,7 @@ type cache interface { add(key string, data any) bool copy() map[string]any maxSize() uint16 + stop() } // newMemoryCache takes a cache size and a limiter interval and @@ -111,6 +112,10 @@ func (m *memoryCache) maxSize() uint16 { return uint16(cap(m.keys)) } +func (m *memoryCache) stop() { + m.limiter.stop() +} + // limiter provides rate limiting methods for // the cache type limiter interface { @@ -120,6 +125,7 @@ type limiter interface { limit() uint64 resetInterval() time.Duration throttled() bool + stop() } // newStartedAtomicLimiter returns a started atomicLimiter @@ -132,6 +138,7 @@ func newStartedAtomicLimiter(max uint64, interval uint64) *atomicLimiter { count: &atomic.Uint64{}, max: max, interval: time.Second * time.Duration(interval), + done: make(chan struct{}), } a.init() @@ -146,6 +153,7 @@ type atomicLimiter struct { max uint64 interval time.Duration start sync.Once + done chan struct{} } var _ limiter = &atomicLimiter{count: &atomic.Uint64{}} @@ -158,10 +166,16 @@ func (l *atomicLimiter) init() { // During every interval period, reduce the counter // by 10% x := math.Round(-0.10 * float64(l.max)) + ticker := time.NewTicker(l.interval) for { - time.Sleep(l.interval) - if l.currentCount() > 0 { - l.count.Add(^uint64(x)) + select { + case <-l.done: + ticker.Stop() + return + case <-ticker.C: + if l.currentCount() > 0 { + l.count.Add(^uint64(x)) + } } } }() @@ -196,3 +210,7 @@ func (l *atomicLimiter) limit() uint64 { func (l *atomicLimiter) resetInterval() time.Duration { return l.interval } + +func (l *atomicLimiter) stop() { + close(l.done) +} diff --git a/pkg/stanza/operator/parser/regex/cache_test.go b/pkg/stanza/operator/parser/regex/cache_test.go index 0403593c31f8..151147ca8f07 100644 --- a/pkg/stanza/operator/parser/regex/cache_test.go +++ b/pkg/stanza/operator/parser/regex/cache_test.go @@ -32,6 +32,7 @@ func TestNewMemoryCache(t *testing.T) { for _, tc := range cases { output := newMemoryCache(tc.maxSize, 0) + defer output.stop() require.Equal(t, tc.expect.cache, output.cache) require.Len(t, output.cache, 0, "new memory should always be empty") require.Len(t, output.keys, 0, "new memory should always be empty") @@ -72,6 +73,7 @@ func TestMemory(t *testing.T) { for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { + defer tc.cache.stop() for key, value := range tc.input { tc.cache.add(key, value) out := tc.cache.get(key) @@ -95,6 +97,7 @@ func TestCleanupLast(t *testing.T) { maxSize := 10 m := newMemoryCache(uint16(maxSize), 0) + defer m.stop() // Add to cache until it is full for i := 0; i <= cap(m.keys); i++ { @@ -175,6 +178,7 @@ func TestNewStartedAtomicLimiter(t *testing.T) { t.Run(tc.name, func(t *testing.T) { l := newStartedAtomicLimiter(tc.max, tc.interval) require.Equal(t, tc.max, l.max) + defer l.stop() if tc.interval == 0 { // default tc.interval = 5 @@ -192,6 +196,7 @@ func TestLimiter(t *testing.T) { l := newStartedAtomicLimiter(max, 120) require.NotNil(t, l) require.Equal(t, max, l.max) + defer l.stop() require.False(t, l.throttled(), "new limiter should not be throttling") require.Equal(t, uint64(0), l.currentCount()) @@ -219,6 +224,7 @@ func TestThrottledLimiter(t *testing.T) { max: max, count: count, interval: 1, + done: make(chan struct{}), } require.True(t, l.throttled()) @@ -227,6 +233,7 @@ func TestThrottledLimiter(t *testing.T) { // for it to reset the counter. The limiter will no longer // be in a throttled state and the count will be reset. l.init() + defer l.stop() wait := 2 * l.interval time.Sleep(time.Second * wait) require.False(t, l.throttled()) @@ -235,6 +242,7 @@ func TestThrottledLimiter(t *testing.T) { func TestThrottledCache(t *testing.T) { c := newMemoryCache(3, 120) + defer c.stop() require.False(t, c.limiter.throttled()) require.Equal(t, 4, int(c.limiter.limit()), "expected limit be cache size + 1") require.Equal(t, float64(120), c.limiter.resetInterval().Seconds(), "expected reset interval to be 120 seconds") diff --git a/pkg/stanza/operator/parser/regex/config.go b/pkg/stanza/operator/parser/regex/config.go new file mode 100644 index 000000000000..3cbfe8f8d1a4 --- /dev/null +++ b/pkg/stanza/operator/parser/regex/config.go @@ -0,0 +1,86 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package regex // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/regex" + +import ( + "fmt" + "regexp" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/errors" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "regex_parser" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new regex parser config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new regex parser config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + ParserConfig: helper.NewParserConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a regex parser operator. +type Config struct { + helper.ParserConfig `mapstructure:",squash"` + + Regex string `mapstructure:"regex"` + + Cache struct { + Size uint16 `mapstructure:"size"` + } `mapstructure:"cache"` +} + +// Build will build a regex parser operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + parserOperator, err := c.ParserConfig.Build(logger) + if err != nil { + return nil, err + } + + if c.Regex == "" { + return nil, fmt.Errorf("missing required field 'regex'") + } + + r, err := regexp.Compile(c.Regex) + if err != nil { + return nil, fmt.Errorf("compiling regex: %w", err) + } + + namedCaptureGroups := 0 + for _, groupName := range r.SubexpNames() { + if groupName != "" { + namedCaptureGroups++ + } + } + if namedCaptureGroups == 0 { + return nil, errors.NewError( + "no named capture groups in regex pattern", + "use named capture groups like '^(?P.*)$' to specify the key name for the parsed field", + ) + } + + op := &Parser{ + ParserOperator: parserOperator, + regexp: r, + } + + if c.Cache.Size > 0 { + op.cache = newMemoryCache(c.Cache.Size, 0) + logger.Debugf("configured %s with memory cache of size %d", op.ID(), op.cache.maxSize()) + } + + return op, nil +} diff --git a/pkg/stanza/operator/parser/regex/package_test.go b/pkg/stanza/operator/parser/regex/package_test.go new file mode 100644 index 000000000000..124de75b1119 --- /dev/null +++ b/pkg/stanza/operator/parser/regex/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package regex + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/parser/regex/parser.go b/pkg/stanza/operator/parser/regex/parser.go new file mode 100644 index 000000000000..2821ea551293 --- /dev/null +++ b/pkg/stanza/operator/parser/regex/parser.go @@ -0,0 +1,74 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package regex // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/regex" + +import ( + "context" + "fmt" + "regexp" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Parser is an operator that parses regex in an entry. +type Parser struct { + helper.ParserOperator + regexp *regexp.Regexp + cache cache +} + +func (p *Parser) Stop() error { + if p.cache != nil { + p.cache.stop() + } + return nil +} + +// Process will parse an entry for regex. +func (p *Parser) Process(ctx context.Context, entry *entry.Entry) error { + return p.ParserOperator.ProcessWith(ctx, entry, p.parse) +} + +// parse will parse a value using the supplied regex. +func (p *Parser) parse(value any) (any, error) { + var raw string + switch m := value.(type) { + case string: + raw = m + default: + return nil, fmt.Errorf("type '%T' cannot be parsed as regex", value) + } + return p.match(raw) +} + +func (p *Parser) match(value string) (any, error) { + if p.cache != nil { + if x := p.cache.get(value); x != nil { + return x, nil + } + } + + matches := p.regexp.FindStringSubmatch(value) + if matches == nil { + return nil, fmt.Errorf("regex pattern does not match") + } + + parsedValues := map[string]any{} + for i, subexp := range p.regexp.SubexpNames() { + if i == 0 { + // Skip whole match + continue + } + if subexp != "" { + parsedValues[subexp] = matches[i] + } + } + + if p.cache != nil { + p.cache.add(value, parsedValues) + } + + return parsedValues, nil +} diff --git a/pkg/stanza/operator/parser/regex/parser_test.go b/pkg/stanza/operator/parser/regex/parser_test.go new file mode 100644 index 000000000000..7b679ff6033e --- /dev/null +++ b/pkg/stanza/operator/parser/regex/parser_test.go @@ -0,0 +1,336 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package regex + +import ( + "context" + "fmt" + "math/rand" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +func newTestParser(t *testing.T, regex string, cacheSize uint16) *Parser { + cfg := NewConfigWithID("test") + cfg.Regex = regex + if cacheSize > 0 { + cfg.Cache.Size = cacheSize + } + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + return op.(*Parser) +} + +func TestParserBuildFailure(t *testing.T) { + cfg := NewConfigWithID("test") + cfg.OnError = "invalid_on_error" + _, err := cfg.Build(testutil.Logger(t)) + require.Error(t, err) + require.Contains(t, err.Error(), "invalid `on_error` field") +} + +func TestParserByteFailure(t *testing.T) { + parser := newTestParser(t, "^(?Ptest)", 0) + _, err := parser.parse([]byte("invalid")) + require.Error(t, err) + require.Contains(t, err.Error(), "type '[]uint8' cannot be parsed as regex") +} + +func TestParserStringFailure(t *testing.T) { + parser := newTestParser(t, "^(?Ptest)", 0) + _, err := parser.parse("invalid") + require.Error(t, err) + require.Contains(t, err.Error(), "regex pattern does not match") +} + +func TestParserInvalidType(t *testing.T) { + parser := newTestParser(t, "^(?Ptest)", 0) + _, err := parser.parse([]int{}) + require.Error(t, err) + require.Contains(t, err.Error(), "type '[]int' cannot be parsed as regex") +} + +func TestParserCache(t *testing.T) { + parser := newTestParser(t, "^(?Pcache)", 200) + defer func() { + require.NoError(t, parser.Stop()) + }() + _, err := parser.parse([]int{}) + require.Error(t, err) + require.Contains(t, err.Error(), "type '[]int' cannot be parsed as regex") + require.NotNil(t, parser.cache, "expected cache to be configured") + require.Equal(t, parser.cache.maxSize(), uint16(200)) +} + +func TestParserRegex(t *testing.T) { + cases := []struct { + name string + configure func(*Config) + input *entry.Entry + expected *entry.Entry + }{ + { + "RootString", + func(p *Config) { + p.Regex = "a=(?P.*)" + }, + &entry.Entry{ + Body: "a=b", + }, + &entry.Entry{ + Body: "a=b", + Attributes: map[string]any{ + "a": "b", + }, + }, + }, + { + "MemeoryCache", + func(p *Config) { + p.Regex = "a=(?P.*)" + p.Cache.Size = 100 + }, + &entry.Entry{ + Body: "a=b", + }, + &entry.Entry{ + Body: "a=b", + Attributes: map[string]any{ + "a": "b", + }, + }, + }, + { + "K8sFileCache", + func(p *Config) { + p.Regex = `^(?P[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?P[^_]+)_(?P.+)-(?P[a-z0-9]{64})\.log$` + p.Cache.Size = 100 + }, + &entry.Entry{ + Body: "coredns-5644d7b6d9-mzngq_kube-system_coredns-901f7510281180a402936c92f5bc0f3557f5a21ccb5a4591c5bf98f3ddbffdd6.log", + }, + &entry.Entry{ + Body: "coredns-5644d7b6d9-mzngq_kube-system_coredns-901f7510281180a402936c92f5bc0f3557f5a21ccb5a4591c5bf98f3ddbffdd6.log", + Attributes: map[string]any{ + "container_id": "901f7510281180a402936c92f5bc0f3557f5a21ccb5a4591c5bf98f3ddbffdd6", + "container_name": "coredns", + "namespace": "kube-system", + "pod_name": "coredns-5644d7b6d9-mzngq", + }, + }, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + cfg := NewConfigWithID("test") + cfg.OutputIDs = []string{"fake"} + tc.configure(cfg) + + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + + defer func() { + require.NoError(t, op.Stop()) + }() + + fake := testutil.NewFakeOutput(t) + require.NoError(t, op.SetOutputs([]operator.Operator{fake})) + + ots := time.Now() + tc.input.ObservedTimestamp = ots + tc.expected.ObservedTimestamp = ots + + err = op.Process(context.Background(), tc.input) + require.NoError(t, err) + + fake.ExpectEntry(t, tc.expected) + }) + } +} + +func TestBuildParserRegex(t *testing.T) { + newBasicParser := func() *Config { + cfg := NewConfigWithID("test") + cfg.OutputIDs = []string{"test"} + cfg.Regex = "(?P.*)" + return cfg + } + + t.Run("BasicConfig", func(t *testing.T) { + c := newBasicParser() + _, err := c.Build(testutil.Logger(t)) + require.NoError(t, err) + }) + + t.Run("MissingRegexField", func(t *testing.T) { + c := newBasicParser() + c.Regex = "" + _, err := c.Build(testutil.Logger(t)) + require.Error(t, err) + }) + + t.Run("InvalidRegexField", func(t *testing.T) { + c := newBasicParser() + c.Regex = "())()" + _, err := c.Build(testutil.Logger(t)) + require.Error(t, err) + }) + + t.Run("NoNamedGroups", func(t *testing.T) { + c := newBasicParser() + c.Regex = ".*" + _, err := c.Build(testutil.Logger(t)) + require.Error(t, err) + require.Contains(t, err.Error(), "no named capture groups") + }) + + t.Run("NoNamedGroups", func(t *testing.T) { + c := newBasicParser() + c.Regex = "(.*)" + _, err := c.Build(testutil.Logger(t)) + require.Error(t, err) + require.Contains(t, err.Error(), "no named capture groups") + }) +} + +// return 100 unique file names, example: +// dafplsjfbcxoeff-5644d7b6d9-mzngq_kube-system_coredns-901f7510281180a402936c92f5bc0f3557f5a21ccb5a4591c5bf98f3ddbffdd6.log +// rswxpldnjobcsnv-5644d7b6d9-mzngq_kube-system_coredns-901f7510281180a402936c92f5bc0f3557f5a21ccb5a4591c5bf98f3ddbffdd6.log +// lgtemapezqleqyh-5644d7b6d9-mzngq_kube-system_coredns-901f7510281180a402936c92f5bc0f3557f5a21ccb5a4591c5bf98f3ddbffdd6.log +func benchParseInput() (patterns []string) { + const letterBytes = "abcdefghijklmnopqrstuvwxyz" + for i := 1; i <= 100; i++ { + b := make([]byte, 15) + for i := range b { + b[i] = letterBytes[rand.Intn(len(letterBytes))] + } + randomStr := string(b) + p := fmt.Sprintf("%s-5644d7b6d9-mzngq_kube-system_coredns-901f7510281180a402936c92f5bc0f3557f5a21ccb5a4591c5bf98f3ddbffdd6.log", randomStr) + patterns = append(patterns, p) + } + return patterns +} + +// Regex used to parse a kubernetes container log file name, which contains the +// pod name, namespace, container name, container. +const benchParsePattern = `^(?P[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?P[^_]+)_(?P.+)-(?P[a-z0-9]{64})\.log$` + +var benchParsePatterns = benchParseInput() + +func newTestBenchParser(t *testing.T, cacheSize uint16) *Parser { + cfg := NewConfigWithID("bench") + cfg.Regex = benchParsePattern + cfg.Cache.Size = cacheSize + + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + return op.(*Parser) +} + +func benchmarkParseThreaded(b *testing.B, parser *Parser, input []string) { + wg := sync.WaitGroup{} + + for _, i := range input { + wg.Add(1) + + go func(i string) { + if _, err := parser.match(i); err != nil { + b.Error(err) + } + wg.Done() + }(i) + } + + wg.Wait() +} + +func benchmarkParse(b *testing.B, parser *Parser, input []string) { + for _, i := range input { + if _, err := parser.match(i); err != nil { + b.Error(err) + } + } +} + +// No cache +func BenchmarkParseNoCache(b *testing.B) { + parser := newTestBenchParser(&testing.T{}, 0) + for n := 0; n < b.N; n++ { + benchmarkParseThreaded(b, parser, benchParsePatterns) + } +} + +// Memory cache at capacity +func BenchmarkParseWithMemoryCache(b *testing.B) { + parser := newTestBenchParser(&testing.T{}, 100) + for n := 0; n < b.N; n++ { + benchmarkParseThreaded(b, parser, benchParsePatterns) + } +} + +// Memory cache over capacity by one +func BenchmarkParseWithMemoryCacheFullByOne(b *testing.B) { + parser := newTestBenchParser(&testing.T{}, 99) + for n := 0; n < b.N; n++ { + benchmarkParseThreaded(b, parser, benchParsePatterns) + } +} + +// Memory cache over capacity by 10 +func BenchmarkParseWithMemoryCacheFullBy10(b *testing.B) { + parser := newTestBenchParser(&testing.T{}, 90) + for n := 0; n < b.N; n++ { + benchmarkParseThreaded(b, parser, benchParsePatterns) + } +} + +// Memory cache over capacity by 50 +func BenchmarkParseWithMemoryCacheFullBy50(b *testing.B) { + parser := newTestBenchParser(&testing.T{}, 50) + for n := 0; n < b.N; n++ { + benchmarkParseThreaded(b, parser, benchParsePatterns) + } +} + +// Memory cache over capacity by 90 +func BenchmarkParseWithMemoryCacheFullBy90(b *testing.B) { + parser := newTestBenchParser(&testing.T{}, 10) + for n := 0; n < b.N; n++ { + benchmarkParseThreaded(b, parser, benchParsePatterns) + } +} + +// Memory cache over capacity by 99 +func BenchmarkParseWithMemoryCacheFullBy99(b *testing.B) { + parser := newTestBenchParser(&testing.T{}, 1) + for n := 0; n < b.N; n++ { + benchmarkParseThreaded(b, parser, benchParsePatterns) + } +} + +// No cache one file +func BenchmarkParseNoCacheOneFile(b *testing.B) { + parser := newTestBenchParser(&testing.T{}, 0) + for n := 0; n < b.N; n++ { + pattern := []string{benchParsePatterns[0]} + benchmarkParse(b, parser, pattern) + } +} + +// Memory cache one file +func BenchmarkParseWithMemoryCacheOneFile(b *testing.B) { + parser := newTestBenchParser(&testing.T{}, 100) + for n := 0; n < b.N; n++ { + pattern := []string{benchParsePatterns[0]} + benchmarkParse(b, parser, pattern) + } +} diff --git a/pkg/stanza/operator/parser/regex/regex.go b/pkg/stanza/operator/parser/regex/regex.go deleted file mode 100644 index 67df235db838..000000000000 --- a/pkg/stanza/operator/parser/regex/regex.go +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package regex // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/regex" - -import ( - "context" - "fmt" - "regexp" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/errors" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "regex_parser" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new regex parser config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new regex parser config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - ParserConfig: helper.NewParserConfig(operatorID, operatorType), - } -} - -// Config is the configuration of a regex parser operator. -type Config struct { - helper.ParserConfig `mapstructure:",squash"` - - Regex string `mapstructure:"regex"` - - Cache struct { - Size uint16 `mapstructure:"size"` - } `mapstructure:"cache"` -} - -// Build will build a regex parser operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - parserOperator, err := c.ParserConfig.Build(logger) - if err != nil { - return nil, err - } - - if c.Regex == "" { - return nil, fmt.Errorf("missing required field 'regex'") - } - - r, err := regexp.Compile(c.Regex) - if err != nil { - return nil, fmt.Errorf("compiling regex: %w", err) - } - - namedCaptureGroups := 0 - for _, groupName := range r.SubexpNames() { - if groupName != "" { - namedCaptureGroups++ - } - } - if namedCaptureGroups == 0 { - return nil, errors.NewError( - "no named capture groups in regex pattern", - "use named capture groups like '^(?P.*)$' to specify the key name for the parsed field", - ) - } - - op := &Parser{ - ParserOperator: parserOperator, - regexp: r, - } - - if c.Cache.Size > 0 { - op.cache = newMemoryCache(c.Cache.Size, 0) - logger.Debugf("configured %s with memory cache of size %d", op.ID(), op.cache.maxSize()) - } - - return op, nil -} - -// Parser is an operator that parses regex in an entry. -type Parser struct { - helper.ParserOperator - regexp *regexp.Regexp - cache cache -} - -// Process will parse an entry for regex. -func (r *Parser) Process(ctx context.Context, entry *entry.Entry) error { - return r.ParserOperator.ProcessWith(ctx, entry, r.parse) -} - -// parse will parse a value using the supplied regex. -func (r *Parser) parse(value any) (any, error) { - var raw string - switch m := value.(type) { - case string: - raw = m - default: - return nil, fmt.Errorf("type '%T' cannot be parsed as regex", value) - } - return r.match(raw) -} - -func (r *Parser) match(value string) (any, error) { - if r.cache != nil { - if x := r.cache.get(value); x != nil { - return x, nil - } - } - - matches := r.regexp.FindStringSubmatch(value) - if matches == nil { - return nil, fmt.Errorf("regex pattern does not match") - } - - parsedValues := map[string]any{} - for i, subexp := range r.regexp.SubexpNames() { - if i == 0 { - // Skip whole match - continue - } - if subexp != "" { - parsedValues[subexp] = matches[i] - } - } - - if r.cache != nil { - r.cache.add(value, parsedValues) - } - - return parsedValues, nil -} diff --git a/pkg/stanza/operator/parser/regex/regex_test.go b/pkg/stanza/operator/parser/regex/regex_test.go deleted file mode 100644 index 20831497f1fa..000000000000 --- a/pkg/stanza/operator/parser/regex/regex_test.go +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package regex - -import ( - "context" - "fmt" - "math/rand" - "sync" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" -) - -func newTestParser(t *testing.T, regex string, cacheSize uint16) *Parser { - cfg := NewConfigWithID("test") - cfg.Regex = regex - if cacheSize > 0 { - cfg.Cache.Size = cacheSize - } - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - return op.(*Parser) -} - -func TestParserBuildFailure(t *testing.T) { - cfg := NewConfigWithID("test") - cfg.OnError = "invalid_on_error" - _, err := cfg.Build(testutil.Logger(t)) - require.Error(t, err) - require.Contains(t, err.Error(), "invalid `on_error` field") -} - -func TestParserByteFailure(t *testing.T) { - parser := newTestParser(t, "^(?Ptest)", 0) - _, err := parser.parse([]byte("invalid")) - require.Error(t, err) - require.Contains(t, err.Error(), "type '[]uint8' cannot be parsed as regex") -} - -func TestParserStringFailure(t *testing.T) { - parser := newTestParser(t, "^(?Ptest)", 0) - _, err := parser.parse("invalid") - require.Error(t, err) - require.Contains(t, err.Error(), "regex pattern does not match") -} - -func TestParserInvalidType(t *testing.T) { - parser := newTestParser(t, "^(?Ptest)", 0) - _, err := parser.parse([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type '[]int' cannot be parsed as regex") -} - -func TestParserCache(t *testing.T) { - parser := newTestParser(t, "^(?Pcache)", 200) - _, err := parser.parse([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type '[]int' cannot be parsed as regex") - require.NotNil(t, parser.cache, "expected cache to be configured") - require.Equal(t, parser.cache.maxSize(), uint16(200)) -} - -func TestParserRegex(t *testing.T) { - cases := []struct { - name string - configure func(*Config) - input *entry.Entry - expected *entry.Entry - }{ - { - "RootString", - func(p *Config) { - p.Regex = "a=(?P.*)" - }, - &entry.Entry{ - Body: "a=b", - }, - &entry.Entry{ - Body: "a=b", - Attributes: map[string]any{ - "a": "b", - }, - }, - }, - { - "MemeoryCache", - func(p *Config) { - p.Regex = "a=(?P.*)" - p.Cache.Size = 100 - }, - &entry.Entry{ - Body: "a=b", - }, - &entry.Entry{ - Body: "a=b", - Attributes: map[string]any{ - "a": "b", - }, - }, - }, - { - "K8sFileCache", - func(p *Config) { - p.Regex = `^(?P[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?P[^_]+)_(?P.+)-(?P[a-z0-9]{64})\.log$` - p.Cache.Size = 100 - }, - &entry.Entry{ - Body: "coredns-5644d7b6d9-mzngq_kube-system_coredns-901f7510281180a402936c92f5bc0f3557f5a21ccb5a4591c5bf98f3ddbffdd6.log", - }, - &entry.Entry{ - Body: "coredns-5644d7b6d9-mzngq_kube-system_coredns-901f7510281180a402936c92f5bc0f3557f5a21ccb5a4591c5bf98f3ddbffdd6.log", - Attributes: map[string]any{ - "container_id": "901f7510281180a402936c92f5bc0f3557f5a21ccb5a4591c5bf98f3ddbffdd6", - "container_name": "coredns", - "namespace": "kube-system", - "pod_name": "coredns-5644d7b6d9-mzngq", - }, - }, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - cfg := NewConfigWithID("test") - cfg.OutputIDs = []string{"fake"} - tc.configure(cfg) - - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - - fake := testutil.NewFakeOutput(t) - require.NoError(t, op.SetOutputs([]operator.Operator{fake})) - - ots := time.Now() - tc.input.ObservedTimestamp = ots - tc.expected.ObservedTimestamp = ots - - err = op.Process(context.Background(), tc.input) - require.NoError(t, err) - - fake.ExpectEntry(t, tc.expected) - }) - } -} - -func TestBuildParserRegex(t *testing.T) { - newBasicParser := func() *Config { - cfg := NewConfigWithID("test") - cfg.OutputIDs = []string{"test"} - cfg.Regex = "(?P.*)" - return cfg - } - - t.Run("BasicConfig", func(t *testing.T) { - c := newBasicParser() - _, err := c.Build(testutil.Logger(t)) - require.NoError(t, err) - }) - - t.Run("MissingRegexField", func(t *testing.T) { - c := newBasicParser() - c.Regex = "" - _, err := c.Build(testutil.Logger(t)) - require.Error(t, err) - }) - - t.Run("InvalidRegexField", func(t *testing.T) { - c := newBasicParser() - c.Regex = "())()" - _, err := c.Build(testutil.Logger(t)) - require.Error(t, err) - }) - - t.Run("NoNamedGroups", func(t *testing.T) { - c := newBasicParser() - c.Regex = ".*" - _, err := c.Build(testutil.Logger(t)) - require.Error(t, err) - require.Contains(t, err.Error(), "no named capture groups") - }) - - t.Run("NoNamedGroups", func(t *testing.T) { - c := newBasicParser() - c.Regex = "(.*)" - _, err := c.Build(testutil.Logger(t)) - require.Error(t, err) - require.Contains(t, err.Error(), "no named capture groups") - }) -} - -// return 100 unique file names, example: -// dafplsjfbcxoeff-5644d7b6d9-mzngq_kube-system_coredns-901f7510281180a402936c92f5bc0f3557f5a21ccb5a4591c5bf98f3ddbffdd6.log -// rswxpldnjobcsnv-5644d7b6d9-mzngq_kube-system_coredns-901f7510281180a402936c92f5bc0f3557f5a21ccb5a4591c5bf98f3ddbffdd6.log -// lgtemapezqleqyh-5644d7b6d9-mzngq_kube-system_coredns-901f7510281180a402936c92f5bc0f3557f5a21ccb5a4591c5bf98f3ddbffdd6.log -func benchParseInput() (patterns []string) { - const letterBytes = "abcdefghijklmnopqrstuvwxyz" - for i := 1; i <= 100; i++ { - b := make([]byte, 15) - for i := range b { - b[i] = letterBytes[rand.Intn(len(letterBytes))] - } - randomStr := string(b) - p := fmt.Sprintf("%s-5644d7b6d9-mzngq_kube-system_coredns-901f7510281180a402936c92f5bc0f3557f5a21ccb5a4591c5bf98f3ddbffdd6.log", randomStr) - patterns = append(patterns, p) - } - return patterns -} - -// Regex used to parse a kubernetes container log file name, which contains the -// pod name, namespace, container name, container. -const benchParsePattern = `^(?P[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?P[^_]+)_(?P.+)-(?P[a-z0-9]{64})\.log$` - -var benchParsePatterns = benchParseInput() - -func newTestBenchParser(t *testing.T, cacheSize uint16) *Parser { - cfg := NewConfigWithID("bench") - cfg.Regex = benchParsePattern - cfg.Cache.Size = cacheSize - - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - return op.(*Parser) -} - -func benchmarkParseThreaded(b *testing.B, parser *Parser, input []string) { - wg := sync.WaitGroup{} - - for _, i := range input { - wg.Add(1) - - go func(i string) { - if _, err := parser.match(i); err != nil { - b.Error(err) - } - wg.Done() - }(i) - } - - wg.Wait() -} - -func benchmarkParse(b *testing.B, parser *Parser, input []string) { - for _, i := range input { - if _, err := parser.match(i); err != nil { - b.Error(err) - } - } -} - -// No cache -func BenchmarkParseNoCache(b *testing.B) { - parser := newTestBenchParser(&testing.T{}, 0) - for n := 0; n < b.N; n++ { - benchmarkParseThreaded(b, parser, benchParsePatterns) - } -} - -// Memory cache at capacity -func BenchmarkParseWithMemoryCache(b *testing.B) { - parser := newTestBenchParser(&testing.T{}, 100) - for n := 0; n < b.N; n++ { - benchmarkParseThreaded(b, parser, benchParsePatterns) - } -} - -// Memory cache over capacity by one -func BenchmarkParseWithMemoryCacheFullByOne(b *testing.B) { - parser := newTestBenchParser(&testing.T{}, 99) - for n := 0; n < b.N; n++ { - benchmarkParseThreaded(b, parser, benchParsePatterns) - } -} - -// Memory cache over capacity by 10 -func BenchmarkParseWithMemoryCacheFullBy10(b *testing.B) { - parser := newTestBenchParser(&testing.T{}, 90) - for n := 0; n < b.N; n++ { - benchmarkParseThreaded(b, parser, benchParsePatterns) - } -} - -// Memory cache over capacity by 50 -func BenchmarkParseWithMemoryCacheFullBy50(b *testing.B) { - parser := newTestBenchParser(&testing.T{}, 50) - for n := 0; n < b.N; n++ { - benchmarkParseThreaded(b, parser, benchParsePatterns) - } -} - -// Memory cache over capacity by 90 -func BenchmarkParseWithMemoryCacheFullBy90(b *testing.B) { - parser := newTestBenchParser(&testing.T{}, 10) - for n := 0; n < b.N; n++ { - benchmarkParseThreaded(b, parser, benchParsePatterns) - } -} - -// Memory cache over capacity by 99 -func BenchmarkParseWithMemoryCacheFullBy99(b *testing.B) { - parser := newTestBenchParser(&testing.T{}, 1) - for n := 0; n < b.N; n++ { - benchmarkParseThreaded(b, parser, benchParsePatterns) - } -} - -// No cache one file -func BenchmarkParseNoCacheOneFile(b *testing.B) { - parser := newTestBenchParser(&testing.T{}, 0) - for n := 0; n < b.N; n++ { - pattern := []string{benchParsePatterns[0]} - benchmarkParse(b, parser, pattern) - } -} - -// Memory cache one file -func BenchmarkParseWithMemoryCacheOneFile(b *testing.B) { - parser := newTestBenchParser(&testing.T{}, 100) - for n := 0; n < b.N; n++ { - pattern := []string{benchParsePatterns[0]} - benchmarkParse(b, parser, pattern) - } -} diff --git a/pkg/stanza/operator/parser/scope/config.go b/pkg/stanza/operator/parser/scope/config.go new file mode 100644 index 000000000000..52a32c00f58d --- /dev/null +++ b/pkg/stanza/operator/parser/scope/config.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package scope // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/scope" + +import ( + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "scope_name_parser" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new logger name parser config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new logger name parser config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + ScopeNameParser: helper.NewScopeNameParser(), + } +} + +// Config is the configuration of a logger name parser operator. +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` + helper.ScopeNameParser `mapstructure:",omitempty,squash"` +} + +// Build will build a logger name parser operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformerOperator, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, err + } + + return &Parser{ + TransformerOperator: transformerOperator, + ScopeNameParser: c.ScopeNameParser, + }, nil +} diff --git a/pkg/stanza/operator/parser/scope/config_test.go b/pkg/stanza/operator/parser/scope/config_test.go index e7509787aedb..a3bcb83cd2cc 100644 --- a/pkg/stanza/operator/parser/scope/config_test.go +++ b/pkg/stanza/operator/parser/scope/config_test.go @@ -35,10 +35,6 @@ func TestConfig(t *testing.T) { return cfg }(), }, - { - Name: "no_nested", - ExpectErr: true, - }, }, }.Run(t) } diff --git a/pkg/stanza/operator/parser/scope/package_test.go b/pkg/stanza/operator/parser/scope/package_test.go new file mode 100644 index 000000000000..e89bc8169940 --- /dev/null +++ b/pkg/stanza/operator/parser/scope/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package scope + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/parser/scope/parser.go b/pkg/stanza/operator/parser/scope/parser.go new file mode 100644 index 000000000000..909b89872152 --- /dev/null +++ b/pkg/stanza/operator/parser/scope/parser.go @@ -0,0 +1,22 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package scope // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/scope" + +import ( + "context" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Parser is an operator that parses logger name from a field to an entry. +type Parser struct { + helper.TransformerOperator + helper.ScopeNameParser +} + +// Process will parse logger name from an entry. +func (p *Parser) Process(ctx context.Context, entry *entry.Entry) error { + return p.ProcessWith(ctx, entry, p.Parse) +} diff --git a/pkg/stanza/operator/parser/scope/scope_name_test.go b/pkg/stanza/operator/parser/scope/parser_test.go similarity index 100% rename from pkg/stanza/operator/parser/scope/scope_name_test.go rename to pkg/stanza/operator/parser/scope/parser_test.go diff --git a/pkg/stanza/operator/parser/scope/scope_name.go b/pkg/stanza/operator/parser/scope/scope_name.go deleted file mode 100644 index 819286391b86..000000000000 --- a/pkg/stanza/operator/parser/scope/scope_name.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package scope // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/scope" - -import ( - "context" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "scope_name_parser" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new logger name parser config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new logger name parser config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), - ScopeNameParser: helper.NewScopeNameParser(), - } -} - -// Config is the configuration of a logger name parser operator. -type Config struct { - helper.TransformerConfig `mapstructure:",squash"` - helper.ScopeNameParser `mapstructure:",omitempty,squash"` -} - -// Build will build a logger name parser operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - transformerOperator, err := c.TransformerConfig.Build(logger) - if err != nil { - return nil, err - } - - return &Parser{ - TransformerOperator: transformerOperator, - ScopeNameParser: c.ScopeNameParser, - }, nil -} - -// Parser is an operator that parses logger name from a field to an entry. -type Parser struct { - helper.TransformerOperator - helper.ScopeNameParser -} - -// Process will parse logger name from an entry. -func (p *Parser) Process(ctx context.Context, entry *entry.Entry) error { - return p.ProcessWith(ctx, entry, p.Parse) -} diff --git a/pkg/stanza/operator/parser/severity/config.go b/pkg/stanza/operator/parser/severity/config.go new file mode 100644 index 000000000000..cc0c900aaf14 --- /dev/null +++ b/pkg/stanza/operator/parser/severity/config.go @@ -0,0 +1,54 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package severity // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/severity" + +import ( + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "severity_parser" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new severity parser config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new severity parser config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + SeverityConfig: helper.NewSeverityConfig(), + } +} + +// Config is the configuration of a severity parser operator. +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` + helper.SeverityConfig `mapstructure:",omitempty,squash"` +} + +// Build will build a severity parser operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformerOperator, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, err + } + + severityParser, err := c.SeverityConfig.Build(logger) + if err != nil { + return nil, err + } + + return &Parser{ + TransformerOperator: transformerOperator, + SeverityParser: severityParser, + }, nil +} diff --git a/pkg/stanza/operator/parser/severity/config_test.go b/pkg/stanza/operator/parser/severity/config_test.go index 905092a41738..18fa853a485d 100644 --- a/pkg/stanza/operator/parser/severity/config_test.go +++ b/pkg/stanza/operator/parser/severity/config_test.go @@ -46,10 +46,6 @@ func TestUnmarshal(t *testing.T) { return cfg }(), }, - { - Name: "no_nested", - ExpectErr: true, - }, }, }.Run(t) } diff --git a/pkg/stanza/operator/parser/severity/package_test.go b/pkg/stanza/operator/parser/severity/package_test.go new file mode 100644 index 000000000000..51a2fb84aba5 --- /dev/null +++ b/pkg/stanza/operator/parser/severity/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package severity + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/parser/severity/parser.go b/pkg/stanza/operator/parser/severity/parser.go new file mode 100644 index 000000000000..a2edf482c831 --- /dev/null +++ b/pkg/stanza/operator/parser/severity/parser.go @@ -0,0 +1,22 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package severity // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/severity" + +import ( + "context" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Parser is an operator that parses severity from a field to an entry. +type Parser struct { + helper.TransformerOperator + helper.SeverityParser +} + +// Process will parse severity from an entry. +func (p *Parser) Process(ctx context.Context, entry *entry.Entry) error { + return p.ProcessWith(ctx, entry, p.Parse) +} diff --git a/pkg/stanza/operator/parser/severity/severity_test.go b/pkg/stanza/operator/parser/severity/parser_test.go similarity index 100% rename from pkg/stanza/operator/parser/severity/severity_test.go rename to pkg/stanza/operator/parser/severity/parser_test.go diff --git a/pkg/stanza/operator/parser/severity/severity.go b/pkg/stanza/operator/parser/severity/severity.go deleted file mode 100644 index 98c797c68c6b..000000000000 --- a/pkg/stanza/operator/parser/severity/severity.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package severity // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/severity" - -import ( - "context" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "severity_parser" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new severity parser config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new severity parser config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), - SeverityConfig: helper.NewSeverityConfig(), - } -} - -// Config is the configuration of a severity parser operator. -type Config struct { - helper.TransformerConfig `mapstructure:",squash"` - helper.SeverityConfig `mapstructure:",omitempty,squash"` -} - -// Build will build a severity parser operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - transformerOperator, err := c.TransformerConfig.Build(logger) - if err != nil { - return nil, err - } - - severityParser, err := c.SeverityConfig.Build(logger) - if err != nil { - return nil, err - } - - return &Parser{ - TransformerOperator: transformerOperator, - SeverityParser: severityParser, - }, nil -} - -// Parser is an operator that parses severity from a field to an entry. -type Parser struct { - helper.TransformerOperator - helper.SeverityParser -} - -// Process will parse severity from an entry. -func (p *Parser) Process(ctx context.Context, entry *entry.Entry) error { - return p.ProcessWith(ctx, entry, p.Parse) -} diff --git a/pkg/stanza/operator/parser/syslog/config.go b/pkg/stanza/operator/parser/syslog/config.go new file mode 100644 index 000000000000..63afc10d015c --- /dev/null +++ b/pkg/stanza/operator/parser/syslog/config.go @@ -0,0 +1,109 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package syslog // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/syslog" + +import ( + "errors" + "fmt" + "strings" + "time" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const ( + operatorType = "syslog_parser" + + RFC3164 = "rfc3164" + RFC5424 = "rfc5424" + + NULTrailer = "NUL" + LFTrailer = "LF" +) + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new syslog parser config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new syslog parser config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + ParserConfig: helper.NewParserConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a syslog parser operator. +type Config struct { + helper.ParserConfig `mapstructure:",squash"` + BaseConfig `mapstructure:",squash"` +} + +// BaseConfig is the detailed configuration of a syslog parser. +type BaseConfig struct { + Protocol string `mapstructure:"protocol,omitempty"` + Location string `mapstructure:"location,omitempty"` + EnableOctetCounting bool `mapstructure:"enable_octet_counting,omitempty"` + AllowSkipPriHeader bool `mapstructure:"allow_skip_pri_header,omitempty"` + NonTransparentFramingTrailer *string `mapstructure:"non_transparent_framing_trailer,omitempty"` +} + +// Build will build a JSON parser operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + if c.ParserConfig.TimeParser == nil { + parseFromField := entry.NewAttributeField("timestamp") + c.ParserConfig.TimeParser = &helper.TimeParser{ + ParseFrom: &parseFromField, + LayoutType: helper.NativeKey, + } + } + + parserOperator, err := c.ParserConfig.Build(logger) + if err != nil { + return nil, err + } + + proto := strings.ToLower(c.Protocol) + + switch { + case proto == "": + return nil, fmt.Errorf("missing field 'protocol'") + case proto != RFC5424 && (c.NonTransparentFramingTrailer != nil || c.EnableOctetCounting): + return nil, errors.New("octet_counting and non_transparent_framing are only compatible with protocol rfc5424") + case proto == RFC5424 && (c.NonTransparentFramingTrailer != nil && c.EnableOctetCounting): + return nil, errors.New("only one of octet_counting or non_transparent_framing can be enabled") + case proto == RFC5424 && c.NonTransparentFramingTrailer != nil: + if *c.NonTransparentFramingTrailer != NULTrailer && *c.NonTransparentFramingTrailer != LFTrailer { + return nil, fmt.Errorf("invalid non_transparent_framing_trailer '%s'. Must be either 'LF' or 'NUL'", *c.NonTransparentFramingTrailer) + } + case proto != RFC5424 && proto != RFC3164: + return nil, fmt.Errorf("unsupported protocol version: %s", proto) + } + + if c.Location == "" { + c.Location = "UTC" + } + + location, err := time.LoadLocation(c.Location) + if err != nil { + return nil, fmt.Errorf("failed to load location %s: %w", c.Location, err) + } + + return &Parser{ + ParserOperator: parserOperator, + protocol: proto, + location: location, + enableOctetCounting: c.EnableOctetCounting, + allowSkipPriHeader: c.AllowSkipPriHeader, + nonTransparentFramingTrailer: c.NonTransparentFramingTrailer, + }, nil +} diff --git a/pkg/stanza/operator/parser/syslog/data.go b/pkg/stanza/operator/parser/syslog/data.go index 5c6b0f0009b5..835f8a1a3258 100644 --- a/pkg/stanza/operator/parser/syslog/data.go +++ b/pkg/stanza/operator/parser/syslog/data.go @@ -56,6 +56,60 @@ func CreateCases(basicConfig func() *Config) ([]Case, error) { ts := time.Now() var cases = []Case{ + { + "RFC3164SkipPriAbsent", + func() *Config { + cfg := basicConfig() + cfg.Protocol = RFC3164 + cfg.Location = location["utc"].String() + cfg.AllowSkipPriHeader = true + return cfg + }(), + &entry.Entry{ + Body: fmt.Sprintf("%s 1.2.3.4 apache_server: test message", ts.Format("Jan _2 15:04:05")), + }, + &entry.Entry{ + Timestamp: time.Date(ts.Year(), ts.Month(), ts.Day(), ts.Hour(), ts.Minute(), ts.Second(), 0, location["utc"]), + Severity: entry.Default, + SeverityText: "", + Attributes: map[string]any{ + "appname": "apache_server", + "hostname": "1.2.3.4", + "message": "test message", + }, + Body: fmt.Sprintf("%s 1.2.3.4 apache_server: test message", ts.Format("Jan _2 15:04:05")), + }, + true, + true, + }, + { + "RFC3164SkipPriPresent", + func() *Config { + cfg := basicConfig() + cfg.Protocol = RFC3164 + cfg.Location = location["utc"].String() + cfg.AllowSkipPriHeader = true + return cfg + }(), + &entry.Entry{ + Body: fmt.Sprintf("<123>%s 1.2.3.4 apache_server: test message", ts.Format("Jan _2 15:04:05")), + }, + &entry.Entry{ + Timestamp: time.Date(ts.Year(), ts.Month(), ts.Day(), ts.Hour(), ts.Minute(), ts.Second(), 0, location["utc"]), + Severity: entry.Error, + SeverityText: "err", + Attributes: map[string]any{ + "appname": "apache_server", + "hostname": "1.2.3.4", + "message": "test message", + "facility": 15, + "priority": 123, + }, + Body: fmt.Sprintf("<123>%s 1.2.3.4 apache_server: test message", ts.Format("Jan _2 15:04:05")), + }, + true, + true, + }, { "RFC3164", func() *Config { @@ -174,6 +228,80 @@ func CreateCases(basicConfig func() *Config) ([]Case, error) { true, true, }, + { + "RFC5424SkipPriAbsent", + func() *Config { + cfg := basicConfig() + cfg.Protocol = RFC5424 + cfg.AllowSkipPriHeader = true + return cfg + }(), + &entry.Entry{ + Body: `1 2015-08-05T21:58:59.693Z 192.168.2.132 SecureAuth0 23108 ID52020 [SecureAuth@27389 UserHostAddress="192.168.2.132" Realm="SecureAuth0" UserID="Tester2" PEN="27389"] Found the user for retrieving user's profile`, + }, + &entry.Entry{ + Timestamp: time.Date(2015, 8, 5, 21, 58, 59, 693000000, time.UTC), + Severity: entry.Default, + SeverityText: "", + Attributes: map[string]any{ + "appname": "SecureAuth0", + "hostname": "192.168.2.132", + "message": "Found the user for retrieving user's profile", + "msg_id": "ID52020", + "proc_id": "23108", + "structured_data": map[string]any{ + "SecureAuth@27389": map[string]any{ + "PEN": "27389", + "Realm": "SecureAuth0", + "UserHostAddress": "192.168.2.132", + "UserID": "Tester2", + }, + }, + "version": 1, + }, + Body: `1 2015-08-05T21:58:59.693Z 192.168.2.132 SecureAuth0 23108 ID52020 [SecureAuth@27389 UserHostAddress="192.168.2.132" Realm="SecureAuth0" UserID="Tester2" PEN="27389"] Found the user for retrieving user's profile`, + }, + true, + true, + }, + { + "RFC5424SkipPriPresent", + func() *Config { + cfg := basicConfig() + cfg.Protocol = RFC5424 + cfg.AllowSkipPriHeader = true + return cfg + }(), + &entry.Entry{ + Body: `<123>1 2015-08-05T21:58:59.693Z 192.168.2.132 SecureAuth0 23108 ID52020 [SecureAuth@27389 UserHostAddress="192.168.2.132" Realm="SecureAuth0" UserID="Tester2" PEN="27389"] Found the user for retrieving user's profile`, + }, + &entry.Entry{ + Timestamp: time.Date(2015, 8, 5, 21, 58, 59, 693000000, time.UTC), + Severity: entry.Error, + SeverityText: "err", + Attributes: map[string]any{ + "appname": "SecureAuth0", + "hostname": "192.168.2.132", + "message": "Found the user for retrieving user's profile", + "msg_id": "ID52020", + "proc_id": "23108", + "structured_data": map[string]any{ + "SecureAuth@27389": map[string]any{ + "PEN": "27389", + "Realm": "SecureAuth0", + "UserHostAddress": "192.168.2.132", + "UserID": "Tester2", + }, + }, + "version": 1, + "facility": 15, + "priority": 123, + }, + Body: `<123>1 2015-08-05T21:58:59.693Z 192.168.2.132 SecureAuth0 23108 ID52020 [SecureAuth@27389 UserHostAddress="192.168.2.132" Realm="SecureAuth0" UserID="Tester2" PEN="27389"] Found the user for retrieving user's profile`, + }, + true, + true, + }, { "RFC6587 Octet Counting", func() *Config { diff --git a/pkg/stanza/operator/parser/syslog/package_test.go b/pkg/stanza/operator/parser/syslog/package_test.go new file mode 100644 index 000000000000..6ef82f85716f --- /dev/null +++ b/pkg/stanza/operator/parser/syslog/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package syslog + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/parser/syslog/parser.go b/pkg/stanza/operator/parser/syslog/parser.go new file mode 100644 index 000000000000..b198c58232dd --- /dev/null +++ b/pkg/stanza/operator/parser/syslog/parser.go @@ -0,0 +1,319 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package syslog // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/syslog" + +import ( + "bytes" + "context" + "fmt" + "regexp" + "time" + + sl "github.com/influxdata/go-syslog/v3" + "github.com/influxdata/go-syslog/v3/nontransparent" + "github.com/influxdata/go-syslog/v3/octetcounting" + "github.com/influxdata/go-syslog/v3/rfc3164" + "github.com/influxdata/go-syslog/v3/rfc5424" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +var priRegex = regexp.MustCompile(`\<\d{1,3}\>`) + +// parseFunc a parseFunc determines how the raw input is to be parsed into a syslog message +type parseFunc func(input []byte) (sl.Message, error) + +// Parser is an operator that parses syslog. +type Parser struct { + helper.ParserOperator + protocol string + location *time.Location + enableOctetCounting bool + allowSkipPriHeader bool + nonTransparentFramingTrailer *string +} + +// Process will parse an entry field as syslog. +func (p *Parser) Process(ctx context.Context, entry *entry.Entry) error { + + // if pri header is missing and this is an expected behavior then facility and severity values should be skipped. + if !p.enableOctetCounting && p.allowSkipPriHeader { + + bytes, err := toBytes(entry.Body) + if err != nil { + return err + } + + if p.shouldSkipPriorityValues(bytes) { + return p.ParserOperator.ProcessWithCallback(ctx, entry, p.parse, postprocessWithoutPriHeader) + } + } + + return p.ParserOperator.ProcessWithCallback(ctx, entry, p.parse, postprocess) +} + +// parse will parse a value as syslog. +func (p *Parser) parse(value any) (any, error) { + bytes, err := toBytes(value) + if err != nil { + return nil, err + } + + pFunc, err := p.buildParseFunc() + if err != nil { + return nil, err + } + + slog, err := pFunc(bytes) + if err != nil { + return nil, err + } + + skipPriHeaderValues := p.shouldSkipPriorityValues(bytes) + + switch message := slog.(type) { + case *rfc3164.SyslogMessage: + return p.parseRFC3164(message, skipPriHeaderValues) + case *rfc5424.SyslogMessage: + return p.parseRFC5424(message, skipPriHeaderValues) + default: + return nil, fmt.Errorf("parsed value was not rfc3164 or rfc5424 compliant") + } +} + +func (p *Parser) buildParseFunc() (parseFunc, error) { + switch p.protocol { + case RFC3164: + return func(input []byte) (sl.Message, error) { + if p.allowSkipPriHeader && !priRegex.Match(input) { + input = append([]byte("<0>"), input...) + } + return rfc3164.NewMachine(rfc3164.WithLocaleTimezone(p.location)).Parse(input) + }, nil + case RFC5424: + switch { + // Octet Counting Parsing RFC6587 + case p.enableOctetCounting: + return newOctetCountingParseFunc(), nil + // Non-Transparent-Framing Parsing RFC6587 + case p.nonTransparentFramingTrailer != nil && *p.nonTransparentFramingTrailer == LFTrailer: + return newNonTransparentFramingParseFunc(nontransparent.LF), nil + case p.nonTransparentFramingTrailer != nil && *p.nonTransparentFramingTrailer == NULTrailer: + return newNonTransparentFramingParseFunc(nontransparent.NUL), nil + // Raw RFC5424 parsing + default: + return func(input []byte) (sl.Message, error) { + if p.allowSkipPriHeader && !priRegex.Match(input) { + input = append([]byte("<0>"), input...) + } + return rfc5424.NewMachine().Parse(input) + }, nil + } + + default: + return nil, fmt.Errorf("invalid protocol %s", p.protocol) + } +} + +func (p *Parser) shouldSkipPriorityValues(value []byte) bool { + if !p.enableOctetCounting && p.allowSkipPriHeader { + // check if entry starts with '<'. + // if not it means that the pre header was missing from the body and hence we should skip it. + if len(value) > 1 && value[0] != '<' { + return true + } + } + return false +} + +// parseRFC3164 will parse an RFC3164 syslog message. +func (p *Parser) parseRFC3164(syslogMessage *rfc3164.SyslogMessage, skipPriHeaderValues bool) (map[string]any, error) { + value := map[string]any{ + "timestamp": syslogMessage.Timestamp, + "hostname": syslogMessage.Hostname, + "appname": syslogMessage.Appname, + "proc_id": syslogMessage.ProcID, + "msg_id": syslogMessage.MsgID, + "message": syslogMessage.Message, + } + + if !skipPriHeaderValues { + value["priority"] = syslogMessage.Priority + value["severity"] = syslogMessage.Severity + value["facility"] = syslogMessage.Facility + } + + return p.toSafeMap(value) +} + +// parseRFC5424 will parse an RFC5424 syslog message. +func (p *Parser) parseRFC5424(syslogMessage *rfc5424.SyslogMessage, skipPriHeaderValues bool) (map[string]any, error) { + value := map[string]any{ + "timestamp": syslogMessage.Timestamp, + "hostname": syslogMessage.Hostname, + "appname": syslogMessage.Appname, + "proc_id": syslogMessage.ProcID, + "msg_id": syslogMessage.MsgID, + "message": syslogMessage.Message, + "structured_data": syslogMessage.StructuredData, + "version": syslogMessage.Version, + } + + if !skipPriHeaderValues { + value["priority"] = syslogMessage.Priority + value["severity"] = syslogMessage.Severity + value["facility"] = syslogMessage.Facility + } + + return p.toSafeMap(value) +} + +// toSafeMap will dereference any pointers on the supplied map. +func (p *Parser) toSafeMap(message map[string]any) (map[string]any, error) { + for key, val := range message { + switch v := val.(type) { + case *string: + if v == nil { + delete(message, key) + continue + } + message[key] = *v + case *uint8: + if v == nil { + delete(message, key) + continue + } + message[key] = int(*v) + case uint16: + message[key] = int(v) + case *time.Time: + if v == nil { + delete(message, key) + continue + } + message[key] = *v + case *map[string]map[string]string: + if v == nil { + delete(message, key) + continue + } + message[key] = convertMap(*v) + default: + return nil, fmt.Errorf("key %s has unknown field of type %T", key, v) + } + } + + return message, nil +} + +// convertMap converts map[string]map[string]string to map[string]any +// which is expected by stanza converter +func convertMap(data map[string]map[string]string) map[string]any { + ret := map[string]any{} + for key, value := range data { + ret[key] = map[string]any{} + r := ret[key].(map[string]any) + + for k, v := range value { + r[k] = v + } + } + + return ret +} + +func toBytes(value any) ([]byte, error) { + switch v := value.(type) { + case string: + return []byte(v), nil + default: + return nil, fmt.Errorf("unable to convert type '%T' to bytes", value) + } +} + +var severityMapping = [...]entry.Severity{ + 0: entry.Fatal, + 1: entry.Error3, + 2: entry.Error2, + 3: entry.Error, + 4: entry.Warn, + 5: entry.Info2, + 6: entry.Info, + 7: entry.Debug, +} + +var severityText = [...]string{ + 0: "emerg", + 1: "alert", + 2: "crit", + 3: "err", + 4: "warning", + 5: "notice", + 6: "info", + 7: "debug", +} + +var severityField = entry.NewAttributeField("severity") + +func cleanupTimestamp(e *entry.Entry) error { + _, ok := entry.NewAttributeField("timestamp").Delete(e) + if !ok { + return fmt.Errorf("failed to cleanup timestamp") + } + + return nil +} + +func postprocessWithoutPriHeader(e *entry.Entry) error { + return cleanupTimestamp(e) +} + +func postprocess(e *entry.Entry) error { + sev, ok := severityField.Delete(e) + if !ok { + return fmt.Errorf("severity field does not exist") + } + + sevInt, ok := sev.(int) + if !ok { + return fmt.Errorf("severity field is not an int") + } + + if sevInt < 0 || sevInt > 7 { + return fmt.Errorf("invalid severity '%d'", sevInt) + } + + e.Severity = severityMapping[sevInt] + e.SeverityText = severityText[sevInt] + + return cleanupTimestamp(e) +} + +func newOctetCountingParseFunc() parseFunc { + return func(input []byte) (message sl.Message, err error) { + listener := func(res *sl.Result) { + message = res.Message + err = res.Error + } + parser := octetcounting.NewParser(sl.WithBestEffort(), sl.WithListener(listener)) + reader := bytes.NewReader(input) + parser.Parse(reader) + return + } +} + +func newNonTransparentFramingParseFunc(trailerType nontransparent.TrailerType) parseFunc { + return func(input []byte) (message sl.Message, err error) { + listener := func(res *sl.Result) { + message = res.Message + err = res.Error + } + + parser := nontransparent.NewParser(sl.WithBestEffort(), nontransparent.WithTrailer(trailerType), sl.WithListener(listener)) + reader := bytes.NewReader(input) + parser.Parse(reader) + return + } +} diff --git a/pkg/stanza/operator/parser/syslog/syslog_test.go b/pkg/stanza/operator/parser/syslog/parser_test.go similarity index 100% rename from pkg/stanza/operator/parser/syslog/syslog_test.go rename to pkg/stanza/operator/parser/syslog/parser_test.go diff --git a/pkg/stanza/operator/parser/syslog/syslog.go b/pkg/stanza/operator/parser/syslog/syslog.go deleted file mode 100644 index 376ed1baca4a..000000000000 --- a/pkg/stanza/operator/parser/syslog/syslog.go +++ /dev/null @@ -1,360 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package syslog // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/syslog" - -import ( - "bytes" - "context" - "errors" - "fmt" - "strings" - "time" - - sl "github.com/influxdata/go-syslog/v3" - "github.com/influxdata/go-syslog/v3/nontransparent" - "github.com/influxdata/go-syslog/v3/octetcounting" - "github.com/influxdata/go-syslog/v3/rfc3164" - "github.com/influxdata/go-syslog/v3/rfc5424" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const ( - operatorType = "syslog_parser" - - RFC3164 = "rfc3164" - RFC5424 = "rfc5424" - - NULTrailer = "NUL" - LFTrailer = "LF" -) - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new syslog parser config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new syslog parser config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - ParserConfig: helper.NewParserConfig(operatorID, operatorType), - } -} - -// Config is the configuration of a syslog parser operator. -type Config struct { - helper.ParserConfig `mapstructure:",squash"` - BaseConfig `mapstructure:",squash"` -} - -// BaseConfig is the detailed configuration of a syslog parser. -type BaseConfig struct { - Protocol string `mapstructure:"protocol,omitempty"` - Location string `mapstructure:"location,omitempty"` - EnableOctetCounting bool `mapstructure:"enable_octet_counting,omitempty"` - NonTransparentFramingTrailer *string `mapstructure:"non_transparent_framing_trailer,omitempty"` -} - -// Build will build a JSON parser operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - if c.ParserConfig.TimeParser == nil { - parseFromField := entry.NewAttributeField("timestamp") - c.ParserConfig.TimeParser = &helper.TimeParser{ - ParseFrom: &parseFromField, - LayoutType: helper.NativeKey, - } - } - - parserOperator, err := c.ParserConfig.Build(logger) - if err != nil { - return nil, err - } - - proto := strings.ToLower(c.Protocol) - - switch { - case proto == "": - return nil, fmt.Errorf("missing field 'protocol'") - case proto != RFC5424 && (c.NonTransparentFramingTrailer != nil || c.EnableOctetCounting): - return nil, errors.New("octet_counting and non_transparent_framing are only compatible with protocol rfc5424") - case proto == RFC5424 && (c.NonTransparentFramingTrailer != nil && c.EnableOctetCounting): - return nil, errors.New("only one of octet_counting or non_transparent_framing can be enabled") - case proto == RFC5424 && c.NonTransparentFramingTrailer != nil: - if *c.NonTransparentFramingTrailer != NULTrailer && *c.NonTransparentFramingTrailer != LFTrailer { - return nil, fmt.Errorf("invalid non_transparent_framing_trailer '%s'. Must be either 'LF' or 'NUL'", *c.NonTransparentFramingTrailer) - } - case proto != RFC5424 && proto != RFC3164: - return nil, fmt.Errorf("unsupported protocol version: %s", proto) - } - - if c.Location == "" { - c.Location = "UTC" - } - - location, err := time.LoadLocation(c.Location) - if err != nil { - return nil, fmt.Errorf("failed to load location %s: %w", c.Location, err) - } - - return &Parser{ - ParserOperator: parserOperator, - protocol: proto, - location: location, - enableOctetCounting: c.EnableOctetCounting, - nonTransparentFramingTrailer: c.NonTransparentFramingTrailer, - }, nil -} - -// parseFunc a parseFunc determines how the raw input is to be parsed into a syslog message -type parseFunc func(input []byte) (sl.Message, error) - -func (s *Parser) buildParseFunc() (parseFunc, error) { - switch s.protocol { - case RFC3164: - return func(input []byte) (sl.Message, error) { - return rfc3164.NewMachine(rfc3164.WithLocaleTimezone(s.location)).Parse(input) - }, nil - case RFC5424: - switch { - // Octet Counting Parsing RFC6587 - case s.enableOctetCounting: - return newOctetCountingParseFunc(), nil - // Non-Transparent-Framing Parsing RFC6587 - case s.nonTransparentFramingTrailer != nil && *s.nonTransparentFramingTrailer == LFTrailer: - return newNonTransparentFramingParseFunc(nontransparent.LF), nil - case s.nonTransparentFramingTrailer != nil && *s.nonTransparentFramingTrailer == NULTrailer: - return newNonTransparentFramingParseFunc(nontransparent.NUL), nil - // Raw RFC5424 parsing - default: - return func(input []byte) (sl.Message, error) { - return rfc5424.NewMachine().Parse(input) - }, nil - } - - default: - return nil, fmt.Errorf("invalid protocol %s", s.protocol) - } -} - -// Parser is an operator that parses syslog. -type Parser struct { - helper.ParserOperator - protocol string - location *time.Location - enableOctetCounting bool - nonTransparentFramingTrailer *string -} - -// Process will parse an entry field as syslog. -func (s *Parser) Process(ctx context.Context, entry *entry.Entry) error { - return s.ParserOperator.ProcessWithCallback(ctx, entry, s.parse, postprocess) -} - -// parse will parse a value as syslog. -func (s *Parser) parse(value any) (any, error) { - bytes, err := toBytes(value) - if err != nil { - return nil, err - } - - pFunc, err := s.buildParseFunc() - if err != nil { - return nil, err - } - - slog, err := pFunc(bytes) - if err != nil { - return nil, err - } - - switch message := slog.(type) { - case *rfc3164.SyslogMessage: - return s.parseRFC3164(message) - case *rfc5424.SyslogMessage: - return s.parseRFC5424(message) - default: - return nil, fmt.Errorf("parsed value was not rfc3164 or rfc5424 compliant") - } -} - -// parseRFC3164 will parse an RFC3164 syslog message. -func (s *Parser) parseRFC3164(syslogMessage *rfc3164.SyslogMessage) (map[string]any, error) { - value := map[string]any{ - "timestamp": syslogMessage.Timestamp, - "priority": syslogMessage.Priority, - "facility": syslogMessage.Facility, - "severity": syslogMessage.Severity, - "hostname": syslogMessage.Hostname, - "appname": syslogMessage.Appname, - "proc_id": syslogMessage.ProcID, - "msg_id": syslogMessage.MsgID, - "message": syslogMessage.Message, - } - return s.toSafeMap(value) -} - -// parseRFC5424 will parse an RFC5424 syslog message. -func (s *Parser) parseRFC5424(syslogMessage *rfc5424.SyslogMessage) (map[string]any, error) { - value := map[string]any{ - "timestamp": syslogMessage.Timestamp, - "priority": syslogMessage.Priority, - "facility": syslogMessage.Facility, - "severity": syslogMessage.Severity, - "hostname": syslogMessage.Hostname, - "appname": syslogMessage.Appname, - "proc_id": syslogMessage.ProcID, - "msg_id": syslogMessage.MsgID, - "message": syslogMessage.Message, - "structured_data": syslogMessage.StructuredData, - "version": syslogMessage.Version, - } - return s.toSafeMap(value) -} - -// toSafeMap will dereference any pointers on the supplied map. -func (s *Parser) toSafeMap(message map[string]any) (map[string]any, error) { - for key, val := range message { - switch v := val.(type) { - case *string: - if v == nil { - delete(message, key) - continue - } - message[key] = *v - case *uint8: - if v == nil { - delete(message, key) - continue - } - message[key] = int(*v) - case uint16: - message[key] = int(v) - case *time.Time: - if v == nil { - delete(message, key) - continue - } - message[key] = *v - case *map[string]map[string]string: - if v == nil { - delete(message, key) - continue - } - message[key] = convertMap(*v) - default: - return nil, fmt.Errorf("key %s has unknown field of type %T", key, v) - } - } - - return message, nil -} - -// convertMap converts map[string]map[string]string to map[string]any -// which is expected by stanza converter -func convertMap(data map[string]map[string]string) map[string]any { - ret := map[string]any{} - for key, value := range data { - ret[key] = map[string]any{} - r := ret[key].(map[string]any) - - for k, v := range value { - r[k] = v - } - } - - return ret -} - -func toBytes(value any) ([]byte, error) { - switch v := value.(type) { - case string: - return []byte(v), nil - default: - return nil, fmt.Errorf("unable to convert type '%T' to bytes", value) - } -} - -var severityMapping = [...]entry.Severity{ - 0: entry.Fatal, - 1: entry.Error3, - 2: entry.Error2, - 3: entry.Error, - 4: entry.Warn, - 5: entry.Info2, - 6: entry.Info, - 7: entry.Debug, -} - -var severityText = [...]string{ - 0: "emerg", - 1: "alert", - 2: "crit", - 3: "err", - 4: "warning", - 5: "notice", - 6: "info", - 7: "debug", -} - -var severityField = entry.NewAttributeField("severity") - -func postprocess(e *entry.Entry) error { - sev, ok := severityField.Delete(e) - if !ok { - return fmt.Errorf("severity field does not exist") - } - - sevInt, ok := sev.(int) - if !ok { - return fmt.Errorf("severity field is not an int") - } - - if sevInt < 0 || sevInt > 7 { - return fmt.Errorf("invalid severity '%d'", sevInt) - } - - e.Severity = severityMapping[sevInt] - e.SeverityText = severityText[sevInt] - - _, ok = entry.NewAttributeField("timestamp").Delete(e) - if !ok { - return fmt.Errorf("failed to cleanup timestamp") - } - - return nil -} - -func newOctetCountingParseFunc() parseFunc { - return func(input []byte) (message sl.Message, err error) { - listener := func(res *sl.Result) { - message = res.Message - err = res.Error - } - parser := octetcounting.NewParser(sl.WithBestEffort(), sl.WithListener(listener)) - reader := bytes.NewReader(input) - parser.Parse(reader) - return - } -} - -func newNonTransparentFramingParseFunc(trailerType nontransparent.TrailerType) parseFunc { - return func(input []byte) (message sl.Message, err error) { - listener := func(res *sl.Result) { - message = res.Message - err = res.Error - } - - parser := nontransparent.NewParser(sl.WithBestEffort(), nontransparent.WithTrailer(trailerType), sl.WithListener(listener)) - reader := bytes.NewReader(input) - parser.Parse(reader) - return - } -} diff --git a/pkg/stanza/operator/parser/time/config.go b/pkg/stanza/operator/parser/time/config.go new file mode 100644 index 000000000000..27b138f952d7 --- /dev/null +++ b/pkg/stanza/operator/parser/time/config.go @@ -0,0 +1,53 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package time // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/time" + +import ( + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "time_parser" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new time parser config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new time parser config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + TimeParser: helper.NewTimeParser(), + } +} + +// Config is the configuration of a time parser operator. +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` + helper.TimeParser `mapstructure:",omitempty,squash"` +} + +// Build will build a time parser operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformerOperator, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, err + } + + if err := c.TimeParser.Validate(); err != nil { + return nil, err + } + + return &Parser{ + TransformerOperator: transformerOperator, + TimeParser: c.TimeParser, + }, nil +} diff --git a/pkg/stanza/operator/parser/time/config_test.go b/pkg/stanza/operator/parser/time/config_test.go index 1b1b5ec7e2b5..c40c2596f319 100644 --- a/pkg/stanza/operator/parser/time/config_test.go +++ b/pkg/stanza/operator/parser/time/config_test.go @@ -49,10 +49,6 @@ func TestUnmarshal(t *testing.T) { return cfg }(), }, - { - Name: "no_nested", - ExpectErr: true, - }, }, }.Run(t) } diff --git a/pkg/stanza/operator/parser/time/package_test.go b/pkg/stanza/operator/parser/time/package_test.go new file mode 100644 index 000000000000..744b6147e346 --- /dev/null +++ b/pkg/stanza/operator/parser/time/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package time + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/parser/time/parser.go b/pkg/stanza/operator/parser/time/parser.go new file mode 100644 index 000000000000..5e8151d68d24 --- /dev/null +++ b/pkg/stanza/operator/parser/time/parser.go @@ -0,0 +1,22 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package time // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/time" + +import ( + "context" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Parser is an operator that parses time from a field to an entry. +type Parser struct { + helper.TransformerOperator + helper.TimeParser +} + +// Process will parse time from an entry. +func (p *Parser) Process(ctx context.Context, entry *entry.Entry) error { + return p.ProcessWith(ctx, entry, p.TimeParser.Parse) +} diff --git a/pkg/stanza/operator/parser/time/time_test.go b/pkg/stanza/operator/parser/time/parser_test.go similarity index 100% rename from pkg/stanza/operator/parser/time/time_test.go rename to pkg/stanza/operator/parser/time/parser_test.go diff --git a/pkg/stanza/operator/parser/time/time.go b/pkg/stanza/operator/parser/time/time.go deleted file mode 100644 index 36a1e10faeb9..000000000000 --- a/pkg/stanza/operator/parser/time/time.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package time // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/time" - -import ( - "context" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "time_parser" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new time parser config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new time parser config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), - TimeParser: helper.NewTimeParser(), - } -} - -// Config is the configuration of a time parser operator. -type Config struct { - helper.TransformerConfig `mapstructure:",squash"` - helper.TimeParser `mapstructure:",omitempty,squash"` -} - -// Build will build a time parser operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - transformerOperator, err := c.TransformerConfig.Build(logger) - if err != nil { - return nil, err - } - - if err := c.TimeParser.Validate(); err != nil { - return nil, err - } - - return &Parser{ - TransformerOperator: transformerOperator, - TimeParser: c.TimeParser, - }, nil -} - -// Parser is an operator that parses time from a field to an entry. -type Parser struct { - helper.TransformerOperator - helper.TimeParser -} - -// Process will parse time from an entry. -func (t *Parser) Process(ctx context.Context, entry *entry.Entry) error { - return t.ProcessWith(ctx, entry, t.TimeParser.Parse) -} diff --git a/pkg/stanza/operator/parser/trace/config.go b/pkg/stanza/operator/parser/trace/config.go new file mode 100644 index 000000000000..b673fffebab1 --- /dev/null +++ b/pkg/stanza/operator/parser/trace/config.go @@ -0,0 +1,53 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package trace // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/trace" + +import ( + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "trace_parser" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new trace parser config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new trace parser config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + TraceParser: helper.NewTraceParser(), + } +} + +// Config is the configuration of a trace parser operator. +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` + helper.TraceParser `mapstructure:",omitempty,squash"` +} + +// Build will build a trace parser operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformerOperator, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, err + } + + if err := c.TraceParser.Validate(); err != nil { + return nil, err + } + + return &Parser{ + TransformerOperator: transformerOperator, + TraceParser: c.TraceParser, + }, nil +} diff --git a/pkg/stanza/operator/parser/trace/package_test.go b/pkg/stanza/operator/parser/trace/package_test.go new file mode 100644 index 000000000000..ac6d5ff970cb --- /dev/null +++ b/pkg/stanza/operator/parser/trace/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package trace + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/parser/trace/parser.go b/pkg/stanza/operator/parser/trace/parser.go new file mode 100644 index 000000000000..cebfefb2062f --- /dev/null +++ b/pkg/stanza/operator/parser/trace/parser.go @@ -0,0 +1,22 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package trace // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/trace" + +import ( + "context" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Config is an operator that parses traces from fields to an entry. +type Parser struct { + helper.TransformerOperator + helper.TraceParser +} + +// Process will parse traces from an entry. +func (p *Parser) Process(ctx context.Context, entry *entry.Entry) error { + return p.ProcessWith(ctx, entry, p.Parse) +} diff --git a/pkg/stanza/operator/parser/trace/trace_test.go b/pkg/stanza/operator/parser/trace/parser_test.go similarity index 100% rename from pkg/stanza/operator/parser/trace/trace_test.go rename to pkg/stanza/operator/parser/trace/parser_test.go diff --git a/pkg/stanza/operator/parser/trace/trace.go b/pkg/stanza/operator/parser/trace/trace.go deleted file mode 100644 index 8f12784f327d..000000000000 --- a/pkg/stanza/operator/parser/trace/trace.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/trace" - -import ( - "context" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "trace_parser" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new trace parser config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new trace parser config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), - TraceParser: helper.NewTraceParser(), - } -} - -// Config is the configuration of a trace parser operator. -type Config struct { - helper.TransformerConfig `mapstructure:",squash"` - helper.TraceParser `mapstructure:",omitempty,squash"` -} - -// Build will build a trace parser operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - transformerOperator, err := c.TransformerConfig.Build(logger) - if err != nil { - return nil, err - } - - if err := c.TraceParser.Validate(); err != nil { - return nil, err - } - - return &Parser{ - TransformerOperator: transformerOperator, - TraceParser: c.TraceParser, - }, nil -} - -// Config is an operator that parses traces from fields to an entry. -type Parser struct { - helper.TransformerOperator - helper.TraceParser -} - -// Process will parse traces from an entry. -func (p *Parser) Process(ctx context.Context, entry *entry.Entry) error { - return p.ProcessWith(ctx, entry, p.Parse) -} diff --git a/pkg/stanza/operator/parser/uri/config.go b/pkg/stanza/operator/parser/uri/config.go new file mode 100644 index 000000000000..0c2efe436805 --- /dev/null +++ b/pkg/stanza/operator/parser/uri/config.go @@ -0,0 +1,46 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package uri // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/uri" + +import ( + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "uri_parser" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new uri parser config with default values. +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new uri parser config with default values. +func NewConfigWithID(operatorID string) *Config { + return &Config{ + ParserConfig: helper.NewParserConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a uri parser operator. +type Config struct { + helper.ParserConfig `mapstructure:",squash"` +} + +// Build will build a uri parser operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + parserOperator, err := c.ParserConfig.Build(logger) + if err != nil { + return nil, err + } + + return &Parser{ + ParserOperator: parserOperator, + }, nil +} diff --git a/pkg/stanza/operator/parser/uri/package_test.go b/pkg/stanza/operator/parser/uri/package_test.go new file mode 100644 index 000000000000..8dabdad21d57 --- /dev/null +++ b/pkg/stanza/operator/parser/uri/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package uri + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/parser/uri/parser.go b/pkg/stanza/operator/parser/uri/parser.go new file mode 100644 index 000000000000..e7761239cbbc --- /dev/null +++ b/pkg/stanza/operator/parser/uri/parser.go @@ -0,0 +1,121 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package uri // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/uri" + +import ( + "context" + "fmt" + "net/url" + "strings" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Parser is an operator that parses a uri. +type Parser struct { + helper.ParserOperator +} + +// Process will parse an entry. +func (p *Parser) Process(ctx context.Context, entry *entry.Entry) error { + return p.ParserOperator.ProcessWith(ctx, entry, p.parse) +} + +// parse will parse a uri from a field and attach it to an entry. +func (p *Parser) parse(value any) (any, error) { + switch m := value.(type) { + case string: + return parseURI(m) + default: + return nil, fmt.Errorf("type '%T' cannot be parsed as URI", value) + } +} + +// parseURI takes an absolute or relative uri and returns the parsed values. +func parseURI(value string) (map[string]any, error) { + m := make(map[string]any) + + if strings.HasPrefix(value, "?") { + // remove the query string '?' prefix before parsing + v, err := url.ParseQuery(value[1:]) + if err != nil { + return nil, err + } + return queryToMap(v, m), nil + } + + x, err := url.ParseRequestURI(value) + if err != nil { + return nil, err + } + return urlToMap(x, m), nil +} + +// urlToMap converts a url.URL to a map, excludes any values that are not set. +func urlToMap(p *url.URL, m map[string]any) map[string]any { + scheme := p.Scheme + if scheme != "" { + m["scheme"] = scheme + } + + user := p.User.Username() + if user != "" { + m["user"] = user + } + + host := p.Hostname() + if host != "" { + m["host"] = host + } + + port := p.Port() + if port != "" { + m["port"] = port + } + + path := p.EscapedPath() + if path != "" { + m["path"] = path + } + + return queryToMap(p.Query(), m) +} + +// queryToMap converts a query string url.Values to a map. +func queryToMap(query url.Values, m map[string]any) map[string]any { + // no-op if query is empty, do not create the key m["query"] + if len(query) == 0 { + return m + } + + /* 'parameter' will represent url.Values + map[string]any{ + "parameter-a": []any{ + "a", + "b", + }, + "parameter-b": []any{ + "x", + "y", + }, + } + */ + parameters := map[string]any{} + for param, values := range query { + parameters[param] = queryParamValuesToMap(values) + } + m["query"] = parameters + return m +} + +// queryParamValuesToMap takes query string parameter values and +// returns an []interface populated with the values +func queryParamValuesToMap(values []string) []any { + v := make([]any, len(values)) + for i, value := range values { + v[i] = value + } + return v +} diff --git a/pkg/stanza/operator/parser/uri/uri_test.go b/pkg/stanza/operator/parser/uri/parser_test.go similarity index 100% rename from pkg/stanza/operator/parser/uri/uri_test.go rename to pkg/stanza/operator/parser/uri/parser_test.go diff --git a/pkg/stanza/operator/parser/uri/uri.go b/pkg/stanza/operator/parser/uri/uri.go deleted file mode 100644 index 621709c8364b..000000000000 --- a/pkg/stanza/operator/parser/uri/uri.go +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package uri // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/uri" - -import ( - "context" - "fmt" - "net/url" - "strings" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "uri_parser" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new uri parser config with default values. -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new uri parser config with default values. -func NewConfigWithID(operatorID string) *Config { - return &Config{ - ParserConfig: helper.NewParserConfig(operatorID, operatorType), - } -} - -// Config is the configuration of a uri parser operator. -type Config struct { - helper.ParserConfig `mapstructure:",squash"` -} - -// Build will build a uri parser operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - parserOperator, err := c.ParserConfig.Build(logger) - if err != nil { - return nil, err - } - - return &Parser{ - ParserOperator: parserOperator, - }, nil -} - -// Parser is an operator that parses a uri. -type Parser struct { - helper.ParserOperator -} - -// Process will parse an entry. -func (u *Parser) Process(ctx context.Context, entry *entry.Entry) error { - return u.ParserOperator.ProcessWith(ctx, entry, u.parse) -} - -// parse will parse a uri from a field and attach it to an entry. -func (u *Parser) parse(value any) (any, error) { - switch m := value.(type) { - case string: - return parseURI(m) - default: - return nil, fmt.Errorf("type '%T' cannot be parsed as URI", value) - } -} - -// parseURI takes an absolute or relative uri and returns the parsed values. -func parseURI(value string) (map[string]any, error) { - m := make(map[string]any) - - if strings.HasPrefix(value, "?") { - // remove the query string '?' prefix before parsing - v, err := url.ParseQuery(value[1:]) - if err != nil { - return nil, err - } - return queryToMap(v, m), nil - } - - x, err := url.ParseRequestURI(value) - if err != nil { - return nil, err - } - return urlToMap(x, m), nil -} - -// urlToMap converts a url.URL to a map, excludes any values that are not set. -func urlToMap(p *url.URL, m map[string]any) map[string]any { - scheme := p.Scheme - if scheme != "" { - m["scheme"] = scheme - } - - user := p.User.Username() - if user != "" { - m["user"] = user - } - - host := p.Hostname() - if host != "" { - m["host"] = host - } - - port := p.Port() - if port != "" { - m["port"] = port - } - - path := p.EscapedPath() - if path != "" { - m["path"] = path - } - - return queryToMap(p.Query(), m) -} - -// queryToMap converts a query string url.Values to a map. -func queryToMap(query url.Values, m map[string]any) map[string]any { - // no-op if query is empty, do not create the key m["query"] - if len(query) == 0 { - return m - } - - /* 'parameter' will represent url.Values - map[string]any{ - "parameter-a": []any{ - "a", - "b", - }, - "parameter-b": []any{ - "x", - "y", - }, - } - */ - parameters := map[string]any{} - for param, values := range query { - parameters[param] = queryParamValuesToMap(values) - } - m["query"] = parameters - return m -} - -// queryParamValuesToMap takes query string parameter values and -// returns an []interface populated with the values -func queryParamValuesToMap(values []string) []any { - v := make([]any, len(values)) - for i, value := range values { - v[i] = value - } - return v -} diff --git a/pkg/stanza/operator/transformer/add/add.go b/pkg/stanza/operator/transformer/add/add.go deleted file mode 100644 index 428024385c54..000000000000 --- a/pkg/stanza/operator/transformer/add/add.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package add // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/add" - -import ( - "context" - "fmt" - "strings" - - "github.com/antonmedv/expr/vm" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "add" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new add operator config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new add operator config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), - } -} - -// Config is the configuration of an add operator -type Config struct { - helper.TransformerConfig `mapstructure:",squash"` - Field entry.Field `mapstructure:"field"` - Value any `mapstructure:"value,omitempty"` -} - -// Build will build an add operator from the supplied configuration -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - transformerOperator, err := c.TransformerConfig.Build(logger) - if err != nil { - return nil, err - } - - addOperator := &Transformer{ - TransformerOperator: transformerOperator, - Field: c.Field, - } - strVal, ok := c.Value.(string) - if !ok || !isExpr(strVal) { - addOperator.Value = c.Value - return addOperator, nil - } - exprStr := strings.TrimPrefix(strVal, "EXPR(") - exprStr = strings.TrimSuffix(exprStr, ")") - - compiled, err := helper.ExprCompile(exprStr) - if err != nil { - return nil, fmt.Errorf("failed to compile expression '%s': %w", c.IfExpr, err) - } - - addOperator.program = compiled - return addOperator, nil -} - -// Transformer is an operator that adds a string value or an expression value -type Transformer struct { - helper.TransformerOperator - - Field entry.Field - Value any - program *vm.Program -} - -// Process will process an entry with a add transformation. -func (p *Transformer) Process(ctx context.Context, entry *entry.Entry) error { - return p.ProcessWith(ctx, entry, p.Transform) -} - -// Transform will apply the add operations to an entry -func (p *Transformer) Transform(e *entry.Entry) error { - if p.Value != nil { - return e.Set(p.Field, p.Value) - } - if p.program != nil { - env := helper.GetExprEnv(e) - defer helper.PutExprEnv(env) - - result, err := vm.Run(p.program, env) - if err != nil { - return fmt.Errorf("evaluate value_expr: %w", err) - } - return e.Set(p.Field, result) - } - return fmt.Errorf("add: missing required field 'value'") -} - -func isExpr(str string) bool { - return strings.HasPrefix(str, "EXPR(") && strings.HasSuffix(str, ")") -} diff --git a/pkg/stanza/operator/transformer/add/config.go b/pkg/stanza/operator/transformer/add/config.go new file mode 100644 index 000000000000..6334a0f20856 --- /dev/null +++ b/pkg/stanza/operator/transformer/add/config.go @@ -0,0 +1,68 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package add // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/add" + +import ( + "fmt" + "strings" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "add" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new add operator config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new add operator config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + } +} + +// Config is the configuration of an add operator +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` + Field entry.Field `mapstructure:"field"` + Value any `mapstructure:"value,omitempty"` +} + +// Build will build an add operator from the supplied configuration +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformerOperator, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, err + } + + addOperator := &Transformer{ + TransformerOperator: transformerOperator, + Field: c.Field, + } + strVal, ok := c.Value.(string) + if !ok || !isExpr(strVal) { + addOperator.Value = c.Value + return addOperator, nil + } + exprStr := strings.TrimPrefix(strVal, "EXPR(") + exprStr = strings.TrimSuffix(exprStr, ")") + + compiled, err := helper.ExprCompile(exprStr) + if err != nil { + return nil, fmt.Errorf("failed to compile expression '%s': %w", c.IfExpr, err) + } + + addOperator.program = compiled + return addOperator, nil +} diff --git a/pkg/stanza/operator/transformer/add/package_test.go b/pkg/stanza/operator/transformer/add/package_test.go new file mode 100644 index 000000000000..dfcef11278a1 --- /dev/null +++ b/pkg/stanza/operator/transformer/add/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package add + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/transformer/add/transformer.go b/pkg/stanza/operator/transformer/add/transformer.go new file mode 100644 index 000000000000..a87d2c52e70e --- /dev/null +++ b/pkg/stanza/operator/transformer/add/transformer.go @@ -0,0 +1,51 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package add // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/add" + +import ( + "context" + "fmt" + "strings" + + "github.com/expr-lang/expr/vm" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Transformer is an operator that adds a string value or an expression value +type Transformer struct { + helper.TransformerOperator + + Field entry.Field + Value any + program *vm.Program +} + +// Process will process an entry with a add transformation. +func (t *Transformer) Process(ctx context.Context, entry *entry.Entry) error { + return t.ProcessWith(ctx, entry, t.Transform) +} + +// Transform will apply the add operations to an entry +func (t *Transformer) Transform(e *entry.Entry) error { + if t.Value != nil { + return e.Set(t.Field, t.Value) + } + if t.program != nil { + env := helper.GetExprEnv(e) + defer helper.PutExprEnv(env) + + result, err := vm.Run(t.program, env) + if err != nil { + return fmt.Errorf("evaluate value_expr: %w", err) + } + return e.Set(t.Field, result) + } + return fmt.Errorf("add: missing required field 'value'") +} + +func isExpr(str string) bool { + return strings.HasPrefix(str, "EXPR(") && strings.HasSuffix(str, ")") +} diff --git a/pkg/stanza/operator/transformer/add/add_test.go b/pkg/stanza/operator/transformer/add/transformer_test.go similarity index 100% rename from pkg/stanza/operator/transformer/add/add_test.go rename to pkg/stanza/operator/transformer/add/transformer_test.go diff --git a/pkg/stanza/operator/transformer/assignkeys/config.go b/pkg/stanza/operator/transformer/assignkeys/config.go new file mode 100644 index 000000000000..d6c79b7d6ac4 --- /dev/null +++ b/pkg/stanza/operator/transformer/assignkeys/config.go @@ -0,0 +1,86 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package assignkeys // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/assignkeys" + +import ( + "fmt" + + "go.opentelemetry.io/collector/featuregate" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "assign_keys" + +var assignKeysTransformerFeatureGate = featuregate.GlobalRegistry().MustRegister( + "logs.assignKeys", + featuregate.StageAlpha, + featuregate.WithRegisterDescription("When enabled, allows usage of `assign_keys` transformer."), + featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30321"), +) + +func init() { + if assignKeysTransformerFeatureGate.IsEnabled() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) + } +} + +// NewConfig creates a new assign_keys operator config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new assign_keys operator config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a assign_keys operator +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` + Field entry.Field `mapstructure:"field"` + Keys []string `mapstructure:"keys"` +} + +// Build will build an assign_keys operator from the supplied configuration +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformerOperator, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, err + } + + if len(c.Keys) == 0 { + return nil, fmt.Errorf("assign_keys missing required field keys") + } + + if _, ok := c.Field.FieldInterface.(entry.BodyField); ok { + return &Transformer{ + TransformerOperator: transformerOperator, + Field: c.Field, + Keys: c.Keys, + }, nil + } + + if _, ok := c.Field.FieldInterface.(entry.ResourceField); ok { + return &Transformer{ + TransformerOperator: transformerOperator, + Field: c.Field, + Keys: c.Keys, + }, nil + } + + if _, ok := c.Field.FieldInterface.(entry.AttributeField); ok { + return &Transformer{ + TransformerOperator: transformerOperator, + Field: c.Field, + Keys: c.Keys, + }, nil + } + + return nil, fmt.Errorf("invalid field type: %T", c.Field.FieldInterface) +} diff --git a/pkg/stanza/operator/transformer/assignkeys/config_test.go b/pkg/stanza/operator/transformer/assignkeys/config_test.go new file mode 100644 index 000000000000..228c2c933a6b --- /dev/null +++ b/pkg/stanza/operator/transformer/assignkeys/config_test.go @@ -0,0 +1,55 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package assignkeys + +import ( + "path/filepath" + "testing" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/operatortest" +) + +// Test unmarshalling of values into config struct +func TestUnmarshal(t *testing.T) { + // Manually adding operator to the Registry as its behind a feature gate + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) + + operatortest.ConfigUnmarshalTests{ + DefaultConfig: NewConfig(), + TestsFile: filepath.Join(".", "testdata", "config.yaml"), + Tests: []operatortest.ConfigUnmarshalTest{ + { + Name: "assign_keys_body", + Expect: func() *Config { + cfg := NewConfig() + cfg.Field = entry.NewBodyField() + cfg.Keys = []string{"foo", "bar"} + return cfg + }(), + ExpectErr: false, + }, + { + Name: "assign_keys_body_nested", + Expect: func() *Config { + cfg := NewConfig() + cfg.Field = entry.NewBodyField("nested") + cfg.Keys = []string{"foo", "bar"} + return cfg + }(), + ExpectErr: false, + }, + { + Name: "assign_keys_attributes", + Expect: func() *Config { + cfg := NewConfig() + cfg.Field = entry.NewAttributeField("input") + cfg.Keys = []string{"foo", "bar"} + return cfg + }(), + ExpectErr: false, + }, + }, + }.Run(t) +} diff --git a/pkg/stanza/operator/transformer/assignkeys/package_test.go b/pkg/stanza/operator/transformer/assignkeys/package_test.go new file mode 100644 index 000000000000..5f2effedf3b5 --- /dev/null +++ b/pkg/stanza/operator/transformer/assignkeys/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package assignkeys + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/transformer/assignkeys/testdata/config.yaml b/pkg/stanza/operator/transformer/assignkeys/testdata/config.yaml new file mode 100644 index 000000000000..9520f379ecc9 --- /dev/null +++ b/pkg/stanza/operator/transformer/assignkeys/testdata/config.yaml @@ -0,0 +1,12 @@ +assign_keys_body: + type: assign_keys + field: body + keys: ["foo", "bar"] +assign_keys_body_nested: + type: assign_keys + field: body.nested + keys: ["foo", "bar"] +assign_keys_attributes: + type: assign_keys + field: attributes.input + keys: ["foo", "bar"] diff --git a/pkg/stanza/operator/transformer/assignkeys/transformer.go b/pkg/stanza/operator/transformer/assignkeys/transformer.go new file mode 100644 index 000000000000..45263dd58a5a --- /dev/null +++ b/pkg/stanza/operator/transformer/assignkeys/transformer.go @@ -0,0 +1,57 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package assignkeys // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/assignkeys" + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Transformer transforms a list in the entry field into a map. Each value is assigned a key from configuration keys +type Transformer struct { + helper.TransformerOperator + Field entry.Field + Keys []string +} + +// Process will process an entry with AssignKeys transformation. +func (t *Transformer) Process(ctx context.Context, entry *entry.Entry) error { + return t.ProcessWith(ctx, entry, t.Transform) +} + +// Transform will apply AssignKeys to an entry +func (t *Transformer) Transform(entry *entry.Entry) error { + inputListInterface, ok := entry.Get(t.Field) + if !ok { + // The field doesn't exist, so ignore it + return fmt.Errorf("apply assign_keys: field %s does not exist on entry", t.Field) + } + + inputList, ok := inputListInterface.([]any) + if !ok { + return fmt.Errorf("apply assign_keys: couldn't convert field %s to []any", t.Field) + } + if len(inputList) != len(t.Keys) { + return fmt.Errorf("apply assign_keys: field %s contains %d values while expected keys are %s contain %d keys", t.Field, len(inputList), t.Keys, len(t.Keys)) + } + + assignedMap := t.AssignKeys(t.Keys, inputList) + + err := entry.Set(t.Field, assignedMap) + if err != nil { + return err + } + return nil +} + +func (t *Transformer) AssignKeys(keys []string, values []any) map[string]any { + outputMap := make(map[string]any, len(keys)) + for i, key := range keys { + outputMap[key] = values[i] + } + + return outputMap +} diff --git a/pkg/stanza/operator/transformer/assignkeys/transformer_test.go b/pkg/stanza/operator/transformer/assignkeys/transformer_test.go new file mode 100644 index 000000000000..bab709962290 --- /dev/null +++ b/pkg/stanza/operator/transformer/assignkeys/transformer_test.go @@ -0,0 +1,155 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package assignkeys + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +type testCase struct { + name string + expectErr bool + op *Config + input func() *entry.Entry + output func() *entry.Entry +} + +// test building and processing a given config. +func TestBuildAndProcess(t *testing.T) { + keys := []string{"origin", "sev", "msg", "count", "isBool"} + now := time.Now() + newTestEntry := func() *entry.Entry { + e := entry.New() + e.ObservedTimestamp = now + e.Timestamp = time.Unix(1586632809, 0) + e.Body = []any{"body", "INFO", "started agent", int64(42), true} + e.Resource = map[string]any{ + "input": []any{"resource", "INFO", "started agent", int64(42), true}, + } + e.Attributes = map[string]any{ + "input": []any{"attribute", "INFO", "started agent", int64(42), true}, + } + return e + } + cases := []testCase{ + { + "assign_keys_body", + false, + func() *Config { + cfg := NewConfig() + cfg.Field = entry.NewBodyField() + cfg.Keys = keys + return cfg + }(), + newTestEntry, + func() *entry.Entry { + e := newTestEntry() + e.Body = map[string]any{ + "origin": "body", + "sev": "INFO", + "msg": "started agent", + "count": int64(42), + "isBool": true, + } + return e + }, + }, + { + "assign_keys_attributes", + false, + func() *Config { + cfg := NewConfig() + cfg.Field = entry.NewAttributeField("input") + cfg.Keys = keys + return cfg + }(), + newTestEntry, + func() *entry.Entry { + e := newTestEntry() + e.Attributes = map[string]any{ + "input": map[string]any{ + "origin": "attribute", + "sev": "INFO", + "msg": "started agent", + "count": int64(42), + "isBool": true, + }, + } + return e + }, + }, + { + "assign_keys_resources", + false, + func() *Config { + cfg := NewConfig() + cfg.Field = entry.NewResourceField("input") + cfg.Keys = keys + return cfg + }(), + newTestEntry, + func() *entry.Entry { + e := newTestEntry() + e.Resource = map[string]any{ + "input": map[string]any{ + "origin": "resource", + "sev": "INFO", + "msg": "started agent", + "count": int64(42), + "isBool": true, + }, + } + return e + }, + }, + { + "assign_keys_missing_keys", + true, + func() *Config { + cfg := NewConfig() + cfg.Field = entry.NewBodyField() + return cfg + }(), + newTestEntry, + nil, + }, + } + + for _, tc := range cases { + t.Run("BuildandProcess/"+tc.name, func(t *testing.T) { + cfg := tc.op + cfg.OutputIDs = []string{"fake"} + cfg.OnError = "drop" + + op, err := cfg.Build(testutil.Logger(t)) + if tc.expectErr && err != nil { + require.Error(t, err) + return + } + require.NoError(t, err) + + assignKeys := op.(interface { + Process(ctx context.Context, entry *entry.Entry) error + }) + fake := testutil.NewFakeOutput(t) + require.NoError(t, op.SetOutputs([]operator.Operator{fake})) + val := tc.input() + err = assignKeys.Process(context.Background(), val) + + if tc.expectErr { + require.Error(t, err) + } else { + require.NoError(t, err) + fake.ExpectEntry(t, tc.output()) + } + }) + } +} diff --git a/pkg/stanza/operator/transformer/copy/config.go b/pkg/stanza/operator/transformer/copy/config.go new file mode 100644 index 000000000000..bb1703048ec2 --- /dev/null +++ b/pkg/stanza/operator/transformer/copy/config.go @@ -0,0 +1,61 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package copy // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/copy" + +import ( + "fmt" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "copy" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new copy operator config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new copy operator config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a copy operator +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` + From entry.Field `mapstructure:"from"` + To entry.Field `mapstructure:"to"` +} + +// Build will build a copy operator from the supplied configuration +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformerOperator, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, err + } + + if c.From == entry.NewNilField() { + return nil, fmt.Errorf("copy: missing from field") + } + + if c.To == entry.NewNilField() { + return nil, fmt.Errorf("copy: missing to field") + } + + return &Transformer{ + TransformerOperator: transformerOperator, + From: c.From, + To: c.To, + }, nil +} diff --git a/pkg/stanza/operator/transformer/copy/copy.go b/pkg/stanza/operator/transformer/copy/copy.go deleted file mode 100644 index 9c08bb1de85c..000000000000 --- a/pkg/stanza/operator/transformer/copy/copy.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package copy // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/copy" - -import ( - "context" - "fmt" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "copy" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new copy operator config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new copy operator config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), - } -} - -// Config is the configuration of a copy operator -type Config struct { - helper.TransformerConfig `mapstructure:",squash"` - From entry.Field `mapstructure:"from"` - To entry.Field `mapstructure:"to"` -} - -// Build will build a copy operator from the supplied configuration -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - transformerOperator, err := c.TransformerConfig.Build(logger) - if err != nil { - return nil, err - } - - if c.From == entry.NewNilField() { - return nil, fmt.Errorf("copy: missing from field") - } - - if c.To == entry.NewNilField() { - return nil, fmt.Errorf("copy: missing to field") - } - - return &Transformer{ - TransformerOperator: transformerOperator, - From: c.From, - To: c.To, - }, nil -} - -// Transformer copies a value from one field and creates a new field with that value -type Transformer struct { - helper.TransformerOperator - From entry.Field - To entry.Field -} - -// Process will process an entry with a copy transformation. -func (p *Transformer) Process(ctx context.Context, entry *entry.Entry) error { - return p.ProcessWith(ctx, entry, p.Transform) -} - -// Transform will apply the copy operation to an entry -func (p *Transformer) Transform(e *entry.Entry) error { - val, exist := p.From.Get(e) - if !exist { - return fmt.Errorf("copy: from field does not exist in this entry: %s", p.From.String()) - } - return p.To.Set(e, val) -} diff --git a/pkg/stanza/operator/transformer/copy/package_test.go b/pkg/stanza/operator/transformer/copy/package_test.go new file mode 100644 index 000000000000..5d963153e1b3 --- /dev/null +++ b/pkg/stanza/operator/transformer/copy/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package copy + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/transformer/copy/transformer.go b/pkg/stanza/operator/transformer/copy/transformer.go new file mode 100644 index 000000000000..b7af87cfcd38 --- /dev/null +++ b/pkg/stanza/operator/transformer/copy/transformer.go @@ -0,0 +1,33 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package copy // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/copy" + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Transformer copies a value from one field and creates a new field with that value +type Transformer struct { + helper.TransformerOperator + From entry.Field + To entry.Field +} + +// Process will process an entry with a copy transformation. +func (t *Transformer) Process(ctx context.Context, entry *entry.Entry) error { + return t.ProcessWith(ctx, entry, t.Transform) +} + +// Transform will apply the copy operation to an entry +func (t *Transformer) Transform(e *entry.Entry) error { + val, exist := t.From.Get(e) + if !exist { + return fmt.Errorf("copy: from field does not exist in this entry: %s", t.From.String()) + } + return t.To.Set(e, val) +} diff --git a/pkg/stanza/operator/transformer/copy/copy_test.go b/pkg/stanza/operator/transformer/copy/transformer_test.go similarity index 100% rename from pkg/stanza/operator/transformer/copy/copy_test.go rename to pkg/stanza/operator/transformer/copy/transformer_test.go diff --git a/pkg/stanza/operator/transformer/filter/config.go b/pkg/stanza/operator/transformer/filter/config.go new file mode 100644 index 000000000000..3985a2789e84 --- /dev/null +++ b/pkg/stanza/operator/transformer/filter/config.go @@ -0,0 +1,69 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filter // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/filter" + +import ( + "crypto/rand" + "fmt" + "math/big" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "filter" + +var ( + upperBound = big.NewInt(1000) + randInt = rand.Int // allow override for testing +) + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a filter operator config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a filter operator config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + DropRatio: 1, + } +} + +// Config is the configuration of a filter operator +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` + Expression string `mapstructure:"expr"` + DropRatio float64 `mapstructure:"drop_ratio"` +} + +// Build will build a filter operator from the supplied configuration +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformer, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, err + } + + compiledExpression, err := helper.ExprCompileBool(c.Expression) + if err != nil { + return nil, fmt.Errorf("failed to compile expression '%s': %w", c.Expression, err) + } + + if c.DropRatio < 0.0 || c.DropRatio > 1.0 { + return nil, fmt.Errorf("drop_ratio must be a number between 0 and 1") + } + + return &Transformer{ + TransformerOperator: transformer, + expression: compiledExpression, + dropCutoff: big.NewInt(int64(c.DropRatio * 1000)), + }, nil +} diff --git a/pkg/stanza/operator/transformer/filter/config_test.go b/pkg/stanza/operator/transformer/filter/config_test.go new file mode 100644 index 000000000000..59a7586272d1 --- /dev/null +++ b/pkg/stanza/operator/transformer/filter/config_test.go @@ -0,0 +1,57 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filter + +import ( + "path/filepath" + "testing" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/operatortest" +) + +// test unmarshalling of values into config struct +func TestUnmarshal(t *testing.T) { + operatortest.ConfigUnmarshalTests{ + DefaultConfig: NewConfig(), + TestsFile: filepath.Join(".", "testdata", "config.yaml"), + Tests: []operatortest.ConfigUnmarshalTest{ + { + Name: "default", + Expect: NewConfig(), + }, + { + Name: "drop_ratio_0", + Expect: func() *Config { + cfg := NewConfig() + cfg.DropRatio = 0 + return cfg + }(), + }, + { + Name: "drop_ratio_half", + Expect: func() *Config { + cfg := NewConfig() + cfg.DropRatio = 0.5 + return cfg + }(), + }, + { + Name: "drop_ratio_1", + Expect: func() *Config { + cfg := NewConfig() + cfg.DropRatio = 1 + return cfg + }(), + }, + { + Name: "expr", + Expect: func() *Config { + cfg := NewConfig() + cfg.Expression = "body == 'value'" + return cfg + }(), + }, + }, + }.Run(t) +} diff --git a/pkg/stanza/operator/transformer/filter/filter.go b/pkg/stanza/operator/transformer/filter/filter.go deleted file mode 100644 index a1d3ff7689d0..000000000000 --- a/pkg/stanza/operator/transformer/filter/filter.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package filter // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/filter" - -import ( - "context" - "crypto/rand" - "fmt" - "math/big" - - "github.com/antonmedv/expr/vm" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "filter" - -var ( - upperBound = big.NewInt(1000) - randInt = rand.Int // allow override for testing -) - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a filter operator config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a filter operator config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), - DropRatio: 1, - } -} - -// Config is the configuration of a filter operator -type Config struct { - helper.TransformerConfig `mapstructure:",squash"` - Expression string `mapstructure:"expr"` - DropRatio float64 `mapstructure:"drop_ratio"` -} - -// Build will build a filter operator from the supplied configuration -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - transformer, err := c.TransformerConfig.Build(logger) - if err != nil { - return nil, err - } - - compiledExpression, err := helper.ExprCompileBool(c.Expression) - if err != nil { - return nil, fmt.Errorf("failed to compile expression '%s': %w", c.Expression, err) - } - - if c.DropRatio < 0.0 || c.DropRatio > 1.0 { - return nil, fmt.Errorf("drop_ratio must be a number between 0 and 1") - } - - return &Transformer{ - TransformerOperator: transformer, - expression: compiledExpression, - dropCutoff: big.NewInt(int64(c.DropRatio * 1000)), - }, nil -} - -// Transformer is an operator that filters entries based on matching expressions -type Transformer struct { - helper.TransformerOperator - expression *vm.Program - dropCutoff *big.Int // [0..1000) -} - -// Process will drop incoming entries that match the filter expression -func (f *Transformer) Process(ctx context.Context, entry *entry.Entry) error { - env := helper.GetExprEnv(entry) - defer helper.PutExprEnv(env) - - matches, err := vm.Run(f.expression, env) - if err != nil { - f.Errorf("Running expressing returned an error", zap.Error(err)) - return nil - } - - filtered, ok := matches.(bool) - if !ok { - f.Errorf("Expression did not compile as a boolean") - return nil - } - - if !filtered { - f.Write(ctx, entry) - return nil - } - - i, err := randInt(rand.Reader, upperBound) - if err != nil { - return err - } - - if i.Cmp(f.dropCutoff) >= 0 { - f.Write(ctx, entry) - } - - return nil -} diff --git a/pkg/stanza/operator/transformer/filter/filter_test.go b/pkg/stanza/operator/transformer/filter/filter_test.go deleted file mode 100644 index ea44bb0c5d7d..000000000000 --- a/pkg/stanza/operator/transformer/filter/filter_test.go +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package filter - -import ( - "context" - "io" - "math/big" - "testing" - - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" -) - -func TestTransformer(t *testing.T) { - t.Setenv("TEST_FILTER_OPERATOR_ENV", "foo") - - cases := []struct { - name string - input *entry.Entry - expression string - filtered bool - }{ - { - "BodyMatch", - &entry.Entry{ - Body: map[string]any{ - "message": "test_message", - }, - }, - `body.message == "test_message"`, - true, - }, - { - "NoMatchBody", - &entry.Entry{ - Body: map[string]any{ - "message": "invalid", - }, - }, - `body.message == "test_message"`, - false, - }, - { - "MatchAttribute", - &entry.Entry{ - Body: map[string]any{ - "message": "test_message", - }, - Attributes: map[string]any{ - "key": "value", - }, - }, - `attributes.key == "value"`, - true, - }, - { - "MatchBodyNested", - &entry.Entry{ - Body: map[string]any{ - "one": map[string]any{ - "two": map[string]any{ - "key": "value", - }, - }, - }, - }, - `body.one.two.key == "value"`, - true, - }, - { - "MatchAttributeNested", - &entry.Entry{ - Body: map[string]any{ - "message": "test_message", - }, - Attributes: map[string]any{ - "one": map[string]any{ - "two": map[string]any{ - "key": "value", - }, - }, - }, - }, - `attributes.one.two.key == "value"`, - true, - }, - { - "MatchResourceNested", - &entry.Entry{ - Body: map[string]any{ - "message": "test_message", - }, - Resource: map[string]any{ - "one": map[string]any{ - "two": map[string]any{ - "key": "value", - }, - }, - }, - }, - `resource.one.two.key == "value"`, - true, - }, - { - "MatchResourceBracketed", - &entry.Entry{ - Body: map[string]any{ - "message": "test_message", - }, - Resource: map[string]any{ - "one": map[string]any{ - "two.stilltwo": "value", - }, - }, - }, - `resource.one["two.stilltwo"] == "value"`, - true, - }, - { - "NoMatchAttribute", - &entry.Entry{ - Body: map[string]any{ - "message": "test_message", - }, - }, - `attributes.key == "value"`, - false, - }, - { - "MatchEnv", - &entry.Entry{ - Body: map[string]any{ - "message": "test_message", - }, - }, - `env("TEST_FILTER_OPERATOR_ENV") == "foo"`, - true, - }, - { - "NoMatchEnv", - &entry.Entry{ - Body: map[string]any{ - "message": "test_message", - }, - }, - `env("TEST_FILTER_OPERATOR_ENV") == "bar"`, - false, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - cfg := NewConfigWithID("test") - cfg.Expression = tc.expression - - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - - filtered := true - mockOutput := testutil.NewMockOperator("output") - mockOutput.On("Process", mock.Anything, mock.Anything).Return(nil).Run(func(args mock.Arguments) { - filtered = false - }) - - filterOperator, ok := op.(*Transformer) - require.True(t, ok) - - filterOperator.OutputOperators = []operator.Operator{mockOutput} - err = filterOperator.Process(context.Background(), tc.input) - require.NoError(t, err) - - require.Equal(t, tc.filtered, filtered) - }) - } -} - -func TestFilterDropRatio(t *testing.T) { - cfg := NewConfigWithID("test") - cfg.Expression = `body.message == "test_message"` - cfg.DropRatio = 0.5 - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - - processedEntries := 0 - mockOutput := testutil.NewMockOperator("output") - mockOutput.On("Process", mock.Anything, mock.Anything).Return(nil).Run(func(args mock.Arguments) { - processedEntries++ - }) - - filterOperator, ok := op.(*Transformer) - filterOperator.OutputOperators = []operator.Operator{mockOutput} - require.True(t, ok) - - testEntry := &entry.Entry{ - Body: map[string]any{ - "message": "test_message", - }, - } - - nextIndex := 0 - randos := []int64{250, 750} - randInt = func(io.Reader, *big.Int) (*big.Int, error) { - defer func() { - nextIndex = (nextIndex + 1) % len(randos) - }() - return big.NewInt(randos[nextIndex]), nil - } - - for i := 1; i < 11; i++ { - err = filterOperator.Process(context.Background(), testEntry) - require.NoError(t, err) - } - - for i := 1; i < 11; i++ { - err = filterOperator.Process(context.Background(), testEntry) - require.NoError(t, err) - } - - require.Equal(t, 10, processedEntries) -} diff --git a/pkg/stanza/operator/transformer/filter/package_test.go b/pkg/stanza/operator/transformer/filter/package_test.go new file mode 100644 index 000000000000..ab3099a83e53 --- /dev/null +++ b/pkg/stanza/operator/transformer/filter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/transformer/filter/testdata/config.yaml b/pkg/stanza/operator/transformer/filter/testdata/config.yaml new file mode 100644 index 000000000000..5c31d687d26c --- /dev/null +++ b/pkg/stanza/operator/transformer/filter/testdata/config.yaml @@ -0,0 +1,14 @@ +default: + type: filter +drop_ratio_0: + type: filter + drop_ratio: 0 +drop_ratio_half: + type: filter + drop_ratio: 0.5 +drop_ratio_1: + type: filter + drop_ratio: 1 +expr: + type: filter + expr: body == 'value' diff --git a/pkg/stanza/operator/transformer/filter/transformer.go b/pkg/stanza/operator/transformer/filter/transformer.go new file mode 100644 index 000000000000..6685238654de --- /dev/null +++ b/pkg/stanza/operator/transformer/filter/transformer.go @@ -0,0 +1,57 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filter // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/filter" + +import ( + "context" + "crypto/rand" + "math/big" + + "github.com/expr-lang/expr/vm" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Transformer is an operator that filters entries based on matching expressions +type Transformer struct { + helper.TransformerOperator + expression *vm.Program + dropCutoff *big.Int // [0..1000) +} + +// Process will drop incoming entries that match the filter expression +func (t *Transformer) Process(ctx context.Context, entry *entry.Entry) error { + env := helper.GetExprEnv(entry) + defer helper.PutExprEnv(env) + + matches, err := vm.Run(t.expression, env) + if err != nil { + t.Errorf("Running expressing returned an error", zap.Error(err)) + return nil + } + + filtered, ok := matches.(bool) + if !ok { + t.Errorf("Expression did not compile as a boolean") + return nil + } + + if !filtered { + t.Write(ctx, entry) + return nil + } + + i, err := randInt(rand.Reader, upperBound) + if err != nil { + return err + } + + if i.Cmp(t.dropCutoff) >= 0 { + t.Write(ctx, entry) + } + + return nil +} diff --git a/pkg/stanza/operator/transformer/filter/transformer_test.go b/pkg/stanza/operator/transformer/filter/transformer_test.go new file mode 100644 index 000000000000..ced34d202e11 --- /dev/null +++ b/pkg/stanza/operator/transformer/filter/transformer_test.go @@ -0,0 +1,246 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filter + +import ( + "context" + "io" + "math/big" + "testing" + + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +func TestTransformer(t *testing.T) { + t.Setenv("TEST_FILTER_OPERATOR_ENV", "foo") + + cases := []struct { + name string + input *entry.Entry + expression string + filtered bool + }{ + { + "BodyMatch", + &entry.Entry{ + Body: map[string]any{ + "message": "test_message", + }, + }, + `body.message == "test_message"`, + true, + }, + { + "NoMatchBody", + &entry.Entry{ + Body: map[string]any{ + "message": "invalid", + }, + }, + `body.message == "test_message"`, + false, + }, + { + "FilterOutRegexp", + &entry.Entry{ + Body: map[string]any{ + "message": "INFO: this is an info message", + }, + }, + `body.message matches "^INFO:"`, + true, + }, + { + "FilterInRegexp", + &entry.Entry{ + Body: map[string]any{ + "message": "WARN: this is a warning message", + }, + }, + `body.message not matches "^WARN:"`, + false, + }, + { + "MatchAttribute", + &entry.Entry{ + Body: map[string]any{ + "message": "test_message", + }, + Attributes: map[string]any{ + "key": "value", + }, + }, + `attributes.key == "value"`, + true, + }, + { + "MatchBodyNested", + &entry.Entry{ + Body: map[string]any{ + "one": map[string]any{ + "two": map[string]any{ + "key": "value", + }, + }, + }, + }, + `body.one.two.key == "value"`, + true, + }, + { + "MatchAttributeNested", + &entry.Entry{ + Body: map[string]any{ + "message": "test_message", + }, + Attributes: map[string]any{ + "one": map[string]any{ + "two": map[string]any{ + "key": "value", + }, + }, + }, + }, + `attributes.one.two.key == "value"`, + true, + }, + { + "MatchResourceNested", + &entry.Entry{ + Body: map[string]any{ + "message": "test_message", + }, + Resource: map[string]any{ + "one": map[string]any{ + "two": map[string]any{ + "key": "value", + }, + }, + }, + }, + `resource.one.two.key == "value"`, + true, + }, + { + "MatchResourceBracketed", + &entry.Entry{ + Body: map[string]any{ + "message": "test_message", + }, + Resource: map[string]any{ + "one": map[string]any{ + "two.stilltwo": "value", + }, + }, + }, + `resource.one["two.stilltwo"] == "value"`, + true, + }, + { + "NoMatchAttribute", + &entry.Entry{ + Body: map[string]any{ + "message": "test_message", + }, + }, + `attributes.key == "value"`, + false, + }, + { + "MatchEnv", + &entry.Entry{ + Body: map[string]any{ + "message": "test_message", + }, + }, + `env("TEST_FILTER_OPERATOR_ENV") == "foo"`, + true, + }, + { + "NoMatchEnv", + &entry.Entry{ + Body: map[string]any{ + "message": "test_message", + }, + }, + `env("TEST_FILTER_OPERATOR_ENV") == "bar"`, + false, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + cfg := NewConfigWithID("test") + cfg.Expression = tc.expression + + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + + filtered := true + mockOutput := testutil.NewMockOperator("output") + mockOutput.On("Process", mock.Anything, mock.Anything).Return(nil).Run(func(_ mock.Arguments) { + filtered = false + }) + + filterOperator, ok := op.(*Transformer) + require.True(t, ok) + + filterOperator.OutputOperators = []operator.Operator{mockOutput} + err = filterOperator.Process(context.Background(), tc.input) + require.NoError(t, err) + + require.Equal(t, tc.filtered, filtered) + }) + } +} + +func TestFilterDropRatio(t *testing.T) { + cfg := NewConfigWithID("test") + cfg.Expression = `body.message == "test_message"` + cfg.DropRatio = 0.5 + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + + processedEntries := 0 + mockOutput := testutil.NewMockOperator("output") + mockOutput.On("Process", mock.Anything, mock.Anything).Return(nil).Run(func(_ mock.Arguments) { + processedEntries++ + }) + + filterOperator, ok := op.(*Transformer) + filterOperator.OutputOperators = []operator.Operator{mockOutput} + require.True(t, ok) + + testEntry := &entry.Entry{ + Body: map[string]any{ + "message": "test_message", + }, + } + + nextIndex := 0 + randos := []int64{250, 750} + randInt = func(io.Reader, *big.Int) (*big.Int, error) { + defer func() { + nextIndex = (nextIndex + 1) % len(randos) + }() + return big.NewInt(randos[nextIndex]), nil + } + + for i := 1; i < 11; i++ { + err = filterOperator.Process(context.Background(), testEntry) + require.NoError(t, err) + } + + for i := 1; i < 11; i++ { + err = filterOperator.Process(context.Background(), testEntry) + require.NoError(t, err) + } + + require.Equal(t, 10, processedEntries) +} diff --git a/pkg/stanza/operator/transformer/flatten/config.go b/pkg/stanza/operator/transformer/flatten/config.go new file mode 100644 index 000000000000..4a3886354c26 --- /dev/null +++ b/pkg/stanza/operator/transformer/flatten/config.go @@ -0,0 +1,69 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package flatten // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/flatten" + +import ( + "fmt" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "flatten" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new flatten operator config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new flatten operator config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a flatten operator +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` + Field entry.Field `mapstructure:"field"` +} + +// Build will build a Flatten operator from the supplied configuration +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformerOperator, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, err + } + + if e, ok := c.Field.FieldInterface.(entry.BodyField); ok { + return &Transformer[entry.BodyField]{ + TransformerOperator: transformerOperator, + Field: e, + }, nil + } + + if e, ok := c.Field.FieldInterface.(entry.ResourceField); ok { + return &Transformer[entry.ResourceField]{ + TransformerOperator: transformerOperator, + Field: e, + }, nil + } + + if e, ok := c.Field.FieldInterface.(entry.AttributeField); ok { + return &Transformer[entry.AttributeField]{ + TransformerOperator: transformerOperator, + Field: e, + }, nil + } + + return nil, fmt.Errorf("invalid field type: %T", c.Field.FieldInterface) +} diff --git a/pkg/stanza/operator/transformer/flatten/flatten.go b/pkg/stanza/operator/transformer/flatten/flatten.go deleted file mode 100644 index f40eef2564a6..000000000000 --- a/pkg/stanza/operator/transformer/flatten/flatten.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package flatten // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/flatten" - -import ( - "context" - "fmt" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/errors" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "flatten" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new flatten operator config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new flatten operator config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), - } -} - -// Config is the configuration of a flatten operator -type Config struct { - helper.TransformerConfig `mapstructure:",squash"` - Field entry.Field `mapstructure:"field"` -} - -// Build will build a Flatten operator from the supplied configuration -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - transformerOperator, err := c.TransformerConfig.Build(logger) - if err != nil { - return nil, err - } - - if e, ok := c.Field.FieldInterface.(entry.BodyField); ok { - return &Transformer[entry.BodyField]{ - TransformerOperator: transformerOperator, - Field: e, - }, nil - } - - if e, ok := c.Field.FieldInterface.(entry.ResourceField); ok { - return &Transformer[entry.ResourceField]{ - TransformerOperator: transformerOperator, - Field: e, - }, nil - } - - if e, ok := c.Field.FieldInterface.(entry.AttributeField); ok { - return &Transformer[entry.AttributeField]{ - TransformerOperator: transformerOperator, - Field: e, - }, nil - } - - return nil, fmt.Errorf("invalid field type: %T", c.Field.FieldInterface) -} - -// Transformer flattens an object in the entry field -type Transformer[T interface { - entry.BodyField | entry.ResourceField | entry.AttributeField - entry.FieldInterface - Parent() T - Child(string) T -}] struct { - helper.TransformerOperator - Field T -} - -// Process will process an entry with a flatten transformation. -func (p *Transformer[T]) Process(ctx context.Context, entry *entry.Entry) error { - return p.ProcessWith(ctx, entry, p.Transform) -} - -// Transform will apply the flatten operation to an entry -func (p *Transformer[T]) Transform(entry *entry.Entry) error { - parent := p.Field.Parent() - val, ok := entry.Delete(p.Field) - if !ok { - // The field doesn't exist, so ignore it - return fmt.Errorf("apply flatten: field %s does not exist on entry", p.Field) - } - - valMap, ok := val.(map[string]any) - if !ok { - // The field we were asked to flatten was not a map, so put it back - err := entry.Set(p.Field, val) - if err != nil { - return errors.Wrap(err, "reset non-map field") - } - return fmt.Errorf("apply flatten: field %s is not a map", p.Field) - } - - for k, v := range valMap { - err := entry.Set(parent.Child(k), v) - if err != nil { - return err - } - } - return nil -} diff --git a/pkg/stanza/operator/transformer/flatten/package_test.go b/pkg/stanza/operator/transformer/flatten/package_test.go new file mode 100644 index 000000000000..c3d262c3ac9f --- /dev/null +++ b/pkg/stanza/operator/transformer/flatten/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package flatten + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/transformer/flatten/transformer.go b/pkg/stanza/operator/transformer/flatten/transformer.go new file mode 100644 index 000000000000..0e92ecae38f0 --- /dev/null +++ b/pkg/stanza/operator/transformer/flatten/transformer.go @@ -0,0 +1,57 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package flatten // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/flatten" + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/errors" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Transformer flattens an object in the entry field +type Transformer[T interface { + entry.BodyField | entry.ResourceField | entry.AttributeField + entry.FieldInterface + Parent() T + Child(string) T +}] struct { + helper.TransformerOperator + Field T +} + +// Process will process an entry with a flatten transformation. +func (t *Transformer[T]) Process(ctx context.Context, entry *entry.Entry) error { + return t.ProcessWith(ctx, entry, t.Transform) +} + +// Transform will apply the flatten operation to an entry +func (t *Transformer[T]) Transform(entry *entry.Entry) error { + parent := t.Field.Parent() + val, ok := entry.Delete(t.Field) + if !ok { + // The field doesn't exist, so ignore it + return fmt.Errorf("apply flatten: field %s does not exist on entry", t.Field) + } + + valMap, ok := val.(map[string]any) + if !ok { + // The field we were asked to flatten was not a map, so put it back + err := entry.Set(t.Field, val) + if err != nil { + return errors.Wrap(err, "reset non-map field") + } + return fmt.Errorf("apply flatten: field %s is not a map", t.Field) + } + + for k, v := range valMap { + err := entry.Set(parent.Child(k), v) + if err != nil { + return err + } + } + return nil +} diff --git a/pkg/stanza/operator/transformer/flatten/flatten_test.go b/pkg/stanza/operator/transformer/flatten/transformer_test.go similarity index 100% rename from pkg/stanza/operator/transformer/flatten/flatten_test.go rename to pkg/stanza/operator/transformer/flatten/transformer_test.go diff --git a/pkg/stanza/operator/transformer/move/config.go b/pkg/stanza/operator/transformer/move/config.go new file mode 100644 index 000000000000..77a11c92fc3e --- /dev/null +++ b/pkg/stanza/operator/transformer/move/config.go @@ -0,0 +1,57 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package move // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/move" + +import ( + "fmt" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "move" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new move operator config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new move operator config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a move operator +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` + From entry.Field `mapstructure:"from"` + To entry.Field `mapstructure:"to"` +} + +// Build will build a Move operator from the supplied configuration +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformerOperator, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, err + } + + if c.To == entry.NewNilField() || c.From == entry.NewNilField() { + return nil, fmt.Errorf("move: missing to or from field") + } + + return &Transformer{ + TransformerOperator: transformerOperator, + From: c.From, + To: c.To, + }, nil +} diff --git a/pkg/stanza/operator/transformer/move/move.go b/pkg/stanza/operator/transformer/move/move.go deleted file mode 100644 index bb88b1fa92e4..000000000000 --- a/pkg/stanza/operator/transformer/move/move.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package move // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/move" - -import ( - "context" - "fmt" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "move" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new move operator config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new move operator config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), - } -} - -// Config is the configuration of a move operator -type Config struct { - helper.TransformerConfig `mapstructure:",squash"` - From entry.Field `mapstructure:"from"` - To entry.Field `mapstructure:"to"` -} - -// Build will build a Move operator from the supplied configuration -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - transformerOperator, err := c.TransformerConfig.Build(logger) - if err != nil { - return nil, err - } - - if c.To == entry.NewNilField() || c.From == entry.NewNilField() { - return nil, fmt.Errorf("move: missing to or from field") - } - - return &Transformer{ - TransformerOperator: transformerOperator, - From: c.From, - To: c.To, - }, nil -} - -// Transformer is an operator that moves a field's value to a new field -type Transformer struct { - helper.TransformerOperator - From entry.Field - To entry.Field -} - -// Process will process an entry with a move transformation. -func (p *Transformer) Process(ctx context.Context, entry *entry.Entry) error { - return p.ProcessWith(ctx, entry, p.Transform) -} - -// Transform will apply the move operation to an entry -func (p *Transformer) Transform(e *entry.Entry) error { - val, exist := p.From.Delete(e) - if !exist { - return fmt.Errorf("move: field does not exist: %s", p.From.String()) - } - return p.To.Set(e, val) -} diff --git a/pkg/stanza/operator/transformer/move/package_test.go b/pkg/stanza/operator/transformer/move/package_test.go new file mode 100644 index 000000000000..7b0be4f3148b --- /dev/null +++ b/pkg/stanza/operator/transformer/move/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package move + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/transformer/move/transformer.go b/pkg/stanza/operator/transformer/move/transformer.go new file mode 100644 index 000000000000..c491df9c51f1 --- /dev/null +++ b/pkg/stanza/operator/transformer/move/transformer.go @@ -0,0 +1,33 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package move // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/move" + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Transformer is an operator that moves a field's value to a new field +type Transformer struct { + helper.TransformerOperator + From entry.Field + To entry.Field +} + +// Process will process an entry with a move transformation. +func (t *Transformer) Process(ctx context.Context, entry *entry.Entry) error { + return t.ProcessWith(ctx, entry, t.Transform) +} + +// Transform will apply the move operation to an entry +func (t *Transformer) Transform(e *entry.Entry) error { + val, exist := t.From.Delete(e) + if !exist { + return fmt.Errorf("move: field does not exist: %s", t.From.String()) + } + return t.To.Set(e, val) +} diff --git a/pkg/stanza/operator/transformer/move/move_test.go b/pkg/stanza/operator/transformer/move/transformer_test.go similarity index 100% rename from pkg/stanza/operator/transformer/move/move_test.go rename to pkg/stanza/operator/transformer/move/transformer_test.go diff --git a/pkg/stanza/operator/transformer/noop/config.go b/pkg/stanza/operator/transformer/noop/config.go new file mode 100644 index 000000000000..dfc6dbdf6190 --- /dev/null +++ b/pkg/stanza/operator/transformer/noop/config.go @@ -0,0 +1,46 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package noop // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/noop" + +import ( + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "noop" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new noop operator config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new noop operator config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a noop operator. +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` +} + +// Build will build a noop operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformerOperator, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, err + } + + return &Transformer{ + TransformerOperator: transformerOperator, + }, nil +} diff --git a/pkg/stanza/operator/transformer/noop/config_test.go b/pkg/stanza/operator/transformer/noop/config_test.go new file mode 100644 index 000000000000..a90e02d3c164 --- /dev/null +++ b/pkg/stanza/operator/transformer/noop/config_test.go @@ -0,0 +1,26 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package noop + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +func TestBuildValid(t *testing.T) { + cfg := NewConfigWithID("test") + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + require.IsType(t, &Transformer{}, op) +} + +func TestBuildInvalid(t *testing.T) { + cfg := NewConfigWithID("test") + _, err := cfg.Build(nil) + require.Error(t, err) + require.Contains(t, err.Error(), "build context is missing a logger") +} diff --git a/pkg/stanza/operator/transformer/noop/noop.go b/pkg/stanza/operator/transformer/noop/noop.go deleted file mode 100644 index 8a1d1fe164a0..000000000000 --- a/pkg/stanza/operator/transformer/noop/noop.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package noop // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/noop" - -import ( - "context" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "noop" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new noop operator config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new noop operator config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), - } -} - -// Config is the configuration of a noop operator. -type Config struct { - helper.TransformerConfig `mapstructure:",squash"` -} - -// Build will build a noop operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - transformerOperator, err := c.TransformerConfig.Build(logger) - if err != nil { - return nil, err - } - - return &Transformer{ - TransformerOperator: transformerOperator, - }, nil -} - -// Transformer is an operator that performs no operations on an entry. -type Transformer struct { - helper.TransformerOperator -} - -// Process will forward the entry to the next output without any alterations. -func (p *Transformer) Process(ctx context.Context, entry *entry.Entry) error { - p.Write(ctx, entry) - return nil -} diff --git a/pkg/stanza/operator/transformer/noop/noop_test.go b/pkg/stanza/operator/transformer/noop/noop_test.go deleted file mode 100644 index bb207339dc0e..000000000000 --- a/pkg/stanza/operator/transformer/noop/noop_test.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package noop - -import ( - "context" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" -) - -func TestBuildValid(t *testing.T) { - cfg := NewConfigWithID("test") - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - require.IsType(t, &Transformer{}, op) -} - -func TestBuildInvalid(t *testing.T) { - cfg := NewConfigWithID("test") - _, err := cfg.Build(nil) - require.Error(t, err) - require.Contains(t, err.Error(), "build context is missing a logger") -} - -func TestProcess(t *testing.T) { - cfg := NewConfigWithID("test") - cfg.OutputIDs = []string{"fake"} - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - - fake := testutil.NewFakeOutput(t) - require.NoError(t, op.SetOutputs([]operator.Operator{fake})) - - entry := entry.New() - entry.AddAttribute("label", "value") - entry.AddResourceKey("resource", "value") - entry.TraceID = []byte{0x01} - entry.SpanID = []byte{0x01} - entry.TraceFlags = []byte{0x01} - - expected := entry.Copy() - err = op.Process(context.Background(), entry) - require.NoError(t, err) - - fake.ExpectEntry(t, expected) -} diff --git a/pkg/stanza/operator/transformer/noop/package_test.go b/pkg/stanza/operator/transformer/noop/package_test.go new file mode 100644 index 000000000000..86a9cf58abec --- /dev/null +++ b/pkg/stanza/operator/transformer/noop/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package noop + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/transformer/noop/transformer.go b/pkg/stanza/operator/transformer/noop/transformer.go new file mode 100644 index 000000000000..1656a3557701 --- /dev/null +++ b/pkg/stanza/operator/transformer/noop/transformer.go @@ -0,0 +1,22 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package noop // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/noop" + +import ( + "context" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Transformer is an operator that performs no operations on an entry. +type Transformer struct { + helper.TransformerOperator +} + +// Process will forward the entry to the next output without any alterations. +func (t *Transformer) Process(ctx context.Context, entry *entry.Entry) error { + t.Write(ctx, entry) + return nil +} diff --git a/pkg/stanza/operator/transformer/noop/transformer_test.go b/pkg/stanza/operator/transformer/noop/transformer_test.go new file mode 100644 index 000000000000..99533f86b201 --- /dev/null +++ b/pkg/stanza/operator/transformer/noop/transformer_test.go @@ -0,0 +1,38 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package noop + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +func TestProcess(t *testing.T) { + cfg := NewConfigWithID("test") + cfg.OutputIDs = []string{"fake"} + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + + fake := testutil.NewFakeOutput(t) + require.NoError(t, op.SetOutputs([]operator.Operator{fake})) + + entry := entry.New() + entry.AddAttribute("label", "value") + entry.AddResourceKey("resource", "value") + entry.TraceID = []byte{0x01} + entry.SpanID = []byte{0x01} + entry.TraceFlags = []byte{0x01} + + expected := entry.Copy() + err = op.Process(context.Background(), entry) + require.NoError(t, err) + + fake.ExpectEntry(t, expected) +} diff --git a/pkg/stanza/operator/transformer/recombine/config.go b/pkg/stanza/operator/transformer/recombine/config.go new file mode 100644 index 000000000000..e994668815f5 --- /dev/null +++ b/pkg/stanza/operator/transformer/recombine/config.go @@ -0,0 +1,130 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package recombine // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/recombine" + +import ( + "bytes" + "fmt" + "sync" + "time" + + "github.com/expr-lang/expr/vm" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const ( + operatorType = "recombine" + defaultCombineWith = "\n" +) + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new recombine config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new recombine config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + MaxBatchSize: 1000, + MaxSources: 1000, + CombineWith: defaultCombineWith, + OverwriteWith: "oldest", + ForceFlushTimeout: 5 * time.Second, + SourceIdentifier: entry.NewAttributeField("file.path"), + } +} + +// Config is the configuration of a recombine operator +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` + IsFirstEntry string `mapstructure:"is_first_entry"` + IsLastEntry string `mapstructure:"is_last_entry"` + MaxBatchSize int `mapstructure:"max_batch_size"` + CombineField entry.Field `mapstructure:"combine_field"` + CombineWith string `mapstructure:"combine_with"` + SourceIdentifier entry.Field `mapstructure:"source_identifier"` + OverwriteWith string `mapstructure:"overwrite_with"` + ForceFlushTimeout time.Duration `mapstructure:"force_flush_period"` + MaxSources int `mapstructure:"max_sources"` + MaxLogSize helper.ByteSize `mapstructure:"max_log_size,omitempty"` +} + +// Build creates a new Transformer from a config +func (c *Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformer, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, fmt.Errorf("failed to build transformer config: %w", err) + } + + if c.IsLastEntry != "" && c.IsFirstEntry != "" { + return nil, fmt.Errorf("only one of is_first_entry and is_last_entry can be set") + } + + if c.IsLastEntry == "" && c.IsFirstEntry == "" { + return nil, fmt.Errorf("one of is_first_entry and is_last_entry must be set") + } + + var matchesFirst bool + var prog *vm.Program + if c.IsFirstEntry != "" { + matchesFirst = true + prog, err = helper.ExprCompileBool(c.IsFirstEntry) + if err != nil { + return nil, fmt.Errorf("failed to compile is_first_entry: %w", err) + } + } else { + matchesFirst = false + prog, err = helper.ExprCompileBool(c.IsLastEntry) + if err != nil { + return nil, fmt.Errorf("failed to compile is_last_entry: %w", err) + } + } + + if c.CombineField.FieldInterface == nil { + return nil, fmt.Errorf("missing required argument 'combine_field'") + } + + var overwriteWithNewest bool + switch c.OverwriteWith { + case "newest": + overwriteWithNewest = true + case "oldest", "": + overwriteWithNewest = false + default: + return nil, fmt.Errorf("invalid value '%s' for parameter 'overwrite_with'", c.OverwriteWith) + } + + return &Transformer{ + TransformerOperator: transformer, + matchFirstLine: matchesFirst, + prog: prog, + maxBatchSize: c.MaxBatchSize, + maxSources: c.MaxSources, + overwriteWithNewest: overwriteWithNewest, + batchMap: make(map[string]*sourceBatch), + batchPool: sync.Pool{ + New: func() any { + return &sourceBatch{ + recombined: &bytes.Buffer{}, + } + }, + }, + combineField: c.CombineField, + combineWith: c.CombineWith, + forceFlushTimeout: c.ForceFlushTimeout, + ticker: time.NewTicker(c.ForceFlushTimeout), + chClose: make(chan struct{}), + sourceIdentifier: c.SourceIdentifier, + maxLogSize: int64(c.MaxLogSize), + }, nil +} diff --git a/pkg/stanza/operator/transformer/recombine/package_test.go b/pkg/stanza/operator/transformer/recombine/package_test.go new file mode 100644 index 000000000000..76aa4014d0d1 --- /dev/null +++ b/pkg/stanza/operator/transformer/recombine/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package recombine + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/transformer/recombine/recombine.go b/pkg/stanza/operator/transformer/recombine/recombine.go deleted file mode 100644 index 8a204e50aa1d..000000000000 --- a/pkg/stanza/operator/transformer/recombine/recombine.go +++ /dev/null @@ -1,384 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package recombine // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/recombine" - -import ( - "bytes" - "context" - "fmt" - "sync" - "time" - - "github.com/antonmedv/expr" - "github.com/antonmedv/expr/vm" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const ( - operatorType = "recombine" - defaultCombineWith = "\n" -) - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new recombine config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new recombine config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), - MaxBatchSize: 1000, - MaxSources: 1000, - CombineWith: defaultCombineWith, - OverwriteWith: "oldest", - ForceFlushTimeout: 5 * time.Second, - SourceIdentifier: entry.NewAttributeField("file.path"), - } -} - -// Config is the configuration of a recombine operator -type Config struct { - helper.TransformerConfig `mapstructure:",squash"` - IsFirstEntry string `mapstructure:"is_first_entry"` - IsLastEntry string `mapstructure:"is_last_entry"` - MaxBatchSize int `mapstructure:"max_batch_size"` - CombineField entry.Field `mapstructure:"combine_field"` - CombineWith string `mapstructure:"combine_with"` - SourceIdentifier entry.Field `mapstructure:"source_identifier"` - OverwriteWith string `mapstructure:"overwrite_with"` - ForceFlushTimeout time.Duration `mapstructure:"force_flush_period"` - MaxSources int `mapstructure:"max_sources"` - MaxLogSize helper.ByteSize `mapstructure:"max_log_size,omitempty"` -} - -// Build creates a new Transformer from a config -func (c *Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - transformer, err := c.TransformerConfig.Build(logger) - if err != nil { - return nil, fmt.Errorf("failed to build transformer config: %w", err) - } - - if c.IsLastEntry != "" && c.IsFirstEntry != "" { - return nil, fmt.Errorf("only one of is_first_entry and is_last_entry can be set") - } - - if c.IsLastEntry == "" && c.IsFirstEntry == "" { - return nil, fmt.Errorf("one of is_first_entry and is_last_entry must be set") - } - - var matchesFirst bool - var prog *vm.Program - if c.IsFirstEntry != "" { - matchesFirst = true - prog, err = helper.ExprCompileBool(c.IsFirstEntry) - if err != nil { - return nil, fmt.Errorf("failed to compile is_first_entry: %w", err) - } - } else { - matchesFirst = false - prog, err = helper.ExprCompileBool(c.IsLastEntry) - if err != nil { - return nil, fmt.Errorf("failed to compile is_last_entry: %w", err) - } - } - - if c.CombineField.FieldInterface == nil { - return nil, fmt.Errorf("missing required argument 'combine_field'") - } - - var overwriteWithOldest bool - switch c.OverwriteWith { - case "newest": - overwriteWithOldest = false - case "oldest", "": - overwriteWithOldest = true - default: - return nil, fmt.Errorf("invalid value '%s' for parameter 'overwrite_with'", c.OverwriteWith) - } - - return &Transformer{ - TransformerOperator: transformer, - matchFirstLine: matchesFirst, - prog: prog, - maxBatchSize: c.MaxBatchSize, - maxSources: c.MaxSources, - overwriteWithOldest: overwriteWithOldest, - batchMap: make(map[string]*sourceBatch), - batchPool: sync.Pool{ - New: func() any { - return &sourceBatch{ - entries: []*entry.Entry{}, - recombined: &bytes.Buffer{}, - } - }, - }, - combineField: c.CombineField, - combineWith: c.CombineWith, - forceFlushTimeout: c.ForceFlushTimeout, - ticker: time.NewTicker(c.ForceFlushTimeout), - chClose: make(chan struct{}), - sourceIdentifier: c.SourceIdentifier, - maxLogSize: int64(c.MaxLogSize), - }, nil -} - -// Transformer is an operator that combines a field from consecutive log entries -// into a single -type Transformer struct { - helper.TransformerOperator - matchFirstLine bool - prog *vm.Program - maxBatchSize int - maxSources int - overwriteWithOldest bool - combineField entry.Field - combineWith string - ticker *time.Ticker - forceFlushTimeout time.Duration - chClose chan struct{} - sourceIdentifier entry.Field - - sync.Mutex - batchPool sync.Pool - batchMap map[string]*sourceBatch - maxLogSize int64 -} - -// sourceBatch contains the status info of a batch -type sourceBatch struct { - entries []*entry.Entry - recombined *bytes.Buffer - firstEntryObservedTime time.Time -} - -func (r *Transformer) Start(_ operator.Persister) error { - go r.flushLoop() - - return nil -} - -func (r *Transformer) flushLoop() { - for { - select { - case <-r.ticker.C: - r.Lock() - timeNow := time.Now() - for source, batch := range r.batchMap { - timeSinceFirstEntry := timeNow.Sub(batch.firstEntryObservedTime) - if timeSinceFirstEntry < r.forceFlushTimeout { - continue - } - if err := r.flushSource(source, true); err != nil { - r.Errorf("there was error flushing combined logs %s", err) - } - } - // check every 1/5 forceFlushTimeout - r.ticker.Reset(r.forceFlushTimeout / 5) - r.Unlock() - case <-r.chClose: - r.ticker.Stop() - return - } - } -} - -func (r *Transformer) Stop() error { - r.Lock() - defer r.Unlock() - - ctx, cancel := context.WithTimeout(context.Background(), time.Second) - defer cancel() - r.flushUncombined(ctx) - - close(r.chClose) - - return nil -} - -const DefaultSourceIdentifier = "DefaultSourceIdentifier" - -func (r *Transformer) Process(ctx context.Context, e *entry.Entry) error { - // Lock the recombine operator because process can't run concurrently - r.Lock() - defer r.Unlock() - - // Get the environment for executing the expression. - // In the future, we may want to provide access to the currently - // batched entries so users can do comparisons to other entries - // rather than just use absolute rules. - env := helper.GetExprEnv(e) - defer helper.PutExprEnv(env) - - m, err := expr.Run(r.prog, env) - if err != nil { - return r.HandleEntryError(ctx, e, err) - } - - // this is guaranteed to be a boolean because of expr.AsBool - matches := m.(bool) - var s string - err = e.Read(r.sourceIdentifier, &s) - if err != nil { - r.Warn("entry does not contain the source_identifier, so it may be pooled with other sources") - s = DefaultSourceIdentifier - } - - if s == "" { - s = DefaultSourceIdentifier - } - - switch { - // This is the first entry in the next batch - case matches && r.matchIndicatesFirst(): - // Flush the existing batch - err := r.flushSource(s, true) - if err != nil { - return err - } - - // Add the current log to the new batch - r.addToBatch(ctx, e, s) - return nil - // This is the last entry in a complete batch - case matches && r.matchIndicatesLast(): - fallthrough - // When matching on first entry, never batch partial first. Just emit immediately - case !matches && r.matchIndicatesFirst() && r.batchMap[s] == nil: - r.addToBatch(ctx, e, s) - return r.flushSource(s, true) - } - - // This is neither the first entry of a new log, - // nor the last entry of a log, so just add it to the batch - r.addToBatch(ctx, e, s) - return nil -} - -func (r *Transformer) matchIndicatesFirst() bool { - return r.matchFirstLine -} - -func (r *Transformer) matchIndicatesLast() bool { - return !r.matchFirstLine -} - -// addToBatch adds the current entry to the current batch of entries that will be combined -func (r *Transformer) addToBatch(_ 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 - } - } 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.entries = append(batch.entries, e) - } - - // Combine the combineField of each entry in the batch, - // separated by newlines - var s string - err := e.Read(r.combineField, &s) - if err != nil { - r.Errorf("entry does not contain the combine_field") - return - } - if batch.recombined.Len() > 0 { - batch.recombined.WriteString(r.combineWith) - } - batch.recombined.WriteString(s) - - if (r.maxLogSize > 0 && int64(batch.recombined.Len()) > r.maxLogSize) || len(batch.entries) >= r.maxBatchSize { - if err := r.flushSource(source, false); err != nil { - r.Errorf("there was error flushing combined logs %s", err) - } - } - -} - -// 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) -} - -// flushSource combines the entries currently in the batch into a single entry, -// then forwards them to the next operator in the pipeline -func (r *Transformer) flushSource(source string, deleteSource bool) error { - batch := r.batchMap[source] - // Skip flushing a combined log if the batch is empty - if batch == nil { - return nil - } - - if len(batch.entries) == 0 { - 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[0] - } else { - base = entries[len(entries)-1] - } - - // Set the recombined field on the entry - err := base.Set(r.combineField, batch.recombined.String()) - if err != nil { - return err - } - - r.Write(context.Background(), base) - if deleteSource { - r.removeBatch(source) - } else { - batch.entries = batch.entries[:0] - batch.recombined.Reset() - } - - return nil -} - -// 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.recombined.Reset() - batch.firstEntryObservedTime = e.ObservedTimestamp - r.batchMap[source] = batch - return batch -} - -// removeBatch removes the batch for the given source. -func (r *Transformer) removeBatch(source string) { - batch := r.batchMap[source] - delete(r.batchMap, source) - r.batchPool.Put(batch) -} diff --git a/pkg/stanza/operator/transformer/recombine/recombine_test.go b/pkg/stanza/operator/transformer/recombine/recombine_test.go deleted file mode 100644 index 9887d28cc537..000000000000 --- a/pkg/stanza/operator/transformer/recombine/recombine_test.go +++ /dev/null @@ -1,741 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package recombine - -import ( - "context" - "fmt" - "strings" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" -) - -const ( - MatchAll string = "true" -) - -func TestTransformer(t *testing.T) { - now := time.Now() - t1 := time.Date(2020, time.April, 11, 21, 34, 01, 0, time.UTC) - t2 := time.Date(2020, time.April, 11, 21, 34, 02, 0, time.UTC) - - entryWithBody := func(ts time.Time, body any) *entry.Entry { - e := entry.New() - e.ObservedTimestamp = now - e.Timestamp = ts - e.Body = body - return e - } - - entryWithBodyAttr := func(ts time.Time, body any, Attr map[string]string) *entry.Entry { - e := entryWithBody(ts, body) - for k, v := range Attr { - e.AddAttribute(k, v) - } - return e - } - - cases := []struct { - name string - config *Config - input []*entry.Entry - expectedOutput []*entry.Entry - }{ - { - "NoEntriesFirst", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsFirstEntry = MatchAll - cfg.OutputIDs = []string{"fake"} - return cfg - }(), - nil, - nil, - }, - { - "NoEntriesLast", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsLastEntry = MatchAll - cfg.OutputIDs = []string{"fake"} - return cfg - }(), - nil, - nil, - }, - { - "OneEntryFirst", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsFirstEntry = MatchAll - cfg.OutputIDs = []string{"fake"} - return cfg - }(), - []*entry.Entry{entry.New()}, - nil, - }, - { - "OneEntryLast", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsLastEntry = MatchAll - cfg.OutputIDs = []string{"fake"} - return cfg - }(), - []*entry.Entry{entryWithBody(t1, "test")}, - []*entry.Entry{entryWithBody(t1, "test")}, - }, - { - "TwoEntriesLast", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsLastEntry = "body == 'test2'" - cfg.OutputIDs = []string{"fake"} - return cfg - }(), - []*entry.Entry{ - entryWithBody(t1, "test1"), - entryWithBody(t2, "test2"), - }, - []*entry.Entry{entryWithBody(t1, "test1\ntest2")}, - }, - { - "ThreeEntriesFirstNewest", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsFirstEntry = "body == 'test1'" - cfg.OutputIDs = []string{"fake"} - cfg.OverwriteWith = "newest" - return cfg - }(), - []*entry.Entry{ - entryWithBody(t1, "test1"), - entryWithBody(t2, "test2"), - entryWithBody(t2, "test1"), - }, - []*entry.Entry{ - entryWithBody(t2, "test1\ntest2"), - }, - }, - { - "EntriesNonMatchingForFirstEntry", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsFirstEntry = "$body == 'test1'" - cfg.OutputIDs = []string{"fake"} - cfg.OverwriteWith = "newest" - return cfg - }(), - []*entry.Entry{ - entryWithBody(t1, "test2"), - entryWithBody(t2, "test3"), - entryWithBody(t2, "test4"), - }, - []*entry.Entry{ - entryWithBody(t1, "test2"), - entryWithBody(t2, "test3"), - entryWithBody(t2, "test4"), - }, - }, - { - "EntriesMatchingForFirstEntryOneFileOnly", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsFirstEntry = "body == 'file1'" - cfg.OutputIDs = []string{"fake"} - cfg.OverwriteWith = "newest" - return cfg - }(), - []*entry.Entry{ - entryWithBodyAttr(t1, "file1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "file3", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "file1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t2, "file2", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "file1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t2, "file2", map[string]string{"file.path": "file2"}), - entryWithBodyAttr(t2, "file3", map[string]string{"file.path": "file2"}), - }, - []*entry.Entry{ - entryWithBodyAttr(t1, "file1\nfile3", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t2, "file1\nfile2", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t2, "file2", map[string]string{"file.path": "file2"}), - entryWithBodyAttr(t2, "file3", map[string]string{"file.path": "file2"}), - }, - }, - { - "CombineWithEmptyString", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.CombineWith = "" - cfg.IsLastEntry = "body == 'test2'" - cfg.OutputIDs = []string{"fake"} - return cfg - }(), - []*entry.Entry{ - entryWithBody(t1, "test1"), - entryWithBody(t1, "test2"), - }, - []*entry.Entry{entryWithBody(t1, "test1test2")}, - }, - { - "Stacktrace", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsFirstEntry = `body matches "^[^\\s]"` - cfg.ForceFlushTimeout = 100 * time.Millisecond - cfg.OutputIDs = []string{"fake"} - return cfg - }(), - []*entry.Entry{ - entryWithBody(t1, "Log message 1"), - entryWithBody(t1, "Error: java.lang.Exception: Stack trace"), - entryWithBody(t1, " at java.lang.Thread.dumpStack(Thread.java:1336)"), - entryWithBody(t1, " at Main.demo3(Main.java:15)"), - entryWithBody(t1, " at Main.demo2(Main.java:12)"), - entryWithBody(t1, " at Main.demo1(Main.java:9)"), - entryWithBody(t1, " at Main.demo(Main.java:6)"), - entryWithBody(t1, " at Main.main(Main.java:3)"), - entryWithBody(t1, "Another log message"), - }, - []*entry.Entry{ - entryWithBody(t1, "Log message 1"), - entryWithBody(t1, "Error: java.lang.Exception: Stack trace\n"+ - " at java.lang.Thread.dumpStack(Thread.java:1336)\n"+ - " at Main.demo3(Main.java:15)\n"+ - " at Main.demo2(Main.java:12)\n"+ - " at Main.demo1(Main.java:9)\n"+ - " at Main.demo(Main.java:6)\n"+ - " at Main.main(Main.java:3)"), - entryWithBody(t1, "Another log message"), - }, - }, - { - "StacktraceSubfield", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField("message") - cfg.IsFirstEntry = `body.message matches "^[^\\s]"` - cfg.ForceFlushTimeout = 100 * time.Millisecond - cfg.OutputIDs = []string{"fake"} - return cfg - }(), - []*entry.Entry{ - entryWithBody(t1, map[string]any{"message": "Log message 1"}), - entryWithBody(t1, map[string]any{"message": "Error: java.lang.Exception: Stack trace"}), - entryWithBody(t1, map[string]any{"message": " at java.lang.Thread.dumpStack(Thread.java:1336)"}), - entryWithBody(t1, map[string]any{"message": " at Main.demo3(Main.java:15)"}), - entryWithBody(t1, map[string]any{"message": " at Main.demo2(Main.java:12)"}), - entryWithBody(t1, map[string]any{"message": " at Main.demo1(Main.java:9)"}), - entryWithBody(t1, map[string]any{"message": " at Main.demo(Main.java:6)"}), - entryWithBody(t1, map[string]any{"message": " at Main.main(Main.java:3)"}), - entryWithBody(t1, map[string]any{"message": "Another log message"}), - }, - []*entry.Entry{ - entryWithBody(t1, map[string]any{"message": "Log message 1"}), - entryWithBody(t1, map[string]any{"message": "Error: java.lang.Exception: Stack trace\n" + - " at java.lang.Thread.dumpStack(Thread.java:1336)\n" + - " at Main.demo3(Main.java:15)\n" + - " at Main.demo2(Main.java:12)\n" + - " at Main.demo1(Main.java:9)\n" + - " at Main.demo(Main.java:6)\n" + - " at Main.main(Main.java:3)"}), - entryWithBody(t1, map[string]any{"message": "Another log message"}), - }, - }, - { - "CombineOtherThanCondition", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField("message") - cfg.CombineWith = "" - cfg.IsLastEntry = "body.logtag == 'F'" - cfg.OverwriteWith = "newest" - cfg.ForceFlushTimeout = 100 * time.Millisecond - cfg.OutputIDs = []string{"fake"} - return cfg - }(), - []*entry.Entry{ - entryWithBody(t1, map[string]any{ - "message": "Single entry log 1", - "logtag": "F", - "stream": "stdout", - "timestamp": "2016-10-06T00:17:09.669794202Z", - }), - entryWithBody(t1, map[string]any{ - "message": "This is a very very long line th", - "logtag": "P", - "stream": "stdout", - "timestamp": "2016-10-06T00:17:10.113242941Z", - }), - entryWithBody(t1, map[string]any{ - "message": "at is really really long and spa", - "logtag": "P", - "stream": "stdout", - "timestamp": "2016-10-06T00:17:10.113242941Z", - }), - entryWithBody(t1, map[string]any{ - "message": "ns across multiple log entries", - "logtag": "F", - "stream": "stdout", - "timestamp": "2016-10-06T00:17:10.113242941Z", - }), - }, - []*entry.Entry{ - entryWithBody(t1, map[string]any{ - "message": "Single entry log 1", - "logtag": "F", - "stream": "stdout", - "timestamp": "2016-10-06T00:17:09.669794202Z", - }), - entryWithBody(t1, map[string]any{ - "message": "This is a very very long line that is really really long and spans across multiple log entries", - "logtag": "F", - "stream": "stdout", - "timestamp": "2016-10-06T00:17:10.113242941Z", - }), - }, - }, - { - "TestDefaultSourceIdentifier", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsLastEntry = "body == 'end'" - cfg.OutputIDs = []string{"fake"} - return cfg - }(), - []*entry.Entry{ - entryWithBodyAttr(t1, "file1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "file2", map[string]string{"file.path": "file2"}), - entryWithBodyAttr(t2, "end", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t2, "end", map[string]string{"file.path": "file2"}), - }, - []*entry.Entry{ - entryWithBodyAttr(t1, "file1\nend", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "file2\nend", map[string]string{"file.path": "file2"}), - }, - }, - { - "TestCustomSourceIdentifier", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsLastEntry = "body == 'end'" - cfg.OutputIDs = []string{"fake"} - cfg.SourceIdentifier = entry.NewAttributeField("custom_source") - return cfg - }(), - []*entry.Entry{ - entryWithBodyAttr(t1, "file1", map[string]string{"custom_source": "file1"}), - entryWithBodyAttr(t1, "file2", map[string]string{"custom_source": "file2"}), - entryWithBodyAttr(t2, "end", map[string]string{"custom_source": "file1"}), - entryWithBodyAttr(t2, "end", map[string]string{"custom_source": "file2"}), - }, - []*entry.Entry{ - entryWithBodyAttr(t1, "file1\nend", map[string]string{"custom_source": "file1"}), - entryWithBodyAttr(t1, "file2\nend", map[string]string{"custom_source": "file2"}), - }, - }, - { - "TestMaxSources", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsLastEntry = "body == 'end'" - cfg.OutputIDs = []string{"fake"} - cfg.MaxSources = 1 - return cfg - }(), - []*entry.Entry{ - entryWithBodyAttr(t1, "file1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t2, "end", map[string]string{"file.path": "file1"}), - }, - []*entry.Entry{ - entryWithBodyAttr(t1, "file1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t2, "end", map[string]string{"file.path": "file1"}), - }, - }, - { - "TestMaxBatchSize", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsLastEntry = "body == 'end'" - cfg.OutputIDs = []string{"fake"} - cfg.MaxBatchSize = 2 - return cfg - }(), - []*entry.Entry{ - entryWithBodyAttr(t1, "file1_event1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "file2_event1", map[string]string{"file.path": "file2"}), - entryWithBodyAttr(t2, "end", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t2, "file2_event2", map[string]string{"file.path": "file2"}), - entryWithBodyAttr(t2, "end", map[string]string{"file.path": "file2"}), - }, - []*entry.Entry{ - entryWithBodyAttr(t1, "file1_event1\nend", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "file2_event1\nfile2_event2", map[string]string{"file.path": "file2"}), - entryWithBodyAttr(t2, "end", map[string]string{"file.path": "file2"}), - }, - }, - { - "TestMaxLogSizeForLastEntry", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsLastEntry = "body == 'end'" - cfg.OutputIDs = []string{"fake"} - cfg.MaxLogSize = helper.ByteSize(5) - return cfg - }(), - []*entry.Entry{ - entryWithBodyAttr(t1, "file1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "file1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "file2", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "end", map[string]string{"file.path": "file1"}), - }, - []*entry.Entry{ - entryWithBodyAttr(t1, "file1\nfile1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "file2\nend", map[string]string{"file.path": "file1"}), - }, - }, - { - "TestMaxLogSizeForFirstEntry", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsFirstEntry = "body == 'start'" - cfg.OutputIDs = []string{"fake"} - cfg.MaxLogSize = helper.ByteSize(12) - return cfg - }(), - []*entry.Entry{ - entryWithBodyAttr(t1, "start", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content2", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content3", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content4", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content5", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "start", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "start", map[string]string{"file.path": "file1"}), - }, - []*entry.Entry{ - entryWithBodyAttr(t1, "start\ncontent1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content2\ncontent3", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content4\ncontent5", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "start", map[string]string{"file.path": "file1"}), - }, - }, - { - "TestBatchSplitWhenTriggerTheBatchSizeLimit", - func() *Config { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsFirstEntry = "body == 'start'" - cfg.OutputIDs = []string{"fake"} - cfg.MaxBatchSize = 5 - return cfg - }(), - []*entry.Entry{ - entryWithBodyAttr(t1, "start", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content2", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content3", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content4", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content5", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content6", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content7", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content8", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content9", map[string]string{"file.path": "file1"}), - }, - []*entry.Entry{ - entryWithBodyAttr(t1, "start\ncontent1\ncontent2\ncontent3\ncontent4", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t1, "content5\ncontent6\ncontent7\ncontent8\ncontent9", map[string]string{"file.path": "file1"}), - }, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - op, err := tc.config.Build(testutil.Logger(t)) - require.NoError(t, err) - require.NoError(t, op.Start(testutil.NewUnscopedMockPersister())) - recombine := op.(*Transformer) - - fake := testutil.NewFakeOutput(t) - err = recombine.SetOutputs([]operator.Operator{fake}) - require.NoError(t, err) - - for _, e := range tc.input { - require.NoError(t, recombine.Process(context.Background(), e)) - } - - for _, expected := range tc.expectedOutput { - fake.ExpectEntry(t, expected) - } - - select { - case e := <-fake.Received: - require.FailNow(t, "Received unexpected entry: ", e) - default: - } - }) - } - - t.Run("FlushesOnShutdown", func(t *testing.T) { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsFirstEntry = MatchAll - cfg.OutputIDs = []string{"fake"} - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - recombine := op.(*Transformer) - - fake := testutil.NewFakeOutput(t) - err = recombine.SetOutputs([]operator.Operator{fake}) - require.NoError(t, err) - - // Send an entry that isn't the last in a multiline - require.NoError(t, recombine.Process(context.Background(), entry.New())) - - // Ensure that the entry isn't immediately sent - select { - case <-fake.Received: - require.FailNow(t, "Received unexpected entry") - case <-time.After(10 * time.Millisecond): - } - - // Stop the operator - require.NoError(t, recombine.Stop()) - - // Ensure that the entries in the buffer are flushed - select { - case <-fake.Received: - default: - require.FailNow(t, "Entry was not flushed on shutdown") - } - }) -} - -func BenchmarkRecombine(b *testing.B) { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsFirstEntry = "body startsWith 'log-0'" - cfg.OutputIDs = []string{"fake"} - cfg.SourceIdentifier = entry.NewAttributeField("file.path") - op, err := cfg.Build(testutil.Logger(b)) - require.NoError(b, err) - recombine := op.(*Transformer) - - fake := testutil.NewFakeOutput(b) - require.NoError(b, recombine.SetOutputs([]operator.Operator{fake})) - - go func() { - for { - <-fake.Received - } - }() - - sourcesNum := 10 - logsNum := 10 - entries := []*entry.Entry{} - for i := 0; i < logsNum; i++ { - for j := 0; j < sourcesNum; j++ { - start := entry.New() - start.Timestamp = time.Now() - start.Body = strings.Repeat(fmt.Sprintf("log-%d", i), 50) - start.Attributes = map[string]any{"file.path": fmt.Sprintf("file-%d", j)} - entries = append(entries, start) - } - } - - ctx := context.Background() - b.ResetTimer() - b.ReportAllocs() - for i := 0; i < b.N; i++ { - for _, e := range entries { - require.NoError(b, recombine.Process(ctx, e)) - } - recombine.flushUncombined(ctx) - } -} - -func BenchmarkRecombineLimitTrigger(b *testing.B) { - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsFirstEntry = "body == 'start'" - cfg.MaxLogSize = 6 - cfg.OutputIDs = []string{"fake"} - op, err := cfg.Build(testutil.Logger(b)) - require.NoError(b, err) - recombine := op.(*Transformer) - - fake := testutil.NewFakeOutput(b) - require.NoError(b, recombine.SetOutputs([]operator.Operator{fake})) - require.NoError(b, recombine.Start(nil)) - - go func() { - for { - <-fake.Received - } - }() - - start := entry.New() - start.Timestamp = time.Now() - start.Body = "start" - - next := entry.New() - next.Timestamp = time.Now() - next.Body = "next" - - ctx := context.Background() - b.ResetTimer() - for i := 0; i < b.N; i++ { - require.NoError(b, recombine.Process(ctx, start)) - require.NoError(b, recombine.Process(ctx, next)) - require.NoError(b, recombine.Process(ctx, start)) - require.NoError(b, recombine.Process(ctx, next)) - recombine.flushUncombined(ctx) - } - -} - -func TestTimeout(t *testing.T) { - t.Parallel() - - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsFirstEntry = MatchAll - cfg.OutputIDs = []string{"fake"} - cfg.ForceFlushTimeout = 100 * time.Millisecond - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - recombine := op.(*Transformer) - - fake := testutil.NewFakeOutput(t) - require.NoError(t, recombine.SetOutputs([]operator.Operator{fake})) - - e := entry.New() - e.Timestamp = time.Now() - e.Body = "body" - - ctx := context.Background() - - require.NoError(t, recombine.Start(nil)) - require.NoError(t, recombine.Process(ctx, e)) - select { - case <-fake.Received: - t.Logf("We shouldn't receive an entry before timeout") - t.FailNow() - case <-time.After(50 * time.Millisecond): - } - - select { - case <-fake.Received: - case <-time.After(5 * time.Second): - t.Logf("The entry should be flushed by now") - t.FailNow() - } - - require.NoError(t, recombine.Stop()) -} - -// This test is to make sure the timeout would take effect when there -// are constantly logs that meet the aggregation criteria -func TestTimeoutWhenAggregationKeepHappen(t *testing.T) { - t.Parallel() - - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsFirstEntry = "body == 'start'" - cfg.CombineWith = "" - cfg.OutputIDs = []string{"fake"} - cfg.ForceFlushTimeout = 100 * time.Millisecond - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - recombine := op.(*Transformer) - - fake := testutil.NewFakeOutput(t) - require.NoError(t, recombine.SetOutputs([]operator.Operator{fake})) - - e := entry.New() - e.Timestamp = time.Now() - e.Body = "start" - - ctx := context.Background() - - require.NoError(t, recombine.Start(nil)) - require.NoError(t, recombine.Process(ctx, e)) - - go func() { - next := entry.New() - next.Timestamp = time.Now() - next.Body = "next" - for { - time.Sleep(cfg.ForceFlushTimeout / 2) - require.NoError(t, recombine.Process(ctx, next)) - } - }() - - select { - case <-fake.Received: - case <-time.After(5 * time.Second): - t.Logf("The entry should be flushed by now") - t.FailNow() - } - require.NoError(t, recombine.Stop()) -} - -func TestSourceBatchDelete(t *testing.T) { - t.Parallel() - - cfg := NewConfig() - cfg.CombineField = entry.NewBodyField() - cfg.IsFirstEntry = "body == 'start'" - cfg.OutputIDs = []string{"fake"} - cfg.ForceFlushTimeout = 100 * time.Millisecond - cfg.MaxLogSize = 6 - op, err := cfg.Build(testutil.Logger(t)) - require.NoError(t, err) - recombine := op.(*Transformer) - - fake := testutil.NewFakeOutput(t) - require.NoError(t, recombine.SetOutputs([]operator.Operator{fake})) - - start := entry.New() - start.Timestamp = time.Now() - start.Body = "start" - start.AddAttribute("file.path", "file1") - - next := entry.New() - next.Timestamp = time.Now() - next.Body = "next" - start.AddAttribute("file.path", "file1") - - ctx := context.Background() - - require.NoError(t, recombine.Process(ctx, start)) - require.NoError(t, recombine.Process(ctx, next)) - require.Equal(t, 1, len(recombine.batchMap)) - require.NoError(t, recombine.flushSource("file1", true)) - require.Equal(t, 0, len(recombine.batchMap)) - require.NoError(t, recombine.Stop()) -} diff --git a/pkg/stanza/operator/transformer/recombine/transformer.go b/pkg/stanza/operator/transformer/recombine/transformer.go new file mode 100644 index 000000000000..2cc0e8f880c7 --- /dev/null +++ b/pkg/stanza/operator/transformer/recombine/transformer.go @@ -0,0 +1,236 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package recombine // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/recombine" + +import ( + "bytes" + "context" + "sync" + "time" + + "github.com/expr-lang/expr" + "github.com/expr-lang/expr/vm" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const DefaultSourceIdentifier = "DefaultSourceIdentifier" + +// Transformer is an operator that combines a field from consecutive log entries into a single +type Transformer struct { + helper.TransformerOperator + matchFirstLine bool + prog *vm.Program + maxBatchSize int + maxSources int + overwriteWithNewest bool + combineField entry.Field + combineWith string + ticker *time.Ticker + forceFlushTimeout time.Duration + chClose chan struct{} + sourceIdentifier entry.Field + + sync.Mutex + batchPool sync.Pool + batchMap map[string]*sourceBatch + maxLogSize int64 +} + +// sourceBatch contains the status info of a batch +type sourceBatch struct { + baseEntry *entry.Entry + numEntries int + recombined *bytes.Buffer + firstEntryObservedTime time.Time +} + +func (t *Transformer) Start(_ operator.Persister) error { + go t.flushLoop() + return nil +} + +func (t *Transformer) flushLoop() { + for { + select { + case <-t.ticker.C: + t.Lock() + timeNow := time.Now() + for source, batch := range t.batchMap { + timeSinceFirstEntry := timeNow.Sub(batch.firstEntryObservedTime) + if timeSinceFirstEntry < t.forceFlushTimeout { + continue + } + if err := t.flushSource(context.Background(), source); err != nil { + t.Errorf("there was error flushing combined logs %s", err) + } + } + // check every 1/5 forceFlushTimeout + t.ticker.Reset(t.forceFlushTimeout / 5) + t.Unlock() + case <-t.chClose: + t.ticker.Stop() + return + } + } +} + +func (t *Transformer) Stop() error { + t.Lock() + defer t.Unlock() + + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + t.flushAllSources(ctx) + + close(t.chClose) + return nil +} + +func (t *Transformer) Process(ctx context.Context, e *entry.Entry) error { + // Lock the recombine operator because process can't run concurrently + t.Lock() + defer t.Unlock() + + // Get the environment for executing the expression. + // In the future, we may want to provide access to the currently + // batched entries so users can do comparisons to other entries + // rather than just use absolute rules. + env := helper.GetExprEnv(e) + defer helper.PutExprEnv(env) + + m, err := expr.Run(t.prog, env) + if err != nil { + return t.HandleEntryError(ctx, e, err) + } + + // this is guaranteed to be a boolean because of expr.AsBool + matches := m.(bool) + var s string + err = e.Read(t.sourceIdentifier, &s) + if err != nil { + t.Warn("entry does not contain the source_identifier, so it may be pooled with other sources") + s = DefaultSourceIdentifier + } + + if s == "" { + s = DefaultSourceIdentifier + } + + switch { + // This is the first entry in the next batch + case matches && t.matchFirstLine: + // Flush the existing batch + if err := t.flushSource(ctx, s); err != nil { + return err + } + + // Add the current log to the new batch + t.addToBatch(ctx, e, s) + return nil + // This is the last entry in a complete batch + case matches && !t.matchFirstLine: + t.addToBatch(ctx, e, s) + return t.flushSource(ctx, s) + } + + // This is neither the first entry of a new log, + // nor the last entry of a log, so just add it to the batch + t.addToBatch(ctx, e, s) + return nil +} + +// addToBatch adds the current entry to the current batch of entries that will be combined +func (t *Transformer) addToBatch(ctx context.Context, e *entry.Entry, source string) { + batch, ok := t.batchMap[source] + if !ok { + if len(t.batchMap) >= t.maxSources { + t.Error("Too many sources. Flushing all batched logs. Consider increasing max_sources parameter") + t.flushAllSources(ctx) + } + batch = t.addNewBatch(source, e) + } else { + batch.numEntries++ + if t.overwriteWithNewest { + batch.baseEntry = e + } + } + + // Combine the combineField of each entry in the batch, + // separated by newlines + var s string + err := e.Read(t.combineField, &s) + if err != nil { + t.Errorf("entry does not contain the combine_field") + return + } + if batch.recombined.Len() > 0 { + batch.recombined.WriteString(t.combineWith) + } + batch.recombined.WriteString(s) + + if (t.maxLogSize > 0 && int64(batch.recombined.Len()) > t.maxLogSize) || batch.numEntries >= t.maxBatchSize { + if err := t.flushSource(ctx, source); err != nil { + t.Errorf("there was error flushing combined logs %s", err) + } + } +} + +// flushAllSources flushes all sources. +func (t *Transformer) flushAllSources(ctx context.Context) { + var errs []error + for source := range t.batchMap { + if err := t.flushSource(ctx, source); err != nil { + errs = append(errs, err) + } + } + if len(errs) > 0 { + t.Errorf("there was error flushing combined logs %s", errs) + } +} + +// flushSource combines the entries currently in the batch into a single entry, +// then forwards them to the next operator in the pipeline +func (t *Transformer) flushSource(ctx context.Context, source string) error { + batch := t.batchMap[source] + // Skip flushing a combined log if the batch is empty + if batch == nil { + return nil + } + + if batch.baseEntry == nil { + t.removeBatch(source) + return nil + } + + // Set the recombined field on the entry + err := batch.baseEntry.Set(t.combineField, batch.recombined.String()) + if err != nil { + return err + } + + t.Write(ctx, batch.baseEntry) + t.removeBatch(source) + return nil +} + +// addNewBatch creates a new batch for the given source and adds the entry to it. +func (t *Transformer) addNewBatch(source string, e *entry.Entry) *sourceBatch { + batch := t.batchPool.Get().(*sourceBatch) + batch.baseEntry = e + batch.numEntries = 1 + batch.recombined.Reset() + batch.firstEntryObservedTime = e.ObservedTimestamp + t.batchMap[source] = batch + return batch +} + +// removeBatch removes the batch for the given source. +func (t *Transformer) removeBatch(source string) { + batch := t.batchMap[source] + delete(t.batchMap, source) + t.batchPool.Put(batch) +} diff --git a/pkg/stanza/operator/transformer/recombine/transformer_test.go b/pkg/stanza/operator/transformer/recombine/transformer_test.go new file mode 100644 index 000000000000..5928f9298f88 --- /dev/null +++ b/pkg/stanza/operator/transformer/recombine/transformer_test.go @@ -0,0 +1,781 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package recombine + +import ( + "context" + "fmt" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +const ( + MatchAll string = "true" +) + +func TestTransformer(t *testing.T) { + now := time.Now() + t1 := time.Date(2020, time.April, 11, 21, 34, 01, 0, time.UTC) + t2 := time.Date(2020, time.April, 11, 21, 34, 02, 0, time.UTC) + + entryWithBody := func(ts time.Time, body any) *entry.Entry { + e := entry.New() + e.ObservedTimestamp = now + e.Timestamp = ts + e.Body = body + return e + } + + entryWithBodyAttr := func(ts time.Time, body any, Attr map[string]string) *entry.Entry { + e := entryWithBody(ts, body) + for k, v := range Attr { + e.AddAttribute(k, v) + } + return e + } + + cases := []struct { + name string + config *Config + input []*entry.Entry + expectedOutput []*entry.Entry + }{ + { + "NoEntriesFirst", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = MatchAll + cfg.OutputIDs = []string{"fake"} + return cfg + }(), + nil, + nil, + }, + { + "NoEntriesLast", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsLastEntry = MatchAll + cfg.OutputIDs = []string{"fake"} + return cfg + }(), + nil, + nil, + }, + { + "OneEntryFirst", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = MatchAll + cfg.OutputIDs = []string{"fake"} + return cfg + }(), + []*entry.Entry{entry.New()}, + nil, + }, + { + "OneEntryLast", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsLastEntry = MatchAll + cfg.OutputIDs = []string{"fake"} + return cfg + }(), + []*entry.Entry{entryWithBody(t1, "test")}, + []*entry.Entry{entryWithBody(t1, "test")}, + }, + { + "TwoEntriesLast", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsLastEntry = "body == 'test2'" + cfg.OutputIDs = []string{"fake"} + return cfg + }(), + []*entry.Entry{ + entryWithBody(t1, "test1"), + entryWithBody(t2, "test2"), + }, + []*entry.Entry{entryWithBody(t1, "test1\ntest2")}, + }, + { + "ThreeEntriesFirstNewest", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = "body == 'test1'" + cfg.OutputIDs = []string{"fake"} + cfg.OverwriteWith = "newest" + return cfg + }(), + []*entry.Entry{ + entryWithBodyAttr(t1, "test1", map[string]string{"base": "false"}), + entryWithBodyAttr(t2, "test2", map[string]string{"base": "true"}), + entryWithBodyAttr(t2, "test1", map[string]string{"base": "false"}), + }, + []*entry.Entry{ + entryWithBodyAttr(t2, "test1\ntest2", map[string]string{"base": "true"}), + }, + }, + { + "ThreeEntriesFirstOldest", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = "body == 'test1'" + cfg.OutputIDs = []string{"fake"} + cfg.OverwriteWith = "oldest" + return cfg + }(), + []*entry.Entry{ + entryWithBodyAttr(t1, "test1", map[string]string{"base": "true"}), + entryWithBodyAttr(t2, "test2", map[string]string{"base": "false"}), + entryWithBodyAttr(t2, "test1", map[string]string{"base": "true"}), + }, + []*entry.Entry{ + entryWithBodyAttr(t1, "test1\ntest2", map[string]string{"base": "true"}), + }, + }, + { + "EntriesNonMatchingForFirstEntry", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = "$body == 'test1'" + cfg.OutputIDs = []string{"fake"} + cfg.OverwriteWith = "oldest" + cfg.ForceFlushTimeout = 10 * time.Millisecond + return cfg + }(), + []*entry.Entry{ + entryWithBody(t1, "test2"), + entryWithBody(t2, "test3"), + entryWithBody(t2, "test4"), + }, + []*entry.Entry{ + entryWithBody(t1, "test2\ntest3\ntest4"), + }, + }, + { + "EntriesMatchingForFirstEntryOneFileOnly", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = "body == 'start'" + cfg.OutputIDs = []string{"fake"} + cfg.OverwriteWith = "newest" + cfg.ForceFlushTimeout = 10 * time.Millisecond + return cfg + }(), + []*entry.Entry{ + entryWithBodyAttr(t1, "start", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "more1a", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "start", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t2, "more1b", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t2, "start", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t2, "more2a", map[string]string{"file.path": "file2"}), + entryWithBodyAttr(t2, "more2b", map[string]string{"file.path": "file2"}), + }, + []*entry.Entry{ + entryWithBodyAttr(t1, "start\nmore1a", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t2, "start\nmore1b", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t2, "start", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t2, "more2a\nmore2b", map[string]string{"file.path": "file2"}), + }, + }, + { + "CombineWithEmptyString", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.CombineWith = "" + cfg.IsLastEntry = "body == 'test2'" + cfg.OutputIDs = []string{"fake"} + return cfg + }(), + []*entry.Entry{ + entryWithBody(t1, "test1"), + entryWithBody(t1, "test2"), + }, + []*entry.Entry{entryWithBody(t1, "test1test2")}, + }, + { + "Stacktrace", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = `body matches "^[^\\s]"` + cfg.OutputIDs = []string{"fake"} + cfg.ForceFlushTimeout = 10 * time.Millisecond + return cfg + }(), + []*entry.Entry{ + entryWithBody(t1, "Log message 1"), + entryWithBody(t1, "Error: java.lang.Exception: Stack trace"), + entryWithBody(t1, " at java.lang.Thread.dumpStack(Thread.java:1336)"), + entryWithBody(t1, " at Main.demo3(Main.java:15)"), + entryWithBody(t1, " at Main.demo2(Main.java:12)"), + entryWithBody(t1, " at Main.demo1(Main.java:9)"), + entryWithBody(t1, " at Main.demo(Main.java:6)"), + entryWithBody(t1, " at Main.main(Main.java:3)"), + entryWithBody(t1, "Another log message"), + }, + []*entry.Entry{ + entryWithBody(t1, "Log message 1"), + entryWithBody(t1, "Error: java.lang.Exception: Stack trace\n"+ + " at java.lang.Thread.dumpStack(Thread.java:1336)\n"+ + " at Main.demo3(Main.java:15)\n"+ + " at Main.demo2(Main.java:12)\n"+ + " at Main.demo1(Main.java:9)\n"+ + " at Main.demo(Main.java:6)\n"+ + " at Main.main(Main.java:3)"), + entryWithBody(t1, "Another log message"), + }, + }, + { + "StacktraceSubfield", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField("message") + cfg.IsFirstEntry = `body.message matches "^[^\\s]"` + cfg.OutputIDs = []string{"fake"} + cfg.ForceFlushTimeout = 10 * time.Millisecond + return cfg + }(), + []*entry.Entry{ + entryWithBody(t1, map[string]any{"message": "Log message 1"}), + entryWithBody(t1, map[string]any{"message": "Error: java.lang.Exception: Stack trace"}), + entryWithBody(t1, map[string]any{"message": " at java.lang.Thread.dumpStack(Thread.java:1336)"}), + entryWithBody(t1, map[string]any{"message": " at Main.demo3(Main.java:15)"}), + entryWithBody(t1, map[string]any{"message": " at Main.demo2(Main.java:12)"}), + entryWithBody(t1, map[string]any{"message": " at Main.demo1(Main.java:9)"}), + entryWithBody(t1, map[string]any{"message": " at Main.demo(Main.java:6)"}), + entryWithBody(t1, map[string]any{"message": " at Main.main(Main.java:3)"}), + entryWithBody(t1, map[string]any{"message": "Another log message"}), + }, + []*entry.Entry{ + entryWithBody(t1, map[string]any{"message": "Log message 1"}), + entryWithBody(t1, map[string]any{"message": "Error: java.lang.Exception: Stack trace\n" + + " at java.lang.Thread.dumpStack(Thread.java:1336)\n" + + " at Main.demo3(Main.java:15)\n" + + " at Main.demo2(Main.java:12)\n" + + " at Main.demo1(Main.java:9)\n" + + " at Main.demo(Main.java:6)\n" + + " at Main.main(Main.java:3)"}), + entryWithBody(t1, map[string]any{"message": "Another log message"}), + }, + }, + { + "CombineOtherThanCondition", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField("message") + cfg.CombineWith = "" + cfg.IsLastEntry = "body.logtag == 'F'" + cfg.OverwriteWith = "newest" + cfg.OutputIDs = []string{"fake"} + return cfg + }(), + []*entry.Entry{ + entryWithBody(t1, map[string]any{ + "message": "Single entry log 1", + "logtag": "F", + "stream": "stdout", + "timestamp": "2016-10-06T00:17:09.669794202Z", + }), + entryWithBody(t1, map[string]any{ + "message": "This is a very very long line th", + "logtag": "P", + "stream": "stdout", + "timestamp": "2016-10-06T00:17:10.113242941Z", + }), + entryWithBody(t1, map[string]any{ + "message": "at is really really long and spa", + "logtag": "P", + "stream": "stdout", + "timestamp": "2016-10-06T00:17:10.113242941Z", + }), + entryWithBody(t1, map[string]any{ + "message": "ns across multiple log entries", + "logtag": "F", + "stream": "stdout", + "timestamp": "2016-10-06T00:17:10.113242941Z", + }), + }, + []*entry.Entry{ + entryWithBody(t1, map[string]any{ + "message": "Single entry log 1", + "logtag": "F", + "stream": "stdout", + "timestamp": "2016-10-06T00:17:09.669794202Z", + }), + entryWithBody(t1, map[string]any{ + "message": "This is a very very long line that is really really long and spans across multiple log entries", + "logtag": "F", + "stream": "stdout", + "timestamp": "2016-10-06T00:17:10.113242941Z", + }), + }, + }, + { + "TestDefaultSourceIdentifier", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsLastEntry = "body == 'end'" + cfg.OutputIDs = []string{"fake"} + return cfg + }(), + []*entry.Entry{ + entryWithBodyAttr(t1, "file1", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "file2", map[string]string{"file.path": "file2"}), + entryWithBodyAttr(t2, "end", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t2, "end", map[string]string{"file.path": "file2"}), + }, + []*entry.Entry{ + entryWithBodyAttr(t1, "file1\nend", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "file2\nend", map[string]string{"file.path": "file2"}), + }, + }, + { + "TestCustomSourceIdentifier", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsLastEntry = "body == 'end'" + cfg.OutputIDs = []string{"fake"} + cfg.SourceIdentifier = entry.NewAttributeField("custom_source") + return cfg + }(), + []*entry.Entry{ + entryWithBodyAttr(t1, "file1", map[string]string{"custom_source": "file1"}), + entryWithBodyAttr(t1, "file2", map[string]string{"custom_source": "file2"}), + entryWithBodyAttr(t2, "end", map[string]string{"custom_source": "file1"}), + entryWithBodyAttr(t2, "end", map[string]string{"custom_source": "file2"}), + }, + []*entry.Entry{ + entryWithBodyAttr(t1, "file1\nend", map[string]string{"custom_source": "file1"}), + entryWithBodyAttr(t1, "file2\nend", map[string]string{"custom_source": "file2"}), + }, + }, + { + "TestMaxSources", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsLastEntry = "body == 'end'" + cfg.OutputIDs = []string{"fake"} + cfg.MaxSources = 1 + cfg.OverwriteWith = "newest" + cfg.ForceFlushTimeout = 10 * time.Millisecond + return cfg + }(), + []*entry.Entry{ + 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{ + // 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"}), + }, + }, + { + "TestMaxBatchSize", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsLastEntry = "body == 'end'" + cfg.OutputIDs = []string{"fake"} + cfg.MaxBatchSize = 2 + return cfg + }(), + []*entry.Entry{ + entryWithBodyAttr(t1, "file1_event1", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "file2_event1", map[string]string{"file.path": "file2"}), + entryWithBodyAttr(t2, "end", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t2, "file2_event2", map[string]string{"file.path": "file2"}), + entryWithBodyAttr(t2, "end", map[string]string{"file.path": "file2"}), + }, + []*entry.Entry{ + entryWithBodyAttr(t1, "file1_event1\nend", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "file2_event1\nfile2_event2", map[string]string{"file.path": "file2"}), + entryWithBodyAttr(t2, "end", map[string]string{"file.path": "file2"}), + }, + }, + { + "TestMaxLogSizeForLastEntry", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsLastEntry = "body == 'end'" + cfg.OutputIDs = []string{"fake"} + cfg.MaxLogSize = helper.ByteSize(5) + return cfg + }(), + []*entry.Entry{ + entryWithBodyAttr(t1, "file1", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "file1", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "file2", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "end", map[string]string{"file.path": "file1"}), + }, + []*entry.Entry{ + entryWithBodyAttr(t1, "file1\nfile1", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "file2\nend", map[string]string{"file.path": "file1"}), + }, + }, + { + "TestMaxLogSizeForFirstEntry", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = "body == 'start'" + cfg.OutputIDs = []string{"fake"} + cfg.MaxLogSize = helper.ByteSize(12) + return cfg + }(), + []*entry.Entry{ + entryWithBodyAttr(t1, "start", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content1", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content2", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content3", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content4", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content5", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "start", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "start", map[string]string{"file.path": "file1"}), + }, + []*entry.Entry{ + entryWithBodyAttr(t1, "start\ncontent1", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content2\ncontent3", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content4\ncontent5", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "start", map[string]string{"file.path": "file1"}), + }, + }, + { + "TestBatchSplitWhenTriggerTheBatchSizeLimit", + func() *Config { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = "body == 'start'" + cfg.OutputIDs = []string{"fake"} + cfg.MaxBatchSize = 5 + return cfg + }(), + []*entry.Entry{ + entryWithBodyAttr(t1, "start", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content1", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content2", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content3", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content4", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content5", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content6", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content7", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content8", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content9", map[string]string{"file.path": "file1"}), + }, + []*entry.Entry{ + entryWithBodyAttr(t1, "start\ncontent1\ncontent2\ncontent3\ncontent4", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "content5\ncontent6\ncontent7\ncontent8\ncontent9", map[string]string{"file.path": "file1"}), + }, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + ctx := context.Background() + op, err := tc.config.Build(testutil.Logger(t)) + require.NoError(t, err) + require.NoError(t, op.Start(testutil.NewUnscopedMockPersister())) + defer func() { require.NoError(t, op.Stop()) }() + r := op.(*Transformer) + + fake := testutil.NewFakeOutput(t) + err = r.SetOutputs([]operator.Operator{fake}) + require.NoError(t, err) + + for _, e := range tc.input { + require.NoError(t, r.Process(ctx, e)) + } + + fake.ExpectEntries(t, tc.expectedOutput) + + select { + case e := <-fake.Received: + require.FailNow(t, "Received unexpected entry: ", e) + default: + } + }) + } + + t.Run("FlushesOnShutdown", func(t *testing.T) { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = MatchAll + cfg.OutputIDs = []string{"fake"} + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + recombine := op.(*Transformer) + + fake := testutil.NewFakeOutput(t) + err = recombine.SetOutputs([]operator.Operator{fake}) + require.NoError(t, err) + + // Send an entry that isn't the last in a multiline + require.NoError(t, recombine.Process(context.Background(), entry.New())) + + // Ensure that the entry isn't immediately sent + select { + case <-fake.Received: + require.FailNow(t, "Received unexpected entry") + case <-time.After(10 * time.Millisecond): + } + + // Stop the operator + require.NoError(t, recombine.Stop()) + + // Ensure that the entries in the buffer are flushed + select { + case <-fake.Received: + default: + require.FailNow(t, "Entry was not flushed on shutdown") + } + }) +} + +func BenchmarkRecombine(b *testing.B) { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = "body startsWith 'log-0'" + cfg.OutputIDs = []string{"fake"} + cfg.SourceIdentifier = entry.NewAttributeField("file.path") + op, err := cfg.Build(testutil.Logger(b)) + require.NoError(b, err) + recombine := op.(*Transformer) + + fake := testutil.NewFakeOutput(b) + require.NoError(b, recombine.SetOutputs([]operator.Operator{fake})) + + go func() { + for { + <-fake.Received + } + }() + + sourcesNum := 10 + logsNum := 10 + entries := []*entry.Entry{} + for i := 0; i < logsNum; i++ { + for j := 0; j < sourcesNum; j++ { + start := entry.New() + start.Timestamp = time.Now() + start.Body = strings.Repeat(fmt.Sprintf("log-%d", i), 50) + start.Attributes = map[string]any{"file.path": fmt.Sprintf("file-%d", j)} + entries = append(entries, start) + } + } + + ctx := context.Background() + b.ResetTimer() + b.ReportAllocs() + for i := 0; i < b.N; i++ { + for _, e := range entries { + require.NoError(b, recombine.Process(ctx, e)) + } + recombine.flushAllSources(ctx) + } +} + +func BenchmarkRecombineLimitTrigger(b *testing.B) { + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = "body == 'start'" + cfg.MaxLogSize = 6 + cfg.OutputIDs = []string{"fake"} + op, err := cfg.Build(testutil.Logger(b)) + require.NoError(b, err) + recombine := op.(*Transformer) + + fake := testutil.NewFakeOutput(b) + require.NoError(b, recombine.SetOutputs([]operator.Operator{fake})) + require.NoError(b, recombine.Start(nil)) + + go func() { + for { + <-fake.Received + } + }() + + start := entry.New() + start.Timestamp = time.Now() + start.Body = "start" + + next := entry.New() + next.Timestamp = time.Now() + next.Body = "next" + + ctx := context.Background() + b.ResetTimer() + for i := 0; i < b.N; i++ { + require.NoError(b, recombine.Process(ctx, start)) + require.NoError(b, recombine.Process(ctx, next)) + require.NoError(b, recombine.Process(ctx, start)) + require.NoError(b, recombine.Process(ctx, next)) + recombine.flushAllSources(ctx) + } + +} + +func TestTimeout(t *testing.T) { + t.Parallel() + + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = MatchAll + cfg.OutputIDs = []string{"fake"} + cfg.ForceFlushTimeout = 100 * time.Millisecond + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + recombine := op.(*Transformer) + + fake := testutil.NewFakeOutput(t) + require.NoError(t, recombine.SetOutputs([]operator.Operator{fake})) + + e := entry.New() + e.Timestamp = time.Now() + e.Body = "body" + + ctx := context.Background() + + require.NoError(t, recombine.Start(nil)) + require.NoError(t, recombine.Process(ctx, e)) + select { + case <-fake.Received: + t.Logf("We shouldn't receive an entry before timeout") + t.FailNow() + case <-time.After(50 * time.Millisecond): + } + + select { + case <-fake.Received: + case <-time.After(5 * time.Second): + t.Logf("The entry should be flushed by now") + t.FailNow() + } + + require.NoError(t, recombine.Stop()) +} + +// This test is to make sure the timeout would take effect when there +// are constantly logs that meet the aggregation criteria +func TestTimeoutWhenAggregationKeepHappen(t *testing.T) { + t.Parallel() + + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = "body == 'start'" + cfg.CombineWith = "" + cfg.OutputIDs = []string{"fake"} + cfg.ForceFlushTimeout = 100 * time.Millisecond + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + recombine := op.(*Transformer) + + fake := testutil.NewFakeOutput(t) + require.NoError(t, recombine.SetOutputs([]operator.Operator{fake})) + + e := entry.New() + e.Timestamp = time.Now() + e.Body = "start" + + ctx := context.Background() + + require.NoError(t, recombine.Start(nil)) + require.NoError(t, recombine.Process(ctx, e)) + + done := make(chan struct{}) + ticker := time.NewTicker(cfg.ForceFlushTimeout / 2) + go func() { + next := entry.New() + next.Timestamp = time.Now() + next.Body = "next" + for { + select { + case <-done: + ticker.Stop() + return + case <-ticker.C: + require.NoError(t, recombine.Process(ctx, next)) + + } + } + }() + + select { + case <-fake.Received: + case <-time.After(5 * time.Second): + t.Logf("The entry should be flushed by now") + t.FailNow() + } + require.NoError(t, recombine.Stop()) + close(done) +} + +func TestSourceBatchDelete(t *testing.T) { + t.Parallel() + + cfg := NewConfig() + cfg.CombineField = entry.NewBodyField() + cfg.IsFirstEntry = "body == 'start'" + cfg.OutputIDs = []string{"fake"} + cfg.ForceFlushTimeout = 100 * time.Millisecond + cfg.MaxLogSize = 6 + op, err := cfg.Build(testutil.Logger(t)) + require.NoError(t, err) + recombine := op.(*Transformer) + + fake := testutil.NewFakeOutput(t) + require.NoError(t, recombine.SetOutputs([]operator.Operator{fake})) + + start := entry.New() + start.Timestamp = time.Now() + start.Body = "start" + start.AddAttribute("file.path", "file1") + + next := entry.New() + next.Timestamp = time.Now() + next.Body = "next" + next.AddAttribute("file.path", "file1") + + expect := entry.New() + expect.ObservedTimestamp = start.ObservedTimestamp + expect.Timestamp = start.Timestamp + expect.AddAttribute("file.path", "file1") + expect.Body = "start\nnext" + + ctx := context.Background() + + require.NoError(t, recombine.Process(ctx, start)) + require.Equal(t, 1, len(recombine.batchMap)) + require.NoError(t, recombine.Process(ctx, next)) + require.Equal(t, 0, len(recombine.batchMap)) + fake.ExpectEntry(t, expect) + require.NoError(t, recombine.Stop()) +} diff --git a/pkg/stanza/operator/transformer/remove/config.go b/pkg/stanza/operator/transformer/remove/config.go new file mode 100644 index 000000000000..f5aec6421e83 --- /dev/null +++ b/pkg/stanza/operator/transformer/remove/config.go @@ -0,0 +1,56 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package remove // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/remove" + +import ( + "fmt" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "remove" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new remove operator config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new remove operator config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a remove operator +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` + + Field rootableField `mapstructure:"field"` +} + +// Build will build a Remove operator from the supplied configuration +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformerOperator, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, err + } + + if c.Field.Field == entry.NewNilField() { + return nil, fmt.Errorf("remove: field is empty") + } + + return &Transformer{ + TransformerOperator: transformerOperator, + Field: c.Field, + }, nil +} diff --git a/pkg/stanza/operator/transformer/remove/package_test.go b/pkg/stanza/operator/transformer/remove/package_test.go new file mode 100644 index 000000000000..c54d7fc5f417 --- /dev/null +++ b/pkg/stanza/operator/transformer/remove/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package remove + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/transformer/remove/remove.go b/pkg/stanza/operator/transformer/remove/remove.go deleted file mode 100644 index 7559c7c81260..000000000000 --- a/pkg/stanza/operator/transformer/remove/remove.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package remove // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/remove" - -import ( - "context" - "fmt" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "remove" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new remove operator config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new remove operator config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), - } -} - -// Config is the configuration of a remove operator -type Config struct { - helper.TransformerConfig `mapstructure:",squash"` - - Field rootableField `mapstructure:"field"` -} - -// Build will build a Remove operator from the supplied configuration -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - transformerOperator, err := c.TransformerConfig.Build(logger) - if err != nil { - return nil, err - } - - if c.Field.Field == entry.NewNilField() { - return nil, fmt.Errorf("remove: field is empty") - } - - return &Transformer{ - TransformerOperator: transformerOperator, - Field: c.Field, - }, nil -} - -// Transformer is an operator that deletes a field -type Transformer struct { - helper.TransformerOperator - Field rootableField -} - -// Process will process an entry with a remove transformation. -func (p *Transformer) Process(ctx context.Context, entry *entry.Entry) error { - return p.ProcessWith(ctx, entry, p.Transform) -} - -// Transform will apply the remove operation to an entry -func (p *Transformer) Transform(entry *entry.Entry) error { - if p.Field.allAttributes { - entry.Attributes = nil - return nil - } - - if p.Field.allResource { - entry.Resource = nil - return nil - } - - _, exist := entry.Delete(p.Field.Field) - if !exist { - return fmt.Errorf("remove: field does not exist: %s", p.Field.Field.String()) - } - return nil -} diff --git a/pkg/stanza/operator/transformer/remove/transformer.go b/pkg/stanza/operator/transformer/remove/transformer.go new file mode 100644 index 000000000000..434f494bb795 --- /dev/null +++ b/pkg/stanza/operator/transformer/remove/transformer.go @@ -0,0 +1,42 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package remove // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/remove" + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Transformer is an operator that deletes a field +type Transformer struct { + helper.TransformerOperator + Field rootableField +} + +// Process will process an entry with a remove transformation. +func (t *Transformer) Process(ctx context.Context, entry *entry.Entry) error { + return t.ProcessWith(ctx, entry, t.Transform) +} + +// Transform will apply the remove operation to an entry +func (t *Transformer) Transform(entry *entry.Entry) error { + if t.Field.allAttributes { + entry.Attributes = nil + return nil + } + + if t.Field.allResource { + entry.Resource = nil + return nil + } + + _, exist := entry.Delete(t.Field.Field) + if !exist { + return fmt.Errorf("remove: field does not exist: %s", t.Field.Field.String()) + } + return nil +} diff --git a/pkg/stanza/operator/transformer/remove/remove_test.go b/pkg/stanza/operator/transformer/remove/transformer_test.go similarity index 100% rename from pkg/stanza/operator/transformer/remove/remove_test.go rename to pkg/stanza/operator/transformer/remove/transformer_test.go diff --git a/pkg/stanza/operator/transformer/retain/config.go b/pkg/stanza/operator/transformer/retain/config.go new file mode 100644 index 000000000000..ec31c27a7152 --- /dev/null +++ b/pkg/stanza/operator/transformer/retain/config.go @@ -0,0 +1,69 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package retain // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/retain" + +import ( + "fmt" + "strings" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "retain" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new retain operator config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new retain operator config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a retain operator +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` + Fields []entry.Field `mapstructure:"fields"` +} + +// Build will build a retain operator from the supplied configuration +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformerOperator, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, err + } + if c.Fields == nil || len(c.Fields) == 0 { + return nil, fmt.Errorf("retain: 'fields' is empty") + } + + retainOp := &Transformer{ + TransformerOperator: transformerOperator, + Fields: c.Fields, + } + + for _, field := range c.Fields { + typeCheck := field.String() + if strings.HasPrefix(typeCheck, "resource") { + retainOp.AllResourceFields = true + continue + } + if strings.HasPrefix(typeCheck, "attributes") { + retainOp.AllAttributeFields = true + continue + } + retainOp.AllBodyFields = true + } + return retainOp, nil +} diff --git a/pkg/stanza/operator/transformer/retain/package_test.go b/pkg/stanza/operator/transformer/retain/package_test.go new file mode 100644 index 000000000000..fa346d95f5a6 --- /dev/null +++ b/pkg/stanza/operator/transformer/retain/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package retain + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/transformer/retain/retain.go b/pkg/stanza/operator/transformer/retain/retain.go deleted file mode 100644 index 4fb6fa86175d..000000000000 --- a/pkg/stanza/operator/transformer/retain/retain.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package retain // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/retain" - -import ( - "context" - "fmt" - "strings" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "retain" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new retain operator config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new retain operator config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), - } -} - -// Config is the configuration of a retain operator -type Config struct { - helper.TransformerConfig `mapstructure:",squash"` - Fields []entry.Field `mapstructure:"fields"` -} - -// Build will build a retain operator from the supplied configuration -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - transformerOperator, err := c.TransformerConfig.Build(logger) - if err != nil { - return nil, err - } - if c.Fields == nil || len(c.Fields) == 0 { - return nil, fmt.Errorf("retain: 'fields' is empty") - } - - retainOp := &Transformer{ - TransformerOperator: transformerOperator, - Fields: c.Fields, - } - - for _, field := range c.Fields { - typeCheck := field.String() - if strings.HasPrefix(typeCheck, "resource") { - retainOp.AllResourceFields = true - continue - } - if strings.HasPrefix(typeCheck, "attributes") { - retainOp.AllAttributeFields = true - continue - } - retainOp.AllBodyFields = true - } - return retainOp, nil -} - -// Transformer keeps the given fields and deletes the rest. -type Transformer struct { - helper.TransformerOperator - Fields []entry.Field - AllBodyFields bool - AllAttributeFields bool - AllResourceFields bool -} - -// Process will process an entry with a retain transformation. -func (p *Transformer) Process(ctx context.Context, entry *entry.Entry) error { - return p.ProcessWith(ctx, entry, p.Transform) -} - -// Transform will apply the retain operation to an entry -func (p *Transformer) Transform(e *entry.Entry) error { - newEntry := entry.New() - newEntry.ObservedTimestamp = e.ObservedTimestamp - newEntry.Timestamp = e.Timestamp - - if !p.AllResourceFields { - newEntry.Resource = e.Resource - } - if !p.AllAttributeFields { - newEntry.Attributes = e.Attributes - } - if !p.AllBodyFields { - newEntry.Body = e.Body - } - - for _, field := range p.Fields { - val, ok := e.Get(field) - if !ok { - continue - } - err := newEntry.Set(field, val) - if err != nil { - return err - } - } - - *e = *newEntry - return nil -} diff --git a/pkg/stanza/operator/transformer/retain/transformer.go b/pkg/stanza/operator/transformer/retain/transformer.go new file mode 100644 index 000000000000..14ed45da293d --- /dev/null +++ b/pkg/stanza/operator/transformer/retain/transformer.go @@ -0,0 +1,56 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package retain // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/retain" + +import ( + "context" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Transformer keeps the given fields and deletes the rest. +type Transformer struct { + helper.TransformerOperator + Fields []entry.Field + AllBodyFields bool + AllAttributeFields bool + AllResourceFields bool +} + +// Process will process an entry with a retain transformation. +func (t *Transformer) Process(ctx context.Context, entry *entry.Entry) error { + return t.ProcessWith(ctx, entry, t.Transform) +} + +// Transform will apply the retain operation to an entry +func (t *Transformer) Transform(e *entry.Entry) error { + newEntry := entry.New() + newEntry.ObservedTimestamp = e.ObservedTimestamp + newEntry.Timestamp = e.Timestamp + + if !t.AllResourceFields { + newEntry.Resource = e.Resource + } + if !t.AllAttributeFields { + newEntry.Attributes = e.Attributes + } + if !t.AllBodyFields { + newEntry.Body = e.Body + } + + for _, field := range t.Fields { + val, ok := e.Get(field) + if !ok { + continue + } + err := newEntry.Set(field, val) + if err != nil { + return err + } + } + + *e = *newEntry + return nil +} diff --git a/pkg/stanza/operator/transformer/retain/retain_test.go b/pkg/stanza/operator/transformer/retain/transformer_test.go similarity index 100% rename from pkg/stanza/operator/transformer/retain/retain_test.go rename to pkg/stanza/operator/transformer/retain/transformer_test.go diff --git a/pkg/stanza/operator/transformer/router/config.go b/pkg/stanza/operator/transformer/router/config.go new file mode 100644 index 000000000000..4bf37195d09d --- /dev/null +++ b/pkg/stanza/operator/transformer/router/config.go @@ -0,0 +1,86 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package router // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/router" + +import ( + "fmt" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "router" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig config creates a new router operator config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID config creates a new router operator config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + BasicConfig: helper.NewBasicConfig(operatorID, operatorType), + } +} + +// Config is the configuration of a router operator +type Config struct { + helper.BasicConfig `mapstructure:",squash"` + Routes []*RouteConfig `mapstructure:"routes"` + Default []string `mapstructure:"default"` +} + +// RouteConfig is the configuration of a route on a router operator +type RouteConfig struct { + helper.AttributerConfig `mapstructure:",squash"` + Expression string `mapstructure:"expr"` + OutputIDs []string `mapstructure:"output"` +} + +// Build will build a router operator from the supplied configuration +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + basicOperator, err := c.BasicConfig.Build(logger) + if err != nil { + return nil, err + } + + if c.Default != nil { + defaultRoute := &RouteConfig{ + Expression: "true", + OutputIDs: c.Default, + } + c.Routes = append(c.Routes, defaultRoute) + } + + routes := make([]*Route, 0, len(c.Routes)) + for _, routeConfig := range c.Routes { + compiled, err := helper.ExprCompileBool(routeConfig.Expression) + if err != nil { + return nil, fmt.Errorf("failed to compile expression '%s': %w", routeConfig.Expression, err) + } + + attributer, err := routeConfig.AttributerConfig.Build() + if err != nil { + return nil, fmt.Errorf("failed to build attributer for route '%s': %w", routeConfig.Expression, err) + } + + route := Route{ + Attributer: attributer, + Expression: compiled, + OutputIDs: routeConfig.OutputIDs, + } + routes = append(routes, &route) + } + + return &Transformer{ + BasicOperator: basicOperator, + routes: routes, + }, nil +} diff --git a/pkg/stanza/operator/transformer/router/package_test.go b/pkg/stanza/operator/transformer/router/package_test.go new file mode 100644 index 000000000000..5f321269fe15 --- /dev/null +++ b/pkg/stanza/operator/transformer/router/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package router + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/transformer/router/router.go b/pkg/stanza/operator/transformer/router/router.go deleted file mode 100644 index b962e8aef680..000000000000 --- a/pkg/stanza/operator/transformer/router/router.go +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package router // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/router" - -import ( - "context" - "fmt" - - "github.com/antonmedv/expr/vm" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "router" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig config creates a new router operator config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID config creates a new router operator config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - BasicConfig: helper.NewBasicConfig(operatorID, operatorType), - } -} - -// Config is the configuration of a router operator -type Config struct { - helper.BasicConfig `mapstructure:",squash"` - Routes []*RouteConfig `mapstructure:"routes"` - Default []string `mapstructure:"default"` -} - -// RouteConfig is the configuration of a route on a router operator -type RouteConfig struct { - helper.AttributerConfig `mapstructure:",squash"` - Expression string `mapstructure:"expr"` - OutputIDs []string `mapstructure:"output"` -} - -// Build will build a router operator from the supplied configuration -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - basicOperator, err := c.BasicConfig.Build(logger) - if err != nil { - return nil, err - } - - if c.Default != nil { - defaultRoute := &RouteConfig{ - Expression: "true", - OutputIDs: c.Default, - } - c.Routes = append(c.Routes, defaultRoute) - } - - routes := make([]*Route, 0, len(c.Routes)) - for _, routeConfig := range c.Routes { - compiled, err := helper.ExprCompileBool(routeConfig.Expression) - if err != nil { - return nil, fmt.Errorf("failed to compile expression '%s': %w", routeConfig.Expression, err) - } - - attributer, err := routeConfig.AttributerConfig.Build() - if err != nil { - return nil, fmt.Errorf("failed to build attributer for route '%s': %w", routeConfig.Expression, err) - } - - route := Route{ - Attributer: attributer, - Expression: compiled, - OutputIDs: routeConfig.OutputIDs, - } - routes = append(routes, &route) - } - - return &Transformer{ - BasicOperator: basicOperator, - routes: routes, - }, nil -} - -// Transformer is an operator that routes entries based on matching expressions -type Transformer struct { - helper.BasicOperator - routes []*Route -} - -// Route is a route on a router operator -type Route struct { - helper.Attributer - Expression *vm.Program - OutputIDs []string - OutputOperators []operator.Operator -} - -// CanProcess will always return true for a router operator -func (p *Transformer) CanProcess() bool { - return true -} - -// Process will route incoming entries based on matching expressions -func (p *Transformer) Process(ctx context.Context, entry *entry.Entry) error { - env := helper.GetExprEnv(entry) - defer helper.PutExprEnv(env) - - for _, route := range p.routes { - matches, err := vm.Run(route.Expression, env) - if err != nil { - p.Warnw("Running expression returned an error", zap.Error(err)) - continue - } - - // we compile the expression with "AsBool", so this should be safe - if matches.(bool) { - if err := route.Attribute(entry); err != nil { - p.Errorf("Failed to label entry: %s", err) - return err - } - - for _, output := range route.OutputOperators { - _ = output.Process(ctx, entry) - } - break - } - } - - return nil -} - -// CanOutput will always return true for a router operator -func (p *Transformer) CanOutput() bool { - return true -} - -// Outputs will return all connected operators. -func (p *Transformer) Outputs() []operator.Operator { - outputs := make([]operator.Operator, 0, len(p.routes)) - for _, route := range p.routes { - outputs = append(outputs, route.OutputOperators...) - } - return outputs -} - -// GetOutputIDs will return all connected operators. -func (p *Transformer) GetOutputIDs() []string { - outputs := make([]string, 0, len(p.routes)) - for _, route := range p.routes { - outputs = append(outputs, route.OutputIDs...) - } - return outputs -} - -// SetOutputs will set the outputs of the router operator. -func (p *Transformer) SetOutputs(operators []operator.Operator) error { - for _, route := range p.routes { - outputOperators, err := p.findOperators(operators, route.OutputIDs) - if err != nil { - return fmt.Errorf("failed to set outputs on route: %w", err) - } - route.OutputOperators = outputOperators - } - - return nil -} - -// SetOutputIDs will do nothing. -func (p *Transformer) SetOutputIDs(_ []string) {} - -// findOperators will find a subset of operators from a collection. -func (p *Transformer) findOperators(operators []operator.Operator, operatorIDs []string) ([]operator.Operator, error) { - result := make([]operator.Operator, len(operatorIDs)) - for i, operatorID := range operatorIDs { - operator, err := p.findOperator(operators, operatorID) - if err != nil { - return nil, err - } - result[i] = operator - } - return result, nil -} - -// findOperator will find an operator from a collection. -func (p *Transformer) findOperator(operators []operator.Operator, operatorID string) (operator.Operator, error) { - for _, operator := range operators { - if operator.ID() == operatorID { - return operator, nil - } - } - return nil, fmt.Errorf("operator %s does not exist", operatorID) -} diff --git a/pkg/stanza/operator/transformer/router/transformer.go b/pkg/stanza/operator/transformer/router/transformer.go new file mode 100644 index 000000000000..6ff3ccb826a9 --- /dev/null +++ b/pkg/stanza/operator/transformer/router/transformer.go @@ -0,0 +1,126 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package router // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/router" + +import ( + "context" + "fmt" + + "github.com/expr-lang/expr/vm" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Transformer is an operator that routes entries based on matching expressions +type Transformer struct { + helper.BasicOperator + routes []*Route +} + +// Route is a route on a router operator +type Route struct { + helper.Attributer + Expression *vm.Program + OutputIDs []string + OutputOperators []operator.Operator +} + +// CanProcess will always return true for a router operator +func (t *Transformer) CanProcess() bool { + return true +} + +// Process will route incoming entries based on matching expressions +func (t *Transformer) Process(ctx context.Context, entry *entry.Entry) error { + env := helper.GetExprEnv(entry) + defer helper.PutExprEnv(env) + + for _, route := range t.routes { + matches, err := vm.Run(route.Expression, env) + if err != nil { + t.Warnw("Running expression returned an error", zap.Error(err)) + continue + } + + // we compile the expression with "AsBool", so this should be safe + if matches.(bool) { + if err := route.Attribute(entry); err != nil { + t.Errorf("Failed to label entry: %s", err) + return err + } + + for _, output := range route.OutputOperators { + _ = output.Process(ctx, entry) + } + break + } + } + + return nil +} + +// CanOutput will always return true for a router operator +func (t *Transformer) CanOutput() bool { + return true +} + +// Outputs will return all connected operators. +func (t *Transformer) Outputs() []operator.Operator { + outputs := make([]operator.Operator, 0, len(t.routes)) + for _, route := range t.routes { + outputs = append(outputs, route.OutputOperators...) + } + return outputs +} + +// GetOutputIDs will return all connected operators. +func (t *Transformer) GetOutputIDs() []string { + outputs := make([]string, 0, len(t.routes)) + for _, route := range t.routes { + outputs = append(outputs, route.OutputIDs...) + } + return outputs +} + +// SetOutputs will set the outputs of the router operator. +func (t *Transformer) SetOutputs(operators []operator.Operator) error { + for _, route := range t.routes { + outputOperators, err := t.findOperators(operators, route.OutputIDs) + if err != nil { + return fmt.Errorf("failed to set outputs on route: %w", err) + } + route.OutputOperators = outputOperators + } + + return nil +} + +// SetOutputIDs will do nothing. +func (t *Transformer) SetOutputIDs(_ []string) {} + +// findOperators will find a subset of operators from a collection. +func (t *Transformer) findOperators(operators []operator.Operator, operatorIDs []string) ([]operator.Operator, error) { + result := make([]operator.Operator, len(operatorIDs)) + for i, operatorID := range operatorIDs { + operator, err := t.findOperator(operators, operatorID) + if err != nil { + return nil, err + } + result[i] = operator + } + return result, nil +} + +// findOperator will find an operator from a collection. +func (t *Transformer) findOperator(operators []operator.Operator, operatorID string) (operator.Operator, error) { + for _, operator := range operators { + if operator.ID() == operatorID { + return operator, nil + } + } + return nil, fmt.Errorf("operator %s does not exist", operatorID) +} diff --git a/pkg/stanza/operator/transformer/router/router_test.go b/pkg/stanza/operator/transformer/router/transformer_test.go similarity index 100% rename from pkg/stanza/operator/transformer/router/router_test.go rename to pkg/stanza/operator/transformer/router/transformer_test.go diff --git a/pkg/stanza/operator/transformer/unquote/config.go b/pkg/stanza/operator/transformer/unquote/config.go new file mode 100644 index 000000000000..4a7e9f81e75b --- /dev/null +++ b/pkg/stanza/operator/transformer/unquote/config.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package unquote // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/unquote" + +import ( + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "unquote" + +func init() { + operator.Register(operatorType, func() operator.Builder { return NewConfig() }) +} + +// NewConfig creates a new unquote config with default values +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfigWithID creates a new unquote config with default values +func NewConfigWithID(operatorID string) *Config { + return &Config{ + TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), + } +} + +// Config is the configuration of an unquote operator. +type Config struct { + helper.TransformerConfig `mapstructure:",squash"` + Field entry.Field `mapstructure:"field"` +} + +// Build will build an unquote operator. +func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { + transformerOperator, err := c.TransformerConfig.Build(logger) + if err != nil { + return nil, err + } + + return &Transformer{ + TransformerOperator: transformerOperator, + field: c.Field, + }, nil +} diff --git a/pkg/stanza/operator/transformer/unquote/package_test.go b/pkg/stanza/operator/transformer/unquote/package_test.go new file mode 100644 index 000000000000..702a99000adb --- /dev/null +++ b/pkg/stanza/operator/transformer/unquote/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package unquote + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/operator/transformer/unquote/transformer.go b/pkg/stanza/operator/transformer/unquote/transformer.go new file mode 100644 index 000000000000..18c236929dd6 --- /dev/null +++ b/pkg/stanza/operator/transformer/unquote/transformer.go @@ -0,0 +1,43 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package unquote // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/unquote" + +import ( + "context" + "fmt" + "strconv" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +// Transformer is an operator that unquotes a string. +type Transformer struct { + helper.TransformerOperator + field entry.Field +} + +// Process will unquote a string +func (t *Transformer) Process(ctx context.Context, entry *entry.Entry) error { + return t.ProcessWith(ctx, entry, t.unquote) +} + +// unquote will unquote a string +func (t *Transformer) unquote(e *entry.Entry) error { + value, ok := t.field.Get(e) + if !ok { + return nil + } + + switch v := value.(type) { + case string: + s, err := strconv.Unquote(v) + if err != nil { + return err + } + return t.field.Set(e, s) + default: + return fmt.Errorf("type %T cannot be unquoted", value) + } +} diff --git a/pkg/stanza/operator/transformer/unquote/unquote_test.go b/pkg/stanza/operator/transformer/unquote/transformer_test.go similarity index 100% rename from pkg/stanza/operator/transformer/unquote/unquote_test.go rename to pkg/stanza/operator/transformer/unquote/transformer_test.go diff --git a/pkg/stanza/operator/transformer/unquote/unquote.go b/pkg/stanza/operator/transformer/unquote/unquote.go deleted file mode 100644 index 4bb374e2064e..000000000000 --- a/pkg/stanza/operator/transformer/unquote/unquote.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package unquote // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/unquote" - -import ( - "context" - "fmt" - "strconv" - - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" -) - -const operatorType = "unquote" - -func init() { - operator.Register(operatorType, func() operator.Builder { return NewConfig() }) -} - -// NewConfig creates a new unquote config with default values -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfigWithID creates a new unquote config with default values -func NewConfigWithID(operatorID string) *Config { - return &Config{ - TransformerConfig: helper.NewTransformerConfig(operatorID, operatorType), - } -} - -// Config is the configuration of an unquote operator. -type Config struct { - helper.TransformerConfig `mapstructure:",squash"` - Field entry.Field `mapstructure:"field"` -} - -// Build will build an unquote operator. -func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { - transformerOperator, err := c.TransformerConfig.Build(logger) - if err != nil { - return nil, err - } - - return &Transformer{ - TransformerOperator: transformerOperator, - field: c.Field, - }, nil -} - -// Transformer is an operator that unquotes a string. -type Transformer struct { - helper.TransformerOperator - field entry.Field -} - -// Process will unquote a string -func (t *Transformer) Process(ctx context.Context, entry *entry.Entry) error { - return t.ProcessWith(ctx, entry, t.unquote) -} - -// unquote will unquote a string -func (t *Transformer) unquote(e *entry.Entry) error { - value, ok := t.field.Get(e) - if !ok { - return nil - } - - switch v := value.(type) { - case string: - s, err := strconv.Unquote(v) - if err != nil { - return err - } - return t.field.Set(e, s) - default: - return fmt.Errorf("type %T cannot be unquoted", value) - } -} diff --git a/pkg/stanza/pipeline/config.go b/pkg/stanza/pipeline/config.go index c1bd38fee07c..7165b60011d3 100644 --- a/pkg/stanza/pipeline/config.go +++ b/pkg/stanza/pipeline/config.go @@ -5,10 +5,8 @@ package pipeline // import "github.com/open-telemetry/opentelemetry-collector-co import ( "fmt" - "time" "go.uber.org/zap" - "go.uber.org/zap/zapcore" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/errors" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" @@ -33,17 +31,11 @@ func (c Config) Build(logger *zap.SugaredLogger) (*DirectedPipeline, error) { return nil, errors.NewError("empty pipeline not allowed", "") } - sampledLogger := logger.Desugar().WithOptions( - zap.WrapCore(func(core zapcore.Core) zapcore.Core { - return zapcore.NewSamplerWithOptions(core, time.Second, 1, 10000) - }), - ).Sugar() - dedeplucateIDs(c.Operators) ops := make([]operator.Operator, 0, len(c.Operators)) for _, opCfg := range c.Operators { - op, err := opCfg.Build(sampledLogger) + op, err := opCfg.Build(logger) if err != nil { return nil, err } diff --git a/pkg/stanza/pipeline/package_test.go b/pkg/stanza/pipeline/package_test.go new file mode 100644 index 000000000000..e5b6712668e2 --- /dev/null +++ b/pkg/stanza/pipeline/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package pipeline + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/split/package_test.go b/pkg/stanza/split/package_test.go new file mode 100644 index 000000000000..ac7370776ab6 --- /dev/null +++ b/pkg/stanza/split/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package split + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/split/splittest/package_test.go b/pkg/stanza/split/splittest/package_test.go new file mode 100644 index 000000000000..7ab567a76452 --- /dev/null +++ b/pkg/stanza/split/splittest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package splittest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/split/splittest/splittest.go b/pkg/stanza/split/splittest/splittest.go index 8be0fdcaeb59..56b122f18130 100644 --- a/pkg/stanza/split/splittest/splittest.go +++ b/pkg/stanza/split/splittest/splittest.go @@ -51,7 +51,7 @@ func ExpectAdvanceNil(expectAdvance int) Step { func ExpectError(expectErr string) Step { return Step{ - validate: func(t *testing.T, advance int, token []byte, err error) { + validate: func(t *testing.T, _ int, _ []byte, err error) { assert.EqualError(t, err, expectErr) }, } diff --git a/pkg/stanza/testutil/mocks.go b/pkg/stanza/testutil/mocks.go index 6d727f03b809..cce702f527cb 100644 --- a/pkg/stanza/testutil/mocks.go +++ b/pkg/stanza/testutil/mocks.go @@ -85,7 +85,7 @@ func (f *FakeOutput) ExpectBody(t testing.TB, body any) { case e := <-f.Received: require.Equal(t, body, e.Body) case <-time.After(time.Second): - require.FailNow(t, "Timed out waiting for entry") + require.FailNowf(t, "Timed out waiting for entry", "%s", body) } } @@ -96,10 +96,27 @@ func (f *FakeOutput) ExpectEntry(t testing.TB, expected *entry.Entry) { case e := <-f.Received: require.Equal(t, expected, e) case <-time.After(time.Second): - require.FailNow(t, "Timed out waiting for entry") + require.FailNowf(t, "Timed out waiting for entry", "%v", expected) } } +// ExpectEntries expects that the given entries will be received in any order +func (f *FakeOutput) ExpectEntries(t testing.TB, expected []*entry.Entry) { + entries := make([]*entry.Entry, 0, len(expected)) + for i := 0; i < len(expected); i++ { + select { + case e := <-f.Received: + entries = append(entries, e) + case <-time.After(time.Second): + require.Fail(t, "Timed out waiting for entry") + } + if t.Failed() { + break + } + } + require.ElementsMatch(t, expected, entries) +} + // ExpectNoEntry expects that no entry will be received within the specified time func (f *FakeOutput) ExpectNoEntry(t testing.TB, timeout time.Duration) { select { diff --git a/pkg/stanza/trim/package_test.go b/pkg/stanza/trim/package_test.go new file mode 100644 index 000000000000..931f98743573 --- /dev/null +++ b/pkg/stanza/trim/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package trim + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/stanza/trim/trim.go b/pkg/stanza/trim/trim.go index 1906aed08b3f..3cf5d4f5c2ce 100644 --- a/pkg/stanza/trim/trim.go +++ b/pkg/stanza/trim/trim.go @@ -16,6 +16,9 @@ func WithFunc(splitFunc bufio.SplitFunc, trimFunc Func) bufio.SplitFunc { } return func(data []byte, atEOF bool) (advance int, token []byte, err error) { advance, token, err = splitFunc(data, atEOF) + if advance == 0 && token == nil && err == nil { + return 0, nil, nil + } return advance, trimFunc(token), err } } diff --git a/pkg/translator/azure/go.mod b/pkg/translator/azure/go.mod index 90a851ab7f4a..ba0a715cafb4 100644 --- a/pkg/translator/azure/go.mod +++ b/pkg/translator/azure/go.mod @@ -1,47 +1,47 @@ //module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure -go 1.20 +go 1.21 require ( github.com/json-iterator/go v1.1.12 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.89.0 - github.com/relvacode/iso8601 v1.3.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.98.0 + github.com/relvacode/iso8601 v1.4.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc ) require ( - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect - github.com/knadh/koanf v1.5.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // 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.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/confmap v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/translator/azure/go.sum b/pkg/translator/azure/go.sum index 4c00d18e9122..76141cac6ab0 100644 --- a/pkg/translator/azure/go.sum +++ b/pkg/translator/azure/go.sum @@ -1,438 +1,123 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= -github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= -github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= -github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= -github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= -github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= -github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.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/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 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.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= 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/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.13.0/go.mod h1:ZlVrynguJKcYr54zGaDbaL3fOvKC9m72FhPvA8T35KQ= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= -github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= -github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= -github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hjson/hjson-go/v4 v4.0.0/go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEFTse3rH13E= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs= -github.com/knadh/koanf v1.5.0/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs= -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/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/relvacode/iso8601 v1.3.0 h1:HguUjsGpIMh/zsTczGN3DVJFxTU/GX+MMmzcKoMO7ko= -github.com/relvacode/iso8601 v1.3.0/go.mod h1:FlNp+jz+TXpyRqgmM7tnzHHzBnz776kmAH2h3sZCn0I= -github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/relvacode/iso8601 v1.4.0 h1:GsInVSEJfkYuirYFxa80nMLbH2aydgZpIf52gYZXUJs= +github.com/relvacode/iso8601 v1.4.0/go.mod h1:FlNp+jz+TXpyRqgmM7tnzHHzBnz776kmAH2h3sZCn0I= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= -go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -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-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-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-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/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-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-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-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 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.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/pkg/translator/azure/package_test.go b/pkg/translator/azure/package_test.go new file mode 100644 index 000000000000..c7b9e1e8dda9 --- /dev/null +++ b/pkg/translator/azure/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package azure + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/translator/azure/resourcelogs_to_logs.go b/pkg/translator/azure/resourcelogs_to_logs.go index 0b243d812a64..b2c96d28f568 100644 --- a/pkg/translator/azure/resourcelogs_to_logs.go +++ b/pkg/translator/azure/resourcelogs_to_logs.go @@ -6,6 +6,7 @@ package azure // import "github.com/open-telemetry/opentelemetry-collector-contr import ( "bytes" "encoding/json" + "errors" "strconv" jsoniter "github.com/json-iterator/go" @@ -36,6 +37,10 @@ const ( azureTenantID = "azure.tenant.id" ) +var ( + errMissingTimestamp = errors.New("missing timestamp") +) + // azureRecords represents an array of Azure log records // as exported via an Azure Event Hub type azureRecords struct { @@ -47,6 +52,7 @@ type azureRecords struct { // https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/resource-logs-schema type azureLogRecord struct { Time string `json:"time"` + Timestamp string `json:"timeStamp"` ResourceID string `json:"resourceId"` TenantID *string `json:"tenantId"` OperationName string `json:"operationName"` @@ -80,17 +86,17 @@ func (r ResourceLogsUnmarshaler) UnmarshalLogs(buf []byte) (plog.Logs, error) { return l, err } - var resourceIds []string + var resourceIDs []string azureResourceLogs := make(map[string][]azureLogRecord) for _, azureLog := range azureLogs.Records { azureResourceLogs[azureLog.ResourceID] = append(azureResourceLogs[azureLog.ResourceID], azureLog) - keyExists := slices.Contains(resourceIds, azureLog.ResourceID) + keyExists := slices.Contains(resourceIDs, azureLog.ResourceID) if !keyExists { - resourceIds = append(resourceIds, azureLog.ResourceID) + resourceIDs = append(resourceIDs, azureLog.ResourceID) } } - for _, resourceID := range resourceIds { + for _, resourceID := range resourceIDs { logs := azureResourceLogs[resourceID] resourceLogs := l.ResourceLogs().AppendEmpty() resourceLogs.Resource().Attributes().PutStr(azureResourceID, resourceID) @@ -101,7 +107,7 @@ func (r ResourceLogsUnmarshaler) UnmarshalLogs(buf []byte) (plog.Logs, error) { for i := 0; i < len(logs); i++ { log := logs[i] - nanos, err := asTimestamp(log.Time) + nanos, err := getTimestamp(log) if err != nil { r.Logger.Warn("Unable to convert timestamp from log", zap.String("timestamp", log.Time)) continue @@ -125,6 +131,16 @@ func (r ResourceLogsUnmarshaler) UnmarshalLogs(buf []byte) (plog.Logs, error) { return l, nil } +func getTimestamp(record azureLogRecord) (pcommon.Timestamp, error) { + if record.Time != "" { + return asTimestamp(record.Time) + } else if record.Timestamp != "" { + return asTimestamp(record.Timestamp) + } + + return 0, errMissingTimestamp +} + // asTimestamp will parse an ISO8601 string into an OpenTelemetry // nanosecond timestamp. If the string cannot be parsed, it will // return zero and the error. @@ -133,6 +149,7 @@ func asTimestamp(s string) (pcommon.Timestamp, error) { if err != nil { return 0, err } + return pcommon.Timestamp(t.UnixNano()), nil } diff --git a/pkg/translator/azure/resourcelogs_to_logs_test.go b/pkg/translator/azure/resourcelogs_to_logs_test.go index 34535766b5a5..37bb67df9987 100644 --- a/pkg/translator/azure/resourcelogs_to_logs_test.go +++ b/pkg/translator/azure/resourcelogs_to_logs_test.go @@ -167,6 +167,49 @@ var badLevelLogRecord = func() plog.LogRecord { return lr }() +var badTimeLogRecord = func() plog.LogRecord { + lr := plog.NewLogs().ResourceLogs().AppendEmpty().ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + + ts, _ := asTimestamp("2021-10-14T22:17:11+00:00") + lr.SetTimestamp(ts) + + lr.Attributes().PutStr(azureOperationName, "ApplicationGatewayAccess") + lr.Attributes().PutStr(azureCategory, "ApplicationGatewayAccessLog") + lr.Attributes().PutStr(conventions.AttributeCloudProvider, conventions.AttributeCloudProviderAzure) + + m := lr.Attributes().PutEmptyMap(azureProperties) + m.PutStr("instanceId", "appgw_2") + m.PutStr("clientIP", "185.42.129.24") + m.PutDouble("clientPort", 45057) + m.PutStr("httpMethod", "GET") + m.PutStr("originalRequestUriWithArgs", "/") + m.PutStr("requestUri", "/") + m.PutStr("requestQuery", "") + m.PutStr("userAgent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36") + m.PutDouble("httpStatus", 200) + m.PutStr("httpVersion", "HTTP/1.1") + m.PutDouble("receivedBytes", 184) + m.PutDouble("sentBytes", 466) + m.PutDouble("clientResponseTime", 0) + m.PutDouble("timeTaken", 0.034) + m.PutStr("WAFEvaluationTime", "0.000") + m.PutStr("WAFMode", "Detection") + m.PutStr("transactionId", "592d1649f75a8d480a3c4dc6a975309d") + m.PutStr("sslEnabled", "on") + m.PutStr("sslCipher", "ECDHE-RSA-AES256-GCM-SHA384") + m.PutStr("sslProtocol", "TLSv1.2") + m.PutStr("sslClientVerify", "NONE") + m.PutStr("sslClientCertificateFingerprint", "") + m.PutStr("sslClientCertificateIssuerName", "") + m.PutStr("serverRouted", "52.239.221.65:443") + m.PutStr("serverStatus", "200") + m.PutStr("serverResponseLatency", "0.028") + m.PutStr("upstreamSourcePort", "21564") + m.PutStr("originalHost", "20.110.30.194") + m.PutStr("host", "20.110.30.194") + return lr +}() + func TestAsTimestamp(t *testing.T) { timestamp := "2022-11-11T04:48:27.6767145Z" nanos, err := asTimestamp(timestamp) @@ -371,6 +414,15 @@ func TestUnmarshalLogs(t *testing.T) { lr = scopeLogs.LogRecords().AppendEmpty() badLevelLogRecord.CopyTo(lr) + expectedBadTime := plog.NewLogs() + resourceLogs = expectedBadTime.ResourceLogs().AppendEmpty() + resourceLogs.Resource().Attributes().PutStr(azureResourceID, "/RESOURCE_ID") + scopeLogs = resourceLogs.ScopeLogs().AppendEmpty() + scopeLogs.Scope().SetName("otelcol/azureresourcelogs") + scopeLogs.Scope().SetVersion(testBuildInfo.Version) + lr = scopeLogs.LogRecords().AppendEmpty() + badTimeLogRecord.CopyTo(lr) + tests := []struct { file string expected plog.Logs @@ -391,6 +443,10 @@ func TestUnmarshalLogs(t *testing.T) { file: "log-bad-level.json", expected: expectedBadLevel, }, + { + file: "log-bad-time.json", + expected: expectedBadTime, + }, } sut := &ResourceLogsUnmarshaler{ diff --git a/pkg/translator/azure/testdata/log-bad-time.json b/pkg/translator/azure/testdata/log-bad-time.json new file mode 100644 index 000000000000..614d170378ec --- /dev/null +++ b/pkg/translator/azure/testdata/log-bad-time.json @@ -0,0 +1,45 @@ +{ + "records": [ + { + "timeStamp": "2021-10-14T22:17:11+00:00", + "resourceId": "/RESOURCE_ID", + "listenerName": "HTTP-Listener", + "ruleName": "Storage-Static-Rule", + "backendPoolName": "StaticStorageAccount", + "backendSettingName": "StorageStatic-HTTPS-Setting", + "operationName": "ApplicationGatewayAccess", + "category": "ApplicationGatewayAccessLog", + "properties": { + "instanceId": "appgw_2", + "clientIP": "185.42.129.24", + "clientPort": 45057, + "httpMethod": "GET", + "originalRequestUriWithArgs": "\/", + "requestUri": "\/", + "requestQuery": "", + "userAgent": "Mozilla\/5.0 (Windows NT 6.1; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/52.0.2743.116 Safari\/537.36", + "httpStatus": 200, + "httpVersion": "HTTP\/1.1", + "receivedBytes": 184, + "sentBytes": 466, + "clientResponseTime": 0, + "timeTaken": 0.034, + "WAFEvaluationTime": "0.000", + "WAFMode": "Detection", + "transactionId": "592d1649f75a8d480a3c4dc6a975309d", + "sslEnabled": "on", + "sslCipher": "ECDHE-RSA-AES256-GCM-SHA384", + "sslProtocol": "TLSv1.2", + "sslClientVerify": "NONE", + "sslClientCertificateFingerprint": "", + "sslClientCertificateIssuerName": "", + "serverRouted": "52.239.221.65:443", + "serverStatus": "200", + "serverResponseLatency": "0.028", + "upstreamSourcePort": "21564", + "originalHost": "20.110.30.194", + "host": "20.110.30.194" + } + } + ] +} \ No newline at end of file diff --git a/pkg/translator/jaeger/README.md b/pkg/translator/jaeger/README.md new file mode 100644 index 000000000000..d4f5870bd1b3 --- /dev/null +++ b/pkg/translator/jaeger/README.md @@ -0,0 +1,171 @@ +# OpenTelemetry to Jaeger Transformation + +This document defines the transformation between OpenTelemetry and Jaeger Spans. +The generic transformation [rules specified here][common-mapping-rules] also apply. If a +particular generic transformation rule and the rule in this document contradict +then the rule in this document MUST be used. + +Jaeger accepts spans in the following formats: + +* OpenTelemetry Protocol (OTLP), defined in [opentelemetry-proto](https://github.com/open-telemetry/opentelemetry-proto) +* Thrift `Batch`, defined in [jaeger-idl/.../jaeger.thrift](https://github.com/jaegertracing/jaeger-idl/blob/main/thrift/jaeger.thrift), accepted via UDP or HTTP +* Protobuf `Batch`, defined in [jaeger-idl/.../model.proto](https://github.com/jaegertracing/jaeger-idl/blob/main/proto/api_v2/model.proto), accepted via gRPC + +See also: + +* [Jaeger APIs](https://www.jaegertracing.io/docs/latest/apis/) + +[common-mapping-rules]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/mapping-to-non-otlp.md + +## Summary + +The following table summarizes the major transformations between OpenTelemetry +and Jaeger. + +| OpenTelemetry | Jaeger Thrift | Jaeger Proto | Notes | +| -------------------------- | ---------------- | ---------------- | ----- | +| Span.TraceId | Span.traceIdLow/High | Span.trace_id | See [IDs](#ids) | +| Span.ParentId | Span.parentSpanId | as SpanReference | See [Parent ID](#parent-id) | +| Span.SpanId | Span.spanId | Span.span_id | | +| Span.TraceState | TBD | TBD | | +| Span.Name | Span.operationName | Span.operation_name | | +| Span.Kind | Span.tags["span.kind"] | same | See [SpanKind](#spankind) for values mapping | +| Span.StartTime | Span.startTime | Span.start_time | See [Unit of time](#unit-of-time) | +| Span.EndTime | Span.duration | same | Calculated as EndTime - StartTime. See also [Unit of time](#unit-of-time) | +| Span.Attributes | Span.tags | same | See [Attributes](#attributes) for data types for the mapping. | +| Span.DroppedAttributesCount| Add to Span.tags | same | See [Dropped Attributes Count][dropped-attributes-count] for tag name to use. | +| Span.Events | Span.logs | same | See [Events](#events) for the mapping format. | +| Span.DroppedEventsCount | Add to Span.tags | same | See [Dropped Events Count][dropped-events-count] for tag name to use. | +| Span.Links | Span.references | same | See [Links](#links) | +| Span.DroppedLinksCount | Add to Span.tags | same | See [Dropped Links Count][dropped-links-count] for tag name to use. | +| Span.Status | Add to Span.tags | same | See [Status](#status) for tag names to use. | + +[dropped-attributes-count]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/mapping-to-non-otlp.md#dropped-attributes-count +[dropped-events-count]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/mapping-to-non-otlp.md#dropped-events-count +[dropped-links-count]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/mapping-to-non-otlp.md#dropped-links-count + +## Mappings + +This section discusses the details of the transformations between OpenTelemetry +and Jaeger. + +### Resource + +OpenTelemetry resources MUST be mapped to Jaeger's `Span.Process` tags. Multiple resources can exist for a +single process and exporters need to handle this case accordingly. + +Critically, Jaeger backend depends on `Span.Process.ServiceName` to identify the service +that produced the spans. That field MUST be populated from the `service.name` attribute +of the [`service` resource](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/README.md#service). +If no `service.name` is contained in a Span's Resource, that field MUST be populated from the +[default][default-resource] `Resource`. + +[default-resource]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md#sdk-provided-resource-attributes + +### IDs + +Trace and span IDs in Jaeger are random sequences of bytes. However, Thrift model +represents IDs using `i64` type, or in case of a 128-bit wide Trace ID as two `i64` +fields `traceIdLow` and `traceIdHigh`. The bytes MUST be converted to/from unsigned +ints using Big Endian byte order, e.g. `[0x10, 0x00, 0x00, 0x00] == 268435456`. +The unsigned ints MUST be converted to `i64` by re-interpreting the existing +64bit value as signed `i64`. For example (in Go): + +```go +var ( + id []byte = []byte{0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + unsigned uint64 = binary.BigEndian.Uint64(id) + signed int64 = int64(unsigned) +) +fmt.Println("unsigned:", unsigned) +fmt.Println(" signed:", signed) +// Output: +// unsigned: 18374686479671623680 +// signed: -72057594037927936 +``` + +### Parent ID + +Jaeger Thrift format allows capturing parent ID in a top-level Span field. +Jaeger Proto format does not support parent ID field; instead the parent +MUST be recorded as a `SpanReference` of type `CHILD_OF`, e.g.: + +```python + SpanReference( + ref_type=opentracing.CHILD_OF, + trace_id=span.context.trace_id, + span_id=parent_id, + ) +``` + +This span reference MUST be the first in the list of references. + +### SpanKind + +OpenTelemetry `SpanKind` field MUST be encoded as `span.kind` tag in Jaeger span, +except for `SpanKind.INTERNAL`, which SHOULD NOT be translated to a tag. + +| OpenTelemetry | Jaeger | +| ------------- | ------ | +| `SpanKind.CLIENT`|`"client"`| +| `SpanKind.SERVER`|`"server"`| +| `SpanKind.CONSUMER`|`"consumer"`| +| `SpanKind.PRODUCER`|`"producer"` | +| `SpanKind.INTERNAL`| do not add `span.kind` tag | + +### Unit of time + +In Jaeger Thrift format the timestamps and durations MUST be represented in +microseconds (since epoch for timestamps). If the original value in OpenTelemetry +is expressed in nanoseconds, it MUST be rounded or truncated to microseconds. + +In Jaeger Proto format the timestamps and durations MUST be represented +with nanosecond precision using `google.protobuf.Timestamp` and +`google.protobuf.Duration` types. + +### Status + +The Status is recorded as Span tags. See [Status][span-status] for +tag names to use. + +[span-status]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/mapping-to-non-otlp.md#span-status + +#### Error flag + +When Span `Status` is set to `ERROR`, an `error` span tag MUST be added with the +Boolean value of `true`. The added `error` tag MAY override any previous value. + +### Attributes + +OpenTelemetry Span `Attribute`(s) MUST be reported as `tags` to Jaeger. + +Primitive types MUST be represented by the corresponding types of Jaeger tags. + +Array values MUST be serialized to string like a JSON list as mentioned in +[semantic conventions][semantic-conventions]. + +[semantic-conventions]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#semantic-conventions + +### Links + +OpenTelemetry `Link`(s) MUST be converted to `SpanReference`(s) in Jaeger, +using `FOLLOWS_FROM` reference type. The Link's attributes cannot be represented +in Jaeger explicitly. The exporter MAY additionally convert `Link`(s) to span `Log`(s): + +* use Span start time as the timestamp of the Log +* set Log tag `event=link` +* set Log tags `trace_id` and `span_id` from the respective `SpanContext`'s fields +* store `Link`'s attributes as Log tags + +Span references generated from `Link`(s) MUST be added _after_ the span reference +generated from [Parent ID](#parent-id), if any. + +### Events + +Events MUST be converted to Jaeger Logs. OpenTelemetry Event's `time_unix_nano` and `attributes` fields map directly to Jaeger Log's `timestamp` and `fields` fields. Jaeger Log has no direct equivalent for OpenTelemetry Event's `name` field but OpenTracing semantic conventions specify some special attribute names [here](https://github.com/opentracing/specification/blob/master/semantic_conventions.md#log-fields-table). OpenTelemetry Event's `name` field should be added to Jaeger Log's `fields` map as follows: + +| OpenTelemetry Event Field | Jaeger Attribute | +| -------------------------- | ----------------- | +| `name`|`event`| + +* If OpenTelemetry Event contains an attributes with the key `event`, it should take precedence over Event's `name` field. diff --git a/pkg/translator/jaeger/go.mod b/pkg/translator/jaeger/go.mod index c0a1267cea4c..7fec33ff3ad4 100644 --- a/pkg/translator/jaeger/go.mod +++ b/pkg/translator/jaeger/go.mod @@ -1,36 +1,35 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger -go 1.20 +go 1.21 require ( - github.com/jaegertracing/jaeger v1.41.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 + github.com/jaegertracing/jaeger v1.55.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.uber.org/goleak v1.3.0 ) require ( github.com/apache/thrift v0.19.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - go.uber.org/atomic v1.10.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/translator/jaeger/go.sum b/pkg/translator/jaeger/go.sum index 611a9d68b415..6991bb20a1e6 100644 --- a/pkg/translator/jaeger/go.sum +++ b/pkg/translator/jaeger/go.sum @@ -1,57 +1,58 @@ -github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= 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/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/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/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +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/jaegertracing/jaeger v1.41.0 h1:vVNky8dP46M2RjGaZ7qRENqylW+tBFay3h57N16Ip7M= -github.com/jaegertracing/jaeger v1.41.0/go.mod h1:SIkAT75iVmA9U+mESGYuMH6UQv6V9Qy4qxo0lwfCQAc= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= 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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +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/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -61,16 +62,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -83,15 +84,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/pkg/translator/jaeger/jaegerproto_to_traces_test.go b/pkg/translator/jaeger/jaegerproto_to_traces_test.go index 3ea43570d863..9270e903fe7b 100644 --- a/pkg/translator/jaeger/jaegerproto_to_traces_test.go +++ b/pkg/translator/jaeger/jaegerproto_to_traces_test.go @@ -536,7 +536,7 @@ func TestProtoBatchesToInternalTraces(t *testing.T) { for i := 0; i < lenbatches; i++ { rsExpected := expected.ResourceSpans().At(i) for j := 0; j < lenbatches; j++ { - got.ResourceSpans().RemoveIf(func(rs ptrace.ResourceSpans) bool { + got.ResourceSpans().RemoveIf(func(_ ptrace.ResourceSpans) bool { nameExpected := rsExpected.ScopeSpans().At(0).Spans().At(0).Name() nameGot := got.ResourceSpans().At(j).ScopeSpans().At(0).Scope().Name() if nameExpected == nameGot { @@ -919,6 +919,7 @@ func generateTracesTwoSpansWithFollower() ptrace.Traces { span.SetName("operationC") span.SetSpanID([8]byte{0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18}) span.SetTraceID(spans.At(0).TraceID()) + span.SetParentSpanID(spans.At(0).SpanID()) span.SetStartTimestamp(spans.At(0).EndTimestamp()) span.SetEndTimestamp(spans.At(0).EndTimestamp() + 1000000) span.SetKind(ptrace.SpanKindConsumer) diff --git a/pkg/translator/jaeger/jaegerthrift_to_traces.go b/pkg/translator/jaeger/jaegerthrift_to_traces.go index bd4f8e984c00..4504d1cc364f 100644 --- a/pkg/translator/jaeger/jaegerthrift_to_traces.go +++ b/pkg/translator/jaeger/jaegerthrift_to_traces.go @@ -80,6 +80,33 @@ func jThriftSpansToInternal(spans []*jaeger.Span, dest ptrace.SpanSlice) { } } +// jThriftSpanParentID infers the parent span ID for a given span. +// Based on https://github.com/jaegertracing/jaeger/blob/8c61b6561f9057a199c1504606d8e68319ee7b31/model/span.go#L143 +func jThriftSpanParentID(span *jaeger.Span) int64 { + if span.ParentSpanId != 0 { + return span.ParentSpanId + } + // If span.ParentSpanId undefined but there are references to the same trace, + // they can also be considered a parent, with CHILD_OF being higher priority. + var ffRef *jaeger.SpanRef + for _, ref := range span.References { + // must be from the same trace + if ref.TraceIdHigh != span.TraceIdHigh || ref.TraceIdLow != span.TraceIdLow { + continue + } + if ref.RefType == jaeger.SpanRefType_CHILD_OF { + return ref.SpanId + } + if ffRef == nil && ref.RefType == jaeger.SpanRefType_FOLLOWS_FROM { + ffRef = ref + } + } + if ffRef != nil { + return ffRef.SpanId + } + return 0 +} + func jThriftSpanToInternal(span *jaeger.Span, dest ptrace.Span) { dest.SetTraceID(idutils.UInt64ToTraceID(uint64(span.TraceIdHigh), uint64(span.TraceIdLow))) dest.SetSpanID(idutils.UInt64ToSpanID(uint64(span.SpanId))) @@ -87,7 +114,7 @@ func jThriftSpanToInternal(span *jaeger.Span, dest ptrace.Span) { dest.SetStartTimestamp(microsecondsToUnixNano(span.StartTime)) dest.SetEndTimestamp(microsecondsToUnixNano(span.StartTime + span.Duration)) - parentSpanID := span.ParentSpanId + parentSpanID := jThriftSpanParentID(span) if parentSpanID != 0 { dest.SetParentSpanID(idutils.UInt64ToSpanID(uint64(parentSpanID))) } diff --git a/pkg/translator/jaeger/package_test.go b/pkg/translator/jaeger/package_test.go new file mode 100644 index 000000000000..f55812aa7c78 --- /dev/null +++ b/pkg/translator/jaeger/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package jaeger + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/translator/jaeger/traces_to_jaegerproto.go b/pkg/translator/jaeger/traces_to_jaegerproto.go index da42603e0eab..a0a24920e0ff 100644 --- a/pkg/translator/jaeger/traces_to_jaegerproto.go +++ b/pkg/translator/jaeger/traces_to_jaegerproto.go @@ -150,7 +150,7 @@ func attributeToJaegerProtoTag(key string, attr pcommon.Value) model.KeyValue { func spanToJaegerProto(span ptrace.Span, libraryTags pcommon.InstrumentationScope) *model.Span { traceID := traceIDToJaegerProto(span.TraceID()) - jReferences := makeJaegerProtoReferences(span.Links(), span.ParentSpanID(), traceID) + jReferences := makeJaegerProtoReferences(span.Links(), spanIDToJaegerProto(span.ParentSpanID()), traceID) startTime := span.StartTimestamp().AsTime() return &model.Span{ @@ -237,32 +237,40 @@ func spanIDToJaegerProto(spanID pcommon.SpanID) model.SpanID { return model.SpanID(idutils.SpanIDToUInt64(spanID)) } -// makeJaegerProtoReferences constructs jaeger span references based on parent span ID and span links -func makeJaegerProtoReferences(links ptrace.SpanLinkSlice, parentSpanID pcommon.SpanID, traceID model.TraceID) []model.SpanRef { - parentSpanIDSet := !parentSpanID.IsEmpty() - if !parentSpanIDSet && links.Len() == 0 { - return nil - } - +// makeJaegerProtoReferences constructs jaeger span references based on parent span ID and span links. +// The parent span ID is used to add a CHILD_OF reference, _unless_ it is referenced from one of the links. +func makeJaegerProtoReferences(links ptrace.SpanLinkSlice, parentSpanID model.SpanID, traceID model.TraceID) []model.SpanRef { refsCount := links.Len() - if parentSpanIDSet { + if parentSpanID != 0 { refsCount++ } + if refsCount == 0 { + return nil + } + refs := make([]model.SpanRef, 0, refsCount) // Put parent span ID at the first place because usually backends look for it // as the first CHILD_OF item in the model.SpanRef slice. - if parentSpanIDSet { + if parentSpanID != 0 { refs = append(refs, model.SpanRef{ TraceID: traceID, - SpanID: spanIDToJaegerProto(parentSpanID), + SpanID: parentSpanID, RefType: model.SpanRefType_CHILD_OF, }) } for i := 0; i < links.Len(); i++ { link := links.At(i) + linkTraceID := traceIDToJaegerProto(link.TraceID()) + linkSpanID := spanIDToJaegerProto(link.SpanID()) + linkRefType := refTypeFromLink(link) + if parentSpanID != 0 && linkTraceID == traceID && linkSpanID == parentSpanID { + // We already added a reference to this span, but maybe with the wrong type, so override. + refs[0].RefType = linkRefType + continue + } refs = append(refs, model.SpanRef{ TraceID: traceIDToJaegerProto(link.TraceID()), SpanID: spanIDToJaegerProto(link.SpanID()), diff --git a/pkg/translator/jaeger/traces_to_jaegerproto_test.go b/pkg/translator/jaeger/traces_to_jaegerproto_test.go index f559cf9afe03..744b9be19495 100644 --- a/pkg/translator/jaeger/traces_to_jaegerproto_test.go +++ b/pkg/translator/jaeger/traces_to_jaegerproto_test.go @@ -314,6 +314,7 @@ func TestInternalTracesToJaegerProto(t *testing.T) { }, { name: "a-spans-with-two-parent", + td: generateTracesSpanWithTwoParents(), jb: &model.Batch{ Process: &model.Process{ ServiceName: tracetranslator.ResourceNoServiceName, @@ -324,7 +325,6 @@ func TestInternalTracesToJaegerProto(t *testing.T) { generateProtoTwoParentsSpan(), }, }, - td: generateTracesSpanWithTwoParents(), }, } diff --git a/pkg/translator/loki/convert.go b/pkg/translator/loki/convert.go index f3e07b9336e0..87eeec5a3f7e 100644 --- a/pkg/translator/loki/convert.go +++ b/pkg/translator/loki/convert.go @@ -137,7 +137,7 @@ func parseAttributeNames(attrsToSelect pcommon.Value) []string { } func removeAttributes(attrs pcommon.Map, labels model.LabelSet) { - attrs.RemoveIf(func(s string, v pcommon.Value) bool { + attrs.RemoveIf(func(s string, _ pcommon.Value) bool { if s == hintAttributes || s == hintResources || s == hintTenant || s == hintFormat { return true } diff --git a/pkg/translator/loki/go.mod b/pkg/translator/loki/go.mod index d87e1985e5cc..4a31f06a550e 100644 --- a/pkg/translator/loki/go.mod +++ b/pkg/translator/loki/go.mod @@ -1,50 +1,49 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/loki -go 1.20 +go 1.21 require ( github.com/go-logfmt/logfmt v0.6.0 - github.com/grafana/loki/pkg/push v0.0.0-20230127072203-4e8cc8d71928 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.89.0 - github.com/prometheus/common v0.45.0 - github.com/prometheus/prometheus v0.47.2 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 + github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.98.0 + github.com/prometheus/common v0.52.2 + github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.uber.org/goleak v1.3.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect - github.com/pkg/errors v0.9.1 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/translator/loki/go.sum b/pkg/translator/loki/go.sum index 2139311d927f..e3da762b0df9 100644 --- a/pkg/translator/loki/go.sum +++ b/pkg/translator/loki/go.sum @@ -1,14 +1,21 @@ -github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 h1:8q4SaHjFsClSvuVne0ID/5Ka8u3fcIHyqkLjcFpNRHQ= -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/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= -github.com/aws/aws-sdk-go v1.44.302 h1:ST3ko6GrJKn3Xi+nAvxjG3uk/V1pW8KC52WLeIxqqNk= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 h1:n1DH8TPV4qqPTje2RcUBYwtrTWlabVp4n46+74X2pn4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0/go.mod h1:HDcZnuGbiyppErN6lB+idp4CKhjbc8gwjto6OPpyggM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/aws/aws-sdk-go v1.50.32 h1:POt81DvegnpQKM4DMDLlHz1CO6OBnEoQ1gRhYFd7QRY= +github.com/aws/aws-sdk-go v1.50.32/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= 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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -19,105 +26,122 @@ github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -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-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= +github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/grafana/loki/pkg/push v0.0.0-20230127072203-4e8cc8d71928 h1:KCbGfs9SGr3lL3RWc+c+njCYyWUOa++Oas6McnwdQ2I= -github.com/grafana/loki/pkg/push v0.0.0-20230127072203-4e8cc8d71928/go.mod h1:DhJMrd2QInI/1CNtTN43BZuTmkccdizW1jZ+F6aHkhY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37 h1:w59bmBeLOk4enGtyX4kTBNY3FCw/nwDTYUqcjC4vKhg= +github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37/go.mod h1:f3JSoxBTPXX5ec4FxxeC19nTBSxoTz+cBgS3cYLMcr0= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= 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/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/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= 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.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= 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/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= +github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= -github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e h1:UmqAuY2OyDoog8+l5FybViJE5B2r+UxVGCUwFTsY5AA= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e/go.mod h1:+0ld+ozir7zWFcHA2vVpWAKxXakIioEjPPNOqH+J3ZA= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +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= 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.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +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/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= 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.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= @@ -126,17 +150,27 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78 h1:Xs9lu+tLXxLIfuci70nG4cpwaRC+mRQPUL7LoIeDJC4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= diff --git a/pkg/translator/loki/package_test.go b/pkg/translator/loki/package_test.go new file mode 100644 index 000000000000..a70b98dc7c37 --- /dev/null +++ b/pkg/translator/loki/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package loki + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/translator/opencensus/go.mod b/pkg/translator/opencensus/go.mod index fd0f98d8e471..cca46b64246b 100644 --- a/pkg/translator/opencensus/go.mod +++ b/pkg/translator/opencensus/go.mod @@ -1,22 +1,23 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus -go 1.20 +go 1.21 require ( github.com/census-instrumentation/opencensus-proto v0.4.1 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/google/go-cmp v0.6.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.89.0 - github.com/stretchr/testify v1.8.4 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.98.0 + github.com/stretchr/testify v1.9.0 go.opencensus.io v0.24.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - google.golang.org/protobuf v1.31.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.uber.org/goleak v1.3.0 + google.golang.org/protobuf v1.33.0 ) require ( - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -24,15 +25,15 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text 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-20231030173426-d783a09b4405 // indirect - google.golang.org/grpc v1.59.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/translator/opencensus/go.sum b/pkg/translator/opencensus/go.sum index bab5ad04478c..50e4fead5dd5 100644 --- a/pkg/translator/opencensus/go.sum +++ b/pkg/translator/opencensus/go.sum @@ -3,8 +3,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.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/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -30,16 +30,14 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W 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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 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.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= @@ -51,7 +49,9 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm 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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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= @@ -61,6 +61,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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= @@ -68,16 +69,18 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 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/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +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= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -98,8 +101,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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= @@ -110,8 +113,8 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -133,18 +136,19 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 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-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -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-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= 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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -154,12 +158,11 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/pkg/translator/opencensus/metrics_to_oc.go b/pkg/translator/opencensus/metrics_to_oc.go index d8e0d65e46eb..7adfd34c6454 100644 --- a/pkg/translator/opencensus/metrics_to_oc.go +++ b/pkg/translator/opencensus/metrics_to_oc.go @@ -149,7 +149,7 @@ func collectLabelKeysSummaryDataPoints(dhdp pmetric.SummaryDataPointSlice, keySe } func addLabelKeys(keySet map[string]struct{}, attributes pcommon.Map) { - attributes.Range(func(k string, v pcommon.Value) bool { + attributes.Range(func(k string, _ pcommon.Value) bool { keySet[k] = struct{}{} return true }) diff --git a/pkg/translator/opencensus/oc_to_resource_test.go b/pkg/translator/opencensus/oc_to_resource_test.go index 1a4d833cf3a3..a217f12f43a2 100644 --- a/pkg/translator/opencensus/oc_to_resource_test.go +++ b/pkg/translator/opencensus/oc_to_resource_test.go @@ -37,7 +37,7 @@ func TestOcNodeResourceToInternal(t *testing.T) { // Make sure hard-coded fields override same-name values in Attributes. // To do that add Attributes with same-name. - expectedAttrs.Range(func(k string, v pcommon.Value) bool { + expectedAttrs.Range(func(k string, _ pcommon.Value) bool { // Set all except "attr1" which is not a hard-coded field to some bogus values. if !strings.Contains(k, "-attr") { ocNode.Attributes[k] = "this will be overridden 1" diff --git a/pkg/translator/opencensus/package_test.go b/pkg/translator/opencensus/package_test.go new file mode 100644 index 000000000000..5b6f1219e7b9 --- /dev/null +++ b/pkg/translator/opencensus/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package opencensus + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/translator/prometheus/go.mod b/pkg/translator/prometheus/go.mod index 951781193a6b..7468c4c4257a 100644 --- a/pkg/translator/prometheus/go.mod +++ b/pkg/translator/prometheus/go.mod @@ -1,12 +1,13 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/featuregate v1.5.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.uber.org/goleak v1.3.0 ) require ( @@ -20,12 +21,12 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/translator/prometheus/go.sum b/pkg/translator/prometheus/go.sum index ab8e6a796950..8d4798bd8adb 100644 --- a/pkg/translator/prometheus/go.sum +++ b/pkg/translator/prometheus/go.sum @@ -8,7 +8,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS 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/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -17,6 +18,7 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm 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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -27,16 +29,19 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY 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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +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= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -48,16 +53,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -70,15 +75,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/pkg/translator/prometheus/package_test.go b/pkg/translator/prometheus/package_test.go new file mode 100644 index 000000000000..45271b4c19e7 --- /dev/null +++ b/pkg/translator/prometheus/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package prometheus + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/translator/prometheusremotewrite/go.mod b/pkg/translator/prometheusremotewrite/go.mod index d1ae15bd8206..c0f934206d42 100644 --- a/pkg/translator/prometheusremotewrite/go.mod +++ b/pkg/translator/prometheusremotewrite/go.mod @@ -1,34 +1,36 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.89.0 - github.com/prometheus/common v0.45.0 - github.com/prometheus/prometheus v0.47.2 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.98.0 + github.com/prometheus/common v0.52.2 + github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 ) require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // 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.1-0.20181226105442-5d4384ee4fb2 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/translator/prometheusremotewrite/go.sum b/pkg/translator/prometheusremotewrite/go.sum index 8940860e245d..c8954c3d7da0 100644 --- a/pkg/translator/prometheusremotewrite/go.sum +++ b/pkg/translator/prometheusremotewrite/go.sum @@ -4,11 +4,10 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -17,7 +16,9 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm 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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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= @@ -26,23 +27,28 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= -github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= -github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e h1:UmqAuY2OyDoog8+l5FybViJE5B2r+UxVGCUwFTsY5AA= +github.com/prometheus/prometheus v0.51.2-0.20240405174432-b4a973753c6e/go.mod h1:+0ld+ozir7zWFcHA2vVpWAKxXakIioEjPPNOqH+J3ZA= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +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= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -54,16 +60,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -76,15 +82,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78 h1:Xs9lu+tLXxLIfuci70nG4cpwaRC+mRQPUL7LoIeDJC4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/pkg/translator/prometheusremotewrite/helper.go b/pkg/translator/prometheusremotewrite/helper.go index 55a3b6d55cf4..98761617049b 100644 --- a/pkg/translator/prometheusremotewrite/helper.go +++ b/pkg/translator/prometheusremotewrite/helper.go @@ -26,7 +26,6 @@ import ( ) const ( - nameStr = "__name__" sumStr = "_sum" countStr = "_count" bucketStr = "_bucket" @@ -70,15 +69,14 @@ func (a ByLabelName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } // tsMap will be unmodified if either labels or sample is nil, but can still be modified if the exemplar is nil. func addSample(tsMap map[string]*prompb.TimeSeries, sample *prompb.Sample, labels []prompb.Label, datatype string) string { - if sample == nil || labels == nil || tsMap == nil { + // This shouldn't happen return "" } - sig := timeSeriesSignature(datatype, &labels) - ts, ok := tsMap[sig] - - if ok { + sig := timeSeriesSignature(datatype, labels) + ts := tsMap[sig] + if ts != nil { ts.Samples = append(ts.Samples, *sample) } else { newTs := &prompb.TimeSeries{ @@ -95,7 +93,7 @@ func addSample(tsMap map[string]*prompb.TimeSeries, sample *prompb.Sample, label // we only add exemplars if samples are presents // tsMap is unmodified if either of its parameters is nil and samples are nil. func addExemplars(tsMap map[string]*prompb.TimeSeries, exemplars []prompb.Exemplar, bucketBoundsData []bucketBoundsData) { - if tsMap == nil || bucketBoundsData == nil || exemplars == nil { + if len(tsMap) == 0 || len(bucketBoundsData) == 0 || len(exemplars) == 0 { return } @@ -111,14 +109,10 @@ func addExemplar(tsMap map[string]*prompb.TimeSeries, bucketBounds []bucketBound sig := bucketBound.sig bound := bucketBound.bound - _, ok := tsMap[sig] - if ok { - if tsMap[sig].Samples != nil { - if exemplar.Value <= bound { - tsMap[sig].Exemplars = append(tsMap[sig].Exemplars, exemplar) - return - } - } + ts := tsMap[sig] + if ts != nil && len(ts.Samples) > 0 && exemplar.Value <= bound { + ts.Exemplars = append(ts.Exemplars, exemplar) + return } } } @@ -129,10 +123,10 @@ func addExemplar(tsMap map[string]*prompb.TimeSeries, bucketBounds []bucketBound // // the label slice should not contain duplicate label names; this method sorts the slice by label name before creating // the signature. -func timeSeriesSignature(datatype string, labels *[]prompb.Label) string { +func timeSeriesSignature(datatype string, labels []prompb.Label) string { length := len(datatype) - for _, lb := range *labels { + for _, lb := range labels { length += 2 + len(lb.GetName()) + len(lb.GetValue()) } @@ -140,9 +134,9 @@ func timeSeriesSignature(datatype string, labels *[]prompb.Label) string { b.Grow(length) b.WriteString(datatype) - sort.Sort(ByLabelName(*labels)) + sort.Sort(ByLabelName(labels)) - for _, lb := range *labels { + for _, lb := range labels { b.WriteString("-") b.WriteString(lb.GetName()) b.WriteString("-") @@ -152,9 +146,9 @@ func timeSeriesSignature(datatype string, labels *[]prompb.Label) string { return b.String() } -// createAttributes creates a slice of Cortex Label with OTLP attributes and pairs of string values. -// Unpaired string value is ignored. String pairs overwrites OTLP labels if collision happens, and the overwrite is -// logged. Resultant label names are sanitized. +// createAttributes creates a slice of Prometheus Labels with OTLP attributes and pairs of string values. +// Unpaired string values are ignored. String pairs overwrite OTLP labels if collisions happen, and overwrites are +// logged. Resulting label names are sanitized. func createAttributes(resource pcommon.Resource, attributes pcommon.Map, externalLabels map[string]string, extras ...string) []prompb.Label { serviceName, haveServiceName := resource.Attributes().Get(conventions.AttributeServiceName) instance, haveInstanceID := resource.Attributes().Get(conventions.AttributeServiceInstanceID) @@ -184,8 +178,8 @@ func createAttributes(resource pcommon.Resource, attributes pcommon.Map, externa for _, label := range labels { var finalKey = prometheustranslator.NormalizeLabel(label.Name) - if existingLabel, alreadyExists := l[finalKey]; alreadyExists { - l[finalKey] = existingLabel + ";" + label.Value + if existingValue, alreadyExists := l[finalKey]; alreadyExists { + l[finalKey] = existingValue + ";" + label.Value } else { l[finalKey] = label.Value } @@ -255,26 +249,10 @@ func isValidAggregationTemporality(metric pmetric.Metric) bool { // addSingleHistogramDataPoint converts pt to 2 + min(len(ExplicitBounds), len(BucketCount)) + 1 samples. It // ignore extra buckets if len(ExplicitBounds) > len(BucketCounts) -func addSingleHistogramDataPoint(pt pmetric.HistogramDataPoint, resource pcommon.Resource, metric pmetric.Metric, settings Settings, tsMap map[string]*prompb.TimeSeries) { +func addSingleHistogramDataPoint(pt pmetric.HistogramDataPoint, resource pcommon.Resource, metric pmetric.Metric, settings Settings, tsMap map[string]*prompb.TimeSeries, baseName string) { timestamp := convertTimeStamp(pt.Timestamp()) - // sum, count, and buckets of the histogram should append suffix to baseName - baseName := prometheustranslator.BuildCompliantName(metric, settings.Namespace, settings.AddMetricSuffixes) baseLabels := createAttributes(resource, pt.Attributes(), settings.ExternalLabels) - createLabels := func(nameSuffix string, extras ...string) []prompb.Label { - extraLabelCount := len(extras) / 2 - labels := make([]prompb.Label, len(baseLabels), len(baseLabels)+extraLabelCount+1) // +1 for name - copy(labels, baseLabels) - - for extrasIdx := 0; extrasIdx < extraLabelCount; extrasIdx++ { - labels = append(labels, prompb.Label{Name: extras[extrasIdx], Value: extras[extrasIdx+1]}) - } - - labels = append(labels, prompb.Label{Name: nameStr, Value: baseName + nameSuffix}) - - return labels - } - // If the sum is unset, it indicates the _sum metric point should be // omitted if pt.HasSum() { @@ -287,7 +265,7 @@ func addSingleHistogramDataPoint(pt pmetric.HistogramDataPoint, resource pcommon sum.Value = math.Float64frombits(value.StaleNaN) } - sumlabels := createLabels(sumStr) + sumlabels := createLabels(baseName+sumStr, baseLabels) addSample(tsMap, sum, sumlabels, metric.Type().String()) } @@ -301,7 +279,7 @@ func addSingleHistogramDataPoint(pt pmetric.HistogramDataPoint, resource pcommon count.Value = math.Float64frombits(value.StaleNaN) } - countlabels := createLabels(countStr) + countlabels := createLabels(baseName+countStr, baseLabels) addSample(tsMap, count, countlabels, metric.Type().String()) // cumulative count for conversion to cumulative histogram @@ -323,7 +301,7 @@ func addSingleHistogramDataPoint(pt pmetric.HistogramDataPoint, resource pcommon bucket.Value = math.Float64frombits(value.StaleNaN) } boundStr := strconv.FormatFloat(bound, 'f', -1, 64) - labels := createLabels(bucketStr, leStr, boundStr) + labels := createLabels(baseName+bucketStr, baseLabels, leStr, boundStr) sig := addSample(tsMap, bucket, labels, metric.Type().String()) bucketBounds = append(bucketBounds, bucketBoundsData{sig: sig, bound: bound}) @@ -337,7 +315,7 @@ func addSingleHistogramDataPoint(pt pmetric.HistogramDataPoint, resource pcommon } else { infBucket.Value = float64(pt.Count()) } - infLabels := createLabels(bucketStr, leStr, pInfStr) + infLabels := createLabels(baseName+bucketStr, baseLabels, leStr, pInfStr) sig := addSample(tsMap, infBucket, infLabels, metric.Type().String()) bucketBounds = append(bucketBounds, bucketBoundsData{sig: sig, bound: math.Inf(1)}) @@ -346,8 +324,8 @@ func addSingleHistogramDataPoint(pt pmetric.HistogramDataPoint, resource pcommon // add _created time series if needed startTimestamp := pt.StartTimestamp() if settings.ExportCreatedMetric && startTimestamp != 0 { - labels := createLabels(createdSuffix) - addCreatedTimeSeriesIfNeeded(tsMap, labels, startTimestamp, metric.Type().String()) + labels := createLabels(baseName+createdSuffix, baseLabels) + addCreatedTimeSeriesIfNeeded(tsMap, labels, startTimestamp, pt.Timestamp(), metric.Type().String()) } } @@ -357,13 +335,12 @@ type exemplarType interface { } func getPromExemplars[T exemplarType](pt T) []prompb.Exemplar { - var promExemplars []prompb.Exemplar - + promExemplars := make([]prompb.Exemplar, 0, pt.Exemplars().Len()) for i := 0; i < pt.Exemplars().Len(); i++ { exemplar := pt.Exemplars().At(i) exemplarRunes := 0 - promExemplar := &prompb.Exemplar{ + promExemplar := prompb.Exemplar{ Value: exemplar.DoubleValue(), Timestamp: timestamp.FromTime(exemplar.Timestamp().AsTime()), } @@ -385,9 +362,10 @@ func getPromExemplars[T exemplarType](pt T) []prompb.Exemplar { } promExemplar.Labels = append(promExemplar.Labels, promLabel) } - var labelsFromAttributes []prompb.Label - exemplar.FilteredAttributes().Range(func(key string, value pcommon.Value) bool { + attrs := exemplar.FilteredAttributes() + labelsFromAttributes := make([]prompb.Label, 0, attrs.Len()) + attrs.Range(func(key string, value pcommon.Value) bool { val := value.AsString() exemplarRunes += utf8.RuneCountInString(key) + utf8.RuneCountInString(val) promLabel := prompb.Label{ @@ -405,7 +383,7 @@ func getPromExemplars[T exemplarType](pt T) []prompb.Exemplar { promExemplar.Labels = append(promExemplar.Labels, labelsFromAttributes...) } - promExemplars = append(promExemplars, *promExemplar) + promExemplars = append(promExemplars, promExemplar) } return promExemplars @@ -455,26 +433,10 @@ func maxTimestamp(a, b pcommon.Timestamp) pcommon.Timestamp { // addSingleSummaryDataPoint converts pt to len(QuantileValues) + 2 samples. func addSingleSummaryDataPoint(pt pmetric.SummaryDataPoint, resource pcommon.Resource, metric pmetric.Metric, settings Settings, - tsMap map[string]*prompb.TimeSeries) { + tsMap map[string]*prompb.TimeSeries, baseName string) { timestamp := convertTimeStamp(pt.Timestamp()) - // sum and count of the summary should append suffix to baseName - baseName := prometheustranslator.BuildCompliantName(metric, settings.Namespace, settings.AddMetricSuffixes) baseLabels := createAttributes(resource, pt.Attributes(), settings.ExternalLabels) - createLabels := func(name string, extras ...string) []prompb.Label { - extraLabelCount := len(extras) / 2 - labels := make([]prompb.Label, len(baseLabels), len(baseLabels)+extraLabelCount+1) // +1 for name - copy(labels, baseLabels) - - for extrasIdx := 0; extrasIdx < extraLabelCount; extrasIdx++ { - labels = append(labels, prompb.Label{Name: extras[extrasIdx], Value: extras[extrasIdx+1]}) - } - - labels = append(labels, prompb.Label{Name: nameStr, Value: name}) - - return labels - } - // treat sum as a sample in an individual TimeSeries sum := &prompb.Sample{ Value: pt.Sum(), @@ -483,7 +445,8 @@ func addSingleSummaryDataPoint(pt pmetric.SummaryDataPoint, resource pcommon.Res if pt.Flags().NoRecordedValue() { sum.Value = math.Float64frombits(value.StaleNaN) } - sumlabels := createLabels(baseName + sumStr) + // sum and count of the summary should append suffix to baseName + sumlabels := createLabels(baseName+sumStr, baseLabels) addSample(tsMap, sum, sumlabels, metric.Type().String()) // treat count as a sample in an individual TimeSeries @@ -494,7 +457,7 @@ func addSingleSummaryDataPoint(pt pmetric.SummaryDataPoint, resource pcommon.Res if pt.Flags().NoRecordedValue() { count.Value = math.Float64frombits(value.StaleNaN) } - countlabels := createLabels(baseName + countStr) + countlabels := createLabels(baseName+countStr, baseLabels) addSample(tsMap, count, countlabels, metric.Type().String()) // process each percentile/quantile @@ -508,33 +471,53 @@ func addSingleSummaryDataPoint(pt pmetric.SummaryDataPoint, resource pcommon.Res quantile.Value = math.Float64frombits(value.StaleNaN) } percentileStr := strconv.FormatFloat(qt.Quantile(), 'f', -1, 64) - qtlabels := createLabels(baseName, quantileStr, percentileStr) + qtlabels := createLabels(baseName, baseLabels, quantileStr, percentileStr) addSample(tsMap, quantile, qtlabels, metric.Type().String()) } // add _created time series if needed startTimestamp := pt.StartTimestamp() if settings.ExportCreatedMetric && startTimestamp != 0 { - createdLabels := createLabels(baseName + createdSuffix) - addCreatedTimeSeriesIfNeeded(tsMap, createdLabels, startTimestamp, metric.Type().String()) + createdLabels := createLabels(baseName+createdSuffix, baseLabels) + addCreatedTimeSeriesIfNeeded(tsMap, createdLabels, startTimestamp, pt.Timestamp(), metric.Type().String()) } } +// createLabels returns a copy of baseLabels, adding to it the pair model.MetricNameLabel=name. +// If extras are provided, corresponding label pairs are also added to the returned slice. +// If extras is uneven length, the last (unpaired) extra will be ignored. +func createLabels(name string, baseLabels []prompb.Label, extras ...string) []prompb.Label { + extraLabelCount := len(extras) / 2 + labels := make([]prompb.Label, len(baseLabels), len(baseLabels)+extraLabelCount+1) // +1 for name + copy(labels, baseLabels) + + n := len(extras) + n -= n % 2 + for extrasIdx := 0; extrasIdx < n; extrasIdx += 2 { + labels = append(labels, prompb.Label{Name: extras[extrasIdx], Value: extras[extrasIdx+1]}) + } + + labels = append(labels, prompb.Label{Name: model.MetricNameLabel, Value: name}) + return labels +} + // addCreatedTimeSeriesIfNeeded adds {name}_created time series with a single // sample. If the series exists, then new samples won't be added. func addCreatedTimeSeriesIfNeeded( series map[string]*prompb.TimeSeries, labels []prompb.Label, startTimestamp pcommon.Timestamp, + timestamp pcommon.Timestamp, metricType string, ) { - sig := timeSeriesSignature(metricType, &labels) + sig := timeSeriesSignature(metricType, labels) if _, ok := series[sig]; !ok { series[sig] = &prompb.TimeSeries{ Labels: labels, Samples: []prompb.Sample{ { // convert ns to ms - Value: float64(convertTimeStamp(startTimestamp)), + Value: float64(convertTimeStamp(startTimestamp)), + Timestamp: convertTimeStamp(timestamp), }, }, } @@ -568,7 +551,7 @@ func addResourceTargetInfo(resource pcommon.Resource, settings Settings, timesta if len(settings.Namespace) > 0 { name = settings.Namespace + "_" + name } - labels := createAttributes(resource, attributes, settings.ExternalLabels, nameStr, name) + labels := createAttributes(resource, attributes, settings.ExternalLabels, model.MetricNameLabel, name) sample := &prompb.Sample{ Value: float64(1), // convert ns to ms diff --git a/pkg/translator/prometheusremotewrite/helper_test.go b/pkg/translator/prometheusremotewrite/helper_test.go index d7203f4508b1..e55841911df7 100644 --- a/pkg/translator/prometheusremotewrite/helper_test.go +++ b/pkg/translator/prometheusremotewrite/helper_test.go @@ -205,8 +205,7 @@ func Test_timeSeriesSignature(t *testing.T) { // run tests for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - lbs := tt.lbs - assert.EqualValues(t, tt.want, timeSeriesSignature(tt.metric.Type().String(), &lbs)) + assert.EqualValues(t, tt.want, timeSeriesSignature(tt.metric.Type().String(), tt.lbs)) }) } } @@ -492,7 +491,7 @@ func Test_getPromExemplars(t *testing.T) { { "without_exemplar", pmetric.NewHistogramDataPoint(), - nil, + []prompb.Exemplar{}, }, } // run tests @@ -691,22 +690,22 @@ func TestAddSingleSummaryDataPoint(t *testing.T) { {Name: model.MetricNameLabel, Value: "test_summary" + sumStr}, } return map[string]*prompb.TimeSeries{ - timeSeriesSignature(pmetric.MetricTypeSummary.String(), &labels): { + timeSeriesSignature(pmetric.MetricTypeSummary.String(), labels): { Labels: labels, Samples: []prompb.Sample{ {Value: 0, Timestamp: convertTimeStamp(ts)}, }, }, - timeSeriesSignature(pmetric.MetricTypeSummary.String(), &sumLabels): { + timeSeriesSignature(pmetric.MetricTypeSummary.String(), sumLabels): { Labels: sumLabels, Samples: []prompb.Sample{ {Value: 0, Timestamp: convertTimeStamp(ts)}, }, }, - timeSeriesSignature(pmetric.MetricTypeSummary.String(), &createdLabels): { + timeSeriesSignature(pmetric.MetricTypeSummary.String(), createdLabels): { Labels: createdLabels, Samples: []prompb.Sample{ - {Value: float64(convertTimeStamp(ts))}, + {Value: float64(convertTimeStamp(ts)), Timestamp: convertTimeStamp(ts)}, }, }, } @@ -732,13 +731,13 @@ func TestAddSingleSummaryDataPoint(t *testing.T) { {Name: model.MetricNameLabel, Value: "test_summary" + sumStr}, } return map[string]*prompb.TimeSeries{ - timeSeriesSignature(pmetric.MetricTypeSummary.String(), &labels): { + timeSeriesSignature(pmetric.MetricTypeSummary.String(), labels): { Labels: labels, Samples: []prompb.Sample{ {Value: 0, Timestamp: convertTimeStamp(ts)}, }, }, - timeSeriesSignature(pmetric.MetricTypeSummary.String(), &sumLabels): { + timeSeriesSignature(pmetric.MetricTypeSummary.String(), sumLabels): { Labels: sumLabels, Samples: []prompb.Sample{ {Value: 0, Timestamp: convertTimeStamp(ts)}, @@ -762,6 +761,7 @@ func TestAddSingleSummaryDataPoint(t *testing.T) { ExportCreatedMetric: true, }, got, + metric.Name(), ) } assert.Equal(t, tt.want(), got) @@ -801,22 +801,22 @@ func TestAddSingleHistogramDataPoint(t *testing.T) { {Name: model.BucketLabel, Value: "+Inf"}, } return map[string]*prompb.TimeSeries{ - timeSeriesSignature(pmetric.MetricTypeHistogram.String(), &infLabels): { + timeSeriesSignature(pmetric.MetricTypeHistogram.String(), infLabels): { Labels: infLabels, Samples: []prompb.Sample{ {Value: 0, Timestamp: convertTimeStamp(ts)}, }, }, - timeSeriesSignature(pmetric.MetricTypeHistogram.String(), &labels): { + timeSeriesSignature(pmetric.MetricTypeHistogram.String(), labels): { Labels: labels, Samples: []prompb.Sample{ {Value: 0, Timestamp: convertTimeStamp(ts)}, }, }, - timeSeriesSignature(pmetric.MetricTypeHistogram.String(), &createdLabels): { + timeSeriesSignature(pmetric.MetricTypeHistogram.String(), createdLabels): { Labels: createdLabels, Samples: []prompb.Sample{ - {Value: float64(convertTimeStamp(ts))}, + {Value: float64(convertTimeStamp(ts)), Timestamp: convertTimeStamp(ts)}, }, }, } @@ -843,13 +843,13 @@ func TestAddSingleHistogramDataPoint(t *testing.T) { {Name: model.BucketLabel, Value: "+Inf"}, } return map[string]*prompb.TimeSeries{ - timeSeriesSignature(pmetric.MetricTypeHistogram.String(), &infLabels): { + timeSeriesSignature(pmetric.MetricTypeHistogram.String(), infLabels): { Labels: infLabels, Samples: []prompb.Sample{ {Value: 0, Timestamp: convertTimeStamp(ts)}, }, }, - timeSeriesSignature(pmetric.MetricTypeHistogram.String(), &labels): { + timeSeriesSignature(pmetric.MetricTypeHistogram.String(), labels): { Labels: labels, Samples: []prompb.Sample{ {Value: 0, Timestamp: convertTimeStamp(ts)}, @@ -873,9 +873,104 @@ func TestAddSingleHistogramDataPoint(t *testing.T) { ExportCreatedMetric: true, }, got, + metric.Name(), ) } assert.Equal(t, tt.want(), got) }) } } + +func TestCreateLabels(t *testing.T) { + testCases := []struct { + name string + metricName string + baseLabels []prompb.Label + extras []string + expected []prompb.Label + }{ + { + name: "no base labels, no extras", + metricName: "test", + baseLabels: nil, + expected: []prompb.Label{ + {Name: model.MetricNameLabel, Value: "test"}, + }, + }, + { + name: "base labels, no extras", + metricName: "test", + baseLabels: []prompb.Label{ + {Name: "base1", Value: "value1"}, + {Name: "base2", Value: "value2"}, + }, + expected: []prompb.Label{ + {Name: "base1", Value: "value1"}, + {Name: "base2", Value: "value2"}, + {Name: model.MetricNameLabel, Value: "test"}, + }, + }, + { + name: "base labels, 1 extra", + metricName: "test", + baseLabels: []prompb.Label{ + {Name: "base1", Value: "value1"}, + {Name: "base2", Value: "value2"}, + }, + extras: []string{"extra1", "extraValue1"}, + expected: []prompb.Label{ + {Name: "base1", Value: "value1"}, + {Name: "base2", Value: "value2"}, + {Name: "extra1", Value: "extraValue1"}, + {Name: model.MetricNameLabel, Value: "test"}, + }, + }, + { + name: "base labels, 2 extras", + metricName: "test", + baseLabels: []prompb.Label{ + {Name: "base1", Value: "value1"}, + {Name: "base2", Value: "value2"}, + }, + extras: []string{"extra1", "extraValue1", "extra2", "extraValue2"}, + expected: []prompb.Label{ + {Name: "base1", Value: "value1"}, + {Name: "base2", Value: "value2"}, + {Name: "extra1", Value: "extraValue1"}, + {Name: "extra2", Value: "extraValue2"}, + {Name: model.MetricNameLabel, Value: "test"}, + }, + }, + { + name: "base labels, unpaired extra", + metricName: "test", + baseLabels: []prompb.Label{ + {Name: "base1", Value: "value1"}, + {Name: "base2", Value: "value2"}, + }, + extras: []string{"extra1", "extraValue1", "extra2"}, + expected: []prompb.Label{ + {Name: "base1", Value: "value1"}, + {Name: "base2", Value: "value2"}, + {Name: "extra1", Value: "extraValue1"}, + {Name: model.MetricNameLabel, Value: "test"}, + }, + }, + { + name: "no base labels, 1 extra", + metricName: "test", + baseLabels: nil, + extras: []string{"extra1", "extraValue1"}, + expected: []prompb.Label{ + {Name: "extra1", Value: "extraValue1"}, + {Name: model.MetricNameLabel, Value: "test"}, + }, + }, + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + lbls := createLabels(tc.metricName, tc.baseLabels, tc.extras...) + assert.Equal(t, lbls, tc.expected) + }) + } +} diff --git a/pkg/translator/prometheusremotewrite/histograms.go b/pkg/translator/prometheusremotewrite/histograms.go index ec25abcefcca..bae675ef446b 100644 --- a/pkg/translator/prometheusremotewrite/histograms.go +++ b/pkg/translator/prometheusremotewrite/histograms.go @@ -27,12 +27,13 @@ func addSingleExponentialHistogramDataPoint( resource, pt.Attributes(), settings.ExternalLabels, - model.MetricNameLabel, metric, + model.MetricNameLabel, + metric, ) sig := timeSeriesSignature( pmetric.MetricTypeExponentialHistogram.String(), - &labels, + labels, ) ts, ok := series[sig] if !ok { @@ -74,7 +75,17 @@ func exponentialToNativeHistogram(p pmetric.ExponentialHistogramDataPoint) (prom nSpans, nDeltas := convertBucketsLayout(p.Negative(), scaleDown) h := prompb.Histogram{ - Schema: scale, + // The counter reset detection must be compatible with Prometheus to + // safely set ResetHint to NO. This is not ensured currently. + // Sending a sample that triggers counter reset but with ResetHint==NO + // would lead to Prometheus panic as it does not double check the hint. + // Thus we're explicitly saying UNKNOWN here, which is always safe. + // TODO: using created time stamp should be accurate, but we + // need to know here if it was used for the detection. + // Ref: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/28663#issuecomment-1810577303 + // Counter reset detection in Prometheus: https://github.com/prometheus/prometheus/blob/f997c72f294c0f18ca13fa06d51889af04135195/tsdb/chunkenc/histogram.go#L232 + ResetHint: prompb.Histogram_UNKNOWN, + Schema: scale, ZeroCount: &prompb.Histogram_ZeroCountInt{ZeroCountInt: p.ZeroCount()}, // TODO use zero_threshold, if set, see diff --git a/pkg/translator/prometheusremotewrite/histograms_test.go b/pkg/translator/prometheusremotewrite/histograms_test.go index fcef1d4dc924..84261b4e7da4 100644 --- a/pkg/translator/prometheusremotewrite/histograms_test.go +++ b/pkg/translator/prometheusremotewrite/histograms_test.go @@ -634,7 +634,7 @@ func TestAddSingleExponentialHistogramDataPoint(t *testing.T) { {Name: "attr", Value: "test_attr"}, } return map[string]*prompb.TimeSeries{ - timeSeriesSignature(pmetric.MetricTypeExponentialHistogram.String(), &labels): { + timeSeriesSignature(pmetric.MetricTypeExponentialHistogram.String(), labels): { Labels: labels, Histograms: []prompb.Histogram{ { @@ -698,7 +698,7 @@ func TestAddSingleExponentialHistogramDataPoint(t *testing.T) { } return map[string]*prompb.TimeSeries{ - timeSeriesSignature(pmetric.MetricTypeExponentialHistogram.String(), &labels): { + timeSeriesSignature(pmetric.MetricTypeExponentialHistogram.String(), labels): { Labels: labels, Histograms: []prompb.Histogram{ { @@ -714,7 +714,7 @@ func TestAddSingleExponentialHistogramDataPoint(t *testing.T) { {Value: 1}, }, }, - timeSeriesSignature(pmetric.MetricTypeExponentialHistogram.String(), &labelsAnother): { + timeSeriesSignature(pmetric.MetricTypeExponentialHistogram.String(), labelsAnother): { Labels: labelsAnother, Histograms: []prompb.Histogram{ { diff --git a/pkg/translator/prometheusremotewrite/metrics_to_prw.go b/pkg/translator/prometheusremotewrite/metrics_to_prw.go index 2889a4e9640a..f048f7534fba 100644 --- a/pkg/translator/prometheusremotewrite/metrics_to_prw.go +++ b/pkg/translator/prometheusremotewrite/metrics_to_prw.go @@ -21,9 +21,10 @@ type Settings struct { DisableTargetInfo bool ExportCreatedMetric bool AddMetricSuffixes bool + SendMetadata bool } -// FromMetrics converts pmetric.Metrics to prometheus remote write format. +// FromMetrics converts pmetric.Metrics to Prometheus remote write format. func FromMetrics(md pmetric.Metrics, settings Settings) (tsMap map[string]*prompb.TimeSeries, errs error) { tsMap = make(map[string]*prompb.TimeSeries) @@ -49,6 +50,8 @@ func FromMetrics(md pmetric.Metrics, settings Settings) (tsMap map[string]*promp continue } + promName := prometheustranslator.BuildCompliantName(metric, settings.Namespace, settings.AddMetricSuffixes) + // handle individual metric based on type //exhaustive:enforce switch metric.Type() { @@ -58,7 +61,7 @@ func FromMetrics(md pmetric.Metrics, settings Settings) (tsMap map[string]*promp errs = multierr.Append(errs, fmt.Errorf("empty data points. %s is dropped", metric.Name())) } for x := 0; x < dataPoints.Len(); x++ { - addSingleGaugeNumberDataPoint(dataPoints.At(x), resource, metric, settings, tsMap) + addSingleGaugeNumberDataPoint(dataPoints.At(x), resource, metric, settings, tsMap, promName) } case pmetric.MetricTypeSum: dataPoints := metric.Sum().DataPoints() @@ -66,7 +69,7 @@ func FromMetrics(md pmetric.Metrics, settings Settings) (tsMap map[string]*promp errs = multierr.Append(errs, fmt.Errorf("empty data points. %s is dropped", metric.Name())) } for x := 0; x < dataPoints.Len(); x++ { - addSingleSumNumberDataPoint(dataPoints.At(x), resource, metric, settings, tsMap) + addSingleSumNumberDataPoint(dataPoints.At(x), resource, metric, settings, tsMap, promName) } case pmetric.MetricTypeHistogram: dataPoints := metric.Histogram().DataPoints() @@ -74,19 +77,18 @@ func FromMetrics(md pmetric.Metrics, settings Settings) (tsMap map[string]*promp errs = multierr.Append(errs, fmt.Errorf("empty data points. %s is dropped", metric.Name())) } for x := 0; x < dataPoints.Len(); x++ { - addSingleHistogramDataPoint(dataPoints.At(x), resource, metric, settings, tsMap) + addSingleHistogramDataPoint(dataPoints.At(x), resource, metric, settings, tsMap, promName) } case pmetric.MetricTypeExponentialHistogram: dataPoints := metric.ExponentialHistogram().DataPoints() if dataPoints.Len() == 0 { errs = multierr.Append(errs, fmt.Errorf("empty data points. %s is dropped", metric.Name())) } - name := prometheustranslator.BuildCompliantName(metric, settings.Namespace, settings.AddMetricSuffixes) for x := 0; x < dataPoints.Len(); x++ { errs = multierr.Append( errs, addSingleExponentialHistogramDataPoint( - name, + promName, dataPoints.At(x), resource, settings, @@ -100,7 +102,7 @@ func FromMetrics(md pmetric.Metrics, settings Settings) (tsMap map[string]*promp errs = multierr.Append(errs, fmt.Errorf("empty data points. %s is dropped", metric.Name())) } for x := 0; x < dataPoints.Len(); x++ { - addSingleSummaryDataPoint(dataPoints.At(x), resource, metric, settings, tsMap) + addSingleSummaryDataPoint(dataPoints.At(x), resource, metric, settings, tsMap, promName) } default: errs = multierr.Append(errs, errors.New("unsupported metric type")) diff --git a/pkg/translator/prometheusremotewrite/number_data_points.go b/pkg/translator/prometheusremotewrite/number_data_points.go index 5614424c6ead..a2d0e33a8ba8 100644 --- a/pkg/translator/prometheusremotewrite/number_data_points.go +++ b/pkg/translator/prometheusremotewrite/number_data_points.go @@ -11,11 +11,9 @@ import ( "github.com/prometheus/prometheus/prompb" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" - - prometheustranslator "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus" ) -// addSingleSumNumberDataPoint converts the Gauge metric data point to a +// addSingleGaugeNumberDataPoint converts the Gauge metric data point to a // Prometheus time series with samples and labels. The result is stored in the // series map. func addSingleGaugeNumberDataPoint( @@ -24,13 +22,14 @@ func addSingleGaugeNumberDataPoint( metric pmetric.Metric, settings Settings, series map[string]*prompb.TimeSeries, + name string, ) { - name := prometheustranslator.BuildCompliantName(metric, settings.Namespace, settings.AddMetricSuffixes) labels := createAttributes( resource, pt.Attributes(), settings.ExternalLabels, - model.MetricNameLabel, name, + model.MetricNameLabel, + name, ) sample := &prompb.Sample{ // convert ns to ms @@ -57,8 +56,8 @@ func addSingleSumNumberDataPoint( metric pmetric.Metric, settings Settings, series map[string]*prompb.TimeSeries, + name string, ) { - name := prometheustranslator.BuildCompliantName(metric, settings.Namespace, settings.AddMetricSuffixes) labels := createAttributes( resource, pt.Attributes(), @@ -80,7 +79,7 @@ func addSingleSumNumberDataPoint( } sig := addSample(series, sample, labels, metric.Type().String()) - if ts, ok := series[sig]; sig != "" && ok { + if ts := series[sig]; sig != "" && ts != nil { exemplars := getPromExemplars[pmetric.NumberDataPoint](pt) ts.Exemplars = append(ts.Exemplars, exemplars...) } @@ -88,15 +87,18 @@ func addSingleSumNumberDataPoint( // add _created time series if needed if settings.ExportCreatedMetric && metric.Sum().IsMonotonic() { startTimestamp := pt.StartTimestamp() - if startTimestamp != 0 { - createdLabels := createAttributes( - resource, - pt.Attributes(), - settings.ExternalLabels, - nameStr, - name+createdSuffix, - ) - addCreatedTimeSeriesIfNeeded(series, createdLabels, startTimestamp, metric.Type().String()) + if startTimestamp == 0 { + return + } + + createdLabels := make([]prompb.Label, len(labels)) + copy(createdLabels, labels) + for i, l := range createdLabels { + if l.Name == model.MetricNameLabel { + createdLabels[i].Value = name + createdSuffix + break + } } + addCreatedTimeSeriesIfNeeded(series, createdLabels, startTimestamp, pt.Timestamp(), metric.Type().String()) } } diff --git a/pkg/translator/prometheusremotewrite/number_data_points_test.go b/pkg/translator/prometheusremotewrite/number_data_points_test.go index 39b13fcd3d9d..c9be5bad343b 100644 --- a/pkg/translator/prometheusremotewrite/number_data_points_test.go +++ b/pkg/translator/prometheusremotewrite/number_data_points_test.go @@ -35,7 +35,7 @@ func TestAddSingleGaugeNumberDataPoint(t *testing.T) { {Name: model.MetricNameLabel, Value: "test"}, } return map[string]*prompb.TimeSeries{ - timeSeriesSignature(pmetric.MetricTypeGauge.String(), &labels): { + timeSeriesSignature(pmetric.MetricTypeGauge.String(), labels): { Labels: labels, Samples: []prompb.Sample{ { @@ -60,6 +60,7 @@ func TestAddSingleGaugeNumberDataPoint(t *testing.T) { metric, Settings{}, gotSeries, + metric.Name(), ) } assert.Equal(t, tt.want(), gotSeries) @@ -89,7 +90,7 @@ func TestAddSingleSumNumberDataPoint(t *testing.T) { {Name: model.MetricNameLabel, Value: "test"}, } return map[string]*prompb.TimeSeries{ - timeSeriesSignature(pmetric.MetricTypeSum.String(), &labels): { + timeSeriesSignature(pmetric.MetricTypeSum.String(), labels): { Labels: labels, Samples: []prompb.Sample{ { @@ -117,7 +118,7 @@ func TestAddSingleSumNumberDataPoint(t *testing.T) { {Name: model.MetricNameLabel, Value: "test"}, } return map[string]*prompb.TimeSeries{ - timeSeriesSignature(pmetric.MetricTypeSum.String(), &labels): { + timeSeriesSignature(pmetric.MetricTypeSum.String(), labels): { Labels: labels, Samples: []prompb.Sample{{ Value: 1, @@ -153,16 +154,16 @@ func TestAddSingleSumNumberDataPoint(t *testing.T) { {Name: model.MetricNameLabel, Value: "test_sum" + createdSuffix}, } return map[string]*prompb.TimeSeries{ - timeSeriesSignature(pmetric.MetricTypeSum.String(), &labels): { + timeSeriesSignature(pmetric.MetricTypeSum.String(), labels): { Labels: labels, Samples: []prompb.Sample{ {Value: 1, Timestamp: convertTimeStamp(ts)}, }, }, - timeSeriesSignature(pmetric.MetricTypeSum.String(), &createdLabels): { + timeSeriesSignature(pmetric.MetricTypeSum.String(), createdLabels): { Labels: createdLabels, Samples: []prompb.Sample{ - {Value: float64(convertTimeStamp(ts))}, + {Value: float64(convertTimeStamp(ts)), Timestamp: convertTimeStamp(ts)}, }, }, } @@ -186,7 +187,7 @@ func TestAddSingleSumNumberDataPoint(t *testing.T) { {Name: model.MetricNameLabel, Value: "test_sum"}, } return map[string]*prompb.TimeSeries{ - timeSeriesSignature(pmetric.MetricTypeSum.String(), &labels): { + timeSeriesSignature(pmetric.MetricTypeSum.String(), labels): { Labels: labels, Samples: []prompb.Sample{ {Value: 0, Timestamp: convertTimeStamp(ts)}, @@ -213,7 +214,7 @@ func TestAddSingleSumNumberDataPoint(t *testing.T) { {Name: model.MetricNameLabel, Value: "test_sum"}, } return map[string]*prompb.TimeSeries{ - timeSeriesSignature(pmetric.MetricTypeSum.String(), &labels): { + timeSeriesSignature(pmetric.MetricTypeSum.String(), labels): { Labels: labels, Samples: []prompb.Sample{ {Value: 0, Timestamp: convertTimeStamp(ts)}, @@ -236,6 +237,7 @@ func TestAddSingleSumNumberDataPoint(t *testing.T) { metric, Settings{ExportCreatedMetric: true}, got, + metric.Name(), ) } assert.Equal(t, tt.want(), got) diff --git a/pkg/translator/prometheusremotewrite/otlp_to_openmetrics_metadata.go b/pkg/translator/prometheusremotewrite/otlp_to_openmetrics_metadata.go new file mode 100644 index 000000000000..b2564a3d187f --- /dev/null +++ b/pkg/translator/prometheusremotewrite/otlp_to_openmetrics_metadata.go @@ -0,0 +1,64 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package prometheusremotewrite // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite" + +import ( + "github.com/prometheus/prometheus/prompb" + "go.opentelemetry.io/collector/pdata/pmetric" + + prometheustranslator "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus" +) + +func otelMetricTypeToPromMetricType(otelMetric pmetric.Metric) prompb.MetricMetadata_MetricType { + switch otelMetric.Type() { + case pmetric.MetricTypeGauge: + return prompb.MetricMetadata_GAUGE + case pmetric.MetricTypeSum: + metricType := prompb.MetricMetadata_GAUGE + if otelMetric.Sum().IsMonotonic() { + metricType = prompb.MetricMetadata_COUNTER + } + return metricType + case pmetric.MetricTypeHistogram: + return prompb.MetricMetadata_HISTOGRAM + case pmetric.MetricTypeSummary: + return prompb.MetricMetadata_SUMMARY + case pmetric.MetricTypeExponentialHistogram: + return prompb.MetricMetadata_HISTOGRAM + } + return prompb.MetricMetadata_UNKNOWN +} + +func OtelMetricsToMetadata(md pmetric.Metrics, addMetricSuffixes bool) []*prompb.MetricMetadata { + resourceMetricsSlice := md.ResourceMetrics() + + metadataLength := 0 + for i := 0; i < resourceMetricsSlice.Len(); i++ { + scopeMetricsSlice := resourceMetricsSlice.At(i).ScopeMetrics() + for j := 0; j < scopeMetricsSlice.Len(); j++ { + metadataLength += scopeMetricsSlice.At(j).Metrics().Len() + } + } + + var metadata = make([]*prompb.MetricMetadata, 0, metadataLength) + for i := 0; i < resourceMetricsSlice.Len(); i++ { + resourceMetrics := resourceMetricsSlice.At(i) + scopeMetricsSlice := resourceMetrics.ScopeMetrics() + + for j := 0; j < scopeMetricsSlice.Len(); j++ { + scopeMetrics := scopeMetricsSlice.At(j) + for k := 0; k < scopeMetrics.Metrics().Len(); k++ { + metric := scopeMetrics.Metrics().At(k) + entry := prompb.MetricMetadata{ + Type: otelMetricTypeToPromMetricType(metric), + MetricFamilyName: prometheustranslator.BuildCompliantName(metric, "", addMetricSuffixes), + Help: metric.Description(), + } + metadata = append(metadata, &entry) + } + } + } + + return metadata +} diff --git a/pkg/translator/prometheusremotewrite/otlp_to_openmetrics_metadata_test.go b/pkg/translator/prometheusremotewrite/otlp_to_openmetrics_metadata_test.go new file mode 100644 index 000000000000..6807ed7319d1 --- /dev/null +++ b/pkg/translator/prometheusremotewrite/otlp_to_openmetrics_metadata_test.go @@ -0,0 +1,226 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package prometheusremotewrite // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite" +import ( + "testing" + "time" + + "github.com/prometheus/prometheus/prompb" + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" + prometheustranslator "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus" +) + +func TestOtelMetricTypeToPromMetricType(t *testing.T) { + ts := uint64(time.Now().UnixNano()) + tests := []struct { + name string + metric func() pmetric.Metric + want prompb.MetricMetadata_MetricType + }{ + { + name: "gauge", + metric: func() pmetric.Metric { + return getIntGaugeMetric( + "test", + pcommon.NewMap(), + 1, ts, + ) + }, + want: prompb.MetricMetadata_GAUGE, + }, + { + name: "sum", + metric: func() pmetric.Metric { + return getIntSumMetric( + "test", + pcommon.NewMap(), + pmetric.AggregationTemporalityCumulative, + 1, ts, + ) + }, + want: prompb.MetricMetadata_GAUGE, + }, + { + name: "monotonic cumulative", + metric: func() pmetric.Metric { + metric := pmetric.NewMetric() + metric.SetName("test_sum") + metric.SetEmptySum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + metric.SetEmptySum().SetIsMonotonic(true) + + dp := metric.Sum().DataPoints().AppendEmpty() + dp.SetDoubleValue(1) + + return metric + }, + want: prompb.MetricMetadata_COUNTER, + }, + { + name: "cumulative histogram", + metric: func() pmetric.Metric { + m := getHistogramMetric("", pcommon.NewMap(), pmetric.AggregationTemporalityCumulative, 0, 0, 0, []float64{}, []uint64{}) + return m + }, + want: prompb.MetricMetadata_HISTOGRAM, + }, + { + name: "cumulative exponential histogram", + metric: func() pmetric.Metric { + metric := pmetric.NewMetric() + h := metric.SetEmptyExponentialHistogram() + h.SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + return metric + }, + want: prompb.MetricMetadata_HISTOGRAM, + }, + { + name: "summary with start time", + metric: func() pmetric.Metric { + metric := pmetric.NewMetric() + metric.SetName("test_summary") + metric.SetEmptySummary() + + dp := metric.Summary().DataPoints().AppendEmpty() + dp.SetTimestamp(pcommon.Timestamp(ts)) + dp.SetStartTimestamp(pcommon.Timestamp(ts)) + + return metric + }, + want: prompb.MetricMetadata_SUMMARY, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + metric := tt.metric() + + metricType := otelMetricTypeToPromMetricType(metric) + + assert.Equal(t, tt.want, metricType) + }) + } +} + +func TestOtelMetricsToMetadata(t *testing.T) { + ts := uint64(time.Now().UnixNano()) + tests := []struct { + name string + metrics pmetric.Metrics + want []*prompb.MetricMetadata + }{ + { + name: "all types§", + metrics: GenerateMetricsAllTypesNoDataPointsHelp(), + want: []*prompb.MetricMetadata{ + { + Type: prompb.MetricMetadata_GAUGE, + MetricFamilyName: prometheustranslator.BuildCompliantName(getIntGaugeMetric( + testdata.TestGaugeDoubleMetricName, + pcommon.NewMap(), + 1, ts, + ), "", false), + Help: "gauge description", + }, + { + Type: prompb.MetricMetadata_GAUGE, + MetricFamilyName: prometheustranslator.BuildCompliantName(getIntGaugeMetric( + testdata.TestGaugeIntMetricName, + pcommon.NewMap(), + 1, ts, + ), "", false), + Help: "gauge description", + }, + { + Type: prompb.MetricMetadata_COUNTER, + MetricFamilyName: prometheustranslator.BuildCompliantName(getIntGaugeMetric( + testdata.TestSumDoubleMetricName, + pcommon.NewMap(), + 1, ts, + ), "", false), + Help: "sum description", + }, + { + Type: prompb.MetricMetadata_COUNTER, + MetricFamilyName: prometheustranslator.BuildCompliantName(getIntGaugeMetric( + testdata.TestSumIntMetricName, + pcommon.NewMap(), + 1, ts, + ), "", false), + Help: "sum description", + }, + { + Type: prompb.MetricMetadata_HISTOGRAM, + MetricFamilyName: prometheustranslator.BuildCompliantName(getIntGaugeMetric( + testdata.TestDoubleHistogramMetricName, + pcommon.NewMap(), + 1, ts, + ), "", false), + Help: "histogram description", + }, + { + Type: prompb.MetricMetadata_SUMMARY, + MetricFamilyName: prometheustranslator.BuildCompliantName(getIntGaugeMetric( + testdata.TestDoubleSummaryMetricName, + pcommon.NewMap(), + 1, ts, + ), "", false), + Help: "summary description", + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + metaData := OtelMetricsToMetadata(tt.metrics, false) + + for i := 0; i < len(metaData); i++ { + assert.Equal(t, tt.want[i].Type, metaData[i].Type) + assert.Equal(t, tt.want[i].MetricFamilyName, metaData[i].MetricFamilyName) + assert.Equal(t, tt.want[i].Help, metaData[i].Help) + } + + }) + } +} + +func GenerateMetricsAllTypesNoDataPointsHelp() pmetric.Metrics { + md := testdata.GenerateMetricsOneEmptyInstrumentationLibrary() + ilm0 := md.ResourceMetrics().At(0).ScopeMetrics().At(0) + ms := ilm0.Metrics() + initMetric(ms.AppendEmpty(), testdata.TestGaugeDoubleMetricName, pmetric.MetricTypeGauge, "gauge description") + initMetric(ms.AppendEmpty(), testdata.TestGaugeIntMetricName, pmetric.MetricTypeGauge, "gauge description") + initMetric(ms.AppendEmpty(), testdata.TestSumDoubleMetricName, pmetric.MetricTypeSum, "sum description") + initMetric(ms.AppendEmpty(), testdata.TestSumIntMetricName, pmetric.MetricTypeSum, "sum description") + initMetric(ms.AppendEmpty(), testdata.TestDoubleHistogramMetricName, pmetric.MetricTypeHistogram, "histogram description") + initMetric(ms.AppendEmpty(), testdata.TestDoubleSummaryMetricName, pmetric.MetricTypeSummary, "summary description") + return md +} + +func initMetric(m pmetric.Metric, name string, ty pmetric.MetricType, desc string) { + m.SetName(name) + m.SetDescription(desc) + //exhaustive:enforce + switch ty { + case pmetric.MetricTypeGauge: + m.SetEmptyGauge() + + case pmetric.MetricTypeSum: + sum := m.SetEmptySum() + sum.SetIsMonotonic(true) + sum.SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + + case pmetric.MetricTypeHistogram: + histo := m.SetEmptyHistogram() + histo.SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + + case pmetric.MetricTypeExponentialHistogram: + m.SetEmptyExponentialHistogram() + + case pmetric.MetricTypeSummary: + m.SetEmptySummary() + } +} diff --git a/pkg/translator/prometheusremotewrite/package_test.go b/pkg/translator/prometheusremotewrite/package_test.go new file mode 100644 index 000000000000..a22c6c42fbd5 --- /dev/null +++ b/pkg/translator/prometheusremotewrite/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package prometheusremotewrite + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/translator/signalfx/from_metrics.go b/pkg/translator/signalfx/from_metrics.go index 8c0c7f89edaa..0d316db4947a 100644 --- a/pkg/translator/signalfx/from_metrics.go +++ b/pkg/translator/signalfx/from_metrics.go @@ -36,7 +36,7 @@ const ( type FromTranslator struct{} // FromMetrics converts pmetric.Metrics to SignalFx proto data points. -func (ft *FromTranslator) FromMetrics(md pmetric.Metrics, dropHistogramBuckets bool) ([]*sfxpb.DataPoint, error) { +func (ft *FromTranslator) FromMetrics(md pmetric.Metrics, dropHistogramBuckets bool, processHistograms bool) ([]*sfxpb.DataPoint, error) { var sfxDataPoints []*sfxpb.DataPoint rms := md.ResourceMetrics() @@ -47,7 +47,7 @@ func (ft *FromTranslator) FromMetrics(md pmetric.Metrics, dropHistogramBuckets b for j := 0; j < rm.ScopeMetrics().Len(); j++ { ilm := rm.ScopeMetrics().At(j) for k := 0; k < ilm.Metrics().Len(); k++ { - sfxDataPoints = append(sfxDataPoints, ft.FromMetric(ilm.Metrics().At(k), extraDimensions, dropHistogramBuckets)...) + sfxDataPoints = append(sfxDataPoints, ft.FromMetric(ilm.Metrics().At(k), extraDimensions, dropHistogramBuckets, processHistograms)...) } } } @@ -57,7 +57,7 @@ func (ft *FromTranslator) FromMetrics(md pmetric.Metrics, dropHistogramBuckets b // FromMetric converts pmetric.Metric to SignalFx proto data points. // TODO: Remove this and change signalfxexporter to us FromMetrics. -func (ft *FromTranslator) FromMetric(m pmetric.Metric, extraDimensions []*sfxpb.Dimension, dropHistogramBuckets bool) []*sfxpb.DataPoint { +func (ft *FromTranslator) FromMetric(m pmetric.Metric, extraDimensions []*sfxpb.Dimension, dropHistogramBuckets bool, processHistograms bool) []*sfxpb.DataPoint { var dps []*sfxpb.DataPoint mt := fromMetricTypeToMetricType(m) @@ -68,7 +68,9 @@ func (ft *FromTranslator) FromMetric(m pmetric.Metric, extraDimensions []*sfxpb. case pmetric.MetricTypeSum: dps = convertNumberDataPoints(m.Sum().DataPoints(), m.Name(), mt, extraDimensions) case pmetric.MetricTypeHistogram: - dps = convertHistogram(m.Histogram().DataPoints(), m.Name(), mt, extraDimensions, dropHistogramBuckets) + if processHistograms { + dps = convertHistogram(m.Histogram().DataPoints(), m.Name(), mt, extraDimensions, dropHistogramBuckets) + } case pmetric.MetricTypeSummary: dps = convertSummaryDataPoints(m.Summary().DataPoints(), m.Name(), extraDimensions) case pmetric.MetricTypeExponentialHistogram: diff --git a/pkg/translator/signalfx/from_metrics_test.go b/pkg/translator/signalfx/from_metrics_test.go index 5f3b0997989b..70d091ac4080 100644 --- a/pkg/translator/signalfx/from_metrics_test.go +++ b/pkg/translator/signalfx/from_metrics_test.go @@ -384,7 +384,7 @@ func Test_FromMetrics(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { from := &FromTranslator{} - gotSfxDataPoints, err := from.FromMetrics(tt.metricsFn(), false) + gotSfxDataPoints, err := from.FromMetrics(tt.metricsFn(), false, true) require.NoError(t, err) // Sort SFx dimensions since they are built from maps and the order // of those is not deterministic. @@ -473,7 +473,44 @@ func Test_FromMetrics(t *testing.T) { for _, tt := range testsWithDropHistogramBuckets { t.Run(tt.name, func(t *testing.T) { from := &FromTranslator{} - gotSfxDataPoints, err := from.FromMetrics(tt.metricsFn(), true) + gotSfxDataPoints, err := from.FromMetrics(tt.metricsFn(), true, true) + require.NoError(t, err) + // Sort SFx dimensions since they are built from maps and the order + // of those is not deterministic. + sortDimensions(tt.wantSfxDataPoints) + sortDimensions(gotSfxDataPoints) + assert.EqualValues(t, tt.wantSfxDataPoints, gotSfxDataPoints) + }) + } + + testsWithIgnoreHistograms := []struct { + name string + metricsFn func() pmetric.Metrics + wantSfxDataPoints []*sfxpb.DataPoint + }{ + { + name: "no_histogram", + metricsFn: func() pmetric.Metrics { + out := pmetric.NewMetrics() + ilm := out.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty() + m1 := ilm.Metrics().AppendEmpty() + m1.SetName("histogram") + m1.SetEmptyHistogram().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + initHistDP(m1.Histogram().DataPoints().AppendEmpty()) + m2 := ilm.Metrics().AppendEmpty() + m2.SetName("gauge_double_with_dims") + initDoublePt(m2.SetEmptyGauge().DataPoints().AppendEmpty()) + return out + }, + wantSfxDataPoints: []*sfxpb.DataPoint{ + doubleSFxDataPoint("gauge_double_with_dims", &sfxMetricTypeGauge, nil, doubleVal), + }, + }, + } + for _, tt := range testsWithIgnoreHistograms { + t.Run(tt.name, func(t *testing.T) { + from := &FromTranslator{} + gotSfxDataPoints, err := from.FromMetrics(tt.metricsFn(), true, false) require.NoError(t, err) // Sort SFx dimensions since they are built from maps and the order // of those is not deterministic. diff --git a/pkg/translator/signalfx/go.mod b/pkg/translator/signalfx/go.mod index e3ac60160b59..b8a489802ca7 100644 --- a/pkg/translator/signalfx/go.mod +++ b/pkg/translator/signalfx/go.mod @@ -1,32 +1,33 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.89.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.98.0 github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 ) require ( - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/translator/signalfx/go.sum b/pkg/translator/signalfx/go.sum index 5ec990d91791..94ed371d1ea6 100644 --- a/pkg/translator/signalfx/go.sum +++ b/pkg/translator/signalfx/go.sum @@ -1,5 +1,5 @@ -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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -18,14 +18,17 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw 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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +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/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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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= @@ -34,17 +37,20 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY 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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 h1:32k2QLgsKhcEs55q4REPKyIadvid5FPy2+VMgvbmKJ0= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfiC7+VheQaz+ypdCt5SmZNL+BRxUe7y4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +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= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -56,16 +62,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -78,10 +84,10 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -90,10 +96,11 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/pkg/translator/signalfx/package_test.go b/pkg/translator/signalfx/package_test.go new file mode 100644 index 000000000000..b13e11e3898a --- /dev/null +++ b/pkg/translator/signalfx/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package signalfx + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/translator/skywalking/go.mod b/pkg/translator/skywalking/go.mod index 586887507f06..738407b1bae8 100644 --- a/pkg/translator/skywalking/go.mod +++ b/pkg/translator/skywalking/go.mod @@ -1,13 +1,14 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/skywalking -go 1.20 +go 1.21 require ( - github.com/google/uuid v1.4.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 - skywalking.apache.org/repo/goapi v0.0.0-20231026090926-09378dd56587 + github.com/google/uuid v1.6.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.uber.org/goleak v1.3.0 + skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4 ) require ( @@ -20,11 +21,11 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/translator/skywalking/go.sum b/pkg/translator/skywalking/go.sum index d92cfc022688..e47ccb6ca94a 100644 --- a/pkg/translator/skywalking/go.sum +++ b/pkg/translator/skywalking/go.sum @@ -47,17 +47,19 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/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 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= 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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -70,27 +72,31 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +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= 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.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -101,6 +107,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -115,8 +122,10 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -127,6 +136,7 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/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.1.0/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= @@ -139,16 +149,22 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= 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.5/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.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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= @@ -162,6 +178,7 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 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= @@ -173,8 +190,8 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= 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= @@ -183,8 +200,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -196,15 +213,17 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.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= -skywalking.apache.org/repo/goapi v0.0.0-20231026090926-09378dd56587 h1:TY79I5Y7xRB8q5LQ+MJn7NYsYi0VL5nj1QDrUHwK7cQ= -skywalking.apache.org/repo/goapi v0.0.0-20231026090926-09378dd56587/go.mod h1:onFubXaIoY/2FTRVrLMqCTlaNq4SilAEwF/2G0IcaBw= +skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4 h1:3YIFmsshgsU6FzHgnkG9Z24CkXkgoexBN5O0aSzK79g= +skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4/go.mod h1:oD2dxcDAHVIt95Ee7kJHgZ5f64QNhrqTjQYARwfafc4= diff --git a/pkg/translator/skywalking/package_test.go b/pkg/translator/skywalking/package_test.go new file mode 100644 index 000000000000..29618215fee1 --- /dev/null +++ b/pkg/translator/skywalking/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package skywalking + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/translator/skywalking/skywalkingproto_to_traces.go b/pkg/translator/skywalking/skywalkingproto_to_traces.go index a0b88c9903f5..25bf85896119 100644 --- a/pkg/translator/skywalking/skywalkingproto_to_traces.go +++ b/pkg/translator/skywalking/skywalkingproto_to_traces.go @@ -6,7 +6,6 @@ package skywalking // import "github.com/open-telemetry/opentelemetry-collector- import ( "bytes" "encoding/hex" - "reflect" "strconv" "time" "unsafe" @@ -358,7 +357,5 @@ func uuidTo8Bytes(uuid [16]byte) [8]byte { } func unsafeGetBytes(s string) []byte { - return (*[0x7fff0000]byte)(unsafe.Pointer( - (*reflect.StringHeader)(unsafe.Pointer(&s)).Data), - )[:len(s):len(s)] + return (*[0x7fff0000]byte)(unsafe.Pointer(unsafe.StringData(s)))[:len(s):len(s)] } diff --git a/pkg/translator/skywalking/skywalkingproto_to_traces_test.go b/pkg/translator/skywalking/skywalkingproto_to_traces_test.go index ae33af85f5ce..1980a1423a3a 100644 --- a/pkg/translator/skywalking/skywalkingproto_to_traces_test.go +++ b/pkg/translator/skywalking/skywalkingproto_to_traces_test.go @@ -218,7 +218,7 @@ func Test_stringToTraceID_Unique(t *testing.T) { var results [2][16]byte for i := 0; i < 2; i++ { tt := tests[i] - t.Run(tt.name, func(t *testing.T) { + t.Run(tt.name, func(_ *testing.T) { got := swTraceIDToTraceID(tt.segmentObject.traceID) results[i] = got }) @@ -292,7 +292,7 @@ func Test_segmentIdToSpanId_Unique(t *testing.T) { var results [2][8]byte for i := 0; i < 2; i++ { tt := tests[i] - t.Run(tt.name, func(t *testing.T) { + t.Run(tt.name, func(_ *testing.T) { got := segmentIDToSpanID(tt.args.segmentID, tt.args.spanID) results[i] = got }) diff --git a/pkg/translator/zipkin/go.mod b/pkg/translator/zipkin/go.mod index aa1c435f8075..a35bcc485f75 100644 --- a/pkg/translator/zipkin/go.mod +++ b/pkg/translator/zipkin/go.mod @@ -1,39 +1,36 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin -go 1.20 +go 1.21 require ( - github.com/jaegertracing/jaeger v1.48.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 + github.com/jaegertracing/jaeger v1.55.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 github.com/openzipkin/zipkin-go v0.4.2 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/semconv v0.89.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.uber.org/goleak v1.3.0 ) require ( github.com/apache/thrift v0.19.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/atomic v1.11.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/translator/zipkin/go.sum b/pkg/translator/zipkin/go.sum index 8587f0afb91a..71eca65f8cbe 100644 --- a/pkg/translator/zipkin/go.sum +++ b/pkg/translator/zipkin/go.sum @@ -1,9 +1,9 @@ -github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= 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/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/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= @@ -11,53 +11,50 @@ 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/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/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/jaegertracing/jaeger v1.48.0 h1:YuKooQ7qJsjgxws9xuf8C/BLNTPx8qTAJz4wv7IHhSc= -github.com/jaegertracing/jaeger v1.48.0/go.mod h1:BoAPkdCAIEuLsVz/EDhjXd+GSVpHtJhiGqWoFEvBCKg= +github.com/jaegertracing/jaeger v1.55.0 h1:IJHzKb2B9EYQyKlE7VSoKzNP3emHeqZWnWrKj+kYzzs= +github.com/jaegertracing/jaeger v1.55.0/go.mod h1:S884Mz8H+iGI8Ealq6sM9QzSOeU6P+nbFkYw7uww8CI= 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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDOCg/jA= github.com/openzipkin/zipkin-go v0.4.2/go.mod h1:ZeVkFjuuBiSy13y8vpSDCjMi9GoI3hPpCJSBx/EYFhY= -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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +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/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -67,16 +64,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -89,15 +86,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/pkg/translator/zipkin/zipkinv1/package_test.go b/pkg/translator/zipkin/zipkinv1/package_test.go new file mode 100644 index 000000000000..ab28880f15a3 --- /dev/null +++ b/pkg/translator/zipkin/zipkinv1/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package zipkinv1 + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/translator/zipkin/zipkinv2/package_test.go b/pkg/translator/zipkin/zipkinv2/package_test.go new file mode 100644 index 000000000000..3eede0ff7900 --- /dev/null +++ b/pkg/translator/zipkin/zipkinv2/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package zipkinv2 + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/winperfcounters/go.mod b/pkg/winperfcounters/go.mod index 51c43a3418df..5fed7a4e3c64 100644 --- a/pkg/winperfcounters/go.mod +++ b/pkg/winperfcounters/go.mod @@ -1,10 +1,11 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - golang.org/x/sys v0.14.0 + github.com/stretchr/testify v1.9.0 + go.uber.org/goleak v1.3.0 + golang.org/x/sys v0.18.0 ) require ( diff --git a/pkg/winperfcounters/go.sum b/pkg/winperfcounters/go.sum index 4dba1b08e0e1..fc79abbcc3fd 100644 --- a/pkg/winperfcounters/go.sum +++ b/pkg/winperfcounters/go.sum @@ -14,10 +14,12 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.2 h1:aIihoIOHCiLZHxyoNQ+ABL4NKhFTgKLBdMLyEAh98m0= github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/kernel32.go b/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/kernel32.go index 1939d308aa4c..34a53a067150 100644 --- a/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/kernel32.go +++ b/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/kernel32.go @@ -29,7 +29,6 @@ // Kevin Pors //go:build windows -// +build windows package win_perf_counters // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters" diff --git a/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/pdh.go b/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/pdh.go index 15032fffc2c9..d7ec07fc584e 100644 --- a/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/pdh.go +++ b/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/pdh.go @@ -29,7 +29,6 @@ // Kevin Pors //go:build windows -// +build windows package win_perf_counters // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters" diff --git a/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/pdh_386.go b/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/pdh_386.go index 58006d368551..8967fd62f9b9 100644 --- a/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/pdh_386.go +++ b/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/pdh_386.go @@ -29,7 +29,6 @@ // Kevin Pors //go:build windows -// +build windows package win_perf_counters // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters" diff --git a/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/pdh_amd64.go b/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/pdh_amd64.go index e0bc9c1baf71..2c2599880e65 100644 --- a/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/pdh_amd64.go +++ b/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/pdh_amd64.go @@ -29,7 +29,6 @@ // Kevin Pors //go:build windows -// +build windows package win_perf_counters // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters" diff --git a/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/performance_query.go b/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/performance_query.go index b0902fc09704..2b094737e862 100644 --- a/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/performance_query.go +++ b/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/performance_query.go @@ -1,6 +1,5 @@ // Go API over pdh syscalls //go:build windows -// +build windows package win_perf_counters // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters" diff --git a/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/performance_query_test.go b/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/performance_query_test.go index 426397a13cfe..b447e3812e8b 100644 --- a/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/performance_query_test.go +++ b/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/performance_query_test.go @@ -1,5 +1,4 @@ //go:build windows -// +build windows package win_perf_counters diff --git a/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/win_perf_counters_notwindows.go b/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/win_perf_counters_notwindows.go index 06f67281a9bc..bdc8403baeb1 100644 --- a/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/win_perf_counters_notwindows.go +++ b/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters/win_perf_counters_notwindows.go @@ -1,4 +1,3 @@ //go:build !windows -// +build !windows package win_perf_counters // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters/internal/third_party/telegraf/win_perf_counters" diff --git a/pkg/winperfcounters/package_test.go b/pkg/winperfcounters/package_test.go new file mode 100644 index 000000000000..8bf0180b6745 --- /dev/null +++ b/pkg/winperfcounters/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package winperfcounters + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pkg/winperfcounters/watcher.go b/pkg/winperfcounters/watcher.go index 727d35ccd30c..16b1bfb02576 100644 --- a/pkg/winperfcounters/watcher.go +++ b/pkg/winperfcounters/watcher.go @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package winperfcounters // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters" import ( + "errors" "fmt" "time" @@ -104,8 +104,8 @@ func (pc *perfCounter) Path() string { func (pc *perfCounter) ScrapeData() ([]CounterValue, error) { if err := pc.query.CollectData(); err != nil { - pdhErr, ok := err.(*win_perf_counters.PdhError) - if !ok || pdhErr.ErrorCode != win_perf_counters.PDH_CALC_NEGATIVE_DENOMINATOR { + var pdhErr *win_perf_counters.PdhError + if !errors.As(err, &pdhErr) || pdhErr.ErrorCode != win_perf_counters.PDH_CALC_NEGATIVE_DENOMINATOR { return nil, fmt.Errorf("failed to collect data for performance counter '%s': %w", pc.path, err) } diff --git a/pkg/winperfcounters/watcher_test.go b/pkg/winperfcounters/watcher_test.go index f4f6bf679bbe..186bf519400f 100644 --- a/pkg/winperfcounters/watcher_test.go +++ b/pkg/winperfcounters/watcher_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package winperfcounters // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters" diff --git a/pkg/winperfcounters/win_perf_counters_notwindows.go b/pkg/winperfcounters/win_perf_counters_notwindows.go index 290198142782..84a2b1dacbfd 100644 --- a/pkg/winperfcounters/win_perf_counters_notwindows.go +++ b/pkg/winperfcounters/win_perf_counters_notwindows.go @@ -2,6 +2,5 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !windows -// +build !windows package winperfcounters // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters" diff --git a/processor/attributesprocessor/README.md b/processor/attributesprocessor/README.md index de7b504b3361..eaa312a98710 100644 --- a/processor/attributesprocessor/README.md +++ b/processor/attributesprocessor/README.md @@ -4,7 +4,7 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces, metrics, logs | -| Distributions | [core], [contrib], [aws], [grafana], [observiq], [redhat], [splunk], [sumo] | +| Distributions | [core], [contrib] | | Warnings | [Identity Conflict](#warnings) | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Fattributes%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Fattributes) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Fattributes%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Fattributes) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@boostchicken](https://www.github.com/boostchicken) | @@ -12,12 +12,6 @@ [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[grafana]: https://github.com/grafana/agent -[observiq]: https://github.com/observIQ/observiq-otel-collector -[redhat]: https://github.com/os-observability/redhat-opentelemetry-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector The attributes processor modifies attributes of a span, log, or metric. Please refer to @@ -213,8 +207,8 @@ attributes: # It is supported to have more than one specified, but all of the specified # conditions must evaluate to true for a match to occur. - # match_type controls how items in "services" and "span_names" arrays are - # interpreted. Possible values are "regexp" or "strict". + # match_type controls how items in "services", "span_names", and "attributes" + # arrays are interpreted. Possible values are "regexp" or "strict". # This is a required field. match_type: {strict, regexp} @@ -284,12 +278,12 @@ attributes: metric_names: [, ..., ] # Attributes specifies the list of attributes to match against. - # All of these attributes must match exactly for a match to occur. + # All of these attributes must match for a match to occur. # This is an optional field. attributes: # Key specifies the attribute to match against. - key: - # Value specifies the exact value to match against. + # Value specifies the value to match against. # If not specified, a match occurs if the key is present in the attributes. value: {value} ``` diff --git a/processor/attributesprocessor/attributes_log_test.go b/processor/attributesprocessor/attributes_log_test.go index db6e0d705347..cab02f936e5d 100644 --- a/processor/attributesprocessor/attributes_log_test.go +++ b/processor/attributesprocessor/attributes_log_test.go @@ -82,7 +82,7 @@ func TestLogProcessor_NilEmptyData(t *testing.T) { tp, err := factory.CreateLogsProcessor( context.Background(), processortest.NewNopCreateSettings(), oCfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, tp) for i := range testCases { tt := testCases[i] @@ -209,7 +209,7 @@ func TestAttributes_FilterLogsByNameStrict(t *testing.T) { Config: *createConfig(filterset.Strict), } tp, err := factory.CreateLogsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, tp) for _, tt := range testCases { @@ -272,7 +272,7 @@ func TestAttributes_FilterLogsByNameRegexp(t *testing.T) { Config: *createConfig(filterset.Regexp), } tp, err := factory.CreateLogsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, tp) for _, tt := range testCases { @@ -331,7 +331,7 @@ func TestLogAttributes_Hash(t *testing.T) { } tp, err := factory.CreateLogsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, tp) for _, tt := range testCases { @@ -407,7 +407,7 @@ func TestLogAttributes_Convert(t *testing.T) { } tp, err := factory.CreateLogsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, tp) for _, tt := range testCases { diff --git a/processor/attributesprocessor/attributes_metric_test.go b/processor/attributesprocessor/attributes_metric_test.go index 6c9f4b1171b2..3fc5f7f09d98 100644 --- a/processor/attributesprocessor/attributes_metric_test.go +++ b/processor/attributesprocessor/attributes_metric_test.go @@ -89,7 +89,7 @@ func TestMetricProcessor_NilEmptyData(t *testing.T) { } mp, err := factory.CreateMetricsProcessor(context.Background(), processortest.NewNopCreateSettings(), oCfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, mp) for i := range metricTestCases { tc := metricTestCases[i] @@ -217,7 +217,7 @@ func TestAttributes_FilterMetricsByNameStrict(t *testing.T) { Config: *createConfig(filterset.Strict), } mp, err := factory.CreateMetricsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, mp) for _, tc := range testCases { @@ -281,7 +281,7 @@ func TestAttributes_FilterMetricsByNameRegexp(t *testing.T) { Config: *createConfig(filterset.Regexp), } mp, err := factory.CreateMetricsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, mp) for _, tc := range testCases { @@ -340,7 +340,7 @@ func TestMetricAttributes_Hash(t *testing.T) { } mp, err := factory.CreateMetricsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, mp) for _, tc := range testCases { @@ -397,7 +397,7 @@ func TestMetricAttributes_Convert(t *testing.T) { } tp, err := factory.CreateMetricsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, tp) for _, tt := range testCases { diff --git a/processor/attributesprocessor/attributes_trace_test.go b/processor/attributesprocessor/attributes_trace_test.go index 7f92ff497c32..9ab14590fc6b 100644 --- a/processor/attributesprocessor/attributes_trace_test.go +++ b/processor/attributesprocessor/attributes_trace_test.go @@ -91,7 +91,7 @@ func TestSpanProcessor_NilEmptyData(t *testing.T) { } tp, err := factory.CreateTracesProcessor(context.Background(), processortest.NewNopCreateSettings(), oCfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, tp) for i := range testCases { tt := testCases[i] @@ -158,7 +158,7 @@ func TestAttributes_FilterSpans(t *testing.T) { Config: *createConfig(filterset.Strict), } tp, err := factory.CreateTracesProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, tp) for _, tt := range testCases { @@ -226,7 +226,7 @@ func TestAttributes_FilterSpansByNameStrict(t *testing.T) { Config: *createConfig(filterset.Strict), } tp, err := factory.CreateTracesProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, tp) for _, tt := range testCases { @@ -294,7 +294,7 @@ func TestAttributes_FilterSpansByNameRegexp(t *testing.T) { Config: *createConfig(filterset.Regexp), } tp, err := factory.CreateTracesProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, tp) for _, tt := range testCases { @@ -353,7 +353,7 @@ func TestAttributes_Hash(t *testing.T) { } tp, err := factory.CreateTracesProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, tp) for _, tt := range testCases { @@ -456,7 +456,7 @@ func TestAttributes_Convert(t *testing.T) { } tp, err := factory.CreateTracesProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, tp) for _, tt := range testCases { diff --git a/processor/attributesprocessor/factory_test.go b/processor/attributesprocessor/factory_test.go index 5bb5d0327490..193f2217c02f 100644 --- a/processor/attributesprocessor/factory_test.go +++ b/processor/attributesprocessor/factory_test.go @@ -20,7 +20,7 @@ import ( func TestFactory_Type(t *testing.T) { factory := NewFactory() - assert.Equal(t, factory.Type(), component.Type(metadata.Type)) + assert.Equal(t, factory.Type(), metadata.Type) } func TestFactory_CreateDefaultConfig(t *testing.T) { @@ -69,10 +69,6 @@ func TestFactoryCreateTracesProcessor(t *testing.T) { assert.NotNil(t, tp) assert.NoError(t, err) - tp, err = factory.CreateTracesProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, nil) - assert.Nil(t, tp) - assert.Error(t, err) - oCfg.Actions = []attraction.ActionKeyValue{ {Action: attraction.DELETE}, } @@ -92,10 +88,6 @@ func TestFactory_CreateMetricsProcessor(t *testing.T) { require.NotNil(t, mp) require.NoError(t, err) - mp, err = factory.CreateMetricsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, nil) - require.Nil(t, mp) - require.Error(t, err) - cfg.(*Config).Actions = []attraction.ActionKeyValue{ {Key: "fake_key", Action: attraction.UPSERT}, } @@ -132,11 +124,6 @@ func TestFactoryCreateLogsProcessor(t *testing.T) { assert.NotNil(t, tp) assert.NoError(t, err) - tp, err = factory.CreateLogsProcessor( - context.Background(), processortest.NewNopCreateSettings(), cfg, nil) - assert.Nil(t, tp) - assert.Error(t, err) - oCfg.Actions = []attraction.ActionKeyValue{ {Action: attraction.DELETE}, } diff --git a/processor/attributesprocessor/generated_component_test.go b/processor/attributesprocessor/generated_component_test.go new file mode 100644 index 000000000000..c387486d4c13 --- /dev/null +++ b/processor/attributesprocessor/generated_component_test.go @@ -0,0 +1,141 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package attributesprocessor + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "metrics", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesProcessor(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(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/processor/attributesprocessor/go.mod b/processor/attributesprocessor/go.mod index ad73ee6ec9fb..7f44e4ff07c9 100644 --- a/processor/attributesprocessor/go.mod +++ b/processor/attributesprocessor/go.mod @@ -1,60 +1,71 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/processor v0.89.0 - go.opentelemetry.io/collector/semconv v0.89.0 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/alecthomas/participle/v2 v2.1.0 // indirect - github.com/antonmedv/expr v1.15.3 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/expr-lang/expr v1.16.3 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gobwas/glob v0.2.3 // 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.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/iancoleman/strcase v0.3.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/processor/attributesprocessor/go.sum b/processor/attributesprocessor/go.sum index db935fd9b63b..50f3bdddb963 100644 --- a/processor/attributesprocessor/go.sum +++ b/processor/attributesprocessor/go.sum @@ -1,65 +1,44 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= -github.com/alecthomas/participle/v2 v2.1.0 h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4= -github.com/alecthomas/participle/v2 v2.1.0/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/expr-lang/expr v1.16.3 h1:NLldf786GffptcXNxxJx5dQ+FzeWDKChBDqOOwyK8to= +github.com/expr-lang/expr v1.16.3/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= 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/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.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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -70,15 +49,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -88,101 +66,86 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -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/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -190,38 +153,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/attributesprocessor/internal/metadata/generated_status.go b/processor/attributesprocessor/internal/metadata/generated_status.go index c58df00f609a..902bf6d3ff64 100644 --- a/processor/attributesprocessor/internal/metadata/generated_status.go +++ b/processor/attributesprocessor/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("attributes") ) const ( - Type = "attributes" TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/attributes") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/attributes") +} diff --git a/processor/attributesprocessor/metadata.yaml b/processor/attributesprocessor/metadata.yaml index b01c93d57a5d..cd2e5bfb3ef6 100644 --- a/processor/attributesprocessor/metadata.yaml +++ b/processor/attributesprocessor/metadata.yaml @@ -1,4 +1,5 @@ type: attributes +scope_name: otelcol/attributes status: class: processor @@ -7,12 +8,12 @@ status: distributions: - core - contrib - - aws - - grafana - - observiq - - redhat - - splunk - - sumo warnings: [Identity Conflict] codeowners: active: [boostchicken] +tests: + config: + actions: + - key: attribute1 + value: 123 + action: insert diff --git a/processor/attributesprocessor/package_test.go b/processor/attributesprocessor/package_test.go new file mode 100644 index 000000000000..fbaef1cb7fbc --- /dev/null +++ b/processor/attributesprocessor/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package attributesprocessor + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/processor/cumulativetodeltaprocessor/README.md b/processor/cumulativetodeltaprocessor/README.md index fa0cf7b6e05d..4079e00561f8 100644 --- a/processor/cumulativetodeltaprocessor/README.md +++ b/processor/cumulativetodeltaprocessor/README.md @@ -3,16 +3,13 @@ | Status | | | ------------- |-----------| | Stability | [beta]: metrics | -| Distributions | [contrib], [aws], [observiq], [sumo] | +| Distributions | [contrib] | | Warnings | [Statefulness](#warnings) | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Fcumulativetodelta%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Fcumulativetodelta) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Fcumulativetodelta%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Fcumulativetodelta) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@TylerHelmuth](https://www.github.com/TylerHelmuth) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector ## Description @@ -67,7 +64,7 @@ processors: # if and only if 'metric' is in the name include: metrics: - - "*metric*" + - ".*metric.*" match_type: regexp ``` @@ -80,7 +77,7 @@ processors: # if and only if 'metric' is not in the name exclude: metrics: - - "*metric*" + - ".*metric.*" match_type: regexp ``` diff --git a/processor/cumulativetodeltaprocessor/factory_test.go b/processor/cumulativetodeltaprocessor/factory_test.go index 1a5fc624d80d..01cd92a35474 100644 --- a/processor/cumulativetodeltaprocessor/factory_test.go +++ b/processor/cumulativetodeltaprocessor/factory_test.go @@ -15,12 +15,14 @@ import ( "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/processor/processortest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor/internal/metadata" ) func TestType(t *testing.T) { factory := NewFactory() pType := factory.Type() - assert.Equal(t, pType, component.Type("cumulativetodelta")) + assert.Equal(t, pType, metadata.Type) } func TestCreateDefaultConfig(t *testing.T) { @@ -62,6 +64,7 @@ func TestCreateProcessors(t *testing.T) { consumertest.NewNop()) assert.NotNil(t, mp) assert.NoError(t, mErr) + assert.NoError(t, mp.Shutdown(context.Background())) }) } } diff --git a/processor/cumulativetodeltaprocessor/generated_component_test.go b/processor/cumulativetodeltaprocessor/generated_component_test.go new file mode 100644 index 000000000000..2aeec505d542 --- /dev/null +++ b/processor/cumulativetodeltaprocessor/generated_component_test.go @@ -0,0 +1,127 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package cumulativetodeltaprocessor + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "metrics", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsProcessor(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(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/processor/cumulativetodeltaprocessor/go.mod b/processor/cumulativetodeltaprocessor/go.mod index 68c3ed78623d..3a1386d2291d 100644 --- a/processor/cumulativetodeltaprocessor/go.mod +++ b/processor/cumulativetodeltaprocessor/go.mod @@ -1,50 +1,60 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/processor v0.89.0 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/processor/cumulativetodeltaprocessor/go.sum b/processor/cumulativetodeltaprocessor/go.sum index 1a777bd39901..67f4dfe27428 100644 --- a/processor/cumulativetodeltaprocessor/go.sum +++ b/processor/cumulativetodeltaprocessor/go.sum @@ -1,54 +1,30 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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/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.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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= 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= @@ -57,15 +33,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -75,97 +50,80 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -173,38 +131,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/cumulativetodeltaprocessor/internal/metadata/generated_status.go b/processor/cumulativetodeltaprocessor/internal/metadata/generated_status.go index 02f7c11ae467..dc6c993c40e2 100644 --- a/processor/cumulativetodeltaprocessor/internal/metadata/generated_status.go +++ b/processor/cumulativetodeltaprocessor/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("cumulativetodelta") ) const ( - Type = "cumulativetodelta" MetricsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/cumulativetodelta") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/cumulativetodelta") +} diff --git a/processor/cumulativetodeltaprocessor/internal/tracking/package_test.go b/processor/cumulativetodeltaprocessor/internal/tracking/package_test.go new file mode 100644 index 000000000000..44dcc0ba11f8 --- /dev/null +++ b/processor/cumulativetodeltaprocessor/internal/tracking/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package tracking + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/processor/cumulativetodeltaprocessor/metadata.yaml b/processor/cumulativetodeltaprocessor/metadata.yaml index 271bf37805c7..b5ca69f191ef 100644 --- a/processor/cumulativetodeltaprocessor/metadata.yaml +++ b/processor/cumulativetodeltaprocessor/metadata.yaml @@ -1,10 +1,13 @@ type: cumulativetodelta +scope_name: otelcol/cumulativetodelta status: class: processor stability: beta: [metrics] - distributions: [contrib, observiq, sumo, aws] + distributions: [contrib] warnings: [Statefulness] codeowners: - active: [TylerHelmuth] \ No newline at end of file + active: [TylerHelmuth] +tests: + config: diff --git a/processor/cumulativetodeltaprocessor/package_test.go b/processor/cumulativetodeltaprocessor/package_test.go new file mode 100644 index 000000000000..dd3df47d6b82 --- /dev/null +++ b/processor/cumulativetodeltaprocessor/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package cumulativetodeltaprocessor + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/processor/cumulativetodeltaprocessor/processor_test.go b/processor/cumulativetodeltaprocessor/processor_test.go index ac96bdc21c00..9656aa7346a0 100644 --- a/processor/cumulativetodeltaprocessor/processor_test.go +++ b/processor/cumulativetodeltaprocessor/processor_test.go @@ -454,7 +454,7 @@ func TestCumulativeToDeltaProcessor(t *testing.T) { next, ) assert.NotNil(t, mgp) - assert.Nil(t, err) + assert.NoError(t, err) caps := mgp.Capabilities() assert.True(t, caps.MutatesData) diff --git a/processor/datadogprocessor/README.md b/processor/datadogprocessor/README.md deleted file mode 100644 index 6f3693d0a30f..000000000000 --- a/processor/datadogprocessor/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# Datadog Processor - -| Status | | -| ------------- |-----------| -| Stability | [deprecated]: traces | -| Distributions | [contrib] | -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Fdatadog%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Fdatadog) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Fdatadog%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Fdatadog) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@mx-psi](https://www.github.com/mx-psi), [@gbbr](https://www.github.com/gbbr), [@dineshg13](https://www.github.com/dineshg13) | - -[deprecated]: https://github.com/open-telemetry/opentelemetry-collector#deprecated -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib - - -## Deprecated in favor of datadogconnector - -The `datadogprocessor` has been deprecated in favor of the `datadogconnector`. Please refer to the [following docs](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/connector/datadogconnector/README.md#usage) in order to update to the `datadogconnector`. - -## Description - - -This component has been deprecated in favor of its successor the [Datadog Connector](../../connector/datadogconnector/README.md) which serves the same purpose and should be used in place of the Datadog processor. - -The Datadog Processor can be used to compute Datadog APM Stats pre-sampling. For example, when using the [tailsamplingprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/tailsamplingprocessor#tail-sampling-processor) or [probabilisticsamplerprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/probabilisticsamplerprocessor) components, the `datadogprocessor` can be prepended into the pipeline to ensure that Datadog APM Stats are accurate and include the dropped traces. - -## Usage - -To use the Datadog Processor, simply prepend it into a pipeline before any sampling processor. The Datadog Processor will compute APM Stats on all spans that it sees. Here is an example on how to add it to a pipeline using the [probabilisticsampler](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/probabilisticsamplerprocessor): - - - - - - -
Before After
- -```yaml -# ... -processors: - # ... - probabilistic_sampler: - sampling_percentage: 20 - -exporters: - datadog: - api: - key: ${env:DD_API_KEY} - -service: - pipelines: - metrics: - receivers: [otlp] - processors: [batch] - exporters: [datadog] - traces: - receivers: [otlp] - processors: [batch, probabilistic_sampler] - exporters: [datadog] -``` - - - -```yaml -# ... -processors: - # ... - probabilistic_sampler: - sampling_percentage: 20 - # add the "datadog" processor definition - datadog: - -exporters: - datadog: - api: - key: ${env:DD_API_KEY} - -service: - pipelines: - metrics: - receivers: [otlp] - processors: [batch] - exporters: [datadog] - traces: - receivers: [otlp] - # prepend it to the sampler in your pipeline: - processors: [batch, datadog, probabilistic_sampler] - exporters: [datadog] -``` - -
- -Simply add the Datadog Processor into your list of processors and prepend it to the sampler in the traces pipeline to ensure it sees all spans. - -## Configuration - -By default, when used in conjunction with the Datadog Exporter, the processor should detect its presence (as long as it is configured within a pipeline), and use it to export the Datadog APM Stats. No configuration needed! - -If using within a gateway deployment or running alongside the Datadog Agent where the Datadog Exporter is not present, then you must specify an alternative exporter to use, such as for example an OTLP exporter: - -```yaml -processors: - datadog: - metrics_exporter: otlp -``` - -The default value for `metrics_exporter` is `datadog`. If your Datadog Exporter has a different name, you must specify it via config. Any configured metrics exporter must exist as part of a metrics pipeline. - -When using in conjunction with the Datadog Agent's OTLP Ingest, the minimum required Datadog Agent version that supports this processor is 7.42.0. - -If not using the Datadog backend, the processor will still create valid RED metrics, but in that situation you may prefer to use the [spanmetricsprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/spanmetricsprocessor) instead. diff --git a/processor/datadogprocessor/config.go b/processor/datadogprocessor/config.go deleted file mode 100644 index f28e7299bafe..000000000000 --- a/processor/datadogprocessor/config.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package datadogprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor" - -import ( - "go.opentelemetry.io/collector/component" -) - -// Config defines the configuration options for datadogprocessor. -type Config struct { - - // MetricsExporter specifies the name of the metrics exporter to be used when - // exporting stats metrics. - MetricsExporter component.ID `mapstructure:"metrics_exporter"` -} - -func createDefaultConfig() component.Config { - return &Config{ - MetricsExporter: datadogComponent, - } -} - -// datadogComponent defines the default component that will be used for -// exporting metrics. -var datadogComponent = component.NewID(component.Type("datadog")) diff --git a/processor/datadogprocessor/doc.go b/processor/datadogprocessor/doc.go deleted file mode 100644 index c223bdf9e1cf..000000000000 --- a/processor/datadogprocessor/doc.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:generate mdatagen metadata.yaml - -// Package datadogprocessor contains the Datadog Processor. The Datadog Processor is used in -// conjunction with the Collector's tail samplers (such as the tailsamplingprocessor or the -// probabilisticsamplerprocessor) to extract accurate APM Stats in situations when not all -// traces are seen by the Datadog Exporter. -// -// By default, the processor looks for an exporter named "datadog" in a metrics pipeline. -// It can use any other exporter (in case the name is different, a gateway deployment is used -// or the collector runs alongside the Datadog Agent) but this needs to be specified via config, -// such as for example: -// -// processor: -// datadog: -// metrics_exporter: otlp -package datadogprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor" diff --git a/processor/datadogprocessor/factory.go b/processor/datadogprocessor/factory.go deleted file mode 100644 index d5bbbcceddb9..000000000000 --- a/processor/datadogprocessor/factory.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package datadogprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor" - -import ( - "context" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/processor" - - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor/internal/metadata" -) - -// NewFactory creates a factory for the datadog processor. -func NewFactory() processor.Factory { - return processor.NewFactory( - metadata.Type, - createDefaultConfig, - processor.WithTraces(createTracesProcessor, metadata.TracesStability), - ) -} - -func createTracesProcessor(ctx context.Context, params processor.CreateSettings, cfg component.Config, nextConsumer consumer.Traces) (processor.Traces, error) { - return newProcessor(ctx, params.Logger, cfg, nextConsumer) -} diff --git a/processor/datadogprocessor/go.mod b/processor/datadogprocessor/go.mod deleted file mode 100644 index 853bdacd3aef..000000000000 --- a/processor/datadogprocessor/go.mod +++ /dev/null @@ -1,104 +0,0 @@ -// Deprecated: Use Datadog connector instead. -module github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor - -go 1.20 - -require ( - github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 - github.com/DataDog/sketches-go v1.4.3 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/exporter v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/processor v0.89.0 - go.uber.org/zap v1.26.0 - google.golang.org/protobuf v1.31.0 -) - -require ( - github.com/DataDog/datadog-agent/pkg/obfuscate v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231030140030-aa8a206e6ac7 // indirect - github.com/DataDog/datadog-agent/pkg/util/cgroups v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.49.0-rc.2 // indirect - github.com/DataDog/datadog-go/v5 v5.1.1 // indirect - github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect - github.com/containerd/cgroups/v3 v3.0.2 // indirect - github.com/coreos/go-systemd/v22 v22.5.0 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/docker/go-units v0.5.0 // indirect - github.com/dustin/go-humanize v1.0.1 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect - github.com/godbus/dbus/v5 v5.0.6 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.4.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/karrick/godirwalk v1.17.0 // 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-20220913051719-115f729f3c8c // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/opencontainers/runtime-spec v1.1.0-rc.3 // indirect - github.com/outcaste-io/ristretto v0.2.1 // indirect - github.com/patrickmn/go-cache v2.1.0+incompatible // indirect - github.com/philhofer/fwd v1.1.2 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect - github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect - github.com/shirou/gopsutil/v3 v3.23.10 // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect - github.com/tinylib/msgp v1.1.9 // 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.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.uber.org/atomic v1.11.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.15.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) - -// It appears that the v0.2.0 tag was modified. Replacing with v0.2.1 -replace github.com/outcaste-io/ristretto v0.2.0 => github.com/outcaste-io/ristretto v0.2.1 - -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog => ../../internal/datadog - -retract ( - v0.76.2 - v0.76.1 -) diff --git a/processor/datadogprocessor/go.sum b/processor/datadogprocessor/go.sum deleted file mode 100644 index b9bdf7181f4c..000000000000 --- a/processor/datadogprocessor/go.sum +++ /dev/null @@ -1,267 +0,0 @@ -github.com/DataDog/datadog-agent/pkg/obfuscate v0.49.0-rc.2 h1:Y56sdsJotnJmxTzyHvADM2/0VpWzonQrSAeIjHCqk+s= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.49.0-rc.2/go.mod h1:HzySONXnAgSmIQfL6gOv9hWprKJkx8CicuXuUbmgWfo= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel h1:lGJKaJlKDbycF6jItLw8ONN8GX3dkN6S+95AvDfGF+s= -github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel/go.mod h1:A4qG1PwNPYcM391xyksJ47ZZjknSAQVvNdXAXsrR+N0= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.49.0-rc.2 h1:MXrLVVauNLDQnJ0TTY35L1rtKv7YnNU3zl8wtE5sI9g= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.49.0-rc.2/go.mod h1:Vc+snp0Bey4MrrJyiV2tVxxJb6BmLomPvN1RgAvjGaQ= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231030140030-aa8a206e6ac7 h1:ciOBHpTSHrFy/xn/+ana53F3cvPdhR3JGuoHeGa6r+4= -github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231030140030-aa8a206e6ac7/go.mod h1:x6SswkmUaSmjAhSPUeVixs/Czr0w9Y5324Anoa6V+xE= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.49.0-rc.2 h1:X3nPQuiTkBVWaBGLb9oEycHhSzMJsgRcb3VNoxlGyYM= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.49.0-rc.2/go.mod h1:hVKZ+BweMQiL/dOCPvSPH/66vDSd3A3IeWQPuExkZw0= -github.com/DataDog/datadog-agent/pkg/util/log v0.49.0-rc.2 h1:64AGy6AuNW/7uW+ix55S1iFqadpzLDHYk5LtbHCeSJc= -github.com/DataDog/datadog-agent/pkg/util/log v0.49.0-rc.2/go.mod h1:RvGVny6LcLD0F9/N5OnxPoXKE8GwFtAKCD/viDv0Jw8= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.49.0-rc.2 h1:Z4PwDkI/ML5spAbG1aXbPkWiJ4T4XD2pQqKgfSy/rb8= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.49.0-rc.2/go.mod h1:eTXti9mx7qhkoi+Qg3mMmvVY5McghUUgsf4Hrk9zY8k= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.49.0-rc.2 h1:SQ6pGb8ppcTnCKoTuaCfZpAhMlTWhEqdIQiVL1Jgpnk= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.49.0-rc.2/go.mod h1:EOGgNrSPskIxY3+KgCl+yEggMjrGqrA2oL5va+/p2jM= -github.com/DataDog/datadog-go/v5 v5.1.1 h1:JLZ6s2K1pG2h9GkvEvMdEGqMDyVLEAccdX5TltWcLMU= -github.com/DataDog/datadog-go/v5 v5.1.1/go.mod h1:KhiYb2Badlv9/rofz+OznKoEF5XKTonWyhx5K83AP8E= -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.8.1 h1:0GyngySyxePf1RozAdm8p51uxT/kDsxqhzWPZGNrqVg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1 h1:ly/egks++IqejMVPcp0OWV1fcL+Nsq4EHF48AAQPKu4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.1/go.mod h1:8jOAAH5PrNN6zICpu65M7mNPAeOQsW5Wk/sq80txutA= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1 h1:TbZDzUrW8iahevDY5Xw+j1EfrX8XZdeg/M6UYBl9mxg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.1/go.mod h1:nVIKiAwP/Zd8IFxeHhEAiirJRH1kOOoZ315HQeSEkng= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 h1:4cyzwoXrnjElTIlsFbpyXQkAJs3+6ly9HExOu9lrup4= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1/go.mod h1:3AEt8/uCtbpzjPOPPxIBDcR1qcUq2hBbrkrdE/qNfb0= -github.com/DataDog/sketches-go v1.4.3 h1:ZB9nijteJRFUQixkQfatCqASartGNfiolIlMiEv3u/w= -github.com/DataDog/sketches-go v1.4.3/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= -github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -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/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1c8PVE1PubbNx3mjUr09OqWGCs= -github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= -github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0= -github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= -github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -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/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= -github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= -github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -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/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= -github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -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/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/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/karrick/godirwalk v1.17.0 h1:b4kY7nqDdioR/6qnbHQyDvmA17u5G1cZ6J+CZXwSWoI= -github.com/karrick/godirwalk v1.17.0/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/knadh/koanf/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/lightstep/go-expohisto v1.0.0 h1:UPtTS1rGdtehbbAF7o/dhkWLTDI73UifG8LbfQI7cA4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c h1:VtwQ41oftZwlMnOEbMWQtSEUgU64U4s+GHk7hZK+jtY= -github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE= -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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/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= -github.com/outcaste-io/ristretto v0.2.1/go.mod h1:W8HywhmtlopSB1jeMg3JtdIhf+DYkLAr0VN/s4+MHac= -github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= -github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= -github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c h1:NRoLoZvkBTKvR5gQLgA3e0hqjkY9u1wm+iOL45VN/qI= -github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= -github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= -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/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -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/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU= -github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k= -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/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= -github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/exporter v0.89.0 h1:8sYpJdKDQ2RuYOPKDsMz/lMJqp4WEWZgfJzyn9IgOag= -go.opentelemetry.io/collector/exporter v0.89.0/go.mod h1:zR8PFXMHlG0qPIEdRPNaefxDNj4UVP47uJ4vbHs+YME= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -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.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/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-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-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -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-20191026070338-33540a1f6037/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-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -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.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.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/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -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.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= -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/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/apimachinery v0.25.5 h1:SQomYHvv+aO43qdu3QKRf9YuI0oI8w3RrOQ1qPbAUGY= diff --git a/processor/datadogprocessor/internal/metadata/generated_status.go b/processor/datadogprocessor/internal/metadata/generated_status.go deleted file mode 100644 index be67fe78208d..000000000000 --- a/processor/datadogprocessor/internal/metadata/generated_status.go +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/collector/component" -) - -const ( - Type = "datadog" - TracesStability = component.StabilityLevelDeprecated -) diff --git a/processor/datadogprocessor/metadata.yaml b/processor/datadogprocessor/metadata.yaml deleted file mode 100644 index 80ff82696738..000000000000 --- a/processor/datadogprocessor/metadata.yaml +++ /dev/null @@ -1,9 +0,0 @@ -type: datadog - -status: - class: processor - stability: - deprecated: [traces] - distributions: [contrib] - codeowners: - active: [mx-psi, gbbr, dineshg13] \ No newline at end of file diff --git a/processor/datadogprocessor/processor.go b/processor/datadogprocessor/processor.go deleted file mode 100644 index 5ace04936c86..000000000000 --- a/processor/datadogprocessor/processor.go +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package datadogprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor" - -import ( - "context" - "fmt" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/pdata/ptrace" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog" -) - -type datadogProcessor struct { - logger *zap.Logger - nextConsumer consumer.Traces - cfg *Config - started bool - - // metricsExporter specifies the metrics exporter used to exporter APM Stats - // as metrics through - metricsExporter exporter.Metrics - - // agent specifies the agent used to ingest traces and output APM Stats. - // It is implemented by the traceagent structure; replaced in tests. - agent datadog.Ingester - - // translator specifies the translator used to transform APM Stats Payloads - // from the agent to OTLP Metrics. - translator *metrics.Translator - - // in specifies the channel through which the agent will output Stats Payloads - // resulting from ingested traces. - in chan *pb.StatsPayload - - // exit specifies the exit channel, which will be closed upon shutdown. - exit chan struct{} -} - -func newProcessor(ctx context.Context, logger *zap.Logger, config component.Config, nextConsumer consumer.Traces) (*datadogProcessor, error) { - cfg := config.(*Config) - in := make(chan *pb.StatsPayload, 100) - trans, err := metrics.NewTranslator(logger) - if err != nil { - return nil, err - } - logger.Warn( - "The datadogprocessor has been deprecated in favor of the datadogconnector", - zap.String( - "documentation", - "https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/datadogprocessor/README.md#deprecated-in-favor-of-datadogconnector", - ), - ) - return &datadogProcessor{ - logger: logger, - nextConsumer: nextConsumer, - agent: datadog.NewAgent(ctx, in), - translator: trans, - in: in, - cfg: cfg, - exit: make(chan struct{}), - }, nil -} - -// Start implements the component.Component interface. -func (p *datadogProcessor) Start(_ context.Context, host component.Host) error { - var datadogs []exporter.Metrics -loop: - for k, exp := range host.GetExporters()[component.DataTypeMetrics] { //nolint:staticcheck - mexp, ok := exp.(exporter.Metrics) - if !ok { - return fmt.Errorf("the exporter %q isn't a metrics exporter", k.String()) - } - switch p.cfg.MetricsExporter { - case k: - // we found exactly the configured metrics exporter - p.metricsExporter = mexp - break loop - case datadogComponent: - // we are looking for the default "datadog" component - if k.Type() == datadogComponent.Type() { - // and k has the type, but not the name, so it's not an exact match. Store - // it for later; if we discover that k was the only Datadog component, we will - // will conclude that it is safe to use. Otherwise, we will fail and force the - // user to choose. - datadogs = append(datadogs, mexp) - } - } - } - if p.metricsExporter == nil { - // the exact component was not found - switch len(datadogs) { - case 0: - // no valid defaults to fall back to - return fmt.Errorf("failed to find metrics exporter %q; please specify a valid processor::datadog::metrics_exporter", p.cfg.MetricsExporter) - case 1: - // exactly one valid default to fall back to; use it - p.metricsExporter = datadogs[0] - default: - // too many defaults to fall back to; ambiguous situation; force the user to choose: - return fmt.Errorf("too many exporters of type %q; please choose one using processor::datadog::metrics_exporter", p.cfg.MetricsExporter) - } - } - p.started = true - p.agent.Start() - go p.run() - p.logger.Debug("Started datadogprocessor", zap.Stringer("metrics_exporter", p.cfg.MetricsExporter)) - return nil -} - -// Shutdown implements the component.Component interface. -func (p *datadogProcessor) Shutdown(context.Context) error { - if !p.started { - return nil - } - p.started = false - p.agent.Stop() - p.exit <- struct{}{} // signal exit - <-p.exit // wait for close - return nil -} - -// Capabilities implements the consumer interface. -func (p *datadogProcessor) Capabilities() consumer.Capabilities { - // A resource attribute is added to traces to specify that stats have already - // been computed for them; thus, we end up mutating the data: - return consumer.Capabilities{MutatesData: true} -} - -// ConsumeTraces implements consumer.Traces. -func (p *datadogProcessor) ConsumeTraces(ctx context.Context, traces ptrace.Traces) error { - p.logger.Debug("Received traces.", zap.Int("spans", traces.SpanCount())) - p.agent.Ingest(ctx, traces) - return p.nextConsumer.ConsumeTraces(ctx, traces) -} - -// run awaits incoming stats resulting from the agent's ingestion, converts them -// to metrics and flushes them using the configured metrics exporter. -func (p *datadogProcessor) run() { - defer close(p.exit) - for { - select { - case stats := <-p.in: - if len(stats.Stats) == 0 { - continue - } - mx := p.translator.StatsPayloadToMetrics(stats) - ctx := context.TODO() - p.logger.Debug("Exporting APM Stats metrics.", zap.Int("count", mx.MetricCount())) - if err := p.metricsExporter.ConsumeMetrics(ctx, mx); err != nil { - p.logger.Error("Error exporting metrics.", zap.Error(err)) - } - case <-p.exit: - return - } - } -} diff --git a/processor/datadogprocessor/processor_test.go b/processor/datadogprocessor/processor_test.go deleted file mode 100644 index 5e3c198c925f..000000000000 --- a/processor/datadogprocessor/processor_test.go +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package datadogprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor" - -import ( - "context" - "strings" - "sync" - "testing" - "time" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/sketches-go/ddsketch" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/extension" - "go.opentelemetry.io/collector/pdata/pmetric" - "go.opentelemetry.io/collector/pdata/ptrace" - "go.uber.org/zap" - "google.golang.org/protobuf/proto" - - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog" -) - -func TestProcessorStart(t *testing.T) { - ctx := context.Background() - - t.Run("fail", func(t *testing.T) { - p, err := newProcessor(ctx, zap.NewNop(), createDefaultConfig(), &mockTracesConsumer{}) - require.NoError(t, err) - defer p.Shutdown(ctx) //nolint:errcheck - require.True(t, p.Capabilities().MutatesData) - err = p.Start(ctx, &mockHost{ - Exporters: exporters(map[string]exporter.Metrics{ - "test-exporter": &mockMetricsExporter{}, - }), - }) - require.ErrorContains(t, err, `failed to find metrics exporter "datadog"`) - }) - - t.Run("fail/2", func(t *testing.T) { - p, err := newProcessor(ctx, zap.NewNop(), createDefaultConfig(), &mockTracesConsumer{}) - require.NoError(t, err) - defer p.Shutdown(ctx) //nolint:errcheck - err = p.Start(ctx, &mockHost{ - Exporters: exporters(map[string]exporter.Metrics{ - "test-exporter": &mockMetricsExporter{}, - "datadog/1": &mockMetricsExporter{}, - "datadog/2": &mockMetricsExporter{}, - }), - }) - require.ErrorContains(t, err, `too many exporters of type "datadog"`) - }) - - t.Run("succeed/0", func(t *testing.T) { - p, err := newProcessor(ctx, zap.NewNop(), createDefaultConfig(), &mockTracesConsumer{}) - require.NoError(t, err) - defer p.Shutdown(ctx) //nolint:errcheck - err = p.Start(ctx, &mockHost{ - Exporters: exporters(map[string]exporter.Metrics{ - "test-exporter": &mockMetricsExporter{}, - "datadog": &mockMetricsExporter{}, - }), - }) - require.NoError(t, err) - }) - - t.Run("succeed/1", func(t *testing.T) { - p, err := newProcessor(ctx, zap.NewNop(), createDefaultConfig(), &mockTracesConsumer{}) - require.NoError(t, err) - defer p.Shutdown(ctx) //nolint:errcheck - err = p.Start(ctx, &mockHost{ - Exporters: exporters(map[string]exporter.Metrics{ - "test-exporter": &mockMetricsExporter{}, - "datadog/2": &mockMetricsExporter{}, - }), - }) - require.NoError(t, err) - }) - - t.Run("succeed/2", func(t *testing.T) { - lp, err := newProcessor(ctx, zap.NewNop(), &Config{MetricsExporter: component.NewIDWithName("datadog", "2")}, &mockTracesConsumer{}) - require.NoError(t, err) - defer lp.Shutdown(ctx) //nolint:errcheck - err = lp.Start(ctx, &mockHost{ - Exporters: exporters(map[string]exporter.Metrics{ - "test-exporter": &mockMetricsExporter{}, - "datadog/1": &mockMetricsExporter{}, - "datadog/2": &mockMetricsExporter{}, - }), - }) - require.NoError(t, err) - }) -} - -func TestProcessorIngest(t *testing.T) { - var mockConsumer mockTracesConsumer - ctx := context.Background() - p, err := newProcessor(ctx, zap.NewNop(), createDefaultConfig(), &mockConsumer) - require.NoError(t, err) - out := make(chan *pb.StatsPayload, 1) - ing := &mockIngester{Out: out} - p.agent = ing - p.in = out - mexporter := &mockMetricsExporter{} - err = p.Start(ctx, &mockHost{ - Exporters: exporters(map[string]exporter.Metrics{ - "test-exporter": &mockMetricsExporter{}, - "datadog": mexporter, - }), - }) - require.NoError(t, err) - defer p.Shutdown(ctx) //nolint:errcheck - tracesin := ptrace.NewTraces() - err = p.ConsumeTraces(ctx, tracesin) - require.NoError(t, err) - require.Equal(t, ing.ingested, tracesin) // ingester has ingested the consumed traces - require.Equal(t, mockConsumer.In()[0], tracesin) // the consumed traces are sent to the next consumer - timeout := time.After(time.Second) -loop: - for { - select { - case <-timeout: - t.Fatal("metrics exporter should have received metrics") - default: - if len(mexporter.In()) > 0 { - break loop // the exporter has consumed the generated metrics - } - time.Sleep(5 * time.Millisecond) - } - } -} - -func exporters(names map[string]exporter.Metrics) map[component.DataType]map[component.ID]component.Component { - out := map[component.DataType]map[component.ID]component.Component{ - component.DataTypeTraces: { - component.NewID("trace-exporter-a"): &mockTracesExporter{}, - component.NewID("trace-exporter-b"): &mockTracesExporter{}, - }, - } - exps := make(map[component.ID]component.Component) - for name, exp := range names { - if strings.Contains(name, "/") { - p := strings.Split(name, "/") - exps[component.NewIDWithName(component.Type(p[0]), p[1])] = exp - } else { - exps[component.NewID(component.Type(name))] = exp - } - } - out[component.DataTypeMetrics] = exps - return out -} - -var _ consumer.Traces = (*mockTracesConsumer)(nil) - -// mockTracesConsumer implements consumer.Traces. -type mockTracesConsumer struct { - mu sync.RWMutex - in []ptrace.Traces -} - -func (m *mockTracesConsumer) Capabilities() consumer.Capabilities { - return consumer.Capabilities{MutatesData: true} -} - -func (m *mockTracesConsumer) ConsumeTraces(_ context.Context, td ptrace.Traces) error { - m.mu.Lock() - m.in = append(m.in, td) - m.mu.Unlock() - return nil -} - -func (m *mockTracesConsumer) In() []ptrace.Traces { - m.mu.RLock() - defer m.mu.RUnlock() - return m.in -} - -var _ consumer.Metrics = (*mockMetricsConsumer)(nil) - -// mockMetricsConsumer implements consumer.Traces. -type mockMetricsConsumer struct { - mu sync.RWMutex - in []pmetric.Metrics -} - -func (m *mockMetricsConsumer) Capabilities() consumer.Capabilities { - return consumer.Capabilities{MutatesData: true} -} - -func (m *mockMetricsConsumer) ConsumeMetrics(_ context.Context, td pmetric.Metrics) error { - m.mu.Lock() - m.in = append(m.in, td) - m.mu.Unlock() - return nil -} - -func (m *mockMetricsConsumer) In() []pmetric.Metrics { - m.mu.RLock() - defer m.mu.RUnlock() - return m.in -} - -var _ component.Host = (*mockHost)(nil) - -// mockHost implements component.Host. -type mockHost struct { - Exporters map[component.DataType]map[component.ID]component.Component -} - -func (m *mockHost) ReportFatalError(_ error) {} - -func (m *mockHost) GetFactory(_ component.Kind, _ component.Type) component.Factory { - return nil -} - -func (m *mockHost) GetExtensions() map[component.ID]extension.Extension { - return nil -} - -func (m *mockHost) GetExporters() map[component.DataType]map[component.ID]component.Component { - return m.Exporters -} - -var _ component.Component = (*mockComponent)(nil) - -// mockComponent implements component.Component. -type mockComponent struct{} - -func (m *mockComponent) Start(_ context.Context, _ component.Host) error { - return nil -} - -func (m *mockComponent) Shutdown(_ context.Context) error { - return nil -} - -var _ exporter.Metrics = (*mockMetricsExporter)(nil) - -// mockMetricsExporter implements exporter.Metrics. -type mockMetricsExporter struct { - mockComponent - mockMetricsConsumer -} - -var _ exporter.Traces = (*mockTracesExporter)(nil) - -// mockTracesExporter implements exporter.Traces. -type mockTracesExporter struct { - mockComponent - mockTracesConsumer -} - -var _ datadog.Ingester = (*mockIngester)(nil) - -// mockIngester implements ingester. -type mockIngester struct { - Out chan *pb.StatsPayload - start, stop bool - ingested ptrace.Traces -} - -// Start starts the ingester. -func (m *mockIngester) Start() { - m.start = true -} - -// Ingest ingests the set of traces. -func (m *mockIngester) Ingest(_ context.Context, traces ptrace.Traces) { - m.ingested = traces - m.Out <- &testStatsPayload -} - -// Stop stops the ingester. -func (m *mockIngester) Stop() { - m.stop = true -} - -// TODO(gbbr): this is copied from exporter/datadogexporter/internal/testutil. -// We should find a way to have a shared set of test utilities in either the processor -// or the exporter. -var testStatsPayload = pb.StatsPayload{ - Stats: []*pb.ClientStatsPayload{ - { - Hostname: "host", - Env: "prod", - Version: "v1.2", - Lang: "go", - TracerVersion: "v44", - RuntimeID: "123jkl", - Sequence: 2, - AgentAggregation: "blah", - Service: "mysql", - ContainerID: "abcdef123456", - Tags: []string{"a:b", "c:d"}, - Stats: []*pb.ClientStatsBucket{ - { - Start: 10, - Duration: 1, - Stats: []*pb.ClientGroupedStats{ - { - Service: "kafka", - Name: "queue.add", - Resource: "append", - HTTPStatusCode: 220, - Type: "queue", - Hits: 15, - Errors: 3, - Duration: 143, - OkSummary: testSketchBytes(1, 2, 3), - ErrorSummary: testSketchBytes(4, 5, 6), - TopLevelHits: 5, - }, - }, - }, - }, - }, - { - Hostname: "host2", - Env: "prod2", - Version: "v1.22", - Lang: "go2", - TracerVersion: "v442", - RuntimeID: "123jkl2", - Sequence: 22, - AgentAggregation: "blah2", - Service: "mysql2", - ContainerID: "abcdef1234562", - Tags: []string{"a:b2", "c:d2"}, - Stats: []*pb.ClientStatsBucket{ - { - Start: 102, - Duration: 12, - Stats: []*pb.ClientGroupedStats{ - { - Service: "kafka2", - Name: "queue.add2", - Resource: "append2", - HTTPStatusCode: 2202, - Type: "queue2", - Hits: 152, - Errors: 32, - Duration: 1432, - OkSummary: testSketchBytes(7, 8), - ErrorSummary: testSketchBytes(9, 10, 11), - TopLevelHits: 52, - }, - }, - }, - }, - }, - }, -} - -// The sketch's relative accuracy and maximum number of bins is identical -// to the one used in the trace-agent for consistency: -// https://github.com/DataDog/datadog-agent/blob/cbac965/pkg/trace/stats/statsraw.go#L18-L26 -const ( - sketchRelativeAccuracy = 0.01 - sketchMaxBins = 2048 -) - -// testSketchBytes returns the proto-encoded version of a DDSketch containing the -// points in nums. -func testSketchBytes(nums ...float64) []byte { - sketch, err := ddsketch.LogCollapsingLowestDenseDDSketch(sketchRelativeAccuracy, sketchMaxBins) - if err != nil { - // the only possible error is if the relative accuracy is < 0 or > 1; - // we know that's not the case because it's a constant defined as 0.01 - panic(err) - } - for _, num := range nums { - if err2 := sketch.Add(num); err2 != nil { - panic(err2) // invalid input - } - } - buf, err := proto.Marshal(sketch.ToProto()) - if err != nil { - // there should be no error under any circumstances here - panic(err) - } - return buf -} diff --git a/processor/spanmetricsprocessor/Makefile b/processor/deltatocumulativeprocessor/Makefile similarity index 100% rename from processor/spanmetricsprocessor/Makefile rename to processor/deltatocumulativeprocessor/Makefile diff --git a/processor/deltatocumulativeprocessor/README.md b/processor/deltatocumulativeprocessor/README.md new file mode 100644 index 000000000000..fe281431ba7c --- /dev/null +++ b/processor/deltatocumulativeprocessor/README.md @@ -0,0 +1,49 @@ +# Delta to cumulative processor + + +| Status | | +| ------------- |-----------| +| Stability | [development]: metrics | +| Distributions | [] | +| Warnings | [Statefulness](#warnings) | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Fdeltatocumulative%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Fdeltatocumulative) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Fdeltatocumulative%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Fdeltatocumulative) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@sh0rez](https://www.github.com/sh0rez), [@RichieSams](https://www.github.com/RichieSams) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development + + + +## Description + +The delta to cumulative processor (`deltatocumulativeprocessor`) converts +metrics from delta temporality to cumulative, by accumulating samples in memory. + +## Configuration + +``` yaml +processors: + deltatocumulative: + # how long until a series not receiving new samples is removed + [ max_stale: | default = 5m ] + + # upper limit of streams to track. new streams exceeding this limit + # will be dropped + [ max_streams: | default = 0 (off) ] + +``` + +There is no further configuration required. All delta samples are converted to cumulative. + +## Troubleshooting + +The following metrics are recorded when [telemetry is +enabled](https://opentelemetry.io/docs/collector/configuration/#telemetry): + +| Name | Description | Unit | +|------------------------------------------|---------------------------------------------------------------------------------------|---------------| +| `deltatocumulative.streams.tracked` | Number of streams currently tracked by the aggregation state | `{stream}` | +| `deltatocumulative.streams.limit` | Upper limit of tracked streams | `{stream}` | +| `deltatocumulative.streams.evicted` | Number of streams removed from tracking to ingest newer streams | `{stream}` | +| `deltatocumulative.datapoints.processed` | Total number of datapoints processed, whether successful or not | `{datapoint}` | +| `deltatocumulative.datapoints.dropped` | Faulty datapoints that were dropped due to the reason given in the `reason` attribute | `{datapoint}` | +| `deltatocumulative.gaps.length` | Total length of all gaps in the streams, which occur e.g. due to lost in transit | `second` | diff --git a/processor/deltatocumulativeprocessor/config.go b/processor/deltatocumulativeprocessor/config.go new file mode 100644 index 000000000000..b97793d0b6d8 --- /dev/null +++ b/processor/deltatocumulativeprocessor/config.go @@ -0,0 +1,38 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package deltatocumulativeprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor" + +import ( + "fmt" + "time" + + "go.opentelemetry.io/collector/component" +) + +var _ component.ConfigValidator = (*Config)(nil) + +type Config struct { + MaxStale time.Duration `mapstructure:"max_stale"` + MaxStreams int `mapstructure:"max_streams"` +} + +func (c *Config) Validate() error { + if c.MaxStale <= 0 { + return fmt.Errorf("max_stale must be a positive duration (got %s)", c.MaxStale) + } + if c.MaxStreams < 0 { + return fmt.Errorf("max_streams must be a positive number (got %d)", c.MaxStreams) + } + return nil +} + +func createDefaultConfig() component.Config { + return &Config{ + MaxStale: 5 * time.Minute, + + // disable. TODO: find good default + // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/31603 + MaxStreams: 0, + } +} diff --git a/processor/deltatocumulativeprocessor/config_test.go b/processor/deltatocumulativeprocessor/config_test.go new file mode 100644 index 000000000000..79348b2aa6a7 --- /dev/null +++ b/processor/deltatocumulativeprocessor/config_test.go @@ -0,0 +1,65 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package deltatocumulativeprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor" + +import ( + "path/filepath" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/metadata" +) + +func TestLoadConfig(t *testing.T) { + t.Parallel() + + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + + tests := []struct { + id component.ID + expected component.Config + }{ + { + id: component.NewIDWithName(metadata.Type, "all"), + expected: &Config{ + MaxStale: 1 * time.Minute, + MaxStreams: 10, + }, + }, + { + id: component.NewIDWithName(metadata.Type, "set-valid-max_stale"), + expected: &Config{ + MaxStale: 2 * time.Minute, + MaxStreams: 0, + }, + }, + { + id: component.NewIDWithName(metadata.Type, "set-valid-max_streams"), + expected: &Config{ + MaxStale: 5 * time.Minute, + MaxStreams: 20, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.id.String(), func(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + + sub, err := cm.Sub(tt.id.String()) + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + assert.NoError(t, component.ValidateConfig(cfg)) + assert.Equal(t, tt.expected, cfg) + }) + } +} diff --git a/processor/deltatocumulativeprocessor/doc.go b/processor/deltatocumulativeprocessor/doc.go new file mode 100644 index 000000000000..c8f961f6bbe3 --- /dev/null +++ b/processor/deltatocumulativeprocessor/doc.go @@ -0,0 +1,8 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +// package deltatocumulativeprocessor implements a processor which +// converts metrics from delta temporality to cumulative. +package deltatocumulativeprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor" diff --git a/processor/deltatocumulativeprocessor/factory.go b/processor/deltatocumulativeprocessor/factory.go new file mode 100644 index 000000000000..1162165174d1 --- /dev/null +++ b/processor/deltatocumulativeprocessor/factory.go @@ -0,0 +1,33 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package deltatocumulativeprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor" + +import ( + "context" + "fmt" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/processor" + + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/metadata" +) + +func NewFactory() processor.Factory { + return processor.NewFactory( + metadata.Type, + createDefaultConfig, + processor.WithMetrics(createMetricsProcessor, metadata.MetricsStability), + ) +} + +func createMetricsProcessor(_ context.Context, set processor.CreateSettings, cfg component.Config, next consumer.Metrics) (processor.Metrics, error) { + pcfg, ok := cfg.(*Config) + if !ok { + return nil, fmt.Errorf("configuration parsing error") + } + + meter := metadata.Meter(set.TelemetrySettings) + return newProcessor(pcfg, set.Logger, meter, next), nil +} diff --git a/processor/deltatocumulativeprocessor/generated_component_test.go b/processor/deltatocumulativeprocessor/generated_component_test.go new file mode 100644 index 000000000000..b231fe3cb975 --- /dev/null +++ b/processor/deltatocumulativeprocessor/generated_component_test.go @@ -0,0 +1,127 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package deltatocumulativeprocessor + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "metrics", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsProcessor(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(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/processor/deltatocumulativeprocessor/go.mod b/processor/deltatocumulativeprocessor/go.mod new file mode 100644 index 000000000000..52b59c56968d --- /dev/null +++ b/processor/deltatocumulativeprocessor/go.mod @@ -0,0 +1,61 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor + +go 1.21 + +require ( + github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/otel v1.25.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/zap v1.27.0 +) + +require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.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.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil => ../../pkg/pdatautil + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics => ../../internal/exp/metrics diff --git a/processor/deltatocumulativeprocessor/go.sum b/processor/deltatocumulativeprocessor/go.sum new file mode 100644 index 000000000000..3fa10602ea68 --- /dev/null +++ b/processor/deltatocumulativeprocessor/go.sum @@ -0,0 +1,144 @@ +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.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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/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/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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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/deltatocumulativeprocessor/internal/data/add.go b/processor/deltatocumulativeprocessor/internal/data/add.go new file mode 100644 index 000000000000..b40bf05b916d --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/data/add.go @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package data // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/data" + +import "go.opentelemetry.io/collector/pdata/pmetric" + +func (dp Number) Add(in Number) Number { + switch in.ValueType() { + case pmetric.NumberDataPointValueTypeDouble: + v := dp.DoubleValue() + in.DoubleValue() + dp.SetDoubleValue(v) + case pmetric.NumberDataPointValueTypeInt: + v := dp.IntValue() + in.IntValue() + dp.SetIntValue(v) + } + dp.SetTimestamp(in.Timestamp()) + return dp +} + +// nolint +func (dp Histogram) Add(in Histogram) Histogram { + panic("todo") +} + +// nolint +func (dp ExpHistogram) Add(in ExpHistogram) ExpHistogram { + panic("todo") +} diff --git a/processor/deltatocumulativeprocessor/internal/data/data.go b/processor/deltatocumulativeprocessor/internal/data/data.go new file mode 100644 index 000000000000..941b3cff904f --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/data/data.go @@ -0,0 +1,76 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package data // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/data" + +import ( + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" +) + +type Point[Self any] interface { + StartTimestamp() pcommon.Timestamp + Timestamp() pcommon.Timestamp + Attributes() pcommon.Map + + Clone() Self + CopyTo(Self) + + Add(Self) Self +} + +type Number struct { + pmetric.NumberDataPoint +} + +func (dp Number) Clone() Number { + clone := Number{NumberDataPoint: pmetric.NewNumberDataPoint()} + if dp.NumberDataPoint != (pmetric.NumberDataPoint{}) { + dp.CopyTo(clone) + } + return clone +} + +func (dp Number) CopyTo(dst Number) { + dp.NumberDataPoint.CopyTo(dst.NumberDataPoint) +} + +type Histogram struct { + pmetric.HistogramDataPoint +} + +func (dp Histogram) Clone() Histogram { + clone := Histogram{HistogramDataPoint: pmetric.NewHistogramDataPoint()} + if dp.HistogramDataPoint != (pmetric.HistogramDataPoint{}) { + dp.CopyTo(clone) + } + return clone +} + +func (dp Histogram) CopyTo(dst Histogram) { + dp.HistogramDataPoint.CopyTo(dst.HistogramDataPoint) +} + +type ExpHistogram struct { + pmetric.ExponentialHistogramDataPoint +} + +func (dp ExpHistogram) Clone() ExpHistogram { + clone := ExpHistogram{ExponentialHistogramDataPoint: pmetric.NewExponentialHistogramDataPoint()} + if dp.ExponentialHistogramDataPoint != (pmetric.ExponentialHistogramDataPoint{}) { + dp.CopyTo(clone) + } + return clone +} + +func (dp ExpHistogram) CopyTo(dst ExpHistogram) { + dp.ExponentialHistogramDataPoint.CopyTo(dst.ExponentialHistogramDataPoint) +} + +type mustPoint[D Point[D]] struct{ _ D } + +var ( + _ = mustPoint[Number]{} + _ = mustPoint[Histogram]{} + _ = mustPoint[ExpHistogram]{} +) diff --git a/processor/deltatocumulativeprocessor/internal/delta/delta.go b/processor/deltatocumulativeprocessor/internal/delta/delta.go new file mode 100644 index 000000000000..5539eb8c8e49 --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/delta/delta.go @@ -0,0 +1,84 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package delta // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/delta" + +import ( + "fmt" + + "go.opentelemetry.io/collector/pdata/pcommon" + + exp "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/streams" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/data" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/streams" +) + +func New[D data.Point[D]]() Accumulator[D] { + return Accumulator[D]{ + Map: make(exp.HashMap[D]), + } +} + +var _ streams.Map[data.Number] = (*Accumulator[data.Number])(nil) + +type Accumulator[D data.Point[D]] struct { + streams.Map[D] +} + +func (a Accumulator[D]) Store(id streams.Ident, dp D) error { + aggr, ok := a.Map.Load(id) + + // new series: initialize with current sample + if !ok { + clone := dp.Clone() + return a.Map.Store(id, clone) + } + + // drop bad samples + switch { + case dp.StartTimestamp() < aggr.StartTimestamp(): + // belongs to older series + return ErrOlderStart{Start: aggr.StartTimestamp(), Sample: dp.StartTimestamp()} + case dp.Timestamp() <= aggr.Timestamp(): + // out of order + return ErrOutOfOrder{Last: aggr.Timestamp(), Sample: dp.Timestamp()} + } + + // detect gaps + var gap error + if dp.StartTimestamp() > aggr.Timestamp() { + gap = ErrGap{From: aggr.Timestamp(), To: dp.StartTimestamp()} + } + + res := aggr.Add(dp) + if err := a.Map.Store(id, res); err != nil { + return err + } + return gap +} + +type ErrOlderStart struct { + Start pcommon.Timestamp + Sample pcommon.Timestamp +} + +func (e ErrOlderStart) Error() string { + return fmt.Sprintf("dropped sample with start_time=%s, because series only starts at start_time=%s. consider checking for multiple processes sending the exact same series", e.Sample, e.Start) +} + +type ErrOutOfOrder struct { + Last pcommon.Timestamp + Sample pcommon.Timestamp +} + +func (e ErrOutOfOrder) Error() string { + return fmt.Sprintf("out of order: dropped sample from time=%s, because series is already at time=%s", e.Sample, e.Last) +} + +type ErrGap struct { + From, To pcommon.Timestamp +} + +func (e ErrGap) Error() string { + return fmt.Sprintf("gap in stream from %s to %s. samples were likely lost in transit", e.From, e.To) +} diff --git a/processor/deltatocumulativeprocessor/internal/delta/delta_test.go b/processor/deltatocumulativeprocessor/internal/delta/delta_test.go new file mode 100644 index 000000000000..919d4b852251 --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/delta/delta_test.go @@ -0,0 +1,215 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package delta_test + +import ( + "fmt" + "math/rand" + "strconv" + "sync" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/data" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/delta" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/streams" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/testdata/random" +) + +var result any + +func aggr() streams.Aggregator[data.Number] { + return streams.IntoAggregator(delta.New[data.Number]()) +} + +func BenchmarkAccumulator(b *testing.B) { + acc := aggr() + sum := random.Sum() + + bench := func(b *testing.B, nstreams int) { + nsamples := b.N / nstreams + + ids := make([]streams.Ident, nstreams) + dps := make([]data.Number, nstreams) + for i := 0; i < nstreams; i++ { + ids[i], dps[i] = sum.Stream() + } + + b.ResetTimer() + + var wg sync.WaitGroup + for i := 0; i < nstreams; i++ { + wg.Add(1) + go func(id streams.Ident, num data.Number) { + for n := 0; n < nsamples; n++ { + num.SetTimestamp(num.Timestamp() + 1) + val, err := acc.Aggregate(id, num) + if err != nil { + panic(err) + } + result = val + } + wg.Done() + }(ids[i], dps[i]) + } + + wg.Wait() + } + + nstreams := []int{1, 2, 10, 100, 1000} + for _, n := range nstreams { + b.Run(strconv.Itoa(n), func(b *testing.B) { + bench(b, n) + }) + } +} + +// verify the distinction between streams and the accumulated value +func TestAddition(t *testing.T) { + acc := aggr() + sum := random.Sum() + + type Idx int + type Stream struct { + idx Idx + id streams.Ident + dp data.Number + } + + streams := make([]Stream, 10) + for i := range streams { + id, dp := sum.Stream() + streams[i] = Stream{ + idx: Idx(i), + id: id, + dp: dp, + } + } + + want := make(map[Idx]int64) + for i := 0; i < 100; i++ { + stream := streams[rand.Intn(10)] + dp := stream.dp.Clone() + dp.SetTimestamp(dp.Timestamp() + pcommon.Timestamp(i)) + + val := int64(rand.Intn(255)) + dp.SetIntValue(val) + want[stream.idx] += val + + got, err := acc.Aggregate(stream.id, dp) + require.NoError(t, err) + + require.Equal(t, want[stream.idx], got.IntValue()) + } +} + +// verify that start + last times are updated +func TestTimes(t *testing.T) { + acc := aggr() + id, base := random.Sum().Stream() + point := func(start, last pcommon.Timestamp) data.Number { + dp := base.Clone() + dp.SetStartTimestamp(start) + dp.SetTimestamp(last) + return dp + } + + // first sample: its the first ever, so take it as-is + { + dp := point(1000, 1000) + res, err := acc.Aggregate(id, dp) + + require.NoError(t, err) + require.Equal(t, time(1000), res.StartTimestamp()) + require.Equal(t, time(1000), res.Timestamp()) + } + + // second sample: its subsequent, so keep original startTime, but update lastSeen + { + dp := point(1000, 1100) + res, err := acc.Aggregate(id, dp) + + require.NoError(t, err) + require.Equal(t, time(1000), res.StartTimestamp()) + require.Equal(t, time(1100), res.Timestamp()) + } + + // third sample: its subsequent, but has a more recent startTime, which is + // PERMITTED by the spec. + // still keep original startTime, but update lastSeen. + { + dp := point(1100, 1200) + res, err := acc.Aggregate(id, dp) + + require.NoError(t, err) + require.Equal(t, time(1000), res.StartTimestamp()) + require.Equal(t, time(1200), res.Timestamp()) + } +} + +func TestErrs(t *testing.T) { + type Point struct { + Start int + Time int + Value int + } + type Case struct { + Good Point + Bad Point + Err error + } + + cases := []Case{ + { + Good: Point{Start: 1234, Time: 1337, Value: 42}, + Bad: Point{Start: 1000, Time: 2000, Value: 24}, + Err: delta.ErrOlderStart{Start: time(1234), Sample: time(1000)}, + }, + { + Good: Point{Start: 1234, Time: 1337, Value: 42}, + Bad: Point{Start: 1234, Time: 1336, Value: 24}, + Err: delta.ErrOutOfOrder{Last: time(1337), Sample: time(1336)}, + }, + } + + for _, c := range cases { + c := c + t.Run(fmt.Sprintf("%T", c.Err), func(t *testing.T) { + acc := aggr() + id, data := random.Sum().Stream() + + good := data.Clone() + good.SetStartTimestamp(pcommon.Timestamp(c.Good.Start)) + good.SetTimestamp(pcommon.Timestamp(c.Good.Time)) + good.SetIntValue(int64(c.Good.Value)) + + r1, err := acc.Aggregate(id, good) + require.NoError(t, err) + + require.Equal(t, good.StartTimestamp(), r1.StartTimestamp()) + require.Equal(t, good.Timestamp(), r1.Timestamp()) + require.Equal(t, good.IntValue(), r1.IntValue()) + + bad := data.Clone() + bad.SetStartTimestamp(pcommon.Timestamp(c.Bad.Start)) + bad.SetTimestamp(pcommon.Timestamp(c.Bad.Time)) + bad.SetIntValue(int64(c.Bad.Value)) + + r2, err := acc.Aggregate(id, bad) + require.ErrorIs(t, err, c.Err) + + // sample must be dropped => no change + require.Equal(t, r1.StartTimestamp(), r2.StartTimestamp()) + require.Equal(t, r1.Timestamp(), r2.Timestamp()) + require.Equal(t, r1.IntValue(), r2.IntValue()) + }) + } + +} + +func time(ts int) pcommon.Timestamp { + return pcommon.Timestamp(ts) +} diff --git a/processor/deltatocumulativeprocessor/internal/maybe/ptr.go b/processor/deltatocumulativeprocessor/internal/maybe/ptr.go new file mode 100644 index 000000000000..8f40b8d277b3 --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/maybe/ptr.go @@ -0,0 +1,52 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// maybe provides utilities for representing data may or may not exist at +// runtime in a safe way. +// +// A typical approach to this are pointers, but they suffer from two issues: +// - Unsafety: permitting nil pointers must require careful checking on each use, +// which is easily forgotten +// - Blindness: nil itself does cannot differentiate between "set to nil" and +// "not set all", leading to unexepcted edge cases +// +// The [Ptr] type of this package provides a safe alternative with a clear +// distinction between "not set" and "set to nil". +package maybe // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/maybe" + +// Ptr references some value of type T that is not guaranteed to exist. +// Callers must use [Ptr.Try] to access the underlying value, checking the +// ok return value too. +// This provides a clear distinction between "not set" and "set to nil". +// +// Use [Some] and [None] to create Ptrs. +type Ptr[T any] struct { + to *T + ok bool +} + +// None returns a Ptr that represents "not-set". +// This is equal to a zero-value Ptr. +func None[T any]() Ptr[T] { + return Ptr[T]{to: nil, ok: false} +} + +// Some returns a pointer to the passed T. +// +// The ptr argument may be nil, in which case this represents "explicitly set to +// nil". +func Some[T any](ptr *T) Ptr[T] { + return Ptr[T]{to: ptr, ok: true} +} + +// Try attempts to de-reference the Ptr, giving one of three results: +// +// - nil, false: not-set +// - nil, true: explicitly set to nil +// - non-nil, true: set to some value +// +// This provides extra safety over bare pointers, because callers are forced by +// the compiler to either check or explicitly ignore the ok value. +func (ptr Ptr[T]) Try() (_ *T, ok bool) { + return ptr.to, ptr.ok +} diff --git a/processor/deltatocumulativeprocessor/internal/maybe/ptr_test.go b/processor/deltatocumulativeprocessor/internal/maybe/ptr_test.go new file mode 100644 index 000000000000..c32c34e7e505 --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/maybe/ptr_test.go @@ -0,0 +1,64 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package maybe_test + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/maybe" +) + +func TestMaybe(t *testing.T) { + t.Run("zero-not-ok", func(t *testing.T) { + var ptr maybe.Ptr[int] + _, ok := ptr.Try() + require.False(t, ok) + }) + t.Run("none-not-ok", func(t *testing.T) { + ptr := maybe.None[int]() + _, ok := ptr.Try() + require.False(t, ok) + }) + t.Run("explicit-nil", func(t *testing.T) { + ptr := maybe.Some[int](nil) + v, ok := ptr.Try() + require.Nil(t, v) + require.True(t, ok) + }) + t.Run("value", func(t *testing.T) { + num := 42 + ptr := maybe.Some(&num) + v, ok := ptr.Try() + require.True(t, ok) + require.Equal(t, num, *v) + }) +} + +func ExamplePtr() { + var unset maybe.Ptr[int] // = maybe.None() + if v, ok := unset.Try(); ok { + fmt.Println("unset:", v) + } else { + fmt.Println("unset: !ok") + } + + var xnil maybe.Ptr[int] = maybe.Some[int](nil) + if v, ok := xnil.Try(); ok { + fmt.Println("explicit nil:", v) + } + + num := 42 + var set maybe.Ptr[int] = maybe.Some(&num) + if v, ok := set.Try(); ok { + fmt.Println("set:", *v) + } + + // Output: + // unset: !ok + // explicit nil: + // set: 42 +} diff --git a/processor/deltatocumulativeprocessor/internal/metadata/generated_status.go b/processor/deltatocumulativeprocessor/internal/metadata/generated_status.go new file mode 100644 index 000000000000..0d5c529a7fab --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/metadata/generated_status.go @@ -0,0 +1,25 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("deltatocumulative") +) + +const ( + MetricsStability = component.StabilityLevelDevelopment +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/deltatocumulative") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/deltatocumulative") +} diff --git a/processor/deltatocumulativeprocessor/internal/metrics/data.go b/processor/deltatocumulativeprocessor/internal/metrics/data.go new file mode 100644 index 000000000000..c305c85d781e --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/metrics/data.go @@ -0,0 +1,59 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metrics // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/metrics" + +import ( + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/data" +) + +type Data[D data.Point[D]] interface { + At(i int) D + Len() int + Ident() Ident +} + +type Sum Metric + +func (s Sum) At(i int) data.Number { + dp := Metric(s).Sum().DataPoints().At(i) + return data.Number{NumberDataPoint: dp} +} + +func (s Sum) Len() int { + return Metric(s).Sum().DataPoints().Len() +} + +func (s Sum) Ident() Ident { + return (*Metric)(&s).Ident() +} + +type Histogram Metric + +func (s Histogram) At(i int) data.Histogram { + dp := Metric(s).Histogram().DataPoints().At(i) + return data.Histogram{HistogramDataPoint: dp} +} + +func (s Histogram) Len() int { + return Metric(s).Histogram().DataPoints().Len() +} + +func (s Histogram) Ident() Ident { + return (*Metric)(&s).Ident() +} + +type ExpHistogram Metric + +func (s ExpHistogram) At(i int) data.ExpHistogram { + dp := Metric(s).ExponentialHistogram().DataPoints().At(i) + return data.ExpHistogram{ExponentialHistogramDataPoint: dp} +} + +func (s ExpHistogram) Len() int { + return Metric(s).ExponentialHistogram().DataPoints().Len() +} + +func (s ExpHistogram) Ident() Ident { + return (*Metric)(&s).Ident() +} diff --git a/processor/deltatocumulativeprocessor/internal/metrics/metrics.go b/processor/deltatocumulativeprocessor/internal/metrics/metrics.go new file mode 100644 index 000000000000..6b705f5a7d24 --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/metrics/metrics.go @@ -0,0 +1,27 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metrics // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/metrics" + +import ( + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" +) + +type Ident = identity.Metric + +type Metric struct { + res pcommon.Resource + scope pcommon.InstrumentationScope + pmetric.Metric +} + +func (m *Metric) Ident() Ident { + return identity.OfResourceMetric(m.res, m.scope, m.Metric) +} + +func From(res pcommon.Resource, scope pcommon.InstrumentationScope, metric pmetric.Metric) Metric { + return Metric{res: res, scope: scope, Metric: metric} +} diff --git a/processor/deltatocumulativeprocessor/internal/metrics/util.go b/processor/deltatocumulativeprocessor/internal/metrics/util.go new file mode 100644 index 000000000000..985716b3cc0f --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/metrics/util.go @@ -0,0 +1,25 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metrics // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/metrics" + +import "go.opentelemetry.io/collector/pdata/pmetric" + +func Filter(metrics pmetric.Metrics, fn func(m Metric) bool) { + metrics.ResourceMetrics().RemoveIf(func(rm pmetric.ResourceMetrics) bool { + rm.ScopeMetrics().RemoveIf(func(sm pmetric.ScopeMetrics) bool { + sm.Metrics().RemoveIf(func(m pmetric.Metric) bool { + return !fn(From(rm.Resource(), sm.Scope(), m)) + }) + return false + }) + return false + }) +} + +func Each(metrics pmetric.Metrics, fn func(m Metric)) { + Filter(metrics, func(m Metric) bool { + fn(m) + return true + }) +} diff --git a/processor/deltatocumulativeprocessor/internal/streams/data.go b/processor/deltatocumulativeprocessor/internal/streams/data.go new file mode 100644 index 000000000000..435202cffabe --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/streams/data.go @@ -0,0 +1,46 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package streams // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/streams" + +import ( + "errors" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/data" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/metrics" +) + +// Samples returns an Iterator over each sample of all streams in the metric +func Samples[D data.Point[D]](m metrics.Data[D]) Seq[D] { + mid := m.Ident() + + return func(yield func(Ident, D) bool) bool { + for i := 0; i < m.Len(); i++ { + dp := m.At(i) + id := identity.OfStream(mid, dp) + if !yield(id, dp) { + break + } + } + return false + } +} + +// Aggregate each point and replace it by the result +func Aggregate[D data.Point[D]](m metrics.Data[D], aggr Aggregator[D]) error { + var errs error + + // for id, dp := range Samples(m) + Samples(m)(func(id Ident, dp D) bool { + next, err := aggr.Aggregate(id, dp) + if err != nil { + errs = errors.Join(errs, Error(id, err)) + return true + } + next.CopyTo(dp) + return true + }) + + return errs +} diff --git a/processor/deltatocumulativeprocessor/internal/streams/data_test.go b/processor/deltatocumulativeprocessor/internal/streams/data_test.go new file mode 100644 index 000000000000..69bef711eb7e --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/streams/data_test.go @@ -0,0 +1,126 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package streams_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/data" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/metrics" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/streams" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/testdata/random" +) + +var rdp data.Number +var rid streams.Ident + +func BenchmarkSamples(b *testing.B) { + b.Run("iterfn", func(b *testing.B) { + dps := generate(b.N) + b.ResetTimer() + + streams.Samples[data.Number](dps)(func(id streams.Ident, dp data.Number) bool { + rdp = dp + rid = id + return true + }) + }) + + b.Run("iface", func(b *testing.B) { + dps := generate(b.N) + mid := dps.id.Metric() + b.ResetTimer() + + for i := 0; i < dps.Len(); i++ { + dp := dps.At(i) + rid = identity.OfStream(mid, dp) + rdp = dp + } + }) + + b.Run("loop", func(b *testing.B) { + dps := generate(b.N) + mid := dps.id.Metric() + b.ResetTimer() + + for i := range dps.dps { + dp := dps.dps[i] + rid = identity.OfStream(mid, dp) + rdp = dp + } + }) +} + +func TestSample(t *testing.T) { + const total = 1000 + dps := generate(total) + + // check that all samples are visited + seen := 0 + streams.Samples[data.Number](dps)(func(id streams.Ident, dp data.Number) bool { + require.Equal(t, dps.id, id) + require.Equal(t, dps.dps[seen], dp) + seen++ + return true + }) + + require.Equal(t, total, seen) +} + +func TestAggregate(t *testing.T) { + const total = 1000 + dps := generate(total) + + // inv aggregator inverts each sample + inv := aggr(func(_ streams.Ident, n data.Number) (data.Number, error) { + dp := n.Clone() + dp.SetIntValue(-dp.IntValue()) + return dp, nil + }) + + err := streams.Aggregate(dps, inv) + require.NoError(t, err) + + // check that all samples are inverted + for i := 0; i < total; i++ { + require.Equal(t, int64(-i), dps.dps[i].IntValue()) + } +} + +func generate(n int) Data { + id, ndp := random.Sum().Stream() + dps := Data{id: id, dps: make([]data.Number, n)} + for i := range dps.dps { + dp := ndp.Clone() + dp.SetIntValue(int64(i)) + dps.dps[i] = dp + } + return dps +} + +type Data struct { + id streams.Ident + dps []data.Number +} + +func (l Data) At(i int) data.Number { + return l.dps[i] +} + +func (l Data) Len() int { + return len(l.dps) +} + +func (l Data) Ident() metrics.Ident { + return l.id.Metric() +} + +type aggr func(streams.Ident, data.Number) (data.Number, error) + +func (a aggr) Aggregate(id streams.Ident, dp data.Number) (data.Number, error) { + return a(id, dp) +} diff --git a/processor/deltatocumulativeprocessor/internal/streams/errors.go b/processor/deltatocumulativeprocessor/internal/streams/errors.go new file mode 100644 index 000000000000..e69827a6212c --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/streams/errors.go @@ -0,0 +1,21 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package streams // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/streams" + +import ( + "fmt" +) + +func Error(id Ident, err error) error { + return StreamErr{Ident: id, Err: err} +} + +type StreamErr struct { + Ident Ident + Err error +} + +func (e StreamErr) Error() string { + return fmt.Sprintf("%s: %s", e.Ident, e.Err) +} diff --git a/processor/deltatocumulativeprocessor/internal/streams/limit.go b/processor/deltatocumulativeprocessor/internal/streams/limit.go new file mode 100644 index 000000000000..3e021b6d5d74 --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/streams/limit.go @@ -0,0 +1,61 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package streams // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/streams" + +import ( + "errors" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/streams" +) + +func Limit[T any](m Map[T], max int) LimitMap[T] { + return LimitMap[T]{Map: m, Max: max} +} + +type LimitMap[T any] struct { + Max int + + Evictor streams.Evictor + streams.Map[T] +} + +func (m LimitMap[T]) Store(id identity.Stream, v T) error { + _, ok := m.Map.Load(id) + avail := m.Map.Len() < m.Max + if ok || avail { + return m.Map.Store(id, v) + } + + errl := ErrLimit(m.Max) + if m.Evictor != nil { + gone := m.Evictor.Evict() + if err := m.Map.Store(id, v); err != nil { + return err + } + return ErrEvicted{ErrLimit: errl, Ident: gone} + } + return errl +} + +type ErrLimit int + +func (e ErrLimit) Error() string { + return fmt.Sprintf("stream limit of %d reached", e) +} + +func AtLimit(err error) bool { + var errLimit ErrLimit + return errors.As(err, &errLimit) +} + +type ErrEvicted struct { + ErrLimit + Ident Ident +} + +func (e ErrEvicted) Error() string { + return fmt.Sprintf("%s. evicted stream %s", e.ErrLimit, e.Ident) +} diff --git a/processor/deltatocumulativeprocessor/internal/streams/limit_test.go b/processor/deltatocumulativeprocessor/internal/streams/limit_test.go new file mode 100644 index 000000000000..04ffffbde5f5 --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/streams/limit_test.go @@ -0,0 +1,59 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package streams_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + exp "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/streams" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/data" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/streams" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/testdata/random" +) + +func TestLimit(t *testing.T) { + sum := random.Sum() + + items := make(exp.HashMap[data.Number]) + lim := streams.Limit(items, 10) + + ids := make([]identity.Stream, 10) + dps := make([]data.Number, 10) + + // write until limit must work + for i := 0; i < 10; i++ { + id, dp := sum.Stream() + ids[i] = id + dps[i] = dp + err := lim.Store(id, dp) + require.NoError(t, err) + } + + // one over limit must be rejected + { + id, dp := sum.Stream() + err := lim.Store(id, dp) + want := streams.ErrLimit(10) + require.ErrorAs(t, err, &want) + require.True(t, streams.AtLimit(err)) + } + + // write to existing must work + { + err := lim.Store(ids[3], dps[3]) + require.NoError(t, err) + } + + // after removing one, must be accepted again + { + lim.Delete(ids[0]) + + id, dp := sum.Stream() + err := lim.Store(id, dp) + require.NoError(t, err) + } +} diff --git a/processor/deltatocumulativeprocessor/internal/streams/streams.go b/processor/deltatocumulativeprocessor/internal/streams/streams.go new file mode 100644 index 000000000000..1b34f806b272 --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/streams/streams.go @@ -0,0 +1,37 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package streams // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/streams" + +import ( + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/streams" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/data" +) + +type Ident = identity.Stream + +type ( + Seq[T any] streams.Seq[T] + Map[T any] streams.Map[T] +) + +type Aggregator[D data.Point[D]] interface { + Aggregate(Ident, D) (D, error) +} + +func IntoAggregator[D data.Point[D]](m Map[D]) MapAggr[D] { + return MapAggr[D]{Map: m} +} + +type MapAggr[D data.Point[D]] struct { + Map[D] +} + +func (a MapAggr[D]) Aggregate(id Ident, dp D) (D, error) { + err := a.Map.Store(id, dp) + v, _ := a.Map.Load(id) + return v, err +} + +type Evictor = streams.Evictor diff --git a/processor/deltatocumulativeprocessor/internal/telemetry/faults_test.go b/processor/deltatocumulativeprocessor/internal/telemetry/faults_test.go new file mode 100644 index 000000000000..4809d74fda04 --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/telemetry/faults_test.go @@ -0,0 +1,150 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package telemetry_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/otel/metric/noop" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/data" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/delta" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/streams" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/telemetry" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/testdata/random" +) + +// TestFaults verifies certain non-fatal errors are actually caused and +// subsequently dropped. It does so by writing bad samples to the actual +// implementation instead of fabricating errors manually. +func TestFaults(t *testing.T) { + type Map = streams.Map[data.Number] + type Case struct { + Name string + Map Map + Pre func(Map, identity.Stream, data.Number) error + Bad func(Map, identity.Stream, data.Number) error + Err error + } + + sum := random.Sum() + evid, evdp := sum.Stream() + + cases := []Case{ + { + Name: "older-start", + Pre: func(dps Map, id identity.Stream, dp data.Number) error { + dp.SetStartTimestamp(ts(20)) + dp.SetTimestamp(ts(30)) + return dps.Store(id, dp) + }, + Bad: func(dps Map, id identity.Stream, dp data.Number) error { + dp.SetStartTimestamp(ts(10)) + dp.SetTimestamp(ts(40)) + return dps.Store(id, dp) + }, + Err: delta.ErrOlderStart{Start: ts(20), Sample: ts(10)}, + }, + { + Name: "out-of-order", + Pre: func(dps Map, id identity.Stream, dp data.Number) error { + dp.SetTimestamp(ts(20)) + return dps.Store(id, dp) + }, + Bad: func(dps Map, id identity.Stream, dp data.Number) error { + dp.SetTimestamp(ts(10)) + return dps.Store(id, dp) + }, + Err: delta.ErrOutOfOrder{Last: ts(20), Sample: ts(10)}, + }, + { + Name: "gap", + Pre: func(dps Map, id identity.Stream, dp data.Number) error { + dp.SetStartTimestamp(ts(10)) + dp.SetTimestamp(ts(20)) + return dps.Store(id, dp) + }, + Bad: func(dps Map, id identity.Stream, dp data.Number) error { + dp.SetStartTimestamp(ts(30)) + dp.SetTimestamp(ts(40)) + return dps.Store(id, dp) + }, + Err: delta.ErrGap{From: ts(20), To: ts(30)}, + }, + { + Name: "limit", + Map: streams.Limit(delta.New[data.Number](), 1), + Pre: func(dps Map, id identity.Stream, dp data.Number) error { + dp.SetTimestamp(ts(10)) + return dps.Store(id, dp) + }, + Bad: func(dps Map, _ identity.Stream, _ data.Number) error { + id, dp := sum.Stream() + dp.SetTimestamp(ts(20)) + return dps.Store(id, dp) + }, + Err: streams.ErrLimit(1), + }, + { + Name: "evict", + Map: func() Map { + ev := HeadEvictor[data.Number]{Map: delta.New[data.Number]()} + lim := streams.Limit(ev, 1) + lim.Evictor = ev + return lim + }(), + Pre: func(dps Map, _ identity.Stream, _ data.Number) error { + evdp.SetTimestamp(ts(10)) + return dps.Store(evid, evdp) + }, + Bad: func(dps Map, _ identity.Stream, _ data.Number) error { + id, dp := sum.Stream() + dp.SetTimestamp(ts(20)) + return dps.Store(id, dp) + }, + Err: streams.ErrEvicted{Ident: evid, ErrLimit: streams.ErrLimit(1)}, + }, + } + + for _, c := range cases { + t.Run(c.Name, func(t *testing.T) { + id, dp := sum.Stream() + tel := telemetry.New(noop.Meter{}) + + dps := c.Map + if dps == nil { + dps = delta.New[data.Number]() + } + onf := telemetry.ObserveNonFatal(dps, &tel.Metrics) + + if c.Pre != nil { + err := c.Pre(onf, id, dp.Clone()) + require.NoError(t, err) + } + + err := c.Bad(dps, id, dp.Clone()) + require.Equal(t, c.Err, err) + + err = c.Bad(onf, id, dp.Clone()) + require.NoError(t, err) + }) + } +} + +type ts = pcommon.Timestamp + +// HeadEvictor drops the first stream on Evict() +type HeadEvictor[T any] struct{ streams.Map[T] } + +func (e HeadEvictor[T]) Evict() (evicted identity.Stream) { + e.Items()(func(id identity.Stream, _ T) bool { + e.Delete(id) + evicted = id + return false + }) + return evicted +} diff --git a/processor/deltatocumulativeprocessor/internal/telemetry/metrics.go b/processor/deltatocumulativeprocessor/internal/telemetry/metrics.go new file mode 100644 index 000000000000..869a94d74046 --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/telemetry/metrics.go @@ -0,0 +1,199 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package telemetry // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/telemetry" + +import ( + "context" + "errors" + + "go.opentelemetry.io/collector/processor/processorhelper" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" + + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/delta" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/streams" +) + +type Telemetry struct { + Metrics +} + +func New(meter metric.Meter) Telemetry { + return Telemetry{ + Metrics: metrics(meter), + } +} + +type Streams struct { + tracked metric.Int64UpDownCounter + limit metric.Int64ObservableGauge + evicted metric.Int64Counter +} + +type Datapoints struct { + total metric.Int64Counter + dropped metric.Int64Counter +} + +type Metrics struct { + streams Streams + dps Datapoints + + gaps metric.Int64Counter +} + +func metrics(meter metric.Meter) Metrics { + var ( + count = use(meter.Int64Counter) + updown = use(meter.Int64UpDownCounter) + gauge = use(meter.Int64ObservableGauge) + ) + + return Metrics{ + streams: Streams{ + tracked: updown("streams.tracked", + metric.WithDescription("number of streams tracked"), + metric.WithUnit("{stream}"), + ), + limit: gauge("streams.limit", + metric.WithDescription("upper limit of tracked streams"), + metric.WithUnit("{stream}"), + ), + evicted: count("streams.evicted", + metric.WithDescription("number of streams evicted"), + metric.WithUnit("{stream}"), + ), + }, + dps: Datapoints{ + total: count("datapoints.processed", + metric.WithDescription("number of datapoints processed"), + metric.WithUnit("{datapoint}"), + ), + dropped: count("datapoints.dropped", + metric.WithDescription("number of dropped datapoints due to given 'reason'"), + metric.WithUnit("{datapoint}"), + ), + }, + gaps: count("gaps.length", + metric.WithDescription("total duration where data was expected but not received"), + metric.WithUnit("s"), + ), + } +} + +func (m Metrics) WithLimit(meter metric.Meter, max int64) { + then := metric.Callback(func(_ context.Context, o metric.Observer) error { + o.ObserveInt64(m.streams.limit, max) + return nil + }) + _, err := meter.RegisterCallback(then, m.streams.limit) + if err != nil { + panic(err) + } +} + +func ObserveItems[T any](items streams.Map[T], metrics *Metrics) Items[T] { + return Items[T]{ + Map: items, + Metrics: metrics, + } +} + +func ObserveNonFatal[T any](items streams.Map[T], metrics *Metrics) Faults[T] { + return Faults[T]{ + Map: items, + Metrics: metrics, + } +} + +type Items[T any] struct { + streams.Map[T] + *Metrics +} + +func (i Items[T]) Store(id streams.Ident, v T) error { + inc(i.dps.total) + + _, old := i.Map.Load(id) + err := i.Map.Store(id, v) + if err == nil && !old { + inc(i.streams.tracked) + } + + return err +} + +func (i Items[T]) Delete(id streams.Ident) { + dec(i.streams.tracked) + i.Map.Delete(id) +} + +type Faults[T any] struct { + streams.Map[T] + *Metrics +} + +func (f Faults[T]) Store(id streams.Ident, v T) error { + var ( + olderStart delta.ErrOlderStart + outOfOrder delta.ErrOutOfOrder + gap delta.ErrGap + limit streams.ErrLimit + evict streams.ErrEvicted + ) + + err := f.Map.Store(id, v) + switch { + default: + return err + case errors.As(err, &olderStart): + inc(f.dps.dropped, reason("older-start")) + case errors.As(err, &outOfOrder): + inc(f.dps.dropped, reason("out-of-order")) + case errors.As(err, &limit): + inc(f.dps.dropped, reason("stream-limit")) + case errors.As(err, &evict): + inc(f.streams.evicted) + case errors.As(err, &gap): + from := gap.From.AsTime() + to := gap.To.AsTime() + lost := to.Sub(from).Seconds() + f.gaps.Add(context.TODO(), int64(lost)) + } + + return nil +} + +var ( + _ streams.Map[any] = (*Items[any])(nil) + _ streams.Map[any] = (*Faults[any])(nil) +) + +type addable[Opts any] interface { + Add(context.Context, int64, ...Opts) +} + +func inc[A addable[O], O any](a A, opts ...O) { + a.Add(context.Background(), 1, opts...) +} + +func dec[A addable[O], O any](a A, opts ...O) { + a.Add(context.Background(), -1, opts...) +} + +func reason(reason string) metric.AddOption { + return metric.WithAttributes(attribute.String("reason", reason)) +} + +func use[F func(string, ...O) (M, error), M any, O any](f F) func(string, ...O) M { + return func(name string, opts ...O) M { + name = processorhelper.BuildCustomMetricName(metadata.Type.String(), name) + m, err := f(name, opts...) + if err != nil { + panic(err) + } + return m + } +} diff --git a/processor/deltatocumulativeprocessor/internal/testdata/random/random.go b/processor/deltatocumulativeprocessor/internal/testdata/random/random.go new file mode 100644 index 000000000000..58ec3c2488c8 --- /dev/null +++ b/processor/deltatocumulativeprocessor/internal/testdata/random/random.go @@ -0,0 +1,75 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package random + +import ( + "math" + "math/rand" + "strconv" + "time" + + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/identity" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/data" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/metrics" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/streams" +) + +func Sum() Metric { + metric := pmetric.NewMetric() + metric.SetEmptySum() + metric.SetName(randStr()) + metric.SetDescription(randStr()) + metric.SetUnit(randStr()) + return Metric{Metric: metrics.From(Resource(), Scope(), metric)} +} + +type Metric struct { + metrics.Metric +} + +func (m Metric) Stream() (streams.Ident, data.Number) { + dp := pmetric.NewNumberDataPoint() + dp.SetIntValue(int64(randInt())) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + + for i := 0; i < 10; i++ { + dp.Attributes().PutStr(randStr(), randStr()) + } + id := identity.OfStream(m.Ident(), dp) + + return id, data.Number{NumberDataPoint: dp} +} + +func Resource() pcommon.Resource { + res := pcommon.NewResource() + for i := 0; i < 10; i++ { + res.Attributes().PutStr(randStr(), randStr()) + } + return res +} + +func Scope() pcommon.InstrumentationScope { + scope := pcommon.NewInstrumentationScope() + scope.SetName(randStr()) + scope.SetVersion(randStr()) + for i := 0; i < 3; i++ { + scope.Attributes().PutStr(randStr(), randStr()) + } + return scope +} + +func randStr() string { + return strconv.FormatInt(randInt(), 16) +} + +func randInt() int64 { + return int64(rand.Intn(math.MaxInt16)) +} + +func randFloat() float64 { + return float64(randInt()) / float64(randInt()) +} diff --git a/processor/deltatocumulativeprocessor/metadata.yaml b/processor/deltatocumulativeprocessor/metadata.yaml new file mode 100644 index 000000000000..3c8dd9ad3fc9 --- /dev/null +++ b/processor/deltatocumulativeprocessor/metadata.yaml @@ -0,0 +1,11 @@ +type: deltatocumulative +scope_name: otelcol/deltatocumulative + +status: + class: processor + stability: + development: [metrics] + distributions: [] + warnings: [Statefulness] + codeowners: + active: [sh0rez, RichieSams] diff --git a/processor/deltatocumulativeprocessor/processor.go b/processor/deltatocumulativeprocessor/processor.go new file mode 100644 index 000000000000..89a7185031ec --- /dev/null +++ b/processor/deltatocumulativeprocessor/processor.go @@ -0,0 +1,137 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package deltatocumulativeprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor" + +import ( + "context" + "errors" + "sync" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/otel/metric" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics/staleness" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/data" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/delta" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/maybe" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/metrics" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/streams" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor/internal/telemetry" +) + +var _ processor.Metrics = (*Processor)(nil) + +type Processor struct { + next consumer.Metrics + + log *zap.Logger + ctx context.Context + cancel context.CancelFunc + + aggr streams.Aggregator[data.Number] + stale maybe.Ptr[staleness.Staleness[data.Number]] + + mtx sync.Mutex +} + +func newProcessor(cfg *Config, log *zap.Logger, meter metric.Meter, next consumer.Metrics) *Processor { + ctx, cancel := context.WithCancel(context.Background()) + + proc := Processor{ + log: log, + ctx: ctx, + cancel: cancel, + next: next, + } + + tel := telemetry.New(meter) + + var dps streams.Map[data.Number] + dps = delta.New[data.Number]() + dps = telemetry.ObserveItems(dps, &tel.Metrics) + + if cfg.MaxStale > 0 { + stale := maybe.Some(staleness.NewStaleness(cfg.MaxStale, dps)) + proc.stale = stale + dps, _ = stale.Try() + } + if cfg.MaxStreams > 0 { + tel.WithLimit(meter, int64(cfg.MaxStreams)) + lim := streams.Limit(dps, cfg.MaxStreams) + if stale, ok := proc.stale.Try(); ok { + lim.Evictor = stale + } + dps = lim + } + + dps = telemetry.ObserveNonFatal(dps, &tel.Metrics) + + proc.aggr = streams.IntoAggregator(dps) + return &proc +} + +func (p *Processor) Start(_ context.Context, _ component.Host) error { + stale, ok := p.stale.Try() + if !ok { + return nil + } + + go func() { + tick := time.NewTicker(time.Minute) + for { + select { + case <-p.ctx.Done(): + return + case <-tick.C: + p.mtx.Lock() + stale.ExpireOldEntries() + p.mtx.Unlock() + } + } + }() + return nil +} + +func (p *Processor) Shutdown(_ context.Context) error { + p.cancel() + return nil +} + +func (p *Processor) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: true} +} + +func (p *Processor) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error { + p.mtx.Lock() + defer p.mtx.Unlock() + + var errs error + + metrics.Each(md, func(m metrics.Metric) { + switch m.Type() { + case pmetric.MetricTypeSum: + sum := m.Sum() + if sum.AggregationTemporality() == pmetric.AggregationTemporalityDelta { + err := streams.Aggregate[data.Number](metrics.Sum(m), p.aggr) + errs = errors.Join(errs, err) + sum.SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + } + case pmetric.MetricTypeHistogram: + // TODO + case pmetric.MetricTypeExponentialHistogram: + // TODO + } + }) + + if errs != nil { + return errs + } + + return p.next.ConsumeMetrics(ctx, md) +} diff --git a/processor/deltatocumulativeprocessor/testdata/config.yaml b/processor/deltatocumulativeprocessor/testdata/config.yaml new file mode 100644 index 000000000000..28e34bde5c7b --- /dev/null +++ b/processor/deltatocumulativeprocessor/testdata/config.yaml @@ -0,0 +1,7 @@ +deltatocumulative/all: + max_stale: 1m + max_streams: 10 +deltatocumulative/set-valid-max_stale: + max_stale: 2m +deltatocumulative/set-valid-max_streams: + max_streams: 20 diff --git a/processor/deltatorateprocessor/README.md b/processor/deltatorateprocessor/README.md index 8f8f78ce4e6b..4e919130803f 100644 --- a/processor/deltatorateprocessor/README.md +++ b/processor/deltatorateprocessor/README.md @@ -3,15 +3,12 @@ | Status | | | ------------- |-----------| | Stability | [development]: metrics | -| Distributions | [contrib], [aws], [observiq], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Fdeltatorate%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Fdeltatorate) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Fdeltatorate%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Fdeltatorate) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9) | [development]: https://github.com/open-telemetry/opentelemetry-collector#development [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector **Status: under development; Not recommended for production usage.** diff --git a/processor/deltatorateprocessor/factory_test.go b/processor/deltatorateprocessor/factory_test.go index d1a99266229a..5b1f0c24cc9a 100644 --- a/processor/deltatorateprocessor/factory_test.go +++ b/processor/deltatorateprocessor/factory_test.go @@ -15,12 +15,14 @@ import ( "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/processor/processortest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor/internal/metadata" ) func TestType(t *testing.T) { factory := NewFactory() pType := factory.Type() - assert.Equal(t, pType, component.Type("deltatorate")) + assert.Equal(t, pType, metadata.Type) } func TestCreateDefaultConfig(t *testing.T) { diff --git a/processor/deltatorateprocessor/generated_component_test.go b/processor/deltatorateprocessor/generated_component_test.go new file mode 100644 index 000000000000..903565be5c75 --- /dev/null +++ b/processor/deltatorateprocessor/generated_component_test.go @@ -0,0 +1,127 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package deltatorateprocessor + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "metrics", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsProcessor(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(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/processor/deltatorateprocessor/go.mod b/processor/deltatorateprocessor/go.mod index 486fca954222..66a4b217432d 100644 --- a/processor/deltatorateprocessor/go.mod +++ b/processor/deltatorateprocessor/go.mod @@ -1,46 +1,57 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/processor v0.89.0 - go.uber.org/zap v1.26.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.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.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/processor/deltatorateprocessor/go.sum b/processor/deltatorateprocessor/go.sum index 942f9cb9e4b9..b410dcd94964 100644 --- a/processor/deltatorateprocessor/go.sum +++ b/processor/deltatorateprocessor/go.sum @@ -1,52 +1,28 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +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/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/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -55,15 +31,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -73,97 +48,80 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -171,38 +129,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/deltatorateprocessor/internal/metadata/generated_status.go b/processor/deltatorateprocessor/internal/metadata/generated_status.go index 899bb228db56..e26491a4d2c9 100644 --- a/processor/deltatorateprocessor/internal/metadata/generated_status.go +++ b/processor/deltatorateprocessor/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("deltatorate") ) const ( - Type = "deltatorate" MetricsStability = component.StabilityLevelDevelopment ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/deltatorate") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/deltatorate") +} diff --git a/processor/deltatorateprocessor/metadata.yaml b/processor/deltatorateprocessor/metadata.yaml index 1198892cbc5f..87b0b6c9802d 100644 --- a/processor/deltatorateprocessor/metadata.yaml +++ b/processor/deltatorateprocessor/metadata.yaml @@ -1,9 +1,12 @@ type: deltatorate +scope_name: otelcol/deltatorate status: class: processor stability: development: [metrics] - distributions: [contrib, observiq, sumo, aws] + distributions: [contrib] codeowners: - active: [Aneurysm9] \ No newline at end of file + active: [Aneurysm9] +tests: + config: diff --git a/processor/deltatorateprocessor/package_test.go b/processor/deltatorateprocessor/package_test.go new file mode 100644 index 000000000000..a5033fd28efd --- /dev/null +++ b/processor/deltatorateprocessor/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package deltatorateprocessor + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/processor/deltatorateprocessor/processor_test.go b/processor/deltatorateprocessor/processor_test.go index 1bf5f68d5a72..3e8ba37177b8 100644 --- a/processor/deltatorateprocessor/processor_test.go +++ b/processor/deltatorateprocessor/processor_test.go @@ -126,7 +126,7 @@ func TestCumulativeToDeltaProcessor(t *testing.T) { next, ) assert.NotNil(t, mgp) - assert.Nil(t, err) + assert.NoError(t, err) caps := mgp.Capabilities() assert.True(t, caps.MutatesData) diff --git a/processor/filterprocessor/README.md b/processor/filterprocessor/README.md index 9cc02b6937a0..a80dd12b7dff 100644 --- a/processor/filterprocessor/README.md +++ b/processor/filterprocessor/README.md @@ -3,7 +3,7 @@ | Status | | | ------------- |-----------| | Stability | [alpha]: traces, metrics, logs | -| Distributions | [core], [contrib], [aws], [observiq], [redhat], [splunk], [sumo] | +| Distributions | [core], [contrib] | | Warnings | [Orphaned Telemetry, Other](#warnings) | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Ffilter%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Ffilter) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Ffilter%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Ffilter) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@TylerHelmuth](https://www.github.com/TylerHelmuth), [@boostchicken](https://www.github.com/boostchicken) | @@ -11,11 +11,6 @@ [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector -[redhat]: https://github.com/os-observability/redhat-opentelemetry-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector The filterprocessor allows dropping spans, span events, metrics, datapoints, and logs from the collector. @@ -48,10 +43,11 @@ If all datapoints for a metric are dropped, the metric will also be dropped. The filter processor also allows configuring an optional field, `error_mode`, which will determine how the processor reacts to errors that occur while processing an OTTL condition. -| error_mode | description | -|-----------------------|----------------------------------------------------------------------------------------------------------------------------| -| ignore | The processor ignores errors returned by conditions and continues on to the next condition. This is the recommended mode. | -| propagate | The processor returns the error up the pipeline. This will result in the payload being dropped from the collector. | +| error_mode | description | +|------------|----------------------------------------------------------------------------------------------------------------------------------------| +| ignore | The processor ignores errors returned by conditions, logs them, and continues on to the next condition. This is the recommended mode. | +| silent | The processor ignores errors returned by conditions, does not log them, and continues on to the next condition. | +| propagate | The processor returns the error up the pipeline. This will result in the payload being dropped from the collector. | If not specified, `propagate` will be used. @@ -82,36 +78,55 @@ processors: - 'severity_number < SEVERITY_NUMBER_WARN' ``` -#### Dropping non-HTTP spans +#### Dropping data based on a resource attribute ```yaml processors: - filter/httponly: + filter: error_mode: ignore traces: span: - - attributes["http.request.method"] == nil + - IsMatch(resource.attributes["k8s.pod.name"], "my-pod-name.*") ``` -#### Dropping HTTP spans +#### Dropping metrics with invalid type ```yaml processors: - filter/drophttp: + filter: error_mode: ignore - traces: - span: - - attributes["http.request.method"] != nil + metrics: + metric: + - type == METRIC_DATA_TYPE_NONE ``` -#### Dropping metrics with invalid type +#### Dropping specific metric and value ```yaml processors: - filter/dropempty: + filter: error_mode: ignore metrics: - metric: - - type == METRIC_DATA_TYPE_NONE + datapoint: + - metric.name == "k8s.pod.phase" && value_int == 4 ``` +#### Dropping non-HTTP spans +```yaml +processors: + filter: + error_mode: ignore + traces: + span: + - attributes["http.request.method"] == nil +``` + +#### Dropping HTTP spans +```yaml +processors: + filter: + error_mode: ignore + traces: + span: + - attributes["http.request.method"] != nil +``` ### OTTL Functions @@ -128,308 +143,39 @@ In addition, the processor defines a few of its own functions: `HasAttrKeyOnDatapoint(key)` Returns `true` if the given key appears in the attribute map of any datapoint on a metric. -`key` must be a string. +`key` must be a string. You must use the `metrics.metric` context. Examples: - `HasAttrKeyOnDatapoint("http.method")` +```yaml +# Drops metrics containing the 'bad.metric' attribute key +filter/keep_good_metrics: + error_mode: ignore + metrics: + metric: + - 'HasAttrKeyOnDatapoint("bad.metric")' +``` + #### HasAttrOnDatapoint `HasAttrOnDatapoint(key, value)` Returns `true` if the given key and value appears in the attribute map of any datapoint on a metric. -`key` and `value` must both be strings. +`key` and `value` must both be strings. If the value of the attribute on the datapoint is not a string, `value` will be compared to `""`. You must use the `metrics.metric` context. Examples: - `HasAttrOnDatapoint("http.method", "GET")` -## Alternative Config Options - -All the following configurations can be expressed using OTTL configuration -and may eventually be deprecated as part of [#18642](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/18642). - -The filter processor can be configured to include or exclude: - -- Logs, based on resource attributes using the `strict` or `regexp` match types -- Metrics based on metric name in the case of the `strict` or `regexp` match types, - or based on other metric attributes in the case of the `expr` match type. - Please refer to [config.go](./config.go) for the config spec. -- Spans based on span names and resource attributes, all with full regex support - -It takes a pipeline type, of which `logs` `metrics`, and `traces` are supported, followed -by an action: - -- `include`: Any names NOT matching filters are excluded from remainder of pipeline -- `exclude`: Any names matching filters are excluded from remainder of pipeline - -For the actions the following parameters are required: - -For logs: - -- `match_type`: `strict`|`regexp` -- `resource_attributes`: ResourceAttributes defines a list of possible resource - attributes to match logs against. - A match occurs if any resource attribute matches all expressions in this given list. -- `record_attributes`: RecordAttributes defines a list of possible record - attributes to match logs against. - A match occurs if any record attribute matches all expressions in this given list. -- `severity_texts`: SeverityTexts defines a list of possible severity texts to match the logs against. - A match occurs if the record matches any expression in this given list. -- `bodies`: Bodies defines a list of possible log bodies to match the logs against. - A match occurs if the record matches any expression in this given list. -- `severity_number`: SeverityNumber defines how to match a record based on its SeverityNumber. - The following can be configured for matching a log record's SeverityNumber: - - `min`: Min defines the minimum severity with which a log record should match. - e.g. if this is "WARN", all log records with "WARN" severity and above (WARN[2-4], ERROR[2-4], FATAL[2-4]) are matched. - The list of valid severities that may be used for this option can be found [here](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#displaying-severity). You may use either the numerical "SeverityNumber" or the "Short Name" - - `match_undefined`: MatchUndefinedSeverity defines whether to match logs with undefined severity or not when using the `min_severity` matching option. - By default, this is `false`. - -For metrics: - -- `match_type`: `strict`|`regexp`|`expr` -- `metric_names`: (only for a `match_type` of `strict` or `regexp`) list of strings - or re2 regex patterns -- `expressions`: (only for a `match_type` of `expr`) list of `expr` expressions - (see "Using an `expr` match_type" below) -- `resource_attributes`: ResourceAttributes defines a list of possible resource - attributes to match metrics against. - A match occurs if any resource attribute matches all expressions in this given list. - -This processor uses [re2 regex][re2_regex] for regex syntax. - -[re2_regex]: https://github.com/google/re2/wiki/Syntax - -More details can be found at [include/exclude metrics](../attributesprocessor/README.md#includeexclude-filtering). - -Examples: - -```yaml -processors: - filter/1: - metrics: - include: - match_type: regexp - metric_names: - - prefix/.* - - prefix_.* - resource_attributes: - - key: container.name - value: app_container_1 - exclude: - match_type: strict - metric_names: - - hello_world - - hello/world - filter/2: - logs: - include: - match_type: strict - resource_attributes: - - key: host.name - value: just_this_one_hostname - filter/regexp: - logs: - include: - match_type: regexp - resource_attributes: - - key: host.name - value: prefix.* - filter/regexp_record: - logs: - include: - match_type: regexp - record_attributes: - - key: record_attr - value: prefix_.* - # Filter on severity text field - filter/severity_text: - logs: - include: - match_type: regexp - severity_texts: - - INFO[2-4]? - - WARN[2-4]? - - ERROR[2-4]? - # Filter out logs below INFO (no DEBUG or TRACE level logs), - # retaining logs with undefined severity - filter/severity_number: - logs: - include: - severity_number: - min: "INFO" - match_undefined: true - filter/bodies: - logs: - include: - match_type: regexp - bodies: - - ^IMPORTANT RECORD -``` - -Refer to the config files in [testdata](./testdata) for detailed -examples on using the processor. - -### Using an "expr" match_type - -In addition to matching metric names with the `strict` or `regexp` match types, the filter processor -supports matching entire `Metric`s using the [expr](https://github.com/antonmedv/expr) expression engine. - -The `expr` filter evaluates the supplied boolean expressions _per datapoint_ on a metric, and returns a result -for the entire metric. If any datapoint evaluates to true then the entire metric evaluates to true, otherwise -false. - -Made available to the expression environment are the following: - -* `MetricName` - a variable containing the current Metric's name -* `MetricType` - a variable containing the current Metric's type: "Gauge", "Sum", "Histogram", "ExponentialHistogram" or "Summary". -* `Label(name)` - a function that takes a label name string as an argument and returns a string: the value of a label with that - name if one exists, or "" -* `HasLabel(name)` - a function that takes a label name string as an argument and returns a boolean: true if the datapoint has a label - with that name, false otherwise - -Example: - -```yaml -processors: - filter/1: - metrics: - exclude: - match_type: expr - expressions: - - MetricName == "my.metric" && Label("my_label") == "abc123" - - MetricType == "Histogram" -``` - -The above config will filter out any Metric that both has the name "my.metric" and has at least one datapoint -with a label of 'my_label="abc123"'. - -### Support for multiple expressions - -As with `strict` and `regexp`, multiple `expr` expressions are allowed. - -For example, the following two filters have the same effect: they filter out metrics named "system.cpu.time" and -"system.disk.io". - ```yaml -processors: - filter/expr: - metrics: - exclude: - match_type: expr - expressions: - - MetricName == "system.cpu.time" - - MetricName == "system.disk.io" - filter/strict: - metrics: - exclude: - match_type: strict - metric_names: - - system.cpu.time - - system.disk.io -``` - -The expressions are effectively ORed per datapoint. So for the above `expr` configuration, given a datapoint, if its -parent Metric's name is "system.cpu.time" or "system.disk.io" then there's a match. The conditions are tested against -all the datapoints in a Metric until there's a match, in which case the entire Metric is considered a match, and in -the above example the Metric will be excluded. If after testing all the datapoints in a Metric against all the -expressions there isn't a match, the entire Metric is considered to be not matching. - - -### Filter metrics using resource attributes -In addition to the names, metrics can be filtered using resource attributes. `resource_attributes` takes a list of resource attributes to filter metrics against. - -Following example will include only the metrics coming from `app_container_1` (the value for `container.name` resource attribute is `app_container_1`). - -```yaml -processors: - filter/resource_attributes_include: - metrics: - include: - match_type: strict - metric_names: - - hello_world - - hello/world - resource_attributes: - - key: container.name - value: app_container_1 -``` - -Following example will exclude all the metrics coming from `app_container_1` (the value for `container.name` resource attribute is `app_container_1`). - -```yaml -processors: - filter/resource_attributes_exclude: - metrics: - exclude: - match_type: strict - metric_names: - - hello_world - - hello/world - resource_attributes: - - key: container.name - value: app_container_1 -``` - -We can also use `regexp` to filter metrics using resource attributes. Following example will include only the metrics coming from `app_container_1` or `app_container_2` (the value for `container.name` resource attribute is either `app_container_1` or `app_container_2`). - -```yaml -processors: - filter/resource_attributes_regexp: - metrics: - exclude: - match_type: regexp - metric_names: - - hello_world - - hello/world - resource_attributes: - - key: container.name - value: (app_container_1|app_container_1) -``` - -In case the no metric names are provided, `matric_names` being empty, the filtering is only done at resource level. - -### Filter Spans from Traces - -* This pipeline is able to drop spans and whole traces -* Note: If this drops a parent span, it does not search out it's children leading to a missing Span in your trace visualization - -See the documentation in the [attribute processor](../attributesprocessor/README.md) for syntax - -For spans, one of Services, SpanNames, Attributes, Resources or Libraries must be specified with a -non-empty value for a valid configuration. - -```yaml -processors: - filter/spans: - spans: - include: - match_type: strict - services: - - app_3 - exclude: - match_type: regexp - services: - - app_1 - - app_2 - span_names: - - hello_world - - hello/world - attributes: - - key: container.name - value: (app_container_1|app_container_2) - libraries: - - name: opentelemetry - version: 0.0-beta - resources: - - key: container.host - value: (localhost|127.0.0.1) +# Drops metrics containing the 'bad.metric' attribute key and 'true' value +filter/keep_good_metrics: + error_mode: ignore + metrics: + metric: + - 'HasAttrOnDatapoint("bad.metric", "true")' ``` ## Warnings diff --git a/processor/filterprocessor/config_test.go b/processor/filterprocessor/config_test.go index 667672c7c079..9ebf9ee47cba 100644 --- a/processor/filterprocessor/config_test.go +++ b/processor/filterprocessor/config_test.go @@ -40,7 +40,7 @@ func TestLoadingConfigStrict(t *testing.T) { expected *Config }{ { - id: component.NewIDWithName("filter", "empty"), + id: component.MustNewIDWithName("filter", "empty"), expected: &Config{ ErrorMode: ottl.PropagateError, Metrics: MetricFilters{ @@ -50,7 +50,7 @@ func TestLoadingConfigStrict(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "include"), + id: component.MustNewIDWithName("filter", "include"), expected: &Config{ ErrorMode: ottl.PropagateError, Metrics: MetricFilters{ @@ -58,7 +58,7 @@ func TestLoadingConfigStrict(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "exclude"), + id: component.MustNewIDWithName("filter", "exclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Metrics: MetricFilters{ @@ -66,7 +66,7 @@ func TestLoadingConfigStrict(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "includeexclude"), + id: component.MustNewIDWithName("filter", "includeexclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Metrics: MetricFilters{ @@ -126,7 +126,7 @@ func TestLoadingConfigStrictLogs(t *testing.T) { expected *Config }{ { - id: component.NewIDWithName("filter", "empty"), + id: component.MustNewIDWithName("filter", "empty"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -136,7 +136,7 @@ func TestLoadingConfigStrictLogs(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "include"), + id: component.MustNewIDWithName("filter", "include"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -144,7 +144,7 @@ func TestLoadingConfigStrictLogs(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "exclude"), + id: component.MustNewIDWithName("filter", "exclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -152,7 +152,7 @@ func TestLoadingConfigStrictLogs(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "includeexclude"), + id: component.MustNewIDWithName("filter", "includeexclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -199,7 +199,7 @@ func TestLoadingConfigSeverityLogsStrict(t *testing.T) { expected *Config }{ { - id: component.NewIDWithName("filter", "include"), + id: component.MustNewIDWithName("filter", "include"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -207,7 +207,7 @@ func TestLoadingConfigSeverityLogsStrict(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "exclude"), + id: component.MustNewIDWithName("filter", "exclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -215,7 +215,7 @@ func TestLoadingConfigSeverityLogsStrict(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "includeexclude"), + id: component.MustNewIDWithName("filter", "includeexclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -261,7 +261,7 @@ func TestLoadingConfigSeverityLogsRegexp(t *testing.T) { expected *Config }{ { - id: component.NewIDWithName("filter", "include"), + id: component.MustNewIDWithName("filter", "include"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -269,7 +269,7 @@ func TestLoadingConfigSeverityLogsRegexp(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "exclude"), + id: component.MustNewIDWithName("filter", "exclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -277,7 +277,7 @@ func TestLoadingConfigSeverityLogsRegexp(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "includeexclude"), + id: component.MustNewIDWithName("filter", "includeexclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -324,7 +324,7 @@ func TestLoadingConfigBodyLogsStrict(t *testing.T) { expected *Config }{ { - id: component.NewIDWithName("filter", "include"), + id: component.MustNewIDWithName("filter", "include"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -332,7 +332,7 @@ func TestLoadingConfigBodyLogsStrict(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "exclude"), + id: component.MustNewIDWithName("filter", "exclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -340,7 +340,7 @@ func TestLoadingConfigBodyLogsStrict(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "includeexclude"), + id: component.MustNewIDWithName("filter", "includeexclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -387,7 +387,7 @@ func TestLoadingConfigBodyLogsRegexp(t *testing.T) { expected *Config }{ { - id: component.NewIDWithName("filter", "include"), + id: component.MustNewIDWithName("filter", "include"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -395,7 +395,7 @@ func TestLoadingConfigBodyLogsRegexp(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "exclude"), + id: component.MustNewIDWithName("filter", "exclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -403,7 +403,7 @@ func TestLoadingConfigBodyLogsRegexp(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "includeexclude"), + id: component.MustNewIDWithName("filter", "includeexclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -452,7 +452,7 @@ func TestLoadingConfigMinSeverityNumberLogs(t *testing.T) { expected *Config }{ { - id: component.NewIDWithName("filter", "include"), + id: component.MustNewIDWithName("filter", "include"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -460,7 +460,7 @@ func TestLoadingConfigMinSeverityNumberLogs(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "exclude"), + id: component.MustNewIDWithName("filter", "exclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -468,7 +468,7 @@ func TestLoadingConfigMinSeverityNumberLogs(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "includeexclude"), + id: component.MustNewIDWithName("filter", "includeexclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Logs: LogFilters{ @@ -521,7 +521,7 @@ func TestLoadingConfigRegexp(t *testing.T) { expected component.Config }{ { - id: component.NewIDWithName("filter", "include"), + id: component.MustNewIDWithName("filter", "include"), expected: &Config{ ErrorMode: ottl.PropagateError, Metrics: MetricFilters{ @@ -529,7 +529,7 @@ func TestLoadingConfigRegexp(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "exclude"), + id: component.MustNewIDWithName("filter", "exclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Metrics: MetricFilters{ @@ -537,7 +537,7 @@ func TestLoadingConfigRegexp(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "unlimitedcache"), + id: component.MustNewIDWithName("filter", "unlimitedcache"), expected: &Config{ ErrorMode: ottl.PropagateError, Metrics: MetricFilters{ @@ -551,7 +551,7 @@ func TestLoadingConfigRegexp(t *testing.T) { }, }, }, { - id: component.NewIDWithName("filter", "limitedcache"), + id: component.MustNewIDWithName("filter", "limitedcache"), expected: &Config{ ErrorMode: ottl.PropagateError, Metrics: MetricFilters{ @@ -592,7 +592,7 @@ func TestLoadingSpans(t *testing.T) { expected component.Config }{ { - id: component.NewIDWithName("filter", "spans"), + id: component.MustNewIDWithName("filter", "spans"), expected: &Config{ ErrorMode: ottl.PropagateError, Spans: filterconfig.MatchConfig{ @@ -642,7 +642,7 @@ func TestLoadingConfigExpr(t *testing.T) { expected component.Config }{ { - id: component.NewIDWithName("filter", "empty"), + id: component.MustNewIDWithName("filter", "empty"), expected: &Config{ ErrorMode: ottl.PropagateError, Metrics: MetricFilters{ @@ -653,7 +653,7 @@ func TestLoadingConfigExpr(t *testing.T) { }, }, { - id: component.NewIDWithName("filter", "include"), + id: component.MustNewIDWithName("filter", "include"), expected: &Config{ ErrorMode: ottl.PropagateError, Metrics: MetricFilters{ @@ -668,7 +668,7 @@ func TestLoadingConfigExpr(t *testing.T) { }, }, { - id: component.NewIDWithName("filter", "exclude"), + id: component.MustNewIDWithName("filter", "exclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Metrics: MetricFilters{ @@ -683,7 +683,7 @@ func TestLoadingConfigExpr(t *testing.T) { }, }, { - id: component.NewIDWithName("filter", "includeexclude"), + id: component.MustNewIDWithName("filter", "includeexclude"), expected: &Config{ ErrorMode: ottl.PropagateError, Metrics: MetricFilters{ @@ -842,7 +842,7 @@ func TestLoadingConfigOTTL(t *testing.T) { errorMessage string }{ { - id: component.NewIDWithName("filter", "ottl"), + id: component.MustNewIDWithName("filter", "ottl"), expected: &Config{ ErrorMode: ottl.IgnoreError, Traces: TraceFilters{ @@ -869,7 +869,7 @@ func TestLoadingConfigOTTL(t *testing.T) { }, }, { - id: component.NewIDWithName("filter", "multiline"), + id: component.MustNewIDWithName("filter", "multiline"), expected: &Config{ ErrorMode: ottl.PropagateError, Traces: TraceFilters{ diff --git a/processor/filterprocessor/factory.go b/processor/filterprocessor/factory.go index bf06c4548fc9..894a190b2c53 100644 --- a/processor/filterprocessor/factory.go +++ b/processor/filterprocessor/factory.go @@ -40,7 +40,7 @@ func createMetricsProcessor( cfg component.Config, nextConsumer consumer.Metrics, ) (processor.Metrics, error) { - fp, err := newFilterMetricProcessor(set.TelemetrySettings, cfg.(*Config)) + fp, err := newFilterMetricProcessor(set, cfg.(*Config)) if err != nil { return nil, err } @@ -59,7 +59,7 @@ func createLogsProcessor( cfg component.Config, nextConsumer consumer.Logs, ) (processor.Logs, error) { - fp, err := newFilterLogsProcessor(set.TelemetrySettings, cfg.(*Config)) + fp, err := newFilterLogsProcessor(set, cfg.(*Config)) if err != nil { return nil, err } @@ -78,7 +78,7 @@ func createTracesProcessor( cfg component.Config, nextConsumer consumer.Traces, ) (processor.Traces, error) { - fp, err := newFilterSpansProcessor(set.TelemetrySettings, cfg.(*Config)) + fp, err := newFilterSpansProcessor(set, cfg.(*Config)) if err != nil { return nil, err } diff --git a/processor/filterprocessor/factory_test.go b/processor/filterprocessor/factory_test.go index 0a1dfa49ae73..6a241a1e289a 100644 --- a/processor/filterprocessor/factory_test.go +++ b/processor/filterprocessor/factory_test.go @@ -18,13 +18,14 @@ import ( "go.opentelemetry.io/collector/processor/processortest" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor/internal/metadata" ) func TestType(t *testing.T) { factory := NewFactory() pType := factory.Type() - assert.Equal(t, pType, component.Type("filter")) + assert.Equal(t, pType, metadata.Type) } func TestCreateDefaultConfig(t *testing.T) { diff --git a/processor/filterprocessor/generated_component_test.go b/processor/filterprocessor/generated_component_test.go new file mode 100644 index 000000000000..855f7e947b12 --- /dev/null +++ b/processor/filterprocessor/generated_component_test.go @@ -0,0 +1,141 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package filterprocessor + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "metrics", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesProcessor(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(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/processor/filterprocessor/go.mod b/processor/filterprocessor/go.mod index 377063724054..39a801a3e10f 100644 --- a/processor/filterprocessor/go.mod +++ b/processor/filterprocessor/go.mod @@ -1,59 +1,70 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/processor v0.89.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/otel v1.25.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/sdk/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/alecthomas/participle/v2 v2.1.0 // indirect - github.com/antonmedv/expr v1.15.3 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/expr-lang/expr v1.16.3 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gobwas/glob v0.2.3 // 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.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/iancoleman/strcase v0.3.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/semconv v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/collector/semconv v0.98.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/processor/filterprocessor/go.sum b/processor/filterprocessor/go.sum index db935fd9b63b..50f3bdddb963 100644 --- a/processor/filterprocessor/go.sum +++ b/processor/filterprocessor/go.sum @@ -1,65 +1,44 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= -github.com/alecthomas/participle/v2 v2.1.0 h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4= -github.com/alecthomas/participle/v2 v2.1.0/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/expr-lang/expr v1.16.3 h1:NLldf786GffptcXNxxJx5dQ+FzeWDKChBDqOOwyK8to= +github.com/expr-lang/expr v1.16.3/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= 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/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.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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -70,15 +49,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -88,101 +66,86 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -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/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -190,38 +153,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/filterprocessor/internal/metadata/generated_status.go b/processor/filterprocessor/internal/metadata/generated_status.go index 806ad2fabe77..93587e1c6d07 100644 --- a/processor/filterprocessor/internal/metadata/generated_status.go +++ b/processor/filterprocessor/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("filter") ) const ( - Type = "filter" TracesStability = component.StabilityLevelAlpha MetricsStability = component.StabilityLevelAlpha LogsStability = component.StabilityLevelAlpha ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/filter") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/filter") +} diff --git a/processor/filterprocessor/logs.go b/processor/filterprocessor/logs.go index d8d2fb175930..421eea9c8b6e 100644 --- a/processor/filterprocessor/logs.go +++ b/processor/filterprocessor/logs.go @@ -7,8 +7,8 @@ import ( "context" "fmt" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processorhelper" "go.uber.org/multierr" "go.uber.org/zap" @@ -21,18 +21,26 @@ import ( ) type filterLogProcessor struct { - skipExpr expr.BoolExpr[ottllog.TransformContext] - logger *zap.Logger + skipExpr expr.BoolExpr[ottllog.TransformContext] + telemetry *filterProcessorTelemetry + logger *zap.Logger } -func newFilterLogsProcessor(set component.TelemetrySettings, cfg *Config) (*filterLogProcessor, error) { +func newFilterLogsProcessor(set processor.CreateSettings, cfg *Config) (*filterLogProcessor, error) { flp := &filterLogProcessor{ logger: set.Logger, } + + fpt, err := newfilterProcessorTelemetry(set) + if err != nil { + return nil, fmt.Errorf("error creating filter processor telemetry: %w", err) + } + flp.telemetry = fpt + if cfg.Logs.LogConditions != nil { - skipExpr, err := filterottl.NewBoolExprForLog(cfg.Logs.LogConditions, filterottl.StandardLogFuncs(), cfg.ErrorMode, set) - if err != nil { - return nil, err + skipExpr, errBoolExpr := filterottl.NewBoolExprForLog(cfg.Logs.LogConditions, filterottl.StandardLogFuncs(), cfg.ErrorMode, set.TelemetrySettings) + if errBoolExpr != nil { + return nil, errBoolExpr } flp.skipExpr = skipExpr return flp, nil @@ -61,6 +69,8 @@ func (flp *filterLogProcessor) processLogs(ctx context.Context, ld plog.Logs) (p return ld, nil } + logCountBeforeFilters := ld.LogRecordCount() + var errors error ld.ResourceLogs().RemoveIf(func(rl plog.ResourceLogs) bool { resource := rl.Resource() @@ -81,6 +91,9 @@ func (flp *filterLogProcessor) processLogs(ctx context.Context, ld plog.Logs) (p return rl.ScopeLogs().Len() == 0 }) + logCountAfterFilters := ld.LogRecordCount() + flp.telemetry.record(triggerLogsDropped, int64(logCountBeforeFilters-logCountAfterFilters)) + if errors != nil { flp.logger.Error("failed processing logs", zap.Error(errors)) return ld, errors diff --git a/processor/filterprocessor/logs_test.go b/processor/filterprocessor/logs_test.go index d53e2077058a..104bf1ad91c5 100644 --- a/processor/filterprocessor/logs_test.go +++ b/processor/filterprocessor/logs_test.go @@ -10,7 +10,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" @@ -586,7 +585,7 @@ func TestFilterLogProcessor(t *testing.T) { next, ) assert.NotNil(t, flp) - assert.Nil(t, err) + assert.NoError(t, err) caps := flp.Capabilities() assert.True(t, caps.MutatesData) @@ -742,13 +741,13 @@ func TestFilterLogProcessorWithOTTL(t *testing.T) { conditions: []string{ `Substring("", 0, 100) == "test"`, }, - want: func(ld plog.Logs) {}, + want: func(_ plog.Logs) {}, errorMode: ottl.IgnoreError, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - processor, err := newFilterLogsProcessor(componenttest.NewNopTelemetrySettings(), &Config{Logs: LogFilters{LogConditions: tt.conditions}}) + processor, err := newFilterLogsProcessor(processortest.NewNopCreateSettings(), &Config{Logs: LogFilters{LogConditions: tt.conditions}}) assert.NoError(t, err) got, err := processor.processLogs(context.Background(), constructLogs()) @@ -764,6 +763,22 @@ func TestFilterLogProcessorWithOTTL(t *testing.T) { } } +func TestFilterLogProcessorTelemetry(t *testing.T) { + telemetryTest(t, "FilterLogProcessorTelemetry", func(t *testing.T, tel testTelemetry) { + processor, err := newFilterLogsProcessor(tel.NewProcessorCreateSettings(), &Config{ + Logs: LogFilters{LogConditions: []string{`IsMatch(body, "operationA")`}}, + }) + assert.NoError(t, err) + + _, err = processor.processLogs(context.Background(), constructLogs()) + assert.NoError(t, err) + + tel.assertMetrics(t, expectedMetrics{ + logsFiltered: 2, + }) + }) +} + func constructLogs() plog.Logs { td := plog.NewLogs() rs0 := td.ResourceLogs().AppendEmpty() diff --git a/processor/filterprocessor/metadata.yaml b/processor/filterprocessor/metadata.yaml index eb3d801a6383..9f990cd5fa27 100644 --- a/processor/filterprocessor/metadata.yaml +++ b/processor/filterprocessor/metadata.yaml @@ -1,10 +1,13 @@ type: filter +scope_name: otelcol/filter status: class: processor stability: alpha: [traces, metrics, logs] - distributions: [core, contrib, splunk, observiq, sumo, aws, redhat] + distributions: [core, contrib] warnings: [Orphaned Telemetry, Other] codeowners: - active: [TylerHelmuth, boostchicken] \ No newline at end of file + active: [TylerHelmuth, boostchicken] +tests: + config: diff --git a/processor/filterprocessor/metrics.go b/processor/filterprocessor/metrics.go index 31fae0dfad5b..10551d3dd117 100644 --- a/processor/filterprocessor/metrics.go +++ b/processor/filterprocessor/metrics.go @@ -5,10 +5,11 @@ package filterprocessor // import "github.com/open-telemetry/opentelemetry-colle import ( "context" + "fmt" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processorhelper" "go.uber.org/multierr" "go.uber.org/zap" @@ -28,24 +29,32 @@ type filterMetricProcessor struct { skipResourceExpr expr.BoolExpr[ottlresource.TransformContext] skipMetricExpr expr.BoolExpr[ottlmetric.TransformContext] skipDataPointExpr expr.BoolExpr[ottldatapoint.TransformContext] + telemetry *filterProcessorTelemetry logger *zap.Logger } -func newFilterMetricProcessor(set component.TelemetrySettings, cfg *Config) (*filterMetricProcessor, error) { +func newFilterMetricProcessor(set processor.CreateSettings, cfg *Config) (*filterMetricProcessor, error) { var err error fsp := &filterMetricProcessor{ logger: set.Logger, } + + fpt, err := newfilterProcessorTelemetry(set) + if err != nil { + return nil, fmt.Errorf("error creating filter processor telemetry: %w", err) + } + fsp.telemetry = fpt + if cfg.Metrics.MetricConditions != nil || cfg.Metrics.DataPointConditions != nil { if cfg.Metrics.MetricConditions != nil { - fsp.skipMetricExpr, err = filterottl.NewBoolExprForMetric(cfg.Metrics.MetricConditions, filterottl.StandardMetricFuncs(), cfg.ErrorMode, set) + fsp.skipMetricExpr, err = filterottl.NewBoolExprForMetric(cfg.Metrics.MetricConditions, filterottl.StandardMetricFuncs(), cfg.ErrorMode, set.TelemetrySettings) if err != nil { return nil, err } } if cfg.Metrics.DataPointConditions != nil { - fsp.skipDataPointExpr, err = filterottl.NewBoolExprForDataPoint(cfg.Metrics.DataPointConditions, filterottl.StandardDataPointFuncs(), cfg.ErrorMode, set) + fsp.skipDataPointExpr, err = filterottl.NewBoolExprForDataPoint(cfg.Metrics.DataPointConditions, filterottl.StandardDataPointFuncs(), cfg.ErrorMode, set.TelemetrySettings) if err != nil { return nil, err } @@ -107,6 +116,8 @@ func (fmp *filterMetricProcessor) processMetrics(ctx context.Context, md pmetric return md, nil } + metricDataPointCountBeforeFilters := md.DataPointCount() + var errors error md.ResourceMetrics().RemoveIf(func(rmetrics pmetric.ResourceMetrics) bool { resource := rmetrics.Resource() @@ -161,6 +172,9 @@ func (fmp *filterMetricProcessor) processMetrics(ctx context.Context, md pmetric return rmetrics.ScopeMetrics().Len() == 0 }) + metricDataPointCountAfterFilters := md.DataPointCount() + fmp.telemetry.record(triggerMetricDataPointsDropped, int64(metricDataPointCountBeforeFilters-metricDataPointCountAfterFilters)) + if errors != nil { fmp.logger.Error("failed processing metrics", zap.Error(errors)) return md, errors diff --git a/processor/filterprocessor/metrics_test.go b/processor/filterprocessor/metrics_test.go index 76708634d268..554484293537 100644 --- a/processor/filterprocessor/metrics_test.go +++ b/processor/filterprocessor/metrics_test.go @@ -11,7 +11,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" @@ -336,7 +335,7 @@ func TestFilterMetricProcessor(t *testing.T) { next, ) assert.NotNil(t, fmp) - assert.Nil(t, err) + assert.NoError(t, err) caps := fmp.Capabilities() assert.True(t, caps.MutatesData) @@ -366,6 +365,77 @@ func TestFilterMetricProcessor(t *testing.T) { } } +func TestFilterMetricProcessorTelemetry(t *testing.T) { + telemetryTest(t, "FilterMetricProcessorTelemetry", func(t *testing.T, tel testTelemetry) { + next := new(consumertest.MetricsSink) + cfg := &Config{ + Metrics: MetricFilters{ + MetricConditions: []string{ + "name==\"metric1\"", + }, + }, + } + factory := NewFactory() + fmp, err := factory.CreateMetricsProcessor( + context.Background(), + tel.NewProcessorCreateSettings(), + cfg, + next, + ) + assert.NotNil(t, fmp) + assert.NoError(t, err) + + caps := fmp.Capabilities() + assert.True(t, caps.MutatesData) + ctx := context.Background() + assert.NoError(t, fmp.Start(ctx, nil)) + + err = fmp.ConsumeMetrics(context.Background(), testResourceMetrics([]metricWithResource{ + { + metricNames: []string{"foo", "bar"}, + resourceAttributes: map[string]any{ + "attr1": "attr1/val1", + }, + }, + })) + assert.NoError(t, err) + + tel.assertMetrics(t, expectedMetrics{ + metricDataPointsFiltered: 0, + }) + + err = fmp.ConsumeMetrics(context.Background(), testResourceMetrics([]metricWithResource{ + { + metricNames: []string{"metric1", "metric2"}, + resourceAttributes: map[string]any{ + "attr1": "attr1/val1", + }, + }, + })) + assert.NoError(t, err) + + tel.assertMetrics(t, expectedMetrics{ + metricDataPointsFiltered: 1, + }) + + err = fmp.ConsumeMetrics(context.Background(), testResourceMetrics([]metricWithResource{ + { + metricNames: []string{"metric1"}, + resourceAttributes: map[string]any{ + "attr1": "attr1/val1", + }, + }, + })) + assert.NoError(t, err) + + tel.assertMetrics(t, expectedMetrics{ + metricDataPointsFiltered: 2, + }) + + assert.NoError(t, fmp.Shutdown(ctx)) + }) +} + func testResourceMetrics(mwrs []metricWithResource) pmetric.Metrics { md := pmetric.NewMetrics() now := time.Now() @@ -702,7 +772,7 @@ func TestFilterMetricProcessorWithOTTL(t *testing.T) { `Substring("", 0, 100) == "test"`, }, }, - want: func(md pmetric.Metrics) {}, + want: func(_ pmetric.Metrics) {}, errorMode: ottl.IgnoreError, }, { @@ -728,7 +798,7 @@ func TestFilterMetricProcessorWithOTTL(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - processor, err := newFilterMetricProcessor(componenttest.NewNopTelemetrySettings(), &Config{Metrics: tt.conditions, ErrorMode: tt.errorMode}) + processor, err := newFilterMetricProcessor(processortest.NewNopCreateSettings(), &Config{Metrics: tt.conditions, ErrorMode: tt.errorMode}) assert.NoError(t, err) got, err := processor.processMetrics(context.Background(), constructMetrics()) diff --git a/processor/filterprocessor/package_test.go b/processor/filterprocessor/package_test.go new file mode 100644 index 000000000000..3fa378477bfd --- /dev/null +++ b/processor/filterprocessor/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filterprocessor + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/processor/filterprocessor/telemetry.go b/processor/filterprocessor/telemetry.go new file mode 100644 index 000000000000..9267a142475f --- /dev/null +++ b/processor/filterprocessor/telemetry.go @@ -0,0 +1,88 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filterprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor" + +import ( + "context" + + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processorhelper" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" + + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor/internal/metadata" +) + +type trigger int + +const ( + triggerMetricDataPointsDropped trigger = iota + triggerLogsDropped + triggerSpansDropped +) + +type filterProcessorTelemetry struct { + exportCtx context.Context + + processorAttr []attribute.KeyValue + + datapointsFiltered metric.Int64Counter + logsFiltered metric.Int64Counter + spansFiltered metric.Int64Counter +} + +func newfilterProcessorTelemetry(set processor.CreateSettings) (*filterProcessorTelemetry, error) { + processorID := set.ID.String() + + fpt := &filterProcessorTelemetry{ + processorAttr: []attribute.KeyValue{attribute.String(metadata.Type.String(), processorID)}, + exportCtx: context.Background(), + } + + counter, err := metadata.Meter(set.TelemetrySettings).Int64Counter( + processorhelper.BuildCustomMetricName(metadata.Type.String(), "datapoints.filtered"), + metric.WithDescription("Number of metric data points dropped by the filter processor"), + metric.WithUnit("1"), + ) + if err != nil { + return nil, err + } + fpt.datapointsFiltered = counter + + counter, err = metadata.Meter(set.TelemetrySettings).Int64Counter( + processorhelper.BuildCustomMetricName(metadata.Type.String(), "logs.filtered"), + metric.WithDescription("Number of logs dropped by the filter processor"), + metric.WithUnit("1"), + ) + if err != nil { + return nil, err + } + fpt.logsFiltered = counter + + counter, err = metadata.Meter(set.TelemetrySettings).Int64Counter( + processorhelper.BuildCustomMetricName(metadata.Type.String(), "spans.filtered"), + metric.WithDescription("Number of spans dropped by the filter processor"), + metric.WithUnit("1"), + ) + if err != nil { + return nil, err + } + fpt.spansFiltered = counter + + return fpt, nil +} + +func (fpt *filterProcessorTelemetry) record(trigger trigger, dropped int64) { + var triggerMeasure metric.Int64Counter + switch trigger { + case triggerMetricDataPointsDropped: + triggerMeasure = fpt.datapointsFiltered + case triggerLogsDropped: + triggerMeasure = fpt.logsFiltered + case triggerSpansDropped: + triggerMeasure = fpt.spansFiltered + } + + triggerMeasure.Add(fpt.exportCtx, dropped, metric.WithAttributes(fpt.processorAttr...)) +} diff --git a/processor/filterprocessor/telemetry_test.go b/processor/filterprocessor/telemetry_test.go new file mode 100644 index 000000000000..0529df8a9917 --- /dev/null +++ b/processor/filterprocessor/telemetry_test.go @@ -0,0 +1,134 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filterprocessor + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor/internal/metadata" +) + +type testTelemetry struct { + reader *metric.ManualReader + meterProvider *metric.MeterProvider +} + +type expectedMetrics struct { + // processor_filter_metrics_filtered + metricDataPointsFiltered int64 + // processor_filter_logs_filtered + logsFiltered int64 + // processor_filter_spans_filtered + spansFiltered int64 +} + +func telemetryTest(t *testing.T, name string, testFunc func(t *testing.T, tel testTelemetry)) { + t.Run(name, func(t *testing.T) { + testFunc(t, setupTelemetry()) + }) +} + +func setupTelemetry() testTelemetry { + reader := metric.NewManualReader() + return testTelemetry{ + reader: reader, + meterProvider: metric.NewMeterProvider(metric.WithReader(reader)), + } +} + +func (tt *testTelemetry) NewProcessorCreateSettings() processor.CreateSettings { + settings := processortest.NewNopCreateSettings() + settings.MeterProvider = tt.meterProvider + settings.ID = component.NewID(metadata.Type) + + return settings +} + +func (tt *testTelemetry) assertMetrics(t *testing.T, expected expectedMetrics) { + var md metricdata.ResourceMetrics + require.NoError(t, tt.reader.Collect(context.Background(), &md)) + + if expected.metricDataPointsFiltered > 0 { + name := "processor_filter_datapoints.filtered" + got := tt.getMetric(name, md) + want := metricdata.Metrics{ + Name: name, + Description: "Number of metric data points dropped by the filter processor", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: expected.metricDataPointsFiltered, + Attributes: attribute.NewSet(attribute.String("filter", "filter")), + }, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + if expected.logsFiltered > 0 { + name := "processor_filter_logs.filtered" + got := tt.getMetric(name, md) + want := metricdata.Metrics{ + Name: name, + Description: "Number of logs dropped by the filter processor", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: expected.logsFiltered, + Attributes: attribute.NewSet(attribute.String("filter", "filter")), + }, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + if expected.spansFiltered > 0 { + name := "processor_filter_spans.filtered" + got := tt.getMetric(name, md) + want := metricdata.Metrics{ + Name: name, + Description: "Number of spans dropped by the filter processor", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: expected.spansFiltered, + Attributes: attribute.NewSet(attribute.String("filter", "filter")), + }, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } +} + +func (tt *testTelemetry) getMetric(name string, got metricdata.ResourceMetrics) metricdata.Metrics { + for _, sm := range got.ScopeMetrics { + for _, m := range sm.Metrics { + if m.Name == name { + return m + } + } + } + + return metricdata.Metrics{} +} diff --git a/processor/filterprocessor/traces.go b/processor/filterprocessor/traces.go index 9ca039c5b220..ff64e85470d1 100644 --- a/processor/filterprocessor/traces.go +++ b/processor/filterprocessor/traces.go @@ -5,9 +5,10 @@ package filterprocessor // import "github.com/open-telemetry/opentelemetry-colle import ( "context" + "fmt" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processorhelper" "go.uber.org/multierr" "go.uber.org/zap" @@ -22,23 +23,31 @@ import ( type filterSpanProcessor struct { skipSpanExpr expr.BoolExpr[ottlspan.TransformContext] skipSpanEventExpr expr.BoolExpr[ottlspanevent.TransformContext] + telemetry *filterProcessorTelemetry logger *zap.Logger } -func newFilterSpansProcessor(set component.TelemetrySettings, cfg *Config) (*filterSpanProcessor, error) { +func newFilterSpansProcessor(set processor.CreateSettings, cfg *Config) (*filterSpanProcessor, error) { var err error fsp := &filterSpanProcessor{ logger: set.Logger, } + + fpt, err := newfilterProcessorTelemetry(set) + if err != nil { + return nil, fmt.Errorf("error creating filter processor telemetry: %w", err) + } + fsp.telemetry = fpt + if cfg.Traces.SpanConditions != nil || cfg.Traces.SpanEventConditions != nil { if cfg.Traces.SpanConditions != nil { - fsp.skipSpanExpr, err = filterottl.NewBoolExprForSpan(cfg.Traces.SpanConditions, filterottl.StandardSpanFuncs(), cfg.ErrorMode, set) + fsp.skipSpanExpr, err = filterottl.NewBoolExprForSpan(cfg.Traces.SpanConditions, filterottl.StandardSpanFuncs(), cfg.ErrorMode, set.TelemetrySettings) if err != nil { return nil, err } } if cfg.Traces.SpanEventConditions != nil { - fsp.skipSpanEventExpr, err = filterottl.NewBoolExprForSpanEvent(cfg.Traces.SpanEventConditions, filterottl.StandardSpanEventFuncs(), cfg.ErrorMode, set) + fsp.skipSpanEventExpr, err = filterottl.NewBoolExprForSpanEvent(cfg.Traces.SpanEventConditions, filterottl.StandardSpanEventFuncs(), cfg.ErrorMode, set.TelemetrySettings) if err != nil { return nil, err } @@ -75,6 +84,8 @@ func (fsp *filterSpanProcessor) processTraces(ctx context.Context, td ptrace.Tra return td, nil } + spanCountBeforeFilters := td.SpanCount() + var errors error td.ResourceSpans().RemoveIf(func(rs ptrace.ResourceSpans) bool { resource := rs.Resource() @@ -108,6 +119,9 @@ func (fsp *filterSpanProcessor) processTraces(ctx context.Context, td ptrace.Tra return rs.ScopeSpans().Len() == 0 }) + spanCountAfterFilters := td.SpanCount() + fsp.telemetry.record(triggerSpansDropped, int64(spanCountBeforeFilters-spanCountAfterFilters)) + if errors != nil { fsp.logger.Error("failed processing traces", zap.Error(errors)) return td, errors diff --git a/processor/filterprocessor/traces_test.go b/processor/filterprocessor/traces_test.go index 0f68747d1ee8..afb7735fe961 100644 --- a/processor/filterprocessor/traces_test.go +++ b/processor/filterprocessor/traces_test.go @@ -10,7 +10,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" @@ -136,7 +135,7 @@ func TestFilterTraceProcessor(t *testing.T) { next, ) require.NotNil(t, fmp) - require.Nil(t, err) + require.NoError(t, err) caps := fmp.Capabilities() require.True(t, caps.MutatesData) @@ -258,13 +257,13 @@ func TestFilterTraceProcessorWithOTTL(t *testing.T) { `Substring("", 0, 100) == "test"`, }, }, - want: func(td ptrace.Traces) {}, + want: func(_ ptrace.Traces) {}, errorMode: ottl.IgnoreError, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - processor, err := newFilterSpansProcessor(componenttest.NewNopTelemetrySettings(), &Config{Traces: tt.conditions, ErrorMode: tt.errorMode}) + processor, err := newFilterSpansProcessor(processortest.NewNopCreateSettings(), &Config{Traces: tt.conditions, ErrorMode: tt.errorMode}) assert.NoError(t, err) got, err := processor.processTraces(context.Background(), constructTraces()) @@ -281,6 +280,26 @@ func TestFilterTraceProcessorWithOTTL(t *testing.T) { } } +func TestFilterTraceProcessorTelemetry(t *testing.T) { + telemetryTest(t, "FilterTraceProcessorTelemetry", func(t *testing.T, tel testTelemetry) { + processor, err := newFilterSpansProcessor(tel.NewProcessorCreateSettings(), &Config{ + Traces: TraceFilters{ + SpanConditions: []string{ + `name == "operationA"`, + }, + }, ErrorMode: ottl.IgnoreError, + }) + assert.NoError(t, err) + + _, err = processor.processTraces(context.Background(), constructTraces()) + assert.NoError(t, err) + + tel.assertMetrics(t, expectedMetrics{ + spansFiltered: 2, + }) + }) +} + func constructTraces() ptrace.Traces { td := ptrace.NewTraces() rs0 := td.ResourceSpans().AppendEmpty() diff --git a/processor/groupbyattrsprocessor/README.md b/processor/groupbyattrsprocessor/README.md index ab8509a325fd..e09c64cd8d60 100644 --- a/processor/groupbyattrsprocessor/README.md +++ b/processor/groupbyattrsprocessor/README.md @@ -3,15 +3,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces, metrics, logs | -| Distributions | [contrib], [observiq], [splunk], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Fgroupbyattrs%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Fgroupbyattrs) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Fgroupbyattrs%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Fgroupbyattrs) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@rnishtala-sumo](https://www.github.com/rnishtala-sumo) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[observiq]: https://github.com/observIQ/observiq-otel-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector ## Description @@ -23,7 +20,7 @@ Typical use cases: * extract resources from "flat" data formats, such as Fluentbit logs or Prometheus metrics * associate Prometheus metrics to a *Resource* that describes the relevant host, based on label present on all metrics * optimize data packaging by extracting common attributes -* [compacting](#compaction) multiple records that share the same Resource and InstrumentationLibrary attributes but are under multiple ResourceSpans/ResourceMetrics/ResourceLogs, into a single ResourceSpans/ResourceMetrics/ResourceLogs (when empty list of keys is being provided). This might happen e.g. when [groupbytrace](../groupbytraceprocessor) processor is being used or data comes in multiple requests. By compacting data, it takes less memory, is more efficiently processed, serialized and the number of export requests is reduced (e.g. in case of [jaeger](../../exporter/jaegerexporter) exporter). +* [compacting](#compaction) multiple records that share the same Resource and InstrumentationLibrary attributes but are under multiple ResourceSpans/ResourceMetrics/ResourceLogs, into a single ResourceSpans/ResourceMetrics/ResourceLogs (when empty list of keys is being provided). This might happen e.g. when [groupbytrace](../groupbytraceprocessor) processor is being used or data comes in multiple requests. By compacting data, it takes less memory, is more efficiently processed, serialized and the number of export requests is reduced. It is recommended to use the `groupbyattrs` processor together with [batch](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor) processor, as a consecutive step, as this will reduce the fragmentation of data (by grouping records together under matching Resource/Instrumentation Library) @@ -108,25 +105,25 @@ For example, consider the following input: ```go Resource {host.name="localhost"} - InstumentationLibrary {name="MyLibrary"} + InstrumentationLibrary {name="MyLibrary"} Spans Span {span_id=1, ...} - InstumentationLibrary {name="OtherLibrary"} + InstrumentationLibrary {name="OtherLibrary"} Spans Span {span_id=2, ...} Resource {host.name="localhost"} - InstumentationLibrary {name="MyLibrary"} + InstrumentationLibrary {name="MyLibrary"} Spans Span {span_id=3, ...} Resource {host.name="localhost"} - InstumentationLibrary {name="MyLibrary"} + InstrumentationLibrary {name="MyLibrary"} Spans Span {span_id=4, ...} Resource {host.name="otherhost"} - InstumentationLibrary {name="MyLibrary"} + InstrumentationLibrary {name="MyLibrary"} Spans Span {span_id=5, ...} ``` @@ -148,17 +145,17 @@ The output of the processor will therefore be: ```go Resource {host.name="localhost"} - InstumentationLibrary {name="MyLibrary"} + InstrumentationLibrary {name="MyLibrary"} Spans Span {span_id=1, ...} Span {span_id=3, ...} Span {span_id=4, ...} - InstumentationLibrary {name="OtherLibrary"} + InstrumentationLibrary {name="OtherLibrary"} Spans Span {span_id=2, ...} Resource {host.name="otherhost"} - InstumentationLibrary {name="MyLibrary"} + InstrumentationLibrary {name="MyLibrary"} Spans Span {span_id=5, ...} ``` @@ -178,7 +175,7 @@ processors: The `keys` property describes which attribute keys will be considered for grouping: * If the processed span, log record and metric data point has at least one of the specified attributes key, it will be moved to a *Resource* with the same value for these attributes. The *Resource* will be created if none exists with the same attributes. -* If none of the specified attributes key is present in the processed span, log record or metric data point, it remains associated to the same *Resource* (no change). +* If none of the specified attributes key is present in the processed span, log record or metric data point, it remains associated to the same *Resource* (no change), with multiple instances of the same *Resource* still [compacted](#compaction). Please refer to: diff --git a/processor/groupbyattrsprocessor/factory.go b/processor/groupbyattrsprocessor/factory.go index 5fcaf18bc723..a9e654a4f580 100644 --- a/processor/groupbyattrsprocessor/factory.go +++ b/processor/groupbyattrsprocessor/factory.go @@ -5,9 +5,7 @@ package groupbyattrsprocessor // import "github.com/open-telemetry/opentelemetry import ( "context" - "sync" - "go.opencensus.io/stats/view" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/processor" @@ -21,15 +19,8 @@ var ( consumerCapabilities = consumer.Capabilities{MutatesData: true} ) -var once sync.Once - // NewFactory returns a new factory for the Filter processor. func NewFactory() processor.Factory { - once.Do(func() { - // TODO: as with other -contrib factories registering metrics, this is causing the error being ignored - _ = view.Register(metricViews()...) - }) - return processor.NewFactory( metadata.Type, createDefaultConfig, @@ -45,7 +36,7 @@ func createDefaultConfig() component.Config { } } -func createGroupByAttrsProcessor(logger *zap.Logger, attributes []string) *groupByAttrsProcessor { +func createGroupByAttrsProcessor(set processor.CreateSettings, attributes []string) (*groupByAttrsProcessor, error) { var nonEmptyAttributes []string presentAttributes := make(map[string]struct{}) @@ -53,7 +44,7 @@ func createGroupByAttrsProcessor(logger *zap.Logger, attributes []string) *group if str != "" { _, isPresent := presentAttributes[str] if isPresent { - logger.Warn("A grouping key is already present", zap.String("key", str)) + set.Logger.Warn("A grouping key is already present", zap.String("key", str)) } else { nonEmptyAttributes = append(nonEmptyAttributes, str) presentAttributes[str] = struct{}{} @@ -61,7 +52,11 @@ func createGroupByAttrsProcessor(logger *zap.Logger, attributes []string) *group } } - return &groupByAttrsProcessor{logger: logger, groupByKeys: nonEmptyAttributes} + it, err := newProcessorTelemetry(set.TelemetrySettings) + if err != nil { + return nil, err + } + return &groupByAttrsProcessor{logger: set.Logger, groupByKeys: nonEmptyAttributes, internalTelemetry: it}, nil } // createTracesProcessor creates a trace processor based on this config. @@ -72,7 +67,10 @@ func createTracesProcessor( nextConsumer consumer.Traces) (processor.Traces, error) { oCfg := cfg.(*Config) - gap := createGroupByAttrsProcessor(set.Logger, oCfg.GroupByKeys) + gap, err := createGroupByAttrsProcessor(set, oCfg.GroupByKeys) + if err != nil { + return nil, err + } return processorhelper.NewTracesProcessor( ctx, @@ -91,7 +89,10 @@ func createLogsProcessor( nextConsumer consumer.Logs) (processor.Logs, error) { oCfg := cfg.(*Config) - gap := createGroupByAttrsProcessor(set.Logger, oCfg.GroupByKeys) + gap, err := createGroupByAttrsProcessor(set, oCfg.GroupByKeys) + if err != nil { + return nil, err + } return processorhelper.NewLogsProcessor( ctx, @@ -110,7 +111,10 @@ func createMetricsProcessor( nextConsumer consumer.Metrics) (processor.Metrics, error) { oCfg := cfg.(*Config) - gap := createGroupByAttrsProcessor(set.Logger, oCfg.GroupByKeys) + gap, err := createGroupByAttrsProcessor(set, oCfg.GroupByKeys) + if err != nil { + return nil, err + } return processorhelper.NewMetricsProcessor( ctx, diff --git a/processor/groupbyattrsprocessor/factory_test.go b/processor/groupbyattrsprocessor/factory_test.go index 2146a521a552..01892cd50f7b 100644 --- a/processor/groupbyattrsprocessor/factory_test.go +++ b/processor/groupbyattrsprocessor/factory_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/processor/processortest" - "go.uber.org/zap" ) func TestDefaultConfiguration(t *testing.T) { @@ -41,12 +41,14 @@ func TestCreateTestProcessor(t *testing.T) { func TestNoKeys(t *testing.T) { // This is allowed since can be used for compacting data - gap := createGroupByAttrsProcessor(zap.NewNop(), []string{}) + gap, err := createGroupByAttrsProcessor(processortest.NewNopCreateSettings(), []string{}) + require.NoError(t, err) assert.NotNil(t, gap) } func TestDuplicateKeys(t *testing.T) { - gbap := createGroupByAttrsProcessor(zap.NewNop(), []string{"foo", "foo", ""}) + gbap, err := createGroupByAttrsProcessor(processortest.NewNopCreateSettings(), []string{"foo", "foo", ""}) + require.NoError(t, err) assert.NotNil(t, gbap) assert.EqualValues(t, []string{"foo"}, gbap.groupByKeys) } diff --git a/processor/groupbyattrsprocessor/generated_component_test.go b/processor/groupbyattrsprocessor/generated_component_test.go new file mode 100644 index 000000000000..8c3deeabaf78 --- /dev/null +++ b/processor/groupbyattrsprocessor/generated_component_test.go @@ -0,0 +1,141 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package groupbyattrsprocessor + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "metrics", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesProcessor(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(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/processor/groupbyattrsprocessor/go.mod b/processor/groupbyattrsprocessor/go.mod index 96d51b8c90c1..feab1f211911 100644 --- a/processor/groupbyattrsprocessor/go.mod +++ b/processor/groupbyattrsprocessor/go.mod @@ -1,48 +1,58 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opencensus.io v0.24.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/processor v0.89.0 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/otel v1.25.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/sdk/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.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-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/processor/groupbyattrsprocessor/go.sum b/processor/groupbyattrsprocessor/go.sum index 35ba106af6eb..3fa10602ea68 100644 --- a/processor/groupbyattrsprocessor/go.sum +++ b/processor/groupbyattrsprocessor/go.sum @@ -1,53 +1,28 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -56,15 +31,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -74,97 +48,80 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -172,38 +129,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/groupbyattrsprocessor/internal/metadata/generated_status.go b/processor/groupbyattrsprocessor/internal/metadata/generated_status.go index aa4f0e185047..4c6c5c85b40f 100644 --- a/processor/groupbyattrsprocessor/internal/metadata/generated_status.go +++ b/processor/groupbyattrsprocessor/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("groupbyattrs") ) const ( - Type = "groupbyattrs" TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/groupbyattrs") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/groupbyattrs") +} diff --git a/processor/groupbyattrsprocessor/metadata.yaml b/processor/groupbyattrsprocessor/metadata.yaml index 665d2170653e..499d15d639a1 100644 --- a/processor/groupbyattrsprocessor/metadata.yaml +++ b/processor/groupbyattrsprocessor/metadata.yaml @@ -1,10 +1,13 @@ type: groupbyattrs +scope_name: otelcol/groupbyattrs status: class: processor stability: beta: [traces, metrics, logs] - distributions: [contrib, splunk, observiq, sumo] + distributions: [contrib] warnings: [] codeowners: - active: [rnishtala-sumo] \ No newline at end of file + active: [rnishtala-sumo] +tests: + config: diff --git a/processor/groupbyattrsprocessor/metrics.go b/processor/groupbyattrsprocessor/metrics.go index 72d51f418758..0dad050d76f4 100644 --- a/processor/groupbyattrsprocessor/metrics.go +++ b/processor/groupbyattrsprocessor/metrics.go @@ -4,87 +4,123 @@ package groupbyattrsprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor" import ( - "go.opencensus.io/stats" - "go.opencensus.io/stats/view" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/processor/processorhelper" + "go.opentelemetry.io/otel/metric" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor/internal/metadata" ) -var ( - mNumGroupedSpans = stats.Int64("num_grouped_spans", "Number of spans that had attributes grouped", stats.UnitDimensionless) - mNumNonGroupedSpans = stats.Int64("num_non_grouped_spans", "Number of spans that did not have attributes grouped", stats.UnitDimensionless) - mDistSpanGroups = stats.Int64("span_groups", "Distribution of groups extracted for spans", stats.UnitDimensionless) +type internalTelemetry struct { + mNumGroupedSpans metric.Int64Counter + mNumNonGroupedSpans metric.Int64Counter + mDistSpanGroups metric.Int64Histogram - mNumGroupedLogs = stats.Int64("num_grouped_logs", "Number of logs that had attributes grouped", stats.UnitDimensionless) - mNumNonGroupedLogs = stats.Int64("num_non_grouped_logs", "Number of logs that did not have attributes grouped", stats.UnitDimensionless) - mDistLogGroups = stats.Int64("log_groups", "Distribution of groups extracted for logs", stats.UnitDimensionless) + mNumGroupedLogs metric.Int64Counter + mNumNonGroupedLogs metric.Int64Counter + mDistLogGroups metric.Int64Histogram - mNumGroupedMetrics = stats.Int64("num_grouped_metrics", "Number of metrics that had attributes grouped", stats.UnitDimensionless) - mNumNonGroupedMetrics = stats.Int64("num_non_grouped_metrics", "Number of metrics that did not have attributes grouped", stats.UnitDimensionless) - mDistMetricGroups = stats.Int64("metric_groups", "Distribution of groups extracted for metrics", stats.UnitDimensionless) -) + mNumGroupedMetrics metric.Int64Counter + mNumNonGroupedMetrics metric.Int64Counter + mDistMetricGroups metric.Int64Histogram +} + +func newProcessorTelemetry(set component.TelemetrySettings) (*internalTelemetry, error) { + it := internalTelemetry{} + + counter, err := metadata.Meter(set).Int64Counter( + processorhelper.BuildCustomMetricName(metadata.Type.String(), "num_grouped_spans"), + metric.WithDescription("Number of spans that had attributes grouped"), + metric.WithUnit("1"), + ) + if err != nil { + return nil, err + } + it.mNumGroupedSpans = counter + + counter, err = metadata.Meter(set).Int64Counter( + processorhelper.BuildCustomMetricName(metadata.Type.String(), "num_non_grouped_spans"), + metric.WithDescription("Number of spans that did not have attributes grouped"), + metric.WithUnit("1"), + ) + if err != nil { + return nil, err + } + + it.mNumNonGroupedSpans = counter + + histo, err := metadata.Meter(set).Int64Histogram( + processorhelper.BuildCustomMetricName(metadata.Type.String(), "span_groups"), + metric.WithDescription("Distribution of groups extracted for spans"), + metric.WithUnit("1"), + ) + if err != nil { + return nil, err + } + + it.mDistSpanGroups = histo + + counter, err = metadata.Meter(set).Int64Counter( + processorhelper.BuildCustomMetricName(metadata.Type.String(), "num_grouped_logs"), + metric.WithDescription("Number of logs that had attributes grouped"), + metric.WithUnit("1"), + ) + if err != nil { + return nil, err + } + it.mNumGroupedLogs = counter + + counter, err = metadata.Meter(set).Int64Counter( + processorhelper.BuildCustomMetricName(metadata.Type.String(), "num_non_grouped_logs"), + metric.WithDescription("Number of logs that did not have attributes grouped"), + metric.WithUnit("1"), + ) + if err != nil { + return nil, err + } + + it.mNumNonGroupedLogs = counter + + histo, err = metadata.Meter(set).Int64Histogram( + processorhelper.BuildCustomMetricName(metadata.Type.String(), "log_groups"), + metric.WithDescription("Distribution of groups extracted for logs"), + metric.WithUnit("1"), + ) + if err != nil { + return nil, err + } -// metricViews return the metrics views according to given telemetry level. -func metricViews() []*view.View { - distributionGroups := view.Distribution(1, 2, 5, 10, 20, 50, 100, 500, 2000) - - return []*view.View{ - { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mNumGroupedSpans.Name()), - Measure: mNumGroupedSpans, - Description: mNumGroupedSpans.Description(), - Aggregation: view.Sum(), - }, - { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mNumNonGroupedSpans.Name()), - Measure: mNumNonGroupedSpans, - Description: mNumNonGroupedSpans.Description(), - Aggregation: view.Sum(), - }, - { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mDistSpanGroups.Name()), - Measure: mDistSpanGroups, - Description: mDistSpanGroups.Description(), - Aggregation: distributionGroups, - }, - - { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mNumGroupedLogs.Name()), - Measure: mNumGroupedLogs, - Description: mNumGroupedLogs.Description(), - Aggregation: view.Sum(), - }, - { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mNumNonGroupedLogs.Name()), - Measure: mNumNonGroupedLogs, - Description: mNumNonGroupedLogs.Description(), - Aggregation: view.Sum(), - }, - { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mDistLogGroups.Name()), - Measure: mDistLogGroups, - Description: mDistLogGroups.Description(), - Aggregation: distributionGroups, - }, - - { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mNumGroupedMetrics.Name()), - Measure: mNumGroupedMetrics, - Description: mNumGroupedMetrics.Description(), - Aggregation: view.Sum(), - }, - { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mNumNonGroupedMetrics.Name()), - Measure: mNumNonGroupedMetrics, - Description: mNumNonGroupedMetrics.Description(), - Aggregation: view.Sum(), - }, - { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mDistMetricGroups.Name()), - Measure: mDistMetricGroups, - Description: mDistMetricGroups.Description(), - Aggregation: distributionGroups, - }, + it.mDistLogGroups = histo + + counter, err = metadata.Meter(set).Int64Counter( + processorhelper.BuildCustomMetricName(metadata.Type.String(), "num_grouped_metrics"), + metric.WithDescription("Number of metrics that had attributes grouped"), + metric.WithUnit("1"), + ) + if err != nil { + return nil, err + } + it.mNumGroupedMetrics = counter + + counter, err = metadata.Meter(set).Int64Counter( + processorhelper.BuildCustomMetricName(metadata.Type.String(), "num_non_grouped_metrics"), + metric.WithDescription("Number of metrics that did not have attributes grouped"), + metric.WithUnit("1"), + ) + if err != nil { + return nil, err } + it.mNumNonGroupedMetrics = counter + + histo, err = metadata.Meter(set).Int64Histogram( + processorhelper.BuildCustomMetricName(metadata.Type.String(), "metric_groups"), + metric.WithDescription("Distribution of groups extracted for metrics"), + metric.WithUnit("1"), + ) + if err != nil { + return nil, err + } + it.mDistMetricGroups = histo + + return &it, nil } diff --git a/processor/groupbyattrsprocessor/metrics_test.go b/processor/groupbyattrsprocessor/metrics_test.go index 759baf88b6aa..9c5d46562be0 100644 --- a/processor/groupbyattrsprocessor/metrics_test.go +++ b/processor/groupbyattrsprocessor/metrics_test.go @@ -2,25 +2,3 @@ // SPDX-License-Identifier: Apache-2.0 package groupbyattrsprocessor - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestProcessorMetrics(t *testing.T) { - expectedViewNames := []string{ - "processor/groupbyattrs/num_grouped_spans", - "processor/groupbyattrs/num_non_grouped_spans", - "processor/groupbyattrs/span_groups", - "processor/groupbyattrs/num_grouped_logs", - "processor/groupbyattrs/num_non_grouped_logs", - "processor/groupbyattrs/log_groups", - } - - views := metricViews() - for i, viewName := range expectedViewNames { - assert.Equal(t, viewName, views[i].Name) - } -} diff --git a/processor/groupbyattrsprocessor/package_test.go b/processor/groupbyattrsprocessor/package_test.go new file mode 100644 index 000000000000..ed5419297ee2 --- /dev/null +++ b/processor/groupbyattrsprocessor/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package groupbyattrsprocessor + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/processor/groupbyattrsprocessor/processor.go b/processor/groupbyattrsprocessor/processor.go index 9bcd6a9c587c..ee322f5b7f3c 100644 --- a/processor/groupbyattrsprocessor/processor.go +++ b/processor/groupbyattrsprocessor/processor.go @@ -6,7 +6,6 @@ package groupbyattrsprocessor // import "github.com/open-telemetry/opentelemetry import ( "context" - "go.opencensus.io/stats" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" @@ -15,8 +14,9 @@ import ( ) type groupByAttrsProcessor struct { - logger *zap.Logger - groupByKeys []string + logger *zap.Logger + groupByKeys []string + internalTelemetry *internalTelemetry } // ProcessTraces process traces and groups traces by attribute. @@ -35,12 +35,12 @@ func (gap *groupByAttrsProcessor) processTraces(ctx context.Context, td ptrace.T toBeGrouped, requiredAttributes := gap.extractGroupingAttributes(span.Attributes()) if toBeGrouped { - stats.Record(ctx, mNumGroupedSpans.M(1)) + gap.internalTelemetry.mNumGroupedSpans.Add(ctx, 1) // Some attributes are going to be moved from span to resource level, // so we can delete those on the record level deleteAttributes(requiredAttributes, span.Attributes()) } else { - stats.Record(ctx, mNumNonGroupedSpans.M(1)) + gap.internalTelemetry.mNumNonGroupedSpans.Add(ctx, 1) } // Lets combine the base resource attributes + the extracted (grouped) attributes @@ -53,7 +53,7 @@ func (gap *groupByAttrsProcessor) processTraces(ctx context.Context, td ptrace.T } // Copy the grouped data into output - stats.Record(ctx, mDistSpanGroups.M(int64(tg.traces.ResourceSpans().Len()))) + gap.internalTelemetry.mDistSpanGroups.Record(ctx, int64(tg.traces.ResourceSpans().Len())) return tg.traces, nil } @@ -73,12 +73,12 @@ func (gap *groupByAttrsProcessor) processLogs(ctx context.Context, ld plog.Logs) toBeGrouped, requiredAttributes := gap.extractGroupingAttributes(log.Attributes()) if toBeGrouped { - stats.Record(ctx, mNumGroupedLogs.M(1)) + gap.internalTelemetry.mNumGroupedLogs.Add(ctx, 1) // Some attributes are going to be moved from log record to resource level, // so we can delete those on the record level deleteAttributes(requiredAttributes, log.Attributes()) } else { - stats.Record(ctx, mNumNonGroupedLogs.M(1)) + gap.internalTelemetry.mNumNonGroupedLogs.Add(ctx, 1) } // Lets combine the base resource attributes + the extracted (grouped) attributes @@ -92,7 +92,7 @@ func (gap *groupByAttrsProcessor) processLogs(ctx context.Context, ld plog.Logs) } // Copy the grouped data into output - stats.Record(ctx, mDistLogGroups.M(int64(lg.logs.ResourceLogs().Len()))) + gap.internalTelemetry.mDistLogGroups.Record(ctx, int64(lg.logs.ResourceLogs().Len())) return lg.logs, nil } @@ -154,7 +154,7 @@ func (gap *groupByAttrsProcessor) processMetrics(ctx context.Context, md pmetric } } - stats.Record(ctx, mDistMetricGroups.M(int64(mg.metrics.ResourceMetrics().Len()))) + gap.internalTelemetry.mDistMetricGroups.Record(ctx, int64(mg.metrics.ResourceMetrics().Len())) return mg.metrics, nil } @@ -243,12 +243,12 @@ func (gap *groupByAttrsProcessor) getGroupedMetricsFromAttributes( toBeGrouped, requiredAttributes := gap.extractGroupingAttributes(attributes) if toBeGrouped { - stats.Record(ctx, mNumGroupedMetrics.M(1)) + gap.internalTelemetry.mNumGroupedMetrics.Add(ctx, 1) // These attributes are going to be moved from datapoint to resource level, // so we can delete those on the datapoint deleteAttributes(requiredAttributes, attributes) } else { - stats.Record(ctx, mNumNonGroupedMetrics.M(1)) + gap.internalTelemetry.mNumNonGroupedMetrics.Add(ctx, 1) } // Get the ResourceMetrics matching with these attributes diff --git a/processor/groupbyattrsprocessor/processor_test.go b/processor/groupbyattrsprocessor/processor_test.go index 924283aa7f8f..863b393841d7 100644 --- a/processor/groupbyattrsprocessor/processor_test.go +++ b/processor/groupbyattrsprocessor/processor_test.go @@ -12,11 +12,12 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" - "go.uber.org/zap" + "go.opentelemetry.io/collector/processor/processortest" ) var ( @@ -269,7 +270,9 @@ func TestComplexAttributeGrouping(t *testing.T) { inputMetrics := someComplexMetrics(tt.withResourceAttrIndex, tt.inputResourceCount, tt.inputInstrumentationLibraryCount, 2) inputHistogramMetrics := someComplexHistogramMetrics(tt.withResourceAttrIndex, tt.inputResourceCount, tt.inputInstrumentationLibraryCount, 2, 2) - gap := createGroupByAttrsProcessor(zap.NewNop(), tt.groupByKeys) + tel := setupTelemetry() + gap, err := createGroupByAttrsProcessor(tel.NewProcessorCreateSettings(), tt.groupByKeys) + require.NoError(t, err) processedLogs, err := gap.processLogs(context.Background(), inputLogs) assert.NoError(t, err) @@ -369,6 +372,22 @@ func TestComplexAttributeGrouping(t *testing.T) { } } + expected := expectedMetrics{} + if tt.shouldMoveCommonGroupedAttr { + expected.mDistLogGroups = int64(tt.outputResourceCount) + expected.mNumGroupedLogs = int64(tt.outputTotalRecordsCount) + + expected.mDistMetricGroups = int64(tt.outputResourceCount) + expected.mNumGroupedMetrics = 4 * int64(tt.outputTotalRecordsCount) + + expected.mDistSpanGroups = int64(tt.outputResourceCount) + expected.mNumGroupedSpans = int64(tt.outputTotalRecordsCount) + } else { + expected.mNumNonGroupedLogs = int64(tt.outputTotalRecordsCount) + expected.mNumNonGroupedMetrics = 4 * int64(tt.outputTotalRecordsCount) + expected.mNumNonGroupedSpans = int64(tt.outputTotalRecordsCount) + } + tel.assertMetrics(t, expected) }) } } @@ -416,7 +435,8 @@ func TestAttributeGrouping(t *testing.T) { histogramMetrics := someHistogramMetrics(attrMap, 1, tt.count) exponentialHistogramMetrics := someExponentialHistogramMetrics(attrMap, 1, tt.count) - gap := createGroupByAttrsProcessor(zap.NewNop(), tt.groupByKeys) + gap, err := createGroupByAttrsProcessor(processortest.NewNopCreateSettings(), tt.groupByKeys) + require.NoError(t, err) expectedResource := prepareResource(attrMap, tt.groupByKeys) expectedAttributes := filterAttributeMap(attrMap, tt.nonGroupedKeys) @@ -727,7 +747,8 @@ func TestMetricAdvancedGrouping(t *testing.T) { datapoint.Attributes().PutStr("id", "eth0") // Perform the test - gap := createGroupByAttrsProcessor(zap.NewNop(), []string{"host.name"}) + gap, err := createGroupByAttrsProcessor(processortest.NewNopCreateSettings(), []string{"host.name"}) + require.NoError(t, err) processedMetrics, err := gap.processMetrics(context.Background(), metrics) assert.NoError(t, err) @@ -811,7 +832,8 @@ func TestCompacting(t *testing.T) { assert.Equal(t, 100, logs.ResourceLogs().Len()) assert.Equal(t, 100, metrics.ResourceMetrics().Len()) - gap := createGroupByAttrsProcessor(zap.NewNop(), []string{}) + gap, err := createGroupByAttrsProcessor(processortest.NewNopCreateSettings(), []string{}) + require.NoError(t, err) processedSpans, err := gap.processTraces(context.Background(), spans) assert.NoError(t, err) @@ -869,7 +891,8 @@ func BenchmarkCompacting(bb *testing.B) { for _, run := range runs { bb.Run(fmt.Sprintf("instrumentation_library_count=%d, spans_per_library_count=%d", run.ilCount, run.spanCount), func(b *testing.B) { spans := someSpans(attrMap, run.ilCount, run.spanCount) - gap := createGroupByAttrsProcessor(zap.NewNop(), []string{}) + gap, err := createGroupByAttrsProcessor(processortest.NewNopCreateSettings(), []string{}) + require.NoError(b, err) b.ResetTimer() for n := 0; n < b.N; n++ { diff --git a/processor/groupbyattrsprocessor/telemetry_test.go b/processor/groupbyattrsprocessor/telemetry_test.go new file mode 100644 index 000000000000..885b24c85456 --- /dev/null +++ b/processor/groupbyattrsprocessor/telemetry_test.go @@ -0,0 +1,258 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package groupbyattrsprocessor + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor/internal/metadata" +) + +type testTelemetry struct { + reader *metric.ManualReader + meterProvider *metric.MeterProvider +} + +type expectedMetrics struct { + mNumGroupedSpans int64 + mNumNonGroupedSpans int64 + mDistSpanGroups int64 + + mNumGroupedLogs int64 + mNumNonGroupedLogs int64 + mDistLogGroups int64 + + mNumGroupedMetrics int64 + mNumNonGroupedMetrics int64 + mDistMetricGroups int64 +} + +func setupTelemetry() testTelemetry { + reader := metric.NewManualReader() + return testTelemetry{ + reader: reader, + meterProvider: metric.NewMeterProvider(metric.WithReader(reader)), + } +} + +func (tt *testTelemetry) assertMetrics(t *testing.T, expected expectedMetrics) { + var md metricdata.ResourceMetrics + require.NoError(t, tt.reader.Collect(context.Background(), &md)) + if expected.mNumGroupedLogs > 0 { + name := "processor_groupbyattrs_num_grouped_logs" + got := tt.getMetric(name, md) + want := metricdata.Metrics{ + Name: name, + Description: "Number of logs that had attributes grouped", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: expected.mNumGroupedLogs, + }, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + if expected.mNumGroupedMetrics > 0 { + name := "processor_groupbyattrs_num_grouped_metrics" + got := tt.getMetric(name, md) + want := metricdata.Metrics{ + Name: name, + Description: "Number of metrics that had attributes grouped", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: expected.mNumGroupedMetrics, + }, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + if expected.mNumGroupedSpans > 0 { + name := "processor_groupbyattrs_num_grouped_spans" + got := tt.getMetric(name, md) + want := metricdata.Metrics{ + Name: name, + Description: "Number of spans that had attributes grouped", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: expected.mNumGroupedSpans, + }, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + if expected.mNumNonGroupedLogs > 0 { + name := "processor_groupbyattrs_num_non_grouped_logs" + got := tt.getMetric(name, md) + want := metricdata.Metrics{ + Name: name, + Description: "Number of logs that did not have attributes grouped", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: expected.mNumNonGroupedLogs, + }, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + if expected.mNumNonGroupedMetrics > 0 { + name := "processor_groupbyattrs_num_non_grouped_metrics" + got := tt.getMetric(name, md) + want := metricdata.Metrics{ + Name: name, + Description: "Number of metrics that did not have attributes grouped", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: expected.mNumNonGroupedMetrics, + }, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + if expected.mNumNonGroupedSpans > 0 { + name := "processor_groupbyattrs_num_non_grouped_spans" + got := tt.getMetric(name, md) + want := metricdata.Metrics{ + Name: name, + Description: "Number of spans that did not have attributes grouped", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: expected.mNumNonGroupedSpans, + }, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + if expected.mDistLogGroups > 0 { + name := "processor_groupbyattrs_log_groups" + got := tt.getMetric(name, md) + want := metricdata.Metrics{ + Name: name, + Description: "Distribution of groups extracted for logs", + Unit: "1", + Data: metricdata.Histogram[int64]{ + Temporality: metricdata.CumulativeTemporality, + DataPoints: []metricdata.HistogramDataPoint[int64]{ + { + Attributes: *attribute.EmptySet(), + Bounds: []float64{0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000}, + BucketCounts: []uint64{0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + Count: 1, + Min: metricdata.NewExtrema(expected.mDistLogGroups), + Max: metricdata.NewExtrema(expected.mDistLogGroups), + Sum: expected.mDistLogGroups, + }, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp(), metricdatatest.IgnoreExemplars()) + } + if expected.mDistMetricGroups > 0 { + name := "processor_groupbyattrs_metric_groups" + got := tt.getMetric(name, md) + want := metricdata.Metrics{ + Name: name, + Description: "Distribution of groups extracted for metrics", + Unit: "1", + Data: metricdata.Histogram[int64]{ + Temporality: metricdata.CumulativeTemporality, + DataPoints: []metricdata.HistogramDataPoint[int64]{ + { + Attributes: *attribute.EmptySet(), + Bounds: []float64{0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000}, + BucketCounts: []uint64{0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + Count: 2, + Min: metricdata.NewExtrema(expected.mDistMetricGroups), + Max: metricdata.NewExtrema(expected.mDistMetricGroups), + Sum: 2 * expected.mDistMetricGroups, + }, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp(), metricdatatest.IgnoreExemplars()) + } + if expected.mDistSpanGroups > 0 { + name := "processor_groupbyattrs_span_groups" + got := tt.getMetric(name, md) + want := metricdata.Metrics{ + Name: name, + Description: "Distribution of groups extracted for spans", + Unit: "1", + Data: metricdata.Histogram[int64]{ + Temporality: metricdata.CumulativeTemporality, + DataPoints: []metricdata.HistogramDataPoint[int64]{ + { + Attributes: *attribute.EmptySet(), + Bounds: []float64{0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000}, + BucketCounts: []uint64{0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + Count: 1, + Min: metricdata.NewExtrema(expected.mDistSpanGroups), + Max: metricdata.NewExtrema(expected.mDistSpanGroups), + Sum: expected.mDistSpanGroups, + }, + }, + }, + } + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp(), metricdatatest.IgnoreExemplars()) + } +} + +func (tt *testTelemetry) NewProcessorCreateSettings() processor.CreateSettings { + settings := processortest.NewNopCreateSettings() + settings.MeterProvider = tt.meterProvider + settings.ID = component.NewID(metadata.Type) + + return settings +} + +func (tt *testTelemetry) getMetric(name string, got metricdata.ResourceMetrics) metricdata.Metrics { + for _, sm := range got.ScopeMetrics { + for _, m := range sm.Metrics { + if m.Name == name { + return m + } + } + } + + return metricdata.Metrics{} +} diff --git a/processor/groupbytraceprocessor/README.md b/processor/groupbytraceprocessor/README.md index 192a2e7ef97d..bea789f741db 100644 --- a/processor/groupbytraceprocessor/README.md +++ b/processor/groupbytraceprocessor/README.md @@ -3,16 +3,13 @@ | Status | | | ------------- |-----------| | Stability | [beta]: traces | -| Distributions | [contrib], [aws], [observiq], [sumo] | +| Distributions | [contrib] | | Warnings | [Statefulness](#warnings) | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Fgroupbytrace%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Fgroupbytrace) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Fgroupbytrace%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Fgroupbytrace) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[observiq]: https://github.com/observIQ/observiq-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector This processor collects all the spans from the same trace, waiting a diff --git a/processor/groupbytraceprocessor/event_test.go b/processor/groupbytraceprocessor/event_test.go index d96605109118..0f657c6472ce 100644 --- a/processor/groupbytraceprocessor/event_test.go +++ b/processor/groupbytraceprocessor/event_test.go @@ -32,7 +32,7 @@ func TestEventCallback(t *testing.T) { typ: traceReceived, payload: tracesWithID{id: pcommon.NewTraceIDEmpty(), td: ptrace.NewTraces()}, registerCallback: func(em *eventMachine, wg *sync.WaitGroup) { - em.onTraceReceived = func(received tracesWithID, worker *eventMachineWorker) error { + em.onTraceReceived = func(_ tracesWithID, _ *eventMachineWorker) error { wg.Done() return nil } @@ -43,7 +43,7 @@ func TestEventCallback(t *testing.T) { typ: traceExpired, payload: pcommon.TraceID([16]byte{1, 2, 3, 4}), registerCallback: func(em *eventMachine, wg *sync.WaitGroup) { - em.onTraceExpired = func(expired pcommon.TraceID, worker *eventMachineWorker) error { + em.onTraceExpired = func(expired pcommon.TraceID, _ *eventMachineWorker) error { wg.Done() assert.Equal(t, pcommon.TraceID([16]byte{1, 2, 3, 4}), expired) return nil @@ -55,7 +55,7 @@ func TestEventCallback(t *testing.T) { typ: traceReleased, payload: []ptrace.ResourceSpans{}, registerCallback: func(em *eventMachine, wg *sync.WaitGroup) { - em.onTraceReleased = func(expired []ptrace.ResourceSpans) error { + em.onTraceReleased = func(_ []ptrace.ResourceSpans) error { wg.Done() return nil } @@ -128,7 +128,7 @@ func TestEventCallbackNotSet(t *testing.T) { wg := &sync.WaitGroup{} em := newEventMachine(logger, 50, 1, 1_000) - em.onError = func(e event) { + em.onError = func(_ event) { wg.Done() } em.startInBackground() @@ -155,8 +155,8 @@ func TestEventInvalidPayload(t *testing.T) { { casename: "onTraceReceived", typ: traceReceived, - registerCallback: func(em *eventMachine, wg *sync.WaitGroup) { - em.onTraceReceived = func(received tracesWithID, worker *eventMachineWorker) error { + registerCallback: func(em *eventMachine, _ *sync.WaitGroup) { + em.onTraceReceived = func(_ tracesWithID, _ *eventMachineWorker) error { return nil } }, @@ -164,8 +164,8 @@ func TestEventInvalidPayload(t *testing.T) { { casename: "onTraceExpired", typ: traceExpired, - registerCallback: func(em *eventMachine, wg *sync.WaitGroup) { - em.onTraceExpired = func(expired pcommon.TraceID, worker *eventMachineWorker) error { + registerCallback: func(em *eventMachine, _ *sync.WaitGroup) { + em.onTraceExpired = func(_ pcommon.TraceID, _ *eventMachineWorker) error { return nil } }, @@ -173,8 +173,8 @@ func TestEventInvalidPayload(t *testing.T) { { casename: "onTraceReleased", typ: traceReleased, - registerCallback: func(em *eventMachine, wg *sync.WaitGroup) { - em.onTraceReleased = func(released []ptrace.ResourceSpans) error { + registerCallback: func(em *eventMachine, _ *sync.WaitGroup) { + em.onTraceReleased = func(_ []ptrace.ResourceSpans) error { return nil } }, @@ -182,8 +182,8 @@ func TestEventInvalidPayload(t *testing.T) { { casename: "onTraceRemoved", typ: traceRemoved, - registerCallback: func(em *eventMachine, wg *sync.WaitGroup) { - em.onTraceRemoved = func(expired pcommon.TraceID) error { + registerCallback: func(em *eventMachine, _ *sync.WaitGroup) { + em.onTraceRemoved = func(_ pcommon.TraceID) error { return nil } }, @@ -196,7 +196,7 @@ func TestEventInvalidPayload(t *testing.T) { wg := &sync.WaitGroup{} em := newEventMachine(logger, 50, 1, 1_000) - em.onError = func(e event) { + em.onError = func(_ event) { wg.Done() } tt.registerCallback(em, wg) @@ -222,7 +222,7 @@ func TestEventUnknownType(t *testing.T) { wg := &sync.WaitGroup{} em := newEventMachine(logger, 50, 1, 1_000) - em.onError = func(e event) { + em.onError = func(_ event) { wg.Done() } em.startInBackground() @@ -269,7 +269,7 @@ func TestEventTracePerWorker(t *testing.T) { var wg sync.WaitGroup var workerForTrace *eventMachineWorker - em.onTraceReceived = func(td tracesWithID, w *eventMachineWorker) error { + em.onTraceReceived = func(_ tracesWithID, w *eventMachineWorker) error { workerForTrace = w w.fire(event{ typ: traceExpired, @@ -277,7 +277,7 @@ func TestEventTracePerWorker(t *testing.T) { }) return nil } - em.onTraceExpired = func(id pcommon.TraceID, w *eventMachineWorker) error { + em.onTraceExpired = func(_ pcommon.TraceID, w *eventMachineWorker) error { assert.Equal(t, workerForTrace, w) wg.Done() return nil @@ -516,7 +516,7 @@ func TestDoWithTimeout_TimeoutTrigger(t *testing.T) { } func getGaugeValue(t *testing.T, gauge *stats.Int64Measure) float64 { - viewData, err := view.RetrieveData("processor/groupbytrace/" + gauge.Name()) + viewData, err := view.RetrieveData("processor_groupbytrace_" + gauge.Name()) require.NoError(t, err) require.Len(t, viewData, 1) // we expect exactly one data point, the last value @@ -524,7 +524,7 @@ func getGaugeValue(t *testing.T, gauge *stats.Int64Measure) float64 { } func assertGaugeNotCreated(t *testing.T, gauge *stats.Int64Measure) { - viewData, err := view.RetrieveData("processor/groupbytrace/" + gauge.Name()) + viewData, err := view.RetrieveData("processor_groupbytrace_" + gauge.Name()) require.NoError(t, err) assert.Len(t, viewData, 0, "gauge exists already but shouldn't") } diff --git a/processor/groupbytraceprocessor/generated_component_test.go b/processor/groupbytraceprocessor/generated_component_test.go new file mode 100644 index 000000000000..08a8b70f0bf2 --- /dev/null +++ b/processor/groupbytraceprocessor/generated_component_test.go @@ -0,0 +1,127 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package groupbytraceprocessor + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "traces", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesProcessor(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(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/processor/groupbytraceprocessor/go.mod b/processor/groupbytraceprocessor/go.mod index 977ec71465e3..37a5e7f776c4 100644 --- a/processor/groupbytraceprocessor/go.mod +++ b/processor/groupbytraceprocessor/go.mod @@ -1,47 +1,58 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.89.0 - github.com/stretchr/testify v1.8.4 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.98.0 + github.com/stretchr/testify v1.9.0 go.opencensus.io v0.24.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/processor v0.89.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.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.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/google/uuid v1.6.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/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/confmap v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/processor/groupbytraceprocessor/go.sum b/processor/groupbytraceprocessor/go.sum index 942f9cb9e4b9..0acd312e3f19 100644 --- a/processor/groupbytraceprocessor/go.sum +++ b/processor/groupbytraceprocessor/go.sum @@ -1,9 +1,10 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= 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/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/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -13,15 +14,18 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF 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-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 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 h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -43,10 +47,11 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ 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.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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -55,15 +60,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -73,13 +77,17 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= 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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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= @@ -87,42 +95,46 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= @@ -141,8 +153,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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= @@ -153,8 +165,8 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h 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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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= @@ -176,15 +188,15 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= 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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= @@ -196,11 +208,11 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/processor/groupbytraceprocessor/internal/metadata/generated_status.go b/processor/groupbytraceprocessor/internal/metadata/generated_status.go index 68ad8dd16624..0de5f7e75d05 100644 --- a/processor/groupbytraceprocessor/internal/metadata/generated_status.go +++ b/processor/groupbytraceprocessor/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("groupbytrace") ) const ( - Type = "groupbytrace" TracesStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/groupbytrace") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/groupbytrace") +} diff --git a/processor/groupbytraceprocessor/metadata.yaml b/processor/groupbytraceprocessor/metadata.yaml index e24caa652793..9d4abdccd8d3 100644 --- a/processor/groupbytraceprocessor/metadata.yaml +++ b/processor/groupbytraceprocessor/metadata.yaml @@ -1,10 +1,13 @@ type: groupbytrace +scope_name: otelcol/groupbytrace status: class: processor stability: beta: [traces] - distributions: [contrib, observiq, sumo, aws] + distributions: [contrib] warnings: [Statefulness] codeowners: - active: [jpkrohling] \ No newline at end of file + active: [jpkrohling] +tests: + config: diff --git a/processor/groupbytraceprocessor/metrics.go b/processor/groupbytraceprocessor/metrics.go index 52584db63e5e..eabd362dbdbb 100644 --- a/processor/groupbytraceprocessor/metrics.go +++ b/processor/groupbytraceprocessor/metrics.go @@ -27,50 +27,50 @@ var ( func metricViews() []*view.View { return []*view.View{ { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mNumTracesConf.Name()), + Name: processorhelper.BuildCustomMetricName(metadata.Type.String(), mNumTracesConf.Name()), Measure: mNumTracesConf, Description: mNumTracesConf.Description(), Aggregation: view.LastValue(), }, { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mNumEventsInQueue.Name()), + Name: processorhelper.BuildCustomMetricName(metadata.Type.String(), mNumEventsInQueue.Name()), Measure: mNumEventsInQueue, Description: mNumEventsInQueue.Description(), Aggregation: view.LastValue(), }, { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mNumTracesInMemory.Name()), + Name: processorhelper.BuildCustomMetricName(metadata.Type.String(), mNumTracesInMemory.Name()), Measure: mNumTracesInMemory, Description: mNumTracesInMemory.Description(), Aggregation: view.LastValue(), }, { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mTracesEvicted.Name()), + Name: processorhelper.BuildCustomMetricName(metadata.Type.String(), mTracesEvicted.Name()), Measure: mTracesEvicted, Description: mTracesEvicted.Description(), // sum allows us to start from 0, count will only show up if there's at least one eviction, which might take a while to happen (if ever!) Aggregation: view.Sum(), }, { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mReleasedSpans.Name()), + Name: processorhelper.BuildCustomMetricName(metadata.Type.String(), mReleasedSpans.Name()), Measure: mReleasedSpans, Description: mReleasedSpans.Description(), Aggregation: view.Sum(), }, { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mReleasedTraces.Name()), + Name: processorhelper.BuildCustomMetricName(metadata.Type.String(), mReleasedTraces.Name()), Measure: mReleasedTraces, Description: mReleasedTraces.Description(), Aggregation: view.Sum(), }, { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mIncompleteReleases.Name()), + Name: processorhelper.BuildCustomMetricName(metadata.Type.String(), mIncompleteReleases.Name()), Measure: mIncompleteReleases, Description: mIncompleteReleases.Description(), Aggregation: view.Sum(), }, { - Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mEventLatency.Name()), + Name: processorhelper.BuildCustomMetricName(metadata.Type.String(), mEventLatency.Name()), Measure: mEventLatency, Description: mEventLatency.Description(), TagKeys: []tag.Key{ diff --git a/processor/groupbytraceprocessor/metrics_test.go b/processor/groupbytraceprocessor/metrics_test.go index c6fdd71004f9..cf5c5a96c6fb 100644 --- a/processor/groupbytraceprocessor/metrics_test.go +++ b/processor/groupbytraceprocessor/metrics_test.go @@ -11,14 +11,14 @@ import ( func TestProcessorMetrics(t *testing.T) { expectedViewNames := []string{ - "processor/groupbytrace/processor_groupbytrace_conf_num_traces", - "processor/groupbytrace/processor_groupbytrace_num_events_in_queue", - "processor/groupbytrace/processor_groupbytrace_num_traces_in_memory", - "processor/groupbytrace/processor_groupbytrace_traces_evicted", - "processor/groupbytrace/processor_groupbytrace_spans_released", - "processor/groupbytrace/processor_groupbytrace_traces_released", - "processor/groupbytrace/processor_groupbytrace_incomplete_releases", - "processor/groupbytrace/processor_groupbytrace_event_latency", + "processor_groupbytrace_processor_groupbytrace_conf_num_traces", + "processor_groupbytrace_processor_groupbytrace_num_events_in_queue", + "processor_groupbytrace_processor_groupbytrace_num_traces_in_memory", + "processor_groupbytrace_processor_groupbytrace_traces_evicted", + "processor_groupbytrace_processor_groupbytrace_spans_released", + "processor_groupbytrace_processor_groupbytrace_traces_released", + "processor_groupbytrace_processor_groupbytrace_incomplete_releases", + "processor_groupbytrace_processor_groupbytrace_event_latency", } views := metricViews() diff --git a/processor/groupbytraceprocessor/processor_test.go b/processor/groupbytraceprocessor/processor_test.go index 61bd480363af..6a0b0959d959 100644 --- a/processor/groupbytraceprocessor/processor_test.go +++ b/processor/groupbytraceprocessor/processor_test.go @@ -33,7 +33,7 @@ func TestTraceIsDispatchedAfterDuration(t *testing.T) { NumWorkers: 4, } mockProcessor := &mockProcessor{ - onTraces: func(ctx context.Context, received ptrace.Traces) error { + onTraces: func(_ context.Context, received ptrace.Traces) error { assert.Equal(t, traces, received) wgReceived.Done() return nil @@ -87,7 +87,7 @@ func TestInternalCacheLimit(t *testing.T) { var receivedTraceIDs []pcommon.TraceID mockProcessor := &mockProcessor{} - mockProcessor.onTraces = func(ctx context.Context, received ptrace.Traces) error { + mockProcessor.onTraces = func(_ context.Context, received ptrace.Traces) error { traceID := received.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0).TraceID() receivedTraceIDs = append(receivedTraceIDs, traceID) wg.Done() @@ -303,7 +303,7 @@ func TestAddSpansToExistingTrace(t *testing.T) { var receivedTraces []ptrace.ResourceSpans next := &mockProcessor{ - onTraces: func(ctx context.Context, traces ptrace.Traces) error { + onTraces: func(_ context.Context, traces ptrace.Traces) error { require.Equal(t, 2, traces.ResourceSpans().Len()) receivedTraces = append(receivedTraces, traces.ResourceSpans().At(0)) receivedTraces = append(receivedTraces, traces.ResourceSpans().At(1)) diff --git a/processor/intervalprocessor/Makefile b/processor/intervalprocessor/Makefile new file mode 100644 index 000000000000..ded7a36092dc --- /dev/null +++ b/processor/intervalprocessor/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/processor/intervalprocessor/README.md b/processor/intervalprocessor/README.md new file mode 100644 index 000000000000..90cf86d05e3f --- /dev/null +++ b/processor/intervalprocessor/README.md @@ -0,0 +1,34 @@ +# Interval Processor + + +| Status | | +| ------------- |-----------| +| Stability | [development]: metrics | +| Distributions | [] | +| Warnings | [Statefulness](#warnings) | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Finterval%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Finterval) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Finterval%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Finterval) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@RichieSams](https://www.github.com/RichieSams) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development + + +## Description + +The interval processor (`intervalprocessor`) aggregates metrics and periodically forwards the latest values to the next component in the pipeline. The processor supports aggregating the following metric types: + +* Monotonically increasing, cumulative sums +* Monotonically increasing, cumulative histograms +* Monotonically increasing, cumulative exponential histograms + +The following metric types will *not* be aggregated, and will instead be passed, unchanged, to the next component in the pipeline: + +* All delta metrics +* Non-monotonically increasing sums +* Gauges +* Summaries + +## Configuration + +The following settings can be optionally configured: + +- `max_staleness`: The total time a state entry will live past the time it was last seen. Set to 0 to retain state indefinitely. Default: 0 diff --git a/processor/intervalprocessor/config.go b/processor/intervalprocessor/config.go new file mode 100644 index 000000000000..8a43eca75c00 --- /dev/null +++ b/processor/intervalprocessor/config.go @@ -0,0 +1,24 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package intervalprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor" + +import ( + "time" + + "go.opentelemetry.io/collector/component" +) + +var _ component.Config = (*Config)(nil) + +// Config defines the configuration for the processor. +type Config struct { + // MaxStaleness is the total time a state entry will live past the time it was last seen. Set to 0 to retain state indefinitely. + MaxStaleness time.Duration `mapstructure:"max_staleness"` +} + +// Validate checks whether the input configuration has all of the required fields for the processor. +// An error is returned if there are any invalid inputs. +func (config *Config) Validate() error { + return nil +} diff --git a/processor/intervalprocessor/doc.go b/processor/intervalprocessor/doc.go new file mode 100644 index 000000000000..251a4f90994e --- /dev/null +++ b/processor/intervalprocessor/doc.go @@ -0,0 +1,8 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +// package intervalprocessor implements a processor which aggregates cumulative +// metrics over time, and periodically exports the latest values +package intervalprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor" diff --git a/processor/intervalprocessor/factory.go b/processor/intervalprocessor/factory.go new file mode 100644 index 000000000000..5bef7881dfdf --- /dev/null +++ b/processor/intervalprocessor/factory.go @@ -0,0 +1,36 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package intervalprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor" + +import ( + "context" + "fmt" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/processor" + + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor/internal/metadata" +) + +// NewFactory returns a new factory for the Metrics Generation processor. +func NewFactory() processor.Factory { + return processor.NewFactory( + metadata.Type, + createDefaultConfig, + processor.WithMetrics(createMetricsProcessor, metadata.MetricsStability)) +} + +func createDefaultConfig() component.Config { + return &Config{} +} + +func createMetricsProcessor(_ context.Context, set processor.CreateSettings, cfg component.Config, nextConsumer consumer.Metrics) (processor.Metrics, error) { + processorConfig, ok := cfg.(*Config) + if !ok { + return nil, fmt.Errorf("configuration parsing error") + } + + return newProcessor(processorConfig, set.Logger, nextConsumer), nil +} diff --git a/processor/intervalprocessor/generated_component_test.go b/processor/intervalprocessor/generated_component_test.go new file mode 100644 index 000000000000..6e4b8a8e33cb --- /dev/null +++ b/processor/intervalprocessor/generated_component_test.go @@ -0,0 +1,127 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package intervalprocessor + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "metrics", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsProcessor(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(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/processor/intervalprocessor/go.mod b/processor/intervalprocessor/go.mod new file mode 100644 index 000000000000..874008cbd6f7 --- /dev/null +++ b/processor/intervalprocessor/go.mod @@ -0,0 +1,54 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor + +go 1.21 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/zap v1.27.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.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.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.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/processor/intervalprocessor/go.sum b/processor/intervalprocessor/go.sum new file mode 100644 index 000000000000..1478dc78dcfd --- /dev/null +++ b/processor/intervalprocessor/go.sum @@ -0,0 +1,142 @@ +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/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/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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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/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/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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/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.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +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/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/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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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/intervalprocessor/internal/metadata/generated_status.go b/processor/intervalprocessor/internal/metadata/generated_status.go new file mode 100644 index 000000000000..79216aea6a79 --- /dev/null +++ b/processor/intervalprocessor/internal/metadata/generated_status.go @@ -0,0 +1,25 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("interval") +) + +const ( + MetricsStability = component.StabilityLevelDevelopment +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/interval") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/interval") +} diff --git a/processor/intervalprocessor/metadata.yaml b/processor/intervalprocessor/metadata.yaml new file mode 100644 index 000000000000..5bfb1ec220be --- /dev/null +++ b/processor/intervalprocessor/metadata.yaml @@ -0,0 +1,13 @@ +type: interval +scope_name: otelcol/interval + +status: + class: processor + stability: + development: [metrics] + distributions: [] + warnings: [Statefulness] + codeowners: + active: [RichieSams] +tests: + config: diff --git a/processor/intervalprocessor/processor.go b/processor/intervalprocessor/processor.go new file mode 100644 index 000000000000..1ba888a1f7b4 --- /dev/null +++ b/processor/intervalprocessor/processor.go @@ -0,0 +1,56 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package intervalprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor" + +import ( + "context" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/processor" + "go.uber.org/zap" +) + +var _ processor.Metrics = (*Processor)(nil) + +type Processor struct { + ctx context.Context + cancel context.CancelFunc + log *zap.Logger + + maxStaleness time.Duration + + nextConsumer consumer.Metrics +} + +func newProcessor(config *Config, log *zap.Logger, nextConsumer consumer.Metrics) *Processor { + ctx, cancel := context.WithCancel(context.Background()) + + return &Processor{ + ctx: ctx, + cancel: cancel, + log: log, + maxStaleness: config.MaxStaleness, + nextConsumer: nextConsumer, + } +} + +func (p *Processor) Start(_ context.Context, _ component.Host) error { + return nil +} + +func (p *Processor) Shutdown(_ context.Context) error { + p.cancel() + return nil +} + +func (p *Processor) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: true} +} + +func (p *Processor) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error { + return p.nextConsumer.ConsumeMetrics(ctx, md) +} diff --git a/processor/k8sattributesprocessor/README.md b/processor/k8sattributesprocessor/README.md index 78f56039f066..3b8d4ab8ca5f 100644 --- a/processor/k8sattributesprocessor/README.md +++ b/processor/k8sattributesprocessor/README.md @@ -3,18 +3,12 @@ | Status | | | ------------- |-----------| | Stability | [beta]: logs, metrics, traces | -| Distributions | [contrib], [aws], [grafana], [observiq], [redhat], [splunk], [sumo] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Fk8sattributes%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Fk8sattributes) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Fk8sattributes%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Fk8sattributes) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dmitryax](https://www.github.com/dmitryax), [@rmfitzpatrick](https://www.github.com/rmfitzpatrick), [@fatsheep9146](https://www.github.com/fatsheep9146), [@TylerHelmuth](https://www.github.com/TylerHelmuth) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[aws]: https://github.com/aws-observability/aws-otel-collector -[grafana]: https://github.com/grafana/agent -[observiq]: https://github.com/observIQ/observiq-otel-collector -[redhat]: https://github.com/os-observability/redhat-opentelemetry-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector Kubernetes attributes processor allow automatic setting of spans, metrics and logs resource attributes with k8s metadata. @@ -158,7 +152,9 @@ k8sattributes/2: ## Role-based access control -The k8sattributesprocessor needs `get`, `watch` and `list` permissions on both `pods` and `namespaces` resources, for all namespaces and pods included in the configured filters. Additionally, when using `k8s.deployment.uid` or `k8s.deployment.name` the processor also needs `get`, `watch` and `list` permissions for `replicasets` resources. When extracting metadatas from `node`, the processor needs `get`, `watch` and `list` permissions for `nodes` resources. +## Cluster-scoped RBAC + +If you'd like to set up the k8sattributesprocessor to receive telemetry from across namespaces, it will need `get`, `watch` and `list` permissions on both `pods` and `namespaces` resources, for all namespaces and pods included in the configured filters. Additionally, when using `k8s.deployment.uid` or `k8s.deployment.name` the processor also needs `get`, `watch` and `list` permissions for `replicasets` resources. When using `k8s.node.uid` or extracting metadata from `node`, the processor needs `get`, `watch` and `list` permissions for `nodes` resources. Here is an example of a `ClusterRole` to give a `ServiceAccount` the necessary permissions for all pods, nodes, and namespaces in the cluster (replace `` with a namespace where collector is deployed): @@ -198,6 +194,51 @@ roleRef: apiGroup: rbac.authorization.k8s.io ``` +### Namespace-scoped RBAC +When running the k8sattributesprocessor to receive telemetry traffic from pods in a specific namespace, you can use a k8s `Role` and `Rolebinding` to provide collector access to query pods and replicasets in the namespace. This would require setting the `filter::namespace` config as shown below. +```yaml +k8sattributes: + filter: + namespace: +``` +With the namespace filter set, the processor will only look up pods and replicasets in the selected namespace. Note that with just a role binding, the processor can not query metadata such as labels and annotations from k8s `nodes` and `namespaces` which are cluster-scoped objects. This also means that the processor can not set the value for `k8s.cluster.uid` attribute if enabled, since the `k8s.cluster.uid` attribute is set to the uid of the namespace `kube-system` which is not queryable with namespaced rbac. + +Example `Role` and `RoleBinding` to create in the namespace being watched. +```yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: otel-collector + namespace: +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: otel-collector + namespace: +rules: +- apiGroups: [""] + resources: ["pods"] + verbs: ["get", "watch", "list"] +- apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: otel-collector + namespace: +subjects: +- kind: ServiceAccount + name: otel-collector + namespace: +roleRef: + kind: Role + name: otel-collector + apiGroup: rbac.authorization.k8s.io +``` + ## Deployment scenarios The processor can be used in collectors deployed both as an agent (Kubernetes DaemonSet) or as a gateway (Kubernetes Deployment). diff --git a/processor/k8sattributesprocessor/config.go b/processor/k8sattributesprocessor/config.go index 2361d3280cfa..809ff4fe301f 100644 --- a/processor/k8sattributesprocessor/config.go +++ b/processor/k8sattributesprocessor/config.go @@ -84,12 +84,17 @@ func (cfg *Config) Validate() error { for _, field := range cfg.Extract.Metadata { switch field { case conventions.AttributeK8SNamespaceName, conventions.AttributeK8SPodName, conventions.AttributeK8SPodUID, - specPodHostName, metadataPodStartTime, conventions.AttributeK8SDeploymentName, conventions.AttributeK8SDeploymentUID, - conventions.AttributeK8SReplicaSetName, conventions.AttributeK8SReplicaSetUID, conventions.AttributeK8SDaemonSetName, - conventions.AttributeK8SDaemonSetUID, conventions.AttributeK8SStatefulSetName, conventions.AttributeK8SStatefulSetUID, - conventions.AttributeK8SContainerName, conventions.AttributeK8SJobName, conventions.AttributeK8SJobUID, - conventions.AttributeK8SCronJobName, conventions.AttributeK8SNodeName, conventions.AttributeContainerID, - conventions.AttributeContainerImageName, conventions.AttributeContainerImageTag, clusterUID: + specPodHostName, metadataPodStartTime, + conventions.AttributeK8SDeploymentName, conventions.AttributeK8SDeploymentUID, + conventions.AttributeK8SReplicaSetName, conventions.AttributeK8SReplicaSetUID, + conventions.AttributeK8SDaemonSetName, conventions.AttributeK8SDaemonSetUID, + conventions.AttributeK8SStatefulSetName, conventions.AttributeK8SStatefulSetUID, + conventions.AttributeK8SJobName, conventions.AttributeK8SJobUID, + conventions.AttributeK8SCronJobName, + conventions.AttributeK8SNodeName, conventions.AttributeK8SNodeUID, + conventions.AttributeK8SContainerName, conventions.AttributeContainerID, + conventions.AttributeContainerImageName, conventions.AttributeContainerImageTag, + clusterUID: default: return fmt.Errorf("\"%s\" is not a supported metadata field", field) } @@ -132,7 +137,7 @@ type ExtractConfig struct { // k8s.cluster.uid // // Specifying anything other than these values will result in an error. - // By default, the following fields are extracted and added to spans, metrics and logs as attributes: + // By default, the following fields are extracted and added to spans, metrics and logs as resource attributes: // - k8s.pod.name // - k8s.pod.uid // - k8s.pod.start_time diff --git a/processor/k8sattributesprocessor/e2e_test.go b/processor/k8sattributesprocessor/e2e_test.go index 962ee19583a0..9057ce96c06f 100644 --- a/processor/k8sattributesprocessor/e2e_test.go +++ b/processor/k8sattributesprocessor/e2e_test.go @@ -2,13 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 //go:build e2e -// +build e2e package k8sattributesprocessor import ( "context" "fmt" + "os" + "path/filepath" "regexp" "testing" "time" @@ -23,8 +24,6 @@ import ( "go.opentelemetry.io/collector/receiver/otlpreceiver" "go.opentelemetry.io/collector/receiver/receivertest" "go.uber.org/multierr" - "k8s.io/client-go/dynamic" - "k8s.io/client-go/tools/clientcmd" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest" ) @@ -33,10 +32,11 @@ const ( equal = iota regex exist + testKubeConfig = "/tmp/kube-config-otelcol-e2e-testing" + uidRe = "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" + startTimeRe = "^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}%3A\\\\d{2}%3A\\\\d{2}(?:%2E\\\\d+)?[A-Z]?(?:[+.-](?:08%3A\\\\d{2}|\\\\d{2}[A-Z]))?$" ) -const testKubeConfig = "/tmp/kube-config-otelcol-e2e-testing" - type expectedValue struct { mode int value string @@ -49,35 +49,57 @@ func newExpectedValue(mode int, value string) *expectedValue { } } -// TestE2E tests the k8s attributes processor with a real k8s cluster. +// TestE2E_ClusterRBAC tests the k8s attributes processor in a k8s cluster with the collector's service account having +// cluster-wide permissions to list/watch namespaces, nodes, pods and replicasets. The config in the test does not +// set filter::namespace. // The test requires a prebuilt otelcontribcol image uploaded to a kind k8s cluster defined in // `/tmp/kube-config-otelcol-e2e-testing`. Run the following command prior to running the test locally: // // kind create cluster --kubeconfig=/tmp/kube-config-otelcol-e2e-testing // make docker-otelcontribcol // KUBECONFIG=/tmp/kube-config-otelcol-e2e-testing kind load docker-image otelcontribcol:latest -func TestE2E(t *testing.T) { - kubeConfig, err := clientcmd.BuildConfigFromFlags("", testKubeConfig) - require.NoError(t, err) - dynamicClient, err := dynamic.NewForConfig(kubeConfig) +func TestE2E_ClusterRBAC(t *testing.T) { + testDir := filepath.Join("testdata", "e2e", "clusterrbac") + + k8sClient, err := k8stest.NewK8sClient(testKubeConfig) require.NoError(t, err) + nsFile := filepath.Join(testDir, "namespace.yaml") + buf, err := os.ReadFile(nsFile) + require.NoErrorf(t, err, "failed to read namespace object file %s", nsFile) + nsObj, err := k8stest.CreateObject(k8sClient, buf) + require.NoErrorf(t, err, "failed to create k8s namespace from file %s", nsFile) + + testNs := nsObj.GetName() + defer func() { + require.NoErrorf(t, k8stest.DeleteObject(k8sClient, nsObj), "failed to delete namespace %s", testNs) + }() + + metricsConsumer := new(consumertest.MetricsSink) + tracesConsumer := new(consumertest.TracesSink) + logsConsumer := new(consumertest.LogsSink) + shutdownSinks := startUpSinks(t, metricsConsumer, tracesConsumer, logsConsumer) + defer shutdownSinks() + testID := uuid.NewString()[:8] - collectorObjs := k8stest.CreateCollectorObjects(t, dynamicClient, testID) - telemetryGenObjs, telemetryGenObjInfos := k8stest.CreateTelemetryGenObjects(t, dynamicClient, testID) + collectorObjs := k8stest.CreateCollectorObjects(t, k8sClient, testID, filepath.Join(testDir, "collector")) + createTeleOpts := &k8stest.TelemetrygenCreateOpts{ + ManifestsDir: filepath.Join(testDir, "telemetrygen"), + TestID: testID, + OtlpEndpoint: fmt.Sprintf("otelcol-%s.%s:4317", testID, testNs), + DataTypes: []string{"metrics", "logs", "traces"}, + } + telemetryGenObjs, telemetryGenObjInfos := k8stest.CreateTelemetryGenObjects(t, k8sClient, createTeleOpts) defer func() { for _, obj := range append(collectorObjs, telemetryGenObjs...) { - require.NoErrorf(t, k8stest.DeleteObject(dynamicClient, obj), "failed to delete object %s", obj.GetName()) + require.NoErrorf(t, k8stest.DeleteObject(k8sClient, obj), "failed to delete object %s", obj.GetName()) } }() for _, info := range telemetryGenObjInfos { - k8stest.WaitForTelemetryGenToStart(t, dynamicClient, info.Namespace, info.PodLabelSelectors, info.Workload, info.DataType) + k8stest.WaitForTelemetryGenToStart(t, k8sClient, info.Namespace, info.PodLabelSelectors, info.Workload, info.DataType) } - metricsConsumer := new(consumertest.MetricsSink) - tracesConsumer := new(consumertest.TracesSink) - logsConsumer := new(consumertest.LogsSink) wantEntries := 128 // Minimal number of metrics/traces/logs to wait for. waitForData(t, wantEntries, metricsConsumer, tracesConsumer, logsConsumer) @@ -92,22 +114,23 @@ func TestE2E(t *testing.T) { dataType: component.DataTypeTraces, service: "test-traces-job", attrs: map[string]*expectedValue{ - "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-traces-job-[a-z0-9]*"), - "k8s.pod.ip": newExpectedValue(exist, ""), - "k8s.pod.uid": newExpectedValue(exist, ""), - "k8s.pod.start_time": newExpectedValue(exist, ""), - "k8s.node.name": newExpectedValue(exist, ""), - "k8s.namespace.name": newExpectedValue(equal, "default"), - "k8s.job.name": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-job"), - "k8s.job.uid": newExpectedValue(exist, ""), - "k8s.annotations.workload": newExpectedValue(equal, "job"), - "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-job"), - "k8s.container.name": newExpectedValue(equal, "telemetrygen"), - "k8s.cluster.uid": newExpectedValue(exist, ""), - "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), - "container.image.tag": newExpectedValue(equal, "latest"), - "container.id": newExpectedValue(exist, ""), - "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-traces-job-[a-z0-9]*"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, testNs), + "k8s.job.name": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-job"), + "k8s.job.uid": newExpectedValue(exist, ""), + "k8s.annotations.workload": newExpectedValue(equal, "job"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-job"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), }, }, { @@ -115,22 +138,23 @@ func TestE2E(t *testing.T) { dataType: component.DataTypeTraces, service: "test-traces-statefulset", attrs: map[string]*expectedValue{ - "k8s.pod.name": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-statefulset-0"), - "k8s.pod.ip": newExpectedValue(exist, ""), - "k8s.pod.uid": newExpectedValue(exist, ""), - "k8s.pod.start_time": newExpectedValue(exist, ""), - "k8s.node.name": newExpectedValue(exist, ""), - "k8s.namespace.name": newExpectedValue(equal, "default"), - "k8s.statefulset.name": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-statefulset"), - "k8s.statefulset.uid": newExpectedValue(exist, ""), - "k8s.annotations.workload": newExpectedValue(equal, "statefulset"), - "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-statefulset"), - "k8s.container.name": newExpectedValue(equal, "telemetrygen"), - "k8s.cluster.uid": newExpectedValue(exist, ""), - "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), - "container.image.tag": newExpectedValue(equal, "latest"), - "container.id": newExpectedValue(exist, ""), - "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.pod.name": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-statefulset-0"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, testNs), + "k8s.statefulset.name": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-statefulset"), + "k8s.statefulset.uid": newExpectedValue(exist, ""), + "k8s.annotations.workload": newExpectedValue(equal, "statefulset"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-statefulset"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), }, }, { @@ -138,23 +162,24 @@ func TestE2E(t *testing.T) { dataType: component.DataTypeTraces, service: "test-traces-deployment", attrs: map[string]*expectedValue{ - "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-traces-deployment-[a-z0-9]*-[a-z0-9]*"), - "k8s.pod.ip": newExpectedValue(exist, ""), - "k8s.pod.uid": newExpectedValue(exist, ""), - "k8s.pod.start_time": newExpectedValue(exist, ""), - "k8s.node.name": newExpectedValue(exist, ""), - "k8s.namespace.name": newExpectedValue(equal, "default"), - "k8s.deployment.name": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-deployment"), - "k8s.deployment.uid": newExpectedValue(exist, ""), - "k8s.replicaset.name": newExpectedValue(regex, "telemetrygen-"+testID+"-traces-deployment-[a-z0-9]*"), - "k8s.replicaset.uid": newExpectedValue(exist, ""), - "k8s.annotations.workload": newExpectedValue(equal, "deployment"), - "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-deployment"), - "k8s.container.name": newExpectedValue(equal, "telemetrygen"), - "k8s.cluster.uid": newExpectedValue(exist, ""), - "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), - "container.image.tag": newExpectedValue(equal, "latest"), - "container.id": newExpectedValue(exist, ""), + "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-traces-deployment-[a-z0-9]*-[a-z0-9]*"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, testNs), + "k8s.deployment.name": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-deployment"), + "k8s.deployment.uid": newExpectedValue(exist, ""), + "k8s.replicaset.name": newExpectedValue(regex, "telemetrygen-"+testID+"-traces-deployment-[a-z0-9]*"), + "k8s.replicaset.uid": newExpectedValue(exist, ""), + "k8s.annotations.workload": newExpectedValue(equal, "deployment"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-deployment"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), }, }, { @@ -162,22 +187,23 @@ func TestE2E(t *testing.T) { dataType: component.DataTypeTraces, service: "test-traces-daemonset", attrs: map[string]*expectedValue{ - "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-traces-daemonset-[a-z0-9]*"), - "k8s.pod.ip": newExpectedValue(exist, ""), - "k8s.pod.uid": newExpectedValue(exist, ""), - "k8s.pod.start_time": newExpectedValue(exist, ""), - "k8s.node.name": newExpectedValue(exist, ""), - "k8s.namespace.name": newExpectedValue(equal, "default"), - "k8s.daemonset.name": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-daemonset"), - "k8s.daemonset.uid": newExpectedValue(exist, ""), - "k8s.annotations.workload": newExpectedValue(equal, "daemonset"), - "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-daemonset"), - "k8s.container.name": newExpectedValue(equal, "telemetrygen"), - "k8s.cluster.uid": newExpectedValue(exist, ""), - "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), - "container.image.tag": newExpectedValue(equal, "latest"), - "container.id": newExpectedValue(exist, ""), - "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-traces-daemonset-[a-z0-9]*"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, testNs), + "k8s.daemonset.name": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-daemonset"), + "k8s.daemonset.uid": newExpectedValue(exist, ""), + "k8s.annotations.workload": newExpectedValue(equal, "daemonset"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-daemonset"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), }, }, { @@ -185,22 +211,23 @@ func TestE2E(t *testing.T) { dataType: component.DataTypeMetrics, service: "test-metrics-job", attrs: map[string]*expectedValue{ - "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-metrics-job-[a-z0-9]*"), - "k8s.pod.ip": newExpectedValue(exist, ""), - "k8s.pod.uid": newExpectedValue(exist, ""), - "k8s.pod.start_time": newExpectedValue(exist, ""), - "k8s.node.name": newExpectedValue(exist, ""), - "k8s.namespace.name": newExpectedValue(equal, "default"), - "k8s.job.name": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-job"), - "k8s.job.uid": newExpectedValue(exist, ""), - "k8s.annotations.workload": newExpectedValue(equal, "job"), - "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-job"), - "k8s.container.name": newExpectedValue(equal, "telemetrygen"), - "k8s.cluster.uid": newExpectedValue(exist, ""), - "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), - "container.image.tag": newExpectedValue(equal, "latest"), - "container.id": newExpectedValue(exist, ""), - "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-metrics-job-[a-z0-9]*"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, testNs), + "k8s.job.name": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-job"), + "k8s.job.uid": newExpectedValue(exist, ""), + "k8s.annotations.workload": newExpectedValue(equal, "job"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-job"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), }, }, { @@ -208,22 +235,23 @@ func TestE2E(t *testing.T) { dataType: component.DataTypeMetrics, service: "test-metrics-statefulset", attrs: map[string]*expectedValue{ - "k8s.pod.name": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-statefulset-0"), - "k8s.pod.ip": newExpectedValue(exist, ""), - "k8s.pod.uid": newExpectedValue(exist, ""), - "k8s.pod.start_time": newExpectedValue(exist, ""), - "k8s.node.name": newExpectedValue(exist, ""), - "k8s.namespace.name": newExpectedValue(equal, "default"), - "k8s.statefulset.name": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-statefulset"), - "k8s.statefulset.uid": newExpectedValue(exist, ""), - "k8s.annotations.workload": newExpectedValue(equal, "statefulset"), - "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-statefulset"), - "k8s.container.name": newExpectedValue(equal, "telemetrygen"), - "k8s.cluster.uid": newExpectedValue(exist, ""), - "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), - "container.image.tag": newExpectedValue(equal, "latest"), - "container.id": newExpectedValue(exist, ""), - "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.pod.name": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-statefulset-0"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, testNs), + "k8s.statefulset.name": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-statefulset"), + "k8s.statefulset.uid": newExpectedValue(exist, ""), + "k8s.annotations.workload": newExpectedValue(equal, "statefulset"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-statefulset"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), }, }, { @@ -231,23 +259,24 @@ func TestE2E(t *testing.T) { dataType: component.DataTypeMetrics, service: "test-metrics-deployment", attrs: map[string]*expectedValue{ - "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-metrics-deployment-[a-z0-9]*-[a-z0-9]*"), - "k8s.pod.ip": newExpectedValue(exist, ""), - "k8s.pod.uid": newExpectedValue(exist, ""), - "k8s.pod.start_time": newExpectedValue(exist, ""), - "k8s.node.name": newExpectedValue(exist, ""), - "k8s.namespace.name": newExpectedValue(equal, "default"), - "k8s.deployment.name": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-deployment"), - "k8s.deployment.uid": newExpectedValue(exist, ""), - "k8s.replicaset.name": newExpectedValue(regex, "telemetrygen-"+testID+"-metrics-deployment-[a-z0-9]*"), - "k8s.replicaset.uid": newExpectedValue(exist, ""), - "k8s.annotations.workload": newExpectedValue(equal, "deployment"), - "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-deployment"), - "k8s.container.name": newExpectedValue(equal, "telemetrygen"), - "k8s.cluster.uid": newExpectedValue(exist, ""), - "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), - "container.image.tag": newExpectedValue(equal, "latest"), - "container.id": newExpectedValue(exist, ""), + "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-metrics-deployment-[a-z0-9]*-[a-z0-9]*"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, testNs), + "k8s.deployment.name": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-deployment"), + "k8s.deployment.uid": newExpectedValue(exist, ""), + "k8s.replicaset.name": newExpectedValue(regex, "telemetrygen-"+testID+"-metrics-deployment-[a-z0-9]*"), + "k8s.replicaset.uid": newExpectedValue(exist, ""), + "k8s.annotations.workload": newExpectedValue(equal, "deployment"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-deployment"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), }, }, { @@ -255,22 +284,23 @@ func TestE2E(t *testing.T) { dataType: component.DataTypeMetrics, service: "test-metrics-daemonset", attrs: map[string]*expectedValue{ - "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-metrics-daemonset-[a-z0-9]*"), - "k8s.pod.ip": newExpectedValue(exist, ""), - "k8s.pod.uid": newExpectedValue(exist, ""), - "k8s.pod.start_time": newExpectedValue(exist, ""), - "k8s.node.name": newExpectedValue(exist, ""), - "k8s.namespace.name": newExpectedValue(equal, "default"), - "k8s.daemonset.name": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-daemonset"), - "k8s.daemonset.uid": newExpectedValue(exist, ""), - "k8s.annotations.workload": newExpectedValue(equal, "daemonset"), - "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-daemonset"), - "k8s.container.name": newExpectedValue(equal, "telemetrygen"), - "k8s.cluster.uid": newExpectedValue(exist, ""), - "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), - "container.image.tag": newExpectedValue(equal, "latest"), - "container.id": newExpectedValue(exist, ""), - "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-metrics-daemonset-[a-z0-9]*"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, testNs), + "k8s.daemonset.name": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-daemonset"), + "k8s.daemonset.uid": newExpectedValue(exist, ""), + "k8s.annotations.workload": newExpectedValue(equal, "daemonset"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-daemonset"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), }, }, { @@ -278,41 +308,208 @@ func TestE2E(t *testing.T) { dataType: component.DataTypeLogs, service: "test-logs-job", attrs: map[string]*expectedValue{ - "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-logs-job-[a-z0-9]*"), + "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-logs-job-[a-z0-9]*"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, testNs), + "k8s.job.name": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-job"), + "k8s.job.uid": newExpectedValue(exist, ""), + "k8s.annotations.workload": newExpectedValue(equal, "job"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-job"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), + }, + }, + { + name: "logs-statefulset", + dataType: component.DataTypeLogs, + service: "test-logs-statefulset", + attrs: map[string]*expectedValue{ + "k8s.pod.name": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-statefulset-0"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, testNs), + "k8s.statefulset.name": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-statefulset"), + "k8s.statefulset.uid": newExpectedValue(exist, ""), + "k8s.annotations.workload": newExpectedValue(equal, "statefulset"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-statefulset"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), + }, + }, + { + name: "logs-deployment", + dataType: component.DataTypeLogs, + service: "test-logs-deployment", + attrs: map[string]*expectedValue{ + "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-logs-deployment-[a-z0-9]*-[a-z0-9]*"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, testNs), + "k8s.deployment.name": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-deployment"), + "k8s.deployment.uid": newExpectedValue(exist, ""), + "k8s.replicaset.name": newExpectedValue(regex, "telemetrygen-"+testID+"-logs-deployment-[a-z0-9]*"), + "k8s.replicaset.uid": newExpectedValue(exist, ""), + "k8s.annotations.workload": newExpectedValue(equal, "deployment"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-deployment"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), + }, + }, + { + name: "logs-daemonset", + dataType: component.DataTypeLogs, + service: "test-logs-daemonset", + attrs: map[string]*expectedValue{ + "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-logs-daemonset-[a-z0-9]*"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, testNs), + "k8s.daemonset.name": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-daemonset"), + "k8s.daemonset.uid": newExpectedValue(exist, ""), + "k8s.annotations.workload": newExpectedValue(equal, "daemonset"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-daemonset"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), + }, + }, + } + + for _, tc := range tcs { + t.Run(tc.name, func(t *testing.T) { + switch tc.dataType { + case component.DataTypeTraces: + scanTracesForAttributes(t, tracesConsumer, tc.service, tc.attrs) + case component.DataTypeMetrics: + scanMetricsForAttributes(t, metricsConsumer, tc.service, tc.attrs) + case component.DataTypeLogs: + scanLogsForAttributes(t, logsConsumer, tc.service, tc.attrs) + default: + t.Fatalf("unknown data type %s", tc.dataType) + } + }) + } +} + +// Test with `filter::namespace` set and only role binding to collector's SA. We can't get node and namespace labels/annotations. +func TestE2E_NamespacedRBAC(t *testing.T) { + testDir := filepath.Join("testdata", "e2e", "namespacedrbac") + + k8sClient, err := k8stest.NewK8sClient(testKubeConfig) + require.NoError(t, err) + + nsFile := filepath.Join(testDir, "namespace.yaml") + buf, err := os.ReadFile(nsFile) + require.NoErrorf(t, err, "failed to read namespace object file %s", nsFile) + nsObj, err := k8stest.CreateObject(k8sClient, buf) + require.NoErrorf(t, err, "failed to create k8s namespace from file %s", nsFile) + nsName := nsObj.GetName() + defer func() { + require.NoErrorf(t, k8stest.DeleteObject(k8sClient, nsObj), "failed to delete namespace %s", nsName) + }() + + metricsConsumer := new(consumertest.MetricsSink) + tracesConsumer := new(consumertest.TracesSink) + logsConsumer := new(consumertest.LogsSink) + shutdownSinks := startUpSinks(t, metricsConsumer, tracesConsumer, logsConsumer) + defer shutdownSinks() + + testID := uuid.NewString()[:8] + collectorObjs := k8stest.CreateCollectorObjects(t, k8sClient, testID, filepath.Join(testDir, "collector")) + createTeleOpts := &k8stest.TelemetrygenCreateOpts{ + ManifestsDir: filepath.Join(testDir, "telemetrygen"), + TestID: testID, + OtlpEndpoint: fmt.Sprintf("otelcol-%s.%s:4317", testID, nsName), + DataTypes: []string{"metrics", "logs", "traces"}, + } + telemetryGenObjs, telemetryGenObjInfos := k8stest.CreateTelemetryGenObjects(t, k8sClient, createTeleOpts) + defer func() { + for _, obj := range append(collectorObjs, telemetryGenObjs...) { + require.NoErrorf(t, k8stest.DeleteObject(k8sClient, obj), "failed to delete object %s", obj.GetName()) + } + }() + + for _, info := range telemetryGenObjInfos { + k8stest.WaitForTelemetryGenToStart(t, k8sClient, info.Namespace, info.PodLabelSelectors, info.Workload, info.DataType) + } + + wantEntries := 20 // Minimal number of metrics/traces/logs to wait for. + waitForData(t, wantEntries, metricsConsumer, tracesConsumer, logsConsumer) + + tcs := []struct { + name string + dataType component.DataType + service string + attrs map[string]*expectedValue + }{ + { + name: "traces-deployment", + dataType: component.DataTypeTraces, + service: "test-traces-deployment", + attrs: map[string]*expectedValue{ + "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-traces-deployment-[a-z0-9]*-[a-z0-9]*"), "k8s.pod.ip": newExpectedValue(exist, ""), - "k8s.pod.uid": newExpectedValue(exist, ""), - "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, startTimeRe), "k8s.node.name": newExpectedValue(exist, ""), - "k8s.namespace.name": newExpectedValue(equal, "default"), - "k8s.job.name": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-job"), - "k8s.job.uid": newExpectedValue(exist, ""), - "k8s.annotations.workload": newExpectedValue(equal, "job"), - "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-job"), + "k8s.namespace.name": newExpectedValue(equal, nsName), + "k8s.deployment.name": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-deployment"), + "k8s.deployment.uid": newExpectedValue(regex, uidRe), + "k8s.replicaset.name": newExpectedValue(regex, "telemetrygen-"+testID+"-traces-deployment-[a-z0-9]*"), + "k8s.replicaset.uid": newExpectedValue(regex, uidRe), + "k8s.annotations.workload": newExpectedValue(equal, "deployment"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-deployment"), "k8s.container.name": newExpectedValue(equal, "telemetrygen"), - "k8s.cluster.uid": newExpectedValue(exist, ""), "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), "container.image.tag": newExpectedValue(equal, "latest"), "container.id": newExpectedValue(exist, ""), - "k8s.node.labels.foo": newExpectedValue(equal, "too"), }, }, { - name: "logs-statefulset", - dataType: component.DataTypeLogs, - service: "test-logs-statefulset", + name: "metrics-deployment", + dataType: component.DataTypeMetrics, + service: "test-metrics-deployment", attrs: map[string]*expectedValue{ - "k8s.pod.name": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-statefulset-0"), + "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-metrics-deployment-[a-z0-9]*-[a-z0-9]*"), "k8s.pod.ip": newExpectedValue(exist, ""), - "k8s.pod.uid": newExpectedValue(exist, ""), - "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, startTimeRe), "k8s.node.name": newExpectedValue(exist, ""), - "k8s.namespace.name": newExpectedValue(equal, "default"), - "k8s.statefulset.name": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-statefulset"), - "k8s.statefulset.uid": newExpectedValue(exist, ""), - "k8s.annotations.workload": newExpectedValue(equal, "statefulset"), - "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-statefulset"), + "k8s.namespace.name": newExpectedValue(equal, nsName), + "k8s.deployment.name": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-deployment"), + "k8s.deployment.uid": newExpectedValue(regex, uidRe), + "k8s.replicaset.name": newExpectedValue(regex, "telemetrygen-"+testID+"-metrics-deployment-[a-z0-9]*"), + "k8s.replicaset.uid": newExpectedValue(regex, uidRe), + "k8s.annotations.workload": newExpectedValue(equal, "deployment"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-deployment"), "k8s.container.name": newExpectedValue(equal, "telemetrygen"), - "k8s.cluster.uid": newExpectedValue(exist, ""), "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), "container.image.tag": newExpectedValue(equal, "latest"), "container.id": newExpectedValue(exist, ""), @@ -325,45 +522,183 @@ func TestE2E(t *testing.T) { attrs: map[string]*expectedValue{ "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-logs-deployment-[a-z0-9]*-[a-z0-9]*"), "k8s.pod.ip": newExpectedValue(exist, ""), - "k8s.pod.uid": newExpectedValue(exist, ""), - "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, startTimeRe), "k8s.node.name": newExpectedValue(exist, ""), - "k8s.namespace.name": newExpectedValue(equal, "default"), + "k8s.namespace.name": newExpectedValue(equal, nsName), "k8s.deployment.name": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-deployment"), - "k8s.deployment.uid": newExpectedValue(exist, ""), + "k8s.deployment.uid": newExpectedValue(regex, uidRe), "k8s.replicaset.name": newExpectedValue(regex, "telemetrygen-"+testID+"-logs-deployment-[a-z0-9]*"), - "k8s.replicaset.uid": newExpectedValue(exist, ""), + "k8s.replicaset.uid": newExpectedValue(regex, uidRe), "k8s.annotations.workload": newExpectedValue(equal, "deployment"), "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-deployment"), "k8s.container.name": newExpectedValue(equal, "telemetrygen"), - "k8s.cluster.uid": newExpectedValue(exist, ""), "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), "container.image.tag": newExpectedValue(equal, "latest"), "container.id": newExpectedValue(exist, ""), - "k8s.node.labels.foo": newExpectedValue(equal, "too"), + }, + }, + } + + for _, tc := range tcs { + t.Run(tc.name, func(t *testing.T) { + switch tc.dataType { + case component.DataTypeTraces: + scanTracesForAttributes(t, tracesConsumer, tc.service, tc.attrs) + case component.DataTypeMetrics: + scanMetricsForAttributes(t, metricsConsumer, tc.service, tc.attrs) + case component.DataTypeLogs: + scanLogsForAttributes(t, logsConsumer, tc.service, tc.attrs) + default: + t.Fatalf("unknown data type %s", tc.dataType) + } + }) + } +} + +// Test with `filter::namespace` set, role binding for namespace-scoped objects (pod, replicaset) and clusterrole +// binding for node and namespace objects. +func TestE2E_MixRBAC(t *testing.T) { + testDir := filepath.Join("testdata", "e2e", "mixrbac") + + k8sClient, err := k8stest.NewK8sClient(testKubeConfig) + require.NoError(t, err) + + metricsConsumer := new(consumertest.MetricsSink) + tracesConsumer := new(consumertest.TracesSink) + logsConsumer := new(consumertest.LogsSink) + shutdownSinks := startUpSinks(t, metricsConsumer, tracesConsumer, logsConsumer) + defer shutdownSinks() + + var workloadNs, otelNs string + testID := uuid.NewString()[:8] + for i, nsManifest := range []string{filepath.Join(testDir, "otelcol-namespace.yaml"), filepath.Join(testDir, "workload-namespace.yaml")} { + buf, err := os.ReadFile(nsManifest) + require.NoErrorf(t, err, "failed to read namespace object file %s", nsManifest) + nsObj, err := k8stest.CreateObject(k8sClient, buf) + require.NoErrorf(t, err, "failed to create k8s namespace from file %s", nsManifest) + switch i { + case 0: + otelNs = nsObj.GetName() + case 1: + workloadNs = nsObj.GetName() + } + + defer func() { + require.NoErrorf(t, k8stest.DeleteObject(k8sClient, nsObj), "failed to delete namespace %s", nsObj.GetName()) + }() + } + + collectorObjs := k8stest.CreateCollectorObjects(t, k8sClient, testID, filepath.Join(testDir, "collector")) + defer func() { + for _, obj := range collectorObjs { + require.NoErrorf(t, k8stest.DeleteObject(k8sClient, obj), "failed to delete object %s", obj.GetName()) + } + }() + + createTeleOpts := &k8stest.TelemetrygenCreateOpts{ + ManifestsDir: filepath.Join(testDir, "telemetrygen"), + TestID: testID, + OtlpEndpoint: fmt.Sprintf("otelcol-%s.%s:4317", testID, otelNs), + DataTypes: []string{"metrics", "logs", "traces"}, + } + + telemetryGenObjs, telemetryGenObjInfos := k8stest.CreateTelemetryGenObjects(t, k8sClient, createTeleOpts) + defer func() { + for _, obj := range telemetryGenObjs { + require.NoErrorf(t, k8stest.DeleteObject(k8sClient, obj), "failed to delete object %s", obj.GetName()) + } + }() + + for _, info := range telemetryGenObjInfos { + k8stest.WaitForTelemetryGenToStart(t, k8sClient, info.Namespace, info.PodLabelSelectors, info.Workload, info.DataType) + } + + wantEntries := 20 // Minimal number of metrics/traces/logs to wait for. + waitForData(t, wantEntries, metricsConsumer, tracesConsumer, logsConsumer) + + tcs := []struct { + name string + dataType component.DataType + service string + attrs map[string]*expectedValue + }{ + { + name: "traces-deployment", + dataType: component.DataTypeTraces, + service: "test-traces-deployment", + attrs: map[string]*expectedValue{ + "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-traces-deployment-[a-z0-9]*-[a-z0-9]*"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, workloadNs), + "k8s.deployment.name": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-deployment"), + "k8s.deployment.uid": newExpectedValue(regex, uidRe), + "k8s.replicaset.name": newExpectedValue(regex, "telemetrygen-"+testID+"-traces-deployment-[a-z0-9]*"), + "k8s.replicaset.uid": newExpectedValue(regex, uidRe), + "k8s.annotations.workload": newExpectedValue(equal, "deployment"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-traces-deployment"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), + "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), }, }, { - name: "logs-daemonset", + name: "metrics-deployment", + dataType: component.DataTypeMetrics, + service: "test-metrics-deployment", + attrs: map[string]*expectedValue{ + "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-metrics-deployment-[a-z0-9]*-[a-z0-9]*"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, workloadNs), + "k8s.deployment.name": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-deployment"), + "k8s.deployment.uid": newExpectedValue(regex, uidRe), + "k8s.replicaset.name": newExpectedValue(regex, "telemetrygen-"+testID+"-metrics-deployment-[a-z0-9]*"), + "k8s.replicaset.uid": newExpectedValue(regex, uidRe), + "k8s.annotations.workload": newExpectedValue(equal, "deployment"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-metrics-deployment"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), + "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), + }, + }, + { + name: "logs-deployment", dataType: component.DataTypeLogs, - service: "test-logs-daemonset", + service: "test-logs-deployment", attrs: map[string]*expectedValue{ - "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-logs-daemonset-[a-z0-9]*"), - "k8s.pod.ip": newExpectedValue(exist, ""), - "k8s.pod.uid": newExpectedValue(exist, ""), - "k8s.pod.start_time": newExpectedValue(exist, ""), - "k8s.node.name": newExpectedValue(exist, ""), - "k8s.namespace.name": newExpectedValue(equal, "default"), - "k8s.daemonset.name": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-daemonset"), - "k8s.daemonset.uid": newExpectedValue(exist, ""), - "k8s.annotations.workload": newExpectedValue(equal, "daemonset"), - "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-daemonset"), - "k8s.container.name": newExpectedValue(equal, "telemetrygen"), - "k8s.cluster.uid": newExpectedValue(exist, ""), - "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), - "container.image.tag": newExpectedValue(equal, "latest"), - "container.id": newExpectedValue(exist, ""), - "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.pod.name": newExpectedValue(regex, "telemetrygen-"+testID+"-logs-deployment-[a-z0-9]*-[a-z0-9]*"), + "k8s.pod.ip": newExpectedValue(exist, ""), + "k8s.pod.uid": newExpectedValue(regex, uidRe), + "k8s.pod.start_time": newExpectedValue(exist, ""), + "k8s.node.name": newExpectedValue(exist, ""), + "k8s.namespace.name": newExpectedValue(equal, workloadNs), + "k8s.deployment.name": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-deployment"), + "k8s.deployment.uid": newExpectedValue(regex, uidRe), + "k8s.replicaset.name": newExpectedValue(regex, "telemetrygen-"+testID+"-logs-deployment-[a-z0-9]*"), + "k8s.replicaset.uid": newExpectedValue(regex, uidRe), + "k8s.annotations.workload": newExpectedValue(equal, "deployment"), + "k8s.labels.app": newExpectedValue(equal, "telemetrygen-"+testID+"-logs-deployment"), + "k8s.container.name": newExpectedValue(equal, "telemetrygen"), + "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), + "container.image.tag": newExpectedValue(equal, "latest"), + "container.id": newExpectedValue(exist, ""), + "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), + "k8s.node.labels.foo": newExpectedValue(equal, "too"), + "k8s.cluster.uid": newExpectedValue(regex, uidRe), }, }, } @@ -484,7 +819,7 @@ func resourceHasAttributes(resource pcommon.Resource, kvs map[string]*expectedVa return err } -func waitForData(t *testing.T, entriesNum int, mc *consumertest.MetricsSink, tc *consumertest.TracesSink, lc *consumertest.LogsSink) { +func startUpSinks(t *testing.T, mc *consumertest.MetricsSink, tc *consumertest.TracesSink, lc *consumertest.LogsSink) func() { f := otlpreceiver.NewFactory() cfg := f.CreateDefaultConfig().(*otlpreceiver.Config) @@ -495,10 +830,12 @@ func waitForData(t *testing.T, entriesNum int, mc *consumertest.MetricsSink, tc rcvr, err := f.CreateLogsReceiver(context.Background(), receivertest.NewNopCreateSettings(), cfg, lc) require.NoError(t, err, "failed creating logs receiver") require.NoError(t, rcvr.Start(context.Background(), componenttest.NewNopHost())) - defer func() { + return func() { assert.NoError(t, rcvr.Shutdown(context.Background())) - }() + } +} +func waitForData(t *testing.T, entriesNum int, mc *consumertest.MetricsSink, tc *consumertest.TracesSink, lc *consumertest.LogsSink) { timeoutMinutes := 3 require.Eventuallyf(t, func() bool { return len(mc.AllMetrics()) > entriesNum && len(tc.AllTraces()) > entriesNum && len(lc.AllLogs()) > entriesNum diff --git a/processor/k8sattributesprocessor/factory.go b/processor/k8sattributesprocessor/factory.go index 2786851c7c8c..e994ed6df256 100644 --- a/processor/k8sattributesprocessor/factory.go +++ b/processor/k8sattributesprocessor/factory.go @@ -75,10 +75,7 @@ func createTracesProcessorWithOptions( next consumer.Traces, options ...option, ) (processor.Traces, error) { - kp, err := createKubernetesProcessor(set, cfg, options...) - if err != nil { - return nil, err - } + kp := createKubernetesProcessor(set, cfg, options...) return processorhelper.NewTracesProcessor( ctx, @@ -98,10 +95,7 @@ func createMetricsProcessorWithOptions( nextMetricsConsumer consumer.Metrics, options ...option, ) (processor.Metrics, error) { - kp, err := createKubernetesProcessor(set, cfg, options...) - if err != nil { - return nil, err - } + kp := createKubernetesProcessor(set, cfg, options...) return processorhelper.NewMetricsProcessor( ctx, @@ -121,10 +115,7 @@ func createLogsProcessorWithOptions( nextLogsConsumer consumer.Logs, options ...option, ) (processor.Logs, error) { - kp, err := createKubernetesProcessor(set, cfg, options...) - if err != nil { - return nil, err - } + kp := createKubernetesProcessor(set, cfg, options...) return processorhelper.NewLogsProcessor( ctx, @@ -141,26 +132,14 @@ func createKubernetesProcessor( params processor.CreateSettings, cfg component.Config, options ...option, -) (*kubernetesprocessor, error) { - kp := &kubernetesprocessor{logger: params.Logger} - - allOptions := append(createProcessorOpts(cfg), options...) - - for _, opt := range allOptions { - if err := opt(kp); err != nil { - return nil, err - } - } - - // This might have been set by an option already - if kp.kc == nil { - err := kp.initKubeClient(kp.logger, kubeClientProvider) - if err != nil { - return nil, err - } +) *kubernetesprocessor { + kp := &kubernetesprocessor{logger: params.Logger, + cfg: cfg, + options: options, + telemetrySettings: params.TelemetrySettings, } - return kp, nil + return kp } func createProcessorOpts(cfg component.Config) []option { diff --git a/processor/k8sattributesprocessor/generated_component_test.go b/processor/k8sattributesprocessor/generated_component_test.go new file mode 100644 index 000000000000..9aa28c6101cf --- /dev/null +++ b/processor/k8sattributesprocessor/generated_component_test.go @@ -0,0 +1,141 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package k8sattributesprocessor + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "metrics", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesProcessor(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(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/processor/k8sattributesprocessor/go.mod b/processor/k8sattributesprocessor/go.mod index 8c7c042f9f8f..efb659b85374 100644 --- a/processor/k8sattributesprocessor/go.mod +++ b/processor/k8sattributesprocessor/go.mod @@ -1,51 +1,57 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor -go 1.20 +go 1.21 require ( github.com/google/go-cmp v0.6.0 - github.com/google/uuid v1.4.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.89.0 - github.com/stretchr/testify v1.8.4 + github.com/google/uuid v1.6.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.98.0 + github.com/stretchr/testify v1.9.0 go.opencensus.io v0.24.0 - go.opentelemetry.io/collector v0.89.0 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/processor v0.89.0 - go.opentelemetry.io/collector/receiver v0.89.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 - go.opentelemetry.io/collector/semconv v0.89.0 + go.opentelemetry.io/collector v0.98.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/featuregate v1.5.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/collector/receiver v0.98.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 + go.opentelemetry.io/collector/semconv v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 - k8s.io/api v0.28.3 - k8s.io/apimachinery v0.28.3 - k8s.io/client-go v0.28.3 + go.uber.org/zap v1.27.0 + k8s.io/api v0.29.3 + k8s.io/apimachinery v0.29.3 + k8s.io/client-go v0.29.3 ) require ( github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // 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 github.com/davecgh/go-spew v1.1.1 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.7+incompatible // indirect - github.com/docker/go-connections v0.4.0 // indirect + github.com/distribution/reference v0.5.0 // indirect + github.com/docker/docker v25.0.5+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect @@ -53,62 +59,68 @@ require ( github.com/imdario/mergo v0.3.13 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.8 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/opencontainers/image-spec v1.1.0-rc5 // indirect github.com/openshift/api v3.9.0+incompatible // indirect github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/pflag v1.0.5 // indirect - go.opentelemetry.io/collector/config/configauth v0.89.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.89.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.89.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.89.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.89.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.89.0 // indirect - go.opentelemetry.io/collector/config/internal v0.89.0 // indirect - go.opentelemetry.io/collector/extension v0.89.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.89.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.98.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.5.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.98.0 // indirect + go.opentelemetry.io/collector/config/confighttp v0.98.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.98.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.5.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.98.0 // indirect + go.opentelemetry.io/collector/config/internal v0.98.0 // indirect + go.opentelemetry.io/collector/extension v0.98.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.98.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.15.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/tools v0.16.1 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/processor/k8sattributesprocessor/go.sum b/processor/k8sattributesprocessor/go.sum index 5a997dcea35c..291f2f26e653 100644 --- a/processor/k8sattributesprocessor/go.sum +++ b/processor/k8sattributesprocessor/go.sum @@ -38,7 +38,6 @@ cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMz cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= -cloud.google.com/go v0.110.7 h1:rJyC7nWRg2jWGZ4wSJ5nY65GTdYJkg0cd/uXb+ACI6o= cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= @@ -210,13 +209,11 @@ cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/ cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= @@ -755,7 +752,6 @@ cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vf cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= @@ -789,12 +785,14 @@ github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/P github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= 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/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +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/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -817,18 +815,19 @@ github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= @@ -837,8 +836,8 @@ github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+m github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= 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= @@ -858,7 +857,6 @@ github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0+ github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= @@ -880,17 +878,15 @@ github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmn github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= @@ -910,6 +906,9 @@ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -948,8 +947,9 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -1008,8 +1008,8 @@ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= @@ -1036,9 +1036,12 @@ github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= 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/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -1065,21 +1068,22 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -1099,18 +1103,16 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= 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.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= 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= @@ -1119,6 +1121,7 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= 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/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -1130,14 +1133,16 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= +github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/openshift/api v0.0.0-20180801171038-322a19404e37 h1:05irGU4HK4IauGGDbsk+ZHrm1wOzMLYjMlfaiqMrBYc= github.com/openshift/api v0.0.0-20180801171038-322a19404e37/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/api v0.0.0-20210521075222-e273a339932a/go.mod h1:izBmoXbUu3z5kUa4FjZhvekTsyzIWiOoaIgJiZBBMQs= @@ -1157,15 +1162,18 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -1173,10 +1181,13 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= @@ -1200,8 +1211,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1220,70 +1231,87 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configauth v0.89.0 h1:F082cy1OwrjyucI0wgEO2lRPTWJlgJzM/I5d0BoVgp4= -go.opentelemetry.io/collector/config/configauth v0.89.0/go.mod h1:yRJj70B3MyfbyGuyKO1I+5LtGuvx/WLUh8kuQ/XX6RE= -go.opentelemetry.io/collector/config/configcompression v0.89.0 h1:Z4LG045HwoNqXaibVbAQkcAQGmvY4OHrY4eCppoAzoQ= -go.opentelemetry.io/collector/config/configcompression v0.89.0/go.mod h1:LaavoxZsro5lL7qh1g9DMifG0qixWPEecW18Qr8bpag= -go.opentelemetry.io/collector/config/configgrpc v0.89.0 h1:Lnv/4EbImss5JuVE2nffk00pCGfk4tRyV8Gm3Gl7yuM= -go.opentelemetry.io/collector/config/configgrpc v0.89.0/go.mod h1:2GuAxpU34a1X19kCZ8Kw3FUsxOIiFcWHiYorRCyhnCc= -go.opentelemetry.io/collector/config/confighttp v0.89.0 h1:RatLdeZkCu3uLtCjbS8g5Aec2JB3/CSpB6O7P081Bhg= -go.opentelemetry.io/collector/config/confighttp v0.89.0/go.mod h1:R5BIbvqlxSDQGpCRWd2HBZIWijfSIWRpLeSpZjkKkag= -go.opentelemetry.io/collector/config/confignet v0.89.0 h1:Ekh+XhXelnnJ9as8IWhdUOfjnDPhz12XMJQ8sWNAbGw= -go.opentelemetry.io/collector/config/confignet v0.89.0/go.mod h1:cpO8JYWGONaViOygKVw+Hd2UoBcn2cUiyi0WWeFTwJY= -go.opentelemetry.io/collector/config/configopaque v0.89.0 h1:Ad6yGcGBHs+J9SNjkedY68JsLZ1vBn4kKzdqKuTCRsE= -go.opentelemetry.io/collector/config/configopaque v0.89.0/go.mod h1:TPCHaU+QXiEV+JXbgyr6mSErTI9chwQyasDVMdJr3eY= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/config/configtls v0.89.0 h1:XDeUaTU7LYwnEXz/CSdjbCStJa7n0YR1q0QpK0Vtw9w= -go.opentelemetry.io/collector/config/configtls v0.89.0/go.mod h1:NlE4elqXoyFfzQvYfzgH6uOU1zNVa+5tt6EIq52TJ9Y= -go.opentelemetry.io/collector/config/internal v0.89.0 h1:fs7LJTJd1EF76pjK7ZZZMWNxze0+pDXq3mfRwhm0P0g= -go.opentelemetry.io/collector/config/internal v0.89.0/go.mod h1:42VsQ/1kP2qnvzjNi+dfNP+KyCFRADejyrJ8m2GVL3M= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/extension/auth v0.89.0 h1:eo9JoWklZdSManEPLm1LqlwEq5v/YIsOupjZHdRYm3I= -go.opentelemetry.io/collector/extension/auth v0.89.0/go.mod h1:TzC5WYGMgsZvkpYSU1Jlwxh46tSDmWRLFsc9awXaedk= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0 h1:ayqzWyj56xyc0tcBpaYjWtxvj5pfZNhYC8LrwvlLAeE= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.89.0/go.mod h1:7p2oZ09hP+h6WpTv67PgEJx+azViVqLBE4IfrnDOWOc= -go.opentelemetry.io/collector/semconv v0.89.0 h1:Sw+MiI3/oiYIY+ebkanZsOaBxXMx3sqnH1/6NaD4rLQ= -go.opentelemetry.io/collector/semconv v0.89.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/collector/service v0.89.0 h1:dZSK++Eu2H/vzWjhVG3yC0P76Xu5xE6qji0dMy0fRTw= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configauth v0.98.0 h1:FPffZ1dRL6emStrDUEGpL0rCChbUZNAQgpArXD0SESI= +go.opentelemetry.io/collector/config/configauth v0.98.0/go.mod h1:5pMzf2zgFwS7tujNq0AtOOli5vxIvnrNi7JlZwrBOFo= +go.opentelemetry.io/collector/config/configcompression v1.5.0 h1:FTxKbFPN4LznRCH/GQ+b+0tAWmg80Y2eEka79S2sLZ0= +go.opentelemetry.io/collector/config/configcompression v1.5.0/go.mod h1:O0fOPCADyGwGLLIf5lf7N3960NsnIfxsm6dr/mIpL+M= +go.opentelemetry.io/collector/config/configgrpc v0.98.0 h1:4yP/TphwQnbgLpJ72NymXaERVjLjuDAQp4iDKCTcv5g= +go.opentelemetry.io/collector/config/configgrpc v0.98.0/go.mod h1:tIng0xx1XlVr4I0YG5bNpts0hZDjwzN3Jkz6cKaSH/s= +go.opentelemetry.io/collector/config/confighttp v0.98.0 h1:pW7gR34TTXcrCHJgemL6A4VBVBS2NyDAkruSMvQj1Vo= +go.opentelemetry.io/collector/config/confighttp v0.98.0/go.mod h1:M9PMtiKrTJMG8i3SqJ+AUVKhR6sa3G/8S2F1+Dxkkr0= +go.opentelemetry.io/collector/config/confignet v0.98.0 h1:pXDBb2hFe10T/NMHlL/oMgk1aFfe4NmmJFdFoioyC9o= +go.opentelemetry.io/collector/config/confignet v0.98.0/go.mod h1:3naWoPss70RhDHhYjGACi7xh4NcVRvs9itzIRVWyu1k= +go.opentelemetry.io/collector/config/configopaque v1.5.0 h1:WJzgmsFU2v63BypPBNGL31ACwWn6PwumPJNpLZplcdE= +go.opentelemetry.io/collector/config/configopaque v1.5.0/go.mod h1:/otnfj2E8r5EfaAdNV4qHkTclmiBCZXaahV5EcLwT7k= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/config/configtls v0.98.0 h1:g+MADy01ge8iGC6v2tbJ5G27CWNG1BaJtmYdmpvm8e4= +go.opentelemetry.io/collector/config/configtls v0.98.0/go.mod h1:9RHArziz0mNEEkti0kz5LIdvbQGT7/Unu/0whKKazHQ= +go.opentelemetry.io/collector/config/internal v0.98.0 h1:wz/6ncawMX5cfIiXJEYSUm1g1U6iE/VxFRm4/WhVBPI= +go.opentelemetry.io/collector/config/internal v0.98.0/go.mod h1:xPnEE6QaTSXr+ctYMSTBxI2qwTntTUM4cYk7OTm6Ugc= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/extension/auth v0.98.0 h1:7b1jioijJbTMqaOCrz5Hoqf+zJn2iPlGmtN7pXLNWbA= +go.opentelemetry.io/collector/extension/auth v0.98.0/go.mod h1:gssWC4AxAwAEKI2CqS93lhjWffsVdzD8q7UGL6LaRr0= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0 h1:j7lfLwc5o1dtXIPXU8LjmxadejmJVRHN57ZYGH33Wq4= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.98.0/go.mod h1:uWDBDxaWuzF1U5S2UIhstO0+Q8aUiwiUu8uO1IYN2XQ= +go.opentelemetry.io/collector/semconv v0.98.0 h1:zO4L4TmlxXoYu8UgPeYElGY19BW7wPjM+quL5CzoOoY= +go.opentelemetry.io/collector/semconv v0.98.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1431,8 +1459,8 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1464,8 +1492,8 @@ golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1484,7 +1512,8 @@ golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +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-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1554,6 +1583,7 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/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.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1569,8 +1599,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1586,8 +1616,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1685,8 +1715,8 @@ golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= 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= @@ -1772,8 +1802,9 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1915,6 +1946,7 @@ google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51 google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108= google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= @@ -1924,6 +1956,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go. google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= @@ -1934,8 +1968,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a h1:a2MQQVoTo96JC9PMGtGBymLp7+/RzpFc2yX/9WfFg1c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1981,8 +2015,9 @@ google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGO google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -2001,8 +2036,9 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2026,6 +2062,7 @@ gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2035,28 +2072,28 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= @@ -2116,8 +2153,8 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/processor/k8sattributesprocessor/internal/kube/client.go b/processor/k8sattributesprocessor/internal/kube/client.go index 805820d3ad4a..91d0f4f648b7 100644 --- a/processor/k8sattributesprocessor/internal/kube/client.go +++ b/processor/k8sattributesprocessor/internal/kube/client.go @@ -120,14 +120,17 @@ func New(logger *zap.Logger, apiCfg k8sconfig.APIConfig, rules ExtractionRules, } if newNamespaceInformer == nil { - // if rules to extract metadata from namespace is configured use namespace shared informer containing - // all namespaces including kube-system which contains cluster uid information (kube-system-uid) - if c.extractNamespaceLabelsAnnotations() { + switch { + case c.extractNamespaceLabelsAnnotations(): + // if rules to extract metadata from namespace is configured use namespace shared informer containing + // all namespaces including kube-system which contains cluster uid information (kube-system-uid) newNamespaceInformer = newNamespaceSharedInformer - } else { + case rules.ClusterUID: // use kube-system shared informer to only watch kube-system namespace // reducing overhead of watching all the namespaces newNamespaceInformer = newKubeSystemSharedInformer + default: + newNamespaceInformer = NewNoOpInformer } } @@ -168,7 +171,7 @@ func New(logger *zap.Logger, apiCfg k8sconfig.APIConfig, rules ExtractionRules, } } - if c.extractNodeLabelsAnnotations() { + if c.extractNodeLabelsAnnotations() || c.extractNodeUID() { c.nodeInformer = newNodeSharedInformer(c.kc, c.Filters.Node) } @@ -927,6 +930,10 @@ func (c *WatchClient) extractNodeLabelsAnnotations() bool { return false } +func (c *WatchClient) extractNodeUID() bool { + return c.Rules.NodeUID +} + func (c *WatchClient) addOrUpdateNode(node *api_v1.Node) { newNode := &Node{ Name: node.Name, diff --git a/processor/k8sattributesprocessor/internal/kube/fake_informer.go b/processor/k8sattributesprocessor/internal/kube/fake_informer.go index 058cd2eddf73..20a9ca879afc 100644 --- a/processor/k8sattributesprocessor/internal/kube/fake_informer.go +++ b/processor/k8sattributesprocessor/internal/kube/fake_informer.go @@ -56,7 +56,7 @@ func (f *FakeInformer) SetTransform(_ cache.TransformFunc) error { } func (f *FakeInformer) GetStore() cache.Store { - return cache.NewStore(func(obj any) (string, error) { return "", nil }) + return cache.NewStore(func(_ any) (string, error) { return "", nil }) } func (f *FakeInformer) GetController() cache.Controller { @@ -81,7 +81,7 @@ func (f *FakeNamespaceInformer) AddEventHandlerWithResyncPeriod(_ cache.Resource } func (f *FakeNamespaceInformer) GetStore() cache.Store { - return cache.NewStore(func(obj any) (string, error) { return "", nil }) + return cache.NewStore(func(_ any) (string, error) { return "", nil }) } func (f *FakeNamespaceInformer) GetController() cache.Controller { @@ -111,7 +111,7 @@ func (f *FakeReplicaSetInformer) SetTransform(_ cache.TransformFunc) error { } func (f *FakeReplicaSetInformer) GetStore() cache.Store { - return cache.NewStore(func(obj any) (string, error) { return "", nil }) + return cache.NewStore(func(_ any) (string, error) { return "", nil }) } func (f *FakeReplicaSetInformer) GetController() cache.Controller { @@ -176,7 +176,7 @@ func (f *NoOpInformer) SetTransform(_ cache.TransformFunc) error { } func (f *NoOpInformer) GetStore() cache.Store { - return cache.NewStore(func(obj any) (string, error) { return "", nil }) + return cache.NewStore(func(_ any) (string, error) { return "", nil }) } func (f *NoOpInformer) GetController() cache.Controller { diff --git a/processor/k8sattributesprocessor/internal/kube/kube.go b/processor/k8sattributesprocessor/internal/kube/kube.go index 47e95e98da33..06d025ca21fa 100644 --- a/processor/k8sattributesprocessor/internal/kube/kube.go +++ b/processor/k8sattributesprocessor/internal/kube/kube.go @@ -210,6 +210,7 @@ type ExtractionRules struct { StatefulSetUID bool StatefulSetName bool Node bool + NodeUID bool StartTime bool ContainerName bool ContainerID bool diff --git a/processor/k8sattributesprocessor/internal/metadata/generated_config.go b/processor/k8sattributesprocessor/internal/metadata/generated_config.go index 3f339aa2575a..cda0e14c96ce 100644 --- a/processor/k8sattributesprocessor/internal/metadata/generated_config.go +++ b/processor/k8sattributesprocessor/internal/metadata/generated_config.go @@ -15,7 +15,7 @@ func (rac *ResourceAttributeConfig) Unmarshal(parser *confmap.Conf) error { if parser == nil { return nil } - err := parser.Unmarshal(rac, confmap.WithErrorUnused()) + err := parser.Unmarshal(rac) if err != nil { return err } @@ -39,6 +39,7 @@ type ResourceAttributesConfig struct { K8sJobUID ResourceAttributeConfig `mapstructure:"k8s.job.uid"` K8sNamespaceName ResourceAttributeConfig `mapstructure:"k8s.namespace.name"` K8sNodeName ResourceAttributeConfig `mapstructure:"k8s.node.name"` + K8sNodeUID ResourceAttributeConfig `mapstructure:"k8s.node.uid"` K8sPodHostname ResourceAttributeConfig `mapstructure:"k8s.pod.hostname"` K8sPodName ResourceAttributeConfig `mapstructure:"k8s.pod.name"` K8sPodStartTime ResourceAttributeConfig `mapstructure:"k8s.pod.start_time"` @@ -93,6 +94,9 @@ func DefaultResourceAttributesConfig() ResourceAttributesConfig { K8sNodeName: ResourceAttributeConfig{ Enabled: true, }, + K8sNodeUID: ResourceAttributeConfig{ + Enabled: false, + }, K8sPodHostname: ResourceAttributeConfig{ Enabled: false, }, diff --git a/processor/k8sattributesprocessor/internal/metadata/generated_config_test.go b/processor/k8sattributesprocessor/internal/metadata/generated_config_test.go index b024a857c8d1..263f271231e9 100644 --- a/processor/k8sattributesprocessor/internal/metadata/generated_config_test.go +++ b/processor/k8sattributesprocessor/internal/metadata/generated_config_test.go @@ -39,6 +39,7 @@ func TestResourceAttributesConfig(t *testing.T) { K8sJobUID: ResourceAttributeConfig{Enabled: true}, K8sNamespaceName: ResourceAttributeConfig{Enabled: true}, K8sNodeName: ResourceAttributeConfig{Enabled: true}, + K8sNodeUID: ResourceAttributeConfig{Enabled: true}, K8sPodHostname: ResourceAttributeConfig{Enabled: true}, K8sPodName: ResourceAttributeConfig{Enabled: true}, K8sPodStartTime: ResourceAttributeConfig{Enabled: true}, @@ -66,6 +67,7 @@ func TestResourceAttributesConfig(t *testing.T) { K8sJobUID: ResourceAttributeConfig{Enabled: false}, K8sNamespaceName: ResourceAttributeConfig{Enabled: false}, K8sNodeName: ResourceAttributeConfig{Enabled: false}, + K8sNodeUID: ResourceAttributeConfig{Enabled: false}, K8sPodHostname: ResourceAttributeConfig{Enabled: false}, K8sPodName: ResourceAttributeConfig{Enabled: false}, K8sPodStartTime: ResourceAttributeConfig{Enabled: false}, diff --git a/processor/k8sattributesprocessor/internal/metadata/generated_resource.go b/processor/k8sattributesprocessor/internal/metadata/generated_resource.go index 2029665c5955..ab0c0746fca4 100644 --- a/processor/k8sattributesprocessor/internal/metadata/generated_resource.go +++ b/processor/k8sattributesprocessor/internal/metadata/generated_resource.go @@ -119,6 +119,13 @@ func (rb *ResourceBuilder) SetK8sNodeName(val string) { } } +// SetK8sNodeUID sets provided value as "k8s.node.uid" attribute. +func (rb *ResourceBuilder) SetK8sNodeUID(val string) { + if rb.config.K8sNodeUID.Enabled { + rb.res.Attributes().PutStr("k8s.node.uid", val) + } +} + // SetK8sPodHostname sets provided value as "k8s.pod.hostname" attribute. func (rb *ResourceBuilder) SetK8sPodHostname(val string) { if rb.config.K8sPodHostname.Enabled { diff --git a/processor/k8sattributesprocessor/internal/metadata/generated_resource_test.go b/processor/k8sattributesprocessor/internal/metadata/generated_resource_test.go index d8ad4098252e..fd96be1e87fe 100644 --- a/processor/k8sattributesprocessor/internal/metadata/generated_resource_test.go +++ b/processor/k8sattributesprocessor/internal/metadata/generated_resource_test.go @@ -27,6 +27,7 @@ func TestResourceBuilder(t *testing.T) { rb.SetK8sJobUID("k8s.job.uid-val") rb.SetK8sNamespaceName("k8s.namespace.name-val") rb.SetK8sNodeName("k8s.node.name-val") + rb.SetK8sNodeUID("k8s.node.uid-val") rb.SetK8sPodHostname("k8s.pod.hostname-val") rb.SetK8sPodName("k8s.pod.name-val") rb.SetK8sPodStartTime("k8s.pod.start_time-val") @@ -43,7 +44,7 @@ func TestResourceBuilder(t *testing.T) { case "default": assert.Equal(t, 8, res.Attributes().Len()) case "all_set": - assert.Equal(t, 22, res.Attributes().Len()) + assert.Equal(t, 23, res.Attributes().Len()) case "none_set": assert.Equal(t, 0, res.Attributes().Len()) return @@ -121,6 +122,11 @@ func TestResourceBuilder(t *testing.T) { if ok { assert.EqualValues(t, "k8s.node.name-val", val.Str()) } + val, ok = res.Attributes().Get("k8s.node.uid") + assert.Equal(t, test == "all_set", ok) + if ok { + assert.EqualValues(t, "k8s.node.uid-val", val.Str()) + } val, ok = res.Attributes().Get("k8s.pod.hostname") assert.Equal(t, test == "all_set", ok) if ok { diff --git a/processor/k8sattributesprocessor/internal/metadata/generated_status.go b/processor/k8sattributesprocessor/internal/metadata/generated_status.go index b47f7c1962dc..6a776c598679 100644 --- a/processor/k8sattributesprocessor/internal/metadata/generated_status.go +++ b/processor/k8sattributesprocessor/internal/metadata/generated_status.go @@ -4,11 +4,24 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("k8sattributes") ) const ( - Type = "k8sattributes" LogsStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta TracesStability = component.StabilityLevelBeta ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/k8sattributes") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/k8sattributes") +} diff --git a/processor/k8sattributesprocessor/internal/metadata/package_test.go b/processor/k8sattributesprocessor/internal/metadata/package_test.go new file mode 100644 index 000000000000..1aba5ec4bb0b --- /dev/null +++ b/processor/k8sattributesprocessor/internal/metadata/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metadata + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/processor/k8sattributesprocessor/internal/metadata/testdata/config.yaml b/processor/k8sattributesprocessor/internal/metadata/testdata/config.yaml index 55de9c16c27c..d7f95e5bf943 100644 --- a/processor/k8sattributesprocessor/internal/metadata/testdata/config.yaml +++ b/processor/k8sattributesprocessor/internal/metadata/testdata/config.yaml @@ -29,6 +29,8 @@ all_set: enabled: true k8s.node.name: enabled: true + k8s.node.uid: + enabled: true k8s.pod.hostname: enabled: true k8s.pod.name: @@ -75,6 +77,8 @@ none_set: enabled: false k8s.node.name: enabled: false + k8s.node.uid: + enabled: false k8s.pod.hostname: enabled: false k8s.pod.name: diff --git a/processor/k8sattributesprocessor/metadata.yaml b/processor/k8sattributesprocessor/metadata.yaml index e891f2a50b38..465a892c8eb1 100644 --- a/processor/k8sattributesprocessor/metadata.yaml +++ b/processor/k8sattributesprocessor/metadata.yaml @@ -1,10 +1,11 @@ type: k8sattributes +scope_name: otelcol/k8sattributes status: class: processor stability: beta: [logs, metrics, traces] - distributions: [contrib, splunk, observiq, sumo, redhat, aws, grafana] + distributions: [contrib] codeowners: active: [dmitryax, rmfitzpatrick, fatsheep9146, TylerHelmuth] # resource attributes are exposed through a different configuration interface (extract::metadata). @@ -85,6 +86,10 @@ resource_attributes: description: The name of the Node. type: string enabled: true + k8s.node.uid: + description: The UID of the Node. + type: string + enabled: false container.id: description: Container ID. Usually a UUID, as for example used to identify Docker containers. The UUID might be abbreviated. Requires k8s.container.restart_count. type: string @@ -97,3 +102,6 @@ resource_attributes: description: Container image tag. Requires container.id or k8s.container.name. type: string enabled: true + +tests: + config: diff --git a/processor/k8sattributesprocessor/options.go b/processor/k8sattributesprocessor/options.go index ab4b4695ab39..033d3bb303c0 100644 --- a/processor/k8sattributesprocessor/options.go +++ b/processor/k8sattributesprocessor/options.go @@ -94,6 +94,9 @@ func enabledAttributes() (attributes []string) { if defaultConfig.K8sNodeName.Enabled { attributes = append(attributes, conventions.AttributeK8SNodeName) } + if defaultConfig.K8sNodeUID.Enabled { + attributes = append(attributes, conventions.AttributeK8SNodeUID) + } if defaultConfig.K8sPodHostname.Enabled { attributes = append(attributes, specPodHostName) } @@ -163,6 +166,8 @@ func withExtractMetadata(fields ...string) option { p.rules.CronJobName = true case conventions.AttributeK8SNodeName: p.rules.Node = true + case conventions.AttributeK8SNodeUID: + p.rules.NodeUID = true case conventions.AttributeContainerID: p.rules.ContainerID = true case conventions.AttributeContainerImageName: diff --git a/processor/k8sattributesprocessor/processor.go b/processor/k8sattributesprocessor/processor.go index 2fb970674dae..1a55fad1069f 100644 --- a/processor/k8sattributesprocessor/processor.go +++ b/processor/k8sattributesprocessor/processor.go @@ -25,14 +25,17 @@ const ( ) type kubernetesprocessor struct { - logger *zap.Logger - apiConfig k8sconfig.APIConfig - kc kube.Client - passthroughMode bool - rules kube.ExtractionRules - filters kube.Filters - podAssociations []kube.Association - podIgnore kube.Excludes + cfg component.Config + options []option + telemetrySettings component.TelemetrySettings + logger *zap.Logger + apiConfig k8sconfig.APIConfig + kc kube.Client + passthroughMode bool + rules kube.ExtractionRules + filters kube.Filters + podAssociations []kube.Association + podIgnore kube.Excludes } func (kp *kubernetesprocessor) initKubeClient(logger *zap.Logger, kubeClient kube.ClientProvider) error { @@ -56,6 +59,23 @@ func (kp *kubernetesprocessor) Start(_ context.Context, _ component.Host) error "enable feature-gate k8sattr.rfc3339 to opt into this change.") } + allOptions := append(createProcessorOpts(kp.cfg), kp.options...) + for _, opt := range allOptions { + if err := opt(kp); err != nil { + kp.telemetrySettings.ReportStatus(component.NewFatalErrorEvent(err)) + return nil + } + } + // This might have been set by an option already + if kp.kc == nil { + err := kp.initKubeClient(kp.logger, kubeClientProvider) + if err != nil { + kp.telemetrySettings.ReportStatus(component.NewFatalErrorEvent(err)) + return nil + } + + } + if !kp.passthroughMode { go kp.kc.Start() } @@ -152,6 +172,12 @@ func (kp *kubernetesprocessor) processResource(ctx context.Context, resource pco resource.Attributes().PutStr(key, val) } } + nodeUID := kp.getUIDForPodsNode(nodeName) + if nodeUID != "" { + if _, found := resource.Attributes().Get(conventions.AttributeK8SNodeUID); !found { + resource.Attributes().PutStr(conventions.AttributeK8SNodeUID, nodeUID) + } + } } } @@ -249,6 +275,14 @@ func (kp *kubernetesprocessor) getAttributesForPodsNode(nodeName string) map[str return node.Attributes } +func (kp *kubernetesprocessor) getUIDForPodsNode(nodeName string) string { + node, ok := kp.kc.GetNode(nodeName) + if !ok { + return "" + } + return node.NodeUID +} + // intFromAttribute extracts int value from an attribute stored as string or int func intFromAttribute(val pcommon.Value) (int, error) { switch val.Type() { diff --git a/processor/k8sattributesprocessor/processor_test.go b/processor/k8sattributesprocessor/processor_test.go index ac7bf6587dc0..d22de00d7259 100644 --- a/processor/k8sattributesprocessor/processor_test.go +++ b/processor/k8sattributesprocessor/processor_test.go @@ -42,36 +42,48 @@ func newPodIdentifier(from string, name string, value string) kube.PodIdentifier } } -func newTracesProcessor(cfg component.Config, next consumer.Traces, options ...option) (processor.Traces, error) { +func newTracesProcessor(cfg component.Config, next consumer.Traces, errFunc func(error), options ...option) (processor.Traces, error) { opts := options opts = append(opts, withKubeClientProvider(newFakeClient)) + set := processortest.NewNopCreateSettings() + set.ReportStatus = func(event *component.StatusEvent) { + errFunc(event.Err()) + } return createTracesProcessorWithOptions( context.Background(), - processortest.NewNopCreateSettings(), + set, cfg, next, opts..., ) } -func newMetricsProcessor(cfg component.Config, nextMetricsConsumer consumer.Metrics, options ...option) (processor.Metrics, error) { +func newMetricsProcessor(cfg component.Config, nextMetricsConsumer consumer.Metrics, errFunc func(error), options ...option) (processor.Metrics, error) { opts := options opts = append(opts, withKubeClientProvider(newFakeClient)) + set := processortest.NewNopCreateSettings() + set.ReportStatus = func(event *component.StatusEvent) { + errFunc(event.Err()) + } return createMetricsProcessorWithOptions( context.Background(), - processortest.NewNopCreateSettings(), + set, cfg, nextMetricsConsumer, opts..., ) } -func newLogsProcessor(cfg component.Config, nextLogsConsumer consumer.Logs, options ...option) (processor.Logs, error) { +func newLogsProcessor(cfg component.Config, nextLogsConsumer consumer.Logs, errFunc func(error), options ...option) (processor.Logs, error) { opts := options opts = append(opts, withKubeClientProvider(newFakeClient)) + set := processortest.NewNopCreateSettings() + set.ReportStatus = func(event *component.StatusEvent) { + errFunc(event.Err()) + } return createLogsProcessorWithOptions( context.Background(), - processortest.NewNopCreateSettings(), + set, cfg, nextLogsConsumer, opts..., @@ -122,31 +134,28 @@ func newMultiTest( nextLogs: new(consumertest.LogsSink), } - tp, err := newTracesProcessor(cfg, m.nextTrace, append(options, withExtractKubernetesProcessorInto(&m.kpTrace))...) + tp, err := newTracesProcessor(cfg, m.nextTrace, errFunc, append(options, withExtractKubernetesProcessorInto(&m.kpTrace))...) + require.NoError(t, err) + err = tp.Start(context.Background(), componenttest.NewNopHost()) if errFunc == nil { assert.NotNil(t, tp) require.NoError(t, err) - } else { - assert.Nil(t, tp) - errFunc(err) } - mp, err := newMetricsProcessor(cfg, m.nextMetrics, append(options, withExtractKubernetesProcessorInto(&m.kpMetrics))...) + mp, err := newMetricsProcessor(cfg, m.nextMetrics, errFunc, append(options, withExtractKubernetesProcessorInto(&m.kpMetrics))...) + require.NoError(t, err) + err = mp.Start(context.Background(), componenttest.NewNopHost()) if errFunc == nil { assert.NotNil(t, mp) require.NoError(t, err) - } else { - assert.Nil(t, mp) - errFunc(err) } - lp, err := newLogsProcessor(cfg, m.nextLogs, append(options, withExtractKubernetesProcessorInto(&m.kpLogs))...) + lp, err := newLogsProcessor(cfg, m.nextLogs, errFunc, append(options, withExtractKubernetesProcessorInto(&m.kpLogs))...) + require.NoError(t, err) + err = lp.Start(context.Background(), componenttest.NewNopHost()) if errFunc == nil { assert.NotNil(t, lp) require.NoError(t, err) - } else { - assert.Nil(t, lp) - errFunc(err) } m.tp = tp @@ -220,7 +229,7 @@ func TestProcessorBadClientProvider(t *testing.T) { } newMultiTest(t, NewFactory().CreateDefaultConfig(), func(err error) { - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, "bad client error", err.Error()) }, withKubeClientProvider(clientProvider)) } @@ -871,6 +880,72 @@ func TestAddNodeLabels(t *testing.T) { }) } +func TestAddNodeUID(t *testing.T) { + nodeUID := "asdfasdf-asdfasdf-asdf" + m := newMultiTest( + t, + func() component.Config { + cfg := createDefaultConfig().(*Config) + cfg.Extract.Metadata = []string{"k8s.node.uid"} + cfg.Extract.Labels = []FieldExtractConfig{} + return cfg + }(), + nil, + ) + + podIP := "1.1.1.1" + nodes := map[string]map[string]string{ + "node-1": { + "nodelabel": "1", + }, + } + m.kubernetesProcessorOperation(func(kp *kubernetesprocessor) { + kp.podAssociations = []kube.Association{ + { + Sources: []kube.AssociationSource{ + { + From: "connection", + }, + }, + }, + } + }) + + m.kubernetesProcessorOperation(func(kp *kubernetesprocessor) { + pi := kube.PodIdentifier{ + kube.PodIdentifierAttributeFromConnection(podIP), + } + kp.kc.(*fakeClient).Pods[pi] = &kube.Pod{Name: "test-2323", NodeName: "node-1"} + kp.kc.(*fakeClient).Nodes = make(map[string]*kube.Node) + for ns, labels := range nodes { + kp.kc.(*fakeClient).Nodes[ns] = &kube.Node{Attributes: labels, NodeUID: nodeUID} + } + }) + + ctx := client.NewContext(context.Background(), client.Info{ + Addr: &net.IPAddr{ + IP: net.ParseIP(podIP), + }, + }) + m.testConsume( + ctx, + generateTraces(), + generateMetrics(), + generateLogs(), + func(err error) { + assert.NoError(t, err) + }) + + m.assertBatchesLen(1) + m.assertResourceObjectLen(0) + m.assertResource(0, func(res pcommon.Resource) { + assert.Equal(t, 3, res.Attributes().Len()) + assertResourceHasStringAttribute(t, res, "k8s.pod.ip", podIP) + assertResourceHasStringAttribute(t, res, "k8s.node.uid", nodeUID) + assertResourceHasStringAttribute(t, res, "nodelabel", "1") + }) +} + func TestProcessorAddContainerAttributes(t *testing.T) { tests := []struct { name string @@ -1180,10 +1255,13 @@ func TestMetricsProcessorHostname(t *testing.T) { p, err := newMetricsProcessor( NewFactory().CreateDefaultConfig(), next, + nil, withExtractMetadata(conventions.AttributeK8SPodName), withExtractKubernetesProcessorInto(&kp), ) require.NoError(t, err) + err = p.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) kc := kp.kc.(*fakeClient) // invalid ip should not be used to lookup k8s pod @@ -1250,10 +1328,13 @@ func TestMetricsProcessorHostnameWithPodAssociation(t *testing.T) { p, err := newMetricsProcessor( NewFactory().CreateDefaultConfig(), next, + nil, withExtractMetadata(conventions.AttributeK8SPodName), withExtractKubernetesProcessorInto(&kp), ) require.NoError(t, err) + err = p.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) kc := kp.kc.(*fakeClient) kp.podAssociations = []kube.Association{ { @@ -1332,6 +1413,7 @@ func TestPassthroughStart(t *testing.T) { p, err := newTracesProcessor( NewFactory().CreateDefaultConfig(), next, + nil, opts..., ) require.NoError(t, err) @@ -1346,7 +1428,7 @@ func TestRealClient(t *testing.T) { t, NewFactory().CreateDefaultConfig(), func(err error) { - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, "unable to load k8s config, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined", err.Error()) }, withKubeClientProvider(kubeClientProvider), @@ -1358,6 +1440,7 @@ func TestCapabilities(t *testing.T) { p, err := newTracesProcessor( NewFactory().CreateDefaultConfig(), consumertest.NewNop(), + nil, ) assert.NoError(t, err) caps := p.Capabilities() @@ -1369,6 +1452,7 @@ func TestStartStop(t *testing.T) { p, err := newTracesProcessor( NewFactory().CreateDefaultConfig(), consumertest.NewNop(), + nil, withExtractKubernetesProcessorInto(&kp), ) require.NoError(t, err) diff --git a/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/clusterrole.yaml b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/clusterrole.yaml new file mode 100644 index 000000000000..e93e29729996 --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/clusterrole.yaml @@ -0,0 +1,14 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ .Name }} +rules: + - apiGroups: [""] + resources: ["pods", "nodes"] + verbs: ["get", "watch", "list"] + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "watch", "list"] + - apiGroups: [ "" ] + resources: ["namespaces"] + verbs: [ "get", "watch", "list" ] diff --git a/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/clusterrolebinding.yaml b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/clusterrolebinding.yaml new file mode 100644 index 000000000000..41b16aef0ead --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/clusterrolebinding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ .Name }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ .Name }} +subjects: + - kind: ServiceAccount + name: {{ .Name }} + namespace: e2ek8sattribute-clusterrbac diff --git a/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/configmap.yaml b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/configmap.yaml new file mode 100644 index 000000000000..384903a4b1fd --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/configmap.yaml @@ -0,0 +1,83 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Name }}-config + namespace: e2ek8sattribute-clusterrbac +data: + relay: | + exporters: + otlp: + endpoint: {{ .HostEndpoint }}:4317 + tls: + insecure: true + extensions: + health_check: {} + processors: + k8sattributes: + extract: + annotations: + - from: pod + key: workload + tag_name: k8s.annotations.workload + labels: + - from: pod + key: app + tag_name: k8s.labels.app + - from: node + key: foo + - from: namespace + key: foons + metadata: + - k8s.pod.name + - k8s.pod.start_time + - k8s.pod.uid + - k8s.namespace.name + - k8s.deployment.name + - k8s.deployment.uid + - k8s.replicaset.name + - k8s.replicaset.uid + - k8s.statefulset.name + - k8s.statefulset.uid + - k8s.daemonset.name + - k8s.daemonset.uid + - k8s.cronjob.name + - k8s.job.name + - k8s.job.uid + - k8s.node.name + - k8s.cluster.uid + - container.id + - container.image.name + - container.image.tag + pod_association: + - sources: + - from: connection + receivers: + otlp: + protocols: + grpc: + endpoint: ${env:MY_POD_IP}:4317 + service: + extensions: + - health_check + pipelines: + logs: + exporters: + - otlp + processors: + - k8sattributes + receivers: + - otlp + metrics: + exporters: + - otlp + processors: + - k8sattributes + receivers: + - otlp + traces: + exporters: + - otlp + processors: + - k8sattributes + receivers: + - otlp diff --git a/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/deployment.yaml b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/deployment.yaml new file mode 100644 index 000000000000..a2011605a3e0 --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/deployment.yaml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Name }} + namespace: e2ek8sattribute-clusterrbac +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: {{ .Name }} + template: + metadata: + labels: + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: {{ .Name }} + spec: + serviceAccountName: {{ .Name }} + containers: + - name: opentelemetry-collector + command: + - /otelcontribcol + - --config=/conf/relay.yaml + image: "otelcontribcol:latest" + imagePullPolicy: Never + ports: + - name: otlp + containerPort: 4317 + protocol: TCP + env: + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + livenessProbe: + httpGet: + path: / + port: 13133 + initialDelaySeconds: 3 + readinessProbe: + httpGet: + path: / + port: 13133 + initialDelaySeconds: 3 + resources: + limits: + cpu: 128m + memory: 256Mi + volumeMounts: + - mountPath: /conf + name: opentelemetry-collector-configmap + volumes: + - name: opentelemetry-collector-configmap + configMap: + name: {{ .Name }}-config + items: + - key: relay + path: relay.yaml diff --git a/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/service.yaml b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/service.yaml new file mode 100644 index 000000000000..2f4ae9540089 --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Name }} + namespace: e2ek8sattribute-clusterrbac +spec: + type: ClusterIP + ports: + - name: otlp + port: 4317 + targetPort: 4317 + protocol: TCP + appProtocol: grpc + selector: + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: {{ .Name }} diff --git a/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/serviceaccount.yaml b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/serviceaccount.yaml new file mode 100644 index 000000000000..21cde70461ce --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/collector/serviceaccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Name }} + namespace: e2ek8sattribute-clusterrbac diff --git a/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/namespace.yaml b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/namespace.yaml new file mode 100644 index 000000000000..c5161a2e8dc3 --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: e2ek8sattribute-clusterrbac + labels: + foons: barns diff --git a/processor/k8sattributesprocessor/testdata/e2e/telemetrygen/daemonset.yaml b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/telemetrygen/daemonset.yaml similarity index 95% rename from processor/k8sattributesprocessor/testdata/e2e/telemetrygen/daemonset.yaml rename to processor/k8sattributesprocessor/testdata/e2e/clusterrbac/telemetrygen/daemonset.yaml index 9d8effb27124..4ac9fecf815e 100644 --- a/processor/k8sattributesprocessor/testdata/e2e/telemetrygen/daemonset.yaml +++ b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/telemetrygen/daemonset.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: DaemonSet metadata: name: {{ .Name }}-{{ .DataType }}-daemonset - namespace: default + namespace: e2ek8sattribute-clusterrbac spec: selector: matchLabels: diff --git a/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/telemetrygen/deployment.yaml b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/telemetrygen/deployment.yaml new file mode 100644 index 000000000000..8344d9b8ad90 --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/telemetrygen/deployment.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Name }}-{{ .DataType }}-deployment + namespace: e2ek8sattribute-clusterrbac +spec: + replicas: 1 + selector: + matchLabels: + app: {{ .Name }}-{{ .DataType }}-deployment + template: + metadata: + annotations: + workload: deployment + labels: + app: {{ .Name }}-{{ .DataType }}-deployment + spec: + containers: + - command: + - /telemetrygen + - {{ .DataType }} + - --otlp-insecure + - --otlp-endpoint={{ .OTLPEndpoint }} + - --duration=36000s + - --rate=1 + - --otlp-attributes=service.name="test-{{ .DataType }}-deployment" + - --otlp-attributes=k8s.container.name="telemetrygen" +{{- if eq .DataType "traces" }} + - --status-code= +{{- end }} + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest + imagePullPolicy: IfNotPresent + name: telemetrygen + restartPolicy: Always diff --git a/processor/k8sattributesprocessor/testdata/e2e/telemetrygen/job.yaml b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/telemetrygen/job.yaml similarity index 94% rename from processor/k8sattributesprocessor/testdata/e2e/telemetrygen/job.yaml rename to processor/k8sattributesprocessor/testdata/e2e/clusterrbac/telemetrygen/job.yaml index dd0e9dcdf345..76a003ea9533 100644 --- a/processor/k8sattributesprocessor/testdata/e2e/telemetrygen/job.yaml +++ b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/telemetrygen/job.yaml @@ -2,7 +2,7 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ .Name }}-{{ .DataType}}-job - namespace: default + namespace: e2ek8sattribute-clusterrbac spec: template: metadata: diff --git a/processor/k8sattributesprocessor/testdata/e2e/telemetrygen/statefulset.yaml b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/telemetrygen/statefulset.yaml similarity index 95% rename from processor/k8sattributesprocessor/testdata/e2e/telemetrygen/statefulset.yaml rename to processor/k8sattributesprocessor/testdata/e2e/clusterrbac/telemetrygen/statefulset.yaml index 6dcb9a2739ae..4ef983a8a3ef 100644 --- a/processor/k8sattributesprocessor/testdata/e2e/telemetrygen/statefulset.yaml +++ b/processor/k8sattributesprocessor/testdata/e2e/clusterrbac/telemetrygen/statefulset.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ .Name }}-{{ .DataType }}-statefulset - namespace: default + namespace: e2ek8sattribute-clusterrbac spec: serviceName: {{ .Name }}-{{ .DataType }}-statefulset replicas: 1 diff --git a/processor/k8sattributesprocessor/testdata/e2e/collector/clusterrole.yaml b/processor/k8sattributesprocessor/testdata/e2e/collector/clusterrole.yaml deleted file mode 100644 index a7d5358e2d29..000000000000 --- a/processor/k8sattributesprocessor/testdata/e2e/collector/clusterrole.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ .Name }} -rules: - - apiGroups: [""] - resources: ["pods", "namespaces", "nodes"] - verbs: ["get", "watch", "list"] - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "watch", "list"] - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "watch", "list"] \ No newline at end of file diff --git a/processor/k8sattributesprocessor/testdata/e2e/collector/clusterrolebinding.yaml b/processor/k8sattributesprocessor/testdata/e2e/collector/clusterrolebinding.yaml deleted file mode 100644 index b792cc6309de..000000000000 --- a/processor/k8sattributesprocessor/testdata/e2e/collector/clusterrolebinding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ .Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ .Name }} -subjects: - - kind: ServiceAccount - name: {{ .Name }} - namespace: default diff --git a/processor/k8sattributesprocessor/testdata/e2e/collector/configmap.yaml b/processor/k8sattributesprocessor/testdata/e2e/collector/configmap.yaml deleted file mode 100644 index e82cead3fdec..000000000000 --- a/processor/k8sattributesprocessor/testdata/e2e/collector/configmap.yaml +++ /dev/null @@ -1,81 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Name }}-config - namespace: default -data: - relay: | - exporters: - otlp: - endpoint: {{ .HostEndpoint }}:4317 - tls: - insecure: true - extensions: - health_check: {} - processors: - k8sattributes: - extract: - annotations: - - from: pod - key: workload - tag_name: k8s.annotations.workload - labels: - - from: pod - key: app - tag_name: k8s.labels.app - - from: node - key: foo - metadata: - - k8s.pod.name - - k8s.pod.start_time - - k8s.pod.uid - - k8s.namespace.name - - k8s.deployment.name - - k8s.deployment.uid - - k8s.replicaset.name - - k8s.replicaset.uid - - k8s.statefulset.name - - k8s.statefulset.uid - - k8s.daemonset.name - - k8s.daemonset.uid - - k8s.cronjob.name - - k8s.job.name - - k8s.job.uid - - k8s.node.name - - k8s.cluster.uid - - container.id - - container.image.name - - container.image.tag - pod_association: - - sources: - - from: connection - receivers: - otlp: - protocols: - grpc: - endpoint: ${env:MY_POD_IP}:4317 - service: - extensions: - - health_check - pipelines: - logs: - exporters: - - otlp - processors: - - k8sattributes - receivers: - - otlp - metrics: - exporters: - - otlp - processors: - - k8sattributes - receivers: - - otlp - traces: - exporters: - - otlp - processors: - - k8sattributes - receivers: - - otlp diff --git a/processor/k8sattributesprocessor/testdata/e2e/collector/deployment.yaml b/processor/k8sattributesprocessor/testdata/e2e/collector/deployment.yaml deleted file mode 100644 index f7f21c5d4856..000000000000 --- a/processor/k8sattributesprocessor/testdata/e2e/collector/deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Name }} - namespace: default -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: opentelemetry-collector - app.kubernetes.io/instance: {{ .Name }} - template: - metadata: - labels: - app.kubernetes.io/name: opentelemetry-collector - app.kubernetes.io/instance: {{ .Name }} - spec: - serviceAccountName: {{ .Name }} - containers: - - name: opentelemetry-collector - command: - - /otelcontribcol - - --config=/conf/relay.yaml - image: "otelcontribcol:latest" - imagePullPolicy: Never - ports: - - name: otlp - containerPort: 4317 - protocol: TCP - env: - - name: MY_POD_IP - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: status.podIP - livenessProbe: - httpGet: - path: / - port: 13133 - readinessProbe: - httpGet: - path: / - port: 13133 - resources: - limits: - cpu: 128m - memory: 256Mi - volumeMounts: - - mountPath: /conf - name: opentelemetry-collector-configmap - volumes: - - name: opentelemetry-collector-configmap - configMap: - name: {{ .Name }}-config - items: - - key: relay - path: relay.yaml diff --git a/processor/k8sattributesprocessor/testdata/e2e/collector/service.yaml b/processor/k8sattributesprocessor/testdata/e2e/collector/service.yaml deleted file mode 100644 index 1bbfffb99197..000000000000 --- a/processor/k8sattributesprocessor/testdata/e2e/collector/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Name }} - namespace: default -spec: - type: ClusterIP - ports: - - name: otlp - port: 4317 - targetPort: 4317 - protocol: TCP - appProtocol: grpc - selector: - app.kubernetes.io/name: opentelemetry-collector - app.kubernetes.io/instance: {{ .Name }} diff --git a/processor/k8sattributesprocessor/testdata/e2e/collector/serviceaccount.yaml b/processor/k8sattributesprocessor/testdata/e2e/collector/serviceaccount.yaml deleted file mode 100644 index bdb3a8dd1b8f..000000000000 --- a/processor/k8sattributesprocessor/testdata/e2e/collector/serviceaccount.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ .Name }} - namespace: default diff --git a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/clusterrole.yaml b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/clusterrole.yaml new file mode 100644 index 000000000000..536113c9c1a8 --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/clusterrole.yaml @@ -0,0 +1,11 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ .Name }} +rules: + - apiGroups: [ "" ] + resources: ["namespaces"] + verbs: [ "list", "get", "watch" ] + - apiGroups: [ "" ] + resources: ["nodes"] + verbs: [ "get", "watch", "list" ] diff --git a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/clusterrolebinding.yaml b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/clusterrolebinding.yaml new file mode 100644 index 000000000000..1f06e35fc54e --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/clusterrolebinding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ .Name }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ .Name }} +subjects: + - kind: ServiceAccount + name: {{ .Name }} + namespace: e2ek8sattribute-mixrbac diff --git a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/configmap.yaml b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/configmap.yaml new file mode 100644 index 000000000000..33a368cf7bec --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/configmap.yaml @@ -0,0 +1,78 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Name }}-config + namespace: e2ek8sattribute-mixrbac +data: + relay: | + exporters: + otlp: + endpoint: {{ .HostEndpoint }}:4317 + tls: + insecure: true + extensions: + health_check: {} + processors: + k8sattributes: + filter: + namespace: e2ek8sattribute-workloadns + extract: + annotations: + - from: pod + key: workload + tag_name: k8s.annotations.workload + labels: + - from: pod + key: app + tag_name: k8s.labels.app + - from: node + key: foo + - from: namespace + key: foons + metadata: + - k8s.pod.name + - k8s.pod.start_time + - k8s.pod.uid + - k8s.namespace.name + - k8s.deployment.name + - k8s.deployment.uid + - k8s.replicaset.name + - k8s.replicaset.uid + - k8s.node.name + - container.id + - container.image.name + - container.image.tag + - k8s.cluster.uid + pod_association: + - sources: + - from: connection + receivers: + otlp: + protocols: + grpc: + endpoint: ${env:MY_POD_IP}:4317 + service: + extensions: + - health_check + pipelines: + metrics: + exporters: + - otlp + processors: + - k8sattributes + receivers: + - otlp + traces: + exporters: + - otlp + processors: + - k8sattributes + receivers: + - otlp + logs: + exporters: + - otlp + processors: + - k8sattributes + receivers: + - otlp diff --git a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/deployment.yaml b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/deployment.yaml new file mode 100644 index 000000000000..14860e9513fd --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/deployment.yaml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Name }} + namespace: e2ek8sattribute-mixrbac +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: {{ .Name }} + template: + metadata: + labels: + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: {{ .Name }} + spec: + serviceAccountName: {{ .Name }} + containers: + - name: opentelemetry-collector + command: + - /otelcontribcol + - --config=/conf/relay.yaml + image: "otelcontribcol:latest" + imagePullPolicy: Never + ports: + - name: otlp + containerPort: 4317 + protocol: TCP + env: + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + livenessProbe: + httpGet: + path: / + port: 13133 + initialDelaySeconds: 3 + readinessProbe: + httpGet: + path: / + port: 13133 + initialDelaySeconds: 3 + resources: + limits: + cpu: 128m + memory: 256Mi + volumeMounts: + - mountPath: /conf + name: opentelemetry-collector-configmap + volumes: + - name: opentelemetry-collector-configmap + configMap: + name: {{ .Name }}-config + items: + - key: relay + path: relay.yaml diff --git a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/role-workloadns.yaml b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/role-workloadns.yaml new file mode 100644 index 000000000000..70a16a2de0d5 --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/role-workloadns.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: otelcol-workloadns + namespace: e2ek8sattribute-workloadns +rules: + - apiGroups: [""] + resources: ["pods"] + verbs: ["get", "watch", "list"] + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "watch", "list"] diff --git a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/rolebinding-workloadns.yaml b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/rolebinding-workloadns.yaml new file mode 100644 index 000000000000..3ece0171afdd --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/rolebinding-workloadns.yaml @@ -0,0 +1,13 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: otelcol-workloadns + namespace: e2ek8sattribute-workloadns +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: otelcol-workloadns +subjects: + - kind: ServiceAccount + name: otelcol-{{ .TestID }} + namespace: e2ek8sattribute-mixrbac diff --git a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/service.yaml b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/service.yaml new file mode 100644 index 000000000000..fe014682fb8a --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Name }} + namespace: e2ek8sattribute-mixrbac +spec: + type: ClusterIP + ports: + - name: otlp + port: 4317 + targetPort: 4317 + protocol: TCP + appProtocol: grpc + selector: + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: {{ .Name }} diff --git a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/serviceaccount.yaml b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/serviceaccount.yaml new file mode 100644 index 000000000000..e688469a9e49 --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/collector/serviceaccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Name }} + namespace: e2ek8sattribute-mixrbac diff --git a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/otelcol-namespace.yaml b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/otelcol-namespace.yaml new file mode 100644 index 000000000000..a43f6cae18d9 --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/otelcol-namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: e2ek8sattribute-mixrbac + labels: + foons: barns diff --git a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/telemetrygen/deployment.yaml b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/telemetrygen/deployment.yaml new file mode 100644 index 000000000000..a09257347f5e --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/telemetrygen/deployment.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Name }}-{{ .DataType }}-deployment + namespace: e2ek8sattribute-workloadns +spec: + replicas: 1 + selector: + matchLabels: + app: {{ .Name }}-{{ .DataType }}-deployment + template: + metadata: + annotations: + workload: deployment + labels: + app: {{ .Name }}-{{ .DataType }}-deployment + spec: + containers: + - command: + - /telemetrygen + - {{ .DataType }} + - --otlp-insecure + - --otlp-endpoint={{ .OTLPEndpoint }} + - --duration=36000s + - --rate=1 + - --otlp-attributes=service.name="test-{{ .DataType }}-deployment" + - --otlp-attributes=k8s.container.name="telemetrygen" +{{- if eq .DataType "traces" }} + - --status-code= +{{- end }} + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest + imagePullPolicy: IfNotPresent + name: telemetrygen + restartPolicy: Always diff --git a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/workload-namespace.yaml b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/workload-namespace.yaml new file mode 100644 index 000000000000..4cf0a4a67531 --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/workload-namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: e2ek8sattribute-workloadns + labels: + foons: barns diff --git a/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/configmap.yaml b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/configmap.yaml new file mode 100644 index 000000000000..e8170c327bf5 --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/configmap.yaml @@ -0,0 +1,82 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Name }}-config + namespace: e2ek8sattribute-namespacedrbac +data: + relay: | + exporters: + otlp: + endpoint: {{ .HostEndpoint }}:4317 + tls: + insecure: true + extensions: + health_check: {} + processors: + k8sattributes: + filter: + namespace: e2ek8sattribute-namespacedrbac + node_from_env_var: MY_NODE_NAME + labels: + - key: component + value: telemetrygen + op: equals + fields: + - key: spec.restartPolicy + value: Never + op: not-equals + extract: + annotations: + - from: pod + key: workload + tag_name: k8s.annotations.workload + labels: + - from: pod + key: app + tag_name: k8s.labels.app + metadata: + - k8s.pod.name + - k8s.pod.start_time + - k8s.pod.uid + - k8s.namespace.name + - k8s.deployment.name + - k8s.deployment.uid + - k8s.replicaset.name + - k8s.replicaset.uid + - k8s.node.name + - container.id + - container.image.name + - container.image.tag + pod_association: + - sources: + - from: connection + receivers: + otlp: + protocols: + grpc: + endpoint: ${env:MY_POD_IP}:4317 + service: + extensions: + - health_check + pipelines: + metrics: + exporters: + - otlp + processors: + - k8sattributes + receivers: + - otlp + traces: + exporters: + - otlp + processors: + - k8sattributes + receivers: + - otlp + logs: + exporters: + - otlp + processors: + - k8sattributes + receivers: + - otlp diff --git a/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/deployment.yaml b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/deployment.yaml new file mode 100644 index 000000000000..c4c54829bf68 --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/deployment.yaml @@ -0,0 +1,65 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Name }} + namespace: e2ek8sattribute-namespacedrbac +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: {{ .Name }} + template: + metadata: + labels: + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: {{ .Name }} + spec: + serviceAccountName: {{ .Name }} + containers: + - name: opentelemetry-collector + command: + - /otelcontribcol + - --config=/conf/relay.yaml + - --feature-gates=k8sattr.rfc3339 + image: "otelcontribcol:latest" + imagePullPolicy: Never + ports: + - name: otlp + containerPort: 4317 + protocol: TCP + env: + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + - name: MY_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + livenessProbe: + httpGet: + path: / + port: 13133 + initialDelaySeconds: 3 + readinessProbe: + httpGet: + path: / + port: 13133 + initialDelaySeconds: 3 + resources: + limits: + cpu: 128m + memory: 256Mi + volumeMounts: + - mountPath: /conf + name: opentelemetry-collector-configmap + volumes: + - name: opentelemetry-collector-configmap + configMap: + name: {{ .Name }}-config + items: + - key: relay + path: relay.yaml diff --git a/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/role.yaml b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/role.yaml new file mode 100644 index 000000000000..9e3553acac1a --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/role.yaml @@ -0,0 +1,15 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ .Name }} + namespace: e2ek8sattribute-namespacedrbac +rules: + - apiGroups: [""] + resources: ["pods"] + verbs: ["get", "watch", "list"] + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "watch", "list"] + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "watch", "list"] \ No newline at end of file diff --git a/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/rolebinding.yaml b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/rolebinding.yaml new file mode 100644 index 000000000000..fd39c71386ea --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/rolebinding.yaml @@ -0,0 +1,13 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ .Name }} + namespace: e2ek8sattribute-namespacedrbac +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ .Name }} +subjects: + - kind: ServiceAccount + name: {{ .Name }} + namespace: e2ek8sattribute-namespacedrbac diff --git a/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/service.yaml b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/service.yaml new file mode 100644 index 000000000000..9e83585a9058 --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Name }} + namespace: e2ek8sattribute-namespacedrbac +spec: + type: ClusterIP + ports: + - name: otlp + port: 4317 + targetPort: 4317 + protocol: TCP + appProtocol: grpc + selector: + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: {{ .Name }} diff --git a/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/serviceaccount.yaml b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/serviceaccount.yaml new file mode 100644 index 000000000000..8e707e5f3ff6 --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/collector/serviceaccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Name }} + namespace: e2ek8sattribute-namespacedrbac diff --git a/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/namespace.yaml b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/namespace.yaml new file mode 100644 index 000000000000..baaecf01583a --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: e2ek8sattribute-namespacedrbac + labels: + foons: barns diff --git a/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/telemetrygen/deployment.yaml b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/telemetrygen/deployment.yaml new file mode 100644 index 000000000000..fd56c39d4eff --- /dev/null +++ b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/telemetrygen/deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Name }}-{{ .DataType }}-deployment + namespace: e2ek8sattribute-namespacedrbac +spec: + replicas: 1 + selector: + matchLabels: + app: {{ .Name }}-{{ .DataType }}-deployment + template: + metadata: + annotations: + workload: deployment + labels: + app: {{ .Name }}-{{ .DataType }}-deployment + component: telemetrygen + spec: + containers: + - command: + - /telemetrygen + - {{ .DataType }} + - --otlp-insecure + - --otlp-endpoint={{ .OTLPEndpoint }} + - --duration=36000s + - --rate=1 + - --otlp-attributes=service.name="test-{{ .DataType }}-deployment" + - --otlp-attributes=k8s.container.name="telemetrygen" +{{- if eq .DataType "traces" }} + - --status-code= +{{- end }} + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest + imagePullPolicy: IfNotPresent + name: telemetrygen + restartPolicy: Always diff --git a/processor/k8sattributesprocessor/testdata/e2e/telemetrygen/deployment.yaml b/processor/k8sattributesprocessor/testdata/e2e/telemetrygen/deployment.yaml deleted file mode 100644 index bc31edac33ed..000000000000 --- a/processor/k8sattributesprocessor/testdata/e2e/telemetrygen/deployment.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Name }}-{{ .DataType }}-deployment - namespace: default -spec: - replicas: 1 - selector: - matchLabels: - app: {{ .Name }}-{{ .DataType }}-deployment - template: - metadata: - annotations: - workload: deployment - labels: - app: {{ .Name }}-{{ .DataType }}-deployment - spec: - containers: - - command: - - /telemetrygen - - {{ .DataType }} - - --otlp-insecure - - --otlp-endpoint={{ .OTLPEndpoint }} - - --duration=36000s - - --rate=1 - - --otlp-attributes=service.name="test-{{ .DataType }}-deployment" - - --otlp-attributes=k8s.container.name="telemetrygen" -{{- if eq .DataType "traces" }} - - --status-code= -{{- end }} - image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest - imagePullPolicy: IfNotPresent - name: telemetrygen - restartPolicy: Always diff --git a/processor/logstransformprocessor/README.md b/processor/logstransformprocessor/README.md index 29b93a46a384..96198751b7f4 100644 --- a/processor/logstransformprocessor/README.md +++ b/processor/logstransformprocessor/README.md @@ -4,17 +4,15 @@ | Status | | | ------------- |-----------| | Stability | [development]: logs | -| Distributions | [observiq], [splunk], [sumo] | +| Distributions | [] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Flogstransform%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Flogstransform) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Flogstransform%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Flogstransform) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@djaglowski](https://www.github.com/djaglowski), [@dehaansa](https://www.github.com/dehaansa) | [development]: https://github.com/open-telemetry/opentelemetry-collector#development -[observiq]: https://github.com/observIQ/observiq-otel-collector -[splunk]: https://github.com/signalfx/splunk-otel-collector -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector NOTE - This processor is experimental, with the intention that its functionality will be reimplemented in the [transform processor](../transformprocessor/README.md) in the future. +For this reason, the processor is not included in the `contrib` distribution. The logs transform processor can be used to apply [log operators](../../pkg/stanza/docs/operators) to logs coming from any receiver. Please refer to [config.go](./config.go) for the config spec. diff --git a/processor/logstransformprocessor/generated_component_test.go b/processor/logstransformprocessor/generated_component_test.go new file mode 100644 index 000000000000..cfa49c4d827e --- /dev/null +++ b/processor/logstransformprocessor/generated_component_test.go @@ -0,0 +1,127 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package logstransformprocessor + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsProcessor(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(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/processor/logstransformprocessor/go.mod b/processor/logstransformprocessor/go.mod index 9152166fe645..e4a983769d8b 100644 --- a/processor/logstransformprocessor/go.mod +++ b/processor/logstransformprocessor/go.mod @@ -1,58 +1,71 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/logstransformprocessor -go 1.20 +go 1.21 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.89.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.89.0 - go.opentelemetry.io/collector/confmap v0.89.0 - go.opentelemetry.io/collector/consumer v0.89.0 - go.opentelemetry.io/collector/extension v0.89.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 - go.opentelemetry.io/collector/processor v0.89.0 - go.uber.org/zap v1.26.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.98.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.98.0 + go.opentelemetry.io/collector/confmap v0.98.0 + go.opentelemetry.io/collector/consumer v0.98.0 + go.opentelemetry.io/collector/extension v0.98.0 + go.opentelemetry.io/collector/pdata v1.5.0 + go.opentelemetry.io/collector/processor v0.98.0 + go.opentelemetry.io/otel/metric v1.25.0 + go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( - github.com/antonmedv/expr v1.15.3 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/expr-lang/expr v1.16.3 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 // indirect + github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 // 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/knadh/koanf/v2 v2.1.1 // indirect github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // 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/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.98.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.89.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.89.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 // indirect - go.opentelemetry.io/collector/receiver v0.89.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/valyala/fastjson v1.6.4 // indirect + go.opentelemetry.io/collector v0.98.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect + go.opentelemetry.io/collector/featuregate v1.5.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect + go.opentelemetry.io/collector/receiver v0.98.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/processor/logstransformprocessor/go.sum b/processor/logstransformprocessor/go.sum index 9efd45294572..c195792d2398 100644 --- a/processor/logstransformprocessor/go.sum +++ b/processor/logstransformprocessor/go.sum @@ -1,59 +1,37 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/antonmedv/expr v1.15.3 h1:q3hOJZNvLvhqE8OHBs1cFRdbXFNKuA+bHmRaI+AmRmI= -github.com/antonmedv/expr v1.15.3/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/expr-lang/expr v1.16.3 h1:NLldf786GffptcXNxxJx5dQ+FzeWDKChBDqOOwyK8to= +github.com/expr-lang/expr v1.16.3/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.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/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.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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 h1:s9ZL6ZhFF8y6ebnm1FLvobkzoIu5xwDQUcRPk/IEhpM= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6/go.mod h1:aXdIdfn2OcGnMhOTojXmwZqXKgC3MU5riiNvzwwG9OY= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 h1:2r2WiFeAwiJ/uyx1qIKnV1L4C9w/2V8ehlbJY4gjFaM= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4/go.mod h1:1yEQhaLb/cETXCqQmdh7lDjupNAReO7c83AHyK2dJ48= 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= @@ -62,17 +40,16 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI 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/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 h1:bCiVCRCs1Heq84lurVinUPy19keqGEe4jh5vtK37jcg= github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= 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.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/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= @@ -82,146 +59,129 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +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.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= +github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.89.0 h1:lzpfD9NTHh+1M+qzcoYUH+i2rOgFSox3bGQFUI5BPJg= -go.opentelemetry.io/collector v0.89.0/go.mod h1:UZUtmQ3kai0CLPWvPmHKpmwqqEoo50n1bwzYYhXX0eA= -go.opentelemetry.io/collector/component v0.89.0 h1:PoQJX86BpaSZhzx0deQXHh3QMuW6XKVmolSdTKE506c= -go.opentelemetry.io/collector/component v0.89.0/go.mod h1:ZZncnMVaNs++JIbAMiemUIWLZrZ3PMEzI3S3K8pnkws= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0 h1:NtRknYDfMgP1r8mnByo6qQQK8IBw/lF9Qke5f7VhGZ0= -go.opentelemetry.io/collector/config/configtelemetry v0.89.0/go.mod h1:+LAXM5WFMW/UbTlAuSs6L/W72WC+q8TBJt/6z39FPOU= -go.opentelemetry.io/collector/confmap v0.89.0 h1:N5Vg1+FXEFBHHlGIPg4OSlM9uTHjCI7RlWWrKjtOzWQ= -go.opentelemetry.io/collector/confmap v0.89.0/go.mod h1:D8FMPvuihtVxwXaz/qp5q9X2lq9l97QyjfsdZD1spmc= -go.opentelemetry.io/collector/consumer v0.89.0 h1:MteKhkudX2L1ylbtdpSazO8SwyHSxl6fUEElc0rRLDQ= -go.opentelemetry.io/collector/consumer v0.89.0/go.mod h1:aOaoi6R0qVvfHu0pEPCzSE74gIPNJoCQM8Ml4Bc9NHE= -go.opentelemetry.io/collector/extension v0.89.0 h1:iiaWIPPFqP4T0FSgl6+D1xRUhVnhsk88uk2BxCFqt7E= -go.opentelemetry.io/collector/extension v0.89.0/go.mod h1:tBh5wD4AZ3xFO6M1CjkEEx2urexTqcAcgi9cJSPME3E= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018 h1:iK4muX3KIMqKk0xwKcRzu4ravgCtUdzsvuxxdz6A27g= -go.opentelemetry.io/collector/featuregate v1.0.0-rcv0018/go.mod h1:xGbRuw+GbutRtVVSEy3YR2yuOlEyiUMhN2M9DJljgqY= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018 h1:a2IHOZKphRzPagcvOHQHHUE0DlITFSKlIBwaWhPZpl4= -go.opentelemetry.io/collector/pdata v1.0.0-rcv0018/go.mod h1:oNIcTRyEJYIfMcRYyyh5lquDU0Vl+ktTL6ka+p+dYvg= -go.opentelemetry.io/collector/processor v0.89.0 h1:ypMnoOqBYbXgbDnAm9/Cb4uN3kxvmI05Vf6o4u/riBU= -go.opentelemetry.io/collector/processor v0.89.0/go.mod h1:HzMQ2VbxaECk7Oy1mHtug4qsl4acAW4XP1hpTgQKv84= -go.opentelemetry.io/collector/receiver v0.89.0 h1:wC/FB8e2Ej06jjNW2OiuZoyiSyB8TQNIzYyPlh9oRqI= -go.opentelemetry.io/collector/receiver v0.89.0/go.mod h1:Rk7Bkz45fVdrcJaVDsPTnHa97ZfSs1ULO76LXc4kLN0= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/prometheus v0.43.0 h1:Skkl6akzvdWweXX6LLAY29tyFSO6hWZ26uDbVGTDXe8= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opentelemetry.io/collector v0.98.0 h1:O7bpARGWzNfFQEYevLl4iigDrpGTJY3vV/kKqNZzMOk= +go.opentelemetry.io/collector v0.98.0/go.mod h1:fvPM+tBML07uvAP1MV2msYPSYJ9U/lgE1jDb3AFBaMM= +go.opentelemetry.io/collector/component v0.98.0 h1:0TMaBOyCdABiVLFdGOgG8zd/1IeGldCinYonbY08xWk= +go.opentelemetry.io/collector/component v0.98.0/go.mod h1:F6zyQLsoExl6r2q6WWZm8rmSSALbwG2zwIHLrMzZVio= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0 h1:f8RNZ1l/kYPPoxFmKKvTUli8iON7CMsm85KM38PVNts= +go.opentelemetry.io/collector/config/configtelemetry v0.98.0/go.mod h1:YV5PaOdtnU1xRomPcYqoHmyCr48tnaAREeGO96EZw8o= +go.opentelemetry.io/collector/confmap v0.98.0 h1:qQreBlrqio1y7uhrAvr+W86YbQ6fw7StgkbYpvJ2vVc= +go.opentelemetry.io/collector/confmap v0.98.0/go.mod h1:BWKPIpYeUzSG6ZgCJMjF7xsLvyrvJCfYURl57E5vhiQ= +go.opentelemetry.io/collector/consumer v0.98.0 h1:47zJ5HFKXVA0RciuwkZnPU5W8j0TYUxToB1/zzzgEhs= +go.opentelemetry.io/collector/consumer v0.98.0/go.mod h1:c2edTq38uVJET/NE6VV7/Qpyznnlz8b6VE7J6TXD57c= +go.opentelemetry.io/collector/extension v0.98.0 h1:08B5ipEsoNmPHY96j5EUsUrFre01GOZ4zgttUDtPUkY= +go.opentelemetry.io/collector/extension v0.98.0/go.mod h1:fZ1Hnnahszl5j3xcW2sMRJ0FLWDOFkFMQeVDP0Se7i8= +go.opentelemetry.io/collector/featuregate v1.5.0 h1:uK8qnYQKz1TMkK+FDTFsywg/EybW/gbnOUaPNUkRznM= +go.opentelemetry.io/collector/featuregate v1.5.0/go.mod h1:w7nUODKxEi3FLf1HslCiE6YWtMtOOrMnSwsDam8Mg9w= +go.opentelemetry.io/collector/pdata v1.5.0 h1:1fKTmUpr0xCOhP/B0VEvtz7bYPQ45luQ8XFyA07j8LE= +go.opentelemetry.io/collector/pdata v1.5.0/go.mod h1:TYj8aKRWZyT/KuKQXKyqSEvK/GV+slFaDMEI+Ke64Yw= +go.opentelemetry.io/collector/pdata/testdata v0.98.0 h1:8gohV+LFXqMzuDwfOOQy9GcZBOX0C9xGoQkoeXFTzmI= +go.opentelemetry.io/collector/pdata/testdata v0.98.0/go.mod h1:B/IaHcf6+RtxI292CZu9TjfYQdi1n4+v6b8rHEonpKs= +go.opentelemetry.io/collector/processor v0.98.0 h1:onrg8a99lToytbHF148Bg9a7DfNk31B+p6UHouiiVTw= +go.opentelemetry.io/collector/processor v0.98.0/go.mod h1:QxgzjmJI12DQWN0LIHmZBOR7HRzPuVWFW4oqTdrS1ho= +go.opentelemetry.io/collector/receiver v0.98.0 h1:qw6JYwm+sHcZvM1DByo3QlGe6yGHuwd0yW4hEPVqYKU= +go.opentelemetry.io/collector/receiver v0.98.0/go.mod h1:AwIWn+KnquTR+kbhXQrMH+i2PvTCFldSIJznBWFYs0s= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0 h1:OL6yk1Z/pEGdDnrBbxSsH+t4FY1zXfBRGd7bjwhlMLU= +go.opentelemetry.io/otel/exporters/prometheus v0.47.0/go.mod h1:xF3N4OSICZDVbbYZydz9MHFro1RjmkPUKEvar2utG+Q= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +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= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= 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/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -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/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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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/sync v0.0.0-20220722155255-886fb9371eb4/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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= 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/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 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/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/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -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.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.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/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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/logstransformprocessor/internal/metadata/generated_status.go b/processor/logstransformprocessor/internal/metadata/generated_status.go index 811b88331dd8..f28a44376d66 100644 --- a/processor/logstransformprocessor/internal/metadata/generated_status.go +++ b/processor/logstransformprocessor/internal/metadata/generated_status.go @@ -4,9 +4,22 @@ package metadata import ( "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("logstransform") ) const ( - Type = "logstransform" LogsStability = component.StabilityLevelDevelopment ) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("otelcol/logstransform") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("otelcol/logstransform") +} diff --git a/processor/logstransformprocessor/metadata.yaml b/processor/logstransformprocessor/metadata.yaml index 5edf8909d332..d31075f3d632 100644 --- a/processor/logstransformprocessor/metadata.yaml +++ b/processor/logstransformprocessor/metadata.yaml @@ -1,9 +1,16 @@ type: logstransform +scope_name: otelcol/logstransform status: class: processor stability: development: [logs] - distributions: [observiq, splunk, sumo] + distributions: [] codeowners: - active: [djaglowski, dehaansa] \ No newline at end of file + active: [djaglowski, dehaansa] + +tests: + config: + operators: + - type: regex_parser + regex: '^(?P